/* The Undercroft (UCFT) launch page
   Concept: an abandoned Sub-Strata transit kiosk, brought back online by the resistance.
   Palette pulled from the comics: near-black, bone, copper. Cyan belongs to the Code and
   the String only. Green appears only when the network is open.
   Shape rule: interface is sharp (2px). Physical objects (cards) have card corners. */

:root {
  --ink: #0d0b09;
  --ink-1: #15110d;
  --ink-2: #1d1712;
  --line: #3a2f24;
  --line-soft: #271f18;
  --bone: #eadbc0;
  --bone-2: #b9a98a;
  --bone-3: #8f816a;
  --copper: #c47c46;
  --copper-hi: #dc9661;
  --cyan: #6fd6e3;
  --signal: #9fd98c;

  --f-display: "Big Shoulders Stencil Display", Impact, "Arial Narrow", sans-serif;
  --f-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --f-serif: "IBM Plex Serif", Georgia, serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --bar-h: 52px;
  --section-pad: clamp(80px, 11vw, 148px);
  --r: 2px;
  --r-card: 4px;

  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--copper); color: var(--ink); padding: 8px 14px; font-family: var(--f-mono); font-size: .85rem;
}
.skip:focus { top: 10px; }

/* CRT wash: fixed, non-interactive, never on a scrolling layer */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgb(234 219 192 / .022) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 40%, transparent 55%, rgb(0 0 0 / .45) 100%);
}

/* ---------- shared section scaffolding ---------- */
main > section { padding: var(--section-pad) var(--gutter); }
main > section > * { max-width: var(--max); margin-inline: auto; }

.section-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: .92;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--bone);
}
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head p { margin-top: 18px; max-width: 60ch; color: var(--bone-2); }

.text-link {
  font-family: var(--f-mono); font-size: .9rem; color: var(--copper-hi);
  text-underline-offset: 4px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-family: var(--f-mono); font-size: .9rem; font-weight: 500; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap;
  border-radius: var(--r); border: 1px solid transparent;
  transition: background-color .2s, border-color .2s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--copper); color: var(--ink); }
.btn-primary:hover { background: var(--copper-hi); }
.btn-ghost { border-color: var(--line); color: var(--bone); }
.btn-ghost:hover { border-color: var(--bone-3); }
body[data-net="open"] .btn-primary { background: var(--signal); }

/* ---------- kiosk bar ---------- */
.kiosk-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  height: var(--bar-h); padding: 0 var(--gutter);
  background: rgb(13 11 9 / .9);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--f-mono); font-size: .8rem;
  backdrop-filter: blur(6px);
}
.kiosk-id { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone-2); white-space: nowrap; }
.kiosk-id .arch { width: 18px; height: 18px; fill: var(--copper); }
.kiosk-nav { display: flex; gap: 22px; margin-left: auto; }
.kiosk-nav a { color: var(--bone-3); text-decoration: none; }
.kiosk-nav a:hover { color: var(--bone); }
.net-state {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--bone-2); white-space: nowrap;
}
body[data-net="open"] .net-state { color: var(--signal); border-color: rgb(159 217 140 / .45); }

@media (max-width: 900px) {
  .kiosk-nav { display: none; }
  .net-state { margin-left: auto; }
  .kiosk-id span { display: none; }
}

/* ---------- hero ---------- */
main > section.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  min-height: calc(100dvh - var(--bar-h));
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
main > section.hero > * { max-width: none; margin: 0; }

.boot-log {
  font-family: var(--f-mono); font-size: .8rem; line-height: 1.75;
  color: var(--bone-3); margin-bottom: 28px;
}
.boot-log li::before { content: "> "; color: var(--copper); }
.boot-log .boot-ok { color: var(--bone-2); }

.title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(3.6rem, 9.2vw, 8.2rem);
  line-height: .86;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--bone);
}
.lede { margin-top: 22px; max-width: 34ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--bone-2); }

