/* HtPi — story pages ("Downstream").

   A story page is read like a river from source to sea: a rail runs down the
   left margin, each chapter is a station on it, and /static/js/confluence.js
   draws the water down the rail as the reader scrolls. This sheet carries the
   whole look; the engine only adds state classes (is-reached, is-merged,
   is-flooded, is-surfaced …) and the SVG it draws into.

   Ground is mist, not paper: the river reads as water only on a cool ground,
   and it deepens into the sea at the end. Garnet stays the one accent and
   means something wherever it appears — a reached station, the chosen stream,
   the ∏. Loaded only by pages that opt in, so nothing here leaks sitewide. */

:root {
  --rv-mist:    #F2F4F3;
  --rv-mist-2:  #E6EBE9;
  --rv-ink:     #0E1416;
  --rv-ink-2:   #465155;
  --rv-ink-3:   #7B8689;
  --rv-rule:    #D3DBD9;
  --rv-deep:    #0C1718;   /* = the portrait engine's ground, so the seams vanish */
  --rv-deep-2:  #122629;
  --rv-foam:    #E6EDEA;
  --rv-foam-2:  rgba(230, 237, 234, .70);
  --rv-foam-3:  rgba(230, 237, 234, .44);
  --rv-foam-4:  rgba(230, 237, 234, .16);
  --rv-garnet:  #7B2C24;
  --rv-garnet-d:#5C1F1A;
  --rv-bronze:  #C9A05C;
  --rv-river:   #2C5961;
  --rv-shallow: #6FA9A6;

  /* The rail: its centre sits --rv-rail in from the wrap's padding edge, and
     chapter text starts --rv-gutter in. */
  --rv-edge:    32px;
  --rv-rail:    52px;
  --rv-gutter:  136px;
  --rv-hdr:     64px;
}

body[data-page="story"] { background: var(--rv-mist); color: var(--rv-ink); }
body[data-page="story"] ::selection { background: var(--rv-garnet); color: var(--rv-mist); }
/* The footer is where the sea goes on after the page ends. */
body[data-page="story"] > footer { background: var(--rv-deep) !important; }
@media (max-width: 768px) { body[data-page="story"] > footer .grid-footer > div:first-child { grid-column: 1 / -1; } }

.rv-story { position: relative; isolation: isolate; background: var(--rv-mist); color: var(--rv-ink); }
.rv-story p { margin: 0; }

