/* Novo CVI (colours from brand/cvi.json; logo from the 2026 Novo rebrand). The brand face is Apis; drop the licensed
   woff2 files into public/fonts/ and uncomment the @font-face below. Never
   commit them to a public repository. Inter Tight is the open fallback. */

/*
@font-face { font-family: "Apis"; src: url("fonts/Apis-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Apis"; src: url("fonts/Apis-Medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Apis"; src: url("fonts/Apis-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
*/
@font-face {
  font-family: "Inter Tight";
  src: url("fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #001965;
  --sea: #005ad2;
  --light-blue: #3b97de;
  --teal: #2a918b;
  --pink: #eea7bf;
  --granite: #939aa7;
  --warm-grey: #ccc5bd;
  --warm-grey-light: #ebe8e5;
  --white: #fff;
  --paper: #f7f5f3;

  --font: "Apis", "Apis For Office", "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --top: max(env(safe-area-inset-top), 0px);

  /* set by app.js from the blended scene background */
  --bg: var(--navy);
  --chrome: var(--white);
  --chrome-soft: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}
body.locked { overflow: hidden; }
body[data-theme="light"] { --chrome: var(--navy); --chrome-soft: rgba(0, 25, 101, 0.12); }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
em { font-style: normal; color: var(--accent, var(--light-blue)); }

/* ---------- gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 16px;
  background: var(--paper);
  color: var(--navy);
}
.gate[hidden] { display: none; }
.gate-card { width: min(380px, 100%); display: grid; justify-items: center; gap: 14px; text-align: center; }
.gate-logo { width: 150px; height: auto; margin-bottom: 18px; }
.gate-kicker { display: flex; align-items: center; gap: 8px; font-weight: 650; letter-spacing: 0.02em; font-size: 15px; }
.gate-brain { width: 26px; height: auto; }
.gate-lead { color: #4b5470; font-size: 15px; }
.gate-row { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.gate-row input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px;
  border: 1.5px solid var(--warm-grey); border-radius: 999px;
  background: var(--white); color: var(--navy); font: inherit; font-size: 15px;
  outline: none; transition: border-color 0.2s;
}
.gate-row input:focus { border-color: var(--sea); }
.gate-row button {
  height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--navy); color: var(--white); font-weight: 600;
}
.gate-error { min-height: 1.3em; color: #b4234a; font-size: 14px; }
.gate.shake .gate-row { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center; padding: 16px;
  background: radial-gradient(120% 90% at 70% 110%, rgba(0, 90, 210, 0.55), transparent 60%), rgba(0, 25, 101, 0.82);
  backdrop-filter: blur(6px);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.intro[hidden] { display: none; }
.intro.out { opacity: 0; visibility: hidden; }
.intro-card { max-width: 620px; text-align: center; display: grid; gap: 18px; justify-items: center; }
.intro-brain { width: 96px; height: auto; margin-bottom: 6px; }
.intro-kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 600; color: var(--light-blue); }
.intro-title { font-size: clamp(48px, 9vw, 104px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; }
.intro-title span { color: var(--white); background: linear-gradient(90deg, #fff, #9fcbf0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.intro-lead { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.45; color: rgba(255, 255, 255, 0.82); max-width: 30ch; }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.intro-note { font-size: 13px; color: rgba(255, 255, 255, 0.55); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 24px; border-radius: 999px;
  font-size: 16px; font-weight: 600; border: 1.5px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-primary { background: var(--white); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: var(--white); }

/* ---------- stage ---------- */
.track { width: 1px; }
.stage {
  position: fixed; inset: 0; height: 100vh; height: 100dvh; overflow: hidden;
}
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.scene {
  position: absolute; inset: 0;
  padding: calc(88px + var(--top)) var(--gutter) 120px;
  opacity: var(--vis, 0);
  visibility: hidden;
  pointer-events: none;
  will-change: opacity;
}
@media (min-width: 861px) {
  /* keep clear of the chapter rail */
  .scene { padding-right: calc(var(--gutter) + 48px); }
  .flow { right: calc(var(--gutter) + 48px) !important; }
}
.scene.live { visibility: visible; }
.scene.active { pointer-events: auto; }
.scene.dark { color: var(--white); --accent: var(--light-blue); --muted: rgba(255, 255, 255, 0.72); }
.scene.light { color: var(--navy); --accent: var(--sea); --muted: #4b5470; }

/* elements reveal as their voiceover line starts (class .on set by app.js) */
[data-line] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-line].on { opacity: 1; transform: none; }
/* data-hide: gone again once a later line starts */
[data-line].on.off { opacity: 0; transform: translateY(-16px); pointer-events: none; }

.kicker {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 650;
  color: var(--accent);
}
.scene h2 {
  font-size: clamp(30px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 650;
  max-width: 18ch; margin-top: 14px;
}
.sub { font-size: clamp(18px, 1.9vw, 24px); line-height: 1.4; color: var(--muted); margin-top: 14px; max-width: 32ch; }

/* hook */
.hook-wrap { height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: 1100px; }
.questions { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: clamp(10px, 2vh, 22px); }
.questions li { display: flex; align-items: baseline; gap: clamp(14px, 2vw, 28px); }
.q-key {
  flex: none; width: 3.4em; font-size: clamp(13px, 1.3vw, 16px); font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--light-blue);
  transform: translateY(-0.4em);
}
.q-text { font-size: clamp(30px, 5.6vw, 76px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.02; }

/* today: one HCP, the signals around them */
.today-head { position: relative; z-index: 2; max-width: 560px; }
.today-head .sub { max-width: 26ch; }
.signals { position: absolute; left: 40%; right: calc(var(--gutter) + 56px); top: 16%; bottom: 15%; pointer-events: none; }
.profile {
  position: absolute; left: 50%; top: 50%; width: min(300px, 70%);
  translate: -50% -50%;
  background: var(--white); border-radius: 20px; padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 25, 101, 0.14), 0 0 0 1px rgba(0, 25, 101, 0.06);
  display: grid; gap: 14px; font-size: 13px;
}
.profile header, .nba-hcp { display: flex; gap: 12px; align-items: center; }
.profile header b, .nba-hcp b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.profile header small, .nba-hcp small { color: #4b5470; }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--warm-grey-light); font-size: 11px; font-weight: 700; color: var(--navy); }
.profile dl { margin: 0; display: grid; gap: 8px; }
.profile dl div { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--warm-grey-light); }
.profile dt { color: #4b5470; }
.profile dd { margin: 0; font-weight: 650; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.stale { font-style: normal; font-size: 11px; font-weight: 600; color: #8a5a00; background: #f6ead2; padding: 2px 7px; border-radius: 999px; }
.sig {
  position: absolute; translate: -50% -50%;
  display: grid; gap: 2px; padding: 9px 14px; border-radius: 14px;
  background: var(--white); border: 1px solid var(--warm-grey);
  box-shadow: 0 8px 22px rgba(0, 25, 101, 0.08);
  font-size: 13px; white-space: nowrap;
}
.sig b { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sea); }
.sig:nth-of-type(1) { left: 10%; top: 14%; }
.sig:nth-of-type(2) { left: 50%; top: 3%; }
.sig:nth-of-type(3) { left: 90%; top: 16%; }
.sig:nth-of-type(4) { left: 90%; top: 84%; }
.sig:nth-of-type(5) { left: 50%; top: 97%; }
.sig:nth-of-type(6) { left: 10%; top: 86%; }

/* meet */
.meet-wrap { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-bottom: 12vh; }
.meet-mark { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); margin-top: 14px; }
.brain-hero { width: clamp(150px, 17vw, 250px); aspect-ratio: 200 / 170; }
.wordmark {
  font-size: clamp(100px, 17vw, 240px) !important; line-height: 0.85 !important; letter-spacing: -0.06em !important;
  font-weight: 700 !important; max-width: none !important; margin: 0 !important;
  background: linear-gradient(180deg, #ffffff 30%, #9fcbf0 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.wordmark.small { font-size: clamp(56px, 8vw, 96px) !important; }
.meet-expand { font-size: clamp(16px, 2vw, 24px); font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); margin-top: 18px; }
.meet-lead { font-size: clamp(20px, 2.4vw, 30px); line-height: 1.3; font-weight: 500; max-width: 26ch; margin-top: 24px; }

/* the brain mark: squares build in from the centre, the X last */
[data-brain] svg { display: block; width: 100%; height: auto; overflow: visible; }
[data-brain] rect { opacity: 0; transform: scale(0.2); transform-box: fill-box; transform-origin: center; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--d) * 0.9s); }
[data-brain].on rect, .on [data-brain] rect { opacity: 1; transform: none; }

/* layers: information → intelligence → interaction */
.scene[data-scene="layers"] { display: flex; flex-direction: column; }
.layers-head h2 { max-width: none; }
.layers {
  flex: 1; min-height: 0; margin-top: clamp(16px, 3vh, 32px);
  display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: stretch;
  max-height: 470px;
}
.layer { display: flex; flex-direction: column; background: rgba(255, 255, 255, 0.75); border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 25, 101, 0.08); }
.layer-title {
  margin: 0; padding: 12px 18px; background: var(--navy); color: var(--white);
  font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.layer-inter .layer-title { background: var(--sea); }
.layer-body { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.layer-sub { font-size: 13px; font-weight: 600; color: #4b5470; }
.chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.chips li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 14px; border-radius: 999px; background: #8d9bb8; color: var(--white);
  font-size: 13px; font-weight: 600;
}
.chips.tools li { background: var(--navy); }
.chips.tools li:first-child { background: var(--sea); box-shadow: 0 0 0 3px rgba(0, 90, 210, 0.2); }
.new { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--navy); color: var(--white); letter-spacing: 0.06em; }
.layer-note { font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--granite); margin-top: auto; }
.layer-intel .layer-body { align-items: center; text-align: center; }
.core { width: clamp(110px, 10vw, 150px); aspect-ratio: 200 / 170; margin: 6px 0; }
.www { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; width: 100%; }
.www li { padding: 10px 14px; border-radius: 12px; background: var(--warm-grey-light); font-size: 15px; font-weight: 600; text-align: left; }
.www b { color: var(--sea); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 4px; }
.reach { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: #4b5470; }
.reach span { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--warm-grey); color: var(--navy); }
.layers-foot { margin-top: clamp(14px, 2.5vh, 26px); font-size: clamp(17px, 1.7vw, 22px); font-weight: 600; text-align: center; }

