/* Sentinel Reward Lab console. The palette, frame, motion and row semantics
   are Sentinel's (ui-throwaway-1/src/index.css) — same tokens, same rule that
   motion uses steps() and hard strikes so it reads as an instrument refreshing,
   not a web app animating. Everything animated has a reduced-motion answer. */

:root {
  --void: #0b0b0d;
  --panel: #131316;
  --line: #2a2a30;
  --dim: #6a6a72;
  --live: #b8f42a;
  --breach: #ff2d2d;
  --warn: #f0a92b;
  --body: #e6e6ea;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--body);
  font-family: var(--mono);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; }
[hidden] { display: none !important; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 3px);
}

.tele { text-transform: uppercase; letter-spacing: .15em; color: var(--dim); }
@media (max-width: 639px) { .tele { letter-spacing: .08em; } }
.live-text { color: var(--live); }
.warn-text { color: var(--warn); }
.glow { text-shadow: 0 0 6px color-mix(in srgb, var(--live) 55%, transparent); }
.alarm-text {
  color: var(--breach);
  text-shadow: 0 0 8px color-mix(in srgb, var(--breach) 60%, transparent);
  animation: alarm-breathe 1.6s ease-in-out infinite;
}
@keyframes alarm-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.noscript { padding: 40px; text-align: center; }

/* --- frame ---------------------------------------------------------------- */