.countdown { margin-top: clamp(28px, 4vw, 44px); }
.countdown-label { font-family: var(--f-mono); font-size: .8rem; color: var(--copper-hi); }
.digits { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; margin-top: 10px; }
.unit { padding: 0 clamp(14px, 2.2vw, 26px); border-left: 1px solid var(--line); }
.unit:first-child { padding-left: 0; border-left: 0; }
.unit span {
  display: block;
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem); line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.unit small { display: block; margin-top: 6px; font-family: var(--f-mono); font-size: .72rem; color: var(--bone-3); }
.countdown-when { margin-top: 16px; font-family: var(--f-mono); font-size: .8rem; color: var(--bone-3); }
.countdown-when .local { display: block; }
body[data-net="open"] .digits { display: none; }
body[data-net="open"] .countdown-label { color: var(--signal); font-size: 1rem; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4vw, 40px); }

.hero-visual {
  position: relative;
  padding: 10px;
  background: var(--ink-1);
  border: 1px solid var(--line);
}
.hero-poster { display: block; }
.hero-visual img { width: 100%; filter: contrast(1.04) saturate(.9); transition: filter .3s; }
.hero-poster:hover img { filter: contrast(1.08) saturate(1); }
.hero-visual figcaption { margin-top: 10px; font-family: var(--f-mono); font-size: .75rem; color: var(--bone-3); }
.hero-visual::after {
  content: ""; position: absolute; inset: 10px 10px 34px; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgb(13 11 9 / .18) 0 1px, transparent 1px 3px);
}
.code-watch {
  position: absolute; top: 22px; right: 22px; z-index: 2;
  width: 30px; height: 30px;
  fill: none; stroke: var(--cyan); stroke-width: 2.4;
  opacity: .32;
}

@media (max-width: 900px) {
  main > section.hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual { max-width: 520px; }
}
@media (max-width: 420px) {
  .unit { padding: 0 10px; }
  .unit span { font-size: 2.3rem; }
}

/* entrance prep (only when motion allowed and JS will animate) */
.motion .boot-log li, .motion .hero-visual { visibility: hidden; }

/* ---------- fair launch ---------- */
main > section.fair {
  background: var(--ink-1);
  border-block: 1px solid var(--line-soft);
  padding-block: clamp(64px, 9vw, 120px);
}
.fair-line {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.7rem); line-height: 1.02;
  max-width: 24ch;
  color: var(--bone);
}
.fair-sub { margin-top: 22px; max-width: 58ch; color: var(--bone-2); }

/* ---------- transmission ---------- */
.tx-head p { max-width: 62ch; }
.tx-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.tx-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tx-panel { border: 1px solid var(--line); background: var(--ink-1); padding: 6px; }
.tx-panel img { width: 100%; aspect-ratio: 620 / 500; object-fit: cover; }

.tx-log { font-family: var(--f-mono); font-size: .88rem; display: grid; gap: 16px; counter-reset: tx; }
.tx-log li { display: grid; gap: 4px; padding-left: 16px; border-left: 2px solid var(--line); transition: opacity .3s, border-color .3s; }
.tx-log b { font-weight: 500; color: var(--copper-hi); }
.tx-log span { color: var(--bone-2); }

/* Pinned, one-panel-at-a-time mode (desktop with motion) */
@media (min-width: 900px) {
  .motion .tx-inner { height: 100dvh; padding: calc(var(--bar-h) + 20px) 0 24px; display: flex; flex-direction: column; justify-content: center; }
  /* sized by whichever runs out first: column width or viewport height */
  .motion .tx-stage {
    display: block; position: relative; aspect-ratio: 620 / 500;
    width: min(100%, calc((100dvh - var(--bar-h) - 90px) * 620 / 500));
  }
  .motion .tx-panel { position: absolute; inset: 0; }
  .motion .tx-panel img { height: 100%; aspect-ratio: auto; }
  .motion .tx-log li { opacity: .32; }
  .motion .tx-log li.is-active { opacity: 1; border-left-color: var(--copper); }
}
@media (max-width: 899px) {
  .tx-body { grid-template-columns: 1fr; }
  .tx-log { display: none; }
  .tx-stage { grid-template-columns: 1fr; }
}

