/* The Great Turning — C, The Ridge. Stone paper, pine line, iron bead. Spectral display, Atkinson Hyperlegible body. */
:root {
  --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12H19M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E");
  --i-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E");
  /* C, The Ridge: stone paper, ink, pine for the line and the marks, iron red for the reader (the bead), far sky for the hinge. */
  color-scheme: light dark;
  --paper: #ECE8DF;
  --paper-2: #F4F1EA;
  --paper-3: #E2DDD2;
  --ink: #1E1E1C;
  --ink-2: #45463F;
  --mute: #5B5C55;
  --river: #3E5F4A;
  --river-soft: rgba(62, 95, 74, 0.16);
  --rule: rgba(30, 30, 28, 0.14);
  --hinge: #4D6573;
  --mark: #964A41;
  --mark-text: #8A423A;
  --shadow: 0 1px 2px rgba(30,30,28,.06), 0 8px 24px rgba(30,30,28,.08);
  --shadow-lg: 0 2px 6px rgba(30,30,28,.08), 0 24px 60px rgba(30,30,28,.16);
  --radius: 12px;
  --gap: 18px;
  --gutter: 56px;
  --col: 680px;
  --font-display: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --t: 0.3s;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1F1C;
    --paper-2: #242925;
    --paper-3: #2D332E;
    --ink: #ECE8DF;
    --ink-2: #CBC7BC;
    --mute: #A3A097;
    --river: #93B19D;
    --river-soft: rgba(147, 177, 157, 0.18);
  --rule: rgba(236, 232, 223, 0.16);
    --hinge: #9FB6C3;
    --mark: #D4918A;
    --mark-text: #DDA29B;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --paper: #1B1F1C;
  --paper-2: #242925;
  --paper-3: #2D332E;
  --ink: #ECE8DF;
  --ink-2: #CBC7BC;
  --mute: #A3A097;
  --river: #93B19D;
  --river-soft: rgba(147, 177, 157, 0.18);
  --rule: rgba(236, 232, 223, 0.16);
  --hinge: #9FB6C3;
  --mark: #D4918A;
  --mark-text: #DDA29B;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.5);
}
@media (min-width: 760px) { :root { --gutter: 96px; } }
@media (max-width: 479px) { :root { --gutter: 44px; } .story { padding-right: 18px; } }  /* round 3: a wider reading column on phones; the river keeps its line */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.05rem; line-height: 1.55;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
button { -webkit-user-select: none; user-select: none; }
body.lock { overflow: hidden; }
p, .lead, .sheet-body, .card-out, .flip-a, .opt-r, .reveal, .shape-body { -webkit-user-select: text; user-select: text; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-color: var(--river); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--mark); outline-offset: 3px; border-radius: 6px;
}
.mute { color: var(--mute); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper-2); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transform: translateY(-110%); transition: transform var(--t) var(--ease);
}
.topbar:not(.show) { visibility: hidden; }
.topbar.show { transform: none; }
.tb-brand { background: none; border: 0; padding: 4px 6px; min-height: 40px; font-family: var(--font-display); font-size: 1rem; cursor: pointer; white-space: nowrap; }
.tb-dots { display: flex; gap: 6px; flex: 1; justify-content: center; align-items: center; }
.tb-dot {
  width: 36px; height: 40px; border: 0; background: none; cursor: pointer; padding: 0;
  display: grid; place-items: center; border-radius: 50%;
}
.tb-dot i { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--river-soft); box-shadow: inset 0 0 0 1.5px var(--river); transition: width var(--t) var(--ease), height var(--t) var(--ease), background var(--t); }
.tb-dot.visited i { background: var(--river); }
.tb-dot.current i { width: 14px; height: 14px; }
.tb-dot.is-door i { outline: 2px solid var(--mark); outline-offset: 2px; }
.tb-right { display: flex; align-items: center; gap: 6px; }
.tb-stones { font-size: .82rem; color: var(--mute); white-space: nowrap; }
.tb-btn {
  border: 0; background: var(--paper-2); box-shadow: var(--shadow); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; font-size: .9rem; min-height: 40px;
}
.tb-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.tb-icon { width: 40px; padding: 0; text-align: center; display: inline-grid; place-items: center; }
.ico { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: -.26em; flex: none; }
.tb-btn .ico { width: 18px; height: 18px; }
#tb-map { display: inline-flex; align-items: center; gap: 6px; padding-left: 11px; }
.btn .ico, .listen-ch .ico { width: 1.15em; height: 1.15em; vertical-align: -.22em; margin-right: 2px; }
@media (max-width: 599px) { .tb-brand, .tb-stones, #tb-theme { display: none; } .topbar { gap: 6px; padding-left: 8px; padding-right: 8px; } .tb-dots { gap: 0; } .tb-dot { width: 28px; height: 36px; } }
@media (max-width: 479px) { .tb-dots { min-width: 0; overflow: hidden; } .tb-dot { width: 22px; flex: 0 1 22px; } #tb-map span { display: none; } #tb-map { padding: 0 10px; } }

/* ---------- opening ---------- */
.opening {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 72px 20px 48px; max-width: 860px; margin: 0 auto;
}
.op-mark { color: var(--river); display: block; margin: 0 0 10px -4px; }
/* the name is the heading (round 1, 2026-10-14); the hook sits under it as the first sentence */
.op-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -.012em; max-width: 13ch; margin: 0 0 1.6rem; text-wrap: balance; }
.hook { font-size: clamp(1.3rem, 2.6vw, 1.85rem); font-weight: 300; line-height: 1.35; max-width: 34ch; text-wrap: pretty; }
.op-you { font-family: var(--font-display); font-style: italic; color: var(--river); font-size: 1.08rem; line-height: 1.5; max-width: 44ch; margin: 0 0 1.8rem; padding-left: 14px; border-left: 2px solid var(--river); text-wrap: pretty; }
.hook2 { font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 400; color: var(--hinge); margin: 1rem 0 1.4rem; max-width: 34ch; }
.op-how { max-width: 56ch; margin: 1.6rem 0 2.4rem; padding: 18px 0 20px; border-top: 1px solid var(--river); border-bottom: 1px solid var(--river); }
.op-how-k { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mark-text); margin-bottom: 10px; }
.op-how-1 { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.45; margin-bottom: 10px; text-wrap: pretty; }
.op-how-2 { color: var(--ink-2); font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
@media (max-width: 599px) { .opening { padding-top: 48px; min-height: 0; } .op-title { font-size: 2.45rem; margin-bottom: 1.1rem; } .hook { font-size: 1.25rem; } .hook2 { margin: .8rem 0 1rem; } .op-you { font-size: 1rem; margin-bottom: 1.3rem; } .op-meta { margin-bottom: 1.3rem; } }
@media (max-height: 500px) { .opening { min-height: 0; padding-top: 28px; } .op-title { font-size: 2rem; margin-bottom: .7rem; } .hook { font-size: 1.15rem; } .hook2 { font-size: 1.05rem; margin: .6rem 0 .8rem; } .op-mark { display: none; } }
.doors-title { font-size: 1.25rem; font-style: italic; color: var(--ink-2); margin-bottom: 14px; }
.doors { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 14px; }
.door {
  text-align: left; border: 0; background: var(--paper-2); box-shadow: var(--shadow); border-radius: var(--radius);
  padding: 18px 20px 14px; cursor: pointer; min-height: 56px; position: relative;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  transition: transform var(--t) var(--ease), box-shadow var(--t);
}
.door:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.door .door-label { display: block; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; text-wrap: balance; }
.door .door-why { display: block; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.door .door-min { display: block; margin-top: auto; padding-top: 8px; font-size: .8rem; color: var(--mute); font-variant-numeric: tabular-nums; }
.door.begin { background: transparent; box-shadow: inset 0 0 0 1.5px var(--river-soft); }
.door.begin .door-label { color: var(--river); }
.door.chosen { box-shadow: 0 0 0 2px var(--mark), var(--shadow); }
.op-note { color: var(--mute); font-size: .9rem; max-width: 60ch; }
.resume { background: var(--paper-3); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 1.4rem; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- sliver ---------- */
.sliver { max-width: var(--col); margin: 0 auto; padding: 24px 20px 56px; }
.sl-title { font-size: 1.5rem; margin-bottom: 18px; }
.sl-bars { display: grid; gap: 14px; margin-bottom: 14px; }
.sl-row { display: grid; grid-template-columns: 1fr; gap: 4px; opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.sl-row.on { opacity: 1; transform: none; }
.sl-label { font-size: .85rem; color: var(--mute); display: flex; justify-content: space-between; }
.sl-track { height: 18px; background: var(--river-soft); border-radius: 4px; position: relative; overflow: hidden; }
.sl-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--river); border-radius: 4px; min-width: 2px; transform-origin: left; transform: scaleX(0); transition: transform .9s var(--ease) .15s; }
.sl-row.on .sl-fill { transform: none; }
.sl-fill.hair { background: var(--hinge); }
.sl-text { min-height: 3.2em; font-family: var(--font-display); font-size: 1.15rem; }
.sl-controls { display: flex; align-items: center; gap: 12px; }

/* ---------- buttons, chips ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; min-height: 44px;
  background: var(--ink); color: var(--paper); font-weight: 500; box-shadow: var(--shadow);
}
.btn.ghost { background: var(--paper-2); color: var(--ink); }
.btn.quiet { background: transparent; color: var(--ink-2); box-shadow: none; text-decoration: underline; text-decoration-color: var(--river); text-underline-offset: 3px; }
.btn:disabled { opacity: 1; background: var(--paper-3); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--river-soft); cursor: default; }
.chip {
  display: inline-block; font-size: .8rem; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px;
  background: var(--paper-3); color: var(--ink-2); vertical-align: middle; white-space: nowrap;
}
.chip-rec { background: var(--river-soft); color: var(--ink); }
.chip-std { background: var(--paper-3); color: var(--ink); }
.chip-unc { background: color-mix(in srgb, var(--hinge) 14%, transparent); color: var(--ink); }
.chip-take { background: color-mix(in srgb, var(--mark) 18%, transparent); color: var(--ink); }
.chip-you { background: color-mix(in srgb, var(--mark) 22%, transparent); color: var(--ink); }
.chip-trad { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); }
.stone-trad { color: var(--ink-2); }
.map-trad { font: inherit; font-size: .9rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 6px 8px; min-height: 36px; max-width: 46vw; margin-right: 8px; }
.map .node.dim { opacity: .18; } .map .edge.dim { opacity: .06; }

/* ---------- story and river ---------- */
.story { position: relative; padding: 24px 20px 160px calc(var(--gutter) + 8px); max-width: calc(var(--gutter) + var(--col) + 48px); margin: 0 auto; }
.river { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#river-path { stroke: var(--river); stroke-width: 2.5; stroke-linecap: round; }
.chapters { max-width: var(--col); }

.movement { margin: 48px 0 28px; position: relative; }
.mv-eyebrow {
  display: block; font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1; color: var(--river); opacity: .78; margin-left: -2px;
}
.movement h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 4px; }
.mv-span { color: var(--mute); font-size: .9rem; display: block; margin: 6px 0 12px; }
.mv-lead { font-family: var(--font-display); font-size: 1.2rem; max-width: 46ch; }

.chapter { padding: 20px 0 36px; position: relative; scroll-margin-top: 64px; }
.chapter.arrive > * { animation: rise .55s var(--ease) both; }
.chapter.arrive > *:nth-child(n+4) { animation-delay: .08s; }
.ch-head { margin-bottom: 10px; }
.chapter h3 { position: relative; }
.chapter h3::before {
  content: ""; position: absolute; top: calc(.575em - 8px); left: calc(-1 * var(--gutter) / 2 - 8px - 8px);
  width: 16px; height: 16px; border-radius: 50%; background: var(--paper);
  box-shadow: inset 0 0 0 2.5px var(--river); transition: background var(--t), box-shadow var(--t);
}
.chapter.visited h3::before { background: var(--river); }
.chapter.current h3::before { box-shadow: inset 0 0 0 2.5px var(--river), 0 0 0 5px var(--river-soft); }
.ch-n { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.chapter h3 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 700; }
.ch-meta { color: var(--mute); font-size: .9rem; margin-top: 4px; }
.lead { font-size: 1.08rem; max-width: 58ch; }

.door-banner {
  background: var(--paper-3); border-radius: var(--radius);
  padding: 12px 16px 12px 44px; margin: 8px 0 18px; font-size: .95rem; position: relative;
}
.door-banner::before { content: ""; position: absolute; left: 16px; top: 17px; width: 14px; height: 14px; border-radius: 50%; background: var(--mark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mark) 25%, transparent); }
.door-banner b { font-weight: 600; }

.group-title { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); margin: 18px 0 8px; }
.stones { display: grid; gap: 0 28px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 14px 0 4px; border-bottom: 1px solid var(--rule); }
.stone {
  text-align: left; border: 0; cursor: pointer; background: transparent; border-radius: 0;
  padding: 12px 24px 14px 0; min-height: 0; position: relative; border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 3px; transition: background var(--t);
}
.stone:hover .stone-name, .stone:focus-visible .stone-name { color: var(--river); }
.stone::after { content: ""; position: absolute; right: 2px; top: 14px; width: 16px; height: 16px; background: var(--mute); -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat; opacity: 0; transition: opacity var(--t), transform var(--t) var(--ease); transform: translateX(-4px); }
.stone:hover::after, .stone:focus-visible::after { opacity: 1; transform: none; }
.stone.thread .stone-name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mark); margin: 0 8px 2px 0; }
.stone-name { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.2; padding-right: 18px; }
.stone-dates { font-size: .8rem; color: var(--mute); }
.stone-one { font-size: 1rem; color: var(--ink-2); line-height: 1.42; }
.stone-marks { position: absolute; right: 4px; top: 16px; display: flex; gap: 4px; }
.mark-visited, .mark-thread { width: 8px; height: 8px; border-radius: 50%; display: none; }
.stone.visited .mark-visited { display: block; background: var(--river); }
.stone.thread .mark-thread { display: block; background: var(--mark); }
.stone.thread .mark-thread { display: none; }
.thread-legend { font-size: .8rem; color: var(--mute); margin: -4px 0 10px; }
.more-stones { margin: 2px 0 10px; }
.shelf-box { margin: 6px 0 2px; }
.thread-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mark); margin-right: 6px; }

