/* XSI Signals — explainer film
   Fixed 1920x1080 stage, scaled to the window. Every animation is driven
   from one clock in engine.js, so the film can be paused, scrubbed and
   stepped chapter by chapter. */

/* Fonts are self-hosted (fonts/), so the film makes no outside requests. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens live on body so a theme class can override the base values and
   everything derived from them (--line uses --tint) follows. */
body {
  /* Dark (default): neutral near-black, brand blue only as accent */
  --night: #050608;
  --night-2: #0c0e13;
  --night-3: #15181f;
  --tint: 196 206 230;
  --surface: 8 9 12;
  --surface-2: 14 16 21;
  --glow-1: rgba(11, 77, 255, 0.08);
  --glow-2: rgba(0, 200, 255, 0.035);
  --orb: rgba(11, 77, 255, 0.4);
  --paper: linear-gradient(180deg, #13161d, #0d0f14);
  --paper-ink: #f2f4f8;
  --paper-sub: #8e97aa;
  --paper-card: rgba(255, 255, 255, 0.045);
  --paper-card-ink: #e6e9f0;
  --paper-track: rgba(255, 255, 255, 0.08);
  --paper-accent: #8fb0ff;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgb(var(--tint) / 0.16);
  --line-2: rgb(var(--tint) / 0.28);
  --blue: #0b4dff;
  --blue-deep: #0636b8;
  --blue-mid: #2f6bff;
  --blue-soft: #6f9bff;
  --blue-pale: #a9c3ff;
  --cyan: #00c8ff;
  --ink: #f2f4f8;
  --ink-2: #a4acbd;
  --ink-3: #6b7386;
  --commercial: #4c8dff;
  --customer: #a78bfa;
  --operational: #f5b83d;
  --opportunity: #34d399;
  --risk: #f87171;
  --ok: #34d399;
  --warn: #f5b83d;
  --bad: #f87171;
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

/* Midnight: the navy-tinted look of the first cut, with a white report page */
body.theme-midnight {
  --night: #070c16;
  --night-2: #0e1626;
  --night-3: #131d33;
  --tint: 143 176 255;
  --surface: 7 12 22;
  --surface-2: 14 22 38;
  --glow-1: rgba(11, 77, 255, 0.16);
  --glow-2: rgba(0, 200, 255, 0.07);
  --orb: rgba(11, 77, 255, 0.55);
  --paper: linear-gradient(180deg, #f7f9ff, #e9eefb);
  --paper-ink: #070c16;
  --paper-sub: #4a5878;
  --paper-card: #fff;
  --paper-card-ink: #1d2740;
  --paper-track: #e2e8f6;
  --paper-accent: #0b4dff;
  --ink: #eef3ff;
  --ink-2: #aab7d4;
  --ink-3: #6b7a99;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.record, body.record * { cursor: none !important; }

/* ── Stage ─────────────────────────────────────────────── */

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 78% 18%, var(--glow-1), transparent 60%),
    radial-gradient(900px 600px at 10% 90%, var(--glow-2), transparent 60%),
    var(--night);
}

.bg-grid {
  position: absolute;
  inset: -80px;
  background-image:
    linear-gradient(rgb(var(--tint) / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--tint) / 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 75%);
}

.bg-orb {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  background: radial-gradient(circle, var(--orb), transparent 65%);
}

/* ── HUD (persistent brand + chapter) ──────────────────── */

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.hud-brand {
  position: absolute;
  left: 72px;
  top: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.hud-brand svg { width: 34px; height: 34px; }
.hud-brand .sep { width: 1px; height: 22px; background: var(--line-2); }
.hud-brand .prod { font-weight: 500; color: var(--ink-2); }

.hud-chapter {
  position: absolute;
  right: 72px;
  top: 50px;
  text-align: right;
}
.hud-chapter .num {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--blue-soft);
  letter-spacing: 0.12em;
}
.hud-chapter .name {
  font-size: 18px;
  color: var(--ink-2);
  margin-top: 4px;
}
.hud-segs {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 12px;
}
.hud-segs i {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: rgb(var(--tint) / 0.18);
  overflow: hidden;
  position: relative;
}
.hud-segs i b {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cyan), var(--blue-mid));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* One subtitle line in the strip below every scene's content (scenes end
   above ~940px, the caption sits at ~1010px), so it never covers a card. */
