/* IronGuard
   Zinc plate, gunmetal bore, oxidized copper.
   Big Shoulders Display, Familjen Grotesk, Martian Mono.
   License: fonts/OFL.txt */

@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/big-shoulders-display-800.woff2") format("woff2");
}

@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/familjen-grotesk.woff2") format("woff2");
}

@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/martian-mono.woff2") format("woff2");
}

:root {
  --zinc: #d5dbdf;
  --plate: #f4f7f8;
  --mill: #1c2428;
  --scale: #3e4c54;
  --copper: #8a3e28;
  --bore: #2c3c44;
  --wire: #e4b39a;
  --lip: #c5ced2;
  --groove: #e6ebed;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Familjen Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  --mono: "Martian Mono", "Courier New", monospace;
  --wrap: 1120px;
  --pad: clamp(16px, 3vw, 28px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--zinc);
  color: var(--mill);
  font-family: var(--body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  text-rendering: geometricPrecision;
}

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

::selection {
  background: var(--wire);
  color: var(--mill);
}

img { max-width: 100%; }

a {
  color: var(--copper);
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, p { margin: 0; }

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.1rem, 7.2vw, 6.1rem);
  line-height: 0.86;
  letter-spacing: -0.015em;
}

h2 {
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

code, pre, .mono { font-family: var(--mono); }

p code,
li code,
dd code,
.note code {
  font-size: 0.86em;
  font-weight: 500;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.skip {
  position: absolute;
  left: 12px;
  top: 8px;
  transform: translateY(-140%);
  background: var(--plate);
  color: var(--mill);
  padding: 8px 12px;
  z-index: 5;
}

.skip:focus { transform: none; }

.wrap {
  width: min(var(--wrap), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.catalog {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--copper);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--mill);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1;
}

.wordmark svg { display: block; flex: none; }

.top nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.top nav a {
  color: var(--scale);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
}

.top nav a:hover { color: var(--mill); }

.face {
  background: var(--plate);
  border: 1px solid var(--lip);
  box-shadow: inset 0 1px 0 #fff;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px) clamp(24px, 4vw, 48px);
}

.stamp {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--scale);
}

.stamp a { color: var(--scale); text-decoration: none; }

.stamp a:hover { color: var(--copper); }

.lede {
  max-width: 38rem;
  margin-top: 22px;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--scale);
}

.bore { margin: 36px 0 8px; }

.bore svg { width: 100%; height: auto; display: block; }

.bore p {
  margin-top: 14px;
  max-width: 46rem;
  color: var(--scale);
}

.frame-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--scale);
}

.frame-key b {
  color: var(--mill);
  font-weight: 500;
}

.commands { display: grid; gap: 10px; margin-top: 28px; }

.slot {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 6px 6px 16px;
  background: var(--groove);
  border: 1px solid var(--lip);
}

.slot code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.slot-name {
  flex: none;
  width: 11.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.copy {
  flex: none;
  min-width: 76px;
  min-height: 42px;
  padding: 0 14px;
  background: var(--plate);
  border: 1px solid var(--lip);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
}

.copy:hover { color: var(--copper); border-color: var(--copper); }

.copy[data-state="done"] { color: var(--copper); }

.oneline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  color: var(--scale);
  font-size: 0.98rem;
}

.oneline code {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--mill);
}

.oneline .copy { min-height: 36px; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px;
  margin: 48px auto;
  padding: 0;
  list-style: none;
}

.facts b {
  display: block;
  margin-bottom: 6px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.facts span { color: var(--scale); }

.section { padding: 18px 0 64px; }

.section h2 { margin-bottom: 12px; }

.section .intro {
  max-width: 42rem;
  margin-bottom: 28px;
  color: var(--scale);
}

.steps {
  margin: 0;
  padding: 0 0 0 1.4rem;
  max-width: 46rem;
}

.steps > li { margin: 0 0 32px; padding-left: 8px; }

.steps > li::marker {
  color: var(--copper);
  font-family: var(--mono);
  font-weight: 500;
}

.steps h3 { margin-bottom: 8px; }

.steps p { margin-bottom: 12px; }

.steps .commands { margin-top: 12px; }

.aside {
  max-width: 46rem;
  margin-top: 8px;
  padding-top: 8px;
}

.aside h3 { margin-bottom: 8px; }

.aside p { margin-bottom: 12px; color: var(--scale); }

.spec {
  display: grid;
  grid-template-columns: 11rem 1fr;
  margin: 0;
}

.spec dt,
.spec dd {
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--lip);
}

.spec dt {
  padding-right: 16px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--copper);
}

.spec dd { color: var(--mill); }

.spec dt:last-of-type,
.spec dd:last-of-type { border-bottom: 1px solid var(--lip); }

.filehead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

pre {
  margin: 0;
  padding: 18px 20px;
  overflow: auto;
  background: var(--plate);
  border: 1px solid var(--lip);
  border-left: 3px solid var(--copper);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.6;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  border-bottom: 1px solid var(--lip);
  margin-bottom: 18px;
}

.tabs button {
  min-height: 44px;
  padding: 8px 14px;
  color: var(--scale);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs button[aria-selected="true"] {
  color: var(--mill);
  border-bottom-color: var(--copper);
}

.panel p { margin-bottom: 14px; color: var(--scale); max-width: 42rem; }

.panel .commands { margin-top: 0; }

.note { margin-top: 14px; color: var(--scale); max-width: 42rem; }

.faq { max-width: 46rem; }

.faq details { border-top: 1px solid var(--lip); }

.faq details:last-of-type { border-bottom: 1px solid var(--lip); }

.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--copper);
}

.faq details[open] summary::after { content: "–"; }

.faq details p {
  margin: 0 0 16px;
  max-width: 62ch;
}

.close { margin-bottom: 28px; }

.footer {
  padding: 28px 0 48px;
  color: var(--scale);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--lip);
}

.footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }

.footer a { color: var(--scale); }

.footer a:hover { color: var(--copper); }

.status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .spec { grid-template-columns: 1fr; }
  .spec dt { padding-bottom: 0; }
  .spec dd { border-top: 0; padding-top: 0; }
  .spec dt:last-of-type { border-bottom: 0; }
  .slot-name { width: auto; }
}

@media (max-width: 720px) {
  .top { flex-wrap: wrap; align-items: flex-start; padding-top: 14px; padding-bottom: 10px; min-height: 0; }
  .wordmark { font-size: 1.45rem; }
  .top nav { order: 3; width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 8px 14px; }
  h1 { line-height: 0.9; }
  .slot { align-items: stretch; flex-direction: column; padding: 10px; }
  .slot-name { width: auto; }
  .copy { align-self: flex-start; }
  .facts { grid-template-columns: 1fr; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
