:root {
  --navy: #0b1628;
  --navy-2: #10203a;
  --line: #1e3252;
  --ink: #e8eef7;
  --ink-2: #9fb0c8;
  --ink-3: #6b7d99;
  --gold: #d4a83a;
  --close: #e05a52;
  --watch: #f0a22e;
  --hold: #3fc48c;
  --idle: #5f6f8a;
  --shade: rgba(224, 90, 82, 0.16);
  --shade-2: rgba(224, 90, 82, 0.34);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }
button { font: inherit; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 18px 20px 48px; }

/* ---- masthead --------------------------------------------------- */
.mast {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--gold); margin-bottom: 12px;
}
.mast h1 { font-size: 19px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.mast h1 span { color: var(--ink-2); font-weight: 400; }
.mast .meta { color: var(--ink-2); font-size: 14px; display: flex; gap: 18px; align-items: baseline; }
.mast .meta .live::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--hold); margin-right: 7px; vertical-align: middle;
}
.mast .meta .stale::before { background: var(--watch); }
.linkbtn { background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--ink); }
.linkbtn:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---- summary band ------------------------------------------------ */
.band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px;
  background: var(--navy-2);
}
.band > div { padding: 8px 14px; border-right: 1px solid var(--line); }
.band > div:last-child { border-right: 0; }
.band .k { font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }
.band .v { font-size: 18px; font-weight: 600; }
.band .v small { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-left: 6px; }
.up { color: var(--hold); } .down { color: var(--close); }
.counts { display: flex; gap: 12px; font-size: 14px; font-weight: 500; margin-top: 2px; flex-wrap: wrap; }
.counts span { white-space: nowrap; }
.counts span::before {
  content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px;
  margin-right: 6px; vertical-align: 1px; background: var(--idle);
}
.counts .c-close::before { background: var(--close); }
.counts .c-watch::before { background: var(--watch); }
.counts .c-hold::before { background: var(--hold); }

/* ---- position rows ----------------------------------------------- */
.rows { display: flex; flex-direction: column; gap: 7px; }
.row {
  display: grid; grid-template-columns: 172px minmax(280px, 1fr) 430px; gap: 14px; align-items: center;
  padding: 8px 14px 8px 16px; border-radius: 5px;
  background: var(--navy-2); border-left: 4px solid var(--idle);
}
.row.a-close { border-left-color: var(--close); }
.row.a-watch { border-left-color: var(--watch); }
.row.a-hold { border-left-color: var(--hold); }
.row.a-gold { border-left-color: var(--gold); }

.who .tk { font-size: 20px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.who .st { color: var(--ink-2); font-size: 12.5px; margin-top: 4px; line-height: 1.35; }
.who .st b { color: var(--ink); font-weight: 500; }
.pill {
  display: inline-block; margin-top: 6px; padding: 2px 7px; border-radius: 3px;
  font-size: 11.5px; font-weight: 500; color: var(--navy); background: var(--idle);
}
.pill.a-close { background: var(--close); color: #fff; }
.pill.a-watch { background: var(--watch); }
.pill.a-hold { background: var(--hold); }
.pill.a-gold { background: var(--gold); }
.pill.a-idle { background: var(--line); color: var(--ink-2); }

.map svg { width: 100%; height: 76px; display: block; overflow: visible; }
.map text { font-family: inherit; font-size: 11px; fill: var(--ink-2); }
.map text.px { fill: var(--ink); font-weight: 600; font-size: 12px; }
.map text.ema { fill: var(--gold); }
.map .axis { stroke: var(--line); stroke-width: 2; }
.map .zone { fill: var(--shade); }
.map .zone2 { fill: var(--shade-2); }
.map .tick { stroke: var(--ink-3); stroke-width: 1.5; }
.map .tick.be { stroke: var(--ink-2); stroke-dasharray: 3 3; }
.map .pxdot { fill: var(--ink); }
.map .emadot { fill: none; stroke: var(--gold); stroke-width: 2; }

.money { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px 12px; align-content: center; }
.money .k { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.money .v { font-size: 14.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.money .v small { font-size: 11px; color: var(--ink-2); font-weight: 400; margin-left: 4px; }
.bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; background: var(--hold); }
.bar i.neg { background: var(--close); }
.bar.ema i { background: var(--gold); }
.money .wide { grid-column: auto; }

/* ---- shield ------------------------------------------------------ */
.shield {
  margin-top: 16px; padding: 12px 16px; border-radius: 6px;
  border: 1px solid var(--gold); background: transparent;
}
.shield h2 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.shield p { margin: 0; color: var(--ink-2); font-size: 13px; max-width: 80ch; line-height: 1.45; }
.shield .head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn {
  background: var(--gold); color: var(--navy); border: 0; border-radius: 4px;
  padding: 9px 14px; font-weight: 600; cursor: pointer;
}
.btn:disabled { background: var(--line); color: var(--ink-3); cursor: default; }
.legs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; margin-top: 16px; }
.legs div { padding: 10px 14px; border-radius: 4px; background: var(--navy-2); }
.legs .k { font-size: 12px; color: var(--ink-2); }
.legs .v { font-size: 16px; font-weight: 600; margin-top: 2px; }
.shield .foot { margin-top: 12px; font-size: 13px; color: var(--ink-3); }

/* ---- gate / states ---------------------------------------------- */
.gate { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.gate h1 { font-size: 26px; margin: 0 0 6px; }
.gate p { color: var(--ink-2); margin: 0 0 22px; }
.empty { padding: 40px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line); border-radius: 6px; }

@media (max-width: 860px) {
  .band { grid-template-columns: 1fr 1fr; }
  .band > div:nth-child(2) { border-right: 0; }
  .band > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .row { grid-template-columns: 1fr; gap: 10px; }
  .money { grid-template-columns: 1fr 1fr 1fr; }
  .legs { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wrap { padding: 20px 14px 48px; }
  .mast { flex-direction: column; align-items: flex-start; gap: 6px; }
  .money { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .bar i { transition: width 400ms ease; }
}