.frame-wrap {
  position: relative;
  width: 100%;
  height: var(--app-h, 100dvh);
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.crop { position: absolute; width: 22px; height: 22px; border: 0 solid var(--dim); opacity: .75; }
.crop-tl { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.crop-tr { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.crop-bl { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.crop-br { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }
@media (max-width: 639px) {
  .crop { width: 14px; height: 14px; }
  .crop-tl, .crop-tr { top: 4px; } .crop-bl, .crop-br { bottom: 4px; }
  .crop-tl, .crop-bl { left: 4px; } .crop-tr, .crop-br { right: 4px; }
}

.frame { pointer-events: none; position: absolute; inset: 12px; }
@media (min-width: 640px) { .frame { inset: 20px; } }
.frame-edge, .frame-notch { position: absolute; background: var(--line); }
.frame-edge-h { height: 1px; left: 28px; right: 28px; }
.frame-edge-v { width: 1px; top: 28px; bottom: 28px; }
.fe-top { top: 0; } .fe-bottom { bottom: 0; } .fe-left { left: 0; } .fe-right { right: 0; }
.fn-tl-h, .fn-tr-h, .fn-bl-h, .fn-br-h { width: 19px; height: 1px; }
.fn-tl-v, .fn-tr-v, .fn-bl-v, .fn-br-v { width: 1px; height: 19px; }
.fn-tl-h, .fn-tl-v { top: 10px; left: 10px; }
.fn-tr-h, .fn-tr-v { top: 10px; right: 10px; }
.fn-bl-h, .fn-bl-v { bottom: 10px; left: 10px; }
.fn-br-h, .fn-br-v { bottom: 10px; right: 10px; }

.is-breach .crop { border-color: var(--breach); opacity: 1; }
.is-breach .frame-edge, .is-breach .frame-notch {
  background: var(--breach);
  box-shadow: 0 0 10px var(--breach), 0 0 28px color-mix(in srgb, var(--breach) 40%, transparent);
}
.is-alarmed .crop { border-color: color-mix(in srgb, var(--breach) 70%, var(--dim)); }

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 24px 44px;
}
@media (min-width: 640px) { .screen { padding: 36px 40px 56px; } }

.telemetry {
  position: absolute;
  bottom: 20px;
  left: 48px;
  font-size: 9px;
  opacity: .45;
  pointer-events: none;
  white-space: nowrap;
}
@media (min-width: 640px) { .telemetry { bottom: 28px; left: 56px; } }
@media (max-width: 639px) { .telemetry { bottom: 16px; left: 30px; right: 30px; overflow: hidden; } }

.rails-l, .rails-r {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  opacity: .35;
  pointer-events: none;
  display: none;
}
.rails-l { left: 44px; } .rails-r { right: 44px; text-align: right; }
.rails-l > div, .rails-r > div { margin: 8px 0; }
@media (min-width: 1024px) { .rails-l, .rails-r { display: block; } }
/* The board fills the frame; rails only fit once its column leaves margins. */
.on-board .rails-l, .on-board .rails-r { display: none; }
@media (min-width: 1480px) { .on-board .rails-l, .on-board .rails-r { display: block; } }
.rail-line { animation: rail-refresh 7s steps(1, end) infinite; }
@keyframes rail-refresh { 0%, 3% { opacity: .12; } 4%, 100% { opacity: 1; } }

/* --- motion --------------------------------------------------------------- */

.screen-enter { animation: screen-in 360ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes screen-in {
  0%   { transform: scaleY(.004); opacity: .15; filter: brightness(2.4); }
  55%  { transform: scaleY(1.02); opacity: 1; filter: brightness(1.3); }
  100% { transform: scaleY(1); opacity: 1; filter: brightness(1); }
}
.flash-line {
  position: fixed; left: 0; right: 0; top: 50%; height: 1px; z-index: 95; pointer-events: none;
  background: var(--live);
  box-shadow: 0 0 24px var(--live), 0 0 60px color-mix(in srgb, var(--live) 55%, transparent);
  animation: flash-line 360ms ease-out both;
}
@keyframes flash-line { 0% { transform: scaleX(0); opacity: 1; } 40% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.is-breach .screen { animation: breach-shake 90ms steps(2, end) infinite; }
@keyframes breach-shake {
  0% { transform: translate(0,0); } 25% { transform: translate(-2px,1px); } 50% { transform: translate(2px,-1px); }
  75% { transform: translate(-1px,-1px); } 100% { transform: translate(1px,1px); }
}

/* --- sigil ---------------------------------------------------------------- */

.sigil { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12%; flex-shrink: 0; color: var(--live); }
.sigil.dim { color: var(--dim); }
.sigil > i { display: block; }
.sigil > i.on { background: currentColor; box-shadow: 0 0 var(--bloom, 0px) currentColor; }
.sigil-think > i.on { animation: sigil-cycle 1.5s steps(1, end) infinite; }
.sigil-think > i:nth-child(3) { animation-delay: .3s; }
.sigil-think > i:nth-child(5) { animation-delay: .6s; }
.sigil-think > i:nth-child(7) { animation-delay: .9s; }
.sigil-think > i:nth-child(9) { animation-delay: 1.2s; }
@keyframes sigil-cycle { 0% { opacity: 1; box-shadow: 0 0 10px currentColor; } 20%, 100% { opacity: .18; box-shadow: none; } }
.sigil-wake { animation: sigil-wake 1.2s steps(1, end) 1 both; }
@keyframes sigil-wake {
  0%, 7% { filter: brightness(.15); } 8%, 11% { filter: brightness(2.2); } 12%, 19% { filter: brightness(.2); }
  20%, 26% { filter: brightness(1.6); } 27%, 33% { filter: brightness(.35); } 34%, 100% { filter: brightness(1); }
}
.is-alarmed .bhead .sigil { color: var(--breach); }

/* --- gate / boot / auth --------------------------------------------------- */

.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; }
.band { width: 100%; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; text-align: center; font-size: 11px; }

.wake-btn {
  position: relative; display: inline-flex; align-items: center; gap: .9rem; min-height: 52px; padding: 0 2.4rem;
  border: 1px solid var(--live); background: transparent; color: var(--live); cursor: pointer; overflow: hidden;
  animation: wake-breathe 3.4s ease-in-out infinite;
}
.wake-btn::before {
  content: ""; position: absolute; inset: 0; background: var(--live);
  transform: scaleX(0); transform-origin: left; transition: transform 240ms cubic-bezier(.2,.8,.2,1);
}
.wake-btn > * { position: relative; color: inherit; transition: color 240ms; }
.wake-btn:hover::before, .wake-btn:focus-visible::before { transform: scaleX(1); }
.wake-btn:hover, .wake-btn:focus-visible { color: var(--void); outline: none; }
.wake-btn:hover .sigil, .wake-btn:focus-visible .sigil { color: var(--void) !important; }
.wake-btn:active { transform: translateY(1px); }
@keyframes wake-breathe { 0%, 100% { box-shadow: 0 0 0 transparent; } 50% { box-shadow: 0 0 20px color-mix(in srgb, var(--live) 28%, transparent); } }

.silent-btn {
  background: none; border: 0; cursor: pointer; padding: 8px 12px; border-bottom: 1px solid transparent; color: var(--dim);
}
.silent-btn:hover, .silent-btn:focus-visible { color: var(--body); border-bottom-color: var(--line); outline: none; }
.silent-btn.is-on { color: var(--live); border-bottom-color: var(--live); }

.inventory { width: 100%; max-width: 46ch; font-size: 11px; }
.inventory > div { display: flex; align-items: baseline; margin: 6px 0; }
.leader { flex: 1; border-bottom: 1px dotted var(--line); margin: 0 .75rem .28em; min-width: 1rem; }
@media (max-width: 639px) { .leader { margin: 0 .4rem .28em; } .inventory { font-size: 10px; } }

.pass-wrap { position: relative; width: 100%; max-width: 34ch; }
.pass-echo { pointer-events: none; display: flex; min-height: 22px; align-items: center; justify-content: center; gap: 11px; padding-bottom: 10px; flex-wrap: wrap; }
.pass-field {
  position: absolute; inset: 0; background: transparent; border: 0; border-bottom: 1px solid var(--live);
  outline: none; color: transparent; caret-color: transparent; font: inherit; font-size: 16px; width: 100%;
  padding: 0 0 10px; text-align: center;
}
.pass-glyph { width: 11px; height: 11px; color: var(--live); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--live) 70%, transparent)); animation: glyph-in 260ms ease-out both; }
@keyframes glyph-in { 0% { opacity: 0; transform: scale(2.2); filter: brightness(3); } 60% { opacity: 1; transform: scale(1); filter: brightness(2); } 100% { opacity: 1; transform: scale(1); } }
.block-cursor { display: inline-block; width: 9px; height: 1.1em; background: var(--live); vertical-align: text-bottom; animation: blink 1.1s steps(1, end) infinite; }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.hint { font-size: 9px; text-align: center; }

.breach-veil {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--breach) 16%, transparent), transparent 70%), color-mix(in srgb, var(--breach) 7%, transparent);
  animation: breach-pulse .34s steps(2, end) infinite;
}
@keyframes breach-pulse { 0% { opacity: .55; } 50% { opacity: 1; } 100% { opacity: .55; } }
.marquee { overflow: hidden; white-space: nowrap; width: 100%; background: color-mix(in srgb, var(--void) 85%, transparent); padding: 12px 0; }
.marquee > span { display: inline-block; padding-right: 2rem; animation: marquee 4.5s linear infinite; color: var(--breach); text-shadow: 0 0 12px var(--breach); font-size: 36px; }
@media (max-width: 639px) { .marquee > span { font-size: 24px; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- board header --------------------------------------------------------- */

.bhead { position: relative; display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bhead .brand { font-size: 11px; }
.bhead .status { font-size: 10px; }
.bhead .stats { font-size: 9px; opacity: .65; }
.bhead .spacer { flex: 1; }
.bhead .clock { font-size: 9px; opacity: .7; }
@media (max-width: 639px) { .bhead .stats, .bhead .clock { display: none; } .bhead { gap: 8px; } }
@media (max-width: 899px) { .bhead .stats { display: none; } }

.carrier::after {
  content: ""; position: absolute; bottom: -1px; left: 0; height: 1px; width: 20%;
  background: linear-gradient(90deg, transparent, var(--live), transparent);
  animation: carrier 1.6s linear infinite;
}
@keyframes carrier { from { transform: translateX(-110%); } to { transform: translateX(560%); } }

.ring { display: inline-flex; }
.ring svg { transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: 2; }
.ring-track { stroke: var(--line); }
.ring-run {
  stroke: var(--live); stroke-dasharray: 62.8; stroke-dashoffset: 0; animation: ring-drain linear both;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--live) 70%, transparent));
}
.ring.is-late .ring-run { stroke: var(--warn); animation: alarm-breathe 1.6s ease-in-out infinite; stroke-dashoffset: 0; }
@keyframes ring-drain { to { stroke-dashoffset: 62.8; } }