.genesis { margin-top: clamp(80px, 12vw, 160px); text-align: center; }
.genesis p {
  font-family: var(--f-serif); font-style: italic;
  font-size: clamp(1.6rem, 3.6vw, 2.8rem); line-height: 1.25;
  max-width: 24ch; margin-inline: auto;
  color: var(--bone);
}

/* ---------- coin ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "feat mine terms" "feat net net";
  gap: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px);
}
.spec-feature { grid-area: feat; }
.spec-group:nth-child(2) { grid-area: mine; }
.spec-group:nth-child(3) { grid-area: terms; }
.spec-ports { grid-area: net; }
.spec-group { border-top: 1px solid var(--line); padding-top: 18px; }
.spec-group h3 { font-family: var(--f-mono); font-size: .8rem; font-weight: 500; color: var(--copper-hi); margin-bottom: 14px; }
.spec-big { font-family: var(--f-display); font-weight: 900; font-size: clamp(5rem, 13vw, 10rem); line-height: .85; margin-bottom: 26px; }
.spec-big span { font-size: .3em; font-weight: 700; color: var(--bone-2); letter-spacing: .04em; }
.spec-group dl { display: grid; gap: 14px; }
.spec-group dt { font-family: var(--f-mono); font-size: .75rem; color: var(--bone-3); }
.spec-group dd { color: var(--bone); }
.spec-ports dl { grid-template-columns: repeat(2, max-content); column-gap: 48px; }
.spec-ports dd { font-family: var(--f-mono); }

@media (max-width: 900px) {
  .spec-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "feat feat" "mine terms" "net net"; }
}
@media (max-width: 560px) {
  .spec-grid { grid-template-columns: 1fr; grid-template-areas: "feat" "mine" "terms" "net"; }
}

/* ---------- cards ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); counter-reset: step; margin-bottom: clamp(56px, 8vw, 96px); }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--f-display); font-weight: 900; font-size: 3rem; line-height: 1;
  color: var(--copper);
  margin-bottom: 12px;
}
.steps h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.steps p { color: var(--bone-2); max-width: 40ch; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.odds { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; margin-bottom: clamp(72px, 10vw, 128px); }
.odds-grid svg { width: 100%; height: auto; }
.odds-grid svg rect { fill: var(--line-soft); }
.odds-grid svg rect.uncommon { fill: var(--bone-2); }
.odds-grid svg rect.holo { fill: var(--copper-hi); }
.odds-grid svg rect.secret { fill: var(--cyan); filter: drop-shadow(0 0 3px var(--cyan)); }
.odds-grid figcaption { margin-top: 12px; font-family: var(--f-mono); font-size: .75rem; color: var(--bone-3); max-width: 60ch; }

.odds-table { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: .9rem; }
.odds-table th, .odds-table td { text-align: left; padding: 14px 0; font-weight: 400; }
.odds-table thead th { font-size: .72rem; color: var(--bone-3); padding-top: 0; border-bottom: 1px solid var(--line); }
.odds-table thead th + th { text-align: right; }
.odds-table thead th:last-child { padding-left: 18px; }
.odds-table td { text-align: right; }
.odds-table td:last-child { color: var(--bone-3); padding-left: 18px; }
.odds-table tbody th { display: flex; align-items: center; gap: 12px; color: var(--bone); }
.odds-table tbody th::before { content: ""; width: 10px; height: 10px; flex: none; background: var(--line); }
.odds-table tr[data-tier="uncommon"] th::before { background: var(--bone-2); }
.odds-table tr[data-tier="holo"] th::before { background: var(--copper-hi); }
.odds-table tr[data-tier="secret"] th::before { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.odds-table tbody td:nth-child(2) { color: var(--bone); }
@media (max-width: 860px) { .odds { grid-template-columns: 1fr; } }

.card-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); margin-bottom: clamp(56px, 8vw, 96px); }
.card-group h3 { font-size: 1.15rem; font-weight: 600; }
.card-group > p { margin-top: 6px; color: var(--bone-2); max-width: 44ch; }
.card-pair, .redacted-row { display: grid; gap: clamp(14px, 2vw, 24px); margin-top: 28px; }
.card-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.redacted-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .card-row { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .redacted-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tcg { position: relative; aspect-ratio: 5 / 7; border-radius: var(--r-card); }
.tilt { transform-style: preserve-3d; will-change: transform; cursor: default; }
.tilt img { width: 100%; height: 100%; border-radius: var(--r-card); box-shadow: 0 22px 40px -18px rgb(0 0 0 / .8); }
.tilt .sheen {
  position: absolute; inset: 0; border-radius: var(--r-card); pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgb(255 236 205 / .3), transparent 48%);
  mix-blend-mode: screen; opacity: var(--sheen, 0);
}

.redacted {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 0 10px 18px;
  background:
    radial-gradient(ellipse 42% 30% at 50% 40%, rgb(0 0 0 / .85), transparent 70%),
    linear-gradient(160deg, var(--ink-2), var(--ink) 70%);
  --tc: var(--copper-hi);
  text-align: center;
}
.redacted[data-tier="secret"] { --tc: var(--cyan); }
.redacted::before {
  /* the silhouette: a shape you can't make out */
  content: ""; position: absolute; left: 22%; right: 22%; top: 18%; bottom: 38%;
  border-radius: 40% 40% 30% 30%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--tc) 22%, transparent), transparent 70%);
  filter: blur(10px);
}
.rune { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rune rect {
  fill: none; stroke: var(--tc); stroke-width: 1.4; vector-effect: non-scaling-stroke;
  stroke-dasharray: 2 5 14 5 2 9;
  filter: drop-shadow(0 0 4px var(--tc));
  animation: rune-run 9s linear infinite; animation-play-state: paused;
}
.redacted.is-live .rune rect { animation-play-state: running; }
@keyframes rune-run { to { stroke-dashoffset: -148; } }
.redacted .tier { position: relative; font-family: var(--f-mono); font-size: .78rem; color: var(--tc); }
.redacted .discover { position: relative; font-family: var(--f-mono); font-size: .68rem; color: var(--bone-3); text-transform: uppercase; letter-spacing: .06em; }

.set-note { max-width: 760px; padding: 22px 26px; border-left: 3px solid var(--copper); background: var(--ink-1); }
.set-note h3 { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1; text-transform: uppercase; }
.set-note p { margin-top: 10px; color: var(--bone-2); }

/* ---------- trust ---------- */
main > section.trust { background: var(--ink-1); border-block: 1px solid var(--line-soft); }
main > section.trust > * { max-width: var(--max); }
.trust { display: grid; }
.trust-cols { display: grid; gap: 0; }
.trust-cols > div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 48px;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.trust-cols h3 { font-size: 1.15rem; font-weight: 600; }
.trust-cols p { color: var(--bone-2); max-width: 62ch; }
.trust-cols .text-link { grid-column: 2; justify-self: start; }
@media (max-width: 760px) {
  .trust-cols > div { grid-template-columns: 1fr; }
  .trust-cols .text-link { grid-column: 1; }
}

/* ---------- roadmap ---------- */
.road-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.road-col h3 {
  font-family: var(--f-mono); font-size: .85rem; font-weight: 500;
  padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.road-col li { position: relative; padding-left: 30px; margin-bottom: 14px; color: var(--bone-2); font-size: .98rem; }
.road-col li::before { position: absolute; left: 0; top: .1em; font-family: var(--f-mono); font-size: .8rem; color: var(--bone-3); }
.road-col[data-status="done"] h3 { color: var(--bone); }
.road-col[data-status="done"] li::before { content: "[x]"; color: var(--copper-hi); }
.road-col[data-status="done"] li { color: var(--bone); }
.road-col[data-status="launch"] h3 { color: var(--copper-hi); }
.road-col[data-status="launch"] li::before { content: "[>]"; color: var(--copper-hi); }
.road-col[data-status="planned"] li::before { content: "[ ]"; }
.road-col[data-status="maybe"] li::before { content: "[?]"; }
.road-col[data-status="planned"] h3, .road-col[data-status="maybe"] h3 { color: var(--bone-3); }
@media (max-width: 960px) { .road-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; } }
@media (max-width: 520px) { .road-cols { grid-template-columns: 1fr; } }

.wont { margin-top: clamp(48px, 7vw, 80px); padding: 22px 26px; border-left: 3px solid var(--copper); background: var(--ink-1); max-width: 760px; }
.wont h3 { font-size: 1.05rem; font-weight: 600; }
.wont p { margin-top: 6px; color: var(--bone-2); }

/* ---------- story ---------- */
.story-feature {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
  margin-bottom: clamp(56px, 8vw, 96px);
}
.story-feature-link { display: block; }
.story-feature-cover {
  position: relative; aspect-ratio: 5 / 4; overflow: hidden;
  border: 1px solid var(--line); background: #000; padding: 8px;
}
.story-feature-cover img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.story-feature-link:hover .story-feature-cover img { transform: scale(1.02); }
.story-feature-cover.is-sealed {
  display: grid; place-items: center; align-content: center; gap: 16px;
  background:
    repeating-linear-gradient(90deg, rgb(111 214 227 / .05) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg, rgb(234 219 192 / .03) 0 1px, transparent 1px 5px),
    var(--ink-1);
}
.story-feature-cover.is-sealed svg { width: 64px; height: 64px; fill: none; stroke: var(--cyan); stroke-width: 2; opacity: .6; }
.story-feature-cover.is-sealed p { font-family: var(--f-mono); font-size: .85rem; color: var(--bone-3); }
.story-kind { font-family: var(--f-mono); font-size: .8rem; color: var(--copper-hi); }
.story-feature-body h3 {
  margin-top: 10px; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.4rem, 5vw, 4rem); line-height: .92;
}
.story-hook { margin-top: 16px; font-size: 1.15rem; color: var(--bone); max-width: 36ch; }
.story-when { margin-top: 16px; font-family: var(--f-mono); font-size: .85rem; color: var(--bone-2); }
.story-feature-body .btn { margin-top: 24px; }
@media (max-width: 860px) { .story-feature { grid-template-columns: 1fr; } }

