:root { --bg: #0a0d14; --panel: #10151f; --line: #1d2533; --text: #e6ecf7; --muted: #8b98b0; --accent: #ffd86b; --pos: #3ddc84; --neg: #ff5c5c; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; overflow: hidden; }
body { display: grid; grid-template-columns: 360px 1fr; grid-template-rows: 48px 1fr; grid-template-areas: "hdr hdr" "side main"; }
header { grid-area: hdr; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { font-size: 15px; } .brand .sub { color: var(--muted); font-size: 12px; margin-left: 10px; }
.stats { display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--muted); }
.stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.stats input[type=range] { width: 90px; vertical-align: middle; }
button { background: #1b2434; color: var(--text); border: 1px solid #2b3648; border-radius: 6px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: 13px; }
button:hover { background: #24304a; } button.active { background: #3a4a70; border-color: #5f74a8; }
aside { grid-area: side; overflow-y: auto; padding: 10px; border-right: 1px solid var(--line); background: var(--panel); }
main { grid-area: main; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; min-width: 0; min-height: 0; }
.pane { position: relative; background: #070a10; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; min-height: 0; }
.pane canvas { width: 100%; height: 100%; display: block; }
.pane-title { position: absolute; left: 10px; top: 8px; font-size: 12px; color: var(--muted); pointer-events: none; text-shadow: 0 1px 2px #000; }
#brain-labels { position: absolute; inset: 0; pointer-events: none; }
.brain-label { position: absolute; left: 0; top: 0; font-size: 11px; color: #cfe0ff; text-shadow: 0 1px 3px #000; transform: translate(-50%, -50%); white-space: nowrap; transition: opacity .3s; }
#fly-overlay { position: absolute; inset: 0; pointer-events: none; }
.badge { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); font-weight: 800; font-size: 26px; padding: 4px 12px; border-radius: 8px; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.5); }
.badge.buy { color: var(--pos); } .badge.sell { color: var(--neg); }
#tooltip { position: absolute; pointer-events: none; background: rgba(8,12,20,.92); border: 1px solid #2b3648; border-radius: 6px; padding: 6px 8px; font-size: 12px; display: none; max-width: 260px; }
#tooltip b { color: var(--accent); }
.legend { position: absolute; right: 10px; bottom: 8px; display: flex; gap: 10px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
nav#scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
nav#scenarios button { text-align: left; padding: 8px 10px; }
.card { background: #0d121b; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.card h2 { margin: 0 0 6px; font-size: 16px; } .card h3 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.card h3:first-child { margin-top: 0; }
.hint { text-transform: none; letter-spacing: 0; font-weight: normal; }
.blurb { color: #c3cde0; font-size: 13px; margin: 0 0 10px; } .blurb code { background: #1b2434; padding: 0 4px; border-radius: 4px; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; font-size: 12px; }
.row input[type=range] { width: 110px; vertical-align: middle; }
.row input[type=text] { background: #0a0e16; border: 1px solid #2b3648; color: var(--text); padding: 5px 8px; border-radius: 6px; font: inherit; width: 160px; }
label.file { background: #1b2434; border: 1px solid #2b3648; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
label.file input { display: none; }
.meters .meter { display: grid; grid-template-columns: 1fr 90px 52px; gap: 8px; align-items: center; font-size: 12px; margin: 3px 0; }
.meter span { color: #c3cde0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter .bar { height: 8px; background: #161d2a; border-radius: 4px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4c6fff, #ffd86b); transition: width .08s linear; }
.meter.in .bar i { background: linear-gradient(90deg, #2a8f73, #7ff0c8); }
.meter b { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
#strip { width: 100%; height: 60px; background: #0a0e16; border-radius: 6px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12px; margin-top: 6px; }
.kv div { display: flex; justify-content: space-between; border-bottom: 1px dashed #1d2533; } .kv b.pos { color: var(--pos); } .kv b.neg { color: var(--neg); }
.kv .log { grid-column: 1 / -1; color: var(--muted); font-size: 11px; border: 0; display: block; }
.top div { display: flex; justify-content: space-between; font-size: 12px; border-bottom: 1px dashed #1d2533; }
.small { font-size: 12px; color: var(--muted); } .small a { color: #9fc0ff; }
#loader { position: fixed; inset: 0; background: rgba(6,9,14,.96); display: flex; align-items: center; justify-content: center; z-index: 10; }
#loader .box { width: 380px; text-align: center; } #loader h1 { font-size: 22px; }
#loader .bar { height: 10px; background: #161d2a; border-radius: 5px; overflow: hidden; margin: 12px 0; } #loader .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #1b2434; border: 1px solid #2b3648; padding: 8px 14px; border-radius: 8px; opacity: 0; transition: opacity .3s; pointer-events: none; }
@media (max-width: 1100px) { main { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } }
