@font-face {
  font-family: "Barlow Condensed";
  src: url("./fonts/barlow-condensed-900-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("./fonts/source-sans-3-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/ibm-plex-mono-600-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --cabinet: #161014;
  --ink: #1c1412;
  --paper: #e8dcc8;
  --cream: #f3ead8;
  --graphite: #2a2220;
  --muted: #6b5c52;
  --line: #c9b79a;
  --burgundy: #9a1b2f;
  --gold: #c4a35a;
  --oxide: #8c4a32;
  --glass: #7a9a94;
  --white: #fff8ee;
  --shadow: 0 24px 60px rgb(22 16 20 / 28%);
  --shell: min(1180px, calc(100% - 40px));
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--cabinet);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17.5px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgb(232 220 200 / 12%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(232 220 200 / 12%) 1px, transparent 1px);
  background-size: 24px 24px;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
#top { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 12px;
  padding: .55rem .85rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 12;
  top: 0;
  border-bottom: 1px solid rgb(196 163 90 / 28%);
  background: rgb(22 16 20 / 92%);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  align-items: center;
  min-height: 68px;
  gap: 20px;
}
.site-mark {
  color: var(--gold);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin-left: auto;
  font-size: .86rem;
}
.site-nav a { text-decoration: none; color: var(--paper); }
.site-nav a:hover { color: var(--gold); }
.language-switcher { display: flex; align-items: center; gap: .4rem; }
.language-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.language-link {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 36px;
  padding: 0 .45rem;
  border: 1px solid rgb(201 183 154 / 35%);
  text-decoration: none;
  font-family: var(--mono);
  font-size: .72rem;
}
.language-link.is-current {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--white);
}

.eyebrow, .micro-label {
  margin: 0 0 .7rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow.light, .micro-label { color: var(--gold); }
h1, h2, h3 { margin: 0 0 .8rem; font-family: var(--display); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
h1 {
  font-size: clamp(3.4rem, 10vw, 7.4rem);
  line-height: .9;
  text-transform: uppercase;
  max-width: 14ch;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); text-transform: uppercase; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1rem; }
.hero-standfirst, .section-intro { max-width: 42rem; font-size: 1.12rem; }
.hero-note, .footer-note, .source-method { color: var(--paper); opacity: .82; }

.hero { padding: 42px 0 28px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 36px;
  align-items: end;
}
.refusal-figure {
  margin: 0;
  position: relative;
}
.bench-card {
  min-height: 280px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgb(243 234 216 / 6%), transparent 30%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgb(154 27 47 / 18%) 23px 24px),
    var(--graphite);
  border: 1px solid var(--gold);
  box-shadow: var(--shadow);
}
.stamp {
  display: inline-block;
  padding: .25rem .55rem;
  border: 2px solid var(--burgundy);
  color: var(--burgundy);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  transform: rotate(-6deg);
}
.refused-line {
  margin: 28px 0 8px;
  color: var(--gold);
  font-family: var(--display);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  text-transform: uppercase;
  line-height: .9;
}
.machine-line { font-family: var(--mono); font-size: .82rem; color: var(--glass); }
.refusal-figure figcaption, .toy-caption {
  margin-top: .7rem;
  font-size: .88rem;
  color: var(--muted);
}
.hero-note { display: flex; gap: .6rem; max-width: 40rem; }
.note-mark { color: var(--burgundy); font-weight: 800; }

.signal-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}
.signal {
  padding: 14px 14px 16px;
  border-top: 3px solid var(--gold);
  background: rgb(243 234 216 / 5%);
}
.signal strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: .9;
  color: var(--white);
}
.signal span, .signal small { display: block; }
.signal small { color: var(--muted); }

.answer-bar {
  padding: 28px 0;
  background: var(--burgundy);
  color: var(--white);
}
.answer-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}
.answer-bar h2 { color: var(--white); }

.section { padding: 72px 0; }
.section-paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.section-paper .eyebrow, .section-cream .eyebrow { color: var(--oxide); }
.section-paper a, .section-cream a { color: var(--burgundy); }
.section-cream { background: var(--cream); color: var(--ink); color-scheme: light; }
.section-cabinet { background: var(--cabinet); }
.section-graphite { background: var(--graphite); }
.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 28px;
  align-items: end;
}

