:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --red: #f85149;
  --amber: #d29922;
  --purple: #bc8cff;
}

* { box-sizing: border-box; }

/* The `hidden` attribute is only `display:none` in the UA stylesheet, so ANY
   author rule that sets `display` beats it. `.modal { display:flex }` did exactly
   that: the overlay rendered over the whole page from first paint and swallowed
   every click, and Close appeared dead because `hidden = true` was already being
   overridden. Keep this rule above everything that sets `display`. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.error-banner {
  background: #4a1712; color: #ffb4ae;
  border-bottom: 1px solid var(--red);
  padding: 9px 18px; font-size: 13px; font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar { flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 17px; color: var(--accent); }
.clock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }

/* ------------------------------------------------------- header quote strip */
.topquotes { display: flex; gap: 8px; flex-wrap: wrap; }
.tq {
  display: flex; flex-direction: column; justify-content: center;
  padding: 2px 11px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--panel-2);
  line-height: 1.25; min-width: 84px;
}
.tq-k { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.tq-v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tq-c { font-size: 10.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- view tabs */
.viewtabs {
  display: flex; gap: 2px; padding: 0 18px;
  background: var(--panel); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 19;
}
.vtab {
  padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent;
}
.vtab:hover { color: var(--text); }
.vtab.active { color: var(--accent); border-bottom-color: var(--accent); }

.pill {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--muted);
  cursor: default;
}
.pill.ok { color: var(--green); border-color: #1f6f34; }
.pill.warn { color: var(--amber); border-color: #6b4d0e; }
.pill.bad { color: var(--red); border-color: #7a2620; }
.pill.click { cursor: pointer; }
.pill.click:hover { background: #22272e; }

.btn {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.btn:hover { background: #2a3038; }
.btn:disabled { opacity: .5; cursor: default; }

/* -------------------------------------------------------------- staleness */
.staleness-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px 18px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.stale-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--panel);
  font-variant-numeric: tabular-nums;
}
.stale-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.stale-chip.fresh .dot { background: var(--green); }
.stale-chip.aging .dot { background: var(--amber); }
.stale-chip.stale .dot { background: var(--red); }
.stale-chip .label { color: var(--muted); }
.stale-chip .val { font-weight: 600; }
.stale-chip.stale .val { color: var(--red); }
.stale-chip .src { color: var(--purple); font-size: 11px; }

/* -------------------------------------------------------------------- main */
main { padding: 16px 18px 60px; display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
/* Two cards sharing a row. Equal columns, and each column is a flex child of a
   grid cell so both cards stretch to the taller one's height. */
.card-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch;
  min-width: 0;
}
.card-split > .card { min-width: 0; }
/* Two-thirds / one-third variant. The gamma map carries two bar charts over ~80
   strikes and needs the width to stay readable; the ΔGEX panel is horizontal
   rows against a single value axis and reads fine narrow. */
.card-split.two-one { grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px) {
  .card-split, .card-split.two-one { grid-template-columns: 1fr; }
}

.card-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; row-gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.card-head h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .3px; }
.freshness { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; }
.tab {
  padding: 3px 11px; border-radius: 5px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
}
.tab.active { background: var(--accent); border-color: var(--accent); color: #06121f; font-weight: 700; }

/* Shown on panels that fell back to replaying the last trading day because the
   market is currently closed — deliberately loud (amber) so it's never mistaken
   for a live reading. */
.session-banner {
  padding: 8px 16px; font-size: 12px; font-weight: 600;
  background: rgba(210, 153, 34, .12); color: #e3b341;
  border-bottom: 1px solid #6b4d0e;
}

/* ------------------------------------------------------------ zoom slider */
.zoomer { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.zoomer label { text-transform: uppercase; letter-spacing: .6px; }
.zoomer input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 130px; height: 4px; border-radius: 3px;
  background: var(--border); outline: none; cursor: pointer;
}
.zoomer input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 0;
}
.zoomer input[type=range]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 0;
}
.zoom-label {
  font-variant-numeric: tabular-nums; color: var(--text);
  min-width: 116px; font-size: 11px;
}

/* ------------------------------------------------------------------ regime */
.basis-note {
  padding: 8px 16px; font-size: 11.5px; color: var(--muted);
  background: var(--panel-2); border-bottom: 1px solid var(--border);
}
.basis-note b { color: var(--text); }

/* Single column since the signal/meaning table was removed — the hero already
   states the active quadrant and what it means. */
.regime-body { padding: 16px; }

.regime-hero {
  padding: 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2);
}
.regime-hero .quadrant { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.regime-hero .meaning { font-size: 15px; margin-top: 6px; }
.regime-hero.bullish { border-color: #1f6f34; }
.regime-hero.bullish .quadrant { color: var(--green); }
.regime-hero.caution { border-color: #6b4d0e; }
.regime-hero.caution .quadrant { color: var(--amber); }
.regime-hero.bearish { border-color: #7a2620; }
.regime-hero.bearish .quadrant { color: var(--red); }
.regime-hero.neutral .quadrant { color: var(--muted); }

.vol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.vol-tile { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 9px 11px; }
.vol-tile .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.vol-tile .v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vol-tile .c { font-size: 12px; font-variant-numeric: tabular-nums; }

.regime-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.regime-table th, .regime-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.regime-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }
.regime-table tr.active { background: rgba(88,166,255,.10); }
.regime-table tr.active td:first-child { border-left: 3px solid var(--accent); }
.regime-table td.sig { font-weight: 700; white-space: nowrap; }
.derived-tag {
  font-size: 10px; color: var(--amber); border: 1px solid #6b4d0e;
  border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: middle;
}

/* ------------------------------------------------------------- price chart */
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.tab.legend { cursor: default; display: flex; align-items: center; gap: 0; }

/* --------------------------------------------------------------------- gex */
.banner { padding: 12px 16px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--border); }
.banner.pos { background: rgba(63,185,80,.10); color: var(--green); }
.banner.neg { background: rgba(248,81,73,.10); color: var(--red); }
.banner .sub { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 3px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--border); }
.metric { background: var(--panel); padding: 10px 13px; }
.metric .k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.metric .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.metric .v.pos { color: var(--green); }
.metric .v.neg { color: var(--red); }

.charts { padding: 12px 8px 4px; }
.chart-block { margin-bottom: 4px; }
.chart-title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; padding-left: 8px; margin-bottom: 2px; }
.chart-block svg { display: block; width: 100%; }

.tooltip {
  position: fixed; z-index: 40; pointer-events: none;
  background: #0b0f14; border: 1px solid var(--accent); border-radius: 6px;
  padding: 9px 11px; font-size: 12px; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 20px rgba(0,0,0,.6); max-width: 260px;
}
.tooltip .t-strike { font-weight: 800; font-size: 14px; color: var(--accent); margin-bottom: 5px; }
.tooltip .t-row { display: flex; justify-content: space-between; gap: 14px; }
.tooltip .t-row .k { color: var(--muted); }
.tooltip hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }

/* -------------------------------------------------------------- predictors */
.pred-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--border); }
.pred-summary .metric .v.big { font-size: 26px; }

