:root {
  --bg: #050507;
  --panel: #0b0b10;
  --line: #1c1c26;
  --text: #e8e8f0;
  --muted: #6d6d80;
  --accent: #ff2e63;
  --accent-dim: #5a1428;
  --cyan: #7fe3ff;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--mono); }
body { min-height: 100vh; }
.shell { max-width: 1440px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
h1 { margin: 0; font-size: clamp(16px, 2.2vw, 26px); letter-spacing: .06em; font-weight: 700; }
h1 .dot { color: var(--muted); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.sub { margin: 4px 0 0; font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.live { border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 11px; letter-spacing: .14em; display: inline-flex; align-items: center; gap: 6px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1s infinite; }
.live.demo { border-color: var(--muted); color: var(--muted); }
.live.demo i { background: var(--muted); }
.clock { font-size: 11px; color: var(--muted); }
@keyframes blink { 50% { opacity: .2; } }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--panel); border: 1px solid var(--line); padding: 8px 10px; min-width: 0; }
.kpi label { display: block; font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.kpi b { display: block; font-size: clamp(15px, 1.7vw, 22px); margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi b.hot { color: var(--accent); }
.kpi small { font-size: 9px; color: var(--muted); }

.stage { position: relative; height: min(62vh, 620px); min-height: 360px; border: 1px solid var(--line); background: radial-gradient(ellipse at center, #0d0d14 0%, var(--bg) 70%); overflow: hidden; }
#ring { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.legend { position: absolute; top: 10px; left: 12px; display: flex; gap: 14px; font-size: 10px; color: var(--muted); }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.lg-run { background: var(--accent); } .lg-idle { background: #555; } .lg-hit { background: #fff; box-shadow: 0 0 6px #fff; }
.radius { position: absolute; left: 14px; bottom: 14px; }
.radius label { font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.radius b { display: block; font-size: clamp(30px, 4.4vw, 54px); color: var(--accent); line-height: 1; margin: 4px 0; font-variant-numeric: tabular-nums; }
.radius span { font-size: 11px; letter-spacing: .14em; }
.speed { position: absolute; right: 14px; top: 10px; display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); }
.speed b { color: var(--text); }
.speed input { accent-color: var(--accent); width: 130px; }
.tagline { position: absolute; right: 14px; bottom: 10px; margin: 0; font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

.panel { background: var(--panel); border: 1px solid var(--line); padding: 8px 10px; min-width: 0; }
.ph { display: flex; gap: 10px; align-items: baseline; font-size: 10px; letter-spacing: .1em; margin-bottom: 6px; }
.ph > :last-child:not(:first-child) { margin-left: auto; }
.ph.mt { margin-top: 10px; }

.strips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.heat { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; }
.heat i { aspect-ratio: 1; background: #16161e; display: block; }
.bars { height: 46px; display: flex; align-items: flex-end; gap: 2px; }
.bars i { flex: 1; background: #3a3a48; min-height: 1px; display: block; }
.bars i.peak { background: var(--accent); }

.grid3 { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; }
.log { list-style: none; margin: 0; padding: 0; height: 210px; overflow: hidden; font-size: 11px; }
.log li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; white-space: nowrap; animation: slidein .25s ease-out; }
.log li span:first-child { overflow: hidden; text-overflow: ellipsis; }
.log li.hit { color: var(--accent); }
.log li .r { color: var(--muted); }
.log li.hit .r { color: var(--accent); }
@keyframes slidein { from { transform: translateY(-6px); opacity: 0; } }

.ledger .row, .bots .row { display: grid; grid-template-columns: 1fr 1.4fr auto; align-items: center; gap: 8px; font-size: 11px; padding: 4px 0; }
.track { height: 5px; background: #1a1a24; position: relative; overflow: hidden; }
.track i { position: absolute; inset: 0 auto 0 0; background: var(--accent); display: block; transition: width .3s; }
.ledger .num { color: var(--muted); font-variant-numeric: tabular-nums; }
.topv { list-style: none; margin: 0; padding: 0; font-size: 11px; }
.topv li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.topv li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topv li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.bots .row { grid-template-columns: minmax(0, 1.3fr) 1fr auto; }
.bots .name { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.bots .name i { width: 7px; height: 7px; border-radius: 50%; background: #555; display: inline-block; }
.bots .row.run .name i { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.bots .row.run .name { color: var(--text); }
.bots .row .name { color: var(--muted); }
.bots .state { font-size: 10px; color: var(--muted); width: 52px; text-align: right; }
.bots .row.run .state { color: var(--accent); }

.foot { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); padding: 4px 2px 10px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strips, .grid3 { grid-template-columns: 1fr; }
  .stage { height: 56vh; }
  .speed input { width: 90px; }
}
@media (max-width: 480px) {
  .shell { padding: 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend { display: none; }
  .tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live i, .log li { animation: none; }
}
