/* v13 Analyst Dashboard: the tracking HUD over the POV, the crosshair markers, the analysis sheet over the clip. */
.hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; font-family: var(--sans); }
.hud[hidden] { display: none; }

/* top: what is being tracked, the question, the clock */
.hud__top {
  position: absolute; left: calc(var(--sal) + 10px); right: calc(var(--sar) + 10px); top: calc(var(--sat) + 10px);
  padding: 10px 14px 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(6, 11, 23, .9), rgba(6, 11, 23, .78));
  border: 1px solid var(--line-2);
  animation: hudin .45s var(--ease) both;
}
.hud__row { display: flex; align-items: center; gap: 10px; }
.rec { display: inline-flex; align-items: center; gap: 5px; font: 800 10px/1 var(--mono); letter-spacing: .14em; color: var(--alert); padding: 4px 6px; border: 1px solid rgba(255, 95, 109, .45); border-radius: 5px; }
.rec i { width: 6px; height: 6px; border-radius: 50%; background: var(--alert); animation: blink 1s infinite; }
.hud__meta { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud__main { display: flex; align-items: flex-end; gap: 12px; margin-top: 8px; }
.hud__q { flex: 1; margin: 0; font: 800 22px/1.15 var(--sans); letter-spacing: -.01em; color: var(--ink); min-height: 1.15em; }
.hud__q.is-new { animation: qin .4s var(--spring) both; }
.hud[data-p="buildup"] .hud__q, .hud[data-p="freeze"] .hud__q, .hud[data-p="hide"] .hud__q { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.hud__timer { display: flex; align-items: baseline; gap: 2px; color: var(--you); opacity: .35; transition: opacity .3s, color .3s; }
.hud__timer b { font-size: 34px; font-weight: 800; line-height: .9; }
.hud__timer small { font-size: 14px; font-weight: 700; }
.hud[data-p="choose"] .hud__timer { opacity: 1; }
.hud.is-late .hud__timer { color: var(--alert); }
.hud__bar { margin-top: 10px; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.hud__bar i { display: block; height: 100%; background: var(--you); transform-origin: left; will-change: transform; }
.hud.is-late .hud__bar i { background: var(--alert); }
@keyframes hudin { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes qin { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

/* bottom: the live readouts */
.hud__bottom {
  position: absolute; left: calc(var(--sal) + 10px); right: calc(var(--sar) + 10px); bottom: calc(var(--sab) + 10px);
  display: flex; gap: 8px; animation: hudin .45s .1s var(--ease) both;
}
.ro { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 12px; background: rgba(6, 11, 23, .82); border: 1px solid var(--line-2); display: grid; gap: 2px; }
.ro small { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro span { display: flex; align-items: baseline; gap: 3px; }
.ro b { font-size: 20px; font-weight: 800; color: var(--you); line-height: 1; }
.ro em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.ro--pro b { color: var(--pro); }
.ro--gap b { color: var(--warn); }
.ro--gap.is-close { border-color: rgba(255, 95, 109, .7); }
.ro--gap.is-close b { color: var(--alert); }
.hud[data-p="buildup"] .ro b, .hud[data-p="freeze"] .ro b, .hud[data-p="hide"] .ro b { opacity: .45; }

/* pressure: a red edge that grows as he closes you down (opacity only, own layer) */
.hud__press {
  position: absolute; inset: 0; opacity: 0; will-change: opacity;
  background: radial-gradient(120% 85% at 50% 50%, transparent 55%, rgba(255, 40, 60, .55) 100%);
}
.hud__threat { position: absolute; top: 50%; display: none; padding: 8px 10px; border-radius: 10px; background: rgba(255, 60, 80, .9); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.hud__threat[data-side="left"] { display: block; left: 6px; }
.hud__threat[data-side="right"] { display: block; right: 6px; }
.hud__threat[data-side="behind"] { display: block; left: 50%; top: auto; bottom: calc(var(--sab) + 84px); transform: translateX(-50%); }
.hud__threat[data-side="left"]::before { content: '< '; }
.hud__threat[data-side="right"]::after { content: ' >'; }
.hud__threat[data-side="behind"]::before { content: 'BEHIND YOU: '; }

/* the tap reaction */
.hud__flash { position: absolute; left: 0; right: 0; top: 46%; display: grid; justify-items: center; }
.flash { display: grid; justify-items: center; gap: 4px; padding: 12px 20px; border-radius: 16px; background: rgba(6, 11, 23, .9); border: 1.5px solid; animation: flash .5s var(--spring) both; }
.flash b { font-size: 24px; font-weight: 800; }
.flash span { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--ink-2); }
.flash--good { border-color: var(--good); color: var(--good); box-shadow: 0 0 30px rgba(52, 227, 154, .35); }
.flash--warn { border-color: var(--warn); color: var(--warn); }
.flash--alert { border-color: var(--alert); color: var(--alert); }
@keyframes flash { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* ---------- the crosshair markers (never transform .pt-mk itself) ---------- */
.stage.is-placing .pt-mk { visibility: hidden; }
.ax-mk { position: relative; width: 64px; height: 64px; display: grid; place-items: center; animation: mkin .45s calc(var(--i) * 80ms) var(--spring) both; }
.ax-ret { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--you); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(57, 228, 255, .8)); }
.ax-tick { stroke-width: 2; opacity: .8; }
.ax-spin { position: absolute; inset: 12px; border-radius: 50%; border: 2px dashed rgba(57, 228, 255, .8); background: rgba(6, 11, 23, .55); will-change: transform; animation: mkspin 4s linear infinite; }
.ax-id { position: relative; font: 800 20px/1 var(--mono); color: #fff; text-shadow: 0 1px 4px #000; }
.ax-tag {
  position: absolute; top: calc(100% - 2px); left: 50%; transform: translateX(-50%); pointer-events: none;
  width: max-content; max-width: 88px; padding: 3px 7px; border-radius: 6px; text-align: center;
  background: rgba(6, 11, 23, .86); border: 1px solid var(--line-2);
  font: 700 11px/1.2 var(--sans); color: var(--ink);
}
.pt-mk:hover .ax-ret, .pt-mk:focus-visible .ax-ret { stroke: #fff; }
.pt-mk:active .ax-mk { transform: scale(.86); }
.pt-mk.is-pro .ax-ret { stroke: var(--good); filter: drop-shadow(0 0 6px rgba(52, 227, 154, .9)); }
.pt-mk.is-pro .ax-spin { border-style: solid; border-color: var(--good); background: rgba(52, 227, 154, .35); animation: lock .5s var(--spring) both; }
.pt-mk.is-pro .ax-tag { border-color: var(--good); color: var(--good); }
.pt-mk.is-mine .ax-ret { stroke: var(--alert); filter: none; }
.pt-mk.is-mine .ax-spin { border-style: solid; border-color: var(--alert); background: rgba(255, 95, 109, .3); animation: lock .5s var(--spring) both; }
.pt-mk.is-mine .ax-tag { border-color: var(--alert); color: var(--alert); }
.pt-mk.is-dim { opacity: .28; }
.pt-mk[data-edge]::before { border-width: 10px; }
.pt-mk[data-edge=l]::before { border-right-color: var(--you); }
.pt-mk[data-edge=r]::before { border-left-color: var(--you); }
.pt-paths path { stroke: rgba(57, 228, 255, .75); stroke-width: 3; stroke-dasharray: 3 10; }
.pt-paths path.is-pro { stroke: var(--good); }
.pt-paths path.is-mine { stroke: var(--alert); }
.pt-paths ellipse { fill: rgba(57, 228, 255, .2); }
.pt-paths ellipse.is-pro { fill: rgba(52, 227, 154, .35); }
@keyframes mkin { from { opacity: 0; transform: scale(1.8); } to { opacity: 1; transform: none; } }
@keyframes mkspin { to { transform: rotate(360deg); } }
@keyframes lock { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* ---------- reveal: the real clip in an analyst frame + the analysis sheet ---------- */
.clipframe { position: absolute; display: none; border-radius: 12px; border: 1px solid var(--line-2); box-shadow: 0 0 0 1px rgba(6, 11, 23, .9), 0 20px 50px rgba(0, 0, 0, .5); }
.clipframe.is-on { display: block; animation: rise .5s var(--ease) both; }
.clipframe__h { position: absolute; left: 4px; right: 4px; bottom: calc(100% + 12px); display: grid; gap: 6px; }
.clipframe__h .kicker { display: flex; gap: 6px; align-items: center; color: var(--you); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; }
.clipframe__h .kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--alert); flex: none; animation: blink 1s infinite; }
.clipframe__h b { font: 800 22px/1.15 var(--sans); color: var(--ink); }
body[data-phase="reveal"] .hud__top, body[data-phase="reveal"] .hud__bottom, body[data-phase="reveal"] .hud__flash, body[data-phase="reveal"] .hud__press { display: none; }
.sheetwrap { position: absolute; inset: auto 0 0 0; pointer-events: auto; }
.sheet {
  margin: 0 auto; max-width: 560px; padding: 16px 16px calc(var(--sab) + 16px);
  background: linear-gradient(180deg, var(--panel-2), var(--bg-2)); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 20px 20px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
  animation: sheetin .5s var(--ease) both;
}
@keyframes sheetin { from { transform: translateY(100%); } to { transform: none; } }
.sheet__head { min-width: 0; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.sheet__id { min-width: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--ink-3); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__h { margin: 0; font: 800 22px/1.15 var(--sans); letter-spacing: -.01em; }
.sheet__mine { margin: 0; font-size: 14px; color: var(--ink-2); }
.sheet__mine b { color: var(--alert); }
.sheet__saw { margin: 0; font-size: 14.5px; color: var(--ink-2); display: grid; gap: 4px; }
.sheet__saw .kicker { color: var(--pro); }
.tag--good { color: var(--good); background: rgba(52, 227, 154, .14); }
.tag--warn { color: var(--warn); background: rgba(255, 181, 71, .14); }
.bars { display: grid; gap: 6px; }
.bars__row { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); }
.bars__row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars__row i { height: 10px; border-radius: 5px; background: var(--line); position: relative; overflow: hidden; }
.bars__row i::after { content: ''; position: absolute; inset: 0; width: var(--w); border-radius: inherit; transform-origin: left; animation: barin .9s .25s var(--ease) both; }
.bars__row.is-you i::after { background: var(--you); }
.bars__row.is-pro i::after { background: var(--pro); }
.bars__row b { text-align: right; font-size: 14px; color: var(--ink); }
@keyframes barin { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (min-width: 900px) {
  .hud__top { left: 24px; right: auto; top: 24px; width: min(560px, 46vw); }
  .hud__q { font-size: 26px; }
  .hud__bottom { left: 24px; right: auto; bottom: 24px; width: min(460px, 40vw); }
  .sheetwrap { inset: 24px 24px 24px auto; width: 420px; display: flex; align-items: center; }
  .sheet { border-radius: 20px; border-bottom: 1px solid var(--line-2); padding: 22px; gap: 14px; animation-name: sheetinx; }
  .sheet__h { font-size: 26px; }
  @keyframes sheetinx { from { transform: translateX(110%); } to { transform: none; } }
}
