/* Motion Trade Station — The Stage. Black grounds, hairlines, sharp corners.
   Orbitron for the brand and the price; Instrument Sans for labels; JetBrains Mono for numbers. */
:root {
  --bg: #000000; --panel: #0a0a0d; --panel-2: #101014;
  --text: #f5f5f7; --muted: #8e8e93; --dim: #4e4e55;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.16);
  --gold: #f7d358; --gold-soft: rgba(247,211,88,.12); --green: #92bc4e; --green-soft: rgba(146,188,78,.12);
  --pink: #f4bbd3; --rose: #f07178; --rose-soft: rgba(240,113,120,.12);
  --display: "Orbitron", system-ui, sans-serif; --body: "IBM Plex Sans", system-ui, sans-serif; --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --hdr: 50px; --tiles: 72px; --insp: 400px; --elev: 34px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 13px; line-height: 1.4; -webkit-font-smoothing: antialiased; overflow: hidden; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.label { font-family: var(--cond); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
button, input { font-family: inherit; }
.gold { color: var(--gold); } .green { color: var(--green); } .rose { color: var(--rose); } .pink { color: var(--pink); } .muted { color: var(--muted); } .dim { color: var(--dim); }
.hide-wide { display: none; }

/* header */
header { height: var(--hdr); display: flex; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #000; min-width: 0; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand .mark { width: 24px; height: 24px; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 9px; }
.brand h1 { margin: 0; font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.brand h1 span { color: var(--muted); font-weight: 600; }
.tabs { display: flex; align-items: stretch; height: var(--hdr); }
.tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; padding: 0 10px; cursor: pointer; font-family: var(--cond); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.tabs button.active { color: var(--text); border-bottom-color: var(--gold); }
.tabs button:hover:not(.active) { color: var(--text); }
.tabs.tfs { border-left: 1px solid var(--line); padding-left: 4px; }
.tabs .x { color: var(--dim); font-size: 12px; line-height: 1; padding: 0 2px; } .tabs .x:hover { color: var(--rose); }
/* market cards: name, price, 24h, armed setups, sparkline */
#symtabs button.mk { padding: 0 10px; gap: 8px; letter-spacing: 0; text-transform: none; }
#symtabs .mk .nm { font-family: var(--cond); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
#symtabs .mk .mp { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--text); }
#symtabs .mk .mc { font-family: var(--mono); font-size: 11px; font-weight: 500; }
#symtabs .mk canvas { width: 44px; height: 22px; }
#symtabs .mk .arm { display: inline-flex; gap: 2px; }
#symtabs .mk .arm i { width: 4px; height: 8px; background: var(--green); display: inline-block; }
#symtabs .mk .pos { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display: inline-block; }
.tabs .add { color: var(--gold); }
.flash-up { color: var(--green) !important; } .flash-dn { color: var(--rose) !important; }
.hdr-status { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.clock { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); display: inline-block; flex: 0 0 auto; }
.dot.ok { background: var(--green); box-shadow: 0 0 6px rgba(146,188,78,.7); } .dot.warn { background: var(--gold); } .dot.bad { background: var(--rose); }
.ibtn { appearance: none; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 5px 9px; font-family: var(--cond); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.ibtn:hover { color: var(--text); border-color: var(--line-2); }
.ibtn.on { color: var(--gold); border-color: rgba(247,211,88,.5); }
.btn { appearance: none; cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--text); padding: 8px 12px; font-family: var(--cond); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.btn:hover { background: rgba(255,255,255,.06); }
.btn.kill { border-color: rgba(240,113,120,.6); color: var(--rose); } .btn.kill:hover { background: var(--rose); color: #000; }
.btn.arm { border-color: rgba(146,188,78,.6); color: var(--green); } .btn.arm:hover { background: var(--green); color: #000; }
.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* tiles — never scroll; they shrink, then drop their sparkline, then drop the least important ones */
.tiles { height: var(--tiles); display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #000; overflow: hidden; }
.tile { padding: 9px 12px 8px; border-right: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 56px; grid-template-rows: auto auto auto; column-gap: 8px; min-width: 0; overflow: hidden; }
.tile:last-child { border-right: 0; }
.tile .k { font-family: var(--cond); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .n { font-family: var(--mono); font-size: 18px; font-weight: 500; grid-column: 1; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.tile .sub { font-family: var(--mono); font-size: 11px; color: var(--muted); grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile canvas { grid-column: 2; grid-row: 1 / 4; width: 56px; height: 46px; align-self: center; }

/* main */
main { height: calc(100vh - var(--hdr) - var(--tiles)); display: grid; grid-template-columns: var(--elev) 40px minmax(0, 1fr) var(--insp); }
.tbar { border-right: 1px solid var(--line); background: #000; display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 2px; }
.tbar button { appearance: none; width: 30px; height: 30px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
.tbar button svg { width: 18px; height: 18px; stroke: currentColor; fill: currentColor; stroke-linecap: round; stroke-linejoin: round; } .tbar button svg path, .tbar button svg rect { fill: none; } .tbar button svg circle { stroke: none; }
.tbar button:hover { color: var(--text); border-color: var(--line); }
.tbar button.on { color: var(--gold); border-color: rgba(247,211,88,.5); background: rgba(247,211,88,.08); }
.tbar .gap { flex: 0 0 10px; }
.ibtn .badge { display: none; margin-left: 5px; background: var(--gold); color: #000; font-family: var(--mono); font-size: 9.5px; padding: 0 4px; border-radius: 0; }
.ibtn .badge.on { display: inline-block; }
.npanel { position: fixed; right: 14px; top: calc(var(--hdr) + 6px); width: 360px; max-height: calc(100vh - var(--hdr) - 20px); overflow: auto; background: rgba(0,0,0,.97); border: 1px solid var(--line-2); padding: 12px 14px; z-index: 30; display: none; font-size: 12.5px; }
.npanel.on { display: block; }
.nrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.nrow label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.nrow input[type=number] { background: #000; color: var(--text); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; padding: 2px 4px; }
.nrow input[type=checkbox] { accent-color: var(--gold); }
.nitem { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.nitem .t { color: var(--dim); font-family: var(--mono); font-size: 10.5px; flex: 0 0 54px; padding-top: 1px; }
.nitem .k { font-family: var(--cond); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; flex: 0 0 64px; padding-top: 1px; }
.nitem.entry .k, .nitem.signal .k, .nitem.armed .k { color: var(--gold); } .nitem.tp .k, .nitem.buy .k { color: var(--green); } .nitem.sl .k, .nitem.sell .k, .nitem.kill .k, .nitem.guard .k { color: var(--rose); } .nitem.liq .k, .nitem.cluster .k, .nitem.ladder .k { color: var(--pink); }
.toasts .buy { border-left-color: var(--green); } .toasts .sell { border-left-color: var(--rose); } .toasts .liq, .toasts .cluster { border-left-color: var(--pink); } .toasts .armed { border-left-color: var(--gold); } .toasts .tp { border-left-color: var(--green); } .toasts .sl { border-left-color: var(--rose); }
.toasts .buy b { color: var(--green); } .toasts .sell b { color: var(--rose); } .toasts .liq b, .toasts .cluster b { color: var(--pink); } .toasts .armed b { color: var(--gold); } .toasts .tp b { color: var(--green); } .toasts .sl b { color: var(--rose); }
.elev { border-right: 1px solid var(--line); display: flex; flex-direction: column-reverse; gap: 2px; padding: 8px 7px; background: #000; }
.elev i { display: block; flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--line); position: relative; }
.elev i.done { background: var(--gold); border-color: transparent; }
.elev i.cur { border-color: var(--gold); animation: glow 1.8s infinite; background: linear-gradient(to top, var(--gold) var(--fill, 0%), rgba(255,255,255,.05) var(--fill, 0%)); }
.elev i[data-t]::after { content: attr(data-t); position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 8px; font-family: var(--mono); font-size: 9px; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 3; background: rgba(0,0,0,.85); padding: 1px 4px; }
.elev i:hover::after { opacity: 1; }
@keyframes glow { 0%,100% { box-shadow: 0 0 0 1px var(--gold) inset; } 50% { box-shadow: 0 0 0 1px var(--gold) inset, 0 0 12px rgba(247,211,88,.55); } }
.stage { position: relative; background: #000; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 0px; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.stage.depth-on { grid-template-columns: minmax(0, 1fr) 190px; }
.chartwrap { position: relative; min-width: 0; min-height: 0; grid-column: 1; }
#chart { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.depthcol { grid-column: 2; position: relative; min-width: 0; min-height: 0; overflow: hidden; border-left: 1px solid var(--line); display: none; background: #000; }
.stage.depth-on .depthcol { display: block; }
.depth-h { position: absolute; left: 0; right: 0; top: 0; height: 32px; display: flex; justify-content: space-between; align-items: center; padding: 0 10px; border-bottom: 1px solid var(--line); }
.depth-h .mono { font-size: 11px; }
#depth { position: absolute; left: 0; right: 0; top: 32px; bottom: 0; width: 100%; height: calc(100% - 32px); display: block; }
.hud { position: absolute; left: 14px; top: 10px; text-align: left; pointer-events: none; z-index: 2; background: rgba(0,0,0,.66); border: 1px solid var(--line); padding: 8px 12px 9px; backdrop-filter: blur(4px); }
.hud-px { font-family: var(--mono); font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1; transition: color .35s; }
.hud-px.flash-up, .hud-px.flash-dn { transition: color 0s; }
.hud-sub { font-family: var(--cond); font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 5px; font-weight: 700; }
.hud-sub.mono { font-family: var(--mono); letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 11.5px; }
.toasts { position: absolute; left: 14px; bottom: 44px; display: grid; gap: 5px; z-index: 2; max-width: 440px; pointer-events: none; }
.toasts div { background: rgba(0,0,0,.9); border: 1px solid var(--line-2); border-left-width: 3px; padding: 7px 10px; font-family: var(--body); font-size: 12px; color: var(--text); animation: tin .25s ease-out; }
.toasts div.gone { opacity: 0; transition: opacity .6s; }
.toasts b { font-family: var(--cond); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; margin-right: 8px; }
.toasts .entry, .toasts .signal { border-left-color: var(--gold); } .toasts .exit { border-left-color: var(--green); } .toasts .guard, .toasts .kill { border-left-color: var(--rose); } .toasts .station, .toasts .ladder { border-left-color: var(--pink); } .toasts .veto, .toasts .cancel { border-left-color: var(--dim); }
.toasts .entry b, .toasts .signal b { color: var(--gold); } .toasts .exit b { color: var(--green); } .toasts .guard b, .toasts .kill b { color: var(--rose); } .toasts .station b, .toasts .ladder b { color: var(--pink); } .toasts .veto b, .toasts .cancel b { color: var(--muted); }
@keyframes tin { from { transform: translateY(6px); opacity: 0; } }
.tcard { position: absolute; z-index: 6; width: 300px; background: rgba(0,0,0,.94); border: 1px solid var(--line-2); border-top: 2px solid var(--green); padding: 10px 12px 12px; display: none; }
.tcard.on { display: block; } .tcard.loss { border-top-color: var(--rose); } .tcard.timeout { border-top-color: var(--muted); }
.tcard .hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 8px; }
.tcard .hd .ttl { font-family: var(--cond); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.tcard .hd .pl { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.tcard .x { position: absolute; right: 8px; top: 6px; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; } .tcard .x:hover { color: var(--text); }
.tcard .kv { font-size: 12px; gap: 4px 10px; } .tcard .kv .v { font-size: 11.5px; }
.tcard .why { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.45; border-top: 1px solid var(--line); padding-top: 8px; }
.modal { position: absolute; z-index: 7; width: 300px; background: rgba(0,0,0,.95); border: 1px solid var(--line-2); border-top: 2px solid var(--gold); padding: 10px 12px 12px; display: none; }
.modal.on { display: block; } .modal.pink { border-top-color: var(--pink); } .modal.green { border-top-color: var(--green); } .modal.rose { border-top-color: var(--rose); } .modal.grey { border-top-color: var(--muted); }
.modal .ttl { font-family: var(--cond); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; padding-right: 18px; }
.modal .x { position: absolute; right: 8px; top: 6px; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; } .modal .x:hover { color: var(--text); }
.modal .kv { font-size: 12px; gap: 4px 10px; } .modal .kv .v { font-size: 11.5px; }
.modal .note { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.45; border-top: 1px solid var(--line); padding-top: 8px; }
.cmenu { position: absolute; z-index: 9; min-width: 220px; background: rgba(0,0,0,.96); border: 1px solid var(--line-2); padding: 4px 0; display: none; font-size: 12px; }
.cmenu.on { display: block; }
.cmenu div { padding: 6px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.cmenu div:hover { background: rgba(255,255,255,.06); }
.cmenu div .k { color: var(--dim); font-family: var(--mono); font-size: 10.5px; }
.cmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.cmenu .h { padding: 4px 12px 2px; font-family: var(--cond); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); cursor: default; font-weight: 700; }
.cmenu .h:hover { background: transparent; }
#chart.tool { cursor: crosshair; } #chart.hand { cursor: grab; } #chart.ns { cursor: ns-resize; } #chart.ew { cursor: ew-resize; }
.tip { position: absolute; pointer-events: none; display: none; background: rgba(0,0,0,.92); border: 1px solid var(--line-2); padding: 8px 10px; font-size: 12px; z-index: 4; min-width: 180px; }
.tip .t { font-family: var(--cond); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.legend { position: absolute; right: 100px; top: 10px; display: flex; gap: 2px; z-index: 2; }
.legend button { appearance: none; background: rgba(0,0,0,.6); border: 1px solid var(--line); color: var(--dim); cursor: pointer; padding: 4px 8px; font-family: var(--cond); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.legend button.on { color: var(--text); border-color: var(--line-2); }
.legend button.on .sw { opacity: 1; } .legend button .sw { opacity: .35; margin-right: 0; }
.sw { display: inline-block; width: 18px; height: 6px; margin-right: 6px; vertical-align: middle; }
.sw.long { background: var(--gold); } .sw.short { background: var(--pink); }
.sw.ring { width: 8px; height: 8px; border: 1.5px solid var(--pink); border-radius: 50%; background: transparent; }
.sw.tri { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--gold); }
.sw.sq { width: 8px; height: 8px; background: var(--text); }
.sw.dia { width: 7px; height: 7px; background: var(--pink); transform: rotate(45deg); }
.lb { display: grid; grid-template-columns: 1fr auto auto auto; gap: 4px 10px; font-size: 11.5px; }
.lb { font-size: 12.5px; }
.lb .h { font-family: var(--cond); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-bottom: 5px; border-bottom: 1px solid var(--line-2); }
.lb .r { padding: 5px 0; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .n { font-family: var(--mono); font-size: 11.5px; text-align: right; }
.replay { position: absolute; left: 14px; right: 100px; bottom: 6px; height: 26px; display: flex; align-items: center; gap: 10px; z-index: 2; }
.replay input { flex: 1; appearance: none; height: 2px; background: rgba(255,255,255,.14); outline: none; margin: 0; }
.replay input::-webkit-slider-thumb { appearance: none; width: 10px; height: 14px; background: var(--text); cursor: ew-resize; }
.replay input::-moz-range-thumb { width: 10px; height: 14px; background: var(--text); border: 0; border-radius: 0; cursor: ew-resize; }
.replay .label { min-width: 130px; }
.replay.live .ibtn { display: none; }
.replay:not(.live) .label { color: var(--gold); }

/* inspector */
.insp { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; width: var(--insp); max-width: 100%; overflow: hidden; background: #000; }
.ipane { overflow-x: hidden; overflow-wrap: anywhere; }
.ipane table { width: 100%; max-width: 100%; }
.acct { border-bottom: 1px solid var(--line); padding: 12px 14px 10px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 12px; }
.acct .big { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; }
.acct .big .v { font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--gold); letter-spacing: .02em; }
.acct .big .r { font-family: var(--mono); font-size: 12.5px; }
.acct .c .k { font-family: var(--cond); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.acct .c .v { font-family: var(--mono); font-size: 14px; margin-top: 2px; }
.itabs { display: flex; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.itabs button { flex: 1; background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; padding: 11px 0 9px; cursor: pointer; font-family: var(--cond); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.itabs button.active { color: var(--text); border-bottom-color: var(--gold); }
.ipane { display: none; overflow: auto; padding: 12px 14px; flex: 1; }
.ipane.active { display: block; }
.sec { font-family: var(--cond); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 14px 0 6px; display: flex; justify-content: space-between; gap: 10px; }
.sec:first-child { margin-top: 0; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; }
.kv .k { color: var(--muted); } .kv .v { font-family: var(--mono); text-align: right; font-size: 12.5px; }
.side { font-family: var(--cond); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; padding: 2px 6px; }
.side.long { background: var(--green-soft); color: var(--green); } .side.short { background: var(--rose-soft); color: var(--rose); }
.rr { height: 6px; background: linear-gradient(90deg, var(--rose) 0 var(--slpct), var(--green) var(--slpct) 100%); position: relative; margin: 12px 0 4px; }
.rr::after { content: ""; position: absolute; left: var(--nowpct); top: -4px; width: 2px; height: 14px; background: var(--text); }
.flat { text-align: center; padding: 22px 0 14px; color: var(--muted); }
.flat .scan { font-family: var(--cond); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.flat .scan::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--green); animation: blink 1.2s infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: .2; } }
#eqc { width: 100%; height: 70px; display: block; background: var(--panel); border: 1px solid var(--line); }
.radar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.radar i { aspect-ratio: 1; display: block; background: rgba(255,255,255,.05); border: 1px solid var(--line); cursor: pointer; transition: background .5s, box-shadow .5s; position: relative; }
.radar i.m1 { background: rgba(247,211,88,.22); } .radar i.m2 { background: rgba(247,211,88,.5); }
.radar i.armed { background: var(--green); box-shadow: 0 0 10px rgba(146,188,78,.6); } .radar i.cooling { background: var(--gold); }
.radar i.benched { opacity: .3; } .radar i.sel { outline: 1px solid var(--text); outline-offset: 1px; }
.radar i::after { content: attr(data-side); position: absolute; left: 3px; top: 1px; font-family: var(--cond); font-size: 8px; letter-spacing: .05em; color: rgba(0,0,0,.7); font-weight: 700; }
.radar i.m0::after, .radar i.m1::after { color: var(--muted); }
.rdet { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 12px; }
.rdet .nm { font-size: 13px; font-weight: 500; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.cond { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 4px 0; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cond .v, .cond span:nth-child(2) { font-family: var(--mono); font-size: 11.5px; } .cond .v { color: var(--text); } .cond.ok .v { color: var(--green); }
.rdet .meta { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.fires { margin-top: 8px; display: grid; grid-template-columns: auto 1fr auto auto; gap: 3px 10px; font-family: var(--mono); font-size: 11.5px; }
.fires span { padding: 3px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.fires .d { color: var(--dim); } .fires .o.win { color: var(--green); } .fires .o.loss { color: var(--rose); } .fires .o.timeout { color: var(--muted); } .fires .o.open { color: var(--gold); }
table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
th { text-align: left; font-family: var(--cond); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line-2); font-weight: 700; white-space: nowrap; }
td { padding: 6px 4px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.num { font-family: var(--mono); font-size: 11.5px; }
td.num, th.num { text-align: right; }
tr.benched td { opacity: .4; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: rgba(255,255,255,.03); }
.guard { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.guard .name { flex: 1; } .guard .note { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.ev { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; line-height: 1.45; }
.ev .t { color: var(--dim); font-family: var(--mono); font-size: 11px; flex: 0 0 54px; padding-top: 1px; }
.ev .k { font-family: var(--cond); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; flex: 0 0 58px; padding-top: 1px; font-weight: 700; }
.ev.entry .k, .ev.signal .k { color: var(--gold); } .ev.exit .k { color: var(--green); } .ev.veto .k, .ev.cancel .k, .ev.whales .k { color: var(--muted); } .ev.kill .k, .ev.guard .k { color: var(--rose); } .ev.station .k, .ev.ladder .k { color: var(--pink); }
.tp { display: grid; grid-template-columns: 54px 1fr auto auto; gap: 8px; padding: 4px 0; font-family: var(--mono); font-size: 11.5px; border-bottom: 1px solid var(--line); }
.tp .t { color: var(--dim); } .tp.buy .s { color: var(--green); } .tp.sell .s { color: var(--rose); }
.tp.liq { background: rgba(244,187,211,.06); }
.empty { color: var(--dim); padding: 16px 0; text-align: center; font-size: 12px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #000; border: 1px solid var(--line-2); padding: 9px 14px; font-size: 12.5px; display: none; z-index: 30; }
.netbar { position: fixed; top: var(--hdr); left: 0; right: 0; background: var(--rose); color: #000; text-align: center; font-family: var(--cond); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; padding: 4px 0; z-index: 25; display: none; }
.netbar.on { display: block; }
.boot { position: fixed; inset: 0; background: #000; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: opacity .4s; }
.boot.gone { opacity: 0; pointer-events: none; }
.boot .mark { width: 40px; height: 40px; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 13px; margin-bottom: 6px; animation: glow 1.6s infinite; }
.boot .label { color: var(--text); font-size: 12px; letter-spacing: .24em; }
.help { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 35; display: none; align-items: center; justify-content: center; }
.help.on { display: flex; }
.help-box { width: min(560px, 92vw); background: var(--panel); border: 1px solid var(--line-2); padding: 18px 20px 20px; }
.help-box .kv { grid-template-columns: auto 1fr; }
.help-box .kv .k { font-family: var(--mono); color: var(--text); font-size: 12px; } .help-box .kv .v { text-align: left; font-family: var(--body); color: var(--muted); }
.elev i[data-t]::after { font-family: var(--mono); }

/* responsive */
@media (max-width: 1500px) { .tile canvas { display: none; } .tile { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1400px) { .clock { display: none; } #symtabs .mk canvas { display: none; } .tabs button { padding: 0 8px; } }
@media (max-width: 1200px) {
  :root { --insp: 0px; }
  .hide-wide { display: inline-block; }
  .insp { position: fixed; right: 0; top: calc(var(--hdr) + var(--tiles)); bottom: 0; width: min(400px, 94vw); transform: translateX(100%); transition: transform .2s; z-index: 20; border-left: 1px solid var(--line-2); }
  .insp.open { transform: none; }
}
@media (max-width: 1300px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } .tile:nth-child(5), .tile:nth-child(6) { display: none; } }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tile:nth-child(3) { display: none; } }
@media (max-width: 720px) {
  :root { --tiles: 64px; --elev: 22px; --hdr: 96px; }
  header { gap: 4px 8px; padding: 4px 8px; flex-wrap: wrap; height: var(--hdr); align-content: center; }
  .brand { order: 0; } .hdr-status { order: 2; margin-left: auto; }
  .tabs { order: 3; height: 34px; } .tabs.tfs { order: 4; border-left: 0; padding-left: 0; margin-left: auto; }
  .tabs button { padding: 0 7px; font-size: 9.5px; height: 34px; }
  .brand h1 span, .hide-sm, .legend, .replay .label, #btn-sound, #btn-help, #btn-notif { display: none; }
  main { grid-template-columns: var(--elev) 0px minmax(0, 1fr) var(--insp); } .tbar { display: none; }
  .hud { left: 8px; padding: 6px 9px; } .hud-px { font-size: 20px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tile:nth-child(3), .tile:nth-child(5), .tile:nth-child(6), .tile:nth-child(7) { display: none; } .tile { padding: 7px 9px; } .tile .n { font-size: 14px; }
  .toasts { max-width: 70vw; bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) { .elev i.cur, .flat .scan::after { animation: none; } }

/* alarm lines */
.alarmbar { position: absolute; left: 50%; top: 50px; transform: translateX(-50%); display: none; align-items: center; gap: 16px; z-index: 8; background: rgba(0,0,0,.94); border: 2px solid #ff3b3b; padding: 10px 12px 10px 16px; box-shadow: 0 0 0 1px rgba(255,59,59,.25), 0 0 28px rgba(255,59,59,.35); animation: alarmpulse 1.1s ease-in-out infinite; max-width: calc(100% - 40px); }
.alarmbar.on { display: flex; }
.alarmbar .txt { display: grid; gap: 2px; min-width: 0; }
.alarmbar .txt b { font-family: var(--brand); font-size: 12px; letter-spacing: .22em; color: #ff3b3b; }
.alarmbar .txt span { font-family: var(--mono); font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#alarm-stop { font-family: var(--brand); font-size: 14px; letter-spacing: .2em; background: #ff3b3b; color: #000; border: 0; padding: 10px 18px; cursor: pointer; }
#alarm-stop:hover { background: #fff; }
@keyframes alarmpulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(255,59,59,.25), 0 0 18px rgba(255,59,59,.25); } 50% { box-shadow: 0 0 0 2px rgba(255,59,59,.6), 0 0 42px rgba(255,59,59,.6); } }
.stage.ringing::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 7; box-shadow: inset 0 0 0 2px rgba(255,59,59,.7), inset 0 0 60px rgba(255,59,59,.22); animation: ringedge .9s ease-in-out infinite; }
@keyframes ringedge { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.toasts .alarm { border-left-color: #ff3b3b; } .toasts .alarm b { color: #ff3b3b; }
.legend .sw.fx { background: linear-gradient(135deg, var(--green), var(--rose)); border-radius: 50%; }