.story-more { margin-bottom: clamp(56px, 8vw, 96px); }
.story-more h3, .world h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 20px; }

.world-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 64px); }
.world-list > div { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.world-list dt { font-family: var(--f-mono); font-size: .85rem; color: var(--copper-hi); }
.world-list dd { margin-top: 4px; color: var(--bone-2); max-width: 52ch; }
.world-cards { margin-top: 28px; color: var(--bone-2); }
.world-cards .text-link { margin-left: 6px; }
@media (max-width: 760px) { .world-list { grid-template-columns: 1fr; } }

/* ---------- issue shelf (story + reader page) ---------- */
.issue-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(16px, 3vw, 32px); }
.issue-btn { display: block; text-decoration: none; color: inherit; }
.issue-cover {
  position: relative; aspect-ratio: 5 / 4; overflow: hidden;
  border: 1px solid var(--line); background: var(--ink-1); padding: 6px;
}
.issue-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
a.issue-btn:hover .issue-cover img { transform: scale(1.03); }
.issue-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.issue-meta b { font-weight: 600; }
.issue-meta span { font-family: var(--f-mono); font-size: .78rem; color: var(--bone-3); }
.issue-summary { margin-top: 4px; color: var(--bone-2); font-size: .95rem; }

.issue-sealed .issue-cover {
  display: grid; place-items: center; align-content: center; gap: 14px;
  background:
    repeating-linear-gradient(90deg, rgb(111 214 227 / .05) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg, rgb(234 219 192 / .03) 0 1px, transparent 1px 5px),
    var(--ink-1);
}
.issue-sealed .issue-cover svg { width: 46px; height: 46px; fill: none; stroke: var(--cyan); stroke-width: 2; opacity: .55; }
.issue-sealed .issue-cover p { font-family: var(--f-mono); font-size: .78rem; color: var(--bone-3); }
.issue-loading { aspect-ratio: 5 / 4; border: 1px solid var(--line-soft); background: linear-gradient(100deg, var(--ink-1) 40%, var(--ink-2) 50%, var(--ink-1) 60%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.archive-error { color: var(--bone-2); font-family: var(--f-mono); font-size: .9rem; }

/* ---------- access ---------- */
.access-panel { border: 1px solid var(--line); background: var(--ink-1); padding: clamp(24px, 4vw, 48px); }
.access-seal { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.seal-mark { width: 56px; height: 56px; fill: none; stroke: var(--cyan); stroke-width: 2; opacity: .5; }
.access-seal h3, .access-open h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 14px; }
.ready li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--bone-2); max-width: 64ch; }
.ready li::before { content: ">"; position: absolute; left: 0; font-family: var(--f-mono); color: var(--copper); }
@media (max-width: 560px) { .access-seal { grid-template-columns: 1fr; } }

