:root {
  /* State world */
  --state-bg: #f4f6f7;
  --state-surface: #ffffff;
  --state-ink: #1c2226;
  --state-muted: #5c6b73;
  --state-cyan: #7fb2bd;
  --state-cyan-dim: #a9c9d1;
  --alert-red: #b3382e;
  --hairline: #d8dfe2;
  /* Resistance world */
  --earth-bg: #17120e;
  --earth-surface: #211a14;
  --earth-ink: #e8ddcd;
  --earth-muted: #a08d75;
  --copper: #b06a3b;
  --copper-bright: #cf8a55;
  --candle: #e0a458;
  --earth-hairline: #3a2f24;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--state-ink); background: var(--state-bg); line-height: 1.6; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
::selection { background: var(--copper); color: #fff; }
a { color: inherit; }

/* ---------- State world: administrative calm ---------- */
.state { background: var(--state-bg); }
header.site {
  border-bottom: 1px solid var(--hairline);
  background: var(--state-surface);
}
header.site .wrap {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap; gap: .5rem;
}
.brand { font-family: var(--mono); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--state-muted); text-decoration: none; }
nav a { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--state-muted); text-decoration: none; margin-left: 1.4rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--alert-red); }

.hero { padding: 7rem 0 5rem; }
.classification {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--state-muted); border: 1px solid var(--hairline); background: var(--state-surface);
  padding: .45em 1em; border-radius: 2px; margin-bottom: 2.5rem;
}
.classification .dot { width: .55em; height: .55em; border-radius: 50%; background: var(--alert-red); }
h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.05; letter-spacing: -0.015em; max-width: 18ch;
}
h1 em { font-style: italic; color: var(--alert-red); }
.hero p.lede { margin-top: 2rem; max-width: 44ch; font-size: 1.15rem; color: var(--state-muted); }
.hero .meta { margin-top: 3rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--state-muted); }

.question {
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  background: var(--state-surface); padding: 4.5rem 0;
}
.question p {
  font-family: var(--serif); font-size: clamp(1.4rem, 3.2vw, 2.1rem); line-height: 1.35;
  max-width: 30ch; margin: 0 auto; text-align: center; font-style: italic;
}

.kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--state-muted); margin-bottom: 1.2rem; }
section { padding: 5rem 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2.5rem; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; margin-bottom: 1rem; letter-spacing: -0.01em; }
.state p, .state li { color: #3c464c; max-width: 58ch; }

/* ---------- Transition band: the Gorgon gradient ---------- */
.transition {
  height: 14rem;
  background: linear-gradient(to bottom, var(--state-bg) 0%, #cbbfae 35%, #6b543c 70%, var(--earth-bg) 100%);
  position: relative;
}
.transition span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,244,225,.75);
}

/* ---------- Resistance world: embodied texture ---------- */
.earth { background: var(--earth-bg); color: var(--earth-ink); position: relative; }
.earth::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.earth > * { position: relative; }
.earth .kicker { color: var(--copper-bright); }
.earth h2 { color: var(--earth-ink); }
.earth p, .earth li { color: var(--earth-muted); max-width: 58ch; }
.earth strong { color: var(--earth-ink); font-weight: 600; }

ol.beats { list-style: none; counter-reset: beat; display: grid; gap: 0; margin-top: 1rem; }
ol.beats li {
  counter-increment: beat; padding: 1.15rem 0 1.15rem 3.4rem; position: relative;
  border-top: 1px solid var(--earth-hairline);
}
ol.beats li:last-child { border-bottom: 1px solid var(--earth-hairline); }
ol.beats li::before {
  content: counter(beat, decimal-leading-zero); position: absolute; left: 0; top: 1.3rem;
  font-family: var(--mono); font-size: .8rem; color: var(--copper);
}
ol.beats b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--earth-ink); }

.refusals { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.refusals span {
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--earth-ink);
  border: 1px solid var(--copper); border-radius: 999px; padding: .35em 1.1em;
}

.accuracy { border: 1px solid var(--earth-hairline); background: var(--earth-surface); padding: 2rem; border-radius: 3px; margin-top: 2rem; }
.accuracy h3 { font-family: var(--mono); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--candle); margin-bottom: .8rem; font-weight: 400; }
.accuracy p { font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tags code { font-family: var(--mono); font-size: .72rem; padding: .3em .8em; border-radius: 2px; background: #17120e; border: 1px solid var(--earth-hairline); color: var(--earth-muted); }

footer { border-top: 1px solid var(--earth-hairline); padding: 3rem 0 4rem; }
footer p { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--earth-muted); }
footer .rest { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--earth-ink); margin-bottom: 1.6rem; letter-spacing: 0; }

