/* LineCall — light "liquid glass" */
:root {
  --ink: #0b1220;
  --ink-2: #334055;
  --ink-3: #66728a;
  --line: rgba(11, 18, 32, 0.08);
  --ball: #d7f13a;
  --blue: #2563eb;
  --in: #16a34a;
  --in-l: #4ade80;
  --out: #e11d48;
  --out-l: #ff6b6b;
  --close: #d97706;
  --close-l: #ffc247;
  --r-xl: 34px;
  --r-lg: 26px;
  --display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--body); color: var(--ink); background: #cfe6ff; min-height: 100svh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--ball); color: var(--ink); }

/* ---------------------------------------------------------------- sky */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; contain: strict; pointer-events: none;
  background: linear-gradient(180deg, #6fb2ff 0%, #9ccbff 26%, #cfe6ff 58%, #eef6ff 100%); }
.cloud { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,.55) 55%, rgba(255,255,255,0)); filter: blur(18px); }
.c1 { width: 720px; height: 260px; top: 6%; left: -10%; }
.c2 { width: 560px; height: 200px; top: 22%; right: -8%; opacity: .85; }
.c3 { width: 900px; height: 320px; top: 58%; left: 18%; opacity: .7; }
.c4 { width: 420px; height: 160px; top: 40%; left: 4%; opacity: .6; }
.grain { position: absolute; inset: -50%; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- glass */
/* Panels sit on a static, already-soft sky, where a 26 px backdrop blur is visually a no-op but
   costs a full re-blur of every panel on each scrolled / animated frame. So the frosted
   backdrop-filter is only used where content really moves behind the glass (.frost: sticky nav);
   the other panels get the same look from their gradient + a faint blue "saturation" tint. */
.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(160deg, rgba(255,255,255,.62), rgba(255,255,255,.34)), rgba(110,232,255,.2);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.35),
    0 1px 2px rgba(16,32,80,.06), 0 24px 60px -24px rgba(16,40,100,.35);
  border-radius: var(--r-xl);
}
.frost { -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .frost { background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.78)); }
}
@media (prefers-reduced-transparency: reduce) {
  .frost { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(246,250,255,.96); }
}
.glass::after { /* liquid rim light */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(140% 70% at 10% -10%, rgba(255,255,255,.75), transparent 45%),
              radial-gradient(90% 60% at 110% 120%, rgba(160,205,255,.35), transparent 60%);
}
/* Dark glass sits over the playing video, so its backdrop changes on every video frame: keep the
   frosted blur small (the HUD chips are small) and drop it entirely on phones / low-power settings. */