/* ---------- before and after: the force named first, the reading with its critics ---------- */
.stone.force .stone-name::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; vertical-align: 2px; border-radius: 50%; background: var(--river); box-shadow: 0 0 0 3px var(--river-soft); }
.force-back { font-family: var(--font-display); font-style: italic; color: var(--river); margin: 4px 0 0; }
.panel-reading { margin: 26px 0 8px; padding: 18px 0 6px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.panel-claim { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.35; margin: 4px 0 16px; text-wrap: balance; }
.panel-cols { display: grid; gap: 18px 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.panel-voice p { margin: 4px 0 6px; color: var(--ink-2); line-height: 1.5; }
.panel-who { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.panel-open { font-size: .9rem; }
.panel-smaller { margin: 18px 0 8px; line-height: 1.55; }
.coda-act { margin: 20px 0 0; font-family: var(--font-display); font-size: 1.1rem; }
.coda-act .mute { font-family: var(--font-body); font-size: .95rem; }

/* ---------- the family: chairs ---------- */
.family { padding: 20px 0 36px; position: relative; scroll-margin-top: 64px; }
.chairs { display: grid; gap: 0 28px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 14px 0 10px; border-bottom: 1px solid var(--rule); }
.chair { text-align: left; border: 0; cursor: pointer; background: transparent; border-radius: 0; padding: 14px 24px 16px 0; position: relative; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.chair:hover .chair-name, .chair:focus-visible .chair-name { color: var(--river); }
.chair::after { content: ""; position: absolute; right: 2px; top: 16px; width: 16px; height: 16px; background: var(--mute); -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat; opacity: 0; transform: translateX(-4px); transition: opacity var(--t), transform var(--t) var(--ease); }
.chair:hover::after, .chair:focus-visible::after { opacity: 1; transform: none; }
.chair-name { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.15; }
.chair-self { font-size: .8rem; color: var(--mute); font-family: var(--font-display); font-variant-numeric: lining-nums; }
.chair-hunger { font-size: 1rem; color: var(--ink-2); line-height: 1.42; }
.chair-open { font-size: .8rem; color: var(--river); margin-top: 4px; }
.chair.visited .chair-open::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--river); margin-right: 6px; vertical-align: 1px; }
.chair-line { margin: 12px 0; line-height: 1.5; }
.chair-k { display: block; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); margin-bottom: 2px; }
.chair-line .srclink { margin-left: 8px; }

/* ---------- the name at the door ---------- */
.gate { position: fixed; inset: 0; z-index: 90; background: var(--paper); display: grid; place-items: center; padding: 24px 16px; overflow: auto; }
.gate-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
.gate-mark { color: var(--river); margin-bottom: 4px; }
.gate-kicker { font-family: var(--font-display); font-style: italic; color: var(--river); margin: 0; }
.gate h2 { font-size: 1.9rem; line-height: 1.1; margin: 0 0 4px; }
.gate-why { color: var(--ink-2); margin: 0 0 6px; text-wrap: pretty; }
.gate-in { font: inherit; font-size: 1.1rem; padding: 12px 14px; border: 0; border-bottom: 1.5px solid var(--ink-2); background: transparent; color: var(--ink); border-radius: 0; }
.gate-in:focus-visible { outline: none; border-bottom-color: var(--river); }
.gate-in[aria-invalid="true"] { border-bottom-color: var(--mark); }
.gate-minor { color: var(--mute); font-size: .9rem; margin: -4px 0 0; }
.gate-more { font-size: .85rem; color: var(--mute); } .gate-more summary { cursor: pointer; } .gate-more p { margin: 6px 0 0; line-height: 1.5; }
.gate-err { color: var(--mark-text); font-size: .9rem; min-height: 1.2em; margin: 0; }
.gate .btn { align-self: flex-start; }
body.gated { overflow: hidden; }

/* ---------- v3: the mirror and the three lines ---------- */
.mirror .lead { margin-bottom: 6px; }
.lean-row { padding: 12px 0 6px; border-top: 1px solid var(--rule); }
.lean-ends { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 1.05rem; }
.lean-seek { --p: 50%; width: 100%; -webkit-appearance: none; appearance: none; height: 32px; background: transparent; margin: 2px 0 0; cursor: pointer; }
.lean-seek::-webkit-slider-runnable-track { height: 2px; background: var(--rule); }
.lean-seek::-moz-range-track { height: 2px; background: var(--rule); }
.lean-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--mark); margin-top: -7px; }
.lean-seek::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--mark); }
.lean-seek:focus-visible { outline: 2px solid var(--river); outline-offset: 4px; border-radius: 4px; }
.lean-line { font-size: .95rem; color: var(--ink-2); margin: 2px 0 6px; line-height: 1.45; }
.lean-yours { margin-top: 14px; } .lean-yours p { margin: 6px 0; }
.line-ask { max-width: var(--col); margin: 8px 0 28px; padding: 16px 0 6px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.line-q { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 10px; text-wrap: balance; }
.line-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.line-in { flex: 1; min-width: 200px; font: inherit; font-size: 16px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--ink-2); background: transparent; color: var(--ink); }
.line-in:focus-visible { outline: none; border-bottom-color: var(--river); }
.line-row .btn[aria-pressed="true"] { color: var(--mark-text); }