/* nba: NBx feeds the next best action */
.scene[data-scene="nba"] { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(24px, 4vw, 72px); }
.nba-text h2 { max-width: 14ch; }
.nba-stage { display: flex; align-items: center; gap: clamp(40px, 6vw, 96px); }
.nba-source { flex: none; display: grid; justify-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--light-blue); }
.nba-source-mark { width: clamp(80px, 8vw, 116px); aspect-ratio: 200 / 170; }
.nba {
  flex: 1; max-width: 460px;
  background: var(--white); color: var(--navy); border-radius: 22px; padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  display: grid; gap: 16px; font-size: 14px;
}
.nba header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nba-tag { font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--sea); }
.nba-fict { font-size: 11px; color: var(--granite); }
.nba-grid { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nba-grid div { background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.nba-grid dt { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.1em; color: var(--sea); }
.nba-grid dd { margin: 4px 0 0; font-weight: 600; line-height: 1.3; }
.nba-why { border-top: 1px solid var(--warm-grey-light); padding-top: 14px; }
.nba-why-title { display: flex; align-items: center; gap: 8px; font-weight: 650; margin-bottom: 10px; }
.nba-why-title img { width: 22px; height: auto; }
.nba-why-title span { margin-left: auto; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sea); background: #e6effb; padding: 3px 8px; border-radius: 999px; }
.nba-why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nba-why li { display: grid; gap: 5px; }
.nba-why li span { color: #2b3456; }
.nba-why li i, .viz-barriers i { display: block; height: 6px; border-radius: 6px; background: var(--warm-grey-light); position: relative; overflow: hidden; }
.nba-why li i::after, .viz-barriers i::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--sea), var(--light-blue));
  transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease) 0.3s;
}
.nba-why.on li i::after, .persona.on .viz-barriers i::after { transform: scaleX(var(--w)); }
.nba-why.on li:nth-child(2) i::after { transition-delay: 0.5s; }
.nba-why.on li:nth-child(3) i::after { transition-delay: 0.7s; }
.nba footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--warm-grey); background: transparent; font-size: 13px; font-weight: 600; color: var(--navy); pointer-events: none; }
.pill-solid { background: var(--navy); border-color: var(--navy); color: var(--white); }
.nba-you { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--teal); text-transform: uppercase; letter-spacing: 0.1em; }