/* ---------- Interior pages (process / canon / artefacts) ---------- */
.page-head { padding: 5rem 0 2rem; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 24ch; }
.page-head p.lede { margin-top: 1.4rem; max-width: 52ch; color: var(--state-muted); font-size: 1.05rem; }
.breadcrumb { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--state-muted); margin-bottom: 1.6rem; }
.breadcrumb a { text-decoration: none; border-bottom: 1px dotted currentColor; }
.prose { padding-bottom: 4rem; }
.prose p { max-width: 60ch; margin-bottom: 1.1rem; color: #3c464c; }
.prose h2 { margin-top: 2.5rem; }

/* Filter bar */
.filters { display: flex; flex-wrap: wrap; gap: 1.4rem; padding: 1.4rem 0 2.4rem; border-bottom: 1px solid var(--hairline); }
.filters .axis { display: flex; flex-direction: column; gap: .4rem; }
.filters .axis-label { font-family: var(--mono); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--state-muted); }
.filters .axis-values { display: flex; flex-wrap: wrap; gap: .35rem; }
.filters .axis-values span { font-family: var(--mono); font-size: .68rem; padding: .25em .7em; border: 1px solid var(--hairline); border-radius: 2px; color: var(--state-muted); background: var(--state-surface); }

/* Artefact gallery grid */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.6rem; padding: 2.5rem 0 5rem; }
.card {
  display: flex; flex-direction: column; border: 1px solid var(--hairline);
  background: var(--state-surface); border-radius: 3px; overflow: hidden;
  text-decoration: none; color: inherit; transition: border-color .15s;
}
.card:hover { border-color: var(--alert-red); }
.card .poster { aspect-ratio: 16 / 9; background: #e4e9eb; display: flex; align-items: center; justify-content: center; color: var(--state-muted); font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; }
.card .poster img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.25; }
.card .test-flag { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--alert-red); }

/* Register Audit Mark (WHERE / WHO / HOW / CLAIMS) */
.ram { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .5rem 1rem; margin-top: auto; }
.ram .cell { display: flex; flex-direction: column; gap: .1rem; }
.ram .cell b { font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--state-muted); font-weight: 400; }
.ram .cell span { font-family: var(--mono); font-size: .68rem; color: var(--state-ink); }

/* Claim chips + disclosure */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font-family: var(--mono); font-size: .66rem; padding: .28em .7em; border-radius: 999px; border: 1px solid var(--hairline); color: var(--state-muted); text-decoration: none; background: var(--state-surface); }
.chip.existing { border-color: #7fb2bd; color: #3a6a74; }
.chip.plausible_extrapolation { border-color: #c8a35b; color: #8a6a25; }
.chip.speculative { border-color: var(--alert-red); color: var(--alert-red); }
.chip.poetic_nonliteral { border-color: var(--copper); color: var(--copper); }
.disclosure { border: 1px solid var(--alert-red); border-radius: 3px; background: #fbf0ef; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.disclosure b { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--alert-red); display: block; margin-bottom: .4rem; }

/* Provenance Lens / Evidence Ledger drawers */
details.drawer { border: 1px solid var(--hairline); border-radius: 3px; margin: 1rem 0; background: var(--state-surface); }
details.drawer > summary { cursor: pointer; padding: .9rem 1.1rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--state-muted); }
details.drawer > summary:hover { color: var(--alert-red); }
details.drawer .drawer-body { padding: 0 1.1rem 1.1rem; }
details.drawer dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; font-size: .85rem; }
details.drawer dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--state-muted); }
details.drawer dd { color: #3c464c; }

/* Data table (claims, canon, media manifest) */
table.data { width: 100%; border-collapse: collapse; margin: 1.5rem 0 4rem; font-size: .85rem; }
table.data th, table.data td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.data th { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--state-muted); font-weight: 400; }
table.data td { color: #3c464c; max-width: 40ch; }

.empty-note { padding: 3rem 0 5rem; color: var(--state-muted); font-family: var(--mono); font-size: .8rem; letter-spacing: .05em; }

@media (max-width: 40rem) {
  .hero { padding: 4rem 0 3.5rem; }
  section { padding: 3.5rem 0; }
  nav a { margin-left: .9rem; }
}

/* ---------- Research essays ---------- */
.essay-list { max-width: 60ch; margin: 1rem 0 4rem; padding-left: 1.4rem; }
.essay-list li { margin-bottom: .8rem; font-family: var(--serif); font-size: 1.05rem; }
.essay-list a { color: var(--state-ink); text-decoration-color: var(--state-cyan); }
.essay-list a:hover { color: var(--copper); }
.prose h3, .prose h4 { margin-top: 2rem; margin-bottom: .6rem; max-width: 60ch; }
.prose ul, .prose ol { max-width: 60ch; margin: 0 0 1.1rem 1.4rem; color: #3c464c; }
.prose blockquote { max-width: 58ch; margin: 1.2rem 0; padding-left: 1rem; border-left: 3px solid var(--copper); color: var(--state-muted); font-family: var(--serif); }
.prose sup.cite { font-size: .65em; color: var(--state-muted); }
.table-scroll { overflow-x: auto; margin: 1.4rem 0; }
.table-scroll table.data { min-width: 40rem; }

/* ---------- Junket / interviews ---------- */
.junket-card { margin: 3rem 0; padding-top: 1.5rem; border-top: 1px solid var(--hairline); }
.junket-card blockquote { max-width: 58ch; margin: .8rem 0 1.2rem; padding-left: 1rem; border-left: 3px solid var(--copper); font-family: var(--serif); font-size: 1.1rem; color: #3c464c; }
.junket-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; max-width: 56rem; }
.junket-videos figcaption { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--state-muted); margin-bottom: .3rem; }
