/* ==========================================================================
   Zeraix — "the dark studio and the lit object"
   --------------------------------------------------------------------------
   One continuous scroll. The canyon runs underneath the whole site; chapters
   are pinned to the viewport and advance across it.

   Two accents carry meaning and are never decorative:
     magenta = ships today (taken from the application's own accent)
     blue    = runtime and research (the river)
   ========================================================================== */

:root {
  color-scheme: dark;

  --ground: #04070e;
  --ground-raised: rgba(10, 16, 29, .72);
  --paper: #f4f7fb;
  --paper-dim: #cfd8e8;
  --muted: #8c99ae;
  --quiet: #5d6879;

  --blue: #5b9dff;
  --magenta: #ff2d78;
  --magenta-dim: #b81b53;

  --line: rgba(196, 214, 246, .12);
  --line-strong: rgba(196, 214, 246, .24);

  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI Variable Display", ui-sans-serif, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;

  --rail: 178px;
  --gutter: clamp(20px, 4vw, 58px);
}

* { box-sizing: border-box; }

html { background: var(--ground); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--ground);
  color: var(--paper-dim);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
code { font: .88em var(--mono); color: var(--paper); }

::selection { background: rgba(91, 157, 255, .3); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 24px; top: -64px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--paper);
  color: var(--ground);
  font-weight: 600;
}
.skip-link:focus { top: 24px; }

/* ── the stage ───────────────────────────────────────────────────────── */

.visual-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ground);
}

#system-flow-canvas,
.webgl-fallback,
.stage-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#system-flow-canvas {
  z-index: 2;
  display: block;
  opacity: 0;
  transition: opacity .8s ease;
}
.webgl-ready #system-flow-canvas { opacity: 1; }

.webgl-fallback {
  z-index: 1;
  max-width: none;
  object-fit: cover;
  object-position: 62% center;
  opacity: .5;
  filter: saturate(.5) contrast(1.1) brightness(.5);
}
.webgl-ready .webgl-fallback { opacity: 0; }

/* Readability scrim. Deepens under the copy column as chapters get denser. */
.stage-shade {
  z-index: 3;
  pointer-events: none;
  opacity: var(--scrim, .55);
  transition: opacity .5s linear;
  background:
    linear-gradient(90deg, rgba(4, 7, 14, .92) 0%, rgba(4, 7, 14, .5) 42%, transparent 74%),
    linear-gradient(180deg, rgba(4, 7, 14, .6) 0%, transparent 24%, transparent 62%, rgba(4, 7, 14, .86) 100%);
}

/* ── HUD frame ───────────────────────────────────────────────────────── */

.hud-frame {
  position: fixed;
  inset: 16px;
  z-index: 40;
  pointer-events: none;
  border: 1px solid rgba(196, 214, 246, .05);
}
.hud-corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 0 solid rgba(196, 214, 246, .26);
}
.hud-corner-tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.hud-corner-tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.hud-corner-bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-corner-br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

/* ── header ──────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.015em;
  color: var(--paper);
}
.brand img { display: block; }

.header-actions { display: flex; align-items: center; gap: 20px; }

.ghost-link {
  color: var(--muted);
  font: 12px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .22s ease;
}
.ghost-link:hover { color: var(--paper); }

/* ── buttons ─────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: transform .22s ease, background-color .22s ease, box-shadow .22s ease;
  /* notched corner — the chrome motif, repeated at every scale */
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.button-solid { background: var(--paper); color: #070a11; }
.button-solid:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 12px 32px rgba(91, 157, 255, .22);
}

.button-quiet {
  background: rgba(196, 214, 246, .07);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.button-quiet:hover { transform: translateY(-2px); background: rgba(196, 214, 246, .13); }

.button-lg { min-height: 52px; padding-inline: 26px; font-size: 14px; }

/* ── chapter index ───────────────────────────────────────────────────── */

.chapter-index {
  position: fixed;
  left: var(--gutter);
  top: 50%;
  z-index: 55;
  transform: translateY(-50%);
  width: calc(var(--rail) - 26px);
}

.chapter-index ol {
  display: grid;
  gap: 1px;
  margin: 0; padding: 0;
  list-style: none;
}

.chapter-rail {
  position: absolute;
  left: 3px; top: 10px; bottom: 10px;
  width: 1px;
  overflow: hidden;
  background: rgba(196, 214, 246, .1);
}
.chapter-rail i {
  display: block;
  width: 100%; height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  background: linear-gradient(180deg, rgba(91, 157, 255, .2), var(--blue));
}

.chapter-index button {
  display: grid;
  grid-template-columns: 7px 20px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font: 10px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: left;
  transition: color .3s ease;
}
.chapter-index button i {
  width: 7px; height: 7px;
  box-shadow: inset 0 0 0 1px rgba(196, 214, 246, .22);
  transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.chapter-index button b { font-weight: 400; opacity: .45; }
.chapter-index button span { transition: letter-spacing .3s ease; }

.chapter-index button:hover { color: var(--paper-dim); }
.chapter-index button.is-passed { color: var(--muted); }
.chapter-index button.is-passed i { background: rgba(91, 157, 255, .42); box-shadow: none; }
.chapter-index button.is-active { color: var(--paper); }
.chapter-index button.is-active b { opacity: 1; color: var(--blue); }
.chapter-index button.is-active span { letter-spacing: .2em; }
.chapter-index button.is-active i {
  background: var(--blue);
  box-shadow: 0 0 12px rgba(91, 157, 255, .8);
  transform: scale(1.2);
}

/* ── the progressive stage ───────────────────────────────────────────── */

.story { position: relative; z-index: 10; }
.story-spacer { height: 880vh; min-height: 6400px; }

.story-stage {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.chapter {
  --enter: 0;
  --shift: 0px;
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: clamp(28px, 4vh, 64px);
  padding: 116px var(--gutter) 96px;
  opacity: var(--enter);
  visibility: hidden;
  transform: translate3d(0, var(--shift), 0);
  filter: blur(calc((1 - var(--enter)) * 6px));
  will-change: opacity, transform, filter;
}
.chapter.is-live { visibility: visible; pointer-events: auto; }

.chapter-copy { max-width: 620px; }
.chapter-copy-wide { max-width: 880px; }

@media (min-width: 1280px) {
  .chapter { padding-left: calc(var(--rail) + var(--gutter)); }
}

@media (min-width: 1080px) {
  .chapter-split,
  .chapter-device {
    grid-auto-flow: column;
    grid-template-columns: minmax(320px, .92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: clamp(38px, 4.6vw, 84px);
  }
  .chapter-device { grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr); }
  .chapter-device-left .chapter-copy { order: 2; }
  .chapter-device-left .device { order: 1; }
}

.chapter-kicker {
  margin: 0 0 22px;
  color: var(--quiet);
  font: 10px var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.chapter-kicker b { color: var(--blue); font-weight: 400; margin-right: 12px; }

.chapter h2 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 550;
  line-height: 1.05;
  letter-spacing: -.038em;
  text-wrap: balance;
}

.chapter-lede {
  max-width: 40em;
  margin: clamp(16px, 2vw, 26px) 0 0;
  color: var(--muted);
  font-size: clamp(14.5px, 1.1vw, 17px);
  line-height: 1.66;
}

.chapter-note {
  max-width: 38em;
  margin: 22px 0 0;
  padding-left: 16px;
  border-left: 1px solid var(--magenta-dim);
  color: var(--quiet);
  font-size: 13.5px;
  line-height: 1.65;
}

.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: clamp(26px, 3.2vw, 40px);
}

/* ── chapter 01 · hero ───────────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 28px;
  color: var(--blue);
  font: 11px var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.chapter-hero h1 { margin: 0; }

.hero-wordmark {
  display: block;
  color: var(--paper);
  font-size: clamp(56px, 7.8vw, 112px);
  font-weight: 600;
  line-height: .86;
  letter-spacing: -.055em;
}

.hero-line {
  display: block;
  margin-top: clamp(18px, 2.4vw, 30px);
  color: var(--paper);
  font-size: clamp(22px, 2.9vw, 40px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.03em;
}

.hero-claim {
  margin: 14px 0 0;
  color: var(--paper-dim);
  font: 12px var(--mono);
  letter-spacing: .05em;
}

/* ── device frame: the lit object ────────────────────────────────────── */

.device { margin: 0; min-width: 0; }
.device img {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  object-position: left center;
  height: auto;
  border-radius: 11px;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, .92),
    0 0 0 1px rgba(196, 214, 246, .13),
    0 0 90px -18px rgba(91, 157, 255, .3);
}
.device figcaption {
  margin-top: 16px;
  color: var(--quiet);
  font: 10px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ── supporting blocks ───────────────────────────────────────────────── */

.fact-stack { margin: 0; display: grid; border-top: 1px solid var(--line-strong); }
.fact-stack div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.fact-stack dt { color: var(--paper); font: 12px var(--mono); letter-spacing: .04em; }
.fact-stack dd { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.chip-row li {
  padding: 6px 13px;
  color: var(--paper-dim);
  font: 10px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.mini-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.mini-steps li {
  padding: 14px 26px 0 0;
  margin-right: 26px;
  border-right: 1px solid var(--line);
  color: var(--paper);
  font: 12px var(--mono);
}
.mini-steps li:last-child { border-right: 0; margin-right: 0; }
.mini-steps b { display: block; margin-bottom: 7px; color: var(--blue); font-weight: 400; font-size: 10px; letter-spacing: .18em; }

/* capability / control */
.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.ledger-col { padding: clamp(20px, 2.2vw, 30px); background: var(--ground-raised); backdrop-filter: blur(8px); }
.ledger-head {
  margin: 0 0 18px;
  color: var(--quiet);
  font: 9px var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.ledger-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ledger-col li {
  position: relative;
  padding-left: 20px;
  color: var(--paper-dim);
  font-size: 13.5px;
  line-height: 1.5;
}
.ledger-col li::before {
  content: "";
  position: absolute;
  left: 0; top: .58em;
  width: 8px; height: 1px;
  background: var(--quiet);
}
.ledger-col-guard { background: rgba(255, 45, 120, .05); }
.ledger-col-guard .ledger-head { color: #ff8fb8; }
.ledger-col-guard li::before { background: var(--magenta); width: 10px; }

/* ── verified execution cell ─────────────────────────────────────────── */

/* Explicit column counts, not auto-fit: six parts auto-fitted leave an orphan
   on the second row and make the chapter too tall to pin. */
.cell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  max-width: 1120px;
  background: var(--line);
  border: 1px solid var(--line-strong);
}
@media (min-width: 900px) { .cell { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .cell { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cell-part {
  position: relative;
  padding: clamp(16px, 1.8vw, 24px);
  background: var(--ground-raised);
  backdrop-filter: blur(8px);
  transition: background-color .3s ease;
}
.cell-part:hover { background: rgba(91, 157, 255, .1); }
.cell-part::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.2, .7, .3, 1);
}
.cell-part:hover::after { transform: scaleX(1); }
.cell-part b {
  display: block;
  margin-bottom: 10px;
  color: var(--quiet);
  font: 9px var(--mono);
  font-weight: 400;
  letter-spacing: .2em;
}
.cell-part h4 { margin: 0 0 8px; color: var(--paper); font: 500 13.5px var(--mono); }
.cell-part p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ── promotion path ──────────────────────────────────────────────────── */

.gate-line { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.gate-line li {
  display: grid;
  gap: 5px;
  padding: 16px clamp(18px, 2vw, 26px);
  background: var(--ground-raised);
  backdrop-filter: blur(8px);
  border-left: 2px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.gate-line li b { color: var(--paper); font: 500 13px var(--mono); letter-spacing: .04em; }
.gate-line li span { color: var(--muted); font-size: 13px; }
.gate-line li[data-gate="candidate"] { border-left-color: var(--quiet); }
.gate-line li[data-gate="gate"] { border-left-color: var(--blue); }
.gate-line li[data-gate="promote"] { border-left-color: var(--magenta); }
.gate-line li[data-gate="fallback"] { border-left-color: rgba(196, 214, 246, .3); }

/* ── chapter 08 · end ────────────────────────────────────────────────── */

.end-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: clamp(28px, 3.4vw, 44px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.end-links a {
  color: var(--muted);
  font: 11px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .22s ease;
}
.end-links a:hover { color: var(--blue); }

.end-meta {
  margin: 18px 0 0;
  color: var(--quiet);
  font: 10px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ── instrument chrome ───────────────────────────────────────────────── */

.system-label {
  position: absolute;
  left: var(--gutter);
  top: 92px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--quiet);
  font: 9px var(--mono);
  letter-spacing: .16em;
}
.system-label i { width: 26px; height: 1px; background: var(--line-strong); }
.system-label span:last-child { color: var(--blue); }

@media (min-width: 1280px) {
  .system-label { left: calc(var(--rail) + var(--gutter)); }
}

.flow-readout {
  position: absolute;
  right: var(--gutter);
  bottom: 34px;
  width: 208px;
  color: var(--quiet);
  font: 9px var(--mono);
  letter-spacing: .1em;
}
.flow-readout-top,
.flow-readout-bottom { display: flex; justify-content: space-between; gap: 16px; }
.flow-readout-top b { color: var(--paper); font-weight: 500; }
.flow-track { height: 1px; margin: 9px 0; overflow: hidden; background: var(--line); }
.flow-track i {
  display: block;
  width: 100%; height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--blue);
}

.noscript-message {
  position: fixed;
  z-index: 90;
  inset: auto 24px 24px;
  padding: 16px;
  background: var(--paper);
  color: var(--ground);
  font-size: 13px;
}
.noscript-message a { text-decoration: underline; }

[data-decode] { font-variant-ligatures: none; }

/* ── responsive ──────────────────────────────────────────────────────── */

/* Short viewports. Chapters are pinned, so they cannot be allowed to grow past
   the window — laptops at 768px tall have roughly 640px of usable height. */
@media (max-height: 820px) and (min-width: 1080px) {
  .chapter { padding-top: 96px; padding-bottom: 76px; gap: 24px; }
  .chapter h2 { font-size: clamp(26px, 2.9vw, 40px); }
  .hero-wordmark { font-size: clamp(50px, 6vw, 84px); }
  .hero-line { font-size: clamp(20px, 2.2vw, 30px); }
  .chapter-lede { font-size: 15px; margin-top: 16px; }
  .cell-part { padding: 14px 16px; }
  .cell-part p { font-size: 12.5px; }
  .cell-part b { margin-bottom: 7px; }
  .cell-part h4 { margin-bottom: 6px; }
  .device img { max-height: 52vh; }
  .ledger-col { padding: 18px 20px; }
  .ledger-col ul { gap: 9px; }
  .gate-line li { padding: 12px 20px; }
  .fact-stack div { padding: 11px 0; }
  .chapter-actions { margin-top: 24px; }
}

@media (max-height: 680px) and (min-width: 1080px) {
  .chapter { padding-top: 84px; padding-bottom: 64px; }
  .chapter h2 { font-size: clamp(23px, 2.4vw, 32px); }
  .chapter-lede { font-size: 14px; }
  .cell-part p { display: none; }
  .device img { max-height: 46vh; }
}

@media (max-width: 1279px) {
  .chapter-index { display: none; }
}

@media (max-width: 1079px) {
  .chapter { align-content: center; gap: 28px; }
  .device img { max-height: 34vh; object-position: center; }
  .chapter-device .chapter-copy,
  .chapter-device .device { order: unset; }
}

/* ── phones: unpin ───────────────────────────────────────────────────────
   A pinned chapter has to fit the window, and on a 667px-tall phone most of
   them cannot without gutting the content. Scroll-jacking is poor on touch
   anyway, so the narrative becomes an ordinary stack and the canyon stays as
   a fixed backdrop behind it.                                              */

@media (max-width: 720px) {
  .site-header {
    padding: 14px var(--gutter);
    background: rgba(4, 7, 14, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .hud-frame,
  .flow-readout,
  .system-label { display: none; }
  .brand span { display: none; }
  .ghost-link { display: none; }

  .story-spacer { display: none; }
  .story-stage { position: relative; inset: auto; pointer-events: auto; }

  .chapter {
    position: relative;
    inset: auto;
    display: block;
    padding: 76px var(--gutter);
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto;
    border-bottom: 1px solid var(--line);
  }
  .chapter-hero:first-of-type { padding-top: 120px; }
  .chapter > * + * { margin-top: 28px; }

  .chapter h2 { font-size: clamp(25px, 7.6vw, 33px); }
  .chapter-lede { font-size: 14.5px; }
  .chapter-actions .button { width: 100%; }
  .device img { max-height: none; object-position: center; }
  .fact-stack div { grid-template-columns: 1fr; gap: 5px; }
  .cell { grid-template-columns: 1fr; }
  .mini-steps li { padding-right: 16px; margin-right: 16px; }
  .stage-shade { opacity: .78 !important; }
}

/* ── reduced motion: the whole thing becomes a plain document ────────────
   Driven by the OS preference and by the `reduced-motion` class the script
   sets for the ?static switch, so both routes get the same unpinned page. */

.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
  animation: none !important;
  transition-duration: .01ms !important;
}
.reduced-motion .visual-stage { opacity: .18; }
.reduced-motion #system-flow-canvas { display: none; }
.reduced-motion .chapter-index,
.reduced-motion .flow-readout,
.reduced-motion .system-label,
.reduced-motion .hud-frame { display: none; }
.reduced-motion .site-header {
  position: sticky;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.reduced-motion .story-spacer { display: none; }
.reduced-motion .story-stage { position: relative; inset: auto; pointer-events: auto; }
.reduced-motion .chapter {
  position: relative;
  inset: auto;
  display: block;
  padding: 64px var(--gutter);
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
  pointer-events: auto;
  border-bottom: 1px solid var(--line);
}
.reduced-motion .chapter > * + * { margin-top: 28px; }
.reduced-motion .device img { max-height: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  .visual-stage { opacity: .18; }
  #system-flow-canvas { display: none; }
  .chapter-index, .flow-readout, .system-label, .hud-frame { display: none; }
  .site-header { position: sticky; background: var(--ground); border-bottom: 1px solid var(--line); }
  .story-spacer { display: none; }
  .story-stage { position: relative; inset: auto; pointer-events: auto; }
  .chapter {
    position: relative;
    inset: auto;
    display: block;
    padding: 64px var(--gutter);
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto;
    border-bottom: 1px solid var(--line);
  }
  .chapter > * + * { margin-top: 28px; }
  .device img { max-height: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .ledger-col, .cell-part, .gate-line li { backdrop-filter: none; background: #080d18; }
}