#caption {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 40;
  transform: translateX(-50%);
  max-width: 1760px;
  white-space: nowrap;
  padding: 8px 22px;
  border-radius: 10px;
  background: rgb(var(--surface) / 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}
#caption.on { opacity: 1; }
body.no-captions #caption { display: none; }

/* ── Scenes ────────────────────────────────────────────── */

.scene {
  position: absolute;
  inset: 0;
  display: none;
  padding: 150px 140px 160px;
}
.scene.active { display: block; }

[data-at] { opacity: 0; will-change: transform, opacity; }

.head { max-width: 1320px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.eyebrow .ord {
  font-family: var(--mono);
  color: var(--cyan);
  letter-spacing: 0.08em;
}
.eyebrow .bar { width: 40px; height: 1px; background: var(--line-2); }
.title {
  margin-top: 18px;
  font-size: 60px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--cyan), var(--blue-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin-top: 20px;
  font-size: 25px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 1100px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--panel-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.icon { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.seekable { cursor: pointer; pointer-events: auto; }
.seekable:hover { filter: brightness(1.15); }

/* ── 01 Intro ──────────────────────────────────────────── */

#s-intro { display: none; padding: 0; }
#s-intro.active { display: flex; align-items: center; justify-content: center; flex-direction: column; }
.intro-logo { width: 300px; height: 300px; overflow: visible; }
.intro-logo rect { transform-box: fill-box; transform-origin: center; }
.intro-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.28), rgba(11, 77, 255, 0.12) 40%, transparent 70%);
  filter: blur(30px);
}
.intro-word {
  margin-top: 46px;
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 88px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.intro-word .sep { width: 2px; height: 70px; background: linear-gradient(var(--cyan), var(--blue)); }
.intro-word .prod { font-weight: 300; color: var(--ink-2); }
.intro-tag {
  margin-top: 22px;
  font-size: 28px;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.intro-meta {
  margin-top: 38px;
  display: flex;
  gap: 14px;
}

/* ── 02 Problem ────────────────────────────────────────── */

.problem-copy { position: absolute; left: 140px; top: 210px; width: 760px; }
.problem-copy .title { font-size: 66px; }
.problem-strap {
  margin-top: 54px;
  font-size: 34px;
  font-weight: 600;
  display: inline-block;
  position: relative;
}
.problem-strap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 4px;
  border-radius: 2px;
  background: var(--risk);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

.mailwall {
  position: absolute;
  right: 120px;
  top: 150px;
  width: 860px;
  height: 790px;
  overflow: hidden;
  border-radius: 22px;
  mask-image: linear-gradient(transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 8%, #000 92%, transparent);
}
.mailwall-track { position: absolute; left: 0; right: 0; top: 0; }
.mrow {
  display: grid;
  grid-template-columns: 44px 230px 1fr 90px;
  grid-template-rows: 58px auto;
  align-items: center;
  column-gap: 16px;
  padding: 0 20px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgb(var(--tint) / 0.08);
  font-size: 18px;
  color: var(--ink-3);
  transition: none;
}
.mrow .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--night-3);
}
.mrow .from { color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .subj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .when { text-align: right; font-family: var(--mono); font-size: 15px; }
.mrow.hot { border-color: var(--hot); background: color-mix(in srgb, var(--hot) 12%, transparent); color: var(--ink); }
.mrow.hot .from { color: var(--ink); }

/* a flagged row opens a second line holding its flag, so nothing covers the subject */
.mrow .flag {
  grid-column: 2 / -1;
  grid-row: 2;
  overflow: hidden;
  max-height: calc(var(--f, 0) * 46px);
  opacity: var(--f, 0);
}
.mrow .flag span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: color-mix(in srgb, var(--hot) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--hot) 50%, transparent);
}
.mrow .flag span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 10px var(--hot);
}