.access-open { display: grid; gap: clamp(32px, 5vw, 48px); }
.dl-list { display: grid; gap: 12px; }
.dl {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.dl b { font-weight: 600; }
.dl-meta { grid-column: 1; font-family: var(--f-mono); font-size: .75rem; color: var(--bone-3); overflow-wrap: anywhere; white-space: pre-line; }
.dl .btn { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl .btn { grid-column: 1; grid-row: auto; justify-self: start; } }
.seed-list { font-family: var(--f-mono); font-size: .9rem; background: var(--ink); border: 1px solid var(--line-soft); padding: 16px 18px; overflow-x: auto; }
.seed-list li::before { content: "addnode="; color: var(--bone-3); }
.go-steps { counter-reset: go; display: grid; gap: 16px; }
.go-steps li { counter-increment: go; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); }
.go-steps li::before { content: counter(go); font-family: var(--f-display); font-weight: 900; font-size: 1.8rem; line-height: 1; color: var(--copper); }
.go-steps b { display: block; font-weight: 600; }
.go-steps span { color: var(--bone-2); }
.access-wait { font-family: var(--f-mono); font-size: .9rem; color: var(--bone-2); }

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 40px;
  padding: 40px var(--gutter) 56px; border-top: 1px solid var(--line-soft);
  font-size: .9rem; color: var(--bone-3);
}
.foot-mark { font-family: var(--f-display); font-weight: 900; font-size: 1.5rem; text-transform: uppercase; color: var(--bone); }
.foot-mark span { color: var(--copper); }
.foot nav { display: flex; gap: 22px; font-family: var(--f-mono); font-size: .82rem; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--bone); }
.foot-note { margin-left: auto; }
@media (max-width: 700px) { .foot-note { margin-left: 0; } }