/* mute + rocker */
.mute { position: relative; flex-shrink: 0; margin-right: -8px; }
.mute-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; font-size: 13px; touch-action: none; color: var(--live); }
.mute-btn.is-muted { color: var(--dim); }
.rocker {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: 46px; padding: 8px 8px 4px;
  background: var(--void); border: 1px solid var(--line); transform-origin: top; animation: rocker-in 150ms cubic-bezier(.2,.8,.2,1) both;
  touch-action: none; pointer-events: none;
}
@keyframes rocker-in { from { transform: scaleY(.08); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.rocker-strip { display: flex; flex-direction: column; gap: 3px; height: 148px; }
.rocker-seg { flex: 1; background: var(--line); }
.rocker-seg.on { background: var(--live); box-shadow: 0 0 6px color-mix(in srgb, var(--live) 55%, transparent); }
.rocker.is-muted .rocker-seg.on { background: var(--dim); box-shadow: none; }
.rocker-val { padding-top: 6px; text-align: center; font-size: 9px; color: var(--live); }

/* --- board body ----------------------------------------------------------- */

.bview { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.bscroll { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 18px 4px 12px 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.bscroll::-webkit-scrollbar { width: 6px; }
.bscroll::-webkit-scrollbar-thumb { background: var(--line); }
.binner { max-width: 1240px; margin: 0 auto; }

.wsweep {
  position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 5; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--live) 25%, var(--live) 75%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--live) 70%, transparent);
  animation: wsweep 1100ms cubic-bezier(.4,0,.2,1) both;
}
@keyframes wsweep { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 85% { opacity: .7; } 100% { transform: translateY(var(--sweep-h, 78vh)); opacity: 0; } }

/* KPI strip: numbers first, the way an instrument leads with its needle. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.kpi { position: relative; padding: 14px 14px 12px; border-right: 1px solid var(--line); min-width: 0; }
.kpi:last-child { border-right: 0; }
@media (max-width: 639px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--line); padding: 11px 8px 10px; }
  .kpi:nth-child(odd) { border-right: 1px solid var(--line); }
  .kpi:nth-last-child(-n+2) { border-bottom: 0; }
}
.kpi-label { font-size: 9px; display: flex; align-items: center; gap: 7px; }
.kpi-value { margin-top: 8px; font-size: 26px; line-height: 1; color: var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value.live-text { color: var(--live); text-shadow: 0 0 14px color-mix(in srgb, var(--live) 35%, transparent); }
.kpi-value.warn-text { color: var(--warn); }
.kpi-value.alarm-text { animation: none; }
.kpi-sub { margin-top: 7px; font-size: 9px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639px) { .kpi-value { font-size: 20px; } }
.kpi.is-strike .kpi-value { animation: label-strike 520ms steps(1, end) both; }
@keyframes label-strike {
  0%, 12% { background: color-mix(in srgb, var(--live) 22%, transparent); } 13%, 24% { background: transparent; }
  25%, 36% { background: color-mix(in srgb, var(--live) 22%, transparent); } 37%, 100% { background: transparent; }
}

/* Panels are readouts with corner ticks, not cards. */
.panel { position: relative; margin-bottom: 26px; min-width: 0; }
.phead { display: flex; align-items: center; gap: 10px; padding: 0 4px 8px; font-size: 9px; flex-wrap: wrap; }
.phead .title { color: var(--body); opacity: .85; }
.phead .rule { flex: 1; height: 1px; background: var(--line); min-width: 20px; }
.phead .meta { opacity: .6; }
.pbody { position: relative; padding: 10px 6px 4px; }
.pbody::before, .pbody::after { content: ""; position: absolute; width: 8px; height: 8px; border: 0 solid var(--line); }
.pbody::before { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.pbody::after { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.pnote { font-size: 9px; letter-spacing: .06em; padding: 6px 4px 0; opacity: .7; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
@media (min-width: 960px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.seg { display: inline-flex; gap: 2px; }
.seg button { background: none; border: 1px solid transparent; color: var(--dim); cursor: pointer; padding: 3px 7px; font-size: 9px; letter-spacing: .14em; }
.seg button:hover, .seg button:focus-visible { color: var(--body); border-color: var(--line); outline: none; }
.seg button.is-on { color: var(--void); background: var(--live); border-color: var(--live); }

/* capital meter */
.meter { display: flex; gap: 2px; height: 18px; }
.meter > i { flex: 1; background: var(--line); opacity: .7; }
.meter > i.on.live { background: var(--live); opacity: 1; box-shadow: 0 0 6px color-mix(in srgb, var(--live) 45%, transparent); }
.meter > i.on.warn { background: var(--warn); opacity: 1; box-shadow: 0 0 6px color-mix(in srgb, var(--warn) 45%, transparent); }
.meter.meter-in > i { animation: cell-in 300ms steps(1, end) both; animation-delay: calc(var(--i) * 8ms); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 10px; font-size: 9px; }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.lg b { font-weight: 400; color: var(--body); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; }
.sw-live { background: var(--live); } .sw-warn { background: var(--warn); } .sw-breach { background: var(--breach); }
.sw-free { background: transparent; border: 1px solid var(--dim); } .sw-dim { background: var(--dim); }

/* charts */
.chart { position: relative; min-height: 120px; min-width: 0; max-width: 100%; }
.chart-svg { display: block; max-width: 100%; overflow: hidden; touch-action: pan-y; }
.chart-plot { position: relative; min-width: 0; width: 100%; touch-action: pan-y; }
.chart-plot .hit { cursor: grab; }
.chart-plot:active .hit { cursor: grabbing; }
.chart-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.chart-tools button { background: transparent; border: 1px solid var(--line); color: var(--body); padding: 5px 8px; font: 10px var(--mono); cursor: pointer; }
.chart-tools button:hover, .chart-tools button[aria-pressed="true"] { color: var(--live); border-color: var(--live); }
.chart-tools button:focus-visible, .chart-plot:focus-visible, .chart-scroll:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
.chart-window-label { margin-left: auto; font: 9px var(--mono); color: var(--dim); }
.chart-scroll-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 86%, var(--void));
}
.chart-scroll-mark {
  flex: 0 0 auto;
  color: var(--dim);
  font: 8px var(--mono);
  letter-spacing: .12em;
  white-space: nowrap;
}
.chart-scroll-now { color: var(--live); }
.chart-scroll {
  display: block;
  flex: 1;
  min-width: 60px;
  height: 18px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  accent-color: var(--live);
  cursor: ew-resize;
}
.chart-scroll::-webkit-slider-runnable-track {
  height: 3px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--live) 18%, var(--panel)), var(--line));
}
.chart-scroll::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -6px;
  border: 1px solid var(--live);
  border-radius: 0;
  background: var(--void);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--live) 18%, transparent), 0 0 8px color-mix(in srgb, var(--live) 55%, transparent);
  -webkit-appearance: none;
}
.chart-scroll::-moz-range-track {
  height: 3px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--live) 18%, var(--panel)), var(--line));
}
.chart-scroll::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 1px solid var(--live);
  border-radius: 0;
  background: var(--void);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--live) 18%, transparent), 0 0 8px color-mix(in srgb, var(--live) 55%, transparent);
}
.chart-scroll:hover::-webkit-slider-thumb, .chart-scroll:focus-visible::-webkit-slider-thumb { background: var(--live); }
.chart-scroll:hover::-moz-range-thumb, .chart-scroll:focus-visible::-moz-range-thumb { background: var(--live); }
.chart-help { font: 9px var(--mono); color: var(--dim); line-height: 1.6; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-svg .grid.zero { stroke-dasharray: none; stroke: color-mix(in srgb, var(--dim) 60%, var(--line)); }
.chart-svg .axis { stroke: var(--line); stroke-width: 1; }
.chart-svg .tick { fill: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .06em; }
.chart-svg .tick-strong { fill: var(--body); }
.chart-svg .hit { fill: transparent; cursor: crosshair; }
.chart-svg .cross { stroke: var(--body); stroke-width: 1; opacity: .35; stroke-dasharray: 1 2; }
.trace-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-live { stroke: var(--live); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--live) 60%, transparent)); }
.line-warn { stroke: var(--warn); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--warn) 50%, transparent)); }
.line-breach { stroke: var(--breach); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--breach) 60%, transparent)); }
.line-free { stroke: var(--dim); stroke-width: 1; opacity: .7; }
.stop-live { stop-color: var(--live); } .stop-warn { stop-color: var(--warn); } .stop-breach { stop-color: var(--breach); } .stop-free { stop-color: var(--dim); }
.trace-draw .trace-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace-draw 900ms cubic-bezier(.4,0,.2,1) forwards; }
.trace-draw .trace-area { animation: fade-in 900ms steps(6, end) both; }
@keyframes trace-draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.mark { stroke: var(--void); stroke-width: 2; }
.mark-live, .dot-live { fill: var(--live); } .mark-warn, .dot-warn { fill: var(--warn); } .mark-breach, .dot-breach { fill: var(--breach); } .mark-free { fill: var(--dim); }
.pulse { fill: none; stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
.pulse-live { stroke: var(--live); } .pulse-warn { stroke: var(--warn); } .pulse-breach { stroke: var(--breach); }
@keyframes pulse { 0% { transform: scale(.3); opacity: 1; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
.col { fill: color-mix(in srgb, var(--live) 45%, var(--line)); transition: fill 120ms; }
.col.col-live { fill: var(--live); }
.col.is-hover { fill: var(--body); }
.col-rise { transform-box: fill-box; transform-origin: bottom; animation: col-rise 420ms cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 30ms); }
@keyframes col-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-empty { display: flex; align-items: center; justify-content: center; min-height: 140px; font-size: 10px; opacity: .6; border: 1px dashed var(--line); }

.ctip {
  position: absolute; z-index: 20; pointer-events: none; min-width: 150px; max-width: 280px;
  background: color-mix(in srgb, var(--void) 94%, transparent); border: 1px solid var(--line);
  border-left: 1px solid var(--live); padding: 7px 9px; font-size: 10px;
  box-shadow: 0 0 22px rgba(0,0,0,.6);
}
.ctip-head { color: var(--dim); font-size: 9px; letter-spacing: .12em; margin-bottom: 5px; text-transform: uppercase; }
.ctip-wrap { text-transform: none; letter-spacing: .02em; color: var(--body); line-height: 1.45; font-size: 10px; }
.ctip-row { display: flex; align-items: center; gap: 7px; margin: 3px 0; }
.ctip-row span { color: var(--dim); letter-spacing: .1em; font-size: 9px; text-transform: uppercase; flex: 1; }
.ctip-row b { font-weight: 400; color: var(--body); font-variant-numeric: tabular-nums; }
.ctip-meta { margin-top: 5px; font-size: 9px; color: var(--dim); letter-spacing: .06em; }

/* ranked markets */
.rank { display: flex; flex-direction: column; gap: 1px; }
.rank-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 72px; align-items: center; gap: 10px; padding: 5px 4px; border-left: 1px solid var(--line); cursor: default; }
.rank-row:hover { background: color-mix(in srgb, var(--live) 5%, transparent); border-left-color: var(--live); }
.rank-n { font-size: 9px; opacity: .6; }
.rank-label { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--body); }
.rank-cells { display: flex; gap: 2px; height: 8px; }
.rank-cells > i { width: 4px; background: var(--line); }
.rank-cells > i.on { background: var(--live); box-shadow: 0 0 4px color-mix(in srgb, var(--live) 45%, transparent); }
.rank-cells > i.on.warn { background: var(--warn); }
.rank-value { font-size: 10px; color: var(--live); text-align: right; font-variant-numeric: tabular-nums; }
.rank-in { animation: row-in 300ms cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 34ms); }
@media (max-width: 639px) { .rank-row { grid-template-columns: 18px minmax(0,1fr) 60px; } .rank-cells { display: none; } }