.glass.dark {
  background: linear-gradient(160deg, rgba(14,20,36,.6), rgba(14,20,36,.42));
  border-color: rgba(255,255,255,.22); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 18px 40px -18px rgba(0,8,30,.6);
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
}
@media (max-width: 600px), (pointer: coarse), (prefers-reduced-transparency: reduce) {
  .glass.dark { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(160deg, rgba(14,20,36,.74), rgba(14,20,36,.6)); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass.dark { background: linear-gradient(160deg, rgba(14,20,36,.74), rgba(14,20,36,.6)); }
}
.glass.dark::after { background: radial-gradient(120% 60% at 10% -10%, rgba(255,255,255,.22), transparent 50%); }

/* ---------------------------------------------------------------- quota badge */
.quota { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); line-height: 1.3; text-align: left; }
.quota[hidden] { display: none; }
.quota i { width: 8px; height: 8px; border-radius: 50%; background: var(--in-l); box-shadow: 0 0 0 3px rgba(74,222,128,.25); flex: none; }
.quota b { color: var(--ink); font-weight: 700; }
.quota.out { color: #9f1239; } .quota.out i { background: var(--out-l); box-shadow: 0 0 0 3px rgba(255,107,107,.25); }
.quota-row { height: 38px; margin-top: 16px; display: flex; justify-content: center; }   /* reserved, so the badge never shifts the page */
.flow .head-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- nav */
.nav-wrap { position: sticky; top: 0; z-index: 30; padding: 14px 18px 0; }
.nav { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 9px 9px 9px 20px; border-radius: 999px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 19px var(--display); letter-spacing: -.02em; }
.dot-ball { width: 18px; height: 18px; border-radius: 50%; display: inline-block; position: relative; flex: none; vertical-align: -3px;
  background: radial-gradient(circle at 35% 30%, #f6ff9a, var(--ball) 48%, #a8c414); box-shadow: inset -2px -2px 3px rgba(0,0,0,.18); }
.dot-ball::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 1.6px solid transparent; border-left-color: #fff; border-right-color: #fff; }
.dot-ball.sm { width: 12px; height: 12px; } .dot-ball.sm::after { inset: 1px; border-width: 1.2px; }
.nav-links { display: flex; gap: 2px; margin-left: 8px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; transition: background .2s; }
.nav-links a:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.units { margin-left: auto; display: flex; padding: 3px; border-radius: 999px; background: rgba(11,18,32,.06); }
.units button { border: 0; background: none; padding: 5px 11px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.units button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(16,32,80,.12); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 999px; padding: 15px 28px; font: 600 16px var(--display); letter-spacing: -.01em; border: 0; cursor: pointer; white-space: nowrap; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:active { transform: scale(.97); }
.btn.ink { background: var(--ink); color: #fff; box-shadow: 0 10px 26px -10px rgba(11,18,32,.6), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.ink:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(11,18,32,.65), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.glass { padding: 15px 26px; }
.btn.glass:hover { background: rgba(255,255,255,.8); }
.btn.sm { padding: 10px 18px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.arrow { transition: transform .2s; } .btn:hover .arrow { transform: translateX(3px); }

/* ---------------------------------------------------------------- type & layout */
main { min-height: 100vh; min-height: 100svh; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.04em; line-height: 1.02; font-weight: 700; }
h1 { font-size: clamp(42px, 7vw, 86px); }
h2 { font-size: clamp(30px, 4.2vw, 50px); }
h3 { font-size: 21px; letter-spacing: -.02em; }
.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 640px; margin: 20px auto 0; }
.muted { color: var(--ink-3); }
.kicker { font: 600 12px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; position: relative; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: rgba(239,68,68,.18); animation: ring 1.6s infinite; will-change: transform, opacity; }
@keyframes ring { 50% { transform: scale(1.5); opacity: .22; } }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head p { color: var(--ink-2); max-width: 500px; margin: 10px 0 0; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 60px 0 10px; text-align: center; }
.hero h1 .hl { background: linear-gradient(180deg, transparent 62%, rgba(215,241,58,.95) 62%); padding: 0 .08em; }
.cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- live player */
.stage-card { padding: 12px; border-radius: 34px; margin-top: 44px; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 12px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(11,18,32,.06); }
.seg button, .seg label span { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: 600 14px var(--display); color: var(--ink-3); cursor: pointer; display: inline-block; }
.seg button.on, .seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 2px 10px rgba(16,32,80,.14); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { cursor: pointer; }
.player { position: relative; border-radius: 24px; overflow: hidden; background: #0a1020; aspect-ratio: 16 / 9; contain: layout paint; }
.player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player .zoom { position: absolute; inset: 0; transition: transform .9s cubic-bezier(.2,.7,.2,1); transform-origin: 50% 50%; }
.player video, .player canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player canvas { pointer-events: none; }
.player video { cursor: pointer; }
.hud { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 11px 15px; border-radius: 20px; min-width: 140px; pointer-events: none; z-index: 2; }
.hud .k { font: 600 10.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.hud .v { font: 700 26px/1.05 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hud .v small { font-size: 13px; color: var(--ball); margin-left: 4px; letter-spacing: 0; }
.hud .sub { font-size: 12px; color: rgba(255,255,255,.75); }
.hud.tl { top: 14px; left: 14px; } .hud.tr { top: 14px; right: 14px; text-align: right; }
.hud.bl { bottom: 62px; left: 14px; } .hud.br { bottom: 62px; right: 14px; text-align: right; }
.hud .v.in { color: var(--in-l); } .hud .v.out { color: var(--out-l); } .hud .v.close { color: var(--close-l); }
.trk { display: inline-flex; align-items: center; gap: 7px; justify-content: flex-end; }
.trk i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); }
.trk.on i { background: var(--ball); box-shadow: 0 0 10px var(--ball); }
.controls { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; z-index: 3; }
.controls button { border: 0; background: none; color: #fff; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.controls button:hover { background: rgba(255,255,255,.15); }
.controls .rate { width: auto; padding: 0 9px; border-radius: 999px; font: 600 12.5px var(--display); }
.timeline { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.timeline .track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); }
.timeline .prog { position: absolute; left: 0; top: 12px; height: 4px; border-radius: 4px; background: #fff; width: 100%; transform-origin: 0 50%; transform: scaleX(0); }
.timeline .mk { position: absolute; top: 8px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid rgba(10,16,32,.9); }
.timeline .mk.in { background: var(--in-l); } .timeline .mk.out { background: var(--out-l); } .timeline .mk.close { background: var(--close-l); }
.time { color: rgba(255,255,255,.85); font: 500 12.5px var(--body); font-variant-numeric: tabular-nums; min-width: 74px; text-align: right; }
.layer-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid rgba(11,18,32,.1); background: rgba(255,255,255,.6); border-radius: 999px; padding: 6px 12px; font: 600 13px var(--display); color: var(--ink-3); cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.replay-badge { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 8px 14px; border-radius: 999px; font: 700 13px var(--display); letter-spacing: .04em; color: #fff; }

/* ---------------------------------------------------------------- cards */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 28px; border-radius: var(--r-lg); }
.card .n { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 14px var(--display); }
.card h3 { margin: 18px 0 8px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { padding: 24px; border-radius: var(--r-lg); }
.metric .v { font: 700 46px/1 var(--display); letter-spacing: -.04em; margin: 10px 0 8px; font-variant-numeric: tabular-nums; }
.metric .v small { font-size: 18px; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.metric p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.note-card { padding: 24px 28px; border-radius: var(--r-lg); margin-top: 16px; color: var(--ink-2); font-size: 15px; }
.note-card b { color: var(--ink); }
.sources { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.sources span { padding: 10px 16px; border-radius: 999px; font: 600 14px var(--display); }
.big-cta { padding: 56px 24px; text-align: center; border-radius: 40px; }
.big-cta p { color: var(--ink-2); margin: 12px auto 26px; max-width: 520px; }

/* ---------------------------------------------------------------- forms / flow */
.flow { max-width: 860px; margin: 36px auto 80px; padding: 34px; }
.flow.wide { max-width: 1180px; }
.steps { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.steps span { padding: 7px 14px; border-radius: 999px; font: 600 13px var(--display); color: var(--ink-3); background: rgba(11,18,32,.05); }
.steps span.on { background: var(--ink); color: #fff; }
.steps span.done { background: rgba(22,163,74,.12); color: var(--in); }
.flow h2 { font-size: clamp(30px, 3.6vw, 44px); }
.flow > p { color: var(--ink-2); margin: 10px 0 0; }
.form { display: grid; gap: 18px; margin-top: 26px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input { width: 100%; padding: 15px 18px; border-radius: 18px; border: 1px solid rgba(11,18,32,.12); background: rgba(255,255,255,.75); outline: none; transition: border-color .2s, box-shadow .2s; font-size: 16px; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1; min-width: 150px; }
.drop { border: 1.5px dashed rgba(11,18,32,.25); border-radius: 22px; padding: 30px 20px; text-align: center; cursor: pointer; background: rgba(255,255,255,.45); transition: background .2s, border-color .2s; }
.drop:hover, .drop.over { background: rgba(255,255,255,.8); border-color: var(--blue); }
.drop.has { border-style: solid; border-color: var(--in); }
.drop b { display: block; font: 600 17px var(--display); margin-top: 10px; }
.drop small { color: var(--ink-3); }
.drop .ico { width: 50px; height: 50px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--ink); }
.hint { font-size: 13.5px; color: var(--ink-3); margin: -6px 0 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 600 12.5px var(--display); background: rgba(37,99,235,.1); color: var(--blue); }
.err { color: #9f1239; background: rgba(225,29,72,.08); border: 1px solid rgba(225,29,72,.25); padding: 12px 16px; border-radius: 14px; font-size: 14.5px; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.tips div { padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.8); font-size: 13.5px; color: var(--ink-2); }
.tips b { display: block; color: var(--ink); font-size: 14px; }
.capture { display: grid; gap: 14px; padding: 16px; border-radius: 22px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.85); }
.ytbox { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.ytbox iframe, .ytbox > div:first-child { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytbox .shield { position: absolute; inset: 0; z-index: 2; }
.rec { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--display); color: #be123c; }
.rec i { width: 10px; height: 10px; border-radius: 50%; background: #e11d48; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .35; } }

.progress { margin: 30px 0 8px; }
.bar { height: 12px; border-radius: 999px; background: rgba(11,18,32,.08); overflow: hidden; }
.bar .fill { height: 100%; width: 2%; border-radius: 999px; background: linear-gradient(90deg, #93c5fd, var(--blue)); position: relative; transition: width .6s ease; }
.bar .fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: shine 1.5s infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.pmsg { display: flex; justify-content: space-between; margin-top: 12px; color: var(--ink-2); font-size: 14.5px; }
.bouncer { height: 110px; position: relative; margin-top: 10px; }
.bouncer .b { position: absolute; left: 50%; bottom: 14px; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6ff9a, var(--ball) 48%, #a8c414); animation: bounce .9s cubic-bezier(.3,0,.7,1) infinite alternate; }
.bouncer .s { position: absolute; left: 50%; bottom: 6px; width: 44px; height: 9px; margin-left: -22px; border-radius: 50%; background: rgba(16,40,100,.25); filter: blur(3px); animation: bs .9s cubic-bezier(.3,0,.7,1) infinite alternate; }
@keyframes bounce { from { transform: translateY(-74px); } to { transform: translateY(0) scale(1.08,.92); } }
@keyframes bs { from { transform: scale(.5); opacity: .4; } }

.calib { display: grid; grid-template-columns: 1fr 320px; gap: 22px; margin-top: 24px; }
.cstage { position: relative; border-radius: 20px; overflow: hidden; background: #000; }
.cstage canvas { width: 100%; display: block; cursor: crosshair; touch-action: none; }
.cstage .hint2 { position: absolute; left: 14px; top: 14px; padding: 8px 14px; font: 600 13.5px var(--display); color: var(--ink); background: var(--ball); border-radius: 999px; pointer-events: none; }
.scrub { margin-top: 14px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
input[type=range] { width: 100%; accent-color: var(--ink); }
.side { display: grid; gap: 14px; align-content: start; }
.corner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.corner-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); color: var(--ink-3); font-weight: 600; font-size: 14.5px; }
.corner-list li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--display); font-style: normal; background: rgba(11,18,32,.08); }
.corner-list li.next { border-color: var(--ink); color: var(--ink); background: #fff; }
.corner-list li.done i { background: var(--in); color: #fff; }

/* ---------------------------------------------------------------- results */
.res-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 36px 0 22px; }
.res-top h1 { font-size: clamp(30px, 4.4vw, 54px); max-width: 820px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag { padding: 5px 12px; border-radius: 999px; font: 600 12.5px var(--display); background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.9); color: var(--ink-2); }
.tag.ball { background: var(--ball); border-color: var(--ball); color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0; }
.stat { padding: 20px 22px; border-radius: var(--r-lg); }
.stat .v { font: 700 42px/1 var(--display); letter-spacing: -.04em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 16px; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.stat .s { color: var(--ink-3); font-size: 13px; margin-top: 8px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.block { padding: 24px; border-radius: var(--r-xl); margin-top: 18px; }
.block > .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
#map { width: 100%; height: auto; max-height: 560px; display: block; }
#map .b { cursor: pointer; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 12px; flex-wrap: wrap; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.calls { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.call { scroll-snap-align: start; border-radius: 22px; overflow: hidden; cursor: pointer; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.9); transition: transform .2s, box-shadow .2s; }
.call:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -16px rgba(16,40,100,.4); }
.call img { width: 100%; aspect-ratio: 1; object-fit: cover; background: rgba(11,18,32,.06); }
.call .cc { padding: 13px 15px 15px; }
.call .r1 { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.call .vv { font: 700 26px var(--display); letter-spacing: -.03em; margin-top: 6px; }
.call .det { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.vin { color: var(--in); } .vout { color: var(--out); } .vclose { color: var(--close); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font: 600 11.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr { cursor: pointer; transition: background .15s; }
tbody tr:hover { background: rgba(255,255,255,.6); }
.approx { color: var(--ink-3); }
details.block summary { cursor: pointer; font: 700 17px var(--display); list-style: none; }
details.block summary::after { content: "+"; float: right; color: var(--ink-3); }
details.block[open] summary::after { content: "–"; }
dl.q { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 16px 0 0; font-size: 14.5px; }
dl.q dt { color: var(--ink-3); } dl.q dd { margin: 0; color: var(--ink-2); }

.foot { max-width: 1180px; margin: 0 auto; padding: 30px 20px 50px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; font: 600 14px var(--display); background: var(--ink); color: #fff; z-index: 60; }
.tip { position: fixed; pointer-events: none; z-index: 60; padding: 10px 12px; border-radius: 14px; font-size: 13px; max-width: 260px; background: rgba(11,18,32,.92); color: #fff; }
.fade-in { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].shown { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .grid3, .calib, .split { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav > .btn { margin-left: auto; }
  .hud.bl, .hud.br { display: none; }
}
@media (max-width: 600px) {
  .nav-wrap { padding: 10px 12px 0; }
  .frost { -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%); }
  .nav { padding-left: 14px; gap: 10px; }
  .units { display: none; }
  .wrap { padding: 0 14px; }
  section { padding: 44px 0; }
  .hero { padding-top: 40px; }
  .flow { padding: 22px; margin-top: 22px; border-radius: 28px; }
  .tips { grid-template-columns: 1fr; }
  .stage-card { padding: 8px; border-radius: 26px; }
  .player { border-radius: 18px; }
  .hud { padding: 7px 10px; min-width: 0; border-radius: 14px; }
  .hud .v { font-size: 18px; } .hud .k { font-size: 9px; } .hud .sub { display: none; }
  .controls { left: 8px; right: 8px; bottom: 8px; }
  .time { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 16px; } .stat .v { font-size: 32px; }
  .metric .v { font-size: 36px; }
  .block { padding: 18px; }
  .cta .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* phones: keep the footage visible */
@media (max-width: 600px) {
  .hud.tr { display: none; }
  .hud.tl { top: 8px; left: 8px; padding: 5px 9px; border-radius: 12px; gap: 0; }
  .hud .v { font-size: 15px; } .hud .v small { font-size: 10px; } .hud .k { font-size: 8px; letter-spacing: .1em; }
  .controls { padding: 2px 8px 2px 2px; gap: 6px; }
  .controls button { width: 26px; height: 26px; }
  .controls button svg { width: 14px; height: 14px; }
  .controls .rate { font-size: 11px; padding: 0 6px; }
  .timeline { height: 22px; }
  .timeline .track, .timeline .prog { top: 9px; height: 3px; }
  .timeline .mk { top: 6px; width: 9px; height: 9px; margin-left: -4.5px; border-width: 1.5px; }
  .stage-top { padding: 4px 4px 10px; }
  .chip { padding: 5px 10px; font-size: 12px; }
}

/* top-down court map (minimap.js): between the HUD cards on the right edge, hidden on small players */
.minimap { position: absolute; right: 14px; top: 84px; bottom: 120px; width: auto; aspect-ratio: 0.47; max-height: 300px; z-index: 2; pointer-events: none;
  background: rgba(8, 14, 28, .62); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 6px; }
.minimap canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 720px) { .minimap { display: none; } }

.auto-note { margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(52, 211, 153, .14); border: 1px solid rgba(52, 211, 153, .35); color: #065f46; font-size: 14px; }

/* live stat strip (players' speed + distance, ball speed in flight) — above the controls */
.livebar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 62px; z-index: 2; display: flex; gap: 6px; pointer-events: none; }
.livebar span { padding: 5px 10px; border-radius: 999px; background: rgba(8, 14, 28, .66); border: 1px solid rgba(255,255,255,.14); color: #fff;
  font: 500 12px/1.2 var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.livebar span b { font-weight: 600; color: rgba(255,255,255,.7); margin-right: 6px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.livebar span.ball { color: var(--ball); }
@media (max-width: 900px) { .livebar { display: none; } }

.sp-tag { font-size: .78em; letter-spacing: .02em; }
.hud .v .approx small { font-size: 12px; }

/* LinkedIn-style layout: mini court top-right with a clock, full stat bar at the bottom */
.hud.tr.with-map { display: none; }
.minimap { top: 14px !important; bottom: auto !important; height: min(44%, 260px); max-height: none; padding: 22px 6px 6px; }
.minimap .clock { position: absolute; top: 3px; left: 0; right: 0; text-align: center; font: 700 12px var(--display); color: #fff; letter-spacing: .04em; }
.livebar { left: 14px; right: 14px; transform: none; bottom: 62px; justify-content: space-between; gap: 8px; }
.livebar span { flex: 1 1 0; text-align: center; padding: 6px 8px; border-radius: 10px; font-size: 11.5px; }
.livebar span b { display: block; margin: 0 0 1px; font-size: 9.5px; }
.player:has(.livebar:not([hidden])) .hud.bl, .player:has(.livebar:not([hidden])) .hud.br { bottom: 116px; }

.layer-toggles .sep { width: 1px; height: 22px; background: rgba(11,18,32,.14); margin: 0 4px; align-self: center; }
.chip.style.neon.on { background: #9aff3d; color: #0b1220; } .chip.style.fire.on { background: #ff8a2a; color: #fff; } .chip.style.ice.on { background: #39c6ff; color: #04202c; }
.chip.dl { background: var(--ink); color: #fff; } .chip.dl:disabled { opacity: .7; }

/* match stats */
.msides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.mside h4 { margin: 0 0 6px; font: 700 15px var(--display); }
.mtab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mtab td { padding: 5px 0; border-bottom: 1px solid rgba(11,18,32,.08); }
.mtab td:last-child { text-align: right; font-weight: 600; }
.vin { color: var(--in); } .vout { color: var(--out); } .vclose { color: #0369a1; }
@media (max-width: 720px) { .msides { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- analyze flow: dark broadcast glass (demos and results stay light) */
.aflow { --poster: url('/demos/tennis/poster.jpg'); position: relative; }
.aflow .flow.glass { position: relative; isolation: isolate; overflow: hidden; color: #fff; border-radius: 34px;
  background: #0b1120; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 40px 90px -40px rgba(6,12,40,.7), inset 0 1px 0 rgba(255,255,255,.12); }
.aflow .flow.glass::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--poster) center / cover no-repeat; filter: blur(26px) saturate(130%); transform: scale(1.15); opacity: .5; }
.aflow .flow.glass::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(120% 90% at 85% 0%, rgba(37,99,235,.28), transparent 55%), linear-gradient(180deg, rgba(8,12,28,.55), rgba(8,12,28,.9) 65%, #0b1120 100%); }
.aflow .flow h2 { color: #fff; font-weight: 500; letter-spacing: -.03em; }
.aflow .flow > p, .aflow .muted, .aflow .hint, .aflow .field > span, .aflow .drop small, .aflow .tips div { color: rgba(255,255,255,.68); }
.aflow .steps span { background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.1); }
.aflow .steps span.on { background: var(--ball); color: var(--ink); border-color: var(--ball); }
.aflow .steps span.done { background: rgba(142,240,160,.14); color: #8ef0a0; border-color: rgba(142,240,160,.3); }
.aflow .input { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff; }
.aflow .input::placeholder { color: rgba(255,255,255,.4); }
.aflow .input:focus { border-color: var(--ball); box-shadow: 0 0 0 4px rgba(215,241,58,.18); }
.aflow .drop { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.22); color: #fff; }
.aflow .drop:hover, .aflow .drop.over { background: rgba(255,255,255,.1); border-color: var(--ball); }
.aflow .drop.has { border-color: #8ef0a0; }
.aflow .drop .ico { background: var(--ball); }
.aflow .drop .ico svg { stroke: var(--ink); }
.aflow .tips div { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.aflow .tips b { color: #fff; }
.aflow .capture { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.aflow .btn.ink { background: var(--ball); color: var(--ink); box-shadow: 0 12px 30px -12px rgba(215,241,58,.8); }
.aflow .btn.glass { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.aflow .btn.glass:hover { background: rgba(255,255,255,.18); }
.aflow .btn.glass::after { display: none; }
.aflow .seg { background: rgba(255,255,255,.08); }
.aflow .seg button, .aflow .seg label span { color: rgba(255,255,255,.65); }
.aflow .seg button.on, .aflow .seg input:checked + span { background: #fff; color: var(--ink); }
.aflow .err { color: #ffb4b4; background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.35); }
.aflow .quota { color: rgba(255,255,255,.75); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.aflow .quota b { color: #fff; }
.aflow .quota.glass::after { display: none; }
.aflow .progress .bar { background: rgba(255,255,255,.1); }
.aflow .progress .fill { background: linear-gradient(90deg, #e9ff7a, var(--ball)); }
.aflow .pmsg { color: rgba(255,255,255,.75); }
.aflow .auto-note { color: rgba(255,255,255,.8); }
.aflow .auto-note b { color: #8ef0a0; }
.aflow .cstage { border-radius: 20px; overflow: hidden; background: #000; }
.aflow .hint2 { background: rgba(10,14,28,.8); color: #fff; }
.aflow .scrub span { color: rgba(255,255,255,.7); }
.aflow .scrub b { color: #fff; }
.aflow .corner-list li { color: rgba(255,255,255,.8); }
.aflow .corner-list i { background: var(--ball); color: var(--ink); }
.aflow .side { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 18px; }
.aflow .bouncer .s { background: rgba(255,255,255,.12); }
.aflow .cta .btn.glass { color: #fff; }
.aflow .corner-list li { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.aflow .corner-list li.next { background: rgba(215,241,58,.14); border-color: var(--ball); color: #fff; }
.aflow .corner-list li.done i { background: #8ef0a0; color: var(--ink); }
.aflow .progress .bar, .aflow .bar { background: rgba(255,255,255,.1); }
.aflow .progress .fill, .aflow .fill { background: linear-gradient(90deg, #e9ff7a, var(--ball)); }
/* analyze flow: no dead space above the title */
.aflow .flow { margin-top: 16px; padding: 24px 30px 28px; }
.aflow .steps { margin-bottom: 12px; }
.aflow .flow h2 { margin: 0 0 4px; }
.aflow .form { margin-top: 18px; }
#customRow[hidden] { display: none; }