/* ── The river overlay (drawn by confluence.js) ─────────────────────────── */
.rv-river { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; overflow: visible; }
.rv-river .rv-bed    { fill: none; stroke: var(--rv-rule); stroke-width: 1; stroke-dasharray: 1 7; stroke-linecap: round; }
.rv-river .rv-spring-line { fill: none; stroke: var(--rv-ink-3); stroke-width: 1.15; stroke-linecap: round; transition: stroke .4s ease, stroke-width .4s ease; }
.rv-river .rv-spring-line.is-chosen { stroke: var(--rv-garnet); stroke-width: 2; }
.rv-river .rv-body   { fill: url(#rv-water); }
.rv-river .rv-flow   { fill: none; stroke: rgba(242, 244, 243, .75); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 3 22; animation: rv-flow 2.8s linear infinite; }
.rv-river .rv-estuary { fill: url(#rv-estuary); }
.rv-river .rv-estuary-edge { fill: none; stroke: var(--rv-shallow); stroke-width: 1.2; stroke-linecap: round; opacity: .85; }
.rv-river .rv-trib   { fill: none; stroke: var(--rv-river); stroke-width: 1.1; stroke-linecap: round; opacity: .7; }
.rv-river .rv-stop   { fill: var(--rv-mist); stroke: var(--rv-ink-3); stroke-width: 1.2; transition: fill .35s ease, stroke .35s ease, r .35s ease; }
.rv-river .rv-stop.is-reached { fill: var(--rv-river); stroke: var(--rv-river); }
.rv-river .rv-stop.is-chosen  { fill: var(--rv-garnet); stroke: var(--rv-garnet); r: 5.5px; }
.rv-river .rv-head   { fill: var(--rv-river); }
.rv-river .rv-head-glow { fill: var(--rv-shallow); opacity: .28; animation: rv-breathe 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.rv-river .rv-head-g.is-still { opacity: 0; }
.rv-river .rv-head-g { transition: opacity .5s ease; }
@keyframes rv-flow    { to { stroke-dashoffset: -25; } }
@keyframes rv-breathe { 0%, 100% { transform: scale(.7); opacity: .34; } 50% { transform: scale(1.25); opacity: .1; } }

/* ── Chapters, the wrap and the rail ────────────────────────────────────── */
.rv-ch { position: relative; padding: clamp(80px, 9vw, 128px) 0; scroll-margin-top: var(--rv-hdr); }
.rv-wrap { position: relative; max-width: 1180px; margin: 0 auto;
  padding: 0 var(--rv-edge) 0 calc(var(--rv-edge) + var(--rv-gutter)); }

/* A station: the chapter's glyph sits ON the rail, its name beside the text. */
.rv-station { position: relative; display: flex; align-items: center; min-height: 40px; margin: 0 0 30px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--rv-ink-3); }
.rv-station-glyph { position: absolute; z-index: 2; top: 50%; left: calc(var(--rv-rail) - var(--rv-gutter));
  width: 40px; height: 40px; transform: translate(-50%, -50%); display: grid; place-items: center;
  border: 1px solid var(--rv-rule); border-radius: 50%; background: var(--rv-mist);
  font-family: var(--font-zh); font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--rv-ink-2);
  transition: border-color .5s ease, color .5s ease, background .5s ease; }
.rv-station.is-reached .rv-station-glyph { border-color: var(--rv-river); color: var(--rv-ink); }
.rv-station-label .lang-zh { letter-spacing: .3em; }

/* The knot: the 匯 station is the mark itself, where the six streams meet. */
.rv-station-knot { min-height: 64px; }
.rv-knot { width: 64px; height: 64px; padding: 0; border: 0; background: transparent; }
.rv-knot img { position: relative; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 8px var(--rv-mist); }
/* Before the streams arrive, the meeting point is marked but empty. */
.rv-knot::before { content: ""; position: absolute; inset: 6px; border: 1px dashed var(--rv-ink-3); border-radius: 50%; opacity: .5; }
.js-river .rv-knot img { transform: scale(.4); opacity: 0; transition: transform .9s cubic-bezier(.2, 1.4, .3, 1), opacity .5s ease; }
.js-river .is-merged .rv-knot img { transform: none; opacity: 1; }

/* ── Type ───────────────────────────────────────────────────────────────── */
.rv-statement { margin: 0; max-width: 17ch; font-family: var(--font-display); font-weight: 300;
  font-size: clamp(34px, 4.7vw, 62px); line-height: 1.08; letter-spacing: -.018em; color: var(--rv-ink); text-wrap: balance; }
.rv-statement-xl { max-width: 24ch; font-size: clamp(38px, 5.4vw, 72px); line-height: 1.04; letter-spacing: -.022em; }
/* Chinese breaks only at its own punctuation, so a line never ends mid-phrase
   (在交匯之處，／知識不只累積，／而是複合。); anywhere is the overflow fallback. */
.rv-statement .lang-zh { font-weight: 300; letter-spacing: .02em; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
.rv-lede { max-width: 34em; margin-top: 28px !important; font-family: var(--font-display); font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.62; color: var(--rv-ink-2); }
.rv-lede .lang-zh { font-size: .92em; line-height: 1.9; }
.rv-link { display: inline-flex; align-items: baseline; gap: 6px; padding-bottom: 3px; font-family: var(--font-body);
  font-size: 14px; font-weight: 600; color: var(--rv-garnet); border-bottom: 1px solid rgba(123, 44, 36, .28);
  transition: border-color .2s ease, color .2s ease; }
.rv-link:hover { border-bottom-color: var(--rv-garnet); }
.rv-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 30px !important; }
.rv-fine { margin-top: 36px !important; font-size: 12px; line-height: 1.6; color: var(--rv-ink-3); }

.rv-cta { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; background: var(--rv-garnet);
  color: var(--rv-mist); font-family: var(--font-body); font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  transition: background .2s ease, color .2s ease, transform .12s ease; }
.rv-cta:hover { background: var(--rv-garnet-d); }
.rv-cta:active { transform: translateY(1px); }
.rv-cta-bronze { background: var(--rv-bronze); color: var(--rv-deep); }
.rv-cta-bronze:hover { background: #D9B574; }

/* ── 序 Prologue ─────────────────────────────────────────────────────────── */
.rv-prologue { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden;
  background: var(--rv-deep); color: var(--rv-foam); }
.rv-prologue-fade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 23, 24, .5) 0%, rgba(12, 23, 24, 0) 22%, rgba(12, 23, 24, 0) 62%,
    rgba(242, 244, 243, .08) 86%, var(--rv-mist) 100%); }
.rv-prologue-text { position: absolute; z-index: 3; left: 0; right: 0; top: 50%; transform: translateY(-54%);
  display: flex; flex-direction: column; align-items: center; padding: 0 24px; text-align: center; pointer-events: none; }
.rv-prologue .hero-facefade { display: flex; flex-direction: column; align-items: center; }
.rv-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--rv-bronze); }
.rv-motto { margin: 24px 0 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(38px, 6vw, 80px);
  line-height: 1.03; letter-spacing: -.01em; color: var(--rv-foam); }
