/* ConjureIt's colours, taken from the icon (logo.svg). Dark by default; light follows the system or the toggle. */
:root {
  color-scheme: dark;
  --bg: #090612;
  --bg-raise: #120b20;
  --bg-pane: #0d0818;
  --top-bg: #090612;
  --pill-bg: rgb(18 11 32 / 0.72);
  --card-bg: linear-gradient(180deg, rgb(33 18 58 / 0.52), rgb(18 11 32 / 0.35));
  --media-glow: rgb(116 33 247 / 0.16);
  --line: rgb(201 163 238 / 0.14);
  --line-strong: rgb(201 163 238 / 0.28);
  --text: #efe7fb;
  --em: #d5c7eb;
  --dim: #b0a0cc;
  --faint: #887aa8;
  --violet: #7421f7;
  --orchid: #c464f7;
  --pink: #f9bff8;
  --link: #f9bff8;
  --link-line: rgb(249 191 248 / 0.4);
  --code: #f9bff8;
  --headline: linear-gradient(100deg, #f9bff8, #c464f7 45%, #9a4bff 75%, #7421f7);
  --glow: rgb(138 53 245 / 0.26);
  --bad: #f08a93;
  --bad-bg: rgb(224 108 117 / 0.12);
  --good: #8de6b6;
  --good-bg: rgb(100 220 155 / 0.12);

  /* crisp macOS-style elevation (small blur radius so Chrome never stalls rasterizing huge shadows on scroll) */
  --window-shadow: 0 18px 38px rgb(0 0 0 / 0.48), 0 0 0 1px rgb(0 0 0 / 0.4);
  --lights: #3a2d52;
  --strip: rgb(255 255 255 / 0.025);
  --strip-edge: rgb(255 255 255 / 0.045);
  --strip-focused: rgb(158 201 255 / 0.1);
  --strip-focused-text: #c3dcfb;
  --ice: #9ec9ff;
  --screen-text: #efe7fb;
  --screen-out: #d9cfec;
  --prompt: #c464f7;
  --ok: #e6a8f7;
  --url: #9ec9ff;
  --cursor: #f9bff8;

  --sans: system-ui, -apple-system, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 16px;
}

/* Light: crisp white, violet accents, light terminal chrome. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #ffffff;
    --bg-raise: #faf8ff;
    --bg-pane: #ffffff;
    --top-bg: #ffffff;
    --pill-bg: rgb(250 248 255 / 0.92);
    --card-bg: linear-gradient(180deg, #fbf9ff, #ffffff);
    --media-glow: rgb(166 74 248 / 0.1);
    --line: rgb(76 48 140 / 0.11);
    --line-strong: rgb(76 48 140 / 0.22);
    --text: #1c1430;
    --em: #35294f;
    --dim: #554a6b;
    --faint: #756a8c;
    --violet: #6c1af6;
    --orchid: #a64af8;
    --pink: #c464f7;
    --link: #7a2ee6;
    --link-line: rgb(122 46 230 / 0.35);
    --code: #8a32d8;
    --headline: linear-gradient(100deg, #c95ce0, #9a3ef5 40%, #7a26f7 72%, #6014e8);
    --glow: rgb(196 100 247 / 0.14);
    --bad: #b83340;
    --bad-bg: rgb(214 64 79 / 0.08);
    --good: #187a4a;
    --good-bg: rgb(24 148 86 / 0.09);
    --window-shadow: 0 14px 32px rgb(60 30 120 / 0.1), 0 2px 6px rgb(60 30 120 / 0.06);
    --lights: #e3dcef;
    --strip: #f6f3fc;
    --strip-edge: rgb(76 48 140 / 0.08);
    --strip-focused: #e6f0fe;
    --strip-focused-text: #2d5f9e;
    --ice: #3b82d6;
    --screen-text: #1c1430;
    --screen-out: #3d3452;
    --prompt: #a64af8;
    --ok: #8a32d8;
    --url: #2d5f9e;
    --cursor: #a64af8;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-raise: #faf8ff;
  --bg-pane: #ffffff;
  --top-bg: #ffffff;
  --pill-bg: rgb(250 248 255 / 0.92);
  --card-bg: linear-gradient(180deg, #fbf9ff, #ffffff);
  --media-glow: rgb(166 74 248 / 0.1);
  --line: rgb(76 48 140 / 0.11);
  --line-strong: rgb(76 48 140 / 0.22);
  --text: #1c1430;
  --em: #35294f;
  --dim: #554a6b;
  --faint: #756a8c;
  --violet: #6c1af6;
  --orchid: #a64af8;
  --pink: #c464f7;
  --link: #7a2ee6;
  --link-line: rgb(122 46 230 / 0.35);
  --code: #8a32d8;
  --headline: linear-gradient(100deg, #c95ce0, #9a3ef5 40%, #7a26f7 72%, #6014e8);
  --glow: rgb(196 100 247 / 0.14);
  --bad: #b83340;
  --bad-bg: rgb(214 64 79 / 0.08);
  --good: #187a4a;
  --good-bg: rgb(24 148 86 / 0.09);
  --window-shadow: 0 14px 32px rgb(60 30 120 / 0.1), 0 2px 6px rgb(60 30 120 / 0.06);
  --lights: #e3dcef;
  --strip: #f6f3fc;
  --strip-edge: rgb(76 48 140 / 0.08);
  --strip-focused: #e6f0fe;
  --strip-focused-text: #2d5f9e;
  --ice: #3b82d6;
  --screen-text: #1c1430;
  --screen-out: #3d3452;
  --prompt: #a64af8;
  --ok: #8a32d8;
  --url: #2d5f9e;
  --cursor: #a64af8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s, color 0.25s;
}

a { color: var(--link); text-decoration-color: var(--link-line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
strong { color: var(--em); font-weight: 500; }
em { color: var(--em); font-style: italic; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.89em; color: var(--code); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Header (opaque-tinted without backdrop-filter blur so Chrome never re-blurs the page on every scroll frame) */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--top-bg);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.top-right { display: flex; align-items: center; gap: 18px; min-width: 0; }
.top nav { display: flex; gap: 18px; }
.top nav a { color: var(--dim); text-decoration: none; font-size: 14px; white-space: nowrap; }
.top nav a:hover { color: var(--text); }
.theme-toggle {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; flex-shrink: 0;
  border-radius: 8px; border: 1px solid var(--line-strong); background: none;
  color: var(--dim); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
@media (max-width: 640px) {
  .top-right, .top nav { gap: 11px; }
  .top nav a { font-size: 13px; }
  .brand span { display: none; }
}
@media (max-width: 390px) {
  .top nav a[href="#recording"] { display: none; }
}

/* Hero: crisp single-column left-aligned editorial header + subtle ambient glow + full-width unclipped live demo */
.hero {
  position: relative;
  isolation: isolate;
  padding: 52px 0 72px;
  overflow: clip;
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  contain: paint;
  background:
    radial-gradient(760px 360px at 28% 8%, var(--glow), transparent 72%),
    radial-gradient(540px 320px at 84% 48%, var(--media-glow), transparent 74%);
}
.hero-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 30px;
}
.hero-badge {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font: 12.5px/1.3 var(--mono); color: var(--dim);
  padding: 5px 13px; border-radius: 99px;
  border: 1px solid var(--line-strong); background: var(--pill-bg);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orchid);
  box-shadow: 0 0 8px var(--orchid);
}
.hero-badge .sep { color: var(--faint); }
h1 {
  font-size: clamp(2.35rem, 4.9vw, 4.05rem);
  line-height: 1.06; letter-spacing: -0.038em;
  margin: 20px 0 18px;
  color: var(--text);
  text-wrap: balance;
}
h1 .h1-accent {
  background: var(--headline);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 640px) { h1 br { display: none; } }