/* ---------- interactives ---------- */
.inter {
  background: var(--paper-2); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px 16px; margin: 22px 0;
}
.inter-kicker { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mark-text); margin-bottom: 6px; }
.inter-q { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 14px; }
.opts { display: grid; gap: 8px; }
.opt {
  text-align: left; border: 0; background: var(--paper); border-radius: 10px; padding: 10px 12px 10px 42px;
  cursor: pointer; min-height: 44px; position: relative; box-shadow: inset 0 0 0 1px var(--river-soft);
  transition: background var(--t), box-shadow var(--t);
}
.opt::before {
  content: attr(data-key); position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-size: .8rem; color: var(--mute); background: var(--paper-3);
}
.opt:hover { box-shadow: inset 0 0 0 1.5px var(--river); }
.opt.picked { box-shadow: inset 0 0 0 2px var(--mark); }
.opt.right { background: color-mix(in srgb, var(--river) 16%, var(--paper)); box-shadow: inset 0 0 0 2px var(--river); }
.opt:disabled { cursor: default; }
.opt .opt-r { display: block; font-size: 1rem; color: var(--ink-2); margin-top: 6px; }
.reveal { margin-top: 18px; padding-top: 4px; animation: rise .5s var(--ease) both; }
.reveal p:last-child { margin-bottom: 0; }
.reveal .verdict { font-weight: 600; margin-bottom: 6px; }
.caveat { color: var(--ink-2); font-size: 1rem; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stand-track { position: relative; margin: 8px 0 4px; }
.stand-track input[type=range] { width: 100%; accent-color: var(--mark); height: 36px; }
.stand-stops { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: .8rem; color: var(--mute); text-align: center; }
.stand-stops span:first-child { text-align: left; } .stand-stops span:last-child { text-align: right; }
@media (max-width: 599px) { .stand-stops { grid-template-columns: 1fr 1fr; } .stand-stops span:nth-child(2), .stand-stops span:nth-child(3), .stand-stops span:nth-child(4) { display: none; } }
input[type=range].unplaced::-webkit-slider-thumb { opacity: 0; }
input[type=range].unplaced::-moz-range-thumb { opacity: 0; }
.stand-track input[type=range] { height: 44px; }
.stand-you { font-size: .95rem; margin: 10px 0; }
.stand-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; align-items: start; }
.stand-col { display: grid; gap: 6px; }
.voice {
  border: 0; cursor: pointer; background: var(--paper); border-radius: 8px; padding: 6px 8px; font-size: .9rem; text-align: left;
  box-shadow: inset 0 0 0 1px var(--river-soft); min-height: 44px; transition: opacity var(--t);
}
.voice.dim { opacity: .35; }
.voice.extra { background: transparent; box-shadow: inset 0 0 0 1px var(--hinge); color: var(--ink-2); cursor: default; }
.voice-say { margin-top: 12px; font-size: .95rem; min-height: 2.6em; }
.stand-toggle { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .95rem; cursor: pointer; }
.stand-toggle input { width: 20px; height: 20px; accent-color: var(--mark); }
@media (max-width: 599px) { .stand-cols { grid-template-columns: 1fr; } .stand-col::before { content: attr(data-stop); font-size: .75rem; color: var(--mute); } }