.rv-motto-comma { opacity: .45; }
.rv-prologue-line { max-width: 24ch; margin-top: 22px !important; font-family: var(--font-display); font-style: italic;
  font-weight: 300; font-size: clamp(17px, 2.6vw, 26px); line-height: 1.4; color: var(--rv-foam-2); }
.rv-prologue-sub { max-width: 44ch; margin-top: 18px !important; font-size: clamp(12.5px, 1.5vw, 14.5px); line-height: 1.7;
  letter-spacing: .01em; color: rgba(230, 237, 234, .58); }
.rv-begin { margin-top: 36px; display: inline-flex; align-items: center; gap: 12px; padding: 14px 24px 14px 26px;
  border: 1px solid rgba(230, 237, 234, .4); color: var(--rv-foam); font-size: 15px; font-weight: 600;
  pointer-events: auto; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.rv-begin:hover { background: var(--rv-bronze); border-color: var(--rv-bronze); color: var(--rv-deep); }
.rv-begin > span { display: inline-block; animation: rv-bob 2.2s ease-in-out infinite; }
@keyframes rv-bob { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
/* The first trickle: a drop that keeps falling toward the sources. */
.rv-prologue .hero-scrollcue { position: absolute; z-index: 3; left: 50%; bottom: 0; width: 1px; height: 76px;
  overflow: hidden; pointer-events: none; transition: opacity .22s ease; }
.rv-prologue .hero-scrollcue > span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: linear-gradient(180deg, rgba(44, 89, 97, 0), var(--rv-river)); animation: rv-trickle 2.6s cubic-bezier(.5, 0, .7, .4) infinite; }
@keyframes rv-trickle { to { top: 100%; } }

/* ── 源 Sources ──────────────────────────────────────────────────────────── */
.rv-scene { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 clamp(40px, 6vw, 88px);
  margin-top: clamp(64px, 8vw, 104px); }
.rv-springs { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none; }
.rv-spring { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 420px; }
/* The name stands upright over its stream, the way a source is labelled on a
   map; Chinese sets natively top-to-bottom. */
.rv-spring-name { writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--rv-ink-2); white-space: nowrap; transition: color .4s ease; }
.rv-spring-name .lang-zh { font-size: 15px; letter-spacing: .32em; text-transform: none; text-orientation: upright; color: var(--rv-ink); }
/* The source itself, and its column (the no-JS stream; the engine draws over it). */
.rv-spring::before { content: ""; order: 2; width: 7px; height: 7px; margin-top: 14px; border-radius: 50%;
  background: var(--rv-mist); border: 1.2px solid var(--rv-ink-3); }