/* ── 03 Read-only connection ───────────────────────────── */

.flow { position: absolute; left: 140px; right: 140px; top: 410px; height: 470px; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-svg .track { stroke: rgb(var(--tint) / 0.14); stroke-width: 2; fill: none; }
.flow-svg .lit {
  stroke: url(#flowGrad);
  stroke-width: 2.5;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--p, 0));
}
.flow-svg .pkt { fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }

.src-col { position: absolute; left: 0; top: 0; width: 420px; display: flex; flex-direction: column; gap: 22px; }
.src {
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 16px;
  align-items: center;
}
.src .ico {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(0, 200, 255, 0.08);
  border: 1px solid rgba(0, 200, 255, 0.2);
}
.src h4 { font-size: 22px; font-weight: 600; }
.src p { font-size: 16px; color: var(--ink-3); font-family: var(--mono); }

.core {
  position: absolute;
  left: 660px;
  top: 40px;
  width: 520px;
  height: 330px;
  padding: 34px;
  text-align: center;
  border-color: rgba(47, 107, 255, 0.5);
  background:
    radial-gradient(400px 220px at 50% 0%, rgba(11, 77, 255, 0.25), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}
.core .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ok);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
}
.core svg.logo { width: 70px; height: 70px; margin: 22px auto 10px; display: block; }
.core h3 { font-size: 32px; font-weight: 700; }
.core p { margin-top: 8px; font-size: 19px; color: var(--ink-2); }
.core .steps { margin-top: 18px; display: flex; justify-content: center; gap: 10px; font-family: var(--mono); font-size: 15px; color: var(--blue-pale); }

.out-col { position: absolute; right: 0; top: 30px; width: 300px; display: flex; flex-direction: column; gap: 22px; }
.out {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 22px;
  font-weight: 600;
}
.out .ico { color: var(--blue-soft); }

.noroute {
  position: absolute;
  left: 600px;
  top: 410px;
  width: 640px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.noroute .lbl { font-size: 17px; color: var(--ink-3); white-space: nowrap; }
.nr {
  position: relative;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink-2);
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.07);
}
.nr::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 2px;
  background: var(--risk);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ── 04 Pipeline ───────────────────────────────────────── */

.pipe { position: absolute; left: 140px; right: 140px; top: 420px; height: 480px; }
.pipe-track {
  position: absolute;
  left: 110px;
  right: 110px;
  top: 64px;
  height: 4px;
  border-radius: 2px;
  background: rgb(var(--tint) / 0.14);
}
.pipe-track b {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--p, 0) * 100%);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue-mid));
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.6);
}
.pipe-track.down b { width: 100%; height: calc(var(--p, 0) * 100%); }
.stages { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px; }
.stage { display: flex; flex-direction: column; align-items: center; }
.stage .node {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--night-2);
  border: 2px solid rgb(var(--tint) / 0.2);
  color: var(--ink-3);
  position: relative;
  transition: none;
}
.stage .node .icon { width: 46px; height: 46px; }
.stage .node .n {
  position: absolute;
  top: -12px;
  right: -6px;
  font-family: var(--mono);
  font-size: 15px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--night-3);
  border: 1px solid var(--line);
  color: var(--ink-3);
}
.stage.on .node {
  color: #fff;
  border-color: var(--cyan);
  background: radial-gradient(circle at 30% 25%, rgba(0, 200, 255, 0.45), rgba(11, 77, 255, 0.55) 60%, var(--blue-deep));
  box-shadow: 0 0 0 10px rgba(0, 200, 255, 0.08), 0 0 50px rgba(11, 77, 255, 0.55);
}
.stage.on .node .n { color: var(--cyan); border-color: var(--cyan); }
.stage .sd {
  margin-top: 30px;
  width: 100%;
  padding: 22px 22px 24px;
  min-height: 210px;
  opacity: 0.38;
  transform: translateY(10px);
}
.stage.on .sd { opacity: 1; transform: none; border-color: rgba(0, 200, 255, 0.35); }
.stage.cur .sd { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 200, 255, 0.5), 0 0 40px rgba(0, 200, 255, 0.15); }
.stage .sd h4 { font-size: 26px; font-weight: 700; }
.stage .sd .tools { margin-top: 8px; font-family: var(--mono); font-size: 13.5px; line-height: 1.5; color: var(--blue-soft); }
.stage .sd p { margin-top: 12px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }

.packet {
  position: absolute;
  top: -86px;
  left: 0;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: rgb(var(--surface-2) / 0.95);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 30px rgba(0, 200, 255, 0.35);
  transform: translateX(-50%);
}
.packet::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: rgb(var(--surface-2) / 0.95);
  border-right: 1px solid var(--cyan);
  border-bottom: 1px solid var(--cyan);
  transform: translateX(-50%) rotate(45deg);
}
.packet .icon { width: 20px; height: 20px; color: var(--cyan); }

/* ── 05 Understanding ──────────────────────────────────── */

.mail {
  position: absolute;
  left: 140px;
  top: 400px;
  width: 860px;
  padding: 30px 34px 34px;
}
.mail-h { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; }
.mail-h .av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  background: linear-gradient(135deg, var(--customer), var(--blue-mid));
}
.mail-h .who { font-size: 21px; font-weight: 600; }
.mail-h .who small { display: block; font-size: 16px; font-weight: 400; color: var(--ink-3); margin-top: 2px; }
.mail-h .when { font-family: var(--mono); font-size: 15px; color: var(--ink-3); }
.mail-s { margin-top: 22px; font-size: 23px; font-weight: 600; }
.mail-b { margin-top: 16px; font-size: 21px; line-height: 1.7; color: var(--ink-2); }
.mail-att { margin-top: 20px; display: flex; gap: 10px; }

.hl {
  --hc: var(--blue-soft);
  color: var(--ink);
  padding: 1px 4px;
  margin: 0 -2px;
  border-radius: 6px;
  background-image: linear-gradient(color-mix(in srgb, var(--hc) 30%, transparent), color-mix(in srgb, var(--hc) 30%, transparent));
  background-repeat: no-repeat;
  background-size: calc(var(--p, 0) * 100%) 100%;
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--hc) calc(var(--p, 0) * 100%), transparent);
}
.hl sup, .fld .k sup {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--night);
  background: var(--hc);
  vertical-align: 4px;
  opacity: var(--p, 0);
}

.rec-card {
  position: absolute;
  right: 140px;
  top: 400px;
  width: 760px;
  padding: 28px 32px;
  border-color: rgba(0, 200, 255, 0.3);
}
.record-h { display: flex; align-items: center; justify-content: space-between; }
.record-h h4 { font-size: 20px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); }
.record-h code { font-family: var(--mono); font-size: 15px; color: var(--ink-3); }
.fld {
  --hc: var(--blue-soft);
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgb(var(--tint) / 0.1);
  font-size: 20px;
}
.fld:last-child { border-bottom: 0; }
.fld .k { color: var(--ink-3); font-size: 17px; }
.fld .k sup { opacity: 1; }
.fld .v { font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; }

.families {
  position: absolute;
  left: 140px;
  right: 140px;
  bottom: 120px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.families .lbl { font-size: 18px; color: var(--ink-3); margin-right: 8px; }
.fam {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 19px;
  font-weight: 600;
  color: var(--fc);
  border: 1px solid color-mix(in srgb, var(--fc) 45%, transparent);
  background: color-mix(in srgb, var(--fc) 10%, transparent);
}

/* ── 06 What it watches ────────────────────────────────── */

.watch { position: absolute; left: 140px; right: 140px; top: 400px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.wcard { padding: 30px; min-height: 470px; display: flex; flex-direction: column; }
.wcard .wh { display: flex; align-items: center; gap: 14px; }
.wcard .wh .ico {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--wc);
  background: color-mix(in srgb, var(--wc) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--wc) 35%, transparent);
}
.wcard h4 { font-size: 27px; font-weight: 700; }
.wcard > p { margin-top: 14px; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.wbody { margin-top: auto; padding-top: 24px; }

.promise { padding: 18px 20px; border-radius: 14px; background: var(--night-2); border: 1px solid var(--line); }
.promise .q { font-size: 19px; line-height: 1.45; }
.promise .meta { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--ink-3); font-family: var(--mono); }
.status {
  display: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--sc);
  background: color-mix(in srgb, var(--sc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sc) 45%, transparent);
}