/* --- watch-board rows (ported 1:1 from the Sentinel watch board) ---------- */

.wgroup { margin-bottom: 14px; }
.wgroup-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 5px; font-size: 9px; }
.wgroup-rule { flex: 1; height: 1px; background: var(--line); }
.wrow {
  position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px;
  padding: 6px 10px 6px 9px; border-left: 1px solid var(--line); overflow: hidden;
  animation: row-in 300ms cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 34ms);
}
.wrow::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--live) 7%, transparent), transparent);
  transform: translateX(-100%); animation: row-scan 15s linear infinite; animation-delay: calc(var(--i) * -.42s);
}
@keyframes row-scan { 0% { transform: translateX(-100%); } 22%, 100% { transform: translateX(100%); } }
@keyframes row-in { 0% { opacity: 0; transform: translateY(-3px); filter: brightness(2.6); } 100% { opacity: 1; transform: none; filter: none; } }
.wrow-label { color: var(--body); font-size: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.wrow-value { font-size: 10px; color: var(--live); white-space: nowrap; }
.wrow-ok { border-left-color: color-mix(in srgb, var(--live) 35%, transparent); }
.wrow-idle .wrow-value, .wrow-unknown .wrow-value { color: var(--dim); }
.wrow-unknown { border-left-color: var(--dim); }
.wrow-warn { border-left-color: var(--warn); }
.wrow-warn .wrow-value { color: var(--warn); }
.wrow-trip { border-left-color: var(--breach); background: linear-gradient(90deg, color-mix(in srgb, var(--breach) 9%, transparent), transparent 60%); }
.wrow-trip .wrow-value { color: var(--breach); text-shadow: 0 0 9px color-mix(in srgb, var(--breach) 65%, transparent); animation: alarm-breathe 1.6s ease-in-out infinite; }
.wrow-trip::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 1px; background: var(--breach); box-shadow: 0 0 12px var(--breach); animation: alarm-breathe 1.6s ease-in-out infinite; }
.wrow-changed { animation: row-changed 900ms steps(1, end) 1 both; }
@keyframes row-changed {
  0%, 14% { background: color-mix(in srgb, var(--live) 22%, transparent); } 15%, 32% { background: transparent; }
  33%, 47% { background: color-mix(in srgb, var(--live) 22%, transparent); } 48%, 100% { background: transparent; }
}
.wrow-meta { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 4px 0 0 25px; }
.chip { display: inline-flex; align-items: baseline; gap: 5px; font-size: 9px; }
.chip > b { font-weight: 400; opacity: .55; }
.chip > em { font-style: normal; color: var(--body); opacity: .85; }
.more { font-size: 9px; padding: 6px 10px; opacity: .55; }