.rv-spring::after { content: ""; order: 3; flex: 1; width: 1px; margin-top: 6px; background: var(--rv-ink-3); opacity: .55; }
.js-river .rv-spring::after { visibility: hidden; }
.rv-spring.is-chosen .rv-spring-name { color: var(--rv-garnet); }
.rv-spring.is-chosen::before { border-color: var(--rv-garnet); background: var(--rv-garnet); }

.rv-note { position: relative; padding-left: 64px; }
.rv-note-op { position: absolute; left: 0; top: -.12em; font-family: var(--font-display); font-weight: 300; font-size: 52px;
  line-height: 1; color: var(--rv-ink-3); }
.rv-note-pi .rv-note-op { color: var(--rv-garnet); }
.rv-note p { font-family: var(--font-display); font-size: 18px; line-height: 1.62; color: var(--rv-ink-2); }
.rv-note p b { font-weight: 500; color: var(--rv-ink); }
.rv-note .lang-zh { font-size: 16.5px; line-height: 1.9; }
.rv-note .rv-link { margin-top: 22px; }
.rv-note-sigma { grid-column: 2; grid-row: 1; align-self: center; margin-top: 40px; }

/* ── 匯 Confluence ───────────────────────────────────────────────────────── */
.rv-pair { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 88px);
  align-items: start; margin-top: clamp(56px, 7vw, 88px); }
.rv-pair > .rv-note-pi { grid-column: 2; }
.rv-formula { max-width: 40em; margin-bottom: clamp(44px, 5vw, 68px) !important; font-family: var(--font-display); font-weight: 300;
  font-size: clamp(19px, 2vw, 26px); line-height: 1.55; color: var(--rv-ink-2); text-wrap: balance; }
.rv-formula .lang-zh { font-size: .92em; }
.rv-term { white-space: nowrap; }
/* A plus tilted forty-five degrees IS a times: the same two strokes, turned. */
.rv-op { display: inline-block; width: 1.3em; text-align: center; }
.rv-op::before { content: "+"; display: inline-block; font-weight: 300; color: var(--rv-ink-3);
  transition: transform 1.1s cubic-bezier(.3, 1.3, .4, 1), color .8s ease; }
.rv-formula.is-merged .rv-op::before { transform: rotate(45deg); color: var(--rv-garnet); }
.rv-formula.is-merged .rv-op:nth-of-type(2)::before { transition-delay: .06s; }
.rv-formula.is-merged .rv-op:nth-of-type(3)::before { transition-delay: .12s; }
.rv-formula.is-merged .rv-op:nth-of-type(4)::before { transition-delay: .18s; }
.rv-formula.is-merged .rv-op:nth-of-type(5)::before { transition-delay: .24s; }
.rv-formula.is-merged .rv-op:nth-of-type(6)::before { transition-delay: .30s; }

/* ── 流 Writing ──────────────────────────────────────────────────────────── */
.rv-sources-filter { display: none; flex-wrap: wrap; gap: 8px; margin: 44px 0 10px; }
.js-river .rv-sources-filter { display: flex; }
.rv-src { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid var(--rv-rule);
  background: transparent; color: var(--rv-ink-2); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.rv-src .lang-zh { font-size: 13px; letter-spacing: .12em; }
.rv-src::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; }
.rv-src:hover:not([disabled]) { border-color: var(--rv-ink-2); color: var(--rv-ink); }
.rv-src[aria-pressed="true"], .rv-src[aria-pressed="true"]:hover { background: var(--rv-ink); border-color: var(--rv-ink); color: var(--rv-mist); }
.rv-src[aria-pressed="true"]::before { background: var(--rv-garnet); border-color: var(--rv-garnet); }
.rv-src[disabled] { opacity: .42; cursor: default; }
.rv-src-n { color: var(--rv-ink-3); letter-spacing: 0; }
.rv-src[aria-pressed="true"] .rv-src-n { color: rgba(242, 244, 243, .6); }
.rv-src:focus-visible, .rv-runhead:focus-visible, .rv-quote-more:focus-visible { outline: 2px solid var(--rv-garnet); outline-offset: 2px; }