.lede {
  margin: 0 0 24px;
  color: var(--dim);
  font-size: clamp(1.03rem, 1.3vw, 1.14rem);
  line-height: 1.62;
  max-width: 66ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 550 14px/1 var(--sans); color: var(--text); text-decoration: none;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--card-bg);
  transition: border-color 0.18s ease;
}
.cta-btn:hover { border-color: var(--orchid); }
.cta-btn .arrow { color: var(--orchid); }
.ghost-link {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 14px/1 var(--sans); color: var(--dim); text-decoration: none;
  padding: 6px 2px;
}
.ghost-link:hover { color: var(--text); }
@media (max-width: 860px) {
  .hero { padding: 32px 0 52px; }
  .hero-header { margin-bottom: 24px; }
}

/* Live ConjureIt hero window: full-width, unclipped, zero invisible fade bugs */
.window {
  margin: 0; text-align: left;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raise);
  box-shadow: var(--window-shadow);
  overflow: clip;
  contain: layout paint;
}
.titlebar {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 36px; border-bottom: 1px solid var(--line);
}
.lights { position: absolute; left: 14px; display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--lights); }
.title { font-size: 12.5px; color: var(--dim); font-weight: 600; }
.replay {
  position: absolute; right: 10px;
  font: 12px var(--sans); color: var(--dim); background: none; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 10px;
}
.replay:hover { color: var(--text); }

