/* =============================================================================
   overview_film.css — the front-page overview film (index.html #overview)
   A 1280x720 stage scaled to fit. Every animation is paused here and driven by
   overview_film.js from the narration clock (animation.currentTime), so picture,
   voice, captions and cues stay in step, and any frame can be rendered by seek().
   Beat times (--b-*) are set per scene from media/overview/overview_timeline.json;
   the defaults below match the current bake.
   Interface content is SAMPLE DATA. No real students, staff or institutions.
============================================================================= */

.ovf { border: 1px solid #33506a; border-radius: 20px; overflow: hidden; background: #050b12; box-shadow: 0 30px 80px #0006; }
.ovf-view { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #050b12; }
.film { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; transform: scale(var(--k, 1)); overflow: hidden;
  font-family: Inter, system-ui, sans-serif; color: #eef5fb; }
.film *, .film *::before, .film *::after { animation-play-state: paused !important; }

/* Background */
.film-bg { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 18% 20%, #12384a 0%, transparent 50%),
  radial-gradient(ellipse at 85% 75%, #2a2550 0%, transparent 50%),
  linear-gradient(160deg, #08141f, #060c15); }
.film-bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(#9bdae31f 1px, transparent 1.3px); background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000a, transparent 75%); mask-image: radial-gradient(ellipse at 50% 45%, #000a, transparent 75%); }
.film-mark { position: absolute; left: 34px; top: 28px; z-index: 20; display: flex; align-items: center; gap: 9px; font: 600 17px Inter, sans-serif; letter-spacing: -.03em; opacity: .9; }
.film-mark img { width: 24px; height: 24px; object-fit: contain; }
.film-sample { position: absolute; right: 30px; top: 30px; z-index: 20; font: 500 10px 'JetBrains Mono', monospace; letter-spacing: .16em; color: #7f9aae; border: 1px solid #2a4054; border-radius: 4px; padding: 4px 8px; background: #08131ecc; }

/* Captions (burned into the film; the page also mirrors them below on phones) */
.film-cap { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 30; max-width: 1000px; text-align: center;
  font: 500 25px/1.4 Inter, sans-serif; letter-spacing: -.01em; color: #fff; padding: 9px 20px; border-radius: 10px; background: #050b12c4;
  box-shadow: 0 6px 30px #0006; }
.film-cap:empty, .film.no-cc .film-cap { opacity: 0; }

/* Lower third: what you are looking at */
.lt { position: absolute; left: 52px; top: 76px; z-index: 15; display: flex; align-items: center; gap: 12px; font: 500 12px 'JetBrains Mono', monospace; letter-spacing: .18em; color: #a4e3ec;
  animation: ltIn .6s .2s both; }
.lt::before { content: ''; width: 34px; height: 2px; background: currentColor; }
.lt.learn { color: #c5c0f6; }
.lt.emi { color: #7ed7be; }

/* Scenes: opacity set by the script for crossfades */
.sc { position: absolute; inset: 0; opacity: 0; }
.cam { position: absolute; inset: 0; transform-origin: 50% 45%; animation: kb var(--dur, 10s) linear both; }

/* Shared keyframes (explicit from AND to, so stacked animations never borrow values) */
@keyframes kb      { from { transform: scale(1); } to { transform: scale(1.03); } }
@keyframes ltIn    { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes popIn   { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@keyframes slideL  { from { opacity: 0; transform: translateX(-70px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideR  { from { opacity: 0; transform: translateX(70px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideUpSheet { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes ripple  { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 8% { opacity: .9; transform: translate(-50%, -50%) scale(.4); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } }
@keyframes press   { 0%, 100% { transform: scale(1); } 45% { transform: scale(.94); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 #7ed7be00; } 50% { box-shadow: 0 0 0 10px #7ed7be22; } }
@keyframes spin    { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Generic sample-UI parts */
.ui-card { background: #0d1b2a; border: 1px solid #2c4559; border-radius: 14px; box-shadow: 0 24px 60px #0007; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .04em; padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
.pill.ok    { color: #9fe8cf; background: #10302a; border: 1px solid #23574a; }
.pill.warn  { color: #f5d49b; background: #332713; border: 1px solid #5c4720; }
.pill.info  { color: #bfe9f0; background: #0f2b36; border: 1px solid #275364; }
.pill.learn { color: #d9d4ff; background: #221f3d; border: 1px solid #47416f; }
.pill.mute  { color: #a9bccb; background: #13212f; border: 1px solid #2a3d50; }
.cursor { position: absolute; left: 0; top: 0; width: 26px; height: 32px; z-index: 12; filter: drop-shadow(0 3px 6px #0009); }
.tap { position: absolute; width: 60px; height: 60px; border-radius: 50%; border: 2px solid #b6e9f0; background: #b6e9f022; transform: translate(-50%, -50%) scale(.2); opacity: 0; z-index: 13; }

/* ── 1. OPEN ──────────────────────────────────────────────────────────── */
.sc-open { --b-amb: 3.58s; --b-ward: 5.21s; --b-lab: 6.34s; --b-record: 9.04s; }
.o-title { position: absolute; left: 0; right: 0; top: 118px; text-align: center; font: 500 50px/1.1 Inter, sans-serif; letter-spacing: -.045em;
  animation: fadeUp .8s .25s both, fadeOut .6s calc(var(--b-record) - 1.1s) forwards; }
.o-title em { font-style: normal; color: #a4e3ec; }
.o-sites { position: absolute; left: 110px; right: 110px; top: 236px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.o-site { padding: 22px 22px 18px; border-radius: 18px; border: 1px solid #2f4b60; background: linear-gradient(160deg, #10263a, #0a1622); }
.o-site.s-amb  { animation: fadeUp .7s calc(var(--b-amb) - .25s) both,  dimOut .7s calc(var(--b-record) - 1s) forwards; }
.o-site.s-ward { animation: fadeUp .7s calc(var(--b-ward) - .25s) both, dimOut .7s calc(var(--b-record) - 1s) forwards; }
.o-site.s-lab  { animation: fadeUp .7s calc(var(--b-lab) - .25s) both,  dimOut .7s calc(var(--b-record) - 1s) forwards; }
@keyframes dimOut { from { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } to { opacity: .16; transform: translateY(-20px) scale(.94); filter: blur(2px); } }
.o-site svg { width: 120px; height: 74px; display: block; margin-bottom: 14px; }
.o-site b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.o-site small { display: block; font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .14em; color: #8fb6c7; margin-top: 4px; text-transform: uppercase; }
.o-site.s-ward small { color: #c5c0f6; } .o-site.s-lab small { color: #f0c27a; }
.o-site ul { list-style: none; margin-top: 16px; display: grid; gap: 7px; }
.o-site li { font-size: 14px; color: #b5c9da; padding: 7px 10px; border-radius: 8px; background: #0b1826; border: 1px solid #1e3346; }
.o-record { position: absolute; left: 50%; top: 214px; width: 560px; margin-left: -280px; padding: 24px 26px; z-index: 5;
  border-radius: 20px; border: 1px solid #5e93a3; background: linear-gradient(150deg, #143347, #0c1c2b); box-shadow: 0 0 80px #6fd2dc40, 0 30px 70px #000a;
  animation: popIn .7s calc(var(--b-record) - .7s) both; }
.o-record header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.o-record header img { width: 38px; height: 38px; object-fit: contain; }
.o-record header b { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.o-record header span { display: block; font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .12em; color: #8fc3cf; }
.o-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid #22394c; font-size: 16px; color: #c9dbe8; }
.o-row strong { font-weight: 600; color: #fff; }
.o-row:nth-child(2) { animation: fadeIn .4s calc(var(--b-record) - .3s) both; }
.o-row:nth-child(3) { animation: fadeIn .4s calc(var(--b-record) - .15s) both; }
.o-row:nth-child(4) { animation: fadeIn .4s calc(var(--b-record) + 0s) both; }
.o-row:nth-child(5) { animation: fadeIn .4s calc(var(--b-record) + .15s) both; }
.o-row:nth-child(6) { animation: fadeIn .4s calc(var(--b-record) + .3s) both; }

/* ── 2. PLACEMENT ─────────────────────────────────────────────────────── */
.sc-place { --b-scan: 1.87s; --b-unit: 3.79s; --b-prec: 4.88s; --b-sign: 7.09s; }
.phone { position: absolute; width: 262px; height: 536px; border-radius: 40px; background: #0b0f16; border: 2px solid #2b3946; padding: 11px;
  box-shadow: 0 40px 90px #000c, inset 0 0 0 2px #121a24; }
.phone-scr { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: #0a1520; }
.phone-scr::before { content: ''; position: absolute; left: 50%; top: 8px; width: 82px; height: 22px; margin-left: -41px; border-radius: 12px; background: #000; z-index: 9; }
.ph-status { display: flex; justify-content: space-between; padding: 11px 22px 0; font: 600 12px Inter, sans-serif; color: #dfe9f2; height: 34px; }
.ph-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px 10px; font-size: 14px; font-weight: 600; border-bottom: 1px solid #1d2f40; }
.ph-bar img { width: 18px; height: 18px; object-fit: contain; }
.ph-bar span { margin-left: auto; font: 500 10px 'JetBrains Mono', monospace; color: #8fb6c7; letter-spacing: .08em; }
.p-student { left: 196px; top: 92px; animation: slideL .8s .15s both; }
.p-prec { left: 820px; top: 92px; animation: slideR .8s calc(var(--b-prec) - .5s) both; }
.viewfinder { position: relative; margin: 18px 16px 0; height: 300px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #3b4651, #1d252e 70%); }
.wall-plate { position: absolute; left: 50%; top: 50%; width: 156px; margin: -98px 0 0 -78px; padding: 12px 12px 9px; border-radius: 10px; background: #f4f6f8; color: #0b1826; text-align: center;
  box-shadow: 0 10px 30px #0008; transform: perspective(500px) rotateX(8deg) rotateY(-10deg); }
.wall-plate svg { width: 132px; height: 132px; display: block; }
.wall-plate b { display: block; font-size: 11px; margin-top: 6px; letter-spacing: -.01em; }
.wall-plate small { display: block; font-size: 8px; color: #556; letter-spacing: .06em; }
.vf-corner { position: absolute; width: 34px; height: 34px; border: 3px solid #b6e9f0; }
.vf-corner.tl { left: 26px; top: 40px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.vf-corner.tr { right: 26px; top: 40px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.vf-corner.bl { left: 26px; bottom: 40px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.vf-corner.br { right: 26px; bottom: 40px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.scanline { position: absolute; left: 30px; right: 30px; top: 46px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #7fe6f2, transparent); box-shadow: 0 0 18px #7fe6f2;
  opacity: 0; animation: scanMove 1.9s var(--b-scan) both; }
@keyframes scanMove { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 50% { transform: translateY(200px); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } }
.vf-hint { text-align: center; font-size: 12px; color: #9fb4c6; margin-top: 14px; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px 18px; border-radius: 22px 22px 0 0; background: #0f2131; border-top: 1px solid #2c4a5c;
  transform: translateY(105%); animation: slideUpSheet .55s calc(var(--b-unit) - .1s) both; z-index: 4; }
.sheet .ok-badge { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #1d5a49; color: #c4f5e3; font-size: 24px; margin-bottom: 8px; animation: glowPulse 1.6s calc(var(--b-unit) + .3s) 2 both; }
.sheet b { display: block; font-size: 19px; letter-spacing: -.02em; }
.sheet .where { font-size: 13px; color: #b5c9da; margin: 2px 0 12px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cfe0ec; padding: 6px 0; border-top: 1px solid #1e3446; }
.chk i { font-style: normal; color: #7ed7be; font-weight: 700; }
.chk:nth-of-type(1) { animation: fadeIn .3s calc(var(--b-unit) + .35s) both; }
.chk:nth-of-type(2) { animation: fadeIn .3s calc(var(--b-unit) + .6s) both; }
.chk:nth-of-type(3) { animation: fadeIn .3s calc(var(--b-unit) + .85s) both; }
.geo { position: absolute; left: 498px; top: 176px; width: 270px; padding: 14px; animation: popIn .6s calc(var(--b-unit) + .1s) both; }
.geo-map { position: relative; height: 170px; border-radius: 10px; overflow: hidden; background: #0e1a24; }
.geo-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.geo-ring { position: absolute; left: 50%; top: 52%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 2px dashed #7ed7be; background: #7ed7be14; }
.geo-pin { position: absolute; left: 50%; top: 52%; width: 18px; height: 18px; margin: -26px 0 0 -9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #b6e9f0; box-shadow: 0 0 14px #b6e9f0;
  animation: pinDrop .5s calc(var(--b-unit) + .35s) both; }
@keyframes pinDrop { from { opacity: 0; transform: translateY(-40px) rotate(-45deg); } to { opacity: 1; transform: translateY(0) rotate(-45deg); } }
.geo b { display: block; font-size: 14px; margin-top: 10px; }
.geo span { font-size: 12px; color: #9fb4c6; }
.pc-body { padding: 16px; display: grid; gap: 12px; }
.pc-req { font: 500 10px 'JetBrains Mono', monospace; letter-spacing: .12em; color: #f0c27a; }
.pc-card { padding: 14px; border-radius: 12px; background: #0f2131; border: 1px solid #2c4559; }
.pc-card small { display: block; font-size: 11px; color: #8fb6c7; }
.pc-card b { display: block; font-size: 17px; letter-spacing: -.02em; margin: 3px 0 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: 9px; background: #0a1622; font-size: 11px; text-align: center; }
.seg span { padding: 7px 0; border-radius: 7px; color: #8fa6b8; }
.seg span.on { background: #1d5a49; color: #d2f7ea; font-weight: 600; }
.passkey { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px; border-radius: 11px; background: #b6e9f0; color: #0b2530; font-weight: 600; font-size: 14px;
  animation: press .35s calc(var(--b-sign) - .7s) both; }
.fp { width: 22px; height: 22px; }
.p-prec .tap { left: 50%; top: 404px; animation: ripple .7s calc(var(--b-sign) - .72s) both; }
.signed { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; background: #0a1a17f2;
  animation: fadeIn .35s var(--b-sign) both; }
.signed .big { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: #1d5a49; color: #c4f5e3; font-size: 38px; animation: popIn .45s var(--b-sign) both; }
.signed b { font-size: 20px; } .signed span { font-size: 13px; color: #a9d9c8; }
.link-arrow { position: absolute; left: 470px; top: 452px; width: 340px; text-align: center; font: 500 12px 'JetBrains Mono', monospace; letter-spacing: .1em; color: #8fc3cf;
  animation: fadeIn .5s calc(var(--b-sign) + .4s) both; }

/* ── 3. REVIEW ────────────────────────────────────────────────────────── */
.sc-review { --b-shift: 2.2s; --b-pcr: 3.68s; --b-refl: 4.74s; --b-flag: 8.53s; }
.win { position: absolute; left: 90px; top: 108px; width: 1100px; height: 540px; border-radius: 14px; overflow: hidden; background: #0b1622; border: 1px solid #2c4559;
  box-shadow: 0 40px 100px #000b; animation: fadeUp .7s .1s both; }
.win-top { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: #101d2a; border-bottom: 1px solid #1f3345; }
.win-top i { width: 11px; height: 11px; border-radius: 50%; background: #2a3b4c; }
.win-url { margin-left: 18px; flex: 0 0 380px; height: 22px; border-radius: 6px; background: #0a1520; font: 12px 'JetBrains Mono', monospace; color: #8fa6b8; display: flex; align-items: center; padding: 0 10px; }
.app { display: grid; grid-template-columns: 200px 1fr; height: calc(100% - 36px); }
.side-nav { background: #0a141f; border-right: 1px solid #1c2e3f; padding: 16px 12px; display: grid; align-content: start; gap: 4px; }
.side-nav .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; padding: 2px 8px 14px; }
.side-nav .brand img { width: 20px; height: 20px; object-fit: contain; }
.side-nav a { font-size: 13px; color: #8fa6b8; padding: 8px 10px; border-radius: 7px; text-decoration: none; }
.side-nav a.on { background: #15283a; color: #eef5fb; }
.main { padding: 20px 24px; position: relative; overflow: hidden; }
.main h4 { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.main .sub { font-size: 13px; color: #8fa6b8; margin: 3px 0 16px; }
.tbl { display: grid; gap: 8px; }
.tr { display: grid; grid-template-columns: 34px 1.5fr 1fr 150px; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #0e1d2c; border: 1px solid #1d3245; font-size: 14px; color: #c9dbe8; }
.tr .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #13283a; font-size: 14px; }
.tr b { color: #fff; font-weight: 600; display: block; } .tr small { color: #8fa6b8; font-size: 12px; }
.tr.r1 { animation: slideL .45s calc(var(--b-shift) - .2s) both; }
.tr.r2 { animation: slideL .45s calc(var(--b-pcr) - .2s) both; }
.tr.r3 { animation: slideL .45s calc(var(--b-refl) - .2s) both; }
.tr.r4 { animation: slideL .45s calc(var(--b-refl) + .6s) both, rowFocus .4s calc(var(--b-flag) - .45s) forwards; }
@keyframes rowFocus { from { background: #0e1d2c; border-color: #1d3245; } to { background: #2a2114; border-color: #8a6a2c; } }
.rubric { display: flex; align-items: center; gap: 8px; }
.rubric .bar { width: 70px; height: 6px; border-radius: 4px; background: #1d3042; overflow: hidden; }
.rubric .bar i { display: block; height: 100%; width: 82%; background: #a4e3ec; transform-origin: left; animation: growX .8s calc(var(--b-pcr) + .1s) both; }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.drawer { position: absolute; right: 0; top: 0; bottom: 0; width: 360px; padding: 22px; background: #101f2e; border-left: 1px solid #2c4559; box-shadow: -20px 0 50px #0008;
  transform: translateX(100%); animation: drawerIn .5s calc(var(--b-flag) + .1s) both; }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer h5 { font-size: 17px; margin: 10px 0 12px; letter-spacing: -.02em; }
.ev { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #c9dbe8; padding: 9px 0; border-top: 1px solid #1e3446; }
.ev i { font-style: normal; width: 18px; text-align: center; }
.ev i.y { color: #f0c27a; } .ev i.g { color: #7ed7be; }
.drawer .btns { display: flex; gap: 8px; margin-top: 16px; }
.drawer .btns span { flex: 1; text-align: center; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid #355468; color: #cfe0ec; }
.drawer .btns span.p { background: #b6e9f0; color: #0b2530; border-color: transparent; }
.sc-review .cursor { animation: curReview 2.2s calc(var(--b-flag) - 2.3s) both; }
@keyframes curReview { 0% { opacity: 0; transform: translate(1040px, 640px); } 15% { opacity: 1; } 100% { opacity: 1; transform: translate(690px, 508px); } }
.sc-review .tap { left: 702px; top: 522px; animation: ripple .6s calc(var(--b-flag) - .1s) both; }

/* ── 4. LEARN+ ────────────────────────────────────────────────────────── */
.sc-learn { --b-patient: 3.74s; --b-osce: 5.06s; --b-sim: 5.91s; --b-fb: 7.32s; }
.gal { position: absolute; left: 110px; right: 110px; top: 128px; animation: fadeUp .7s .1s both, galOut .6s calc(var(--b-patient) - .8s) forwards; }
@keyframes galOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.08); } }
.gal h4 { font-size: 30px; font-weight: 600; letter-spacing: -.035em; margin-bottom: 4px; }
.gal p { color: #b5c9da; font-size: 15px; margin-bottom: 20px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { height: 112px; padding: 14px; border-radius: 14px; border: 1px solid #3b3c5e; background: linear-gradient(150deg, #1d1f38, #121629); display: flex; flex-direction: column; justify-content: space-between; }
.tile small { font: 500 10px 'JetBrains Mono', monospace; letter-spacing: .12em; color: #a9a4e6; }
.tile b { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.tile .prog { height: 4px; border-radius: 3px; background: #2a2d4a; overflow: hidden; }
.tile .prog i { display: block; height: 100%; background: #c5c0f6; }
.tile:nth-child(n) { animation: popIn .45s calc(.35s + var(--i, 0) * .07s) both; }
.case { position: absolute; left: 70px; right: 70px; top: 104px; display: grid; grid-template-columns: 560px 1fr; gap: 26px; animation: fadeIn .6s calc(var(--b-patient) - .55s) both; }
.monitor { align-self: start; padding: 14px 16px 12px; border-radius: 14px; background: #03070a; border: 2px solid #1f2b35; box-shadow: 0 30px 70px #000b, inset 0 0 40px #00ff8806; }
.mon-head { display: flex; justify-content: space-between; font: 500 11px 'JetBrains Mono', monospace; color: #7d8c99; letter-spacing: .1em; margin-bottom: 6px; }
.mon-trace { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid #12202b; }
.mon-trace svg { position: absolute; left: 0; top: 0; height: 150px; animation: ecgScroll var(--ecg-period, 4.615s) linear infinite; }
@keyframes ecgScroll { from { transform: translateX(0); } to { transform: translateX(var(--ecg-shift, -1000px)); } }
.mon-trace::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 40px; background: linear-gradient(90deg, transparent, #03070a); }
.vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.vital small { display: block; font: 500 10px 'JetBrains Mono', monospace; letter-spacing: .1em; }
.vital b { font: 500 34px/1 'JetBrains Mono', monospace; }
.vital.hr { color: #3ef08a; } .vital.sp { color: #4fd2ff; } .vital.bp { color: #f2f2f2; } .vital.rr { color: #f6d55c; }
.vital.bp b { font-size: 26px; }
.qa { display: grid; gap: 12px; align-content: start; }
.patient { display: flex; gap: 14px; align-items: flex-start; animation: fadeUp .5s calc(var(--b-patient) - .2s) both; }
.patient svg { width: 76px; height: 76px; flex-shrink: 0; border-radius: 50%; background: #1b2338; border: 1px solid #3b3c5e; }
.bubble { position: relative; padding: 13px 16px; border-radius: 4px 16px 16px 16px; background: #f4f2ff; color: #1a1d36; font-size: 17px; line-height: 1.45; }
.bubble small { display: block; font-size: 11px; color: #6b6890; margin-bottom: 3px; }
.q { font-size: 16px; font-weight: 600; margin-top: 4px; animation: fadeIn .4s calc(var(--b-patient) + .5s) both; }
.opt { padding: 12px 14px; border-radius: 10px; border: 1px solid #2b3556; background: #12182b; color: #c5cce0; font-size: 15px; }
.opt.o1 { animation: fadeUp .4s calc(var(--b-patient) + .7s) both; }
.opt.o2 { animation: fadeUp .4s calc(var(--b-patient) + .85s) both, pick .35s calc(var(--b-fb) - .35s) forwards; }
.opt.o3 { animation: fadeUp .4s calc(var(--b-patient) + 1s) both; }
@keyframes pick { from { border-color: #2b3556; background: #12182b; color: #c5cce0; } to { border-color: #8f86de; background: #2a2550; color: #fff; } }
.fb { padding: 13px 15px; border-radius: 11px; background: #12291f; border: 1px solid #2c6650; color: #c9f1df; font-size: 14px; line-height: 1.5; animation: fadeUp .5s var(--b-fb) both; }
.fb b { color: #fff; }
.engines { position: absolute; left: 70px; right: 70px; top: 530px; display: flex; gap: 10px; }
.engine { padding: 9px 14px; border-radius: 10px; border: 1px solid #47416f; background: #1b1934; color: #d9d4ff; font-size: 14px; font-weight: 500; }
.engine small { display: block; font: 500 9px 'JetBrains Mono', monospace; letter-spacing: .12em; color: #a9a4e6; }
.engine.e1 { animation: popIn .4s calc(var(--b-patient) - .1s) both; }
.engine.e2 { animation: popIn .4s calc(var(--b-osce) - .1s) both; }
.engine.e3 { animation: popIn .4s calc(var(--b-sim) - .1s) both; }
.engine.e4 { animation: popIn .4s calc(var(--b-sim) + .15s) both; }
.sc-learn .cursor { animation: curLearn 1.5s calc(var(--b-fb) - 1.85s) both; }
@keyframes curLearn { 0% { opacity: 0; transform: translate(1150px, 660px); } 15% { opacity: 1; } 100% { opacity: 1; transform: translate(860px, 330px); } }
.sc-learn .tap { left: 872px; top: 344px; animation: ripple .6s calc(var(--b-fb) - .35s) both; }

/* ── 5. EMI ───────────────────────────────────────────────────────────── */
.sc-emi { --b-evidence: 1.89s; --b-attn: 4.36s; --b-suggest: 5.58s; --b-decide: 7.53s; }
.emi-orb { position: absolute; left: 640px; top: 300px; width: 200px; height: 200px; margin: -100px 0 0 -100px; display: grid; place-items: center;
  animation: popIn .7s .2s both, orbAside .8s calc(var(--b-attn) - .5s) forwards; }
@keyframes orbAside { from { transform: translate(0, 0) scale(1); } to { transform: translate(-330px, 10px) scale(.78); } }
.emi-orb .sph { position: absolute; inset: 30px; border-radius: 50%; background: radial-gradient(circle at 32% 26%, #b5f0e6, #2f8590 30%, #0f2a3d 66%, #071220); box-shadow: 0 0 70px #73e7d366; }
.emi-orb .ring { position: absolute; inset: 6px; border-radius: 50%; border: 1px solid #b8eddb99; transform: rotateX(68deg); }
.emi-orb .ring.r2 { transform: rotate(60deg) rotateX(68deg); border-color: #a3bff099; }
.emi-orb .ring.r3 { transform: rotate(-60deg) rotateX(68deg); border-color: #bea6e399; }
.emi-orb .spinner { position: absolute; inset: 0; animation: spin 14s linear infinite; }
.emi-orb b { position: relative; z-index: 2; font: 600 24px Inter, sans-serif; letter-spacing: .2em; text-shadow: 0 0 12px #062030; }
.src { position: absolute; top: 172px; width: 260px; display: grid; gap: 10px; animation: srcOut .6s calc(var(--b-attn) - .6s) forwards; }
@keyframes srcOut { from { opacity: 1; } to { opacity: 0; } }
.src.l { left: 90px; } .src.r { right: 90px; }
.src h6 { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .16em; color: #a4e3ec; margin-bottom: 2px; }
.src.r h6 { color: #c5c0f6; text-align: right; }
.chip { padding: 10px 13px; border-radius: 10px; border: 1px solid #2c4559; background: #0d1b2a; font-size: 14px; color: #c9dbe8; display: flex; justify-content: space-between; gap: 8px; }
.src.r .chip { border-color: #3b3c5e; background: #121629; }
.src .chip:nth-of-type(1) { animation: fadeUp .4s calc(var(--b-evidence) - .3s) both; }
.src .chip:nth-of-type(2) { animation: fadeUp .4s calc(var(--b-evidence) - .1s) both; }
.src .chip:nth-of-type(3) { animation: fadeUp .4s calc(var(--b-evidence) + .1s) both; }
.flowdots { position: absolute; inset: 0; animation: srcOut .6s calc(var(--b-attn) - .6s) forwards; }
.flowdots i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #a4e3ec; box-shadow: 0 0 12px #a4e3ec; opacity: 0; }
.flowdots i.r { background: #c5c0f6; box-shadow: 0 0 12px #c5c0f6; }
.flowdots i.d1 { top: 230px; animation: flowL 1.3s calc(var(--b-evidence) + .2s) 2 both; }
.flowdots i.d2 { top: 290px; animation: flowL 1.3s calc(var(--b-evidence) + .55s) 2 both; }
.flowdots i.d3 { top: 230px; animation: flowR 1.3s calc(var(--b-evidence) + .35s) 2 both; }
.flowdots i.d4 { top: 290px; animation: flowR 1.3s calc(var(--b-evidence) + .7s) 2 both; }
@keyframes flowL { 0% { opacity: 0; left: 360px; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; left: 560px; top: 300px; } }
@keyframes flowR { 0% { opacity: 0; left: 920px; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; left: 715px; top: 300px; } }
.attn { position: absolute; left: 470px; top: 150px; width: 520px; padding: 20px 22px; animation: fadeUp .6s calc(var(--b-attn) - .3s) both; }
.attn .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.attn h5 { font-size: 19px; letter-spacing: -.02em; }
.comp { display: grid; grid-template-columns: 1fr 120px; gap: 4px 14px; align-items: center; padding: 10px 0; border-top: 1px solid #22394c; font-size: 14px; color: #c9dbe8; }
.comp em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: #f0c27a; }
.dots3 { display: flex; gap: 6px; justify-content: flex-end; }
.dots3 i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #4b6a80; }
.dots3 i.f { background: #7ed7be; border-color: #7ed7be; }
.sugg { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid #3c6475; background: #0e2130; animation: fadeUp .5s calc(var(--b-suggest) - .25s) both; }
.sugg small { font: 500 10px 'JetBrains Mono', monospace; letter-spacing: .14em; color: #7ed7be; }
.sugg p { font-size: 15px; color: #e2eef6; margin: 5px 0 12px; }
.sugg .acts { display: flex; gap: 8px; }
.sugg .acts span { padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid #355468; color: #cfe0ec; }
.sugg .acts span.yes { background: #b6e9f0; color: #0b2530; border-color: transparent; animation: press .35s calc(var(--b-decide) - .05s) both; }
.stamp { position: absolute; left: 700px; top: 470px; padding: 9px 16px; border-radius: 9px; border: 2px solid #7ed7be; color: #a8ecd6; font: 600 14px 'JetBrains Mono', monospace; letter-spacing: .08em;
  transform: rotate(-4deg); background: #0a1f1acc; animation: stampIn .45s calc(var(--b-decide) + .2s) both; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-4deg) scale(1.6); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }
.sc-emi .cursor { animation: curEmi 1.6s calc(var(--b-decide) - 1.7s) both; }
@keyframes curEmi { 0% { opacity: 0; transform: translate(1120px, 650px); } 15% { opacity: 1; } 100% { opacity: 1; transform: translate(535px, 452px); } }
.sc-emi .tap { left: 547px; top: 466px; animation: ripple .6s calc(var(--b-decide) - .05s) both; }

/* ── 6. CLOSE ─────────────────────────────────────────────────────────── */
.sc-close { --b-conn: 2.99s; --b-comp: 5.77s; }
.dash { position: absolute; left: 140px; right: 140px; top: 112px; padding: 24px 26px; animation: fadeUp .6s .1s both, dashOut .7s calc(var(--b-conn) - .9s) forwards; }
@keyframes dashOut { from { opacity: 1; transform: scale(1); filter: blur(0); } to { opacity: 0; transform: scale(.92); filter: blur(4px); } }
.dash .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.dash h5 { font-size: 22px; letter-spacing: -.03em; }
.cohorts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cohort { padding: 14px; border-radius: 12px; background: #0b1826; border: 1px solid #1f3446; }
.cohort small { font: 500 10px 'JetBrains Mono', monospace; letter-spacing: .14em; color: #8fb6c7; }
.cohort b { display: block; font-size: 16px; margin: 3px 0 12px; }
.cbar { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: center; font-size: 12px; color: #a9bccb; margin-top: 7px; }
.cbar span { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: #1b2e40; overflow: hidden; }
.cbar span i { display: block; height: 100%; transform-origin: left; background: linear-gradient(90deg, #5fc6d3, #a4e3ec); animation: growX 1s .5s both; }
.end { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; gap: 0; }
.end img { width: 78px; height: 78px; object-fit: contain; margin: 0 auto 14px; animation: popIn .6s calc(var(--b-conn) - .7s) both; }
.end .wm { font: 600 54px/1 Inter, sans-serif; letter-spacing: -.05em; animation: fadeUp .6s calc(var(--b-conn) - .6s) both; }
.end .l1 { font: 500 36px/1.2 Inter, sans-serif; letter-spacing: -.04em; margin-top: 22px; animation: fadeUp .6s calc(var(--b-conn) - .25s) both; }
.end .l2 { font: 500 36px/1.2 Inter, sans-serif; letter-spacing: -.04em; color: #a4e3ec; animation: fadeUp .6s calc(var(--b-comp) - .5s) both; }
.end .cta { display: inline-flex; gap: 14px; align-items: center; margin-top: 30px; padding: 13px 22px; border-radius: 11px; background: #b6e9f0; color: #0b2530; font-weight: 600; font-size: 18px;
  animation: fadeUp .6s calc(var(--b-comp) + .5s) both; }
.end .cta span { font: 500 14px 'JetBrains Mono', monospace; opacity: .7; }
.end .disc { margin-top: 18px; font: 500 12px 'JetBrains Mono', monospace; letter-spacing: .18em; color: #8fb6c7; animation: fadeIn .6s calc(var(--b-comp) + .8s) both; }

/* ── Player chrome (outside the film) ─────────────────────────────────── */
.ovf-poster { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; border: 0; cursor: pointer; color: #eef5fb; font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(ellipse at center, #050b1299, #050b12e6); }
.ovf-poster[hidden] { display: none; }
.ovf-poster .in { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; text-align: center; }
.ovf-poster .btn-play { width: 84px; height: 84px; border-radius: 50%; background: #b6e9f0; color: #0b2530; display: grid; place-items: center; font-size: 28px; padding-left: 6px;
  box-shadow: 0 0 0 12px #b6e9f01a, 0 0 60px #8fd8e255; transition: transform .2s; }
.ovf-poster:hover .btn-play { transform: scale(1.06); }
.ovf-poster .t { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.ovf-poster .s { font-size: 13px; color: #a7bccc; }
.ovf-end { position: absolute; inset: 0; z-index: 35; display: grid; place-items: end center; padding-bottom: 7%; pointer-events: none; }
.ovf-end[hidden] { display: none; }
.ovf-end .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; pointer-events: auto; }
.ovf-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #213244; background: #08121d; }
.ovf-btn { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; border: 1px solid #33506a; background: #0d1d2c; color: #eef5fb; cursor: pointer; display: grid; place-items: center; font: 13px Inter, sans-serif; }
.ovf-btn:hover { border-color: #94cbd9; }
.ovf-btn[aria-pressed="false"].cc { opacity: .55; }
.ovf-btn.txt { width: auto; padding: 0 12px; border-radius: 19px; font-size: 12px; }
.ovf-chaps { flex: 1; display: grid; gap: 5px; min-width: 0; }
.ovf-chap { background: none; border: 0; cursor: pointer; text-align: left; color: #91aabe; font: 11px Inter, sans-serif; padding: 0; min-width: 0; }
.ovf-chap .bar { display: block; height: 4px; border-radius: 3px; background: #1d3042; overflow: hidden; margin-bottom: 7px; }
.ovf-chap .bar i { display: block; height: 100%; width: 0; background: #a4e3ec; }
.ovf-chap.learn .bar i { background: #c5c0f6; }
.ovf-chap .lbl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovf-chap[aria-current="step"] { color: #eef5fb; }
.ovf-time { font: 11px 'JetBrains Mono', monospace; color: #91aabe; min-width: 78px; text-align: right; flex-shrink: 0; }
.ovf-cap-out { display: none; padding: 12px 16px; min-height: 66px; font-size: 15px; line-height: 1.5; color: #eef5fb; background: #0a1521; border-top: 1px solid #16273a; }
.ovf:fullscreen { border-radius: 0; display: flex; flex-direction: column; justify-content: center; background: #000; }
.ovf:fullscreen .ovf-view { width: min(100vw, calc((100vh - 64px) * 16 / 9)); margin: 0 auto; }

@media (max-width: 700px) {
  .ovf-cap-out { display: block; }
  .film .film-cap { display: none; }
  .ovf-bar { flex-wrap: wrap; gap: 9px; padding: 10px 12px; }
  .ovf-chaps { order: 9; flex-basis: 100%; }
  .ovf-chap .lbl { font-size: 10px; }
  .ovf-time { margin-left: auto; }
  .ovf-poster .btn-play { width: 60px; height: 60px; font-size: 20px; }
  .ovf-poster .t { font-size: 17px; }
  .ovf-end { padding-bottom: 4%; }
  .ovf-end .btn { min-height: 36px; padding: 7px 12px; font-size: 12px; }
}
@media (max-width: 380px) { .ovf-chap .lbl { display: none; } }

/* Render mode (?film=render): only the stage, at 1280x720, for the MP4 export. */
html.film-render, html.film-render body { background: #050b12 !important; overflow: hidden !important; }
html.film-render body > *:not(main), html.film-render main > *:not(#overview), html.film-render #overview .section-head,
html.film-render .ovf-bar, html.film-render .ovf-cap-out, html.film-render .ovf-poster, html.film-render .ovf-end, html.film-render .ov-note { display: none !important; }
html.film-render #overview { position: fixed; inset: 0; padding: 0 !important; border: 0 !important; }
html.film-render #overview .wrap { max-width: none; padding: 0; }
html.film-render .ovf { position: fixed; left: 0; top: 0; width: 1280px; height: 720px; border: 0; border-radius: 0; box-shadow: none; }
html.film-render .ovf-view { width: 1280px; height: 720px; aspect-ratio: auto; }
html.film-render .film .film-cap { display: block; }

.ov-note { margin-top: 14px; font-size: 12px; color: #91aabe; text-align: center; }