.prob-bar { height: 26px; display: flex; margin: 0; font-size: 12px; font-weight: 700; }
.prob-bar .up { background: rgba(63,185,80,.30); color: var(--green); }
.prob-bar .down { background: rgba(248,81,73,.30); color: var(--red); }
.prob-bar div { display: flex; align-items: center; justify-content: center; }

table.ind { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.ind th, table.ind td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.ind th { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; background: var(--panel-2); position: sticky; top: 0; }
table.ind td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.ind tr.unfilled { opacity: .55; }
table.ind input {
  width: 90px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px; padding: 3px 6px;
  font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums;
}
table.ind input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
table.ind input.manual { border-color: var(--accent); background: rgba(88,166,255,.08); }

.tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); }
.tag.auto { color: var(--green); border-color: #1f6f34; }
.tag.manual { color: var(--accent); border-color: var(--accent); }

.score-chip { display: inline-block; min-width: 26px; text-align: center; font-weight: 800; border-radius: 4px; padding: 1px 5px; }
.score-chip.p2 { background: rgba(63,185,80,.28); color: var(--green); }
.score-chip.p1 { background: rgba(63,185,80,.15); color: var(--green); }
.score-chip.z  { background: #21262d; color: var(--muted); }
.score-chip.n1 { background: rgba(248,81,73,.15); color: var(--red); }
.score-chip.n2 { background: rgba(248,81,73,.28); color: var(--red); }

.note { padding: 10px 16px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); }

/* ------------------------------------------------------ intraday target */
/* The headline is the largest type on the page by design — it is the one
   reading meant to survive a two-second glance. Its tinted background carries
   the direction, so colour and glyph and number all say the same thing and no
   single one of them has to be caught. */
.target-headline { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.target-headline.pos { background: rgba(63,185,80,.08); }
.target-headline.neg { background: rgba(248,81,73,.08); }
.target-headline.flat { background: rgba(139,148,158,.07); }
.target-line { font-size: 25px; font-weight: 700; line-height: 1.25; letter-spacing: -.2px; }
.target-price { font-variant-numeric: tabular-nums; }
.target-headline.pos .target-price, .target-headline.pos .target-arrow { color: var(--green); }
.target-headline.neg .target-price, .target-headline.neg .target-arrow { color: var(--red); }
.target-headline.flat .target-price, .target-headline.flat .target-arrow { color: var(--muted); }
.target-arrow { font-weight: 800; }
.target-sub { margin-top: 8px; font-size: 13px; color: var(--muted); max-width: 78ch; line-height: 1.5; }
.target-warn { margin-top: 8px; font-size: 12px; color: #e3b341; max-width: 78ch; line-height: 1.45; }

.target-detail { border-top: 1px solid var(--border); font-size: 12.5px; }
.target-detail > summary {
  padding: 9px 16px; cursor: pointer; color: var(--muted); font-size: 12px;
  user-select: none;
}
.target-detail > summary:hover { color: var(--text); }
.target-detail[open] > summary { border-bottom: 1px solid var(--border); }
.target-basis, .target-parts { padding: 10px 16px; }
.target-parts { border-top: 1px solid var(--border); }
.target-parts-head { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 6px; }
.target-detail .t-row {
  display: flex; justify-content: space-between; gap: 18px; padding: 3px 0;
  align-items: baseline;
}
.target-detail .t-row .k { color: var(--muted); white-space: nowrap; }
.target-detail .t-row > span:last-child { text-align: right; }
.target-detail .dim { color: var(--muted); font-weight: 400; }

.dix-proxy-box {
  margin: 0 16px 12px; padding: 10px 12px; border-radius: 6px;
  background: rgba(188, 140, 255, .07); border: 1px solid #5a3f7a;
  font-size: 12.5px;
}
.dix-proxy-vals { display: flex; align-items: center; gap: 16px; margin-top: 6px; }

/* ------------------------------------------------- probability history */
.prob-hist-wrap { padding: 0 16px 14px; overflow-x: auto; }
table.prob-hist { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.prob-hist th, table.prob-hist td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
table.prob-hist th { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; }
table.prob-hist td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.prob-hist td.hit { color: var(--green); font-weight: 700; }
table.prob-hist td.miss { color: var(--red); font-weight: 700; }
table.prob-hist td.flat { color: var(--muted); }

/* ----------------------------------------------------------------- sources */
table.src { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.src th, table.src td { padding: 7px 12px; border-bottom: 1px solid var(--border); text-align: left; }
table.src th { color: var(--muted); font-size: 10.5px; text-transform: uppercase; }
table.src td.ok { color: var(--green); }
table.src td.bad { color: var(--red); }

/* ------------------------------------------------------------ chart guide */
.guide-intro {
  padding: 14px 18px; font-size: 13.5px; line-height: 1.6;
  color: var(--text); background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.guide-intro b { color: var(--accent); }

.guide-key {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 6px 20px; padding: 14px 18px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(88, 166, 255, .04);
}
.key-item { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.5; }
.key-mark { flex: 0 0 auto; min-width: 16px; margin-top: 1px; }
.key-mark svg { display: block; }
.key-text { color: var(--muted); }
.key-text b { color: var(--text); }

.guide-body { padding: 6px 18px 18px; font-size: 13.5px; line-height: 1.65; }
.guide-body h3 {
  margin: 20px 0 8px; font-size: 13px; color: var(--accent);
  text-transform: uppercase; letter-spacing: .6px;
}
.guide-body p { margin: 0 0 10px; color: #c9d4df; }
.guide-body ul { margin: 0 0 10px; padding-left: 20px; color: #c9d4df; }
.guide-body li { margin-bottom: 6px; }
.guide-body b { color: var(--text); }

.guide-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 14px; }
@media (max-width: 820px) { .guide-split { grid-template-columns: 1fr; } }
.guide-case { border: 1px solid var(--border); border-radius: 7px; padding: 12px 14px; background: var(--panel-2); }
.guide-case p { margin: 0; font-size: 13px; }
.guide-case .case-h { font-weight: 700; margin-bottom: 6px; font-size: 13px; }
.guide-case.pos { border-color: #1f6f34; }
.guide-case.pos .case-h { color: var(--green); }
.guide-case.neg { border-color: #7a2620; }
.guide-case.neg .case-h { color: var(--red); }

table.guide-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 10px 0 14px; }
table.guide-table th, table.guide-table td {
  padding: 9px 11px; border: 1px solid var(--border); text-align: left; vertical-align: top;
}
table.guide-table th {
  color: var(--muted); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .5px; background: var(--panel-2);
}
table.guide-table td.pos { color: var(--green); }
table.guide-table td.neg { color: var(--red); }
table.guide-table td.warn { color: var(--amber); }

.guide-caveat {
  border-left: 3px solid var(--amber); padding: 8px 0 8px 12px;
  color: var(--muted) !important; font-size: 12.5px;
}

/* ------------------------------------------------------------------- modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-inner {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px; max-width: 640px; width: 100%; max-height: 85vh; overflow: auto;
}
.modal-inner h3 { margin: 0 0 12px; }
.modal-inner ol { padding-left: 20px; line-height: 1.7; }
.modal-inner code {
  display: block; background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; padding: 9px; font-size: 11.5px; word-break: break-all; margin: 8px 0;
}
.modal-inner input[type=text] {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 5px; padding: 8px; font-size: 12.5px;
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* Backend errors are multi-line and actionable — preserve the line breaks
   instead of collapsing them into one dense red paragraph. */
.err {
  color: var(--red); font-size: 12.5px; margin-top: 10px;
  white-space: pre-line; line-height: 1.5;
  background: rgba(248, 81, 73, .07); border: 1px solid #7a2620;
  border-radius: 6px; padding: 10px;
}
.ok-msg { color: var(--green); font-size: 12.5px; margin-top: 8px; }

.warn-box {
  background: rgba(210, 153, 34, .10); border: 1px solid #6b4d0e;
  border-radius: 6px; padding: 9px 11px; margin: 10px 0;
  font-size: 12.5px; color: #e3b341; line-height: 1.5;
}

.code-timer {
  font-size: 12px; color: var(--muted); margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.code-timer.hot { color: var(--red); font-weight: 600; }

/* --------------------------------------------------- next-day forecast card

   The run strip is the argument this panel makes: the same model is useless at
   16:05 and useful at 08:40, so all four run times stay on screen at once with
   their measured skill attached. A no-skill run is greyed rather than hidden —
   hiding it would leave the impression that every run carries the same weight,
   which is the specific misreading this panel exists to prevent. */

.nextday-runs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border-bottom: 1px solid var(--border);
}
.nextday-run { background: var(--panel); padding: 9px 12px; }
.nextday-run.active { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }
.nextday-run.noskill { opacity: .55; }
.nr-time { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nr-et { font-size: 9.5px; color: var(--muted); font-weight: 400; }
.nr-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.nr-metric { margin-top: 5px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.nextday-run.noskill .nr-metric { color: var(--muted); }
.nr-sub { font-size: 10.5px; color: var(--muted); }

#nextday-metrics .metric .s {
  font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.35;
}

.lean { font-size: 10.5px; padding: 1px 6px; border: 1px solid var(--border); }
.lean.bullish { color: var(--green); border-color: #1f6f34; }
.lean.bearish { color: var(--red); border-color: #6e2b28; }
.lean.neutral { color: var(--muted); }
.lean.unavailable { color: #5a626b; }

.detail-lead { margin: 12px 16px; font-size: 12.5px; line-height: 1.55; max-width: 84ch; }
.detail-note { margin: 8px 16px; font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 84ch; }
.detail-warn { margin: 8px 16px; font-size: 12px; color: var(--amber); line-height: 1.5; max-width: 84ch; }
.detail-foot { margin: 8px 16px; font-size: 11.5px; color: var(--muted); line-height: 1.5; max-width: 84ch; }
#nextday-detail h4 { margin: 16px 16px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }

.detail-table { width: calc(100% - 32px); margin: 0 16px 12px; border-collapse: collapse; font-size: 11.5px; }
.detail-table th {
  text-align: left; padding: 5px 8px; color: var(--muted); font-weight: 500;
  border-bottom: 1px solid var(--border); text-transform: uppercase;
  font-size: 9.5px; letter-spacing: .5px;
}
.detail-table td { padding: 5px 8px; border-bottom: 1px solid rgba(48,54,61,.5); vertical-align: top; }
.detail-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.detail-table td.pos { color: var(--green); }
.detail-table td.neg { color: var(--red); }
.ctx-basis { color: var(--muted); max-width: 46ch; line-height: 1.45; }
.ctx-caveat { color: var(--amber); margin-top: 3px; font-size: 11px; line-height: 1.4; }

@media (max-width: 900px) {
  .nextday-runs { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------- auth page */
.auth-main {
  min-height: calc(100vh - 53px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card { width: 100%; max-width: 380px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.auth-form label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12px; color: var(--muted);
}
.auth-form input {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; font-size: 14px; font-family: inherit;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-submit { padding: 9px 12px; font-size: 14px; font-weight: 600; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; flex-wrap: wrap; }
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-error { border-top: none; color: var(--red); padding: 0; }
/* Honeypot — off-screen rather than display:none, since some bots skip
   fields their DOM inspection can tell are display:none or visibility:hidden. */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}