.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 9px; width: 16px; flex-shrink: 0; }
.sig > i { display: block; width: 3px; background: var(--dim); height: 40%; }
.sig-ok > i { background: var(--live); animation: sig-rise 2.4s ease-in-out infinite; }
.sig-ok > i:nth-child(2) { animation-delay: .18s; } .sig-ok > i:nth-child(3) { animation-delay: .36s; }
@keyframes sig-rise { 0%, 70%, 100% { height: 35%; opacity: .5; } 12%, 28% { height: 100%; opacity: 1; } }
.sig-warn > i { background: var(--warn); animation: sig-alt 1s steps(1, end) infinite; }
.sig-warn > i:nth-child(2) { animation-delay: .5s; }
@keyframes sig-alt { 0%, 49% { height: 100%; opacity: 1; } 50%, 100% { height: 35%; opacity: .4; } }
.sig-trip > i { background: var(--breach); height: 100%; box-shadow: 0 0 6px var(--breach); animation: sig-blink .62s steps(1, end) infinite; }
.sig-trip > i:nth-child(2) { animation-delay: .1s; } .sig-trip > i:nth-child(3) { animation-delay: .2s; }
@keyframes sig-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; } }
.sig-idle > i { height: 35%; opacity: .4; } .sig-idle > i:nth-child(2) { height: 55%; }
.sig-unknown > i { animation: sig-flicker 2.1s steps(1, end) infinite; }
.sig-unknown > i:nth-child(2) { animation-delay: .7s; } .sig-unknown > i:nth-child(3) { animation-delay: 1.4s; }
@keyframes sig-flicker { 0%, 9% { opacity: .9; height: 70%; } 10%, 100% { opacity: .2; height: 35%; } }