.panes { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); }
.panes[data-split="true"] { grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); }
@media (max-width: 720px) {
  .panes[data-split="true"] { grid-template-columns: 1fr; }
}
.pane { background: var(--bg-pane); display: flex; flex-direction: column; min-width: 0; }
.pane[hidden] { display: none; }

.strip {
  display: flex; justify-content: space-between; gap: 12px;
  font: 12px/22px var(--mono); color: var(--faint); padding: 0 10px;
  background: var(--strip);
  transition: background-color 0.2s, color 0.2s;
}
.strip .status { color: var(--dim); }
.strip.foot { border-top: 1px solid var(--strip-edge); }
.strip:not(.foot) { border-bottom: 1px solid var(--strip-edge); }
.pane[data-focused] .strip:not(.foot) { background: var(--strip-focused); color: var(--strip-focused-text); }
.pane[data-focused] .key { color: var(--ice); }

.screen {
  margin: 0; padding: 12px 14px;
  font-size: 13px; line-height: 1.55; color: var(--screen-text);
  min-height: calc(13px * 1.55 * 16 + 24px);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  .screen { font-size: 12px; min-height: calc(12px * 1.55 * 8 + 20px); }
}
.screen .p { color: var(--prompt); }
.screen .typed { color: var(--screen-text); }
.pane[data-pane="agent"] .typed { font-weight: 600; }
.screen .dot { color: var(--orchid); }
.screen .cmd { color: var(--screen-text); }
.screen .say-dot { color: var(--screen-text); }
.screen .say { color: var(--screen-text); }
.screen .out { color: var(--screen-out); }
.screen .dim { color: var(--faint); }
.screen .ok { color: var(--ok); font-weight: 600; }
.screen .url { color: var(--url); text-decoration: underline; text-underline-offset: 2px; }
.cursor {
  display: inline-block; width: 0.6em; height: 1.15em; vertical-align: text-bottom;
  background: var(--cursor); will-change: opacity; animation: blink 1.1s steps(1) infinite;
}
.pane:not([data-focused]) .cursor { background: none; outline: 1px solid var(--faint); outline-offset: -1px; animation: none; }
.window.is-offscreen .cursor { animation-play-state: paused; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.window figcaption {
  font-size: 12.5px; color: var(--faint); text-align: left;
  padding: 10px 14px; border-top: 1px solid var(--line);
}

/* Shared section typography */
.band { padding: 80px 0; border-top: 1px solid var(--line); }
.eyebrow {
  margin: 0 0 10px; font: 600 12px/1.4 var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--orchid);
}
h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  letter-spacing: -0.03em; line-height: 1.12;
  margin: 0 0 22px; text-wrap: balance;
}
h3 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 12px; }

/* Story: 3 chapters beside a fixed-height sticky visual stage (pure GPU opacity crossfade — zero layout jump) */
.story-band { padding: 84px 0; border-top: 1px solid var(--line); }
.section-intro { max-width: 680px; margin-bottom: 44px; }
.story-lead { margin: 0; color: var(--dim); font-size: 1.06rem; line-height: 1.62; }
.scrolly {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 56px;
  align-items: start;
}
.beats { display: flex; flex-direction: column; gap: 68px; padding-bottom: 104px; }
.beat {
  padding: 16px 0 16px 22px;
  border-left: 2px solid var(--line);
}
.beat.is-active { border-left-color: var(--orchid); }
.beat-num { display: block; font: 600 12px/1 var(--mono); color: var(--orchid); margin-bottom: 10px; }
.beat p { margin: 0 0 13px; color: var(--dim); font-size: 1.01rem; }
.beat p:last-child { margin-bottom: 0; }