.flips { margin: 18px 0 0; }
.flips { margin-top: 22px; }
.flip {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer; border-radius: 0;
  background: transparent; padding: 12px 30px 12px 0; margin: 0; min-height: 48px; position: relative;
  border-top: 1px solid var(--rule);
}
.flips { border-bottom: 1px solid var(--rule); }
.flip .flip-q { display: block; font-weight: 500; }
.flip .flip-a { display: none; margin-top: 8px; color: var(--ink-2); font-size: 1rem; }
.flip.on .flip-q { color: var(--river); }
.flip.on .flip-a { display: block; animation: rise .4s var(--ease) both; }
.flip::after { content: ""; position: absolute; right: 2px; top: 11px; width: 16px; height: 16px; background: var(--mute); -webkit-mask: var(--i-plus) center / contain no-repeat; mask: var(--i-plus) center / contain no-repeat; transition: transform var(--t) var(--ease); }
.flip.on::after { -webkit-mask-image: var(--i-minus); mask-image: var(--i-minus); }

.ch-foot { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.merge { background: var(--paper-3); border-radius: var(--radius); padding: 16px 18px; width: 100%; }
.merge p { margin-bottom: 10px; }
.merge .merge-t { font-family: var(--font-display); font-size: 1.2rem; }
.merge-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- chapter 9 shapes ---------- */
.traps { width: 100%; height: auto; display: block; margin: 8px 0 4px; }
.traps text { font-family: var(--font-body); font-size: 22px; fill: var(--ink-2); }
.traps .trap-lbl { font-family: var(--font-display); font-size: 26px; fill: var(--ink); }
.traps .walker { animation: walk 9s linear infinite; }
@keyframes walk { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@media (prefers-reduced-motion: reduce) { .traps .walker { animation: none; offset-distance: 50%; } }
.shape-list { display: grid; gap: 10px; margin-top: 12px; }
.shape {
  text-align: left; border: 0; cursor: pointer; background: var(--paper); border-radius: 10px; padding: 12px 14px;
  box-shadow: inset 0 0 0 1px var(--river-soft); min-height: 48px;
}
.shape .shape-t { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.shape .shape-body { display: none; margin-top: 8px; font-size: .95rem; color: var(--ink-2); }
.shape.on .shape-body { display: block; animation: rise .4s var(--ease) both; }
.shape.on { background: var(--paper-2); box-shadow: var(--shadow); }
.who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.who-chip {
  border: 0; cursor: pointer; background: var(--paper-3); border-radius: 999px; padding: 8px 12px; font-size: .9rem; min-height: 40px;
}
.who-chip.visited { box-shadow: inset 0 0 0 1.5px var(--river); }
.skeptic { background: var(--paper-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.skeptic b { font-weight: 600; }
.srclink, .reveal a { display: inline-block; padding: 10px 2px; margin: -10px 0; }
.three { display: grid; gap: 10px; margin: 12px 0; }
.three-card { background: var(--paper-2); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.three-card .names { color: var(--mark-text); font-style: italic; font-family: var(--font-display); }
.open-q { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--hinge); margin: 22px 0; max-width: 50ch; }

/* ---------- ending ---------- */
.end-block { margin: 26px 0; }
.end-h { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; margin-bottom: 10px; }
.take { padding: 14px 0; margin: 0; border-top: 1px solid var(--rule); }
.end-block > div > .take:last-child, .end-block > div > .take:last-of-type { border-bottom: 1px solid var(--rule); }
.take b { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; margin-bottom: 4px; }
.texts { display: grid; gap: 8px; }
.text-row { padding: 12px 0; border-top: 1px solid var(--rule); display: grid; gap: 4px; }
.texts { border-bottom: 1px solid var(--rule); }
.text-row .t-title { font-family: var(--font-display); font-size: 1.1rem; }
.text-row .t-meta { font-size: .8rem; color: var(--mute); }
.text-row .t-why { font-size: 1rem; color: var(--ink-2); }
.shelf { margin-top: 12px; padding-left: 1.1em; }
.shelf li { margin-bottom: 4px; }
.acts { display: grid; gap: 8px; }
.act {
  text-align: left; border: 0; cursor: pointer; background: var(--paper-2); border-radius: 10px; padding: 12px 14px 12px 44px;
  box-shadow: var(--shadow); position: relative; min-height: 52px;
}
.act::before { content: ""; position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--river); }
.act.on::before { background: var(--mark); box-shadow: inset 0 0 0 2px var(--mark); }
.act .act-t { display: block; font-weight: 500; }
.act .act-d { display: block; font-size: 1rem; color: var(--ink-2); margin-top: 2px; }
.when { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.when input { font: inherit; font-size: 16px; padding: 12px 12px; min-height: 44px; border-radius: 10px; border: 0; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--river-soft); color: var(--ink); min-width: 240px; flex: 1; }
.card-out {
  background: var(--paper-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
  font-family: var(--font-display); white-space: pre-wrap; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere;
}
.card-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.legend { display: grid; gap: 6px; font-size: .9rem; }
.sources { font-size: .9rem; }
.sources summary { cursor: pointer; font-weight: 500; }
.sources ol { padding-left: 1.2em; }
.credit { color: var(--mute); font-size: .85rem; margin-top: 18px; }
.closing { font-family: var(--font-display); font-size: 1.25rem; max-width: 46ch; margin: 40px 0 26px; }
.foot-details { font-size: .92rem; margin-top: 8px; }
.foot-details summary { cursor: pointer; font-weight: 500; padding: 8px 0; list-style: none; display: flex; gap: 10px; align-items: center; color: var(--ink-2); min-height: 40px; }
.foot-details summary::-webkit-details-marker { display: none; }
.foot-details summary::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--mute); -webkit-mask: var(--i-plus) center / contain no-repeat; mask: var(--i-plus) center / contain no-repeat; }
.foot-details[open] summary::before { -webkit-mask-image: var(--i-minus); mask-image: var(--i-minus); }
.foot-details .legend { margin-top: 10px; }

/* ---------- sheet (figure detail) ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(20,16,14,.35); z-index: 50; }
.sheet {
  position: fixed; z-index: 60; background: var(--paper); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  left: 0; right: 0; bottom: 0; max-height: 88dvh; border-radius: 18px 18px 0 0;
  transform: translateY(100%); transition: transform var(--t) var(--ease);
}
.sheet.open { transform: none; }
.sheet[hidden] { transition: none; }
.sheet-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px 6px; }
.sheet-where { font-size: .85rem; color: var(--mute); }
.sheet-body { padding: 6px 20px calc(28px + env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; }
.sheet-body h2 { font-size: 1.7rem; }
.sheet-dates { color: var(--mute); font-size: .9rem; margin: 2px 0 10px; }
.sheet-one { font-family: var(--font-display); font-size: 1.15rem; }
.sheet-more { color: var(--ink); }
.sheet-work { font-size: 1rem; color: var(--ink-2); }
.sheet-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.sheet-links { margin-top: 14px; }
.sheet-links .group-title { margin-top: 0; }
@media (min-width: 900px) {
  .sheet { left: auto; top: 0; bottom: 0; width: 440px; max-height: none; border-radius: 18px 0 0 18px; transform: translateX(100%); }
  .sheet-body { padding-bottom: 40px; }
}

/* ---------- map ---------- */
.map { position: fixed; inset: 0; z-index: 70; background: var(--paper); display: grid; grid-template-rows: auto 1fr auto; }
.map-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); flex-wrap: wrap; }
.map-bar h2 { font-size: 1.4rem; }
.map-note { color: var(--mute); font-size: .85rem; margin: 0; flex: 1; min-width: 200px; }
.map-scroll { overflow: auto; padding: 0 12px; overscroll-behavior: contain; }
.map svg { display: block; min-width: 900px; width: 100%; height: auto; }
.map .edge { stroke: var(--river); stroke-opacity: .35; stroke-width: 1.4; fill: none; transition: stroke-opacity var(--t), stroke-width var(--t); }
.map .edge.lit { stroke-opacity: 1; stroke-width: 2.4; }
.map .edge.off { stroke-opacity: .08; }
.map .node { cursor: pointer; }
.map .node circle { fill: var(--paper-2); stroke: var(--river); stroke-width: 1.6; transition: opacity var(--t); }
.map .node.visited circle { fill: var(--river); }
.map .node text { font-family: var(--font-body); font-size: 11.5px; fill: var(--ink); }
.map .node.off { opacity: .22; }
.map .node.sel circle { stroke: var(--mark); stroke-width: 3; }
.map .col-lbl { font-family: var(--font-display); font-style: italic; font-size: 12px; fill: var(--mute); }
.map-detail { padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 32dvh; overflow: auto; overscroll-behavior: contain; border-top: 1px solid var(--river-soft); font-size: 1rem; }
.map-cue { padding: 6px 4px 0; font-size: .9rem; }
.map-detail h3 { font-size: 1.2rem; margin-bottom: 6px; }
.map-list { padding: 4px 4px 20px; }
.map-item { background: var(--paper-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.map-item summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.map-item p { margin: 8px 0 0; font-size: 1rem; }
@media (max-width: 699px) { .map { grid-template-rows: auto 1fr; } .map-detail { display: none; } }
/* the whole roster: untied stones drawn faintly, ties by kind */
.map .node.none circle { fill: var(--paper); stroke: var(--mute); stroke-width: 1; stroke-dasharray: 2 2; }
.map .node.none text { fill: var(--mute); }
.map .node.none.off { opacity: .14; }
.map .edge.take { stroke-dasharray: 5 4; }
.map .col-rule { stroke: var(--rule); stroke-width: 1; }
.map-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; padding: 2px 4px 8px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.map-count { margin: 0; font-size: .92rem; color: var(--ink-2); max-width: 60ch; }
.map-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .82rem; color: var(--mute); }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.map-key i { display: inline-block; }
.map-key .k-line { width: 22px; height: 0; border-top: 2px solid var(--river); }
.map-key .k-take { border-top-style: dashed; }
.map-key .k-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.6px solid var(--river); }
.map-key .k-open { background: var(--river); }
.map-key .k-none { border: 1px dashed var(--mute); }
.map-where { margin: -2px 0 6px; font-size: .9rem; }
.map-list-ch { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 1rem; color: var(--mute); margin: 16px 2px 8px; }
.map-item.none { background: transparent; box-shadow: none; border: 1px dashed var(--rule); }
.map-item.none summary b { font-weight: 500; color: var(--ink-2); }
.map-item summary { display: block; list-style: none; padding: 11px 0; min-height: 44px; box-sizing: border-box; line-height: 1.4; }
.map-item summary::-webkit-details-marker { display: none; }
.map-item.none { padding-top: 0; padding-bottom: 0; }

.map-detail ul { margin: 0; padding-left: 1.1em; }
.map-detail li { margin-bottom: 4px; }
.map .linkbtn { background: none; border: 0; padding: 10px 0; cursor: pointer; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--river); text-underline-offset: 3px; }