.rv-works { margin: 26px 0 36px; padding: 0; list-style: none; border-bottom: 1px solid var(--rv-rule); }
.rv-work { border-top: 1px solid var(--rv-rule); transition: opacity .35s ease; }
.rv-work-link { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 8px 32px; align-items: baseline; padding: 26px 0 27px; }
.rv-work-date { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--rv-ink-3); }
.rv-work-title { font-family: var(--font-display); font-size: clamp(20px, 2vw, 25px); line-height: 1.3; color: var(--rv-ink);
  transition: color .2s ease; }
.rv-work-title .lang-zh { font-size: .92em; line-height: 1.55; }
.rv-work-link:hover .rv-work-title { color: var(--rv-garnet); }
.rv-work-meta { display: flex; align-items: center; gap: 14px; justify-self: end; white-space: nowrap; }
.rv-ticks { display: inline-flex; gap: 3px; }
.rv-tick { display: block; width: 2px; height: 12px; background: var(--rv-rule); transition: background .3s ease, height .3s ease; }
.rv-tick.is-on { background: var(--rv-ink-2); }
.rv-tick.is-on.is-chosen { background: var(--rv-garnet); height: 16px; margin-top: -4px; }
.rv-work-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--rv-ink-3); }
.rv-work-access { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--rv-ink-3); }
.rv-work-access.is-members { color: var(--rv-garnet); }
.rv-work.is-quiet { opacity: .26; }
.rv-work-empty { padding: 26px 0; font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--rv-ink-3); }
.rv-works-none { display: none; padding: 26px 0; font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--rv-ink-3); }

/* ── 支 Tributaries ──────────────────────────────────────────────────────── */
.rv-tribs { margin: 52px 0 40px; padding: 0 0 0 clamp(24px, 5vw, 72px); list-style: none; display: grid; gap: 30px; }
.rv-trib > a { display: block; max-width: 40em; }
.rv-trib-topic { display: block; margin-bottom: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--rv-river); }
.rv-trib-title { font-family: var(--font-display); font-style: italic; font-size: clamp(20px, 2.1vw, 26px); line-height: 1.35;
  color: var(--rv-ink); transition: color .2s ease; }
.rv-trib-title:lang(zh-Hant) { font-family: var(--font-zh); font-style: normal; font-weight: 400; font-size: clamp(17px, 1.75vw, 21px); line-height: 1.65; }
.rv-trib > a:hover .rv-trib-title { color: var(--rv-garnet); }

/* ── 下 Downstream ───────────────────────────────────────────────────────── */
.rv-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px clamp(40px, 6vw, 96px); align-items: start; }
.rv-next { position: relative; padding: 30px 0 0; border-top: 2px solid var(--rv-ink); }
.rv-next-kicker { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--rv-ink-3); }
.rv-next-kicker a { letter-spacing: .06em; text-transform: none; color: var(--rv-ink-2); }
.rv-next-kicker a:hover { color: var(--rv-garnet); }
.rv-next-title { margin: 22px 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12; letter-spacing: -.012em; color: var(--rv-ink); }
.rv-next-title .lang-zh { font-weight: 500; letter-spacing: .02em; line-height: 1.35; }
.rv-next-title a:hover { color: var(--rv-garnet); }
.rv-next-pitch { margin-top: 16px !important; font-size: 15.5px; line-height: 1.7; color: var(--rv-ink-2); }
.rv-next-when { margin-top: 20px !important; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; color: var(--rv-garnet); }
.rv-next-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 22px; margin-top: 28px !important; }
.rv-next-perk { font-size: 13px; color: var(--rv-ink-3); }
/* Two classes open: the second sits under a hairline, same voice. */
.rv-next-item + .rv-next-item { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--rv-rule); }
.rv-next-item + .rv-next-item .rv-next-title { margin-top: 0; }

/* ── 岸 Riverbank ────────────────────────────────────────────────────────── */
.rv-quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px clamp(40px, 6vw, 96px); margin-top: 60px; }
.rv-quote { position: relative; margin: 0; }
.rv-quote.is-lead { grid-column: 1 / -1; max-width: 50em; }
.rv-quote-text { position: relative; margin: 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(20px, 1.9vw, 24px);
  line-height: 1.5; color: var(--rv-ink); }
