/* v19 in play: the visor HUD inside the stage (module chip, 6 pips, the brow timer, the question, the hint),
   the lock-on hex markers, threat chevrons + red alarm under pressure, the link pre-roll, the lock wave, the
   verdict word, and the memory playback (the real clip in a hologram frame). Nothing here repaints per frame except
   the brow arc, the digits and the alarm's opacity (own layer). */
:root {
  --clip-t: calc(92px + var(--sat));
  --clip-l: 14px;
  --clip-w: calc(100vw - 28px);
  --clip-h: calc((100vw - 28px) * 9 / 16);
}
@media (min-width: 900px) {
  :root {
    --clip-t: 128px;
    --clip-l: 56px;
    --clip-w: min(calc(100vw - 600px), calc((100vh - 240px) * 16 / 9));
    --clip-h: calc(var(--clip-w) * 9 / 16);
  }
}

.hud { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.hud > * { pointer-events: none; }
.hud::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 230px;
  background: linear-gradient(to bottom, rgba(1, 11, 14, .78), rgba(1, 11, 14, .35) 60%, transparent);
}
.hud::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 130px;
  background: linear-gradient(to top, rgba(1, 11, 14, .7), transparent);
}
body[data-phase="landing"] .hud { display: none; }

/* the red alarm (moved by JS right after the canvas: it paints under the markers) */
.hud__alarm {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; will-change: opacity;
  background: radial-gradient(120% 85% at 50% 55%, transparent 48%, rgba(255, 40, 90, .5) 100%);
}

.hud__top { position: absolute; z-index: 2; top: calc(12px + var(--sat)); left: 14px; right: 14px; display: grid; justify-items: center; gap: 4px; }
.hud__row { width: 100%; display: flex; align-items: center; gap: 10px; padding-right: 54px; min-height: 44px; }
.hud__mod {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--holo-line); background: rgba(1, 15, 19, .7);
  font: 700 12px/1 var(--lab); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.hud__mod b { color: var(--holo); }
.hud__mod span { color: var(--ink-faint); font-family: var(--mono); letter-spacing: .04em; }
.pips { display: flex; gap: 4px; }
.pips i { width: 14px; height: 6px; background: rgba(232, 253, 255, .2); transform: skewX(-20deg); }
.pips i.is-sync { background: var(--sync); box-shadow: 0 0 8px rgba(125, 255, 176, .7); }
.pips i.is-miss { background: var(--miss); }
.pips i.is-now { background: var(--holo); animation: vz-blink .9s steps(2, jump-none) infinite; }

.brow { position: relative; width: 250px; height: 58px; opacity: 0; transition: opacity .25s; }
.brow svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.brow path { fill: none; stroke-width: 5; stroke-linecap: round; }
.brow__bg { stroke: rgba(232, 253, 255, .16); }
.brow__arc { stroke: var(--holo); stroke-dasharray: 100; stroke-dashoffset: 0; filter: drop-shadow(0 0 5px rgba(94, 242, 255, .8)); }
.brow__n { position: absolute; left: 0; right: 0; bottom: -4px; text-align: center; font: 700 36px/1 var(--disp); color: var(--ink); font-variant-numeric: tabular-nums; }
.brow.is-low .brow__arc { stroke: var(--miss); filter: drop-shadow(0 0 6px rgba(255, 107, 138, .9)); }
.brow.is-low .brow__n { color: var(--miss); }
.hud.is-choosing .brow { opacity: 1; }

.hud__q {
  margin: 4px 0 0; max-width: 20ch; text-align: center; font: 700 34px/.95 var(--disp); text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink); text-shadow: 0 2px 12px rgba(0, 0, 0, .8), -2px 0 rgba(255, 79, 216, .5), 2px 0 rgba(94, 242, 255, .5); min-height: 0;
}
.hud__q:empty { display: none; }
.hud__q.is-in { animation: vz-glitch-in .45s steps(5, end) both; }
.hud.is-glitch .hud__q { animation: vz-jitter .18s steps(2) infinite; will-change: transform; }
@keyframes vz-jitter { 0% { transform: translateX(-2px); } 50% { transform: translateX(2px) skewX(-3deg); } 100% { transform: none; } }