.stage-col { position: sticky; top: 84px; }
.stage {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raise);
  box-shadow: var(--window-shadow);
  overflow: clip;
  contain: layout paint;
}
.stage-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--strip);
}
.stage-dots { display: flex; gap: 6px; }
.stage-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--lights); }
.stage-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.stage-tabs button {
  font: 11.5px/1 var(--mono); color: var(--faint);
  background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 5px 8px; cursor: pointer;
}
.stage-tabs button[aria-selected="true"] {
  color: var(--text); border-color: var(--line-strong); background: var(--bg-pane);
}
/* Stack all 4 scenes in one grid cell so height NEVER changes during scroll */
.stage-body {
  display: grid;
  padding: 24px;
}
.scene {
  grid-area: 1 / 1;
  align-self: center;
  opacity: 0;
  transform: translateZ(0);
  will-change: opacity;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.scene.is-active {
  opacity: 1;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .scene { transition: none; }
}
.scene-tag { margin: 0 0 18px; font: 12px/1.3 var(--mono); color: var(--faint); }
.scene-note {
  margin: 18px 0 0; font-size: 13.5px; font-style: italic; color: var(--dim);
  padding-left: 12px; border-left: 2px solid var(--line-strong);
}

/* Stage visual 1: Lineage */
.lineage { display: flex; flex-direction: column; gap: 8px; }
.node {
  padding: 13px 15px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-pane);
  display: flex; flex-direction: column; gap: 4px;
}
.node.accent { border-color: var(--orchid); background: var(--card-bg); }
.node-k { font: 600 13px/1.2 var(--mono); color: var(--text); }
.node-v { font-size: 13.5px; color: var(--dim); }
.connector { padding-left: 15px; color: var(--faint); font: 13px/1 var(--mono); }

/* Stage visual 2: Daemon / UI split */
.arch { display: flex; flex-direction: column; gap: 10px; }
.arch-box {
  padding: 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-pane);
}
.arch-box.swap { border-style: dashed; border-color: var(--orchid); }
.arch-box.steady { border-color: var(--line-strong); background: var(--card-bg); }
.arch-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.arch-box p { margin: 0; font-size: 13.5px; color: var(--dim); }
.arch-link { text-align: center; font: 12px/1 var(--mono); color: var(--faint); padding: 2px 0; }
.pill-mini {
  font: 11px/1 var(--mono); padding: 4px 8px; border-radius: 99px;
  border: 1px solid var(--line-strong); color: var(--orchid);
}
.pill-mini.ok { color: var(--good); border-color: currentColor; }
.seats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.seats span {
  font: 11.5px/1 var(--mono); color: var(--text);
  padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-pane);
}

/* Stage visual 3: Off-screen & virtual clock */
.offscreen-card { display: flex; flex-direction: column; gap: 10px; }
.kv {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-pane);
  font-size: 13px;
}
.kv span { color: var(--faint); font-family: var(--mono); }
.kv strong { font-weight: 550; color: var(--text); }
.clock-bar {
  margin-top: 4px; padding: 13px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--card-bg);
}
.clock-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 10px; color: var(--dim); }
.clock-track {
  position: relative; display: flex; justify-content: space-between;
  padding-top: 14px; font: 11px/1 var(--mono); color: var(--faint);
}
.clock-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 4px; border-radius: 99px;
  background: var(--line-strong);
}
.clock-track i {
  position: absolute; left: 0; top: 4px; height: 4px; width: 58%; border-radius: 99px;
  background: var(--headline);
}