.rv-quote-text::before { content: "\201C"; position: absolute; left: -.62em; top: -.12em; font-size: 1.9em; line-height: 1; color: var(--rv-garnet); }
.rv-quote-text.is-zh { font-family: var(--font-zh); font-weight: 400; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.9; }
.rv-quote-text.is-zh::before { content: "「"; left: -1.1em; top: -.05em; font-size: 1.2em; }
.rv-quote.is-lead .rv-quote-text { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.42; letter-spacing: -.006em; }
.rv-quote.is-lead .rv-quote-text.is-zh { font-size: clamp(20px, 2.2vw, 27px); line-height: 1.75; letter-spacing: .02em; }
.rv-quote-trans { margin-top: 14px !important; font-family: var(--font-display); font-style: italic; font-size: 15px; line-height: 1.65; color: var(--rv-ink-3); }
.rv-quote-trans:lang(zh-Hant) { font-family: var(--font-zh); font-style: normal; font-size: 14px; line-height: 1.85; }
.rv-quote-by { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 20px; }
.rv-quote-name { font-size: 14px; font-weight: 600; color: var(--rv-ink); }
.rv-quote-role { font-size: 13px; color: var(--rv-ink-2); }
.rv-quote-kind { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--rv-river); }
.rv-quote-more { margin-top: 14px; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--rv-ink-3); border-bottom: 1px solid var(--rv-rule);
  transition: color .2s ease, border-color .2s ease; }
.rv-quote-more:hover { color: var(--rv-garnet); border-bottom-color: var(--rv-garnet); }