.hud__bottom { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: calc(18px + var(--sab)); display: flex; justify-content: center; }
.hud__hint {
  margin: 0; padding: 10px 16px; border: 1px solid var(--holo-line); background: rgba(1, 15, 19, .78);
  font: 600 15px/1.25 var(--body); color: var(--ink); text-align: center;
}
.hud__hint:empty { display: none; }
.hud__hint b { color: var(--holo); }
.hud__hint.is-quiet { background: rgba(1, 15, 19, .55); }
.hud__hint.is-alarm { border-color: rgba(255, 107, 138, .7); background: rgba(40, 4, 14, .82); font: 700 20px/1.1 var(--disp); letter-spacing: .06em; text-transform: uppercase; padding-top: 12px; }
.hud__hint.is-alarm b { color: var(--miss); }
.hud.is-blink::after { animation: vz-flash .5s ease-out; }
@keyframes vz-flash { 0% { background: rgba(196, 251, 255, .5); } 100% { background: linear-gradient(to top, rgba(1, 11, 14, .7), transparent); } }
.hud.is-link .hud__top, .hud.is-link .hud__bottom { opacity: 0; }
.hud.is-answered .brow, .hud.is-answered .hud__q { opacity: .25; transition: opacity .3s; }

/* threat chevrons on the visor edge (the presser is off screen) */
.threat { position: absolute; z-index: 2; display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .2s; color: var(--miss); font: 700 13px/1 var(--lab); letter-spacing: .14em; text-transform: uppercase; }
.threat.is-on { opacity: 1; }
.threat i { width: 12px; height: 22px; background: currentColor; animation: vz-chev .7s ease-in-out infinite; }
.threat i:nth-of-type(2) { animation-delay: .12s; } .threat i:nth-of-type(3) { animation-delay: .24s; }
@keyframes vz-chev { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.threat span { padding: 6px 8px; background: rgba(40, 4, 14, .85); writing-mode: vertical-rl; }
.threat--l { left: 6px; top: 50%; transform: translateY(-50%); }
.threat--l i { clip-path: polygon(100% 0, 0 50%, 100% 100%, 60% 50%); }
.threat--r { right: 6px; top: 50%; transform: translateY(-50%); }
.threat--r i { clip-path: polygon(0 0, 100% 50%, 0 100%, 40% 50%); }
.threat--b { left: 50%; bottom: calc(80px + var(--sab)); transform: translateX(-50%); }
.threat--b span { writing-mode: horizontal-tb; padding: 8px 14px; border: 1px solid var(--miss); animation: vz-chev .6s ease-in-out infinite; }

/* the link pre-roll over the frozen first frame */
.link { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; background: rgba(1, 11, 14, .62); }
.link__k { margin: 0; font: 700 12px/1 var(--lab); letter-spacing: .22em; text-transform: uppercase; color: var(--holo); }
.link__name { margin: 0; font: 700 clamp(48px, 13vw, 96px)/.9 var(--disp); text-transform: uppercase; color: var(--ink); text-shadow: -3px 0 rgba(255, 79, 216, .6), 3px 0 rgba(94, 242, 255, .6); }
.link__match { margin: 0; font: 500 13px/1.3 var(--mono); color: var(--ink-dim); }
.link__bar { width: 200px; height: 4px; margin-top: 10px; background: var(--holo-faint); overflow: hidden; }
.link__bar i { display: block; height: 100%; background: var(--holo); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 10px var(--holo); }
.link.is-on .link__name { animation: vz-glitch-in .6s steps(6, end) both; }
.link.is-on .link__bar i { animation: vz-bar 1.15s cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes vz-bar { to { transform: scaleX(1); } }

/* ---- markers: a lock-on hexagon on the pitch ---- */
.stage.is-placing .pt-mk { visibility: hidden; }
.pt-mk { min-width: 64px; min-height: 64px; }
.mk { position: relative; display: grid; place-items: center; width: 62px; height: 62px; }
.mk__hex { position: absolute; inset: 1px; width: 60px; height: 60px; overflow: visible; }
.mk__hex path { fill: rgba(1, 15, 19, .62); stroke: var(--holo); stroke-width: 2.5; stroke-linejoin: round; }
.mk__spin { position: absolute; inset: -9px; width: 80px; height: 80px; will-change: transform; animation: vz-spin 4s linear infinite; }
.mk__spin circle { fill: none; stroke: var(--holo-dim); stroke-width: 2; stroke-dasharray: 10 14; }
.mk__id { position: relative; font: 700 30px/1 var(--disp); color: var(--holo-hi); padding-top: 5px; text-shadow: 0 0 10px rgba(94, 242, 255, .8); }
.pt-choosing .mk { animation: vz-lockin .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes vz-lockin { 0% { opacity: 0; transform: scale(1.8) rotate(30deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.pt-mk:hover .mk__hex path { fill: rgba(94, 242, 255, .25); }
.pt-mk:active .mk { transform: scale(.9); }
.mk__tag {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 150px; pointer-events: none;
  padding: 5px 8px; background: rgba(1, 15, 19, .86); border: 1px solid var(--holo-line); color: var(--ink);
  font: 600 13px/1.2 var(--body); text-align: center;
}
.pt-mk[data-al="l"] .mk__tag { left: -2px; transform: none; text-align: left; }
.pt-mk[data-al="r"] .mk__tag { left: auto; right: -2px; transform: none; text-align: right; }
.pt-mk[data-edge=l]::before { border-right-color: var(--holo); left: -10px; }
.pt-mk[data-edge=r]::before { border-left-color: var(--holo); right: -10px; }
.pt-mk.is-pro .mk__hex path { fill: rgba(125, 255, 176, .9); stroke: var(--sync); }
.pt-mk.is-pro .mk__id { color: #02200f; text-shadow: none; }
.pt-mk.is-pro .mk__spin circle { stroke: var(--sync); stroke-dasharray: none; }
.pt-mk.is-pro .mk__tag { border-color: var(--sync); }
.pt-mk.is-mine .mk__hex path { fill: rgba(255, 107, 138, .85); stroke: var(--miss); }
.pt-mk.is-mine .mk__id { color: #2a0610; text-shadow: none; }
.pt-mk.is-mine .mk__spin { display: none; }
.pt-mk.is-dim { opacity: .3; }
.pt-answered .pt-mk.is-pro .mk { animation: vz-locked .5s var(--ease) both; }
@keyframes vz-locked { 0% { transform: scale(1.35); } 100% { transform: none; } }
.pt-paths path { stroke: rgba(94, 242, 255, .75); }
.pt-paths path.is-pro { stroke: var(--sync); }
.pt-paths path.is-mine { stroke: var(--miss); }
.pt-paths ellipse { fill: rgba(94, 242, 255, .22); }
.pt-paths ellipse.is-pro { fill: rgba(125, 255, 176, .35); }

/* the lock-on wave from the tapped spot + the verdict word */
.wave { position: absolute; z-index: 1; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 3px solid var(--holo); opacity: 0; will-change: transform, opacity; }
.wave.is-sync { border-color: var(--sync); } .wave.is-miss { border-color: var(--miss); }
.wave.is-on { animation: vz-wave .9s ease-out both; }
@keyframes vz-wave { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(26); } }
.verdict { position: absolute; z-index: 4; left: 16px; right: 16px; top: 40%; display: grid; justify-items: center; gap: 6px; text-align: center; opacity: 0; }
.verdict.is-on { animation: vz-verdict 1.2s var(--ease) both; }
@keyframes vz-verdict { 0% { opacity: 0; transform: scale(1.25); } 15% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 1; } }
.verdict b { position: relative; font: 700 clamp(64px, 18vw, 120px)/.85 var(--disp); text-transform: uppercase; letter-spacing: .02em; padding-top: 8px; text-shadow: 0 4px 30px rgba(0, 0, 0, .8); }
.verdict b::before, .verdict b::after { content: attr(data-t); position: absolute; inset: 8px 0 0; opacity: .6; }
.verdict b::before { color: var(--mag); transform: translateX(-4px); clip-path: inset(0 0 55% 0); }
.verdict b::after { color: var(--holo); transform: translateX(4px); clip-path: inset(55% 0 0 0); }
.verdict span { padding: 8px 14px; background: rgba(1, 15, 19, .85); font: 600 17px/1.25 var(--body); }
.verdict.is-sync b { color: var(--sync); }
.verdict.is-miss b { color: var(--miss); }

/* ---- memory playback: the real clip in a hologram frame (3D stops drawing) ---- */
.stage.vz-reveal { visibility: hidden; }
.stage.vz-reveal > .pt-clip {
  visibility: visible; opacity: 1; inset: auto; top: var(--clip-t); left: var(--clip-l); width: var(--clip-w); height: var(--clip-h);
  object-fit: cover; background: #000; border-radius: 4px;
}
.page.pb { padding-bottom: calc(18px + var(--sab)); }
.pb__top { position: fixed; z-index: 2; top: calc(26px + var(--sat)); left: 18px; right: 64px; display: grid; gap: 6px; }
.pb__top .tagline { color: var(--holo); }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--miss); box-shadow: 0 0 10px var(--miss); animation: vz-blink 1s steps(2, jump-none) infinite; }
.pb__who { margin: 0; font: 500 12px/1.3 var(--mono); color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb__frame { position: fixed; z-index: 2; pointer-events: none; top: var(--clip-t); left: var(--clip-l); width: var(--clip-w); height: var(--clip-h); box-shadow: 0 0 0 1px var(--holo-line), 0 0 40px rgba(94, 242, 255, .18); }
.pb__frame::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(94, 242, 255, .06) 0 1px, transparent 1px 3px); }
.br { position: absolute; width: 18px; height: 18px; border: 2px solid var(--holo); }
.br--tl { top: -6px; left: -6px; border-right: 0; border-bottom: 0; } .br--tr { top: -6px; right: -6px; border-left: 0; border-bottom: 0; }
.br--bl { bottom: -6px; left: -6px; border-right: 0; border-top: 0; } .br--br { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
.pb__real { position: absolute; left: 8px; bottom: 8px; padding: 4px 8px; background: rgba(1, 11, 14, .8); font: 700 11px/1 var(--lab); letter-spacing: .14em; text-transform: uppercase; color: var(--holo); }
.pb__card { margin: calc(var(--clip-t) + var(--clip-h) + 18px) 16px 0; display: grid; gap: 12px; }
.pb__head { margin: 0; font: 700 34px/.95 var(--disp); text-transform: uppercase; letter-spacing: .01em; }
.pb__head em { font-style: normal; display: block; font-size: .62em; letter-spacing: .04em; color: var(--ink-dim); margin-top: 4px; }
.pb__head.is-sync { color: var(--sync); } .pb__head.is-miss { color: var(--miss); }
.pb__head.is-sync em { color: var(--ink); }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vs > div { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--holo-line); background: rgba(3, 26, 33, .8); }
.vs small { font: 700 11px/1 var(--lab); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.vs b { font: 700 36px/1 var(--disp); padding-top: 4px; }
.vs p { margin: 0; font: 500 13px/1.3 var(--body); color: var(--ink-dim); }
.vs__me.is-sync { border-color: rgba(125, 255, 176, .5); } .vs__me.is-sync b { color: var(--sync); }
.vs__me.is-miss { border-color: rgba(255, 107, 138, .5); } .vs__me.is-miss b { color: var(--miss); }
.vs__pro b { color: var(--holo); }
.pb__saw { margin: 0; font: 500 14px/1.45 var(--body); color: var(--ink-dim); }
.pb__saw b { display: block; font: 700 11px/1.4 var(--lab); letter-spacing: .16em; text-transform: uppercase; color: var(--holo); }
.pb__card .cta { max-width: none; margin-top: 2px; }
@media (min-width: 900px) {
  .pb__top { top: 54px; left: var(--clip-l); }
  .pb__card { position: absolute; margin: 0; top: var(--clip-t); left: calc(var(--clip-l) + var(--clip-w) + 44px); right: 56px; max-width: 460px; }
  .pb__head { font-size: 46px; }
}