.depth { position: relative; display: inline-block; width: 58px; height: 5px; background: var(--line); overflow: hidden; flex-shrink: 0; }
.depth-fill { position: absolute; inset: 0 auto 0 0; background: var(--live); transition: width 620ms cubic-bezier(.2,.8,.2,1); }
.wrow-warn .depth-fill { background: var(--warn); }
.tier { font-size: 8px; letter-spacing: .14em; padding: 1px 4px; border: 1px solid var(--line); color: var(--dim); flex-shrink: 0; }
.tier-immediate { border-color: color-mix(in srgb, var(--breach) 55%, transparent); color: color-mix(in srgb, var(--breach) 82%, var(--body)); }
.wrow-trip .tier-immediate { background: var(--breach); color: var(--void); border-color: var(--breach); }
/* phone: the question gets its own line, the verdict sits under it */
@media (max-width: 639px) { .wrow-meta { display: none; } .depth { width: 40px; } .wrow-label { max-width: calc(100% - 26px); } .wrow > .leader { display: none; } .wrow-value { margin-left: 25px; } }

.bfoot { margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 10px; line-height: 1.6; max-width: 900px; }
.bfoot .keys { margin-top: 8px; font-size: 9px; opacity: .6; }
.fault { padding: 32px 0; text-align: center; font-size: 11px; }

@keyframes cell-in { 0% { opacity: 0; } 100% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .trace-draw .trace-line { stroke-dashoffset: 0; }
}

/* strategy lab: interaction map, explorer, detail, one-knob grid, leaderboard */
.lab-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 2px 4px 16px; }
.lab-bar-label { font-size: 9px; }
.lab-bar-help { font-size: 9px; opacity: .7; flex: 1 1 280px; line-height: 1.5; }
.lab-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px 28px; padding: 0 4px; margin-bottom: 24px; }
@media (min-width: 1100px) { .lab-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.lab-block { min-width: 0; }
.lab-block > .wgroup-head { padding: 0 0 10px; }
.lab-block .seg button:disabled { opacity: .3; cursor: default; }
.lab-live { display: inline-block; width: 5px; height: 5px; margin-left: 4px; background: var(--warn); vertical-align: middle; }
.lab-sw-band { background: color-mix(in srgb, var(--body) 14%, transparent); border: 1px solid color-mix(in srgb, var(--body) 25%, transparent); }

/* interaction map: lower triangle of every knob pair */
.lab-map { display: grid; grid-template-columns: 40px repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, auto) auto; gap: 10px; }
.lm-map { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; aspect-ratio: 1; background: var(--line); border: 1px solid var(--line); }
.lm-map.is-active { border-color: var(--live); box-shadow: 0 0 10px color-mix(in srgb, var(--live) 30%, transparent); }
.lm-cell { padding: 0; border: 0; cursor: pointer; min-width: 0; background: color-mix(in srgb, var(--tone) calc(var(--heat) * 85%), var(--panel)); }
.lm-cell:hover, .lm-cell:focus-visible { outline: 1px solid var(--body); outline-offset: -1px; z-index: 1; }
.lm-cell.is-here { box-shadow: inset 0 0 0 2px var(--void), inset 0 0 0 3px var(--body); }
.lm-ylabel { display: flex; align-items: center; justify-content: flex-end; font-size: 8px; }
.lm-xlabel { text-align: center; font-size: 8px; }
.lm-readout { display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 2px 0 0 8px; font-size: 9px; line-height: 1.5; min-width: 0; }
.lm-readout b { font-weight: 400; font-size: 22px; font-variant-numeric: tabular-nums; }
.lm-hint { opacity: .6; font-size: 8px; }

/* explorer */
.lab-axis-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.lab-axis { display: inline-flex; align-items: center; gap: 8px; font-size: 9px; }
.lab-axis > .tele { color: var(--body); opacity: .8; }
.lab-pins { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 8px 0 12px; border-top: 1px dashed var(--line); }
.lab-pins-label { grid-column: 1 / -1; font-size: 8px; opacity: .6; }
.lab-pin { display: contents; }
.lab-pin > .tele { font-size: 9px; white-space: nowrap; }
.lab-pin .seg { flex-wrap: wrap; }
.lh-title { display: flex; justify-content: space-between; font-size: 8px; padding: 0 0 6px; opacity: .7; }
.lh-grid { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); gap: 2px; }
.lh-col { text-align: center; font-size: 9px; padding-bottom: 4px; white-space: nowrap; }
.lh-row { display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-size: 9px; white-space: nowrap; }
.hcell {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px;
  min-width: 0; aspect-ratio: 1.5; padding: 4px; cursor: pointer; color: var(--body); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--tone) calc(var(--heat) * 55%), var(--panel));
}
.hcell:hover, .hcell:focus-visible { border-color: color-mix(in srgb, var(--body) 55%, var(--line)); outline: none; }
.hcell.is-base { border-style: dashed; }
.hcell.is-sel { border-color: var(--live); box-shadow: inset 0 0 0 1px var(--live), 0 0 14px color-mix(in srgb, var(--live) 30%, transparent); }
.hc-v { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-tag { font-size: 7px; opacity: .75; }
@media (max-width: 639px) { .hc-v { font-size: 10px; } .hc-tag { display: none; } .hcell { aspect-ratio: 1.1; } }

/* leaderboard */
.lb-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) repeat(3, 62px); gap: 8px; align-items: center; width: 100%;
  padding: 6px 4px; border: 0; border-bottom: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); background: none;
  color: var(--body); font-size: 11px; text-align: left; cursor: pointer; }
