/* site.css: the Source Map world, first draft (from the v3 sample's site.css). ONE document, two ways of showing it,
   chosen on <html data-view>:
     world  the edition's own elements placed in 3D by src/world.js (each .obj gets a matrix3d), over the three.js canvas
     text   the SAME elements as a plain semantic page (served this way, so it reads with no script at all)
   Colours and type come from brand.json through src/brand.css. System fonts only; nothing is loaded from elsewhere.
   World objects are drawn at 1:1 when the camera is at rest in front of them, so their text is the browser's own text,
   as sharp as any page. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--w-sky); color: var(--ink); font: 18px/1.55 var(--f-body); }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--w-accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: fixed; left: 8px; top: -80px; z-index: 100; background: var(--w-accent); color: var(--w-on-accent); font: 700 15px/1.2 var(--f-display);
  padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 8px; }
html[data-view="text"] .skip { display: none; }

/* ── shared pieces: stamps, the score, buttons ───────────────────────────────────────────────────────── */
.stamp { display: inline-block; font: 800 12px/1 var(--f-display); letter-spacing: .08em; padding: 5px 6px 4px; border-radius: 3px;
  border: 2px solid currentColor; transform: rotate(-4deg); align-self: start; justify-self: start; }
.stamp.saw { color: var(--p-saw-text); background: var(--p-saw); border-color: var(--p-saw-text); }
.stamp.stated { color: var(--p-stated); background: var(--p-paper); border-style: double; border-width: 4px; padding: 3px 5px 2px; }
/* INFER: our reasoning, never fetched: no fill, a dashed outline in the receipt's own ink, set level (not stamped on) */
.stamp.infer { color: var(--p-print2); background: var(--p-paper); border-style: dashed; transform: none; }
.read { display: inline-flex; align-items: center; gap: 5px; }
.clock { width: 11px; height: 11px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }

.score { margin: 16px 0 4px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 18px; align-items: center; }
.sc-total { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 4px; grid-row: span 2; }
.sc-big { font: 800 52px/.9 var(--f-display); color: var(--w-accent); }
.sc-of { font: 700 19px/1 var(--f-display); }
.sc-label { grid-column: 1 / -1; font: 700 11.5px/1.6 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.sc-rows { margin: 0; display: grid; gap: 3px; }
.sc-row { display: grid; grid-template-columns: 92px auto; align-items: center; gap: 8px; }
.sc-row dt { font: 700 11.5px/1.3 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.sc-row dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.cells { display: inline-flex; gap: 4px; }
.cells i { width: 18px; height: 12px; border-radius: 2px; border: 1.5px solid var(--ink2); opacity: .7; }
.cells i.on { background: var(--w-accent); border-color: var(--w-accent); opacity: 1; }
.sc-n { font: 600 12px/1 var(--f-display); color: var(--ink2); }
.sc-meas { grid-column: 1 / -1; font: 12.5px/1.45 var(--f-mono); color: var(--ink2); margin-top: 6px; }
.sc-how { grid-column: 1 / -1; font: 600 14px/1.4 var(--f-display); margin-top: 2px; }
.sc-how a { display: inline-block; padding: 8px 0; }

.btn { display: grid; gap: 2px; text-align: left; text-decoration: none; cursor: pointer; border-radius: 12px; padding: 11px 14px 10px;
  background: color-mix(in srgb, var(--w-sky) 70%, transparent); color: var(--w-ink); border: 1.5px solid color-mix(in srgb, var(--w-ink) 35%, transparent); }
.btn b { font: 800 17px/1.15 var(--f-display); }
.btn small { font: 600 13px/1.25 var(--f-display); color: var(--ink2); }
.btn:hover { border-color: var(--w-accent); }
.btn.primary { background: var(--w-accent); color: var(--w-on-accent); border-color: var(--w-accent); }
.btn.primary small { color: var(--w-on-accent); opacity: .82; }

/* ── the receipt: thermal paper, SAW filled, STATED double outlined ───────────────────────────────────── */
.receipt { background: var(--p-paper); color: var(--p-print); font: 13.5px/1.5 var(--f-mono); position: relative; }
.receipt::before, .receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: var(--p-paper);
  -webkit-mask: var(--zig) repeat-x; mask: var(--zig) repeat-x; }
.receipt::before { top: -7px; --zig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 8h12L6 0z'/%3E%3C/svg%3E"); }
.receipt::after { bottom: -7px; --zig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0h12L6 8z'/%3E%3C/svg%3E"); }
.r-title { margin: 0; }
.r-toggle { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; text-align: left;
  background: none; border: 0; padding: 14px 16px 12px; cursor: pointer; color: var(--p-print); font: 13.5px/1.35 var(--f-mono); border-radius: 4px; }
.r-toggle:focus-visible { outline: 3px solid var(--p-stated); outline-offset: -3px; }
.r-name { font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.r-counts { grid-column: 1; color: var(--p-print2); font-size: 12px; }   /* wraps rather than running under the button */
.r-act { grid-row: 1 / span 2; grid-column: 2; font: 800 13px/1 var(--f-display); background: var(--p-print); color: var(--p-paper); border-radius: 999px; padding: 9px 12px 8px; white-space: nowrap; }
.r-close { display: none; }
.receipt.is-open .r-open { display: none; } .receipt.is-open .r-close { display: inline; }
.receipt:not(.is-open) .slip { display: none; }
.slip { padding: 2px 16px 18px; }
.r-brand { text-align: center; font-weight: 700; font-size: 14px; letter-spacing: .28em; text-transform: uppercase; padding-top: 10px; border-top: 1px dashed var(--p-print2); }
.r-for { text-align: center; color: var(--p-print2); font-size: 12.5px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--p-print2); }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 10px; position: relative; }
.line .stamp { grid-row: 1 / span 3; }
.line .fact, .line .who, .line .read, .line .added, .line .corrected-at { grid-column: 2; }
.line .who, .line .read, .line .rests, .line .added, .line .corrected-at { font-size: 12px; line-height: 1.45; color: var(--p-print2); margin-top: 3px; }
.line .added, .line .corrected-at { font-weight: 700; }
.line .by { grid-column: 2; font-size: 12px; line-height: 1.45; color: var(--p-print2); }   /* credited to a key (signed contributions) */   /* a receipt added after the story was published, or corrected: when (decisions 50) */
.line .rests { grid-column: 2; }
.line .standing { grid-column: 2; font-size: 12px; line-height: 1.45; color: var(--p-print2); margin-top: 3px; }   /* how a re-read line stands (validation on every claim) */
.line .standing-changed, .line .standing-gone { font-weight: 700; color: var(--p-print); border-left: 3px solid currentColor; padding-left: 6px; }   /* loud, but under a correction's stamp */
.line.infer .fact { font-style: italic; }
.line.pointed { background: color-mix(in srgb, var(--p-saw) 45%, transparent); margin: -5px -8px; padding: 5px 8px; border-radius: 4px;
  box-shadow: inset 4px 0 0 var(--p-print); }
.line.unprinted .fact, .line.unprinted .who, .line.unprinted .read, .line.unprinted .rests { opacity: .16; }
.line.unprinted .stamp { opacity: .2; }
.line .tour-stamp { position: absolute; right: -6px; top: -8px; font: 800 13px/1 var(--f-display); letter-spacing: .06em; padding: 6px 8px 5px;
  border: 3px solid var(--p-stated); color: var(--p-stated); border-radius: 4px; transform: rotate(-7deg); background: color-mix(in srgb, var(--p-paper) 70%, transparent); }
.line .tour-stamp.saw { border-color: var(--p-saw-text); color: var(--p-saw-text); background: color-mix(in srgb, var(--p-saw) 60%, transparent); }
.line .tour-stamp.infer { border-style: dashed; }
.totals { margin: 14px 0 0; padding-top: 10px; border-top: 3px double var(--p-print2); display: grid; gap: 2px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt, .totals dd { margin: 0; }
.totals > div:not(.sub) { font-weight: 700; }
.totals .sub { color: var(--p-print2); padding-left: 2ch; }
.r-key { margin-top: 10px; font-size: 11.5px; color: var(--p-print2); }
.r-sources { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--p-print2); }
.r-sub { color: var(--p-print2); font-size: 12px; margin-bottom: 4px; }
.r-sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.r-sources a { color: var(--p-print); overflow-wrap: anywhere; text-decoration-color: var(--p-print2); text-decoration-thickness: 2px; display: inline-block; padding: 3px 0; }
html[data-view="text"] .r-sources { display: none; }
.r-page { margin: 10px 0 0; font-size: 13px; }
.r-page a { color: var(--p-print); text-decoration-color: var(--p-print2); text-decoration-thickness: 2px; display: inline-block; padding: 3px 0; }

/* ── doors: each source a doorway, labelled with where it goes ─────────────────────────────────────────── */
.doors { list-style: none; margin: 0; padding: 0; }
.door { display: grid; gap: 1px; text-decoration: none; color: var(--w-ink); }
.door-k { font: 700 11.5px/1.3 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--w-door); }
.door-new { font: 600 12px/1.3 var(--f-display); color: var(--ink2); }
.door-host { font: 800 20px/1.2 var(--f-display); color: var(--w-ink); }
.door-to { font: 12.5px/1.4 var(--f-mono); color: var(--ink2); overflow-wrap: anywhere; text-wrap: balance; }
.door-media { display: block; margin-top: 4px; font: 700 12px/1.3 var(--f-display); color: var(--w-ink); }   /* what the source leads to (decisions 50) */
.src-media { color: var(--p-print2); font-size: .92em; }

/* ═════════════════════════════════════ THE WORLD ══════════════════════════════════════════════════════ */
html[data-view="world"], html[data-view="world"] body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html[data-view="world"] body { position: fixed; inset: 0; }
html[data-view="world"] .stage { position: fixed; inset: 0; overflow: clip; touch-action: pinch-zoom; cursor: grab; user-select: none; -webkit-user-select: none;
  background: radial-gradient(120% 80% at 50% 40%, var(--w-sky2), var(--w-sky)); }
html[data-view="world"] .stage.dragging { cursor: grabbing; }
.gl { display: none; }
html[data-view="world"] .gl { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
html[data-view="world"] .viewport { position: absolute; inset: 0; overflow: clip; }
html[data-view="world"] .camera { position: absolute; left: 0; top: 0; transform-style: preserve-3d; pointer-events: none; }
/* the camera's own box is never a target, only what it carries: at rest the perspective is dropped, so its box (at the world's
   origin) can sort in front of a place BEHIND the origin, and the Earlier editions sign, the one place there, took no clicks
   (Stewart, 9 Oct; elementFromPoint gave the camera). Every object turns pointer events back on; a far one turns them off */
html[data-view="world"] .track, html[data-view="world"] .place, html[data-view="world"] .section, html[data-view="world"] .doors,
html[data-view="world"] .door-li, html[data-view="world"] .edition { position: absolute; left: 0; top: 0; width: 0; height: 0; margin: 0; padding: 0; transform-style: preserve-3d; }
html[data-view="world"] .obj { position: absolute; left: 0; top: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; margin: 0;
  transform-origin: 0 0; opacity: 0; zoom: var(--rz, 1); pointer-events: auto; }
/* --rz: world.js lays every object out at the device pixel ratio and scales it back in its 3D matrix, so its text is
   drawn at the screen's resolution while the camera moves (see rasterZoom in world.js) */
html[data-view="world"] .obj.far { pointer-events: none; }
/* the forest (F2a): a place that is not mounted keeps its box (so every measure stays true) but is not rendered, so it costs
   no composited layer and takes no focus (world.js, MOUNTING PER PLACE) */
html[data-view="world"] .obj.off-stage { visibility: hidden; }
/* until the layout is measured, the world shows only its sky: the objects appear in place, never in a heap */
html[data-view="world"]:not(.laid) .viewport { visibility: hidden; }

/* object widths: set by world.js for the screen (wide: side by side; narrow: stacked) */
:root { --bw: 550px; --cw: 380px; --mw: 640px; --hw: 380px; --sw: 520px; --ew: 560px; --aw: 420px; }
html[data-view="world"] .board { width: var(--bw); }
html[data-view="world"] .receipt, html[data-view="world"] .door { width: var(--cw); }
html[data-view="world"] .mast { width: var(--mw); }
html[data-view="world"] .how { width: var(--hw); }
html[data-view="world"] .sign { width: var(--sw); }
html[data-view="world"] .endcard { width: var(--ew); }
html[data-view="world"] .agents { width: var(--aw); }

/* a panel standing in the world */
html[data-view="world"] .board, html[data-view="world"] .how, html[data-view="world"] .sign, html[data-view="world"] .endcard,
html[data-view="world"] .agents {
  background: linear-gradient(180deg, var(--w-panel-top), var(--w-panel-bottom)); border: 1.5px solid rgba(108, 198, 220, .45); border-radius: 22px;
  padding: 26px 28px 24px; color: var(--w-ink); box-shadow: 0 34px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(169, 219, 232, .25); }
html[data-view="world"] .board::before, html[data-view="world"] .endcard::before { content: ""; position: absolute; left: 60px; right: 60px; top: -1px; height: 3px;
  background: linear-gradient(90deg, rgba(108, 198, 220, 0), rgba(169, 219, 232, .95), rgba(108, 198, 220, 0)); border-radius: 2px; }
.kicker { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.kicker .no { font: 800 22px/1 var(--f-display); color: var(--w-accent); }
.kicker .sec { font: 700 12.5px/1.3 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.tour-from, .story-play { margin-left: auto; font: 700 13px/1 var(--f-display); color: inherit; background: transparent; border: 1.5px solid rgba(159, 180, 182, .45); border-radius: 999px; padding: 10px 12px; min-height: 38px; cursor: pointer; }
.tour-btns { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tour-btns .tour-from, .tour-btns .story-play { margin-left: 0; font-size: 12px; padding: 8px 10px; min-height: 34px; }
.tour-from:hover, .story-play:hover { border-color: var(--w-accent); }
.headline { margin: 0 0 12px; font: 700 34px/1.08 var(--f-display); letter-spacing: -.01em; }
.place-link { color: inherit; text-decoration: none; }
.place-link:hover, .place-link:focus-visible { text-decoration: underline; text-decoration-color: var(--w-accent); text-decoration-thickness: 3px; }
.summary { font-size: 18px; line-height: 1.5; }
.trace { margin: 14px 0 0; display: grid; gap: 8px; }
.tr { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; }
.tr::before { content: ""; width: 11px; height: 11px; border-radius: 50%; margin-top: 6px; grid-row: span 2; }
.tr.origin::before { background: var(--w-origin); box-shadow: 0 0 0 3px rgba(240, 103, 159, .28); }
.tr.found::before { border: 2px solid var(--w-accent); }
.tr dt { font: 700 13.5px/1.3 var(--f-display); color: var(--ink2); }
.tr dd { margin: 0; font-size: 16px; line-height: 1.45; }
.why { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(159, 180, 182, .3); font-size: 16.5px; line-height: 1.5; }
.why-label { display: block; font: 700 13.5px/1.3 var(--f-display); color: var(--w-accent); margin-bottom: 2px; }
.tr.origin dt { color: var(--w-origin); }
html[data-view="world"] .story.here .board { border-color: rgba(108, 198, 220, .85); }
html[data-view="world"] .story.guided .board { box-shadow: 0 0 0 3px var(--w-accent), 0 34px 70px rgba(0, 0, 0, .5); }

/* the receipt object: a ticket from the printer above it; open, it prints out and hangs down in front of the doors */
html[data-view="world"] .receipt { box-shadow: 0 24px 50px rgba(0, 0, 0, .45); border-radius: 2px; }
html[data-view="world"] .receipt.is-open .slip { max-height: var(--slip-max, 560px); overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
html[data-view="world"] .receipt.is-open { box-shadow: 0 0 0 2px var(--w-accent), 0 30px 60px rgba(0, 0, 0, .55); }

/* the doors */
html[data-view="world"] .door { padding: 16px 20px 14px; border-radius: 120px 120px 14px 14px / 46px 46px 14px 14px; text-align: center; justify-items: center;
  background: radial-gradient(120% 90% at 50% 0%, rgba(243, 141, 181, .16), rgba(12, 31, 39, .94) 70%); border: 1.5px solid rgba(243, 141, 181, .7);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
html[data-view="world"] .door:hover, html[data-view="world"] .door:focus-visible { border-color: var(--w-accent); background: radial-gradient(120% 90% at 50% 0%, rgba(108, 198, 220, .28), rgba(12, 31, 39, .94) 70%); }
html[data-view="world"] .door:focus-visible { outline-offset: 5px; }
html[data-view="world"] .door.beckon { border-color: var(--w-accent); animation: beckon 2.4s ease-in-out infinite; }
@keyframes beckon { 0%, 100% { box-shadow: 0 0 0 3px rgba(108, 198, 220, .9), 0 0 26px 6px rgba(108, 198, 220, .35); } 50% { box-shadow: 0 0 0 3px rgba(108, 198, 220, .9), 0 0 44px 14px rgba(108, 198, 220, .55); } }
html[data-view="world"] .door .door-new { display: block; margin-bottom: 2px; }

/* the exhibit beside a narrated story: a real button over v2's diagram, opening the receipt at the claim it draws */
.emblem-btn { display: none; }
html[data-view="world"] .emblem-btn { display: block; background: transparent; border: 0; border-radius: 18px; padding: 0; cursor: pointer; }
html[data-view="world"] .emblem-btn:hover { box-shadow: inset 0 0 0 1.5px rgba(108, 198, 220, .5); }
html[data-view="world"] .emblem-btn:focus-visible { outline: 3px solid var(--w-accent); outline-offset: 2px; }
html[data-view="world"] .emblem-btn.off { visibility: hidden; }
/* section gates: their names written on the arch over the line */
html[data-view="world"] .gate { margin: 0; white-space: nowrap; text-align: center; padding: 0 30px; color: var(--w-ink);
  font: 800 64px/1 var(--f-display); letter-spacing: -.01em; text-shadow: 0 0 30px rgba(108, 198, 220, .35), 0 2px 0 rgba(6, 18, 23, .8); }
html[data-view="world"] .gate .gate-n { display: block; margin-top: 12px; font: 700 18px/1 var(--f-display); letter-spacing: .24em; text-transform: uppercase; color: var(--w-accent); }

/* the front of the edition: the masthead floats over the start of the line */
html[data-view="world"] .mast { color: var(--w-ink); text-shadow: 0 2px 18px rgba(6, 18, 23, .85); padding: 26px 28px 24px; border-radius: 28px;
  background: radial-gradient(130% 120% at 30% 35%, rgba(6, 18, 23, .82), rgba(6, 18, 23, .62) 60%, rgba(6, 18, 23, .25)); box-shadow: 0 0 90px 40px rgba(6, 18, 23, .45); }
.mast-sample { display: inline-block; font: 800 14px/1 var(--f-display); letter-spacing: .06em; color: var(--w-on-accent); background: var(--w-accent); border-radius: 4px; padding: 7px 9px 6px; text-shadow: none; }
.wordmark { margin: 14px 0 0; font: var(--f-wordmark-style) 104px/.9 var(--f-wordmark); font-stretch: condensed; letter-spacing: -.01em; white-space: nowrap; }
.wordmark::after { content: ""; display: inline-block; width: .15em; height: .15em; margin-left: .07em; border-radius: 50%; background: var(--w-origin);
  box-shadow: 0 0 0 .05em rgba(240, 103, 159, .3); vertical-align: .02em; }
.tagline { font: 400 30px/1.2 var(--f-body); margin-top: 12px; }
.dateline { font: 600 17px/1.4 var(--f-display); color: var(--ink2); margin-top: 16px; }
.dateline time { color: var(--w-ink); font-weight: 800; }
.dateline span { display: block; }
.byline { font: 600 17px/1.35 var(--f-display); margin-top: 6px; }
.mast .note { font-size: 15.5px; line-height: 1.5; color: var(--ink2); font-style: italic; margin-top: 4px; }   /* the edition's note (not the agent's) */
.way-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.hint { margin-top: 14px; font: 600 15px/1.45 var(--f-display); color: var(--w-accent); }
.how h2, .sign h2, .endcard h2, .agents h2 { margin: 0 0 12px; font: 800 24px/1.15 var(--f-display); }
.promise { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: p; }
.promise li { position: relative; padding-left: 30px; font-size: 15.5px; line-height: 1.45; color: var(--ink2); counter-increment: p; }
.promise li::before { content: counter(p); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font: 800 12px/1 var(--f-display); color: var(--w-on-accent); background: var(--w-accent); }
.promise li:last-child::before { background: var(--w-origin); }
.promise b { color: var(--w-ink); font: 700 15.5px/1.35 var(--f-display); }
.how-h3 { margin: 0 0 10px; padding-top: 12px; border-top: 1px solid rgba(159, 180, 182, .3); font: 700 15px/1.3 var(--f-display); letter-spacing: .02em; }
.hb-tip { text-decoration: none; display: inline-flex; align-items: center; }
.btn.tip { border-color: rgba(240, 103, 159, .6); }
.legend { margin: 0; display: grid; gap: 8px; }
.legend > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: baseline; gap: 12px; }
.legend dt { margin: 0; } .legend dd { margin: 0; font-size: 15.5px; line-height: 1.45; color: var(--ink2); }
.legend .read { font: 13px/1 var(--f-mono); color: var(--ink2); }
.how-doors { margin-top: 12px; font-size: 15.5px; line-height: 1.45; color: var(--ink2); }
.rubric { margin-top: 12px; border: 1px solid rgba(159, 180, 182, .35); border-radius: 10px; padding: 8px 12px; }
.rubric summary { font: 700 15px/1.4 var(--f-display); cursor: pointer; }
.rubric pre { white-space: pre-wrap; font: 12px/1.5 var(--f-mono); margin: 8px 0 0; overflow-wrap: anywhere; }
.sign p + p, .endcard p + p, .agents p + p { margin-top: 10px; }
.sign p, .endcard p, .agents p { font-size: 16px; line-height: 1.5; }
.agents p { font-size: 14.5px; }
.fine { color: var(--ink2); font-size: 14px !important; margin-top: 14px; }
html[data-view="world"] .earlier .sign { background: linear-gradient(180deg, #0C1D25, #08161B); border-color: rgba(159, 180, 182, .45); }
/* the forest (F2a): an earlier edition's front is a sign lit like a board (a place to read, unlike the earlier sign, which
   only points back); the earlier sign lists the editions behind; an earlier edition's stories carry its date in the kicker */
html[data-view="world"] .edition-front .sign::before { content: ""; position: absolute; left: 60px; right: 60px; top: -1px; height: 3px;
  background: linear-gradient(90deg, rgba(108, 198, 220, 0), rgba(169, 219, 232, .95), rgba(108, 198, 220, 0)); border-radius: 2px; }
.edition-front .sign h2 { font: 800 30px/1.1 var(--f-display); letter-spacing: -.01em; margin-bottom: 4px; }
.edition-front .dateline { margin: 0 0 10px; }
.edition-front .sign .note { font-size: 15.5px; line-height: 1.5; color: var(--ink2); font-style: italic; }
.earlier-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.earlier-list li { font-size: 16px; line-height: 1.45; padding: 2px 0 2px 14px; border-left: 3px solid var(--w-accent); }
.earlier-list a[data-go] { font: 800 17px/1.3 var(--f-display); }
.kicker .sec.ed { color: var(--w-accent); border: 1.5px solid currentColor; border-radius: 4px; padding: 3px 6px 2px; letter-spacing: .08em; }

/* ── the HUD: the brand, the way round, the tour, the map ─────────────────────────────────────────────── */
.hud { display: none; }
html[data-view="world"] .hud { display: flex; position: fixed; z-index: 20; left: 0; right: 0; align-items: center; gap: 12px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { top: 0; padding: 12px 16px; justify-content: space-between; background: linear-gradient(180deg, rgba(6, 18, 23, .82), rgba(6, 18, 23, 0)); }
.hud-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hud-word { font: var(--f-wordmark-style) 25px/1 var(--f-wordmark); font-stretch: condensed; color: var(--w-ink); text-decoration: none; white-space: nowrap; }
.hud-word::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: var(--w-origin); vertical-align: 1px; }
.pill { font: 800 12.5px/1 var(--f-display); color: var(--w-accent); border: 2px solid currentColor; border-radius: 4px; padding: 5px 7px 4px; white-space: nowrap; }
.hud-nav { display: flex; gap: 8px; }
.hb { font: 700 14px/1 var(--f-display); color: var(--w-ink); background: rgba(12, 31, 39, .75); border: 1.5px solid rgba(226, 236, 233, .32);
  border-radius: 999px; padding: 10px 14px; cursor: pointer; white-space: nowrap; min-height: 40px; }
.hb:hover { border-color: var(--w-accent); }
.hb[aria-pressed="true"], .hb[aria-expanded="true"] { background: var(--w-accent); color: var(--w-on-accent); border-color: var(--w-accent); }
.hb-world { display: none; }
html[data-view="text"] .hb-detail { display: none; }
.hb-theme { display: none; }
html[data-view="text"] .hb-theme { display: inline-block; }
@media (max-width: 899px) { .hb-detail { display: none; } }
html[data-view="text"] .hb-world { display: inline-block; }
html[data-view="text"] .hb-text { display: none; }
.hud-bottom { bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); justify-content: center; background: linear-gradient(0deg, rgba(6, 18, 23, .8), rgba(6, 18, 23, 0)); }
.where { font: 700 14px/1.3 var(--f-display); color: var(--w-ink); text-align: center; min-width: 0; flex: 0 1 520px; text-shadow: 0 1px 8px rgba(6, 18, 23, .9); }
.where b { color: var(--w-accent); }
.step { flex: none; }
.captions { display: none; }
html[data-view="world"] .captions.on, html[data-view="text"] .captions.on { display: block; position: fixed; z-index: 21; left: 50%; bottom: 148px; transform: translateX(-50%); width: min(86vw, 900px); text-align: center; pointer-events: none; }
.captions span { font: 700 clamp(17px, 2vw, 26px)/1.35 var(--f-display); color: var(--w-ink); background: rgba(6, 18, 23, .82); padding: .12em .45em; border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.captions span:empty { display: none; }
.tourbar { position: fixed; z-index: 22; left: 50%; bottom: 72px; transform: translateX(-50%); width: min(760px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px;
  background: rgba(12, 31, 39, .92); border: 1.5px solid rgba(108, 198, 220, .45); border-radius: 16px; padding: 8px 10px; color: var(--w-ink); }
.tourbar[hidden] { display: none; }
.tourbar button { font: 800 14px/1 var(--f-display); border-radius: 999px; padding: 9px 14px; cursor: pointer; white-space: nowrap; min-height: 38px; }
.pp { background: var(--w-accent); color: var(--w-on-accent); border: 0; min-width: 78px; }
.cc, .leave { background: transparent; color: var(--w-ink); border: 1.5px solid rgba(226, 236, 233, .32); }
.cc[aria-pressed="false"] { text-decoration: line-through; color: var(--ink2); }
.time { font: 600 13px/1 var(--f-mono); color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.scrub-wrap { position: relative; flex: 1; min-width: 60px; height: 32px; display: flex; align-items: center; }
.scrub-wrap input { width: 100%; margin: 0; accent-color: var(--w-accent); position: relative; z-index: 2; background: transparent; }
.ticks { position: absolute; left: 8px; right: 8px; top: 2px; height: 6px; z-index: 1; }
.ticks i { position: absolute; top: 0; width: 2px; height: 7px; background: var(--ink2); opacity: .6; transform: translateX(-1px); }
.ticks i.narrated { height: 9px; width: 3px; background: var(--w-accent); opacity: 1; }
.big-tap { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; gap: 4px; justify-items: center; cursor: pointer;
  background: var(--w-accent); color: var(--w-on-accent); border: 0; border-radius: 16px; padding: 20px 28px; box-shadow: 0 16px 50px rgba(0, 0, 0, .55); }
.big-tap b { font: 800 21px/1.15 var(--f-display); } .big-tap small { font: 600 14px/1.2 var(--f-display); }
.big-tap[hidden] { display: none; }
.notice { position: fixed; z-index: 25; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: min(640px, calc(100vw - 24px)); font: 600 14.5px/1.4 var(--f-display);
  color: var(--w-ink); background: rgba(12, 31, 39, .94); border: 1px solid rgba(226, 236, 233, .3); border-radius: 10px; padding: 10px 14px; }
.notice[hidden] { display: none; }
.notice button { margin-left: 10px; font: 800 13px/1 var(--f-display); background: var(--w-accent); color: var(--w-on-accent); border: 0; border-radius: 999px; padding: 7px 11px; cursor: pointer; }

/* the map: the whole line, from above */
.map { position: fixed; z-index: 24; top: 64px; left: 12px; bottom: 76px; width: min(500px, calc(100vw - 24px)); overflow: auto; overscroll-behavior: contain;
  background: var(--page); border: 1.5px solid rgba(108, 198, 220, .45); border-radius: 18px; padding: 18px 18px 14px; color: var(--w-ink); }
.map[hidden] { display: none; }
.map-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.map h2 { margin: 0; font: 800 22px/1.1 var(--f-display); }
.map-close { font: 700 13.5px/1 var(--f-display); color: var(--w-ink); background: transparent; border: 1.5px solid rgba(226, 236, 233, .35); border-radius: 999px; padding: 9px 12px; cursor: pointer; }
.map-sub { font: 500 13.5px/1.4 var(--f-display); color: var(--ink2); margin: 4px 0 8px; }
.map-line { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.map-line::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(159, 180, 182, .25) 0, rgba(159, 180, 182, .25) 8%, var(--w-accent) 14%, var(--w-accent) 100%); }
.map-line a { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; align-items: center; gap: 1px 10px; padding: 5px 8px 5px 0; min-height: 38px; color: var(--w-ink);
  text-decoration: none; border-radius: 10px; position: relative; }
.map-line a:hover { background: rgba(108, 198, 220, .1); }
.map-line a[aria-current="location"] { background: rgba(108, 198, 220, .18); box-shadow: inset 3px 0 0 var(--w-accent); }
.m-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--w-accent); border: 3px solid var(--page); justify-self: center; z-index: 1; }
.m-earlier .m-dot { background: var(--w-unlit); }
.m-no { font: 800 13px/1 var(--f-display); color: var(--w-accent); white-space: nowrap; }
.m-t { font: 700 14.5px/1.2 var(--f-display); }
.m-s { grid-column: 3; font: 500 13px/1.3 var(--f-display); color: var(--ink2); }
.m-earlier a, .m-arrival a, .m-end a, .m-front a { grid-template-columns: 22px minmax(0, 1fr); }
.m-earlier .m-s, .m-arrival .m-s, .m-end .m-s, .m-front .m-s { grid-column: 2; }
.m-score { font: 800 16px/1 var(--f-display); color: var(--w-on-accent); background: var(--w-accent); border-radius: 7px; padding: 5px 6px 4px; white-space: nowrap; }
.m-score small { font-size: 10px; opacity: .75; }
.m-section { padding: 8px 0 2px 34px; font: 700 12px/1.3 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.map-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(159, 180, 182, .25); font: 700 13px/1 var(--f-display); color: var(--ink2); }
.map-detail button { font: 700 13px/1 var(--f-display); color: var(--w-ink); background: transparent; border: 1.5px solid rgba(226, 236, 233, .35); border-radius: 999px; padding: 8px 11px; cursor: pointer; }
.detail-auto { flex-basis: 100%; font-weight: 500; }
.map-detail button[aria-pressed="true"] { background: var(--w-accent); color: var(--w-on-accent); border-color: var(--w-accent); }
html[data-view="text"] .map-detail { display: none; }

/* the agent session strip: the person is in charge */
/* top right on wider screens, clear of the map (left), the tour bar and the captions (bottom) */
.agent-strip { position: fixed; right: 12px; top: 66px; z-index: 40; max-width: min(560px, calc(100vw - 24px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 10px 14px; background: var(--w-ink); color: #08171D; padding: 12px 14px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); font: 500 15px/1.35 var(--f-display); }
.agent-strip[hidden] { display: none; }
.agent-strip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--p-stated); }
.strip-why { font: italic 400 15px/1.4 var(--f-body); margin-top: 3px; }
.strip-why .who { font: 600 14px var(--f-display); font-style: normal; opacity: .75; }
.strip-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.agent-strip button { font: 700 14px/1 var(--f-display); border-radius: 8px; padding: 10px 12px; cursor: pointer; white-space: nowrap; min-height: 38px; }
.agent-strip .end { background: #08171D; color: var(--w-ink); border: 0; }
.agent-strip .take { background: transparent; color: #08171D; border: 1.5px solid rgba(8, 23, 29, .5); }
.agent-strip .tap-sound { background: var(--w-accent); color: var(--w-on-accent); border: 0; }
.agent-strip.ended .dot { background: #6B7F85; }
.agent-strip.ended .strip-actions, .agent-strip.ended .strip-why { display: none; }
.agent-strip.collapsed { grid-template-columns: auto auto; padding: 8px 12px; border-radius: 999px; font-size: 13px; }
.agent-strip :focus-visible { outline-color: #08171D; }
/* (forest F5.1) a queue the agent plays: the whole list from the start, what is on now and what is next, with Skip, Stop and
   Resume. Every line is one line high and the list scrolls, so the strip keeps one height while the queue plays and the frames
   measured below it (world.js insets) do not move. The status line steps aside while it shows (the person was told on joining).
   It keeps to 560px: its one line rows would otherwise widen the strip to its widest, over the text view's column */
.strip-queue { grid-column: 1 / -1; min-width: 0; max-width: 560px; border-top: 1px solid rgba(8, 23, 29, .2); padding-top: 6px; }
.strip-queue[hidden], .agent-strip.ended .strip-queue { display: none; }
.agent-strip.queuing .strip-status { display: none; }
.q-head, .q-now, .q-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-head { font: 700 13.5px/1.35 var(--f-display); }
.q-now { font: 500 13.5px/1.35 var(--f-display); }
.q-now .q-in { opacity: .7; }
.q-list { margin: 3px 0 3px 1.7em; padding: 0; max-height: calc(4 * 1.35em); overflow-y: auto; font: 400 13px/1.35 var(--f-body); }
.q-list li { opacity: .72; }
.q-list li.done { opacity: .5; }
.q-list li[aria-current] { opacity: 1; font-weight: 700; }
.q-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.agent-strip .q-acts button { padding: 6px 10px; min-height: 30px; font-size: 13px; background: transparent; color: #08171D; border: 1.5px solid rgba(8, 23, 29, .5); }
.agent-strip .q-acts .q-stop { background: #08171D; color: var(--w-ink); border: 0; }
/* on a phone the list is three lines, and while a narrated step tours (the strip then stands at the top) only the line now */
@media (max-width: 699px) { .q-list { max-height: calc(3 * 1.35em); } body.touring .strip-queue .q-list { display: none; } }
/* on wide screens the strip is one wide row, so the agent's note takes one or two lines and the strip takes as little of
   the frame as it can (the frames are measured below it) */
@media (min-width: 900px) {
  .agent-strip { max-width: min(900px, calc(100vw - 24px)); padding: 10px 14px; }
}
/* and on screens wide enough, it sits IN the top bar, in the free middle between the brand and the buttons (the detail
   and tip buttons step aside while a session runs; both are also in the map and at the end), so it takes next to no
   height from the frame (acceptance, 7 Oct 2026) */
@media (min-width: 1200px) {
  body.in-session .hud-nav .hb-detail, body.in-session .hud-nav .hb-tip { display: none; }
  html[data-view="world"] .agent-strip { top: 6px; left: 400px; right: 300px; max-width: none; padding: 6px 10px; gap: 2px 10px; border-radius: 12px; font-size: 13.5px; }
  html[data-view="world"] .agent-strip .strip-status { font-size: 13px; line-height: 1.3; }
  html[data-view="world"] .strip-why { font-size: 13.5px; line-height: 1.32; margin-top: 1px; }
  html[data-view="world"] .agent-strip button { padding: 7px 10px; min-height: 32px; font-size: 13px; }
  html[data-view="world"] .agent-strip.collapsed { left: auto; right: 300px; }
  /* with a tour, the top bar also holds the tour's Pause or Resume and Mute: the strip stops short of them (measured 7 Oct:
     at 300px the tour button sat under the strip at 1200, 1440 and 1920 px wide) */
  html[data-tour="on"][data-view="world"] .agent-strip { right: 372px; }
  html[data-tour="on"][data-view="world"] .agent-strip.collapsed { right: 372px; }
  /* in the bar, the agent's note takes the status line's place while there is one (the person was told on joining what
     the assistant can see; the dot and the two buttons stay), so the strip stays within the bar's height */
  html[data-view="world"] .agent-strip.has-note .strip-status { display: none; }
}

/* phones and narrow screens */
@media (max-width: 699px) {
  .hud-top { padding: 8px 10px 10px; gap: 6px 8px; flex-wrap: wrap; background: var(--w-sky); border-bottom: 1px solid rgba(159, 180, 182, .2); }
  html[data-view="world"] .mast { background: rgba(8, 23, 29, .94); box-shadow: 0 0 60px 30px rgba(6, 18, 23, .6); }
  .notice { bottom: 70px; }
  .hud-word { font-size: 20px; }
  .pill { font-size: 11px; padding: 4px 5px 3px; }
  .hud-nav { gap: 6px; }
  .hb { padding: 9px 11px; font-size: 13.5px; min-height: 40px; }
  .hud-bottom { padding: 10px 10px calc(8px + env(safe-area-inset-bottom)); gap: 8px; background: var(--w-sky); border-top: 1px solid rgba(159, 180, 182, .2); }
  .where .w-h { display: none; }
  .where { font-size: 13px; }
  .map { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 46vh; border-radius: 18px 18px 0 0; padding: 12px 14px 10px; }
  .map h2 { font-size: 19px; } .map-sub { font-size: 12.5px; margin: 2px 0 6px; } .map-line a { min-height: 34px; padding: 3px 6px 3px 0; } .m-t { font-size: 14px; }
  .tourbar { bottom: 62px; flex-wrap: wrap; } .scrub-wrap { order: 5; flex-basis: 100%; }
  .captions.on { bottom: 212px !important; }
  .agent-strip { left: 8px; right: 8px; top: auto; bottom: 64px; max-width: none; grid-template-columns: auto minmax(0, 1fr); }
  /* the front page on a phone: the ways in come before the edition's note, so they are on screen on arrival however long
     the note is (acceptance, 7 Oct 2026); the page's own order, for the text view and assistive technology, is unchanged */
  html[data-view="world"] .mast { display: flex; flex-direction: column; align-items: flex-start; }
  html[data-view="world"] .mast > * { align-self: stretch; }
  html[data-view="world"] .mast > .mast-sample { align-self: flex-start; }
  html[data-view="world"] .mast .way-in { order: 1; } html[data-view="world"] .mast .hint { order: 2; } html[data-view="world"] .mast .note { order: 3; }
  body.map-open .agent-strip, body.touring .agent-strip { top: 100px; bottom: auto; }
  .strip-actions { grid-column: 1 / -1; }
  .agent-strip.collapsed { right: auto; }
  .wordmark { font-size: 58px; } .tagline { font-size: 23px; }
  .way-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .btn { padding: 9px 11px 8px; } .btn b { font-size: 15px; } .btn small { font-size: 12px; }
  .headline { font-size: 28px; } .summary { font-size: 17px; }
  html[data-view="world"] .board, html[data-view="world"] .how, html[data-view="world"] .sign, html[data-view="world"] .endcard,
  html[data-view="world"] .agents { padding: 20px 18px 18px; border-radius: 18px; }
  html[data-view="world"] .gate { font-size: 40px; }
}
@media (max-width: 380px) { .pill { display: none; } }
@media (max-width: 899px) { html[data-view="world"] .hb-tip { display: none; } }

/* ═════════════════════════════════════ THE TEXT VIEW ═══════════════════════════════════════════════════
   The same elements, as a plain page. No 3D, no canvas, nothing moves. */
html[data-view="text"] body { background: var(--page); --gutter: 16px; --wide: 1240px; }
@media (min-width: 760px) { html[data-view="text"] body { --gutter: 32px; } }
html[data-view="text"] .hud-top { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px var(--gutter); background: color-mix(in srgb, var(--page) 94%, transparent); border-bottom: 1px solid var(--rule); }
html[data-view="text"] .hud-top .hb { background: transparent; }
html[data-view="text"] .hud-nav { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 699px) { html[data-view="text"] .hud-top { padding: 8px 12px; } html[data-view="text"] .hud-nav { justify-content: flex-start; } }
html[data-view="text"] .obj { transform: none !important; opacity: 1 !important; visibility: visible !important; }
html[data-view="text"] .viewport, html[data-view="text"] .camera { transform: none !important; perspective: none !important; width: auto !important; height: auto !important; }
html[data-view="text"] .hud-top .hb[aria-pressed="true"], html[data-view="text"] .hud-top .hb[aria-expanded="true"] { background: var(--w-accent); color: var(--w-on-accent); }
html[data-view="text"] .track { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 80px; display: block; }
html[data-view="text"] .arrival { display: grid; gap: 28px 56px; padding: 34px 0 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { html[data-view="text"] .arrival { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
html[data-view="text"] .wordmark { font-size: clamp(56px, 8vw, 110px); }
html[data-view="text"] .how { background: var(--page2); border: 1px solid var(--rule); border-radius: 12px; padding: 20px; }
html[data-view="text"] .hint { display: none; }
html[data-view="text"] .way-in { max-width: 560px; }
html[data-view="text"] .way-in [data-act="view"] { display: none; }
html[data-view="text"] .gate { margin: 64px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--ink); font: 800 clamp(36px, 6vw, 72px)/.98 var(--f-display); letter-spacing: -.02em;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 24px; }
html[data-view="text"] .gate-n { font: 600 17px/1 var(--f-display); color: var(--ink2); }
html[data-view="text"] .story { display: grid; gap: 22px 64px; padding: 44px 0 16px; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { html[data-view="text"] .story { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  html[data-view="text"] .story .receipt, html[data-view="text"] .story .doors { grid-column: 2; }
  html[data-view="text"] .story .board { grid-row: 1 / span 2; } }
html[data-view="text"] .board { max-width: 700px; }
html[data-view="text"] .headline { font-size: clamp(28px, 3.6vw, 44px); }
html[data-view="text"] .summary { font-size: 19px; }
html[data-view="text"] .receipt { margin: 8px 0 0; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .3)); max-width: 460px; }
html[data-view="text"] .doors { display: grid; gap: 8px; max-width: 460px; }
html[data-view="text"] .doors::before { content: "Sources"; font: 700 13px/1.3 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
html[data-view="text"] .door { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--page2); }
html[data-view="text"] .door:hover { border-color: var(--link); }
html[data-view="text"] .door-host { font-size: 17px; color: var(--link); text-decoration: underline; text-underline-offset: .18em; }
html[data-view="text"] .story.guided .board { box-shadow: -14px 0 0 -10px var(--w-accent); }
html[data-view="text"] .story.here .headline { color: var(--w-accent); }
html[data-view="text"] .door.beckon { border-color: var(--w-accent); box-shadow: 0 0 0 2px var(--w-accent); }
html[data-view="text"] .earlier, html[data-view="text"] .end { display: grid; gap: 22px 40px; padding: 48px 0 0; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { html[data-view="text"] .end { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
html[data-view="text"] .sign, html[data-view="text"] .endcard, html[data-view="text"] .agents { background: var(--page2); border: 1px solid var(--rule); border-radius: 12px; padding: 22px; }
/* the forest (F2a): each earlier edition opens with its own front, after the earlier sign */
html[data-view="text"] .edition-front { display: grid; padding: 72px 0 0; grid-template-columns: minmax(0, 1fr); }
html[data-view="text"] .edition-front .sign, html[data-view="text"] .edition + .earlier .sign { max-width: 760px; }
html[data-view="text"] .kicker .sec.ed { color: var(--accent); }
html[data-view="text"] .earlier-list li { border-left-color: var(--accent); }
html[data-view="text"] .captions.on { bottom: 84px; }
html[data-view="text"] .tourbar { bottom: 16px; }
html[data-view="text"] .map { top: 70px; bottom: 16px; }
html[data-view="text"] .agent-strip { top: 70px; }
html[data-view="text"] .notice { top: 76px; bottom: auto; }
/* the text view's colours follow its own tokens (dark by default, light by choice) */
html[data-view="text"] .kicker .no, html[data-view="text"] .sc-big, html[data-view="text"] .why-label, html[data-view="text"] .story.here .headline,
html[data-view="text"] .pill { color: var(--accent); }
html[data-view="text"] .cells i.on, html[data-view="text"] .tr.origin::before { background: var(--accent); border-color: var(--accent); }
html[data-view="text"] .tr.found::before { border-color: var(--accent); }
html[data-view="text"] .hud-word, html[data-view="text"] .hb, html[data-view="text"] .door { color: var(--ink); }
html[data-view="text"] .hb { border-color: var(--rule); }
html[data-view="text"] .door-k { color: var(--ink2); }
html[data-view="text"] .btn { background: var(--page2); color: var(--ink); border-color: var(--rule); }
html[data-view="text"] .btn.primary { background: var(--button); color: var(--button-text); border-color: var(--button); }
html[data-view="text"] .btn.primary small { color: inherit; opacity: .8; }
html[data-view="text"] .tour-from, html[data-view="text"] .story-play { border-color: var(--rule); }
@media (prefers-reduced-motion: reduce) { html[data-view="world"] .door.beckon { animation: none; box-shadow: 0 0 0 4px var(--w-accent); } }

/* the text view: the promise and the tip link read in its own colours */
html[data-view="text"] .promise li { color: var(--ink2); }
html[data-view="text"] .promise b { color: var(--ink); }
html[data-view="text"] .promise li::before { background: var(--accent); color: var(--page); }
html[data-view="text"] .promise li:last-child::before { background: var(--origin); }
html[data-view="text"] .tr.origin::before { background: var(--origin); border-color: var(--origin); box-shadow: none; }
html[data-view="text"] .tr.origin dt { color: var(--origin); }
html[data-view="text"] .how-h3 { border-top-color: var(--rule); }
html[data-view="text"] .wordmark::after, html[data-view="text"] .hud-word::after { background: var(--origin); }
html[data-view="text"] .mast-sample { background: var(--accent); color: var(--page); }
/* a deep link in the text view lands below the sticky header, which wraps to two rows on a phone */
/* (forest F5.1) and while a queue plays, below the agent's strip when it stands at the top (app.js sets --strip-b; never a selector
   on the style attribute: world.js writes inline styles every frame, and such a selector made every frame several times slower) */
html[data-view="text"] .place, html[data-view="text"] #how, html[data-view="text"] .receipt { scroll-margin-top: max(76px, var(--strip-b, 0px)); }
@media (max-width: 699px) {
  html[data-view="text"] .hb-tip { display: none; }
  html[data-view="text"] .place, html[data-view="text"] #how, html[data-view="text"] .receipt { scroll-margin-top: max(146px, var(--strip-b, 0px)); }
}
/* the consent step before an agent session connects (both views) */
.consent { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(6, 18, 23, .86); overflow: auto; }
.consent[hidden] { display: none; }
.consent-card { width: min(560px, 100%); background: var(--w-panel-top); color: var(--w-ink); border: 1px solid var(--w-contour); border-radius: 18px; padding: 22px 22px 20px; box-shadow: 0 18px 60px rgba(0, 0, 0, .45); }
.consent-card h2 { margin: 0 0 10px; font: 800 22px/1.2 var(--f-display); }
.consent-card h2:focus:not(:focus-visible) { outline: none; }
.consent-card p, .consent-card li { font: 400 16px/1.5 var(--f-body); margin: 0 0 8px; }
.consent-card ul { margin: 0 0 10px; padding-left: 20px; }
.consent-sub { color: var(--w-ink-dim); }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.consent-actions .btn { background: transparent; color: var(--w-ink); border: 1.5px solid var(--w-contour); }
.consent-actions .btn.primary { background: var(--w-accent); color: var(--w-on-accent); border-color: var(--w-accent); }
html[data-view="text"] .consent-card { background: var(--page2); color: var(--ink); border-color: var(--rule); }
html[data-view="text"] .consent-sub { color: var(--ink2); }
html[data-view="text"] .consent-actions .btn { color: var(--ink); border-color: var(--rule); }
html[data-view="text"] .consent-actions .btn.primary { background: var(--button); color: var(--button-text); border-color: var(--button); }
@media (max-width: 420px) { .consent-actions { grid-template-columns: 1fr; } .consent-card h2 { font-size: 20px; } }
/* the record's faces (forest step F2b.2; the forest design decision 7): what was corrected, and a withdrawal with its reason,
   said first, under the headline, in the world and the text view alike */
.stamp-corrected { color: var(--w-ink); background: var(--accent, #6cc6dc); border-color: currentColor; margin-left: 8px; }
.stamp-withdrawn { color: var(--w-ink); border-color: currentColor; margin-left: 8px; }
.correction, .withdrawn-band { font-weight: 600; border-left: 4px solid currentColor; padding: 6px 10px; margin: 8px 0 4px; }
.withdrawn-band { opacity: 1; }
.story.withdrawn .summary, .story.withdrawn .score { opacity: .55; }
/* (forest F5.2, F5.3) the top bar's Latest, in the world view only (the text view lists the newest day first already), and a story's
   thread row; with no session the strip shows the person's own queue alone (.own: no session's words or buttons), at the top right
   under the bar, where it stands outside a session's own place in the bar; and a session's strip in the bar stops short of Latest */
.hb-latest { display: none; }
html[data-view="world"] .hb-latest { display: inline-block; }
.tr.thread::before { border: 2px solid var(--w-origin); }
.tr.thread .follow { font-weight: 700; white-space: nowrap; }
.agent-strip.own > .dot, .agent-strip.own > .strip-body, .agent-strip.own > .strip-actions { display: none; }
@media (min-width: 1200px) { html[data-view="world"] .agent-strip.own { top: 66px; left: auto; right: 12px; max-width: min(560px, calc(100vw - 24px)); }
  html[data-tour="on"][data-view="world"] .agent-strip.by-latest:not(.own) { right: 450px; } }
/* (R4's preparation 2) the queue strip: a gap's line is seen with its seconds first, and the line beside it, read out once, says it
   without the count; while a clip plays the strip owns pause and resume, so the player shows only the clip's own time and Captions; on
   a phone nothing in the strip is cut (it wraps; its line now keeps two lines and its list three, whole headlines only, so the strip
   keeps one height for the whole queue), it stays at the bottom whatever the step (no player there during a queue's clip, whose
   captions stand just above it: app.js sets --q-cap), and a session's dot and buttons share a line while a queue plays with no note.
   Follow this thread at the end of a shares row reads as it does in a thread row. A day held as rows: each row a compact line of a
   list, its headline smaller than a board's (the text view, the page as served) */
#queue-strip[data-phase="gap"] .q-say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#queue-strip[data-phase="gap"] .q-in { opacity: 1; }
body.q-clip .tourbar { width: auto; }
body.q-clip .tourbar .pp, body.q-clip .tourbar .scrub-wrap, body.q-clip .tourbar .leave { display: none; }
html[data-view="text"] .story.stub { padding: 7px 0 6px; gap: 0; }
html[data-view="text"] .story.stub .kicker { margin-bottom: 2px; gap: 2px 8px; }
html[data-view="text"] .story.stub .kicker .no { font-size: 15px; }
html[data-view="text"] .story.stub .headline { font-size: 19px; line-height: 1.25; margin: 0 0 2px; }
html[data-view="text"] .stub-meta { font: 600 13.5px/1.35 var(--f-display); color: var(--ink2); }
.tr.shares .follow { font-weight: 700; white-space: nowrap; }
.agent-strip.own .strip-queue { border-top: 0; padding-top: 0; }
@media (max-width: 699px) {
  html[data-view="text"] .story.stub .headline { font-size: 17px; }
  .q-head, .q-now, .q-list li { white-space: normal; overflow: visible; text-overflow: clip; }
  .q-now { min-height: calc(2 * 1.35em); }
  .q-list { height: calc(3 * 1.35em); max-height: none; overflow: hidden; }
  .q-list li.q-off { opacity: 0; }
  .agent-strip.queuing:not(.has-note) > .strip-body { display: none; }
  .agent-strip.queuing:not(.has-note) > .strip-actions { grid-column: 2; }
  body.q-clip .captions.on { bottom: var(--q-cap, 212px) !important; }
}
/* (R4's preparation 3) on a phone a queue's clip shows its captions in the strip, in the two lines its line keeps (app.js, qCap), and
   none over the board; the line's own words step aside while the clip plays (still read out). The panel's own words for what an agent
   did, when it gives no reason, stand upright with no label (only the agent's own words are italic, under its label). With no session
   the strip keeps one width at 1,200 px and wider, whichever headline is bold */
.strip-why.did { font-style: normal; }
@media (min-width: 1200px) { .agent-strip.own { width: min(560px, calc(100vw - 24px)); } }
@media (max-width: 699px) {
  html body.q-clip .captions.on { display: none; }
  #queue-strip[data-phase="clip"] .q-in { display: block; opacity: 1; font-weight: 600; }
  #queue-strip[data-phase="clip"] .q-say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* (F5, decisions 56) THE CONTROLLER (app.js, ctl): one compact control in dark glass over the world, in both views; ?ui=strip keeps v3's
   strip and panel. Its body lets the world take a drag (only its buttons and its grip take the pointer). The glyph says who is driving
   (a person, or the agent's wheel with our pink dot); it pulses only before a scheduled move (a breath of at most 2.4 s when the agent
   takes the wheel; 1.4 a second, then 2.2 in the last two seconds, while a move waits), and never under reduced motion, where the words
   still say it. On the desktop it floats at one of four anchors, the window's corners (lower left by default; F5 part 3: a centred
   anchor covered a board's lines); on a phone it is docked at the bottom, full
   width, its sheet holding the top bar's buttons, and in version A (the default) Back and Next too; while the map is open it docks at
   the top. A day held as rows: each row's score set with more weight, its date said once by the day's heading */
.ctl { position: fixed; z-index: 40; display: flex; flex-direction: column; width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 4px 6px; border-radius: 22px; color: var(--w-ink); background: rgba(8, 22, 28, .93); border: 1.5px solid rgba(226, 236, 233, .2);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 700 14px/1.25 var(--f-display); pointer-events: none; }
.ctl[hidden], html[data-ui="strip"] .ctl, .ctl-spots[hidden], .ctl-panel[hidden], .ctl-in:empty, .ctl-home[hidden] { display: none; }
.ctl button { pointer-events: auto; }
.ctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; min-height: 34px; }
.ctl-acts, .ctl-home { display: flex; align-items: center; gap: 6px; }
.ctl-acts button, .ctl .hb, .ctl-panel button, .ctl-more { font: 700 13.5px/1 var(--f-display); color: var(--w-ink); background: rgba(226, 236, 233, .08); border: 1.5px solid rgba(226, 236, 233, .32);
  border-radius: 999px; padding: 8px 11px; min-height: 34px; white-space: nowrap; cursor: pointer; }
.ctl button:hover { border-color: var(--w-accent); }
.ctl .ctl-acts > .end { display: inline-block; gap: 0; padding: 8px 11px; background: var(--w-ink); color: var(--w-sky); border-color: var(--w-ink); }
.ctl .ctl-acts > [hidden] { display: none; }
.ctl .take, .ctl .give { border-color: var(--w-accent); }
.ctl :focus-visible, .ctl-spot:focus-visible { outline: 3px solid var(--w-accent); outline-offset: 2px; }
.ctl-now { flex: 0 1 auto; min-width: 0; margin: 0 4px 0 2px; }
.ctl-in { font-weight: 600; color: var(--w-ink-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctl[data-state="home"] .ctl-now { display: none; }
.ctl .ctl-msg { margin: 4px 8px 2px; width: 0; min-width: calc(100% - 16px); font: italic 600 13.5px/1.35 var(--f-display); }
.ctl .ctl-msg .who { display: block; font: normal 800 11.5px/1.3 var(--f-display); color: var(--w-accent); opacity: 1; }
.ctl .ctl-msg .note::before { content: "\201C"; } .ctl .ctl-msg .note::after { content: "\201D"; }
.ctl[data-state="you"] .ctl-msg, .ctl[data-state="over"] .ctl-msg, .ctl[data-state="home"] .ctl-msg { display: none; }
.ctl-cap { display: none; margin: 2px 6px 4px; font: 600 14px/1.35 var(--f-display); }
.ctl-glyph { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ctl-glyph > * { display: none; }
.ctl-glyph .g-dot, .ctl-glyph .g-d2 { fill: var(--w-origin); stroke: none; }
.ctl-glyph .g-n { stroke: var(--w-origin); stroke-width: 2.6; }
.ctl[data-state="home"] .g-p, .ctl[data-state="own"] .g-p, .ctl[data-state="over"] .g-p, .ctl[data-state="you"] .g-p, .ctl[data-state="you"] .g-d2,
.ctl[data-state="agent"] .g-a, .ctl[data-state="agent"] .g-dot, .ctl[data-state="paused"] .g-a, .ctl[data-state="paused"] .g-dot,
.ctl[data-state="next"] .g-a, .ctl[data-state="next"] .g-n, .ctl.by-me[data-state] .g-p { display: inline; }
.ctl.by-me .g-a, .ctl.by-me .g-dot, .ctl.by-me .g-n { display: none; }
.ctl[data-state="paused"] .g-dot { fill: none; stroke: var(--w-origin); stroke-width: 1.8; }
.ctl[data-state="you"] .g-d2 { opacity: .5; }
@keyframes ctl-pulse { 50% { opacity: .3; transform: scale(.84); } }
.ctl.breath .ctl-glyph { animation: ctl-pulse 1.2s ease-in-out 2; }
.ctl[data-state="next"] .ctl-glyph { animation: ctl-pulse .7s ease-in-out infinite; }
.ctl.soon[data-state="next"] .ctl-glyph { animation-duration: .45s; }
@media (prefers-reduced-motion: reduce) { .ctl .ctl-glyph { animation: none !important; } }
html[data-pulse="always"] .ctl .ctl-glyph { animation: ctl-pulse .7s ease-in-out infinite !important; }
/* (hands-free, the design's rule 5) the Sound control while sound is locked: the glyph's own pulse, at its breath's pace, until sound
   is on (app.js, soundWait); under reduced motion no animation, a still outline (a ring clear of the button) */
.ctl.sound-wait .tap-sound { animation: ctl-pulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ctl.sound-wait .tap-sound { animation: none; box-shadow: 0 0 0 2px rgba(8, 22, 28, .93), 0 0 0 4px var(--w-accent); } }
.ctl-grip { flex: none; width: 18px; height: 30px; padding: 3px !important; min-height: 0 !important; border: 0 !important; border-radius: 6px !important; cursor: grab; touch-action: none;
  background: radial-gradient(circle, rgba(226, 236, 233, .8) 1.3px, transparent 1.7px) 0 0 / 6px 6px content-box !important; }
/* (F5 part 4, decisions 58) the menu button: three plain lines (inline SVG in the markup), never a chevron; while its sheet or panel is open
   the lines become a cross, so it says it will close what it opened (its name stays Menu, aria-expanded says open or shut) */
.ctl-more { position: relative; width: 34px; padding: 0 !important; }
.ctl-burger { display: block; width: 16px; height: 16px; margin: 0 auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ctl-burger path { transform-origin: 8px 8px; transition: transform .18s ease, opacity .18s ease; }
.ctl-more[aria-expanded="true"] .b1 { transform: rotate(45deg) translateY(4.5px); }
.ctl-more[aria-expanded="true"] .b2 { opacity: 0; }
.ctl-more[aria-expanded="true"] .b3 { transform: rotate(-45deg) translateY(-4.5px); }
@media (prefers-reduced-motion: reduce) { .ctl-burger path { transition: none; } }
/* (F5 part 4, the lead's rulings on its report) the text view under Light: the controller is dark glass in both views, so the top bar's
   buttons it holds keep the world's ink there (the text view's own .hb rule gave them its dark ink: unreadable on the glass), and the
   front's two dates take the page's ink (they had the world's light ink, near the colour of the light page) */
html[data-view="text"] .ctl .hb:not([aria-pressed="true"]):not([aria-expanded="true"]) { color: var(--w-ink); border-color: rgba(226, 236, 233, .32); }
html[data-view="text"] .ctl .hb:not([aria-pressed="true"]):not([aria-expanded="true"]):hover { border-color: var(--w-accent); }
html[data-view="text"] .dateline time { color: var(--ink); }
/* (F4.2 part 2, the plan's item 4) the GAP stamp: ours, and the quietest mark on the slip, quieter than a correction's band: no fill, a
   dotted outline in the receipt's second ink, set level (never stamped on); a gap's row: its words, then what would answer it and its state */
.stamp.gap { color: var(--p-print2); background: var(--p-paper); border-style: dotted; transform: none; }
.gap-list { list-style: none; margin: 6px 0 0; padding: 0; }
.gap { margin: 8px 0; }
.gap .stamp { margin-right: 6px; }
.gap-would, .gap-since { display: block; margin-top: 2px; font-size: .92em; color: var(--p-print2); }
/* (C8, the lead's ruling of 25 Oct) an open slip's link to its gaps (build.py, gap_link): on a line of its own at the slip's top, in the
   slip's own ink as its sources are (the paper is the same in both themes) */
.r-gapto { margin: 0 0 4px; }
.r-gapto a { color: var(--p-print); text-decoration-color: var(--p-print2); text-decoration-thickness: 2px; }
.ctl-panel { position: absolute; left: 0; bottom: calc(100% + 6px); display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 16px; pointer-events: auto;
  background: rgba(8, 22, 28, .95); border: 1.5px solid rgba(226, 236, 233, .2); }
.ctl[data-anchor^="t"] .ctl-panel { bottom: auto; top: calc(100% + 6px); }
.ctl[data-anchor$="r"] .ctl-panel { left: auto; right: 0; }
.ctl-spots { position: fixed; inset: 0; z-index: 39; pointer-events: none; }
.ctl-spots.pick { pointer-events: auto; background: rgba(6, 18, 23, .4); }
.ctl.picking button { pointer-events: none; }
.ctl-spot { box-sizing: border-box; width: var(--cw); height: var(--ch); padding: 0; border: 2px dashed rgba(108, 198, 220, .6); border-radius: 22px; background: rgba(108, 198, 220, .08); cursor: pointer; }
.ctl-spot.near { border-style: solid; border-color: var(--w-accent); background: rgba(108, 198, 220, .22); }
@media (min-width: 700px) {
  html:not([data-ui="strip"]) .hud-nav > :is(.hb-tour, .hb-latest, .hb-mute) { visibility: hidden; }
  .ctl, .ctl-spot { position: fixed; margin: 0; }
  .ctl[data-anchor^="t"], .ctl-spot[data-a^="t"] { top: 66px; }
  .ctl[data-anchor^="b"], .ctl-spot[data-a^="b"] { bottom: 12px; }
  .ctl[data-anchor$="l"], .ctl-spot[data-a$="l"] { left: 16px; }
  .ctl[data-anchor$="r"], .ctl-spot[data-a$="r"] { right: 16px; }
  /* in a lower corner it keeps clear of the bottom bar's Back and Next (at 1440 px Back starts at 378 px): a wider state wraps its
     buttons onto a second row */
  .ctl[data-anchor="bl"], .ctl[data-anchor="br"] { max-width: max(300px, calc(50vw - 366px)); }
}
@media (max-width: 699px) {
  html:not([data-ui="strip"]) .hud-nav { display: none; }
  html:not([data-ui="strip"]):not([data-ui="b"]) .hud-bottom { visibility: hidden; height: 0; padding: 0; border: 0; }
  .ctl { left: 0; right: 0; bottom: 0; width: auto; max-width: none; border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  html[data-ui="b"] .ctl { bottom: 59px; }
  body.map-open .ctl { top: 52px; bottom: auto; border-radius: 0 0 16px 16px; border-width: 0 0 1px; }
  .ctl-grip, .ctl-move, .ctl-home { display: none !important; }
  .ctl-row { flex-wrap: wrap; }
  .ctl-now, .ctl .where { flex: 1; min-width: 0; white-space: normal; text-align: left; }
  .ctl:not([data-state="home"]) .where, html[data-view="text"] .ctl .where, html[data-view="text"] .ctl .step { display: none; }
  .ctl-acts { order: 9; flex-basis: 100%; }
  .ctl-acts:not(:has(> :not([hidden]))) { display: none; }
  .ctl-acts button { flex: 1; min-height: 40px; }
  .ctl .hb, .ctl .step { min-height: 40px; }
  .ctl-panel { left: 0; right: 0; bottom: 100%; border-radius: 16px 16px 0 0; padding: 10px 8px; gap: 8px; }
  body.map-open .ctl-panel { bottom: auto; top: 100%; border-radius: 0 0 16px 16px; }
  .ctl-panel .hb { flex: 1 1 auto; min-height: 44px; }
  .ctl.queuing.q-told .ctl-cap { display: block; min-height: calc(2 * 1.35em); }
  html[data-view="text"]:not([data-ui="strip"]) #edition { padding-bottom: 132px; }
}
.story.stub .stub-meta { font-weight: 800; font-size: 15px; }
html[data-view="text"] .story.stub .stub-meta { font: 800 15px/1.35 var(--f-display); color: var(--ink); }
@media (min-width: 1200px) { html:not([data-ui="strip"]) body.in-session .hud-nav :is(.hb-detail, .hb-tip) { display: revert; } }