/* ---------- buttons shared by the reader ---------- */
.reader-btn { background: none; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; cursor: pointer; font-family: var(--f-mono); font-size: .85rem; }
.reader-btn:hover { border-color: var(--bone-3); }
.reader-btn[disabled] { opacity: .35; cursor: default; }

/* ---------- story reader page ---------- */
.rd { max-width: var(--max); margin-inline: auto; padding: clamp(28px, 5vw, 56px) var(--gutter) var(--section-pad); }
.rd > section:not(.rd-sealed) { padding: 0; }
.rd > .rd-sealed { padding: clamp(28px, 5vw, 56px); }
.rd-head { margin-bottom: 24px; }
.rd-kind { margin-top: 18px; font-family: var(--f-mono); font-size: .8rem; color: var(--copper-hi); }
.rd-title { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .92; }
.rd-stage {
  display: grid; place-items: center;
  border: 1px solid var(--line); background: #000; padding: 6px;
  touch-action: pan-y; user-select: none;
}
.rd-stage img { width: 100%; max-height: calc(100dvh - var(--bar-h) - 150px); object-fit: contain; aspect-ratio: 5 / 4; }
.rd-error { padding: 48px 16px; font-family: var(--f-mono); color: var(--bone-2); }
.rd-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.rd-count { font-family: var(--f-mono); font-size: .85rem; color: var(--bone-2); }
.rd-pages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.rd-page {
  min-width: 40px; min-height: 40px; cursor: pointer;
  font-family: var(--f-mono); font-size: .85rem;
  background: none; border: 1px solid var(--line); border-radius: var(--r); color: var(--bone-3);
}
.rd-page:hover { border-color: var(--bone-3); color: var(--bone); }
.rd-page[aria-current="page"] { border-color: var(--copper); color: var(--bone); background: var(--ink-1); }
.rd-hint { margin-top: 12px; text-align: center; font-family: var(--f-mono); font-size: .75rem; color: var(--bone-3); }
.rd-sealed {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start;
  padding: clamp(28px, 5vw, 56px); border: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, rgb(111 214 227 / .05) 0 2px, transparent 2px 7px),
    var(--ink-1);
}
.rd-sealed-line { font-size: 1.15rem; font-weight: 600; }
.rd-sealed-when { margin-top: 8px; font-family: var(--f-mono); font-size: .85rem; color: var(--bone-2); }
.rd-sealed-when [data-rd-left] { display: block; color: var(--bone-3); }
.rd-sealed-hint { margin-top: 8px; color: var(--bone-3); }
.rd-missing { padding: 32px 0; color: var(--bone-2); }
.rd-more { margin-top: clamp(56px, 8vw, 96px); }
.rd-more h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 20px; }
@media (max-width: 560px) {
  .rd-sealed { grid-template-columns: 1fr; }
  .rd-controls .reader-btn { padding: 10px 12px; }
}