/* ---------- keys ---------- */
/* a sheet opened from the map sits above it */
.backdrop.over-map { z-index: 74; } .sheet.over-map { z-index: 75; }
.keys { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(20,16,14,.35); padding: 20px; }
.keys-card { background: var(--paper); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-lg); max-width: 380px; width: 100%; }
.keys-card h2 { font-size: 1.4rem; margin-bottom: 10px; }
.keys dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; }
.keys dt { font-weight: 600; white-space: nowrap; }
.keys dd { margin: 0; color: var(--ink-2); }
.keys-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity var(--t), transform var(--t) var(--ease); z-index: 90; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.lock .toast { bottom: auto; top: calc(64px + env(safe-area-inset-top)); transform: translate(-50%, -20px); }
body.lock .toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media print { .topbar, .sheet, .map, .keys, .toast, .backdrop, .river { display: none !important; } .story { padding-left: 20px; } }

/* a wrong bet shows the way back: the stones that held the answer glow for a moment */
@keyframes glow { 0%, 100% { background: transparent; } 50% { background: color-mix(in srgb, var(--mark) 16%, transparent); } }
.stone.glow { animation: glow 1.4s ease-in-out 4; }
.take.mine b { color: var(--mark-text); }
.texts-more { margin-top: 10px; }
.texts-more summary { cursor: pointer; color: var(--river); font-weight: 500; padding: 8px 0; min-height: 40px; display: flex; align-items: center; }
.texts-more[open] summary { margin-bottom: 6px; }

