/* brAInbox — narrated infographic. Colours sampled from infographic.png (1672×941). */
:root {
  --navy: #0e1f63;
  --navy-deep: #0a1548;
  --blue: #1a4fe0;
  --blue-bright: #1f86f5;
  --blue-soft: #e8f1fe;
  --ink: #1b2550;
  --muted: #5a6485;
  --line: rgba(26, 79, 224, 0.16);
  --paper: #ffffff;
  --bg: #e9f5fd;
  --green: #10967a;
  --purple: #5b2ee6;
  --orange: #f2600f;
  --red: #e3163f;
  --teal: #0a8f98;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10, 21, 72, 0.08), 0 18px 48px -12px rgba(10, 21, 72, 0.28);
  --ease: cubic-bezier(0.45, 0.05, 0.22, 1);
  --cam: 1.35s;
  --caption-band: 80px;
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: clamp(13px, calc(0.55vw + 0.5vh + 3px), 24px); -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(120% 90% at 50% 40%, #f8fbfe 0%, var(--bg) 70%, #ddeefb 100%);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; }

/* ---------------- stage + camera ---------------- */
#stage { position: fixed; inset: 0; overflow: hidden; cursor: default; }
body.idle, body.idle #stage { cursor: none; }
#world {
  position: absolute; left: 0; top: 0;
  width: 1672px; height: 941px;
  transform-origin: 0 0;
  transition: transform var(--cam) var(--ease);
}
#world.instant { transition: none !important; }
#infographic {
  display: block; width: 1672px; height: 941px;
  border-radius: 6px;
  box-shadow: 0 30px 80px -30px rgba(10, 21, 72, 0.35);
  pointer-events: none;
}
#fx { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }

/* spotlight */
#dim { fill: rgb(8, 16, 52); opacity: 0; transition: opacity 0.7s var(--ease); }
#fx.dimmed #dim { opacity: 0.56; }
.hole { opacity: 0; transition: opacity 0.6s var(--ease); }
.hole.on { opacity: 1; }
.outline rect, .outline ellipse { fill: none; vector-effect: non-scaling-stroke; }
.outline { opacity: 0; transition: opacity 0.6s var(--ease); }
.outline.on { opacity: 1; }
.outline .glow { stroke: var(--blue-bright); stroke-width: 10; stroke-opacity: 0.22; }
.outline .line { stroke: #49acf2; stroke-width: 2.4; }
.outline.past .glow { stroke-opacity: 0.08; }
.outline.past .line { stroke-opacity: 0.55; stroke-width: 1.6; }
.outline.focus .glow { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { stroke-opacity: 0.16; } 50% { stroke-opacity: 0.4; } }

/* flow paths */
.flowpath { opacity: 0; transition: opacity 0.7s var(--ease); }
.flowpath.on { opacity: 1; }
.flowpath path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.flowpath .base { stroke: rgba(255, 255, 255, 0.85); stroke-width: 9; }
.flowpath .dash { stroke: var(--blue); stroke-width: 3.5; stroke-dasharray: 2 12; animation: flow 0.9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -14; } }

/* ---------------- scrim / cards ---------------- */
#scrim {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: rgba(240, 246, 252, 0.72);
  -webkit-backdrop-filter: blur(4px) saturate(1.05);
  backdrop-filter: blur(4px) saturate(1.05);
  opacity: 0; transition: opacity 0.7s var(--ease);
}
#scrim.on { opacity: 1; }

#chapter-card, #closing-card {
  position: fixed; left: 0; right: 0; top: 0; bottom: var(--caption-band); z-index: 20;
  display: grid; place-items: center; pointer-events: none;
  opacity: 0; transition: opacity 0.6s var(--ease);
  padding: 0 6vw;
}
#chapter-card.on, #closing-card.on { opacity: 1; }
.cc-inner, .cl-inner { text-align: center; max-width: 52rem; transform: translateY(12px); transition: transform 0.9s var(--ease); }
.on .cc-inner, .on .cl-inner { transform: none; }
.cc-num, .cl-kicker {
  display: inline-block; font-weight: 700; letter-spacing: 0.14em; font-size: 0.82rem;
  color: var(--blue); background: var(--blue-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.3rem 0.9rem;
}
.cc-title, .cl-title {
  margin: 1.1rem 0 0; font-size: 3.1rem; line-height: 1.08; font-weight: 700; color: var(--navy);
  letter-spacing: -0.01em; text-wrap: balance;
}
.cc-rule { width: 0; height: 3px; margin: 1.3rem auto 1.1rem; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--blue-bright)); transition: width 1.1s 0.2s var(--ease); }
.on .cc-rule { width: 5.5rem; }
.cc-sub, .cl-sub { margin: 0; font-size: 1.35rem; color: var(--muted); text-wrap: balance; }
.cl-title { font-size: 3.6rem; }