/* ---------- 404 ---------- */
.lost { max-width: var(--max); margin-inline: auto; padding: clamp(64px, 12vw, 160px) var(--gutter); min-height: calc(100dvh - var(--bar-h)); }
.lost .title { font-size: clamp(3.4rem, 9vw, 7.4rem); }

/* ---------- whitepaper page ---------- */
.wp {
  display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 68ch);
  grid-template-areas: "head head" "toc body";
  gap: 40px clamp(32px, 6vw, 96px);
  max-width: var(--max); margin-inline: auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) var(--section-pad);
}
.wp-head { grid-area: head; }
.wp-head .title { font-size: clamp(3rem, 8vw, 6.4rem); }
.wp-sub { margin-top: 14px; font-family: var(--f-mono); font-size: .85rem; color: var(--copper-hi); }
.wp-toc { grid-area: toc; }
.wp-toc ol { position: sticky; top: calc(var(--bar-h) + 24px); display: grid; gap: 10px; font-family: var(--f-mono); font-size: .8rem; }
.wp-toc a { color: var(--bone-3); text-decoration: none; }
.wp-toc a:hover { color: var(--bone); }
.wp-body { grid-area: body; }
.wp-body h2 {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1;
  margin: 56px 0 16px; padding-top: 16px; border-top: 1px solid var(--line);
}
.wp-body h2:first-child { margin-top: 0; }
.wp-body p { color: var(--bone-2); margin-bottom: 16px; }
.wp-body h3 { font-size: 1.15rem; font-weight: 600; margin: 32px 0 10px; }
.wp-specs { display: grid; gap: 0; font-size: .95rem; }
.wp-specs > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 10px 0; }
.wp-specs > div + div { border-top: 1px solid var(--line-soft); }
.wp-specs dt { font-family: var(--f-mono); font-size: .8rem; color: var(--bone-3); padding-top: 2px; }
@media (max-width: 820px) {
  .wp { grid-template-columns: 1fr; grid-template-areas: "head" "body"; }
  .wp-toc { display: none; }
  .wp-specs > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- reduced motion: everything static ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
