/* ──────────────────────────────────────────────────────────────
   Option Greek Dashboard — options dashboard styles
   Maps onto shared /assets/tokens.css brand tokens. Page-specific
   tokens (semantic call/put colors, layout) stay local.
   ────────────────────────────────────────────────────────────── */
:root {
  --bg:          var(--brand-bg);
  --bg-2:        var(--brand-bg-2);
  --surface:     var(--brand-surface);
  --surface-2:   rgba(255,255,255,0.07);
  --border:      var(--brand-border);
  --text:        var(--brand-text);
  --muted:       var(--brand-text-muted);
  --accent:      var(--brand-accent);       /* indigo */
  --accent-2:    var(--brand-accent-2);     /* purple */
  --accent-glow: var(--brand-accent-glow);
  --font-display: var(--brand-font-display);
  --font-head:   var(--brand-font-head);
  --font-body:   var(--brand-font-body);
  --font-mono:   var(--brand-font-mono);
  --ease:        var(--brand-ease);

  /* semantic — options domain */
  --up:    #22c55e;   /* calls / bullish */
  --down:  #ef4444;   /* puts / bearish */
  --gold:  #fbbf24;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* the [hidden] attr must win over .state/.kpi display rules below */
[hidden] { display: none !important; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 560px at 12% -8%, rgba(99,102,241,0.12), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, rgba(139,92,246,0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  padding: 22px 18px; overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.brand-logo {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: grid; place-items: center; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.brand-name { display: block; font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 19px; letter-spacing: 0.01em; }
.brand-tag  { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.ticker-form { display: flex; gap: 6px; }
#ticker-input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 14px;
  text-transform: uppercase;
}
#ticker-input:focus { outline: none; border-color: var(--accent); }
.btn-load {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font-weight: 600; font-size: 13px;
  font-family: var(--font-body); cursor: pointer; transition: filter .15s var(--ease);
}
.btn-load:hover { filter: brightness(1.1); }

.watchlist-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-top: 4px;
}
.watchlist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.watchlist button {
  padding: 9px 0; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font-body);
  font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s var(--ease);
}
.watchlist button:hover { border-color: var(--accent); color: #c7d2fe; }
.watchlist button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-refresh {
  padding: 9px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font-body);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s var(--ease);
}
.btn-refresh:hover { border-color: var(--accent); color: #c7d2fe; }

.btn-export {
  padding: 9px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--accent); font-family: var(--font-body);
  font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: filter .15s var(--ease);
}
.btn-export:hover { filter: brightness(1.1); }
.btn-export:disabled { opacity: .45; cursor: not-allowed; filter: none; }

.about-box {
  margin-top: auto; padding: 13px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; color: var(--muted); line-height: 1.6;
}
.about-box b { color: var(--text); display: block; margin-bottom: 4px; }
.about-box .disclaimer { display: block; margin-top: 6px; color: var(--down); font-weight: 600; }
.back-link { font-size: 12px; color: var(--muted); transition: color .15s var(--ease); }
.back-link:hover { color: var(--text); }

/* ── Main ─────────────────────────────────────────────────── */
/* Center the board in the space right of the sidebar (it used to hug the
   sidebar, leaving a dead gutter on wide monitors). Children carry the
   max-width so the flex centering works; [hidden] still wins via !important. */
.dash {
  margin-left: var(--sidebar-w); padding: 26px 30px 40px;
  display: flex; flex-direction: column; align-items: center;
}
.dash > * { width: 100%; max-width: 1500px; }

.glass {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; backdrop-filter: blur(10px);
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero, .regime, .kpi-grid, .levels, .tabs, .panel { animation: fadeUp .42s var(--ease) both; }

/* ── States ──────────────────────────────────────────────── */
.state { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 120px 0; color: var(--muted); }
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg { color: var(--down); font-size: 15px; text-align: center; max-width: 420px; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 26px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(139,92,246,0.05));
}
.hero h1 { font-family: var(--font-head); font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.hero h1 span { color: var(--muted); font-weight: 600; font-size: 15px; }
.hero-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.hero-spot { text-align: right; }
.spot-price { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-head); }
.spot-chg { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.up { color: var(--up); } .down { color: var(--down); }

/* ── Regime ──────────────────────────────────────────────── */
.regime { border-radius: 16px; padding: 22px 26px; margin-bottom: 18px; border: 1px solid var(--border); }
.regime.dampening  { background: linear-gradient(120deg, rgba(34,197,94,0.15), rgba(9,9,11,0.2)); }
.regime.amplifying { background: linear-gradient(120deg, rgba(239,68,68,0.15), rgba(9,9,11,0.2)); }
.regime-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.regime-title { font-family: var(--font-head); font-size: 23px; font-weight: 800; margin: 8px 0 6px; }
.regime-desc { color: #cbd5e1; font-size: 14px; line-height: 1.6; max-width: 740px; }
.pulse { width: 11px; height: 11px; border-radius: 50%; animation: pulse 2s infinite; }
.dampening .pulse  { background: var(--up); }
.amplifying .pulse { background: var(--down); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ── Earnings ────────────────────────────────────────────── */
.earnings {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px;
  border-radius: 14px; padding: 14px 22px; margin-bottom: 18px;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.earnings-tag { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.earnings-main { display: flex; align-items: center; gap: 10px; }
.earnings-date { font-family: var(--font-head); font-size: 16px; font-weight: 800; }
.earnings-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor;
}
.earnings-badge.bmo { color: var(--accent-2); }
.earnings-badge.amc { color: var(--accent); }
.earnings-countdown { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: auto; }
/* Within the next 2 weeks — make it stand out */
.earnings.soon {
  border-color: rgba(251,191,36,0.5);
  background: linear-gradient(120deg, rgba(251,191,36,0.14), rgba(9,9,11,0.2));
}
.earnings.soon .earnings-countdown { color: var(--gold); font-weight: 800; }
@media (max-width: 560px) {
  .earnings { flex-direction: column; align-items: flex-start; gap: 6px; }
  .earnings-countdown { margin-left: 0; }
}

/* ── KPI grid ────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 8px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.kpi:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.18); }
.kpi-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 10px; font-size: 16px; }
.kpi-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.kpi-value { font-size: 23px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; font-family: var(--font-head); }
.kpi-foot { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.5; }

/* ── Section heads — film-credit treatment ───────────────── */
.section-head { display: flex; align-items: center; gap: 14px; margin: 28px 0 14px; }
.section-head h3 {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: var(--brand-credit-tracking, 0.32em); text-transform: uppercase;
  color: var(--gold);
}
.section-head .line { flex: 1; height: 1px; background: linear-gradient(to right, rgba(217,164,65,0.35), var(--border) 40%); }

/* ── Key levels ──────────────────────────────────────────── */
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pill {
  padding: 12px 16px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); border-top: 3px solid var(--accent);
}
.pill-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pill-value { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 3px; font-family: var(--font-head); }
.pill-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Notable flows ───────────────────────────────────────── */
.highlights { display: flex; flex-wrap: wrap; gap: 10px; }
.flow {
  flex: 1 1 220px; padding: 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
}
.flow-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.flow-detail { font-size: 14px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ── Compare ─────────────────────────────────────────────── */
.compare { margin-bottom: 18px; }
.cmp-close {
  margin-left: auto; width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font-size: 12px; transition: all .15s var(--ease);
}
.cmp-close:hover { border-color: var(--down); color: var(--down); }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab {
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-family: var(--font-body);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .12s var(--ease);
}
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: var(--accent); }

/* ── Panel / charts ──────────────────────────────────────── */
.panel { min-height: 300px; }
.chart { width: 100%; }
.caption { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 6px 2px 22px; }
.subhead { font-family: var(--font-display); font-style: italic; font-size: 19px; font-weight: 400; margin: 20px 2px 8px; color: #d9d6cf; letter-spacing: 0.01em; }

/* ── Data tables ─────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
table.data th, table.data td { padding: 9px 14px; text-align: right; white-space: nowrap; }
table.data th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; background: var(--surface); position: sticky; top: 0; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data tbody tr { border-top: 1px solid var(--border); }
table.data tbody tr:hover { background: var(--surface); }
.pos { color: var(--up); } .neg { color: var(--down); }

.tbl-toggle {
  margin-top: 10px; padding: 8px 16px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: #c7d2fe;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  transition: border-color .15s var(--ease);
}
.tbl-toggle:hover { border-color: var(--accent); }

/* ── GEX heatmap-by-expiration table ─────────────────────────── */
.gex-hm-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 2px 2px 10px;
}
.gex-hm-legend { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.gex-hm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gex-hm-grad {
  display: inline-block; width: 96px; height: 9px; border-radius: 5px;
  background: linear-gradient(90deg, var(--down), rgba(255,255,255,0.12) 50%, var(--up));
}
.gex-hm-expand {
  padding: 6px 13px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: #c7d2fe;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  transition: border-color .15s var(--ease);
}
.gex-hm-expand:hover { border-color: var(--accent); }

.gex-hm-wrap {
  overflow: auto; max-height: 72vh;
  border: 1px solid var(--border); border-radius: 12px;
}
table.gex-hm {
  border-collapse: separate; border-spacing: 0; width: 100%;
  font-family: var(--brand-font-mono); font-variant-numeric: tabular-nums;
  font-size: 12px;
}
table.gex-hm th, table.gex-hm td {
  padding: 6px 10px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
/* sticky two-line expiry header */
table.gex-hm thead th {
  position: sticky; top: 0; z-index: 2; background: var(--bg-2);
  font-weight: 600; vertical-align: bottom; border-bottom: 1px solid var(--border);
}
.gex-hm-d { display: block; color: var(--text); font-size: 12px; }
.gex-hm-dte { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
/* sticky strike column */
table.gex-hm th.gex-hm-corner, table.gex-hm td.gex-hm-strike {
  position: sticky; left: 0; z-index: 1; text-align: left;
  background: var(--bg-2); border-right: 1px solid var(--border);
}
table.gex-hm th.gex-hm-corner { z-index: 3; }
.gex-hm-strike { color: #cbd5e1; font-weight: 600; }
table.gex-hm td { color: #e5e7eb; }
/* highlight the strike row nearest spot */
table.gex-hm tr.gex-hm-spot td { border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
table.gex-hm tr.gex-hm-spot td:first-child { border-left: 1px solid var(--accent); }
table.gex-hm tr.gex-hm-spot td:last-child { border-right: 1px solid var(--accent); }
table.gex-hm tr.gex-hm-spot .gex-hm-strike { color: var(--accent); }
.gex-hm-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 2px 2px; }
.gex-hm-foot a { color: var(--accent); cursor: pointer; }
.gex-hm-foot a:hover { text-decoration: underline; }

/* segmented control (e.g. strike-table expiry window) */
.seg { display: inline-flex; gap: 4px; margin: 0 0 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 4px; }
.seg button {
  padding: 7px 14px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  background: transparent; color: var(--muted); font-family: var(--font-body);
  font-size: 13px; font-weight: 600; transition: all .15s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }

/* ── Exposure window filter (section-head inline pill group) ── */
.window-filter {
  display: inline-flex; gap: 3px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px;
}
.wf-btn {
  padding: 5px 13px; border-radius: 7px; cursor: pointer; border: 1px solid transparent;
  background: transparent; color: var(--muted); font-family: var(--font-body);
  font-size: 12px; font-weight: 600; transition: all .15s var(--ease); white-space: nowrap;
}
.wf-btn:hover { color: var(--text); }
.wf-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }

/* ── Wheel tab ───────────────────────────────────────────── */
.wheel-ctx {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; margin: 2px 0 16px;
}
.wctx {
  padding: 12px 15px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border);
}
.wctx-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.wctx-value { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 3px; font-family: var(--font-head); }
.wctx-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.wheel-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.wheel-exps { flex-wrap: wrap; }
.wexp-dte { display: block; font-size: 10px; color: inherit; opacity: .75; font-weight: 500; }

.wheel-warn {
  padding: 10px 16px; margin: 0 0 14px; border-radius: 10px; font-size: 13px;
  color: var(--gold); border: 1px solid rgba(251,191,36,0.45);
  background: rgba(251,191,36,0.08); line-height: 1.5;
}

table.wheel-tbl tr.wl-band { background: rgba(99,102,241,0.10); }
table.wheel-tbl tr.wl-band:hover { background: rgba(99,102,241,0.16); }
table.wheel-tbl tr.wl-best { background: rgba(99,102,241,0.20); }
table.wheel-tbl tr.wl-best td:first-child { font-weight: 800; }
.wl-star { color: var(--gold); }
.wl-stale { color: var(--muted); }

/* side chips + wall text badges + spot divider (unified ladder table) */
.wl-side {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
}
.wl-side.call { background: rgba(34,197,94,0.14); color: #4ade80; }
.wl-side.put  { background: rgba(239,68,68,0.14); color: #f87171; }
.wl-wallchip {
  display: inline-block; padding: 1px 8px; border-radius: 999px; margin-left: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; border: 1px solid currentColor;
}
.wl-wallchip.call { color: #60a5fa; }
.wl-wallchip.put  { color: #f87171; }
table.wheel-tbl tr.wl-spotrow td {
  text-align: center; padding: 6px 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
  background: rgba(251,191,36,0.07);
  border-top: 1px dashed rgba(251,191,36,0.5);
  border-bottom: 1px dashed rgba(251,191,36,0.5);
}

/* key-levels table */
table.wheel-lvls td.wl-mech { white-space: normal; min-width: 320px; color: #cbd5e1; }
table.wheel-lvls tr.wl-spotlvl td { color: var(--gold); }
table.wheel-lvls td:nth-child(2) { font-weight: 700; }

/* ── Wheel responsive (mobile-first data priority) ─────────── */
@media (max-width: 700px) {
  /* Hide lower-priority columns (.cm) — essentials remain: strike, side, Δ,
     OTM, mid, annualized, B/E, OI. Full set is still in the export report. */
  table.wheel-tbl th.cm, table.wheel-tbl td.cm { display: none; }
  table.wheel-tbl th, table.wheel-tbl td { padding: 7px 8px; font-size: 12px; }
  table.wheel-lvls th, table.wheel-lvls td { padding: 7px 8px; font-size: 12px; }
  table.wheel-lvls td.wl-mech { min-width: 200px; font-size: 11.5px; }
  .wheel-ctx { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .wctx { padding: 10px 12px; }
  .wctx-value { font-size: 15px; }
  .wexp-dte { font-size: 9px; }
}

/* ── Methodology ─────────────────────────────────────────── */
.methodology {
  margin-top: 28px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); overflow: hidden;
}
.methodology summary {
  cursor: pointer; padding: 14px 18px; font-family: var(--font-head);
  font-weight: 700; font-size: 14px; color: var(--text); list-style: none;
}
.methodology summary::-webkit-details-marker { display: none; }
.methodology summary::before { content: '▸ '; color: var(--accent); }
.methodology[open] summary::before { content: '▾ '; }
.method-body { padding: 0 18px 16px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.method-body b { color: #cbd5e1; }
.method-body ul { margin: 8px 0; padding-left: 18px; }
.method-body li { margin: 3px 0; }

.dash-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; text-align: center; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
  /* Compact top bar instead of a full-height sidebar, so data is visible without
     scrolling past every control. Watchlist becomes a horizontal chip scroller;
     the secondary About box is hidden (disclaimer still lives in the footer). */
  .sidebar {
    position: static; width: auto; flex-direction: column; height: auto; gap: 10px;
    padding: 14px 16px; border-right: none; border-bottom: 1px solid var(--border);
  }
  .watchlist {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .watchlist button { flex: 0 0 auto; padding: 8px 16px; }
  .about-box { display: none; }
  .dash { margin-left: 0; padding: 18px 14px 32px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-spot { text-align: left; }
  /* The exposure-window pill group was the one element overflowing a phone
     viewport (audited at 445px on a 390px screen). Let the section head wrap
     and give the pills a full-width row with evenly stretched buttons. */
  .section-head { flex-wrap: wrap; }
  .window-filter { width: 100%; display: flex; flex-wrap: wrap; }
  #exposure-window .wf-btn { flex: 1; padding: 6px 4px; }
}
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }
