/* Cascada Iguazu — the throat and the toco mark.
   Selva-ink instrument panels against mist paper; toco orange marks
   only the reader's live position and every gauge mark. Per-chapter
   accents and per-grade stage skins keep all eight chapters distinct. */
@font-face {
  font-family: "Syne";
  src: url("syne-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
/* latin-ext was shipped but never declared: Syne Ș/Ț fell back to system
   sans. Declared with its subset range (FM-120). */
@font-face {
  font-family: "Syne";
  src: url("syne-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("Newsreader.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("Newsreader-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --paper: #f1ede1;
  --paper-soft: #e2dbc6;
  --ink: #182420;
  --ink-soft: #46544c;
  --canopy: #0c1a15;
  --canopy-abyss: #081310;
  --canopy-panel: #14231d;
  --jungle: #1d3a2a;
  --mist: #a9d6e2;
  --mist-bright: #eaf5f8;
  --spray: #dcf0f5;
  --toco: #d9622b;
  --toco-deep: #7e3a14;
  --clay: #8a4b2a;
  --line: #d5cfb6;
  --card: #faf7ee;
  --stage-bg: #10201a;
  --glow: rgba(169, 214, 226, 0.16);
  color-scheme: light;
}
html[data-theme="dark"] {
  --paper: #0d1512;
  --paper-soft: #13201b;
  --ink: #e8f1ee;
  --ink-soft: #a4bcb4;
  --line: #2a463c;
  --card: #13201b;
  --glow: rgba(217, 98, 43, 0.10);
  color-scheme: dark;
}
/* Per-chapter accents: the same mist, a different gauge in each room. */
.story-chapter[data-chapter="sistemul"] { --accent: #6fb7cf; --wash: rgba(111, 183, 207, 0.10); }
.story-chapter[data-chapter="gatlejul"] { --accent: #d9622b; --wash: rgba(217, 98, 43, 0.10); }
.story-chapter[data-chapter="toanele"] { --accent: #5f9e8f; --wash: rgba(95, 158, 143, 0.10); }
.story-chapter[data-chapter="raul-reglat"] { --accent: #7ba05b; --wash: rgba(123, 160, 91, 0.12); }
.story-chapter[data-chapter="oamenii"] { --accent: #b4503c; --wash: rgba(180, 80, 60, 0.10); }
.story-chapter[data-chapter="perdeaua-vie"] { --accent: #8fb996; --wash: rgba(143, 185, 150, 0.12); }
.story-chapter[data-chapter="trei-tari"] { --accent: #4f8fa8; --wash: rgba(79, 143, 168, 0.12); }
.story-chapter[data-chapter="fara-viza"] { --accent: #a03d5c; --wash: rgba(160, 61, 92, 0.10); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Noto Serif CJK SC", "PingFang SC", serif;
  font-size: 1.125rem;
  line-height: 1.65;
}
html[lang="zh-Hans"] body { line-height: 1.85; }
/* The chapter wash: a faint mist glow that follows the reader down. */
body::before {
  content: "";
  position: fixed; inset: 0 0 auto 0; height: 46vh;
  pointer-events: none; z-index: 0;
  background: radial-gradient(60% 100% at 30% 0%, var(--chapter-wash, transparent), transparent 70%);
}
body[data-chapter="sistemul"] { --chapter-wash: rgba(111, 183, 207, 0.14); }
body[data-chapter="gatlejul"] { --chapter-wash: rgba(217, 98, 43, 0.12); }
body[data-chapter="toanele"] { --chapter-wash: rgba(95, 158, 143, 0.12); }
body[data-chapter="raul-reglat"] { --chapter-wash: rgba(123, 160, 91, 0.14); }
body[data-chapter="oamenii"] { --chapter-wash: rgba(180, 80, 60, 0.10); }
body[data-chapter="perdeaua-vie"] { --chapter-wash: rgba(143, 185, 150, 0.16); }
body[data-chapter="trei-tari"] { --chapter-wash: rgba(79, 143, 168, 0.14); }
body[data-chapter="fara-viza"] { --chapter-wash: rgba(160, 61, 92, 0.12); }
main, .site-header, .site-footer, .reading-rail { position: relative; z-index: 1; }
h1, h2, h3, .eyebrow, .hero-stat strong, .stage-value {
  font-family: "Syne", "Newsreader", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}
.shell {
  max-width: 76rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 4.5rem;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--toco); color: #141414; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--toco); color: #141414;
  padding: 0.5rem 1rem; border-radius: 0.25rem;
  font-weight: 700; z-index: 60; transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 0.75rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.78rem; font-weight: 700; color: var(--toco-deep);
  margin: 0 0 0.75rem;
}
html[lang="zh-Hans"] .eyebrow { letter-spacing: 0.32em; }
html[data-theme="dark"] .eyebrow { color: var(--toco); }
/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding-top: 0.7rem; padding-bottom: 0.7rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.wordmark {
  font-family: "Syne", "PingFang SC", sans-serif; font-weight: 800;
  text-decoration: none; font-size: 1.05rem; letter-spacing: 0.02em;
}
.wordmark-short { display: none; }
.top-jumps { display: flex; gap: 0.9rem; margin-left: auto; font-size: 0.95rem; }
.top-jumps a { text-decoration: none; border-bottom: 2px solid transparent; }
.top-jumps a[aria-current] { border-color: var(--toco); font-weight: 700; }
.header-actions { display: flex; gap: 0.5rem; align-items: center; }
.language-switch { display: flex; gap: 0.35rem; font-size: 0.85rem; font-weight: 700; }
.language-switch a {
  text-decoration: none; padding: 0.15rem 0.5rem;
  border: 1px solid var(--line); border-radius: 999px;
}
#theme-control, #copy-link {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; width: 2.1rem; height: 2.1rem; cursor: pointer;
  font-size: 1rem; line-height: 1;
}
/* Hero: the falls fill the first viewport. The copy lives inside the
   media frame now, so it can never collide with the gauge strip below. */
.hero { padding: 0 0 2.5rem; }
.hero-field { margin: 0; }
.hero-media {
  position: relative; overflow: hidden;
  display: grid;
  border-radius: 0 0 1.25rem 1.25rem;
  border: 1px solid var(--line); border-top: 0;
  box-shadow: 0 2.5rem 4rem -2.5rem rgba(8, 19, 16, 0.55);
  background: var(--canopy-abyss);
}
/* The frame grows past the photograph's minimum whenever the copy runs
   tall (narrow phones, short landscape heights), so the headline can
   never clip against the rounded top edge. */
.hero-falls {
  grid-area: 1 / 1; width: 100%; height: 100%;
  min-height: clamp(30rem, 82svh, 60rem); object-fit: cover;
}
.hero-curtain {
  grid-area: 1 / 1; height: 100%;
  min-height: clamp(30rem, 82svh, 60rem);
  background: linear-gradient(180deg, var(--canopy) 0%, var(--canopy-panel) 55%, var(--mist) 130%);
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,18,12,0.32) 0%, rgba(10,18,12,0.04) 32%, rgba(10,18,12,0.18) 55%, rgba(10,18,12,0.86) 100%);
}
/* A breath of mist along the frame's foot: the copy sits inside weather. */
.hero-media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7rem;
  background: linear-gradient(transparent, rgba(8, 19, 16, 0.5));
  pointer-events: none;
}
/* Drifting mist threads over the photograph: pure weather, no meaning. */
.hero-threads {
  position: absolute; inset: 0; opacity: 0.5; mix-blend-mode: screen;
  background: repeating-linear-gradient(90deg,
    transparent 0 26px, rgba(205, 232, 240, 0.10) 26px 29px,
    transparent 29px 64px, rgba(205, 232, 240, 0.06) 64px 71px, transparent 71px 110px);
  -webkit-mask-image: linear-gradient(180deg, black 30%, transparent 92%);
  mask-image: linear-gradient(180deg, black 30%, transparent 92%);
}
.hero-copy {
  grid-area: 1 / 1; align-self: end; position: relative; z-index: 2;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 4rem; color: #f0f7f9;
}
.hero-copy .eyebrow { color: var(--toco); }
.hero-kicker { display: flex; align-items: center; gap: 0.75rem; }
.hero-kicker::after {
  content: ""; height: 2px; width: clamp(3rem, 12vw, 9rem);
  background: linear-gradient(90deg, var(--toco), transparent);
}
.hero-seal { color: var(--toco); font-size: 1.4rem; }
.hero-copy h1 {
  font-size: clamp(2.2rem, 5.6vw, 4.4rem); line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0.25rem 0 0.9rem; max-width: 20ch;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(8, 19, 16, 0.75), 0 1px 3px rgba(8, 19, 16, 0.9);
}
html[lang="zh-Hans"] .hero-copy h1 { max-width: 26ch; }
.deck {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem); max-width: 62ch; margin: 0;
  text-shadow: 0 1px 10px rgba(8, 19, 16, 0.8);
}
.hero-cold-open {
  max-width: 62ch; margin: 0.9rem 0 0;
  font-style: italic;
  border-left: 3px solid var(--toco); padding: 0.6rem 1rem 0.6rem 0.9rem;
  background: rgba(8, 19, 16, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 0 0.5rem 0.5rem 0;
  text-shadow: 0 1px 8px rgba(8, 19, 16, 0.8);
}
/* The way down: a toco thread the reader can follow with a keypress. */
.scroll-cue {
  position: absolute; right: clamp(1.25rem, 4vw, 3rem); bottom: 3.6rem; z-index: 2;
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--mist-bright); text-decoration: none;
  font-family: "Syne", "PingFang SC", sans-serif; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(8, 19, 16, 0.9);
}
.scroll-cue .cue-line {
  display: block; width: 2px; height: 2.6rem;
  background: linear-gradient(var(--toco), transparent);
}
.hero-stats {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem; padding: 0 clamp(1.25rem, 4vw, 3rem);
  margin-top: -2.75rem;
}
.hero-stat {
  background: linear-gradient(165deg, #17352c 0%, var(--canopy-panel) 55%, var(--canopy-abyss) 100%);
  color: var(--mist-bright);
  border-radius: 0.6rem; padding: 0.8rem 1rem;
  border: 1px solid #2a463c;
  border-top: 3px solid var(--toco);
  box-shadow: 0 1.25rem 2rem -1.25rem rgba(8, 19, 16, 0.7);
  font-variant-numeric: tabular-nums;
}
.hero-stat strong { display: block; font-size: 1.35rem; letter-spacing: -0.01em; }
.hero-stat span { font-size: 0.92rem; color: var(--mist); }
.hero-stat {
  background-image:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(169, 214, 226, 0.08) 14px 15px),
    linear-gradient(165deg, #17352c 0%, var(--canopy-panel) 55%, var(--canopy-abyss) 100%);
}
/* The descent index: eight rooms previewed before the first scroll. */
.chapter-index {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem; padding: 1rem clamp(1.25rem, 4vw, 3rem) 0;
  position: relative; z-index: 3;
}
.chapter-index a {
  display: flex; align-items: baseline; gap: 0.55rem; min-width: 0;
  text-decoration: none; overflow-wrap: anywhere;
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--toco); border-radius: 0.45rem;
  padding: 0.5rem 0.65rem;
  box-shadow: 0 0.75rem 1.5rem -1rem rgba(8, 19, 16, 0.5);
}
.chapter-index a:hover, .chapter-index a:focus-visible { border-color: var(--toco); }
.ci-numeral {
  font-family: "Syne", "PingFang SC", sans-serif; font-weight: 800; font-size: 0.85rem;
  color: var(--toco-deep); flex: none;
}
html[data-theme="dark"] .ci-numeral { color: var(--toco); }
.ci-title { font-size: 0.92rem; font-weight: 700; line-height: 1.3; min-width: 0; }
.hero-caption {
  display: block; padding: 0.85rem clamp(1.25rem, 4vw, 3rem) 0;
  font-size: 0.95rem; color: var(--ink-soft);
}
/* Citations */
.citation {
  font-family: "Syne", sans-serif; font-size: 0.72rem; font-weight: 700;
  text-decoration: none; color: var(--toco-deep);
  border: 1px solid var(--toco); border-radius: 0.25rem;
  padding: 0 0.3rem; margin-left: 0.25rem; white-space: nowrap;
}
html[data-theme="dark"] .citation { color: var(--toco); }
.hero-copy .citation, .hero-stat .citation { color: var(--toco); border-color: var(--toco); }
.credit { display: block; font-size: 0.85rem; opacity: 0.85; margin-top: 0.25rem; overflow-wrap: anywhere; }
.media-grid > * { min-width: 0; }
/* Chapter gates: the signature. Between rooms, a dark selva band where
   nine water threads fall from one toco lip line over the next room's
   numeral, seal and title. Full-bleed rhythm against the shelled chapters. */
.gate {
  position: relative; overflow: hidden; margin: 3rem 0 0.5rem;
  background: linear-gradient(180deg, var(--canopy-abyss) 0%, var(--canopy-panel) 55%, var(--jungle) 130%);
  border-top: 1px solid #2a463c; border-bottom: 1px solid #2a463c;
  min-width: 0;
}
.gate svg { display: block; width: 100%; height: 12rem; }
.gate-line { stroke: var(--toco); stroke-width: 4; }
.gate-threads line { opacity: 0.9; }
.gate-numeral {
  position: absolute; left: clamp(1rem, 6vw, 5rem); top: 50%;
  transform: translateY(-50%);
  font-family: "Syne", sans-serif; font-weight: 800;
  font-size: clamp(3.5rem, 9vw, 6rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--mist);
  opacity: 0.55;
}
.gate-seal {
  position: absolute; left: 50%; top: 1.1rem; transform: translateX(-50%);
  display: inline-grid; place-items: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: rgba(8, 19, 16, 0.7); color: var(--toco);
  border: 2px solid var(--toco); font-size: 1.2rem;
}
.gate-title {
  position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
  width: min(46rem, calc(100% - 7rem));
  text-align: center; overflow-wrap: anywhere;
  font-family: "Syne", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-weight: 800; font-size: clamp(1.15rem, 2.8vw, 1.8rem); line-height: 1.2;
  color: var(--mist-bright);
  text-shadow: 0 2px 14px rgba(8, 19, 16, 0.9);
}
/* Chapters */
.story-chapter { padding: 2.5rem 0 1rem; scroll-margin-top: 5rem; }
.chapter-opening { position: relative; margin-bottom: 1.5rem; }
.chapter-ghost {
  position: absolute; right: 0; top: -2.2rem;
  font-family: "Syne", sans-serif; font-weight: 800;
  font-size: clamp(4rem, 10vw, 7rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--line);
  opacity: 0.6; pointer-events: none;
}
.story-chapter[data-chapter="perdeaua-vie"] .chapter-ghost {
  -webkit-text-stroke-color: var(--accent);
  opacity: 0.5;
}
.chapter-kicker { display: flex; align-items: center; gap: 0.6rem; }
.chapter-seal {
  display: inline-grid; place-items: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--canopy-panel); color: var(--accent, var(--toco));
  border: 1px solid var(--accent, var(--toco));
  font-size: 1.1rem; flex: none;
}
.chapter-opening h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12; margin: 0.25rem 0 0.75rem; text-wrap: balance;
  letter-spacing: -0.01em;
}
.story-chapter[data-chapter="oamenii"] .chapter-opening h2,
.story-chapter[data-chapter="raul-reglat"] .chapter-opening h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
}
.chapter-lead p { max-width: 68ch; }
/* Drop cap in Newsreader, not Syne: Syne 800 flattens Î's circumflex into a
   bar, so "În…" reads as "T…" (parent review 2026-10-07, also live on 065).
   Serif cap keeps full RO coverage and still contrasts the sans headings. */
.chapter-lead p:first-child::first-letter {
  font-family: "Newsreader", Georgia, serif; font-weight: 700;
  font-size: 2.6em; line-height: 0.9; float: left;
  padding: 0.08em 0.12em 0 0; color: var(--toco-deep);
}
html[lang="zh-Hans"] .chapter-lead p:first-child::first-letter {
  font-family: "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 1.6em; float: none; padding: 0 0.1em 0 0;
}
html[data-theme="dark"] .chapter-lead p:first-child::first-letter { color: var(--toco); }
.chapter-opening blockquote {
  margin: 1.25rem 0 0; padding: 0.9rem 1.2rem;
  border-left: 4px solid var(--accent, var(--toco));
  background: var(--card); font-style: italic; max-width: 62ch;
  border-radius: 0 0.5rem 0.5rem 0;
}
.chapter-flip .chapter-opening blockquote {
  border-left: 0; border-right: 4px solid var(--accent, var(--toco));
  border-radius: 0.5rem 0 0 0.5rem;
}
/* The river-year room and the unbuilt-dam room read their pull-lines off dark glass. */
.story-chapter[data-chapter="toanele"] .chapter-opening blockquote,
.story-chapter[data-chapter="raul-reglat"] .chapter-opening blockquote {
  background: linear-gradient(160deg, var(--canopy-panel), var(--canopy-abyss));
  color: var(--mist-bright);
  border: 1px solid #2a463c;
  border-left: 4px solid var(--accent, var(--toco));
  box-shadow: 0 1.5rem 2.5rem -1.5rem rgba(8, 19, 16, 0.6);
}
.story-chapter[data-chapter="toanele"] .chapter-opening blockquote .citation,
.story-chapter[data-chapter="raul-reglat"] .chapter-opening blockquote .citation {
  color: var(--toco); border-color: var(--toco);
}
/* The gorge room: chapter 2 reads its lead off dark canyon glass, so the
   half-river claim lands before the first beat. The pull stays on paper. */
.story-chapter[data-chapter="gatlejul"] .chapter-lead {
  background: linear-gradient(160deg, var(--canopy-panel), var(--canopy-abyss));
  color: var(--mist-bright);
  border: 1px solid #2a463c; border-radius: 0.7rem;
  padding: 1.1rem 1.25rem; max-width: 62rem;
  box-shadow: 0 1.5rem 2.5rem -1.5rem rgba(8, 19, 16, 0.6);
}
.story-chapter[data-chapter="gatlejul"] .chapter-lead p { max-width: 62ch; margin: 0.5rem 0; }
.story-chapter[data-chapter="gatlejul"] .chapter-lead p:first-child::first-letter { color: var(--toco); }
.story-chapter[data-chapter="gatlejul"] .chapter-lead .citation { color: var(--toco); border-color: var(--toco); }
/* The sigh room: chapter 5 carries one famous sigh, so its pull-line gets
   an oversized quote mark and room to breathe. */
.story-chapter[data-chapter="oamenii"] .chapter-opening blockquote {
  position: relative; font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  padding: 1.4rem 1.4rem 1.2rem 3.4rem;
}
.story-chapter[data-chapter="oamenii"] .chapter-opening blockquote::before {
  content: "\201C";
  position: absolute; left: 0.6rem; top: -0.4rem;
  font-family: "Syne", sans-serif; font-weight: 800; font-size: 3.4em; line-height: 1;
  color: var(--accent, var(--toco)); opacity: 0.85;
}
/* The coda: chapter 8 closes the descent centered, seal ringed like a stamp. */
.story-chapter[data-chapter="fara-viza"] .chapter-opening { text-align: center; }
.story-chapter[data-chapter="fara-viza"] .chapter-kicker { justify-content: center; }
.story-chapter[data-chapter="fara-viza"] .chapter-seal {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent, var(--toco));
}
.story-chapter[data-chapter="fara-viza"] .chapter-opening h2 { margin-inline: auto; }
.story-chapter[data-chapter="fara-viza"] .chapter-lead p { margin-inline: auto; }
.story-chapter[data-chapter="fara-viza"] .chapter-lead p:first-child::first-letter {
  float: none; font-size: 1.35em; padding: 0 0.08em 0 0;
}
.story-chapter[data-chapter="fara-viza"] .chapter-ghost {
  left: 50%; right: auto; transform: translateX(-50%); opacity: 0.35;
}
.story-chapter[data-chapter="fara-viza"] .chapter-opening blockquote {
  margin-inline: auto; text-align: left;
}
.chapter-layout {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem; align-items: start;
}
.chapter-flip .chapter-layout { direction: rtl; }
.chapter-flip .chapter-layout > * { direction: ltr; }
.chapter-layout > * { min-width: 0; }
/* Sticky stage: one instrument, five skins, chosen per beat. */
.stage-column { position: sticky; top: 5.5rem; align-self: start; min-width: 0; }
.stage-pin { position: static; min-width: 0; }
.sticky-stage, .story-steps, .story-step { min-width: 0; overflow-wrap: anywhere; }
.sticky-stage {
  background: var(--stage-bg); color: var(--mist-bright);
  border-radius: 0.9rem; padding: 1.25rem 1.25rem 1rem;
  border: 1px solid #2a463c;
  border-top: 4px solid var(--toco);
  box-shadow: 0 2rem 3rem -2rem rgba(8, 19, 16, 0.65);
  font-variant-numeric: tabular-nums;
}
.sticky-stage[data-grade="mist"] {
  background: linear-gradient(170deg, #17382e 0%, var(--stage-bg) 60%, #0a1712 100%);
  box-shadow: 0 2rem 3rem -2rem rgba(8, 19, 16, 0.65), 0 0 3rem -1rem var(--glow);
}
.sticky-stage[data-grade="current"] {
  background: linear-gradient(170deg, #17352c 0%, #10241d 45%, #0c1c15 100%);
  border-top-color: var(--mist);
}
.sticky-stage[data-grade="gorge"] {
  background: linear-gradient(170deg, #0c1813 0%, var(--canopy-abyss) 70%);
  border-color: #1a2e20;
}
.sticky-stage[data-grade="night"] {
  background: linear-gradient(170deg, #14202e 0%, #0e1824 55%, #09121c 100%);
  border-color: #2e4255;
}
.sticky-stage[data-grade="paper"] {
  background: linear-gradient(170deg, #fffef9, var(--card));
  color: var(--ink); border-color: var(--line);
}
.sticky-stage[data-grade="paper"] .stage-label,
.sticky-stage[data-grade="paper"] .stage-subline { color: var(--ink-soft); }
.sticky-stage[data-grade="paper"] .beat-art .g-thread { stroke: #3a6f83; }
.sticky-stage[data-grade="paper"] .beat-art .g-aux { stroke: #9aa8a6; }
.sticky-stage[data-grade="paper"] .beat-art .g-wall { stroke: #3a6f83; }
.sticky-stage[data-grade="paper"] .stage-note { color: var(--ink-soft); }
.stage-gesture {
  margin-bottom: 0.75rem; border-radius: 0.55rem;
  background: rgba(8, 19, 16, 0.35);
  border: 1px solid rgba(169, 214, 226, 0.14);
  padding: 0.35rem 0.35rem 0.1rem;
}
.sticky-stage[data-grade="paper"] .stage-gesture {
  background: rgba(24, 36, 32, 0.05);
  border-color: var(--line);
}
.beat-art { display: none; width: 100%; height: auto; }
.beat-art:first-child { display: block; }
.beat-art .g-thread { fill: none; stroke: var(--mist); stroke-width: 5; }
.beat-art .g-aux { fill: none; stroke: #5d8a99; stroke-width: 3; }
.beat-art .g-mark { fill: none; stroke: var(--accent, var(--toco)); stroke-width: 4; }
.beat-art .g-dot { fill: var(--toco); }
.beat-art .g-wall { fill: none; stroke: var(--mist); stroke-width: 4; }
.beat-art .g-aux-dot { fill: var(--clay); }
.stage-note { font-size: 0.8rem; color: var(--mist); margin: 0 0 0.5rem; }
.stage-kicker {
  font-family: "Syne", "PingFang SC", sans-serif; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--toco); margin: 0;
}
.sticky-stage[data-grade="paper"] .stage-kicker { color: var(--toco-deep); }
html[data-theme="dark"] .sticky-stage[data-grade="paper"] .stage-kicker { color: var(--toco); }
.stage-value {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800;
  line-height: 1.05; margin: 0.25rem 0; letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.stage-value, .stage-label { text-wrap: balance; }
.stage-label { font-weight: 700; margin: 0; color: var(--mist); }
.stage-subline { font-size: 0.95rem; margin: 0.35rem 0 0; color: var(--mist); }
.stage-citations { margin-top: 0.5rem; }
.stage-citations .citation { color: var(--toco); border-color: var(--toco); }
.sticky-stage[data-grade="paper"] .stage-citations .citation {
  color: var(--toco-deep); border-color: var(--toco);
}
html[data-theme="dark"] .sticky-stage[data-grade="paper"] .stage-citations .citation {
  color: var(--toco);
}
.stage-progress { font-size: 0.8rem; opacity: 0.75; margin: 0.6rem 0 0; }
/* Each room signs its instrument: a chapter-accent rule down the stage. */
.story-chapter[data-chapter] .sticky-stage { border-left: 4px solid var(--accent, var(--toco)); }
/* Beat pips: falling-drop progress inside the instrument. */
.stage-pips {
  display: flex; gap: 0.45rem; list-style: none; margin: 0.7rem 0 0; padding: 0;
  min-width: 0;
}
.stage-pips li span {
  display: block; width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: transparent; border: 2px solid var(--mist);
  opacity: 0.55;
}
.sticky-stage[data-grade="paper"] .stage-pips li span { border-color: var(--ink-soft); }
.stage-pips li.is-now span {
  background: var(--toco); border-color: var(--toco); opacity: 1;
  box-shadow: 0 0 0.6rem rgba(217, 98, 43, 0.8);
}
/* Steps */
.story-step {
  padding: 1.25rem 1.25rem 1.5rem; margin: 0 0 1rem;
  border: 1px solid var(--line); border-radius: 0.7rem;
  background: var(--card); scroll-margin-top: 6rem;
  box-shadow: 0 1rem 2rem -1.5rem rgba(24, 36, 32, 0.35);
}
/* Active marker is an INSET shadow, never a wider border: border-left
   1px→5px under border-box narrows the content box on activation and can
   reflow text +1 line, shifting beats below the reading line (067 root
   cause; same fix as everest). */
.story-step.is-active {
  border-color: var(--accent, var(--toco));
  box-shadow: inset 4px 0 0 var(--accent, var(--toco)),
    0 1.25rem 2.5rem -1.25rem rgba(24, 36, 32, 0.45);
}
.step-kicker {
  font-family: "Syne", "PingFang SC", sans-serif; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--toco-deep); margin: 0 0 0.4rem;
}
html[data-theme="dark"] .step-kicker { color: var(--toco); }
.story-step h3 { margin: 0 0 0.4rem; font-size: 1.3rem; line-height: 1.25; }
.step-subline { font-weight: 700; margin: 0 0 0.5rem; }
.step-copy { margin: 0; }
/* Media galleries */
.chapter-media { margin-top: 1.5rem; }
.media-grid { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) {
  .media-grid:has(> :nth-child(2)) { grid-template-columns: 1fr 1fr; }
  .media-grid:has(> :nth-child(2)) > :first-child { grid-column: 1 / -1; }
}
.media-grid figure { margin: 0; }
.photo-figure img, .map-figure img, .diagram-figure img {
  border-radius: 0.6rem; border: 1px solid var(--line);
  box-shadow: 0 1.5rem 2.5rem -1.75rem rgba(8, 19, 16, 0.55);
}
.map-figure img, .diagram-figure img {
  border-color: #2a463c;
  box-shadow: 0 1.5rem 2.5rem -1.5rem rgba(8, 19, 16, 0.7);
}
.photo-figure figcaption, .map-figure figcaption, .diagram-figure figcaption {
  font-size: 0.92rem; color: var(--ink-soft); padding-top: 0.5rem;
  border-left: 2px solid var(--accent, var(--toco)); padding-left: 0.75rem;
  margin-top: 0.5rem;
}
/* Each room frames its evidence in its own accent. */
.photo-figure img { border-top: 3px solid var(--accent, var(--toco)); }
.map-figure img, .diagram-figure img { border-top: 3px solid var(--toco); }
/* Moods instrument (pure CSS state) */
.sounding {
  margin: 0 0 1.5rem; padding: 1.25rem;
  background: linear-gradient(165deg, #17352c 0%, var(--canopy-panel) 50%, var(--canopy-abyss) 100%);
  color: var(--mist-bright);
  border-radius: 0.9rem; border: 1px solid #2a463c;
  border-top: 4px solid var(--toco);
  box-shadow: 0 2rem 3rem -2rem rgba(8, 19, 16, 0.7);
  font-variant-numeric: tabular-nums;
}
.sounding .eyebrow { color: var(--toco); }
.sounding h3 { margin: 0.25rem 0 0.5rem; font-size: 1.4rem; }
.sounding-note { font-size: 0.92rem; color: var(--mist); margin: 0 0 0.5rem; }
.dispute-tag { font-size: 0.9rem; margin: 0 0 1rem; }
.dispute-tag .citation { color: var(--toco); border-color: var(--toco); }
.sounding-instrument { border: 0; padding: 0; margin: 0; }
.snd-stop { position: absolute; opacity: 0; }
.snd-stops { position: relative; padding-left: 2rem; margin-bottom: 1rem; }
.snd-line {
  position: absolute; left: 0.6rem; top: 0.4rem; bottom: 0.4rem;
  border-left: 3px dashed var(--mist);
}
.snd-tick {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0.8rem; margin-bottom: 0.4rem;
  border: 1px solid #2a463c; border-radius: 0.5rem; cursor: pointer;
}
.snd-tick-value { color: var(--toco); font-weight: 700; }
#snd-0:checked ~ .snd-stops label[for="snd-0"],
#snd-1:checked ~ .snd-stops label[for="snd-1"],
#snd-2:checked ~ .snd-stops label[for="snd-2"] {
  border-color: var(--toco); background: rgba(217, 98, 43, 0.12);
  box-shadow: 0 0 1.5rem -0.5rem rgba(217, 98, 43, 0.5);
}
.snd-read { display: none; border-top: 1px solid #2a463c; padding-top: 0.9rem; }
#snd-0:checked ~ .snd-readouts [data-snd="0"],
#snd-1:checked ~ .snd-readouts [data-snd="1"],
#snd-2:checked ~ .snd-readouts [data-snd="2"] { display: block; }
.snd-value { font-family: "Syne", "PingFang SC", sans-serif; font-size: 1.9rem; font-weight: 800; margin: 0; }
.snd-label { font-weight: 700; color: var(--mist); margin: 0.25rem 0; }
.snd-label .citation, .snd-subline .citation { color: var(--toco); border-color: var(--toco); }
.snd-subline { font-size: 0.92rem; color: var(--mist); margin: 0; }
/* Sources, footer */
.sources { padding: 2.5rem 0; scroll-margin-top: 5rem; }
.sources h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0.25rem 0 0.5rem; }
.sources ol { padding-left: 1.25rem; }
.sources li { margin-bottom: 1rem; }
.sources li::marker { color: var(--toco-deep); font-weight: 700; }
.sources li p { margin: 0.2rem 0; font-size: 0.95rem; color: var(--ink-soft); }
.sources li a { overflow-wrap: anywhere; font-size: 0.85rem; }
.source-status { font-family: "Syne", sans-serif; font-size: 0.75rem; font-weight: 700; }
.site-footer {
  border-top: 2px solid var(--line); padding: 1.5rem 0 3rem;
  display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: baseline;
  font-size: 0.95rem; color: var(--ink-soft);
}
.site-footer p { margin: 0; }
/* Reading rail */
.reading-rail {
  position: fixed; right: 0.55rem; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.22rem; z-index: 40;
  max-height: 86vh; overflow: hidden; padding: 0.5rem 0.25rem;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(6px);
}
.rail-river {
  position: absolute; left: 50%; top: 0.5rem; bottom: 0.5rem; width: 2px;
  background: var(--line); transform: translateX(-50%);
  border-radius: 2px; overflow: hidden;
}
.rail-fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  background: linear-gradient(var(--mist), var(--toco));
}
.reading-rail a {
  position: relative; display: block; width: 1.6rem; height: 1.1rem;
  text-decoration: none;
}
.reading-rail a span {
  position: absolute; left: 50%; top: 50%;
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper); border: 2px solid var(--ink-soft);
}
.reading-rail a.rail-step span { width: 0.4rem; height: 0.4rem; }
.reading-rail a[aria-current] span {
  background: var(--toco); border-color: var(--toco-deep);
  box-shadow: 0 0 0.6rem rgba(217, 98, 43, 0.8);
}
.reading-rail a::after {
  content: attr(data-label);
  position: absolute; right: 1.9rem; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 0.75rem; font-weight: 700;
  background: var(--canopy-panel); color: var(--mist-bright);
  padding: 0.15rem 0.55rem; border-radius: 0.3rem;
  opacity: 0; pointer-events: none;
}
.reading-rail a:hover::after, .reading-rail a:focus-visible::after { opacity: 1; }
.rail-marker {
  position: absolute; left: 50%; top: 0;
  width: 1rem; height: 1rem; border-radius: 50%;
  transform: translate(-50%, 0);
  border: 2px solid var(--toco); pointer-events: none;
  box-shadow: 0 0 0.5rem rgba(217, 98, 43, 0.55);
}
/* The gauge mark rides in the current room's accent. */
body[data-chapter="sistemul"] .rail-marker { border-color: #6fb7cf; box-shadow: 0 0 0.5rem rgba(111, 183, 207, 0.6); }
body[data-chapter="gatlejul"] .rail-marker { border-color: #d9622b; }
body[data-chapter="toanele"] .rail-marker { border-color: #5f9e8f; box-shadow: 0 0 0.5rem rgba(95, 158, 143, 0.6); }
body[data-chapter="raul-reglat"] .rail-marker { border-color: #7ba05b; box-shadow: 0 0 0.5rem rgba(123, 160, 91, 0.6); }
body[data-chapter="oamenii"] .rail-marker { border-color: #b4503c; box-shadow: 0 0 0.5rem rgba(180, 80, 60, 0.6); }
body[data-chapter="perdeaua-vie"] .rail-marker { border-color: #8fb996; box-shadow: 0 0 0.5rem rgba(143, 185, 150, 0.6); }
body[data-chapter="trei-tari"] .rail-marker { border-color: #4f8fa8; box-shadow: 0 0 0.5rem rgba(79, 143, 168, 0.6); }
body[data-chapter="fara-viza"] .rail-marker { border-color: #a03d5c; box-shadow: 0 0 0.5rem rgba(160, 61, 92, 0.6); }
/* To-top + status */
.to-top {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 40;
  display: flex; gap: 0.4rem; align-items: center;
  background: var(--canopy-panel); color: var(--mist-bright);
  border: 1px solid var(--toco); border-radius: 999px;
  padding: 0.55rem 1rem; cursor: pointer; font-size: 0.9rem;
}
.to-top[hidden] { display: none; }
#share-status:empty { display: none; }
#share-status {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  background: var(--canopy-panel); color: var(--mist-bright);
  padding: 0.5rem 1rem; border-radius: 0.4rem; z-index: 60;
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--toco); outline-offset: 2px;
}
.sounding-instrument:focus-within .snd-stops {
  outline: 3px solid var(--toco); outline-offset: 2px;
}
/* Choreography: everything stays visible unless motion is welcome AND
   JavaScript confirmed enhancement. Captures emulate reduced motion,
   and no-JS readers never set data-enhanced, so both keep full text. */
@media (prefers-reduced-motion: no-preference) {
  html[data-enhanced="true"] .chapter-opening,
  html[data-enhanced="true"] .story-step,
  html[data-enhanced="true"] .chapter-media figure,
  html[data-enhanced="true"] .sounding,
  html[data-enhanced="true"] .gate,
  html[data-enhanced="true"] .hero-stats,
  html[data-enhanced="true"] .chapter-index {
    opacity: 0; transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  html[data-enhanced="true"] .is-inview {
    opacity: 1; transform: none;
  }
  html[data-enhanced="true"] .story-steps > :nth-child(2) { transition-delay: 0.06s; }
  html[data-enhanced="true"] .story-steps > :nth-child(3) { transition-delay: 0.12s; }
  html[data-enhanced="true"] .story-steps > :nth-child(4) { transition-delay: 0.18s; }
  .hero-falls { animation: hero-settle 1.6s ease-out; }
  @keyframes hero-settle {
    from { transform: scale(1.045); } to { transform: scale(1); }
  }
  .hero-threads { animation: thread-drift 9s linear infinite; }
  @keyframes thread-drift {
    from { background-position-y: 0; } to { background-position-y: 220px; }
  }
  .scroll-cue .cue-line { animation: cue-drip 2.2s ease-in-out infinite; }
  @keyframes cue-drip {
    0% { transform: scaleY(0); transform-origin: top; }
    55% { transform: scaleY(1); transform-origin: top; }
    56% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
  }
  .gate-threads line { animation: gate-fall 3.2s ease-in-out infinite; }
  @keyframes gate-fall {
    0%, 100% { transform: translateY(-7px); opacity: 0.5; }
    50% { transform: translateY(9px); opacity: 1; }
  }
  .gate-line { animation: gate-shimmer 5s ease-in-out infinite; }
  @keyframes gate-shimmer {
    0%, 100% { opacity: 0.7; } 50% { opacity: 1; }
  }
  .beat-art .g-thread {
    stroke-dasharray: 11 9;
    animation: gauge-flow 1.8s linear infinite;
  }
  @keyframes gauge-flow {
    from { stroke-dashoffset: 0; } to { stroke-dashoffset: 40; }
  }
  .sticky-stage.is-swap [data-stage-kicker],
  .sticky-stage.is-swap [data-stage-value],
  .sticky-stage.is-swap [data-stage-label],
  .sticky-stage.is-swap [data-stage-subline] {
    animation: stage-in 0.45s ease;
  }
  .sticky-stage.is-swap [data-stage-label] { animation-delay: 0.05s; }
  .sticky-stage.is-swap [data-stage-subline] { animation-delay: 0.1s; }
  @keyframes stage-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
  .sticky-stage.is-swap .stage-gesture { animation: stage-in 0.4s ease; }
  html[data-enhanced="true"] .chapter-media figure,
  html[data-enhanced="true"] .chapter-index a {
    transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }
  html[data-enhanced="true"] .chapter-media figure:hover {
    transform: translateY(-3px);
    box-shadow: 0 1.75rem 2.75rem -1.5rem rgba(8, 19, 16, 0.55);
  }
}
@media (max-width: 900px) {
  .chapter-layout { grid-template-columns: 1fr; }
  .stage-column { position: sticky; top: 6rem; z-index: 5; }
  .top-jumps { display: none; }
  .chapter-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  body { font-size: 1.05rem; }
  .shell { padding-right: 3.4rem; }
  .site-header { gap: 0.5rem; }
  .wordmark { font-size: 0.85rem; white-space: nowrap; }
  .wordmark-full { display: none; }
  .wordmark-short { display: inline; }
  .header-actions { gap: 0.35rem; margin-left: auto; }
  html[lang="ro"] .language-switch a[lang="ro"],
  html[lang="en"] .language-switch a[lang="en"],
  html[lang="zh-Hans"] .language-switch a[lang="zh-Hans"] { display: none; }
  #theme-control, #copy-link { width: 1.8rem; height: 1.8rem; font-size: 0.9rem; }
  .reading-rail { right: 0.25rem; }
  .reading-rail a.rail-step { display: none; }
  .hero, .story-chapter, .sources, .site-footer { margin-right: 3.4rem; }
  .gate { margin-right: 3.4rem; }
  .gate svg { height: 9.5rem; }
  .gate-numeral { font-size: 2.6rem; opacity: 0.4; }
  .gate-seal { width: 2rem; height: 2rem; font-size: 1rem; top: 0.8rem; }
  .gate-title { width: calc(100% - 3rem); bottom: 0.9rem; }
  .hero-falls, .hero-curtain { min-height: clamp(26rem, 78svh, 44rem); }
  .hero-copy { padding-bottom: 3.6rem; }
  .scroll-cue { bottom: auto; top: 1rem; }
  .scroll-cue span:first-child { display: none; }
  .hero-stats { margin-top: -2.25rem; }
  .ci-title { font-size: 0.85rem; }
  .chapter-ghost { top: -1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