/* Stage visual 4: Lock screen */
.lock-card { display: flex; flex-direction: column; gap: 12px; }
.lock-row {
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; font-size: 13.5px;
}
.lock-row span { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.lock-row strong { font-weight: 550; color: var(--text); }
.lock-row.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.lock-row.bad span { color: var(--bad); }
.lock-row.good { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.lock-row.good span { color: var(--good); }
.lock-result {
  display: flex; align-items: baseline; gap: 14px; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-pane);
  font-size: 14px; color: var(--dim);
}
.big-num {
  font: 700 2.2rem/1 var(--mono); letter-spacing: -0.03em;
  background: var(--headline); -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 900px) {
  .story-band { padding: 60px 0; }
  .scrolly { grid-template-columns: 1fr; gap: 28px; }
  .stage-col { position: static; order: -1; }
  .beats { gap: 32px; }
}

/* Pull quote + Retina self-recorded video cards */
.pull {
  margin: 0 0 18px; padding: 14px 18px;
  border-left: 3px solid var(--orchid);
  background: var(--card-bg); border-radius: 0 12px 12px 0;
  color: var(--text); font-size: 1.03rem; line-height: 1.55;
}
.pull footer { margin-top: 8px; font: 12px/1 var(--mono); color: var(--faint); font-style: normal; }

.video-card {
  margin: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raise); box-shadow: var(--window-shadow); overflow: clip;
  contain: layout paint;
}
.video-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line); background: var(--strip);
  font: 12px/1.2 var(--mono); color: var(--faint);
}
.video-label { white-space: nowrap; }
.video-controls { display: flex; align-items: center; gap: 8px; }
.seg-group {
  display: inline-flex; gap: 2px; padding: 2px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--bg-pane);
}
.seg-group button {
  font: 500 11.5px/1 var(--mono); color: var(--faint);
  background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 5px 8px; cursor: pointer; white-space: nowrap;
}
.seg-group button:hover { color: var(--text); }
.seg-group button[aria-pressed="true"],
.seg-group button[aria-selected="true"] {
  color: var(--text); border-color: var(--line-strong); background: var(--bg-raise);
}
.mini-btn {
  font: 500 12px/1 var(--sans); color: var(--text);
  background: var(--bg-pane); border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 6px 10px; cursor: pointer;
}
.mini-btn:hover { border-color: var(--orchid); }
.mini-btn.zoom-btn { color: var(--link); border-color: var(--link-line); }
.mini-btn.zoom-btn:hover { border-color: var(--orchid); color: var(--text); }
.video-frame {
  position: relative;
  background: #141418;
  line-height: 0;
  cursor: zoom-in;
  overflow: clip;
}
.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.24s ease;
}
.video-frame:hover video {
  transform: scale(1.012);
}
.zoom-ear {
  position: absolute; right: 0; bottom: 0;
  width: 68px; height: 68px;
  pointer-events: none;
  color: #dcd0f2;
  background: linear-gradient(
    135deg,
    transparent 0 46%,
    rgb(0 0 0 / 0.34) 46% 49.5%,
    rgb(201 163 238 / 0.48) 49.5% 51.2%,
    #2e2049 51.2%,
    #1e1433 100%
  );
  transform-origin: bottom right;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease;
}
.zoom-ear svg {
  position: absolute; right: 9px; bottom: 9px;
  width: 20px; height: 20px;
}
.video-frame:hover .zoom-ear {
  color: #ffffff;
  background: linear-gradient(
    135deg,
    transparent 0 46%,
    rgb(0 0 0 / 0.36) 46% 49.5%,
    rgb(249 191 248 / 0.72) 49.5% 51.2%,
    #582c8f 51.2%,
    #381a63 100%
  );
  transform: scale(1.14);
}
.zoom-tip {
  position: absolute; right: 56px; bottom: 11px;
  pointer-events: none;
  font: 500 11.5px/1 var(--mono); color: #efe7fb;
  padding: 6px 10px; border-radius: 99px;
  background: rgb(14 9 26 / 0.86);
  border: 1px solid rgb(201 163 238 / 0.3);
  opacity: 0.78;
  transition: opacity 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.video-frame:hover .zoom-tip {
  opacity: 1;
  border-color: #c464f7;
  transform: translateX(-4px);
}
@media (prefers-reduced-motion: reduce) {
  .video-frame video, .zoom-ear, .zoom-tip { transition: none; }
}
.video-card figcaption {
  font-size: 12.5px; color: var(--faint); line-height: 1.5;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.video-card figcaption strong { color: var(--text); font-weight: 600; }

/* Full-size video lightbox (native <dialog>, studio darkroom only while open) */
.lightbox {
  padding: 0; border: 0; background: transparent; max-width: none; max-height: none;
  color: #efe7fb;
}
.lightbox::backdrop {
  background: rgb(5 3 12 / 0.88);
}
.lb-shell {
  width: min(94vw, 1320px);
  max-height: 92vh;
  display: flex; flex-direction: column;
  border: 1px solid rgb(201 163 238 / 0.28);
  border-radius: var(--radius);
  background: #110b1e;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.65);
  overflow: clip;
}
.lb-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid rgb(201 163 238 / 0.14);
  background: #171026;
}
.lb-title { font: 500 13px/1.2 var(--mono); color: #b0a0cc; }
.lb-bar .seg-group { border-color: rgb(201 163 238 / 0.16); background: #0d0818; }
.lb-bar .seg-group button { color: #887aa8; }
.lb-bar .seg-group button:hover,
.lb-bar .seg-group button[aria-pressed="true"] { color: #efe7fb; }
.lb-bar .seg-group button[aria-pressed="true"] { background: #211536; border-color: rgb(201 163 238 / 0.3); }
.lb-bar .mini-btn { background: #0d0818; color: #efe7fb; border-color: rgb(201 163 238 / 0.28); }
.lb-stage {
  background: #141418;
  display: grid; place-items: center;
  min-height: 0; flex: 1 1 auto;
  overflow: clip;
}
.lb-stage video {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 104px);
  width: auto; height: auto;
  cursor: pointer;
}
.lb-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid rgb(201 163 238 / 0.14);
  background: #171026;
  font: 12px/1 var(--mono); color: #887aa8;
}
.lb-seek {
  flex: 1 1 220px;
  accent-color: #c464f7;
  cursor: pointer;
}
.lb-time { color: #efe7fb; white-space: nowrap; }
.lb-hint { white-space: nowrap; }
@media (max-width: 680px) { .lb-hint { display: none; } }

/* Interactive timeline card */
.timeline-card {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raise); box-shadow: var(--window-shadow); overflow: clip;
  contain: layout paint;
}
.timeline-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--strip); font: 12px/1.2 var(--mono); color: var(--faint);
}
.timeline-controls { display: flex; align-items: center; gap: 10px; }
.rec-dot { color: var(--bad); font-weight: 600; white-space: nowrap; }
.timeline-lines {
  padding: 10px;
  font: 12px/1.55 var(--mono);
  display: flex; flex-direction: column; gap: 1px;
}
.tl-line {
  display: grid; grid-template-columns: 48px 30px minmax(0, 1fr); gap: 8px; align-items: baseline;
  width: 100%; text-align: left;
  font: inherit; color: var(--screen-out); background: none; border: 0;
  padding: 5px 8px; border-radius: 7px; cursor: pointer;
  overflow-wrap: anywhere;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tl-line .t { text-align: right; color: var(--dim); white-space: nowrap; }
.tl-line .f { color: var(--faint); white-space: nowrap; }
.tl-line .m { min-width: 0; }
.tl-line .said { color: var(--orchid); font-weight: 600; }
.tl-line .act { color: var(--ice); font-weight: 600; }
.tl-line .ev { color: var(--faint); }
.tl-line:hover { background: rgb(196 100 247 / 0.08); }
.tl-line.is-lit { background: rgb(196 100 247 / 0.16); color: var(--text); }
.tl-line.is-lit .ev { color: var(--dim); }

/* Rows, splits, code, media placeholders */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: center; }
.row.flip .copy { order: 2; }
@media (max-width: 860px) {
  .band { padding: 56px 0; }
  .row { grid-template-columns: 1fr; gap: 24px; }
  .row.flip .copy { order: 0; }
}
.copy p, .copy li { color: var(--dim); }
.copy p { margin: 0 0 14px; }
.copy ul { padding-left: 1.1em; margin: 16px 0 0; }
.copy li { margin: 7px 0; }
.copy li::marker { color: var(--orchid); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 44px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 18px; } }
.split p { color: var(--dim); margin: 0 0 14px; }

.code {
  margin: 0; padding: 20px 22px; border-radius: var(--radius);
  background: var(--bg-raise); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.7; overflow-x: auto;
}
.code.small { font-size: 12.5px; }
.code .c { color: var(--faint); }
.code .t { color: var(--dim); }
.code .said { color: var(--orchid); font-weight: 600; }

kbd {
  font-size: 13px; padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--bg-raise); color: var(--text);
}
@media (max-width: 520px) { .code { padding: 16px; } }

.origin-card {
  padding: 22px 24px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raise);
  box-shadow: var(--window-shadow);
}

.bottom { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.bottom p { margin: 0; color: var(--faint); font-size: 14px; }