.lb-row:hover { background: color-mix(in srgb, var(--body) 5%, transparent); }
.lb-row.is-sel { box-shadow: inset 2px 0 0 var(--live); background: color-mix(in srgb, var(--live) 8%, transparent); }
.lb-head { cursor: default; font-size: 8px; border-bottom: 1px solid var(--line); }
.lb-head:hover { background: none; }
.lb-n { font-size: 9px; }
.lb-params { display: flex; flex-wrap: wrap; gap: 3px 10px; min-width: 0; font-variant-numeric: tabular-nums; }
.lb-p b { font-weight: 400; font-size: 8px; margin-right: 3px; }
.lb-v { text-align: right; font-variant-numeric: tabular-nums; opacity: .7; white-space: nowrap; }
.lb-v.is-key { opacity: 1; }
.lb-gap { font-size: 8px; padding: 8px 4px 2px; opacity: .6; }
.lb-foot { font-size: 9px; padding-top: 10px; opacity: .7; }
@media (max-width: 639px) { .lb-row { grid-template-columns: 30px minmax(0, 1fr) 56px; } .lb-v:not(.is-key) { display: none; } }
.lab-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lab-stats > div:nth-child(-n+8) { border-bottom: 1px solid var(--line); }

.vmatrix { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vm-row { display: grid; grid-template-columns: 124px repeat(var(--cols, 5), minmax(0, 1fr)); gap: 2px; align-items: stretch; }
.vm-head span { font-size: 8px; text-align: center; padding: 0 0 4px; opacity: .7; }
.vm-label { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 8px 0 2px; min-width: 0; }
.vm-label b { font-weight: 400; font-size: 9px; color: var(--body); opacity: .85; }
.vm-label span { font-size: 9px; color: var(--dim); line-height: 1.35; }
@media (max-width: 639px) {
  .vm-row { grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); }
  .vm-head span:first-child { display: none; }
  .vm-label { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; padding: 8px 2px 3px; }
}

.vcell {
  --tone: var(--live);
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 5px;
  min-width: 0; padding: 8px 8px 7px; cursor: pointer; text-align: left;
  color: var(--body); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--tone) calc(var(--heat) * 22%), var(--panel));
  transition: border-color 120ms steps(2, end);
}
.vcell:hover, .vcell:focus-visible { border-color: color-mix(in srgb, var(--body) 45%, var(--line)); outline: none; }
.vcell.is-base { border-style: dashed; }
.vcell.is-sel { border: 1px solid var(--live); box-shadow: inset 0 0 0 1px var(--live), 0 0 14px color-mix(in srgb, var(--live) 30%, transparent); }
.vcell.is-sel::after { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: var(--live); }
.vc-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 9px; white-space: nowrap; overflow: hidden; }
.vc-live { font-style: normal; font-size: 7px; letter-spacing: .12em; color: var(--void); background: var(--warn); padding: 1px 3px; }
.vc-net { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-delta { display: block; margin-top: 3px; font-style: normal; font-size: 9px; letter-spacing: .04em; color: color-mix(in srgb, var(--tone) 80%, var(--body)); }
.is-base .vc-delta { color: var(--dim); letter-spacing: .12em; }
.vspark { display: block; width: 100%; height: 16px; overflow: visible; }
.vspark line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vspark path { fill: none; stroke: color-mix(in srgb, var(--tone) 75%, var(--dim)); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
@media (max-width: 639px) { .vcell { padding: 6px 4px; } .vc-net { font-size: 11px; } .vc-live, .vc-delta { display: none; } .vspark { height: 10px; } }

.vdetail { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.vd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.vd-id { min-width: 0; flex: 1; }
.vd-kicker { font-size: 9px; line-height: 1.5; }
.vd-title { margin: 6px 0 9px; font-size: 20px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--body); }
.vd-params { display: flex; flex-wrap: wrap; gap: 4px; }
.vchip { display: inline-flex; gap: 6px; align-items: baseline; font-size: 10px; padding: 3px 6px; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.vchip b { font-weight: 400; font-size: 8px; }
.vchip.is-on { border-color: var(--live); color: var(--live); }
.vchip.is-on b { color: var(--live); }
.vd-net { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.vd-net.alarm-text { animation: none; }
.vd-net span { font-size: 9px; }
.vd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vd-stats > div { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-right: 1px solid var(--line); min-width: 0; }
.vd-stats > div:nth-child(4n) { border-right: 0; }
.vd-stats > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
.vd-stats span { font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-stats b { font-weight: 400; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vd-neg { color: color-mix(in srgb, var(--breach) 80%, var(--body)); }
@media (max-width: 639px) {
  .vd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vd-stats > div:nth-child(4n) { border-right: 1px solid var(--line); }
  .vd-stats > div:nth-child(2n) { border-right: 0; }
  .vd-stats > div { border-bottom: 1px solid var(--line); }
  .vd-net { font-size: 24px; align-items: flex-start; }
}
.vd-bar { display: flex; gap: 2px; height: 8px; }
.vd-bar i { display: block; min-width: 3px; }
.vb-live { background: var(--live); } .vb-breach { background: var(--breach); } .vb-warn { background: var(--warn); }
.vb-free { background: transparent; border: 1px solid var(--dim); } .vb-empty { flex: 1; background: var(--line); }
.vd-exits .legend { flex-wrap: wrap; gap: 6px 14px; }
.vd-exits .lg b { font-weight: 400; font-size: 10px; font-variant-numeric: tabular-nums; }
.vd-exits .lg .tele { font-size: 8px; }
.vd-trades .wgroup-head { margin-bottom: 4px; }
.vtrade { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 64px; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); font-size: 11px; }
.vt-reason { font-size: 8px; }
.vt-recovered, .vt-captured { color: var(--live); } .vt-stop { color: var(--breach); } .vt-timeout, .vt-event { color: var(--warn); } .vt-gap { color: var(--dim); }
.vt-q { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-meta { font-size: 8px; white-space: nowrap; }
.vt-pnl { text-align: right; font-variant-numeric: tabular-nums; }
.vt-empty { font-size: 9px; padding: 10px 0; opacity: .6; }
@media (max-width: 639px) { .vtrade { grid-template-columns: 38px minmax(0, 1fr) 58px; } .vt-meta { display: none; } }

.vsw-base { background: transparent; border-top: 1px dashed var(--body); height: 0; width: 12px; }
.field-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.field-other { stroke: var(--dim); stroke-width: 1; opacity: .38; }
.field-base { stroke: var(--body); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .75; }
.field-selected { stroke: var(--live); stroke-width: 2.2; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--live) 60%, transparent)); }
.field-median { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 1 3; opacity: .9; }
.field-band { fill: var(--body); opacity: .07; }
.field-other.field-hot { stroke: var(--body); opacity: .95; stroke-width: 1.6; }
.field-hit { cursor: pointer; }
.trace-draw .field-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace-draw 900ms cubic-bezier(.4,0,.2,1) forwards; }
.trace-draw .field-base { animation: none; stroke-dasharray: 4 3; stroke-dashoffset: 0; }
.trace-draw .field-median { animation: none; stroke-dasharray: 1 3; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .trace-draw .field-line { stroke-dashoffset: 0; } }

/* top-5 tracker */
.lab-track { padding: 0 4px; margin-bottom: 26px; }
.lab-track > .wgroup-head { padding: 0 0 10px; }
.tk-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
@media (max-width: 1099px) { .tk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .tk-cards { grid-template-columns: minmax(0, 1fr); } }
.tk-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 12px 10px; text-align: left;
  color: var(--body); background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--lc); cursor: pointer; }