.status.show { display: inline-block; }
.conflict { position: relative; display: flex; flex-direction: column; gap: 14px; }
.cmsg { padding: 14px 18px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); font-size: 17px; color: var(--ink-2); }
.cmsg b { color: var(--ink); }
.cmsg .d { display: block; font-family: var(--mono); font-size: 14px; color: var(--ink-3); margin-bottom: 4px; }
.cflag {
  align-self: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  color: var(--risk);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 30px rgba(248, 113, 113, 0.25);
}

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week .day { text-align: center; font-size: 14px; color: var(--ink-3); font-family: var(--mono); }
.week .slot { height: 42px; border-radius: 8px; background: rgb(var(--tint) / 0.08); position: relative; overflow: hidden; }
.week .slot.off { background: repeating-linear-gradient(135deg, rgb(var(--tint) / 0.05) 0 6px, transparent 6px 12px); }
.week .slot b { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--f, 0)); background: var(--clock, var(--ok)); opacity: 0.8; }
.clockline { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; font-size: 17px; color: var(--ink-2); }
.clockline b { font-family: var(--mono); font-size: 22px; color: var(--ink); }

/* ── 07 Dashboard ──────────────────────────────────────── */

.dash { position: absolute; left: 140px; right: 140px; top: 370px; height: 560px; padding: 26px; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: 150px 1fr; gap: 18px; }
.tile { padding: 18px 20px; border-radius: 14px; background: var(--night-2); border: 1px solid var(--line); position: relative; transition: transform 0.2s ease, border-color 0.2s ease; }
.tile:hover { transform: translateY(-3px); border-color: var(--tc); }
.tile .k { font-size: 15px; color: var(--ink-3); font-weight: 500; }
.tile .v { margin-top: 10px; font-size: 44px; font-weight: 700; letter-spacing: -0.02em; color: var(--tc, var(--ink)); font-variant-numeric: tabular-nums; }
.tile .t { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.tile.ring { box-shadow: 0 0 0 2px var(--tc), 0 0 40px color-mix(in srgb, var(--tc) 35%, transparent); }
.panel { grid-row: 2; border-radius: 14px; background: var(--night-2); border: 1px solid var(--line); padding: 20px 24px; position: relative; }
.panel h5 { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.panel.chart { grid-column: span 4; }
.panel.bars { grid-column: span 2; }
.chart svg { position: absolute; left: 24px; right: 24px; top: 60px; bottom: 20px; width: calc(100% - 48px); height: calc(100% - 80px); overflow: visible; }
.chart .gl { stroke: rgb(var(--tint) / 0.08); stroke-width: 1; }
.chart .ln { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.5)); }
.chart .ar { fill: url(#areaGrad); opacity: var(--p, 0); }
.bar { margin-top: 18px; }
.bar .bl { display: flex; justify-content: space-between; font-size: 16px; color: var(--ink-2); }
.bar .bt { margin-top: 7px; height: 10px; border-radius: 5px; background: rgb(var(--tint) / 0.08); overflow: hidden; }
.bar .bt b { display: block; height: 100%; width: calc(var(--p, 0) * var(--w)); border-radius: 5px; background: linear-gradient(90deg, var(--customer), var(--blue-soft)); }

.cursor { position: absolute; width: 34px; height: 34px; z-index: 5; pointer-events: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }
.tip {
  position: absolute;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  background: #fff;
  color: var(--night);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  z-index: 6;
}

/* ── 08 Email chat ─────────────────────────────────────── */

.chat { position: absolute; left: 140px; top: 360px; width: 1080px; height: 600px; padding: 28px 32px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.chat-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--ink-2); }
.chat-top b { color: var(--ink); }
.q-bubble { align-self: flex-end; max-width: 760px; padding: 16px 22px; border-radius: 18px 18px 4px 18px; font-size: 22px; background: linear-gradient(135deg, var(--blue), var(--blue-mid)); color: #fff; min-height: 60px; }
.typing::after { content: "▍"; margin-left: 2px; color: var(--cyan); animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* one of several spans shown at a time (data-cls="show@a-b") */
.swap > span { display: none; }
.swap > span.show { display: inline-flex; }
.chat-status { font-size: 16px; font-weight: 600; }
.chat-status > span { align-items: center; gap: 10px; }
.chat-status .working { color: var(--blue-pale); }
.chat-status .ok { color: var(--ok); }
.chat-status .icon { width: 18px; height: 18px; }
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(var(--tint) / 0.25); border-top-color: var(--cyan); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.answer { font-size: 20px; line-height: 1.6; color: var(--ink-2); }
.answer b { color: var(--ink); }
.atable { width: 100%; border-collapse: collapse; font-size: 17px; }
.atable th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.atable td { padding: 11px 12px; border-bottom: 1px solid rgb(var(--tint) / 0.08); color: var(--ink-2); }
.atable td:first-child { color: var(--ink); font-weight: 600; }
.atable .num { font-family: var(--mono); color: var(--ink); white-space: nowrap; }
.verified { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--ok); background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.4); }
.sources { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.src-email { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; font-size: 15px; color: var(--ink-2); background: var(--night-2); border: 1px solid var(--line-2); }
.src-email .icon { width: 16px; height: 16px; color: var(--blue-soft); }

/* Behind the answer: the lead agent and the specialists it fans out to */
.agents { position: absolute; right: 140px; width: 600px; height: 560px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.agents-h { display: flex; justify-content: space-between; align-items: center; }
.agents-h h4 { font-size: 15px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.agents-h span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; color: var(--ok); }
.agents-h span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 1.4s steps(1) infinite; }
.lead-node { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(11, 77, 255, 0.28), rgba(0, 200, 255, 0.08)); border: 1px solid rgba(47, 107, 255, 0.55); }
.lead-node .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--blue); }
.lead-node b { display: block; font-size: 19px; }
.lead-node small { font-size: 14px; color: var(--ink-2); }
.lanes { margin-left: 21px; padding-left: 20px; border-left: 2px solid rgb(var(--tint) / 0.16); display: flex; flex-direction: column; gap: 10px; }
.lane { position: relative; padding: 11px 14px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); }
.lane::before { content: ""; position: absolute; left: -21px; top: 21px; width: 20px; height: 2px; background: rgb(var(--tint) / 0.16); }
.ln-h { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.ln-tag { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.ln-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--lc, var(--cyan)); box-shadow: 0 0 10px var(--lc, var(--cyan)); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.ln-s { margin-top: 6px; font-family: var(--mono); font-size: 14.5px; color: var(--ink-2); }
.ln-s .res { font-family: "Inter", sans-serif; font-weight: 600; color: var(--ink); }
.lane.done { border-color: color-mix(in srgb, var(--lc) 45%, transparent); }
.lane.done .ln-dot, .critic.done .ln-dot { animation: none; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.critic { --lc: var(--blue-soft); display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; border: 1px dashed rgb(var(--tint) / 0.3); }
.critic .ln-dot { margin-top: 6px; }
.critic b { display: block; font-size: 16px; }
.critic small { font-size: 14px; color: var(--ink-2); }
.critic.done { border-style: solid; border-color: rgba(52, 211, 153, 0.45); }

/* the "ask anything" ticker under the chat */
.qmarquee { position: absolute; left: 140px; right: 140px; top: 878px; display: flex; align-items: center; gap: 18px; }
.qm-lbl { font-size: 15px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-soft); white-space: nowrap; }
.qm-view { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.qm-track { display: flex; gap: 12px; width: max-content; }
.qchip { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; font-size: 17px; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.qchip i { font-style: normal; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: var(--cyan); background: rgba(0, 200, 255, 0.1); }

/* ── 09 Suggested replies ──────────────────────────────── */

.a-bubble { align-self: flex-start; max-width: 880px; padding: 16px 20px; border-radius: 18px 18px 18px 4px; background: var(--night-3); border: 1px solid var(--line); font-size: 19px; color: var(--ink-2); }
.a-bubble b { color: var(--ink); }
.opts { margin-top: 12px; display: flex; gap: 12px; }
.opt { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); font-size: 16px; }
.opt b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.opt small { font-size: 13.5px; color: var(--ink-3); }
.opt.picked { border-color: var(--cyan); background: rgba(0, 200, 255, 0.12); box-shadow: 0 0 0 4px rgba(0, 200, 255, 0.12); }
.opt.dim { opacity: 0.4; }
.tparts { display: flex; flex-direction: column; gap: 12px; }
.tpart { padding-left: 16px; border-left: 3px solid var(--blue-mid); font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.tpart b { display: block; margin-bottom: 2px; font-size: 13.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-pale); }
.tpart .late { font-weight: 600; color: var(--warn); }
.draft { position: absolute; right: 140px; width: 600px; padding: 24px 26px; border-color: rgba(52, 211, 153, 0.35); }
.draft-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.draft-h h4 { font-size: 15px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ok); }
.draft-h .chip { font-size: 14px; padding: 5px 12px; }
.draft-b { margin-top: 18px; min-height: 250px; padding: 18px 20px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); font-size: 18px; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.draft-why { margin-top: 14px; font-size: 15.5px; font-style: italic; line-height: 1.5; color: var(--ink-2); }
.draft-act { margin-top: 16px; display: flex; align-items: center; gap: 14px; }
.draft-act .btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-size: 15px; font-weight: 700; color: #fff; background: var(--blue); }
.draft-act .note { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-3); }