.question-grid, .practice-grid, .evidence-like {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.question-card, .practice-card, .lineage-card {
  padding: 18px 18px 20px;
  background: rgb(255 248 238 / 72%);
  border: 1px solid rgb(28 20 18 / 12%);
}
.section-cabinet .question-card,
.section-graphite .lineage-card { background: rgb(243 234 216 / 6%); border-color: rgb(201 183 154 / 22%); }
.question-1 { border-top: 4px solid var(--burgundy); }
.question-2 { border-top: 4px solid var(--gold); }
.question-3 { border-top: 4px solid var(--glass); }

.bench-module {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: start;
}
.bench-tabs { display: grid; gap: 8px; }
.bench-tab {
  display: flex;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid rgb(201 183 154 / 28%);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.bench-tab[aria-selected="true"] {
  background: var(--burgundy);
  border-color: var(--burgundy);
}
.tab-number { font-family: var(--mono); color: var(--gold); }
.bench-tab small { display: block; color: var(--paper); opacity: .75; }
.bench-panel {
  min-height: 320px;
  padding: 22px;
  border: 1px solid rgb(196 163 90 / 35%);
  background:
    linear-gradient(180deg, rgb(154 27 47 / 12%), transparent 28%),
    var(--graphite);
}
.refusal-box {
  padding: 12px 14px;
  margin: 0 0 18px;
  border-left: 4px solid var(--gold);
  background: rgb(0 0 0 / 18%);
}
.step-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.step-list li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
}
.step-year { font-family: var(--mono); color: var(--gold); }
.nojs-stack, .nojs-toys { display: none; }
html:not(.js) .nojs-stack, html:not(.js) .nojs-toys { display: grid; gap: 16px; margin-top: 20px; }
html:not(.js) .bench-module, html:not(.js) .toy-grid { display: none; }
.nojs-panel {
  padding: 16px;
  border: 1px solid rgb(201 183 154 / 28%);
}

.toy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.toy {
  padding: 18px;
  background: var(--cream);
  color: var(--ink);
  color-scheme: light;
}
.toy .eyebrow { color: var(--oxide); }
.toy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.toy button, .toy input {
  min-height: 44px;
  padding: .55rem .85rem;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  cursor: pointer;
}
.toy input {
  background: var(--white);
  color: var(--ink);
  font-family: var(--mono);
  width: 8rem;
}
.galaxy {
  position: relative;
  height: 220px;
  margin: 10px 0;
  background: var(--cabinet);
  overflow: hidden;
}
.planet {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
}
.planet.alt { background: var(--burgundy); }
.planet.glass { background: var(--glass); }
.room-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.room {
  aspect-ratio: 1;
  background: var(--cabinet);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.room[data-kind="0"] { background: #2b1a18; }
.room[data-kind="1"] { background: #3a2a18; }
.room[data-kind="2"] { background: #1b2a28; }
.room[data-kind="3"] { background: #3a1820; }
.scanline {
  position: relative;
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 92px;
  padding: 12px 10px 10px;
  background: repeating-linear-gradient(180deg, #0d0a0c 0 3px, #161014 3px 6px);
  border: 1px solid var(--gold);
}
.scanline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  height: 2px;
  background: rgb(196 163 90 / 55%);
}
.sprite {
  width: 22px;
  height: 42px;
  background: var(--gold);
  position: relative;
  z-index: 1;
}
.sprite:nth-child(3n) { background: var(--burgundy); }
.sprite:nth-child(3n+2) { background: var(--glass); }
.sprite.is-player {
  background: var(--white);
  box-shadow: 0 0 0 2px var(--burgundy);
  height: 52px;
}
.sprite.is-overflow {
  opacity: .38;
  background: repeating-linear-gradient(45deg, var(--oxide) 0 4px, transparent 4px 8px), var(--cream);
}
.js .sprite.is-overflow {
  animation: flicker .28s steps(2) infinite;
}
@keyframes flicker { 50% { opacity: .08; } }
.budget-readout { font-family: var(--mono); font-size: .82rem; }

.lineage-list { display: grid; gap: 18px; }
.lineage-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
}
.lineage-year {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--burgundy);
}
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.how-box { padding: 10px 12px; background: rgb(154 27 47 / 6%); }
.practice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.practice-card { border-left: 4px solid var(--oxide); }

.pull-quote {
  margin: 0 0 22px;
  max-width: 40rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.05;
  text-transform: uppercase;
}
.exit-line {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 2px solid var(--burgundy);
  font-size: 1.2rem;
}

.faq-list details { border-top: 1px solid rgb(28 20 18 / 16%); }
.faq-list summary {
  display: flex;
  gap: 12px;
  min-height: 52px;
  align-items: center;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}
.faq-list summary span { font-family: var(--mono); color: var(--oxide); }
.faq-answer { padding: 0 0 16px 44px; }

.source-list { display: grid; gap: 12px; }
.source-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgb(201 183 154 / 22%);
}
.source-number { font-family: var(--display); font-size: 1.6rem; color: var(--gold); }
.source-open {
  align-self: start;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--mono);
  font-size: .78rem;
}
.source-ref {
  font-family: var(--mono);
  font-size: .78em;
  color: var(--burgundy);
  text-decoration: none;
}
.section-cabinet .source-ref { color: var(--gold); }
.source-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  color: var(--muted);
  font-size: .9rem;
}

.site-footer { padding: 28px 0 40px; border-top: 1px solid rgb(196 163 90 / 25%); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr);
  gap: 18px;
  align-items: end;
}
.footer-author, .footer-library {
  display: inline-block;
  margin-right: 1rem;
  color: var(--gold);
}
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: var(--back-top-bottom, 16px);
  z-index: 15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: .55rem .8rem;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.back-to-top.is-enhanced { opacity: 1; pointer-events: auto; }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.error-page a { color: var(--gold); }

@media (max-width: 900px) {
  .hero-grid, .answer-grid, .split-heading, .bench-module, .toy-grid, .how-grid, .question-grid, .practice-grid, .footer-grid, .source-row, .lineage-card {
    grid-template-columns: 1fr;
  }
  .signal-row { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
  h1 { font-size: clamp(2.8rem, 16vw, 4.4rem); }
}
@media (max-width: 520px) {
  .signal-row { grid-template-columns: 1fr; }
  .step-list li { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .sprite.is-overflow { animation: none; }
}