.tk-card:hover, .tk-card:focus-visible { border-color: color-mix(in srgb, var(--lc) 60%, var(--line)); border-top-color: var(--lc); outline: none; }
.tk-card.is-sel { box-shadow: inset 0 0 0 1px var(--lc), 0 0 16px color-mix(in srgb, var(--lc) 25%, transparent); }
.tk-head { display: flex; align-items: baseline; gap: 8px; }
.tk-rank { font-weight: 400; font-size: 13px; color: var(--lc); letter-spacing: .08em; }
.tk-move { font-size: 9px; color: var(--dim); letter-spacing: .08em; }
.tk-move.up { color: var(--live); } .tk-move.down { color: var(--breach); }
.tk-id { margin-left: auto; font-size: 8px; }
.tk-value { font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.tk-params { display: flex; flex-wrap: wrap; gap: 3px 9px; font-size: 10px; font-variant-numeric: tabular-nums; }
.tk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 11px; font-variant-numeric: tabular-nums; }
.tk-stats > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-stats b { font-weight: 400; font-size: 7px; }
.tk-stats em { font-style: normal; }
.tk-trail { display: flex; align-items: flex-end; gap: 1px; height: 20px; }
.tk-trail i { flex: 1; min-width: 1px; background: var(--line); }
.tk-twins { position: absolute; right: 10px; bottom: 34px; font-size: 7px; opacity: .6; }
.tk-charts { padding: 0; margin-bottom: 0; }
#tk-follow-stat b { font-weight: 400; }
.bump-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.bump-past { stroke: var(--dim); stroke-width: 1; opacity: .35; }
.bump-current { stroke-width: 2.2; }
.bump-past.bump-hot { opacity: .95; stroke: var(--body); }
.bump-current.bump-hot { stroke-width: 3.2; }
.trace-draw .bump-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace-draw 900ms cubic-bezier(.4,0,.2,1) forwards; }
@media (prefers-reduced-motion: reduce) { .trace-draw .bump-line { stroke-dashoffset: 0; } }

/* autopilot: the combination the live book follows, and its backdated record */
.ap-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 28px; margin-bottom: 12px; }
@media (min-width: 1100px) { .ap-top { grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); } }
.ap-card { min-width: 0; }
.ap-now { width: 100%; height: 100%; }
.ap-unit { font-size: 8px; margin-left: 6px; opacity: .6; vertical-align: middle; }
.ap-note { font-size: 8px; opacity: .65; line-height: 1.5; }
.ap-strip { display: flex; gap: 1px; height: 22px; margin: 0 0 4px; background: var(--line); border: 1px solid var(--line); }
.ap-seg { position: relative; min-width: 2px; padding: 0 3px; border: 0; overflow: hidden; cursor: pointer; text-align: left;
  color: var(--void); background: color-mix(in srgb, var(--seg) 70%, var(--panel)); }
.ap-seg > span { font-size: 8px; white-space: nowrap; color: var(--void); }
.ap-seg:hover, .ap-seg:focus-visible, .ap-seg.is-sel { outline: 1px solid var(--body); outline-offset: -1px; z-index: 1; }
.ap-seg.is-now { box-shadow: inset 0 -2px 0 var(--live); }
.field-mark { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 2 3; opacity: .45; }
.field-mark-label { font-size: 8px; opacity: .6; }
.field-mark.field-mark-live { stroke: var(--live); opacity: .9; stroke-dasharray: none; }
.field-mark-label.field-mark-live { fill: var(--live); opacity: 1; }