/* Branding's live pass, 2026-10-10: lining figures for every date (Atkinson's zero is slashed), a drawn slider, calmer rhythm */
.ch-n, .ch-meta, .mv-span, .stone-dates, .sheet-dates, .t-meta, .door-min, .sl-label { font-family: var(--font-display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .01em; }
.stand-track input[type=range] { -webkit-appearance: none; appearance: none; height: 44px; background: transparent; accent-color: auto; }
.stand-track input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--river-soft); }
.stand-track input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--river-soft); }
.stand-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--paper-2); box-shadow: inset 0 0 0 3px var(--mark), var(--shadow); }
.stand-track input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--paper-2); box-shadow: inset 0 0 0 3px var(--mark), var(--shadow); }
.stand-track input[type=range].unplaced::-webkit-slider-thumb { opacity: 0; }
.stand-track input[type=range].unplaced::-moz-range-thumb { opacity: 0; }
.stand-stops { line-height: 1.25; margin: 4px 0 14px; }
.door .door-why, .door .door-min, .lead, .stone-one, .mv-lead { text-wrap: pretty; }
.hook2 { line-height: 1.3; }

/* Branding's finish on the index, 2026-10-10: the dot hangs in the margin; it shows only where it separates; the question block speaks the index's rule language */
.stone.thread .stone-name { position: relative; }
.stone.thread .stone-name::before { position: absolute; left: -15px; top: .52em; margin: 0; }
.thread-legend { display: none; }
.stones:not(:has(.stone:not(.thread))) .stone.thread .stone-name::before { display: none; }
.inter { background: transparent; box-shadow: none; border-radius: 0; border-top: 2px solid var(--river); border-bottom: 1px solid var(--rule); padding: 18px 0 16px; }
.inter .opt { background: var(--paper-2); }
@media (max-width: 480px) { .stone.thread .stone-name::before { left: -13px; } .stone.thread { padding-left: 0; } }

/* with motion reduced, the stones that held the answer still show it, held rather than pulsed */
@media (prefers-reduced-motion: reduce) { .stone.glow { background: color-mix(in srgb, var(--mark) 16%, transparent); animation: none; } }

/* Game Builder's second play, 2026-10-10: one action on the first screen; the note folds once seen; the return visit leads */
.op-start { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 .6rem; }
.op-start-or { color: var(--mute); font-size: .95rem; }
.op-how-fold summary { cursor: pointer; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mark-text); list-style: none; display: flex; gap: 10px; align-items: center; min-height: 40px; }
.op-how-fold summary::-webkit-details-marker { display: none; }
.op-how-fold summary::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--mute); -webkit-mask: var(--i-plus) center / contain no-repeat; mask: var(--i-plus) center / contain no-repeat; }
.op-how-fold[open] summary::before { -webkit-mask-image: var(--i-minus); mask-image: var(--i-minus); }
.op-how-fold[open] summary { margin-bottom: 10px; }
.op-how:has(.op-how-fold) { padding: 4px 0; margin: 1rem 0 1.6rem; }
#resume { margin: 0 0 1.4rem; }
.merge-keep { margin: 8px 0; }
.merge-keep b { font-weight: 600; }