/* market: five roles */
.scene[data-scene="market"] { display: flex; flex-direction: column; justify-content: center; }
.market-head h2 { max-width: 22ch; }
.personas { margin-top: clamp(20px, 4vh, 44px); display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.persona {
  background: var(--white); border-radius: 20px; padding: clamp(16px, 1.5vw, 22px);
  box-shadow: 0 20px 50px rgba(0, 25, 101, 0.1), 0 0 0 1px rgba(0, 25, 101, 0.05);
  display: flex; flex-direction: column; gap: 10px; min-height: 290px;
}
.persona-role { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--sea); }
.persona h3 { font-size: clamp(17px, 1.35vw, 21px); line-height: 1.22; letter-spacing: -0.02em; font-weight: 620; }
.viz { margin-top: auto; background: var(--paper); border-radius: 12px; padding: 10px 12px; font-size: 12px; }
.viz small { display: block; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; color: #4b5470; margin-bottom: 6px; }
.viz-prep { display: grid; gap: 8px; }
.viz-prep p { font-weight: 600; }
.viz-prep small { margin-bottom: 2px; }
.viz-barriers p { display: grid; grid-template-columns: 4em 1fr; align-items: center; gap: 8px; margin-top: 6px; font-weight: 600; }
.viz-stack div { display: flex; gap: 3px; height: 26px; }
.viz-stack i { flex: 0 0 calc(var(--w) * 100% - 3px); border-radius: 5px; background: var(--sea); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease) 0.4s; }
.viz-stack i:nth-child(1) { background: #b9cbe6; }
.viz-stack i:nth-child(2) { background: var(--light-blue); }
.viz-stack i:nth-child(4) { background: var(--navy); }
.persona.on .viz-stack i { transform: none; }
.mini-bars { height: 92px; display: flex; align-items: flex-end; gap: 7px; }
.mini-bars span { flex: 1; height: calc(var(--h) * 100%); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--light-blue), var(--sea)); transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--ease) 0.4s; }
.mini-bars span:nth-child(3) { background: linear-gradient(180deg, var(--pink), #d77e9f); }
.persona.on .mini-bars span { transform: scaleY(1); }
.mini-heat { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.mini-heat i { aspect-ratio: 1.3; border-radius: 4px; background: var(--sea); opacity: 0.08; transition: opacity 1s var(--ease) 0.4s; }
.persona.on .mini-heat i { opacity: var(--o); }

/* close */
/* close: part 1 (NBx beneath ACE) gives way to part 2 (the end card) in the same place */
.close-wrap { height: 100%; display: grid; place-items: center; text-align: center; }
.close-part { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.end-part > :first-child { margin-top: 0; }
.ace-part h2 { max-width: none; margin-top: 8px; }
.stack { width: min(860px, 100%); display: grid; margin-top: 10px; }
.stack-block { border-radius: 18px; padding: 16px 20px; display: grid; gap: 12px; text-align: left; }
.stack-block header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.stack-block header b { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; }
.stack-block header span { font-size: 15px; font-weight: 600; }
.stack-block header i { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.stack-block ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.stack-block li { padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.ace { background: var(--white); color: var(--navy); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); }
.ace header i { color: var(--sea); }
.ace li { background: var(--warm-grey-light); }
.ace li:first-child { background: var(--navy); color: var(--white); }
.stack-flow {
  height: 92px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--light-blue);
}
.stack-flow { text-shadow: 0 0 12px var(--navy), 0 0 4px var(--navy); }
.stack-flow { position: relative; z-index: 1; }
.stack-flow span { color: var(--white); margin: 0 6px; }
.nbx {
  grid-template-columns: auto 1fr; align-items: center; column-gap: 18px;
  background: #0b2a80; border: 1px solid rgba(159, 203, 240, 0.45); color: var(--white);
  box-shadow: 0 0 60px rgba(59, 151, 222, 0.25);
}
.nbx .stack-brain { grid-row: span 2; width: 84px; aspect-ratio: 200 / 170; }
.nbx header i { color: var(--light-blue); }
.nbx li { border: 1px solid rgba(159, 203, 240, 0.5); color: #dbe9f8; }
.aligned {
  margin-top: 6px; padding: 12px 22px; border-radius: 999px;
  background: rgba(59, 151, 222, 0.16); border: 1px solid rgba(59, 151, 222, 0.55);
  font-size: clamp(16px, 1.6vw, 20px); font-weight: 500;
}
.aligned b { font-weight: 700; margin-right: 4px; }
.close-title { max-width: none !important; font-size: clamp(32px, 4.6vw, 66px) !important; text-shadow: 0 2px 30px rgba(0, 25, 101, 0.9); }
.close-title span { display: inline-block; }
.close-title span + span { color: var(--light-blue); }
.close-sub { font-size: clamp(17px, 1.8vw, 22px); color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 20px rgba(0, 25, 101, 0.9); }
.badge { padding: 9px 18px; border-radius: 999px; background: var(--pink); color: var(--navy); font-weight: 650; font-size: 15px; }
.endcard { display: grid; justify-items: center; gap: 10px; margin-top: 6px; }
.end-mark { display: flex; align-items: center; gap: 18px; }
.end-brain { width: clamp(70px, 7vw, 100px); aspect-ratio: 200 / 170; }
.end-lead { font-size: clamp(18px, 2vw, 24px); color: rgba(255, 255, 255, 0.92); font-weight: 500; }
.end-actions { margin-top: 10px; display: flex; gap: 10px; }
.end-logo { width: clamp(110px, 10vw, 150px); height: auto; margin-top: 16px; }

/* ---------- chrome ---------- */
.topbar {
  position: fixed; z-index: 20; left: 0; right: 0; top: 0;
  padding: calc(18px + var(--top)) var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--chrome); transition: color 0.5s;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.logo-wrap { position: relative; width: 98px; height: 29px; }
.logo { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.5s; }
.logo-navy { opacity: 0; }
body[data-theme="light"] .logo-white { opacity: 0; }
body[data-theme="light"] .logo-navy { opacity: 1; }
.brand-name { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; padding-left: 14px; border-left: 1px solid currentColor; line-height: 1; }
.brand-brain { position: relative; width: 30px; height: 26px; }
.controls { display: flex; gap: 8px; }
.ctl {
  height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--chrome-soft); background: transparent; color: inherit;
  font-size: 14px; font-weight: 600; transition: background 0.2s, border-color 0.5s;
}
.ctl:hover { background: var(--chrome-soft); }
.ctl svg { width: 18px; height: 18px; fill: currentColor; }
.ctl .i-pause, .ctl .i-off { display: none; }
body.touring .ctl .i-play { display: none; }
body.touring .ctl .i-pause { display: block; }
body.muted .ctl .i-on { display: none; }
body.muted .ctl .i-off { display: block; }
.cc { font-size: 12px; font-weight: 750; letter-spacing: 0.04em; }
#cc-toggle[aria-pressed="false"] { opacity: 0.5; }

.chapters {
  position: fixed; z-index: 20; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: grid; gap: 4px; color: var(--chrome); transition: color 0.5s;
}
.chapters button {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  background: none; border: 0; padding: 6px 0; color: inherit; font-size: 13px; font-weight: 600;
}
.chapters button span { opacity: 0; transform: translateX(6px); transition: opacity 0.3s, transform 0.3s; white-space: nowrap; }
.chapters:hover button span, .chapters button.current span { opacity: 0.9; transform: none; }
.chapters button i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.6; transition: all 0.3s; }
.chapters button.current i { background: currentColor; opacity: 1; transform: scale(1.25); }
.chapters:not(:hover) button:not(.current) span { opacity: 0; }
.chapters:not(:hover) button.current span { opacity: 0; }

.progress { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: 3px; background: var(--chrome-soft); }
.progress i { display: block; height: 100%; width: 100%; background: var(--light-blue); transform-origin: left; transform: scaleX(var(--p, 0)); }

.caption {
  position: fixed; z-index: 20; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content; max-width: min(760px, calc(100vw - 32px));
  padding: 10px 18px; border-radius: 14px;
  background: rgba(0, 16, 64, 0.78); color: var(--white);
  backdrop-filter: blur(8px);
  font-size: clamp(15px, 1.5vw, 18px); line-height: 1.4; text-align: center; font-weight: 500;
  opacity: 0; transition: opacity 0.35s;
  pointer-events: none;
}
.caption.show { opacity: 1; }
body.no-cc .caption { display: none; }

.hint {
  position: fixed; z-index: 20; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75); transition: opacity 0.5s; pointer-events: none;
}
.hint.gone { opacity: 0; }
.hint-mouse { width: 22px; height: 34px; border: 1.5px solid currentColor; border-radius: 12px; position: relative; }
.hint-mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: currentColor; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(9px); } }

/* ---------- small screens ---------- */
@media (max-width: 1180px) and (min-width: 861px) {
  .personas { grid-template-columns: repeat(6, 1fr); }
  .persona { grid-column: span 2; min-height: 0; }
  .persona:nth-child(4), .persona:nth-child(5) { grid-column: span 3; }
  .persona .viz { display: none; }
  .signals { left: 44%; }
}
@media (max-width: 860px) {
  .scene { padding-top: calc(76px + var(--top)); padding-bottom: 96px; }
  .scene h2 { font-size: clamp(28px, 8vw, 38px); }
  .chapters { display: none; }
  .hide-sm { display: none; }
  .ctl-label { display: none; }
  .ctl { height: 38px; min-width: 38px; padding: 0 10px; }
  .logo-wrap { width: 74px; height: 22px; }

  .today-head .sub { font-size: 16px; margin-top: 8px; }
  .signals { left: var(--gutter); right: var(--gutter); top: 43%; bottom: 150px; }
  .profile { width: min(250px, 64%); padding: 12px; gap: 8px; font-size: 11.5px; }
  .profile header b { font-size: 14px; }
  .profile .avatar { width: 34px; height: 34px; font-size: 9px; }
  .profile dl div { grid-template-columns: 1fr; gap: 2px; padding-top: 6px; }
  /* all six signals as compact labels: three above the card, three below */
  .sig { padding: 6px 9px; border-radius: 999px; font-size: 10.5px; }
  .sig b { font-size: 9.5px; letter-spacing: 0.08em; }
  .sig span { display: none; }
  .sig:nth-of-type(1) { left: 17%; top: 4%; }
  .sig:nth-of-type(2) { left: 50%; top: 4%; }
  .sig:nth-of-type(3) { left: 83%; top: 4%; }
  .sig:nth-of-type(4) { left: 83%; top: 96%; }
  .sig:nth-of-type(5) { left: 50%; top: 96%; }
  .sig:nth-of-type(6) { left: 17%; top: 96%; }

  .meet-mark { flex-direction: column; gap: 16px; }
  .brain-hero { width: 150px; }

  .layers { grid-template-columns: 1fr; gap: 8px; margin-top: 12px; max-height: none; flex: none; }
  .layer-title { padding: 7px 12px; font-size: 11px; }
  .layer-body { padding: 8px 10px; gap: 6px; }
  .layer-sub, .layer-note, .reach { display: none; }
  .chips { grid-template-columns: 1fr 1fr; gap: 4px; }
  .chips li { padding: 5px 9px; font-size: 10.5px; }
  .layer-intel .layer-body { flex-direction: row; justify-content: center; }
  .core { width: 64px; margin: 0; }
  .www { gap: 4px; width: auto; }
  .www li { padding: 4px 9px; font-size: 12px; }
  .layers-foot { font-size: 15px; margin-top: 10px; }

  .scene[data-scene="nba"] { grid-template-columns: 1fr; align-content: start; gap: 14px; }
  .nba-text .sub { display: none; }
  .nba-stage { flex-direction: column; gap: 14px; align-items: stretch; }
  .nba-source { grid-auto-flow: column; justify-content: center; align-items: center; }
  .nba-source-mark { width: 48px; }
  .nba { padding: 14px; gap: 10px; font-size: 12.5px; }
  .nba-grid dd { font-size: 11.5px; }
  .nba-why-title span { display: none; }

  .personas { grid-template-columns: 1fr; gap: 7px; margin-top: 14px; }
  .persona { min-height: 0; padding: 10px 14px; gap: 3px; border-radius: 14px; }
  .persona h3 { font-size: 14.5px; }
  .persona .viz { display: none; }
  .caption { bottom: calc(18px + env(safe-area-inset-bottom)); font-size: 14px; }
  .close-part { gap: 12px; }
  .stack-block { padding: 12px 14px; gap: 8px; border-radius: 14px; }
  .stack-block header b { font-size: 20px; }
  .stack-block header span { font-size: 12.5px; }
  .stack-block header i { margin-left: 0; font-size: 9.5px; }
  .stack-block li { padding: 4px 9px; font-size: 11px; }
  .stack-flow { height: 58px; font-size: 10px; }
  .nbx { column-gap: 12px; }
  .nbx .stack-brain { width: 52px; }
  .aligned { border-radius: 16px; padding: 10px 14px; font-size: 14px; }
}
@media (max-height: 760px) and (min-width: 861px) {
  .persona .viz { display: none; }
  .persona { min-height: 0; }
  .layer-note, .reach, .layer-sub { display: none; }
  .end-logo { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  [data-line] { transition: opacity 0.4s linear; transform: none !important; }
  .hint-mouse::after { animation: none; }
}