/* ---------------- popups ----------------
 * Popups use em units on a 1.2rem base so the whole set scales for projection
 * (≈1.25× the previous sizes: kickers ≥14 px, body/sub-labels ≥20 px at 1080p). */
#overlay { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.popup {
  position: absolute; left: 0; top: 0;
  font-size: 1.2rem;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(26, 79, 224, 0.12);
  padding: 0.95em 1.1em 1.05em;
  opacity: 0; transform: translateY(10px) scale(0.985);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  overflow: hidden;
}
.popup::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent, var(--blue)), var(--accent-2, var(--blue-bright)));
}
.popup.moving { transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), left var(--cam) var(--ease), top var(--cam) var(--ease); }
.popup.in { opacity: 1; transform: none; }
.popup.out { opacity: 0; transform: translateY(-6px) scale(0.99); transition-duration: 0.35s; }
.accent-green { --accent: var(--green); --accent-2: #4cc79a; }
.accent-purple { --accent: var(--purple); --accent-2: #a77df2; }
.accent-red { --accent: var(--red); --accent-2: #f5718c; }
.accent-teal { --accent: var(--teal); --accent-2: #3cc4c9; }
.accent-orange { --accent: var(--orange); --accent-2: #f9a54a; }
.accent-blue { --accent: var(--blue); --accent-2: var(--blue-bright); }

.kicker {
  font-size: 0.72em; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--accent, var(--blue)); margin: 0.15em 0 0.35em; line-height: 1.3;
}
.badge {
  display: inline-block; font-size: 0.64em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--accent, var(--blue)); border-radius: 6px; padding: 0.12em 0.5em; margin-bottom: 0.35em;
}
.title { margin: 0 0 0.3em; font-size: 1.45em; line-height: 1.16; font-weight: 700; color: var(--navy); text-wrap: balance; }
.text { margin: 0 0 0.5em; font-size: 0.92em; line-height: 1.4; color: var(--muted); }
.note {
  margin: 0.65em 0 0; padding: 0.5em 0.7em; font-size: 0.94em; line-height: 1.36;
  background: var(--blue-soft); border-radius: 10px; color: var(--navy); font-weight: 500;
}

/* timed elements: a faint grey ghost in their final place until spoken, then
 * they fill in — the popup reads as a checklist filling up, never empty space. */
.timed {
  opacity: 0.2; filter: grayscale(1);
  transition: opacity 0.5s var(--ease), filter 0.5s var(--ease);
}
.timed.on { opacity: 1; filter: none; }
.timed.on:not(.instant):not(g) { animation: arrive 0.6s var(--ease); }
@keyframes arrive { from { transform: scale(0.965); } to { transform: none; } }
.timed.instant { transition: none; animation: none; }
.popup.centered .timed:not(.on) { opacity: 0.14; }

/* item lists */
.items { list-style: none; margin: 0.4em 0 0; padding: 0; }
.items .item { display: flex; align-items: flex-start; gap: 0.55em; font-size: 1.02em; line-height: 1.3; }
.layout-list .item { padding: 0.3em 0; border-bottom: 1px solid rgba(26, 79, 224, 0.08); }
.layout-list .item:last-child { border-bottom: 0; }
.item .dot { flex: none; width: 0.4em; height: 0.4em; margin-top: 0.5em; border-radius: 50%; background: var(--accent, var(--blue)); }
.item .num {
  flex: none; width: 1.55em; height: 1.55em; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.8em; font-weight: 700; color: #fff; background: var(--accent, var(--blue));
}
.item .body { display: flex; flex-direction: column; min-width: 0; }
.item .main { color: var(--ink); font-weight: 600; }
.item .sub { color: var(--muted); font-size: 0.88em; }
.item.s-em .main { color: var(--navy); }
.item.s-em { font-size: 1.08em; }
ol.items .item { padding: 0.32em 0; align-items: center; }

.layout-chips { display: flex; flex-wrap: wrap; gap: 0.4em; }
.layout-chips .item {
  padding: 0.32em 0.72em; border-radius: 999px; background: var(--blue-soft);
  border: 1px solid var(--line); font-size: 0.95em;
}
.layout-chips .item .main { font-weight: 600; color: var(--navy); }
.layout-chips .item.s-em { background: var(--navy); border-color: var(--navy); }
.layout-chips .item.s-em .main { color: #fff; }

.layout-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3em 0.85em; }
.layout-grid2 .item { padding: 0.28em 0; border-bottom: 1px solid rgba(26, 79, 224, 0.08); font-size: 0.96em; }

.layout-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45em; }
.layout-tiles .item {
  padding: 0.55em 0.7em; border-radius: 12px; background: var(--blue-soft); border: 1px solid var(--line);
}
.layout-tiles .item .dot { display: none; }
.layout-tiles .item .main { font-size: 1em; color: var(--navy); }
.layout-tiles .item .sub { font-size: 0.88em; }

.foot { display: flex; flex-wrap: wrap; gap: 0.35em 0.85em; margin-top: 0.7em; padding-top: 0.55em; border-top: 1px dashed rgba(26, 79, 224, 0.3); }
.foot .q { font-weight: 600; color: var(--accent, var(--blue)); font-size: 0.92em; }

/* statement */
.kind-statement .line { margin: 0.2em 0 0; font-size: 1.45em; line-height: 1.2; font-weight: 700; color: var(--navy); text-wrap: balance; }
.kind-statement .line.s-muted { color: #8796a8; font-weight: 600; font-size: 1.15em; }
.kind-statement .line.s-small { font-size: 1em; font-weight: 500; color: var(--ink); line-height: 1.4; margin-top: 0.55em; }
.kind-statement .line.s-em { color: var(--blue); }
.kind-statement .sub { margin: 0.6em 0 0; color: var(--muted); font-size: 0.92em; }

/* centred slides keep their own (already large) scale */
.popup.centered {
  font-size: 1rem;
  background: transparent; box-shadow: none; border: 0; padding: 0; text-align: center; overflow: visible;
}
.popup.centered::before { display: none; }
.popup.centered .kicker { font-size: 0.95em; margin-bottom: 0.8em; }
.popup.centered.kind-statement .line { font-size: 2.7em; line-height: 1.14; margin-top: 0.35em; letter-spacing: -0.01em; }
.popup.centered.kind-statement .line.s-muted { font-size: 1.9em; }
.popup.centered.kind-statement .line.s-small { font-size: 1.6em; font-weight: 500; }
.popup.centered.size-xl .line { font-size: 3.6em; }
.popup.centered.kind-contrast { text-align: left; font-size: 1.2rem; }
.popup.centered.kind-contrast .side { background: var(--paper); box-shadow: var(--shadow); }

/* number */
.kind-number { text-align: left; }
.kind-number .big {
  font-size: 4.6em; line-height: 0.95; font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--navy) 10%, var(--blue) 60%, var(--blue-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.kind-number .label { margin-top: 0.35em; font-size: 1.15em; font-weight: 600; color: var(--navy); line-height: 1.25; }

/* contrast — both sides always carry their label */
.kind-contrast .side { border-radius: 12px; padding: 0.6em 0.75em; }
.kind-contrast .side + .side { margin-top: 0.5em; }
.side-label { font-size: 0.7em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.3em; line-height: 1.3; }
.side-no { background: #f4f6f9; }
.side-no .side-label { color: #6f7e90; }
.side-no .row { color: #5f6f83; }
.side-no .row .tx { text-decoration: line-through; text-decoration-color: rgba(102, 118, 138, 0.45); text-decoration-thickness: 1.5px; }
.side-yes { background: linear-gradient(135deg, #eaf4fd, #f5faff); border: 1px solid var(--line); }
.side-yes .side-label { color: var(--blue); }
.side-yes .row { color: var(--navy); font-weight: 700; font-size: 1.12em; line-height: 1.25; }
.kind-contrast .row { display: flex; gap: 0.5em; align-items: flex-start; padding: 0.2em 0; font-size: 0.98em; line-height: 1.3; }
.kind-contrast .ic { flex: none; width: 1.15em; height: 1.15em; margin-top: 0.08em; }
.kind-contrast .ic svg { width: 100%; height: 100%; display: block; }
.side-yes .ic { color: #fff; background: var(--blue); border-radius: 50%; padding: 0.1em; margin-top: 0.05em; }
.side-no .ic { color: #8b98a8; }

/* pairs */
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7em; margin-top: 0.3em; }
.pairs .col { display: flex; flex-direction: column; gap: 0.4em; }
.col-label { font-size: 0.7em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); line-height: 1.3; }
.col-0 .col-label { color: #6f7e90; }
.cell { background: var(--blue-soft); border: 1px solid var(--line); border-radius: 10px; padding: 0.5em 0.65em; font-weight: 600; color: var(--navy); line-height: 1.28; font-size: 0.95em; }
.col-0 .cell { background: #f4f6f9; border-color: #e6eaf0; color: #3f5167; }
.cell.s-em { background: var(--navy); color: #fff; border-color: var(--navy); }

/* flow — row direction is a grid laid out by app.js (one row, or balanced rows) */
.flow { margin-top: 0.5em; }
.flow-row { display: grid; align-items: stretch; column-gap: 0.3em; row-gap: 0.55em; }
.flow-row .node {
  min-width: 0; padding: 0.55em 0.5em; border-radius: 12px;
  background: var(--blue-soft); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; text-align: center;
  hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word;
}
.flow .node .main { font-weight: 700; color: var(--navy); line-height: 1.18; font-size: 0.92em; }
.flow .node .sub { color: var(--muted); font-size: 0.88em; margin-top: 0.12em; line-height: 1.2; }
.flow .node.s-em { background: var(--navy); border-color: var(--navy); }
.flow .node.s-em .main, .flow .node.s-em .sub { color: #fff; }
.flow-row .arrow { width: 1.2em; align-self: center; color: var(--blue); }
.flow-row .arrow svg { display: block; width: 100%; }
.flow-row .arrow[data-kind="return"] { color: var(--blue-bright); }
.flow-col { position: relative; display: flex; flex-direction: column; }
.flow-col .node { display: flex; align-items: center; gap: 0.65em; padding: 0.34em 0; position: relative; }
.flow-col .arrow { height: 0.5em; margin-left: calc(0.78em - 1px); border-left: 2px solid rgba(26, 79, 224, 0.35); }
.flow-col .node .main { font-size: 1.02em; }
.flow-col .node.s-em .main { color: var(--navy); }
.flow-col .node.s-em { background: transparent; }
.flow .num {
  flex: none; width: 1.55em; height: 1.55em; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.8em; font-weight: 700; color: #fff; background: var(--blue);
}
.flow-col .node.s-em .num { background: var(--navy); box-shadow: 0 0 0 4px rgba(14, 31, 99, 0.15); }
.flow-row.numbered .node { flex-direction: column; gap: 0.3em; }

.loopback { position: relative; margin-top: 0.5em; height: 1.75em; }
.loop-line {
  position: absolute; left: 2.5em; right: 2.5em; top: 0; height: 1em;
  border: 2px solid var(--blue); border-top: 0; border-radius: 0 0 14px 14px;
}
.loop-line::before {
  content: ""; position: absolute; left: -7px; top: -8px; border: 6px solid transparent; border-bottom: 8px solid var(--blue); border-top: 0;
}
.loop-text { position: absolute; left: 50%; top: 0.55em; transform: translateX(-50%); background: #fff; padding: 0 0.5em; font-size: 0.88em; font-weight: 600; color: var(--blue); white-space: nowrap; }

/* web */
.web { display: block; width: 100%; height: auto; margin-top: 0.2em; overflow: visible; }
.web .links line { stroke: var(--blue-bright); stroke-width: 1.6; stroke-dasharray: 4 4; opacity: 0.9; }
.web .spoke { stroke: rgba(26, 79, 224, 0.35); stroke-width: 1.5; }
.web .sat circle { fill: var(--blue); stroke: #fff; stroke-width: 3; }
.web .sat text { font-family: var(--font); font-size: 18px; font-weight: 600; fill: var(--navy); }
.web .hub circle { fill: var(--navy); }
.web .hub text { font-family: var(--font); font-size: 17px; font-weight: 700; fill: #fff; }

/* ---------------- captions ---------------- */
/* Captions sit at a fixed offset just above the control bar (--cap-bottom, set
 * by app.js) and grow upward; width is capped so long lines wrap to 2–3 lines. */
#captions {
  position: fixed; left: 50%; bottom: var(--cap-bottom, 90px); z-index: 30;
  transform: translateX(-50%);
  width: max-content; max-width: min(1100px, 70vw);
  pointer-events: none; text-align: center;
  transition: opacity 0.3s;
}
#captions span {
  display: inline; padding: 0.26rem 0.7rem; border-radius: 8px;
  background: rgba(10, 30, 58, 0.86); color: #fff;
  font-size: 1.1rem; line-height: 1.72; font-weight: 500;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
#captions.empty { opacity: 0; }
body.captions-off #captions { display: none; }
body.closing #captions { opacity: 0; }

/* ---------------- controls ---------------- */
#controls {
  position: fixed; left: 50%; bottom: 14px; z-index: 40;
  transform: translateX(-50%);
  width: min(70rem, calc(100vw - 24px));
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(26, 79, 224, 0.14);
  border-radius: 14px;
  box-shadow: 0 10px 30px -10px rgba(10, 21, 72, 0.35);
  color: var(--navy);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
body.idle #controls { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
body:not(.started) #controls { opacity: 0; pointer-events: none; }
body.closing #controls { opacity: 0; transform: translateX(-50%); pointer-events: auto; }
body.closing #controls:hover, body.closing #controls:focus-within { opacity: 1; }
.ctl {
  flex: none; display: inline-flex; align-items: center; gap: 0.35rem;
  height: 2.3rem; min-width: 2.3rem; padding: 0 0.45rem; justify-content: center;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--navy);
}
.ctl:hover { background: var(--blue-soft); }
.ctl:focus-visible, #progress:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ctl svg { width: 1.35rem; height: 1.35rem; }
#btn-play { background: var(--navy); color: #fff; width: 2.4rem; }
#btn-play:hover { background: var(--blue); }
#btn-play .i-pause { display: none; }
body.playing #btn-play .i-pause { display: block; }
body.playing #btn-play .i-play { display: none; }
#btn-cc[aria-pressed="false"] { opacity: 0.45; }
.ctl .lbl { font-size: 0.88rem; font-weight: 600; }
.time { flex: none; font-variant-numeric: tabular-nums; font-size: 0.92rem; font-weight: 600; color: var(--navy); }
.time .sep { margin: 0 0.25rem; color: #9aa9ba; }
#chapter-label { flex: none; max-width: 15rem; font-size: 0.88rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#progress { position: relative; flex: 1 1 auto; height: 2.3rem; cursor: pointer; touch-action: none; }
#progress .track, #progress-fill { position: absolute; left: 0; top: 50%; height: 5px; margin-top: -2.5px; border-radius: 5px; }
#progress .track { right: 0; background: #dbe6f2; }
#progress-fill { width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-bright)); }
#progress-ticks .tick { position: absolute; top: 50%; width: 3px; height: 13px; margin: -6.5px 0 0 -1.5px; border-radius: 2px; background: var(--navy); opacity: 0.55; }
#progress-handle {
  position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue); box-shadow: 0 2px 6px rgba(10, 21, 72, 0.3);
}
#progress-tip {
  position: absolute; bottom: 100%; transform: translateX(-50%); margin-bottom: 6px;
  background: var(--navy); color: #fff; font-size: 0.82rem; font-weight: 600; white-space: nowrap;
  padding: 0.25rem 0.55rem; border-radius: 7px; opacity: 0; transition: opacity 0.15s; pointer-events: none;
}
#progress-tip.on { opacity: 1; }

.menu-wrap { position: relative; flex: none; }
#chapter-menu {
  position: absolute; right: -4rem; bottom: calc(100% + 12px); width: 25rem; max-width: calc(100vw - 24px);
  max-height: 70vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid rgba(26, 79, 224, 0.14);
  padding: 0.5rem; opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
#chapter-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.cm-head { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); padding: 0.4rem 0.6rem 0.3rem; }
#chapter-menu ol { list-style: none; margin: 0; padding: 0; }
.chap {
  width: 100%; display: flex; align-items: center; gap: 0.7rem; text-align: left;
  border: 0; background: transparent; padding: 0.5rem 0.6rem; border-radius: 10px; cursor: pointer;
}
.chap:hover { background: var(--blue-soft); }
.chap.current { background: var(--blue-soft); }
.chap .cn { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.82rem; font-weight: 700; color: var(--blue); border: 1.5px solid var(--blue); }
.chap.current .cn { background: var(--blue); color: #fff; }
.chap .ct { flex: 1; display: flex; flex-direction: column; }
.chap .ctitle { font-weight: 700; color: var(--navy); font-size: 0.98rem; line-height: 1.2; }
.chap .csub { color: var(--muted); font-size: 0.82rem; }
.chap .ctime { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.85rem; }

/* ---------------- start screen ---------------- */
#start {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
body.started #start { opacity: 0; visibility: hidden; pointer-events: none; }
body.start-gone #start { display: none; }
.start-bg {
  position: absolute; inset: 0;
  background: url("assets/infographic.png") center / cover no-repeat;
  filter: blur(14px) saturate(1.1); transform: scale(1.08);
}
.start-bg::after { content: ""; position: absolute; inset: 0; background: rgba(241, 247, 253, 0.84); }
.start-inner { position: relative; text-align: center; max-width: 46rem; }
.start-kicker { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
#start h1 { margin: 0.9rem 0 0.7rem; font-size: 3.2rem; line-height: 1.06; color: var(--navy); letter-spacing: -0.015em; }
.start-sub { margin: 0 0 2rem; font-size: 1.3rem; color: var(--muted); }
#start-play {
  display: inline-flex; align-items: center; gap: 1rem; border: 0; cursor: pointer; background: transparent; padding: 0.3rem;
  border-radius: 999px;
}
#start-play .disc {
  width: 5rem; height: 5rem; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--blue-bright), var(--navy));
  box-shadow: 0 14px 34px -10px rgba(14, 31, 99, 0.6), 0 0 0 10px rgba(26, 79, 224, 0.12);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
#start-play .disc svg { width: 2.2rem; height: 2.2rem; margin-left: 0.25rem; }
#start-play:hover .disc { transform: scale(1.05); box-shadow: 0 18px 40px -10px rgba(14, 31, 99, 0.65), 0 0 0 14px rgba(26, 79, 224, 0.14); }
#start-play:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.start-label { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.start-label em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 0.3rem; }
.keys { margin: 2.2rem 0 0; font-size: 0.86rem; color: var(--muted); line-height: 2; }
kbd {
  font-family: var(--font); font-size: 0.78rem; font-weight: 600; color: var(--navy);
  background: #fff; border: 1px solid #cfdcea; border-bottom-width: 2px; border-radius: 5px; padding: 0.05rem 0.4rem; margin: 0 0.1rem;
}

#debug { display: none; }
body.debug #debug {
  display: block; position: fixed; left: 8px; top: 8px; z-index: 200; font: 12px/1.4 ui-monospace, Menlo, monospace;
  background: rgba(10, 30, 58, 0.85); color: #fff; padding: 4px 8px; border-radius: 6px; pointer-events: none;
}

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  #chapter-label { display: none; }
  .ctl .lbl { display: none; }
  #chapter-menu { right: -5rem; }
}
@media (max-width: 720px) {
  html { font-size: 13px; }
  .time .sep, #time-tot { display: none; }
  .cc-title, .cl-title { font-size: 2.2rem; }
  #start h1 { font-size: 2.3rem; }
  .popup.centered.kind-statement .line { font-size: 1.9rem; }
  .layout-grid2 { grid-template-columns: 1fr 1fr; }
  #captions { max-width: calc(100vw - 24px); }
}

/* ---------------- reduced motion: cut instead of animate ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { transition-duration: 0.01ms !important; animation: none !important; }

/* instant cut (window.__pres.seek(t, true)) */
.cut *, .cut *::before, .cut *::after { transition: none !important; }

/* Combined presentation: the first player's chrome surrounds both sources. */
#intro-content { position:absolute; inset:0; z-index:2; pointer-events:none; }
#intro-content[hidden] { display:none; }
body.intro-segment #world { visibility:hidden; }