/* ── 10 Reports ────────────────────────────────────────── */

.doc { position: absolute; left: 560px; top: 360px; width: 880px; padding: 40px 48px; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55); overflow: hidden; }
.doc .dh { display: flex; justify-content: space-between; align-items: flex-start; }
.doc .dh h3 { font-size: 34px; font-weight: 800; letter-spacing: -0.01em; }
.doc .dh small { display: block; font-size: 16px; color: var(--paper-sub); margin-top: 6px; }
.doc .period { padding: 8px 14px; border-radius: 10px; font-size: 15px; font-weight: 700; color: var(--paper-accent); background: rgba(11, 77, 255, 0.1); border: 1px solid rgba(11, 77, 255, 0.3); white-space: nowrap; }
.doc .es { margin-top: 26px; padding: 18px 22px; border-radius: 12px; background: var(--paper-card); border-left: 4px solid var(--blue); font-size: 18px; line-height: 1.55; color: var(--paper-card-ink); }
.doc .es b { display: block; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-accent); margin-bottom: 6px; }
.sec { margin-top: 14px; display: grid; grid-template-columns: 40px 1fr 160px; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 12px; background: var(--paper-card); font-size: 19px; font-weight: 600; color: var(--paper-card-ink); }
.sec .no { font-family: var(--mono); font-size: 15px; color: var(--paper-accent); }
.sec .mini { height: 8px; border-radius: 4px; background: var(--paper-track); overflow: hidden; }
.sec .mini b { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 4px; }
.exports { position: absolute; left: 1490px; top: 560px; display: flex; flex-direction: column; gap: 16px; }
.exp { display: flex; align-items: center; gap: 14px; padding: 16px 22px; width: 260px; font-size: 21px; font-weight: 700; }
.exp .ext { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: #fff; background: var(--ec); }
.repsteps { position: absolute; left: 140px; top: 400px; width: 380px; display: flex; flex-direction: column; gap: 18px; }
.rs { display: grid; grid-template-columns: 34px 1fr; gap: 14px; font-size: 18px; line-height: 1.45; color: var(--ink-2); }
.rs .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 14px; color: var(--cyan); border: 1px solid rgba(0, 200, 255, 0.4); }
.rs b { display: block; color: var(--ink); }

