/* =========================================================
   HEARTBEAT · art direction from the pitch plan (§7)
   Void Navy bg · Deep Indigo panels · Teal = healthy
   Amber = stressed · Crimson = infected · Orbit Blue = UI
   ========================================================= */
:root {
  --void: #050816;
  --indigo: #0B1030;
  --teal: #19F0B4;
  --amber: #FFB020;
  --red: #FF3B5C;
  --star: #F4F7FF;
  --blue: #3D7BFF;
  --muted: #A9B3D6;
  --bpm: 0.833s;                 /* 72 BPM heartbeat period */
  --f-head: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--void); color: var(--star);
  font: 400 1.05rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--teal); }
em { font-style: normal; color: var(--teal); }
.red { color: var(--red) !important; } .teal { color: var(--teal) !important; } .amber { color: var(--amber) !important; }
.mono { font-family: var(--f-mono); }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 .6em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--teal); color: var(--void); padding: .5em 1em; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  font: 700 1rem var(--f-head); border-radius: 999px; padding: .85em 1.5em; cursor: pointer;
  border: 1px solid var(--teal); transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--teal); color: var(--void); box-shadow: 0 0 30px #19f0b466; animation: pulse var(--bpm) infinite; }
.btn--ghost { background: transparent; color: var(--star); border-color: #ffffff44; }
.btn--small { padding: .5em 1em; font-size: .85rem; background: #19f0b41a; color: var(--teal); }
.icon-btn {
  background: #ffffff10; color: var(--star); border: 1px solid #ffffff22; border-radius: 999px;
  min-width: 44px; height: 44px; cursor: pointer; font-size: 1rem;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 18px #19f0b455; } 15% { box-shadow: 0 0 46px #19f0b4aa; } }

/* ---------- Intro gate ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center;
  transition: opacity 1.2s var(--ease), visibility 1.2s;
}
.intro.is-gone { opacity: 0; visibility: hidden; }
#ecg { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro__copy { position: relative; text-align: center; padding: 1.5rem; margin-top: 30vh; }
.intro__kicker { color: var(--muted); font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; }
.intro__title { font-size: clamp(3rem, 12vw, 8rem); margin: .1em 0; letter-spacing: .04em; opacity: .95; }
.intro__line { min-height: 1.6em; font-size: 1.15rem; color: var(--muted); }
.intro__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.intro__skip { position: absolute; bottom: 24px; right: 24px; background: none; border: 1px solid #ffffff33; color: var(--muted); border-radius: 999px; padding: .5em 1em; cursor: pointer; }

/* ---------- Living backdrop ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

/* ---------- HUD ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem clamp(.8rem, 3vw, 2rem); background: linear-gradient(#050816ee, #05081600);
}
.hud__clock { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--muted); }
.hud__clock b { color: var(--red); font-size: 1rem; transition: color .6s; }
.hud__clock.is-safe b { color: var(--teal); }
.clock { width: 34px; height: 34px; }
.clock circle { fill: none; stroke: #ffffff44; stroke-width: 2; }
.clock line { stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; transform-origin: 20px 20px; transform: rotate(-42deg); transition: transform 2s var(--ease), stroke .6s; }
.hud__clock.is-safe .clock line { stroke: var(--teal); }
.hud__nav ol { list-style: none; display: flex; gap: .45rem; margin: 0; padding: 0; }
.hud__nav a { display: block; width: 10px; height: 10px; border-radius: 50%; background: #ffffff33; transition: background .3s, transform .3s; }
.hud__nav a[aria-current="true"] { background: var(--teal); transform: scale(1.5); box-shadow: 0 0 10px var(--teal); }
.hud__right { display: flex; gap: .6rem; align-items: center; }

/* ---------- R gauge ---------- */
.gauge {
  position: fixed; right: clamp(.8rem, 2vw, 1.6rem); bottom: clamp(.8rem, 2vw, 1.6rem); z-index: 40; width: 132px; text-align: center;
  background: #0B1030cc; border: 1px solid #3D7BFF44; border-radius: 16px; padding: .6rem .5rem .4rem;
  backdrop-filter: blur(8px); opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .6s var(--ease), box-shadow .6s;
}
.gauge.is-on { opacity: 1; transform: none; }
.gauge.is-green { box-shadow: 0 0 28px #19f0b455; border-color: var(--teal); }
#needle { transform-origin: 60px 60px; transition: transform .5s var(--ease); }
.gauge__val { margin: 0; font-size: 1.05rem; } .gauge__val span { color: var(--muted); }
.gauge__label { margin: 0; font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; }

/* ---------- Acts (slides) ---------- */
.act {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  padding: 7rem clamp(1rem, 5vw, 5rem) 4rem; max-width: 1500px; margin: 0 auto; position: relative;
}
.act--flip .act__text { order: 2; }
/* Text-led slides use one readable composition, not a second screenshot of the same content. */
.act--story { display: block; max-width: 1100px; min-height: auto; }
.act__text > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.act.is-in .act__text > * { opacity: 1; transform: none; }
.act.is-in .act__text > *:nth-child(2) { transition-delay: .08s; } .act.is-in .act__text > *:nth-child(3) { transition-delay: .16s; }
.act.is-in .act__text > *:nth-child(4) { transition-delay: .24s; } .act.is-in .act__text > *:nth-child(n+5) { transition-delay: .32s; }

.kicker { color: var(--blue); text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; margin: 0 0 1rem; }
.lead { font-size: 1.25rem; color: var(--muted); }
.punch { font: 700 1.4rem var(--f-head); color: var(--teal); }
.src { font-size: .72rem; color: #7d87ad; margin-top: 1rem; }

/* Artwork-only cards: the complete slide is reserved for pitch mode. */
.act__media { margin: 0; perspective: 1200px; opacity: 0; transform: translateY(40px) scale(.96); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.act.is-in .act__media { opacity: 1; transform: none; }
.slide-btn {
  display: block; width: 100%; padding: 0; border: 1px solid #3D7BFF55; border-radius: 18px; overflow: hidden; cursor: zoom-in; background: var(--indigo);
  box-shadow: 0 30px 80px -20px #000, 0 0 0 1px #ffffff08, 0 0 60px -10px #3D7BFF55;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out, box-shadow .4s; position: relative;
}
.slide-btn:hover { box-shadow: 0 30px 80px -20px #000, 0 0 80px -6px #19f0b466; }
.slide-btn img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; animation: kenburns 22s ease-in-out infinite alternate; }
/* Keep the portrait artwork within the viewport without zooming away its edges. */
.slide-btn--portrait { max-width: 48vh; margin-inline: auto; }
.slide-btn--portrait img { animation: none; }
.slide-link { background: none; border: 0; color: var(--teal); padding: .6rem 0; cursor: pointer; font: .8rem var(--f-mono); text-decoration: underline; text-underline-offset: .3em; }
.slide-btn::after { /* scanning sheen */
  content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, #ffffff14 50%, transparent 60%);
  transform: translateX(-100%); animation: sheen 7s ease-in-out infinite;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.06) translate(-1%, -1%); } }
@keyframes sheen { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Special effects layered on certain slide images */
.act__media--ripple .slide-btn::before {
  content: ""; position: absolute; left: 59%; top: 86%; width: 20px; height: 20px; border-radius: 50%; z-index: 2;
  border: 2px solid var(--amber); animation: ripple 2.4s ease-out infinite; pointer-events: none;
}
@keyframes ripple { from { transform: translate(-50%, -50%) scale(.3); opacity: 1; } to { transform: translate(-50%, -50%) scale(9); opacity: 0; } }
.act__media--plume .slide-btn::before {
  content: ""; position: absolute; left: 24%; top: 27%; width: 120px; height: 40px; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse, #6fb6ff88, transparent 70%); filter: blur(6px); animation: plume 1.6s ease-in-out infinite alternate;
}
@keyframes plume { from { opacity: .35; transform: scaleX(.8); } to { opacity: .9; transform: scaleX(1.2); } }

/* ---------- Hero (act 1) ---------- */
.act--hero { display: block; max-width: none; padding: 0; min-height: 100vh; overflow: hidden; }
.hero__bg, .finale__bg { position: absolute; inset: 0; background-size: cover; background-position: center; animation: kenburns 30s ease-in-out infinite alternate; }
.hero__bg { left: 35%; mask-image: linear-gradient(90deg, transparent 0%, #000 30%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%); opacity: .9; background-position: center; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #05081600 60%, var(--void)); }
.hero__content { position: relative; z-index: 2; max-width: 760px; padding: 8rem clamp(1rem, 6vw, 6rem) 4rem; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.hero__title { font-size: clamp(3.5rem, 11vw, 9rem); margin: 0; letter-spacing: .02em; }
.hero__sub { font: 500 clamp(1.3rem, 2.6vw, 2rem) var(--f-head); margin: .2em 0 .8em; }
.glitch { position: relative; display: inline-block; text-shadow: 0 0 40px #19f0b444; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; }
.glitch::before { color: var(--red); animation: glitch 4s infinite steps(1); clip-path: inset(0 0 60% 0); }
.glitch::after { color: var(--teal); animation: glitch 4s infinite steps(1) reverse; clip-path: inset(55% 0 0 0); }
@keyframes glitch { 0%, 92%, 100% { transform: none; opacity: 0; } 93% { transform: translate(-5px, 1px); opacity: .8; } 95% { transform: translate(5px, -1px); opacity: .8; } 97% { transform: translate(-2px, 0); opacity: .8; } }

.ecg-inline { width: min(100%, 520px); height: 46px; overflow: visible; margin-bottom: 1rem; }
.ecg-path { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--teal)); stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.5s linear infinite; }
@keyframes draw { to { stroke-dashoffset: -900; } }

.scroll-cue { margin-top: 2rem; width: 26px; height: 42px; border: 2px solid #ffffff55; border-radius: 14px; position: relative; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--teal); border-radius: 2px; animation: cue 1.6s infinite; }
@keyframes cue { to { transform: translateY(14px); opacity: 0; } }

/* ---------- Chips, stats, callouts ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0; }
.chips li { font: .78rem var(--f-mono); padding: .35em .8em; border-radius: 999px; border: 1px solid #3D7BFF66; background: #3D7BFF14; }
.chips .chip--red { border-color: var(--red); color: var(--red); background: #ff3b5c14; animation: pulse-red var(--bpm) infinite; }
.chips .chip--teal { border-color: var(--teal); color: var(--teal); }
@keyframes pulse-red { 0%, 100% { box-shadow: none; } 15% { box-shadow: 0 0 16px #ff3b5c88; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.stat { background: #0B1030cc; border: 1px solid #3D7BFF33; border-radius: 14px; padding: 1rem; backdrop-filter: blur(6px); }
.stat b { display: block; font: 700 clamp(1.6rem, 3vw, 2.4rem) var(--f-head); color: var(--teal); }
.stat span { font-size: .82rem; color: var(--muted); }

.callout { border-left: 3px solid var(--blue); background: #0B1030cc; padding: .9rem 1.1rem; border-radius: 0 12px 12px 0; font-size: .95rem; }
.callout--red { border-color: var(--red); }
.lifelines { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.lifelines li { background: #ffffff08; border-radius: 10px; padding: .6rem .8rem; }

/* R cards + comparison bars (act 3) */
.rcards { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1rem; }
.rcard { border-radius: 14px; padding: 1rem; background: #0B1030cc; border: 1px solid; }
.rcard b { display: block; font-size: 2rem; } .rcard span { font-size: .85rem; color: var(--muted); }
.rcard--red { border-color: var(--red); } .rcard--red b { color: var(--red); }
.rcard--teal { border-color: var(--teal); } .rcard--teal b { color: var(--teal); }
.compare { background: #0B1030cc; border-radius: 14px; padding: 1rem; border: 1px solid #3D7BFF33; }
.compare__h { margin: 0 0 .6rem; font-size: .8rem; color: var(--muted); }
.bar { display: grid; grid-template-columns: 9.5em 1fr auto; gap: .6rem; align-items: center; margin: .5rem 0; font-size: .82rem; }
.bar__track { height: 14px; background: #ffffff10; border-radius: 8px; overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #19F0B4, #19F0B488); border-radius: 8px; transition: width 1.8s var(--ease) .4s; position: relative; }
.bar__fill--red { background: var(--red); }
.bar__lo { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--teal); border-right: 2px solid var(--void); }
.act.is-in .bar__fill { width: var(--w); }

/* Crossed-out failed fixes (act 4) */
.crossed { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; font-size: .85rem; color: var(--muted); }
.crossed li { position: relative; padding-left: 1.4em; }
.crossed li::before { content: "✕"; color: var(--red); font-weight: 700; position: absolute; left: 0; top: 0; }
.crossed b { color: var(--star); display: block; text-decoration: line-through; text-decoration-color: var(--red); }

/* Decay chart (act 4) */
.decay { background: #0B1030cc; border: 1px solid #3D7BFF33; border-radius: 14px; padding: 1rem; margin-top: 1rem; }
.decay__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; }
.decay__head p { margin: 0; font-size: .78rem; color: var(--muted); }
.seg { display: flex; border: 1px solid #3D7BFF55; border-radius: 999px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--muted); font: .75rem var(--f-mono); padding: .45em .8em; cursor: pointer; min-height: 32px; }
.seg button[aria-checked="true"] { background: var(--teal); color: var(--void); }
.decay__chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; align-items: end; height: 190px; margin-top: 1rem; }
.dbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font: .72rem var(--f-mono); }
.dbar i { width: 100%; border-radius: 6px 6px 0 0; height: var(--h); transition: height 1s var(--ease), background .6s; background: var(--teal); }
.dbar.is-hot i { background: linear-gradient(var(--red), #ff3b5c66); }
.dbar b { color: var(--star); margin-bottom: .3rem; } .dbar span { color: var(--muted); margin-top: .3rem; }
.decay__bands { display: grid; grid-template-columns: 1fr 2fr; gap: .5rem; margin-top: .6rem; font-size: .7rem; }
.band { padding: .4rem .6rem; border-radius: 6px; }
.band--teal { background: #19f0b41f; color: var(--teal); } .band--red { background: #ff3b5c1f; color: var(--red); }

/* Organs (act 5) */
.organs { list-style: none; padding: 0; display: grid; gap: .6rem; }
.organs li { display: grid; grid-template-columns: 8em 1fr; align-items: center; padding: .8rem 1rem; border-radius: 12px; background: #0B1030cc; border-left: 4px solid var(--c); }
.organs b { font: 700 1.1rem var(--f-head); color: var(--c); letter-spacing: .06em; }
.act.is-in .organs li { animation: organ 2.5s var(--ease) both; }
.act.is-in .organs li:nth-child(2) { animation-delay: .4s; } .act.is-in .organs li:nth-child(3) { animation-delay: .8s; } .act.is-in .organs li:nth-child(4) { animation-delay: 1.2s; }
@keyframes organ { 0% { box-shadow: none; } 30% { box-shadow: 0 0 30px -4px var(--c); } 100% { box-shadow: none; } }

/* Timeline (act 7) */
.timeline { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; font-size: .85rem; }
.timeline li { background: #0B1030cc; padding: .8rem; border-radius: 12px; border-top: 3px solid var(--blue); }
.timeline b { display: block; font-family: var(--f-head); margin-bottom: .3rem; }
.timeline span { color: var(--muted); }

/* Triage chart (act 9) */
.triage { background: #0B1030cc; border: 1px solid #3D7BFF33; border-radius: 14px; padding: 1rem; }
.triage canvas { width: 100%; height: auto; display: block; }
.triage label { display: block; margin-top: .6rem; font-size: .85rem; }
.triage input[type=range] { width: 100%; accent-color: var(--teal); height: 32px; }
.legend { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .78rem; display: grid; gap: .2rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .5rem; vertical-align: -1px; }
.legend b { float: right; }

/* Feasibility ladder (act 10) */
.ladder { list-style: none; padding: 0; display: grid; gap: .4rem; font-size: .88rem; }
.ladder li { display: grid; grid-template-columns: 9.5em 1fr; gap: .6rem; align-items: center; padding: .5rem .7rem; background: #0B1030cc; border-radius: 10px; }
.ladder li.is-new { border: 1px solid var(--teal); box-shadow: 0 0 30px -6px #19f0b488; font-weight: 700; animation: pulse var(--bpm) infinite; }
.tag { font: 700 .62rem var(--f-mono); text-align: center; padding: .3em .4em; border-radius: 6px; background: #19f0b422; color: var(--teal); letter-spacing: .06em; }
.tag--new { background: var(--teal); color: var(--void); }
.tag--model { background: #ffb02022; color: var(--amber); } .tag--dev { background: #ff3b5c22; color: #ff8aa0; } .tag--test { background: #3d7bff33; color: #8fb2ff; }

/* Commons trio (act 11) */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; font-size: .85rem; }
.trio > div { background: #0B1030cc; padding: .8rem; border-radius: 12px; border: 1px solid #3D7BFF33; }
.trio p { margin: 0 0 .4rem; }

/* Speaker script disclosure */
.script { margin-top: 1.2rem; border: 1px solid #ffffff1a; border-radius: 12px; background: #ffffff06; }
.script summary { cursor: pointer; padding: .7rem 1rem; font: .8rem var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; list-style: none; }
.script summary::-webkit-details-marker { display: none; }
.script summary::before { content: "▸ "; color: var(--teal); }
.script[open] summary::before { content: "▾ "; }
.script p { padding: 0 1rem 1rem; margin: 0; color: #d6dcf2; font-size: .95rem; }

/* ---------- Finale (act 12) ---------- */
.act--finale { display: grid; place-items: center; max-width: none; grid-template-columns: 1fr; overflow: hidden; text-align: center; }
.finale__bg { opacity: .45; filter: saturate(1.3); background-size: contain; background-repeat: no-repeat; }
.act--finale::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 20%, var(--void) 80%); }
.finale__content { position: relative; z-index: 2; max-width: 900px; text-shadow: 0 2px 24px #050816, 0 0 4px #050816; }
.finale__content h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); }
.finale__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 1.5rem 0 .6rem; }
.beat-count { color: var(--muted); font-size: .85rem; }
.ecg-inline--revive { margin: 0 auto 1.4rem; display: block; }
.finale__content .script { text-align: left; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid #3D7BFF33; padding: 1.2rem 0; background: #0B103088; }
.marquee__track { display: flex; gap: 4rem; width: max-content; animation: marquee 60s linear infinite; font: 500 1.3rem var(--f-head); color: var(--muted); }
.marquee__track span { white-space: nowrap; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Appendix ---------- */
.appendix { max-width: 1100px; margin: 0 auto; padding: 6rem clamp(1rem, 5vw, 3rem); }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 3rem; }
.qa details { background: #0B1030cc; border: 1px solid #3D7BFF33; border-radius: 12px; }
.qa summary { cursor: pointer; padding: 1rem; font: 700 1rem var(--f-head); }
.qa p { padding: 0 1rem 1rem; margin: 0; color: #d6dcf2; font-size: .92rem; }
.refs { columns: 2; gap: 2rem; font-size: .88rem; } .refs li { margin-bottom: .5rem; break-inside: avoid; }

.foot { text-align: center; padding: 3rem 1rem; color: var(--muted); font-size: .85rem; border-top: 1px solid #ffffff11; }
.foot__ecg { width: 140px; height: 24px; }

/* ---------- Pitch mode dialog ---------- */
.pitch { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: var(--star); }
.pitch::backdrop { background: #000; }
.pitch[open] { display: flex; flex-direction: column; }
.pitch__stage { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.pitch__frame { flex: 1; min-height: 0; position: relative; }
.pitch__stage img { position: absolute; inset: .5rem; width: calc(100% - 1rem); height: calc(100% - 1rem); object-fit: contain; animation: slidein .7s var(--ease); }
@keyframes slidein { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.pitch__cap { max-height: 30vh; overflow-y: auto; padding: .8rem clamp(1rem, 5vw, 4rem); border-top: 1px solid #ffffff14; background: #050816; }
.pitch__cap h2 { font-size: 1.4rem; margin: 0 0 .3rem; }
.pitch__cap p { margin: 0; max-width: 1100px; font-size: clamp(.9rem, 1.4vw, 1.1rem); }
.pitch__cap #pitch-meta { color: var(--teal); font-size: .75rem; letter-spacing: .15em; }
.pitch.no-script .pitch__cap { display: none; }
.pitch__bar { height: 3px; background: #ffffff15; } .pitch__bar span { display: block; height: 100%; width: 0; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.pitch__controls { display: flex; gap: .6rem; align-items: center; justify-content: center; padding: .6rem; flex-wrap: wrap; }
.toggle { font: .8rem var(--f-mono); display: flex; gap: .35rem; align-items: center; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--teal); width: 18px; height: 18px; }
.toggle select { max-width: min(260px, 65vw); background: var(--indigo); color: var(--star); border: 1px solid #3D7BFF55; border-radius: 6px; padding: .4rem; font: inherit; }
.pitch__voice-status { margin: 0; padding: 0 1rem .5rem; text-align: center; color: var(--muted); font-size: .75rem; }
#p-close { margin-left: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .act { grid-template-columns: 1fr; padding-top: 6rem; min-height: auto; }
  .act--flip .act__text { order: 0; }
  .hero__bg { left: 0; mask-image: linear-gradient(180deg, #000 30%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); opacity: .45; }
  .hud__nav { display: none; }
  .gauge { width: 96px; padding: .4rem; }
  .gauge__label { display: none; }
  .timeline, .trio, .qa { grid-template-columns: 1fr; }
  .refs { columns: 1; }
}
@media (max-width: 520px) {
  .hud__clock span { font-size: .7rem; }
  #pitch-open { font-size: 0; padding: .6em .9em; } #pitch-open span { font-size: .9rem; }
  .crossed, .lifelines { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 1fr auto; } .bar__track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ecg-path { stroke-dashoffset: 0; stroke-dasharray: none; }
  .act__text > *, .act__media { opacity: 1; transform: none; }
}