/* the stand slider, one point at a time: the picture first, the weighing behind one labelled fold; on phones only the ends of the dial are labelled, the live "You:" line names the stop */
.stand-more { margin-top: 14px; border-top: 1px solid var(--rule); }
.stand-more summary { cursor: pointer; color: var(--river); font-weight: 500; padding: 10px 0; min-height: 40px; display: flex; gap: 10px; align-items: center; list-style: none; }
.stand-more summary::-webkit-details-marker { display: none; }
.stand-more summary::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--mute); -webkit-mask: var(--i-plus) center / contain no-repeat; mask: var(--i-plus) center / contain no-repeat; }
.stand-more[open] summary::before { -webkit-mask-image: var(--i-minus); mask-image: var(--i-minus); }
@media (max-width: 480px) { .stand-stops { grid-template-columns: 1fr 1fr; } .stand-stops span:nth-child(2), .stand-stops span:nth-child(3), .stand-stops span:nth-child(4) { display: none; } .stand-stops span:last-child { text-align: right; } }

/* listen: a synthetic voice until human narrators; the bar sits low and quiet */
.listen-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; }
.listen-note { color: var(--mute); font-size: .88rem; max-width: 52ch; margin: 6px 0 0; text-wrap: pretty; }
.listen-note summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; min-height: 32px; text-decoration: underline; text-decoration-color: var(--river-soft); text-underline-offset: 3px; }
.listen-note summary::-webkit-details-marker { display: none; }
.listen-note summary::after { content: "+"; color: var(--river); margin-left: .4em; text-decoration: none; display: inline-block; }
.listen-note[open] summary::after { content: " −"; }
.listen-note p { margin: 4px 0 0; }
.listen-ch { margin-left: 10px; background: none; border: 0; color: var(--river); font: inherit; font-size: .9rem; cursor: pointer; padding: 6px 4px; min-height: 36px; border-radius: 6px; }
.listen-ch:hover, .listen-ch:focus-visible { background: var(--paper-2); }
.listen-ch.on { color: var(--mark-text); }
.listen-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--paper-2); border-top: 1px solid var(--rule); box-shadow: 0 -8px 30px rgba(0,0,0,.06); padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
.lb-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.lb-top { display: flex; align-items: center; gap: 10px; }
.lb-mark { width: 20px; height: 20px; color: var(--river); }
.lb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.lb-title span:first-child { font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: lining-nums; }
.lb-sub { font-size: .78rem; color: var(--mute); }
.lb-seek-row { display: flex; align-items: center; gap: 10px; }
.lb-time { font-family: var(--font-display); font-variant-numeric: lining-nums tabular-nums; font-size: .82rem; color: var(--mute); min-width: 3.2ch; text-align: center; }
.lb-seek { --p: 0%; flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; height: 28px; background: transparent; margin: 0; cursor: pointer; }
.lb-seek:disabled { cursor: default; opacity: .5; }
.lb-seek::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--river) var(--p), var(--river-soft) var(--p)); }
.lb-seek::-moz-range-track { height: 3px; border-radius: 2px; background: var(--river-soft); }
.lb-seek::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--river); }
.lb-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--river); margin-top: -5.5px; transition: transform var(--t); }
.lb-seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--river); }
.lb-seek:hover::-webkit-slider-thumb, .lb-seek:focus-visible::-webkit-slider-thumb { transform: scale(1.15); }
.lb-seek:focus-visible { outline: 2px solid var(--river); outline-offset: 4px; border-radius: 4px; }
.lb-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.lb-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; padding: 0; transition: background var(--t), transform var(--t); }
.lb-btn .ico { width: 22px; height: 22px; }
.lb-btn:hover, .lb-btn:focus-visible { background: var(--paper-3); }
.lb-main { width: 54px; height: 54px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.lb-main .ico { width: 26px; height: 26px; }
.lb-main:hover, .lb-main:focus-visible { background: var(--ink); color: var(--paper); }
.lb-rate { font-family: var(--font-display); font-size: .9rem; font-variant-numeric: lining-nums tabular-nums; }
.lb-spacer { width: 44px; height: 44px; }
.lb-rate, .lb-spacer { margin-right: auto; } .lb-spacer { margin-right: 0; margin-left: auto; }
body.listening { padding-bottom: 150px; }
body.listening .toast { bottom: 160px; }
@media (min-width: 700px) {
  .lb-inner { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "controls top" "controls seek"; column-gap: 18px; row-gap: 2px; align-items: center; }
  .lb-top { grid-area: top; } .lb-seek-row { grid-area: seek; padding-right: 54px; }
  .lb-row { grid-area: controls; gap: 4px; } .lb-spacer { display: none; } .lb-rate { margin: 0; order: 4; }
  body.listening { padding-bottom: 110px; } body.listening .toast { bottom: 120px; }
}

/* ---------- settings (2026-10-12: reachable on every screen; a bottom sheet on phones) ---------- */
.opening { position: relative; }
.op-settings { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 5; width: 44px; min-height: 44px; }
.keys-card { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.set-head h2 { margin: 0 !important; }
.set-group { margin: 14px 0 0; }
.set-label { margin: 0 0 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.set-progress { margin: 0 0 10px; color: var(--ink-2); }
.set-row { display: flex; gap: 8px; flex-wrap: wrap; }
.set-row .btn { min-height: 44px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--river-soft); }
.seg button { flex: 1 1 0; min-width: 0; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer; padding: 6px 8px; }
.seg button[aria-pressed="true"] { background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--river); font-weight: 600; }
.seg button:focus-visible { outline: 2px solid var(--river); outline-offset: 1px; }
.keys-row { margin-top: 18px; }
.keys-row .btn { min-height: 44px; }
@media (hover: none) and (pointer: coarse) { .set-keys { display: none; } }
@media (max-width: 599px) {
  .keys { place-items: end stretch; padding: 0; }
  .keys-card { max-width: none; border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 88dvh; }
}
/* touch: every target at least 44px tall (2026-10-12 mobile pass) */
@media (pointer: coarse) {
  .listen-ch { min-height: 44px; }
  .linkbtn { min-height: 44px; display: inline-flex; align-items: center; }
  .tb-dot { height: 44px; }
  .shelf li a, .sources li a, .t-title a { display: inline-block; padding: 9px 0; }
  .shelf li, .sources li { margin-bottom: 2px; }
}
.listen-all .la-min::before { content: ' \00b7 '; }
@media (max-width: 479px) { .listen-all { width: 100%; justify-content: center; } .listen-all .la-min { display: block; font-size: .85em; opacity: .75; } .listen-all .la-min::before { content: none; } }
@media (pointer: coarse) { .tb-btn { min-height: 44px; } .tb-icon { width: 44px; } .lb-seek { min-height: 44px; } }
@media (pointer: coarse) { .gate-more summary, .sources summary, .foot-details summary { min-height: 44px; display: flex; align-items: center; } }

/* ---------- the reading bar (2026-10-12): one small bar at the bottom, every screen ---------- */
.rbar {
  position: fixed; z-index: 45; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%); width: min(560px, calc(100vw - 24px));
  display: flex; align-items: stretch; gap: 2px; padding: 5px;
  background: color-mix(in srgb, var(--paper-2) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.rbar.rb-away { transform: translate(-50%, calc(100% + 24px)); opacity: 0; pointer-events: none; }
body.listening .rbar, body.gated .rbar, body.lock .rbar { display: none; }
.rbar button { border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; border-radius: 13px; min-height: 48px; }
.rbar button:hover { background: var(--river-soft); }
.rbar button:focus-visible { outline: 2px solid var(--river); outline-offset: 1px; }
.rb-where { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 10px; text-align: left; }
.rb-where .ico { width: 20px; height: 20px; color: var(--river); }
.rb-text { display: grid; min-width: 0; line-height: 1.2; }
.rb-ch { font-family: var(--font-display); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-left { font-size: .78rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.rb-btn { flex: none; width: 56px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 4px 0; font-size: .7rem !important; color: var(--ink-2) !important; }
.rb-btn .ico { width: 20px; height: 20px; }
.rb-btn.rb-locked { opacity: .5; }
body:not(.gated) { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
body.listening .toast { bottom: 160px !important; }
@media (prefers-reduced-motion: reduce) { .rbar { transition: none; } }
/* a hair of progress across the very top on phones, where the dots bar steps aside for the reading bar */
.mprog { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 46; pointer-events: none; display: none; }
.mprog i { display: block; height: 100%; width: 0; background: var(--river); }
@media (max-width: 599px) {
  .topbar { display: none; }
  .mprog { display: block; top: env(safe-area-inset-top); }
  .rbar { bottom: 0; width: 100%; border-radius: 18px 18px 0 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .rbar.rb-away { transform: translate(-50%, 110%); }
  .rb-btn { width: 52px; }
  body:not(.gated) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
/* the chapter list */
.ch-sum { margin: 0 0 10px; color: var(--ink-2); font-size: .95rem; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ch-item { width: 100%; display: grid; grid-template-columns: 3.4em 1fr 1.4em; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 10px 8px; min-height: 56px; border-radius: 12px; cursor: pointer; }
.ch-item:hover, .ch-item:focus-visible { background: var(--river-soft); outline: none; }
.ch-item.here { background: var(--river-soft); box-shadow: inset 3px 0 0 var(--river); }
.ch-i-n { font-family: var(--font-display); font-size: .82rem; color: var(--river); letter-spacing: .02em; }
.ch-i-t { display: grid; min-width: 0; }
.ch-i-t b { font-family: var(--font-display); font-weight: 400; font-size: 1.08rem; }
.ch-i-t span { font-size: .8rem; color: var(--mute); }
.ch-i-mark { color: var(--river); text-align: center; }
body.listening { padding-bottom: 150px; }
body.lock .toast { bottom: auto !important; }
/* the grab handle that says "you can pull this down" (phones only) */
.grab { display: none; }
@media (max-width: 599px) {
  .grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 22%, transparent); margin: 8px auto 2px; flex: none; }
  .keys-card .grab { margin-top: -8px; margin-bottom: 8px; }
}
@media (max-width: 360px) { .rb-btn { width: 44px; } .rb-btn span { display: none; } .rb-where { padding: 4px 6px; gap: 8px; } }
@media (max-width: 360px) { .rb-ch { font-size: .95rem; } }
/* a question for you, at the end of each chapter (round 2, 2026-10-14). The same river rule as the promise on the opening. */
.ask { margin: 2.6rem 0 1.4rem; padding: 4px 0 4px 18px; border-left: 2px solid var(--river); max-width: 40rem; }
.ask-k { font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--river); margin: 0 0 8px; }
.ask-q { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.32; margin: 0 0 14px; text-wrap: pretty; max-width: 32ch; }
.ask-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ask-keep { font: inherit; font-size: .92rem; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--river); background: transparent; color: var(--river); cursor: pointer; }
.ask-keep:hover { background: var(--river-soft); }
.ask-keep:focus-visible { outline: 2px solid var(--river); outline-offset: 2px; }
.ask.kept .ask-keep { background: var(--river); color: var(--paper, #fff); }
.ask.kept .ask-keep::before { content: "\2713\00a0"; }
.ask-note { color: var(--mute); font-size: .85rem; font-style: italic; }
@media (pointer: coarse) { .ask-keep { min-height: 44px; } }
.kept-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; }
.kept-list li { padding-left: 16px; border-left: 2px solid var(--river); }
.kept-q { display: block; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.35; text-wrap: pretty; }
.kept-from { display: block; color: var(--mute); font-size: .82rem; margin-top: 3px; }
/* turning the page (round 3, 2026-10-14) */
.next-btn { font: inherit; color: var(--ink); text-align: left; display: grid; grid-template-columns: 1fr auto; column-gap: 18px; align-items: center; width: 100%; max-width: 30rem; padding: 16px 4px 16px 0; background: transparent; border: 0; border-top: 1px solid var(--river); border-radius: 0; cursor: pointer; }
.nx-k { grid-column: 1; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); font-variant-numeric: lining-nums; }
.nx-t { grid-column: 1; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; margin-top: 3px; text-wrap: balance; }
.nx-arrow { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; background: var(--river); -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat; transition: transform .25s var(--ease); }
.next-btn:hover .nx-t, .next-btn:focus-visible .nx-t { color: var(--river); }
.next-btn:hover .nx-arrow { transform: translateX(4px); }
.next-btn:focus-visible { outline: 2px solid var(--river); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .nx-arrow { transition: none; } }
.line-ask.in-ask { margin: 22px 0 4px; padding: 16px 0 0; border-bottom: 0; max-width: none; }
.ask-k2 { color: var(--mute); }
.in-ask .line-q { text-wrap: pretty; font-size: 1.12rem; }
.in-ask .caveat { font-size: .82rem; }