/* ── 10 Trust ──────────────────────────────────────────── */

.trust { position: absolute; left: 140px; right: 140px; top: 390px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.tc { padding: 28px 30px; min-height: 230px; }
.tc .ico { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; color: var(--cyan); background: rgba(0, 200, 255, 0.08); border: 1px solid rgba(0, 200, 255, 0.22); }
.tc h4 { margin-top: 20px; font-size: 25px; font-weight: 700; }
.tc p { margin-top: 10px; font-size: 18px; line-height: 1.55; color: var(--ink-2); }

/* ── 11 Outro ──────────────────────────────────────────── */

#s-outro { display: none; padding: 0; }
#s-outro.active { display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.outro-logo { width: 150px; height: 150px; }
.outro-title { margin-top: 36px; font-size: 76px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
.outro-sub { margin-top: 22px; font-size: 28px; color: var(--ink-2); }
.outro-chips { margin-top: 40px; display: flex; gap: 14px; justify-content: center; }
.outro-chips .chip { font-size: 19px; padding: 10px 18px; }
.outro-url { margin-top: 54px; font-family: var(--mono); font-size: 22px; color: var(--blue-pale); letter-spacing: 0.06em; }

/* ── Player controls (outside the recorded stage) ──────── */

#controls {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(1180px, calc(100vw - 32px));
  padding: 12px 16px 14px;
  border-radius: 16px;
  background: rgb(var(--surface) / 0.88);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 100;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 13px;
}
#controls.idle { opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; }
body.record #controls { display: none; }
.ctl-row { display: flex; align-items: center; gap: 10px; }
.ctl-btn {
  height: 34px;
  min-width: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ctl-btn:hover { border-color: var(--blue-soft); }
.ctl-btn.on { background: rgba(11, 77, 255, 0.35); border-color: var(--blue-mid); }
.ctl-btn svg { width: 16px; height: 16px; }
.ctl-time { font-family: var(--mono); color: var(--ink-2); min-width: 104px; text-align: center; }
.ctl-spacer { flex: 1; }
.ctl-hold { color: var(--cyan); font-weight: 600; opacity: 0; transition: opacity 0.2s; }
.ctl-hold.on { opacity: 1; }
#scrub { position: relative; height: 22px; margin-top: 10px; cursor: pointer; }
#scrub .rail { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: rgb(var(--tint) / 0.15); }
#scrub .fill { position: absolute; left: 0; top: 9px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--cyan), var(--blue-mid)); }
#scrub .knob { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(11, 77, 255, 0.4); }
#scrub .tick { position: absolute; top: 6px; width: 2px; height: 10px; margin-left: -1px; background: rgb(var(--tint) / 0.35); }
#chapters { display: flex; gap: 4px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
#chapters button {
  flex: 1 0 auto;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
#chapters button:hover { color: var(--ink); background: var(--panel-2); }
#chapters button.cur { color: var(--ink); border-color: var(--line-2); background: var(--panel-2); }
#chapters button span { font-family: var(--mono); color: var(--blue-soft); margin-right: 6px; }

#help {
  position: fixed;
  right: 18px;
  top: 18px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgb(var(--surface) / 0.94);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.9;
  z-index: 101;
  display: none;
}
#help.on { display: block; }
#help kbd { font-family: var(--mono); padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--ink); margin-right: 6px; }

/* Embedded on a web page (?embed): no player bar; click the film to pause or play */
body.embed #controls { display: none; }


/* small frames: drop the chapter rail, the scrubber still has chapter ticks */
@media (max-width: 900px) {
  #chapters { display: none; }
  .ctl-time { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .typing::after { animation: none; }
}