.rv-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(6, 12, 13, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.rv-modal-card { position: relative; width: 100%; max-width: 640px; max-height: 86vh; overflow: auto; padding: 52px 48px 40px;
  background: var(--rv-mist); color: var(--rv-ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.rv-modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--rv-rule); border-radius: 50%; background: transparent; color: var(--rv-ink-2); font-size: 20px; line-height: 1;
  cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.rv-modal-close:hover { border-color: var(--rv-garnet); color: var(--rv-garnet); }
.rv-modal-quote { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: 21px; line-height: 1.6; color: var(--rv-ink); white-space: pre-line; }
.rv-modal-quote.is-zh { font-family: var(--font-zh); font-weight: 400; font-size: 17px; line-height: 1.95; }
.rv-modal-trans-label { margin-top: 30px !important; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--rv-ink-3); }
.rv-modal-trans { margin-top: 10px !important; font-size: 14.5px; line-height: 1.75; color: var(--rv-ink-2); white-space: pre-line; }
.rv-modal-ref { margin-top: 12px !important; font-size: 13.5px; color: var(--rv-ink-2); }
.rv-modal-ref a { color: var(--rv-garnet); border-bottom: 1px solid rgba(123, 44, 36, .3); }
.rv-modal-card .rv-quote-by { margin: 26px 0 8px; padding-top: 18px; border-top: 1px solid var(--rv-rule); }

/* ── 海 The sea ──────────────────────────────────────────────────────────── */
.rv-depth { height: clamp(180px, 28vh, 300px); background: linear-gradient(180deg, var(--rv-mist) 0%, #C5D2D1 30%, #3C5D63 72%, var(--rv-deep) 100%); }
.rv-sea { padding-top: 24px; padding-bottom: clamp(110px, 14vw, 170px); background: var(--rv-deep); color: var(--rv-foam); }
.rv-sea .rv-station { color: var(--rv-foam-3); }
.rv-sea .rv-station-glyph { background: var(--rv-deep); border-color: var(--rv-foam-4); color: var(--rv-foam-2); }
.rv-sea .rv-station.is-reached .rv-station-glyph { border-color: var(--rv-shallow); color: var(--rv-foam); }
.rv-sea .rv-statement { color: var(--rv-foam); }
.rv-sea .rv-lede { color: var(--rv-foam-2); }

.rv-delta { position: relative; margin-top: clamp(64px, 8vw, 96px); }
.rv-delta-water { display: block; width: 100%; height: 64px; overflow: visible; }
.rv-delta-water path { fill: url(#rv-delta-fill); }
.rv-delta-water .rv-delta-surface { fill: none; stroke: var(--rv-shallow); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.js-river .rv-delta-water { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s cubic-bezier(.4, .1, .2, 1); }
.js-river .rv-delta.is-flooded .rv-delta-water { clip-path: inset(0 0 0 0); }

.rv-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
/* Each depth begins under its own water: the floor of the delta steps down
   4 → 20 → 38 → 60 across the four, and so does the text. */
.rv-tier { --floor: 4px; position: relative; padding: calc(var(--floor) + 30px) 26px 0 0; }
.rv-tier:nth-child(2) { --floor: 20px; }
.rv-tier:nth-child(3) { --floor: 38px; }
.rv-tier:nth-child(4) { --floor: 60px; }
.rv-tiers { margin-top: -64px; }
.rv-tier + .rv-tier { padding-left: 26px; border-left: 1px solid var(--rv-foam-4); }
.js-river .rv-tier { opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease; }
.js-river .rv-delta.is-flooded .rv-tier { opacity: 1; transform: none; }
.js-river .rv-delta.is-flooded .rv-tier:nth-child(2) { transition-delay: .35s; }
.js-river .rv-delta.is-flooded .rv-tier:nth-child(3) { transition-delay: .7s; }
.js-river .rv-delta.is-flooded .rv-tier:nth-child(4) { transition-delay: 1.05s; }
.rv-tier-head { display: flex; align-items: baseline; gap: 12px; }
.rv-tier-cn { font-family: var(--font-zh); font-size: 30px; font-weight: 400; line-height: 1; color: var(--rv-foam); }
.rv-tier-name { font-family: var(--font-mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--rv-foam-3); }
.rv-tier.is-mark .rv-tier-cn { color: var(--rv-bronze); }
.rv-tier.is-mark .rv-tier-name { color: var(--rv-bronze); }
.rv-tier-price { margin-top: 20px !important; font-family: var(--font-display); font-weight: 300; font-size: clamp(24px, 2.4vw, 30px); color: var(--rv-foam); }
.rv-tier-price small { margin-left: 3px; font-family: var(--font-body); font-size: 13px; color: var(--rv-foam-3); }
.rv-tier-desc { margin-top: 12px !important; font-size: 14px; line-height: 1.65; color: var(--rv-foam-2); }
.rv-tier-disc { margin-top: 14px !important; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--rv-bronze); }
.rv-sea-cta { margin-top: 64px !important; }

/* ── The header on a story page ─────────────────────────────────────────────
   Surfacing (deep → mist) lives in pages.css, shared with every page that
   opens on a dark hero; the running head below is the story's own. */

/* The running head: which chapter you are in, and the way to any other. */
.rv-runhead { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0 auto 0 6px;
  padding: 6px 12px 6px 7px; border: 1px solid rgba(230, 237, 234, .2); border-radius: 999px; background: transparent;
  color: var(--rv-foam-2); cursor: pointer; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .2em;
  text-transform: uppercase; transition: border-color .25s ease, color .25s ease, opacity .4s ease; }
.rv-runhead[hidden] { display: none; }
.rv-runhead::after { content: ""; width: 5px; height: 5px; margin-left: 2px; border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; transition: transform .25s ease; }
.rv-runhead[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.rv-runhead:hover { border-color: rgba(230, 237, 234, .45); color: var(--rv-foam); }
.rv-runhead-glyph { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(230, 237, 234, .1);
  font-family: var(--font-zh); font-size: 12.5px; letter-spacing: 0; color: var(--rv-foam); }
.rv-runhead-label .lang-zh { letter-spacing: .24em; }
.site-header.is-surfaced .rv-runhead { border-color: rgba(14, 20, 22, .14); color: var(--rv-ink-2); }
.site-header.is-surfaced .rv-runhead:hover { border-color: rgba(14, 20, 22, .35); color: var(--rv-ink); }
.site-header.is-surfaced .rv-runhead-glyph { background: var(--rv-ink); color: var(--rv-mist); }
/* Hidden on the cover, and out of the tab order with it (visibility, not just
   opacity), then fades in once the story starts. */
.rv-runhead.is-hushed { opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s; }

.rv-toc { position: absolute; top: calc(100% + 8px); z-index: 70; min-width: 240px; margin: 0; padding: 8px; list-style: none;
  background: var(--rv-mist); border: 1px solid var(--rv-rule); box-shadow: 0 18px 48px rgba(6, 12, 13, .18); }
.rv-toc[hidden] { display: none; }
.rv-toc a { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; padding: 9px 12px 9px 8px;
  font-size: 14px; color: var(--rv-ink-2); transition: background .15s ease, color .15s ease; }
.rv-toc a:hover, .rv-toc a:focus-visible { background: var(--rv-mist-2); color: var(--rv-ink); outline: none; }
.rv-toc-glyph { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--rv-rule); border-radius: 50%;
  font-family: var(--font-zh); font-size: 13px; color: var(--rv-ink-2); }
.rv-toc a[aria-current="true"] { color: var(--rv-ink); }
.rv-toc a[aria-current="true"] .rv-toc-glyph { border-color: var(--rv-garnet); background: var(--rv-garnet); color: var(--rv-mist); }

.rv-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.rv-progress > i { display: block; height: 100%; background: var(--rv-bronze); transform-origin: 0 50%; transform: scaleX(0); }
.site-header.is-surfaced .rv-progress > i { background: var(--rv-garnet); }

/* ── Small screens ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  :root { --rv-edge: 20px; --rv-rail: 16px; --rv-gutter: 48px; }
  .rv-ch { padding: 88px 0; }
  .rv-station-glyph { width: 32px; height: 32px; font-size: 13px; }
  .rv-knot { width: 46px; height: 46px; }
  .rv-knot img { box-shadow: 0 0 0 6px var(--rv-mist); }
  .rv-scene, .rv-pair, .rv-split { grid-template-columns: minmax(0, 1fr); }
  .rv-pair > .rv-note-pi { grid-column: 1; }
  .rv-note-sigma { grid-column: 1; grid-row: auto; margin: 0 0 48px; }
  .rv-springs { grid-row: auto; }
  .rv-spring { min-height: 300px; }
  .rv-note { padding-left: 46px; }
  .rv-note-op { font-size: 40px; }
  .rv-work-link { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 22px 0; }
  .rv-work-date { grid-column: 1; grid-row: 1; }
  .rv-work-meta { grid-column: 2; grid-row: 1; }
  .rv-work-title { grid-column: 1 / -1; grid-row: 2; }
  .rv-work-cat { display: none; }
  .rv-tribs { padding-left: 14px; }
  .rv-quotes { grid-template-columns: minmax(0, 1fr); gap: 52px; }
  .rv-quote-text::before { left: -.5em; }
  .rv-quote-text.is-zh::before { left: -1em; }
  .rv-modal-card { padding: 48px 24px 28px; }
  /* On a phone the four depths stack, so the river widens down the rail beside
     them instead of across (the estuary, drawn by confluence.js). */
  .rv-delta-water { display: none; }
  .rv-tiers { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .rv-tier, .rv-tier + .rv-tier { padding: 26px 0 30px; border-left: 0; border-top: 1px solid var(--rv-foam-4); }
  /* Each depth surfaces as the widening water reaches it (confluence.js). */
  .js-river .rv-tier.is-reached { opacity: 1; transform: none; transition-delay: 0s; }
  .rv-sea-cta { margin-top: 92px !important; }
}
@media (max-width: 640px) {
  .rv-runhead { padding: 5px 10px 5px 5px; gap: 8px; font-size: 10px; letter-spacing: .16em; }
  .rv-toc { left: 12px; right: 12px; min-width: 0; }
}
@media (max-width: 380px) { body[data-page="story"] .brand-word { display: none; } }

/* Still water: the whole river drawn, every state already reached. */
@media (prefers-reduced-motion: reduce) {
  .rv-river .rv-flow, .rv-river .rv-head-glow, .rv-begin > span, .rv-prologue .hero-scrollcue > span { animation: none; }
  .rv-prologue .hero-scrollcue > span { top: 30%; }
  .js-river .rv-knot img, .js-river .rv-tier, .js-river .rv-delta-water, .rv-op::before { transition: none; }
}
