:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5d6573;
  --border: #e2e5ea;
  --accent: #3b5bdb;
  --up: #1a7f4b;
  --down: #c0352b;
  --high-bg: #fff1e6;
  --high-text: #a34700;
  --low-bg: #eef1f5;
  --low-text: #4a5261;
  --row-high: #fffaf5;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --text: #e8eaee;
    --muted: #9aa3b2;
    --border: #2a2f38;
    --accent: #8ca5ff;
    --up: #4cc38a;
    --down: #ff7a6e;
    --high-bg: #3a2414;
    --high-text: #ffb27a;
    --low-bg: #232831;
    --low-text: #b4bcc9;
    --row-high: #1d1a17;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; flex: none; }
.brand-name span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { color: var(--muted); font-weight: 500; }
nav a[aria-current="page"] { color: var(--text); }

main { padding-top: 28px; padding-bottom: 48px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.015em; }
h2 { font-size: 19px; margin: 0; }
.lede { color: var(--muted); font-size: 16px; max-width: 70ch; margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }

.hero { padding: 12px 0 8px; }
.hero h1 { font-size: 32px; }
section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }

.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.is-high td { background: var(--row-high); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.why { color: var(--muted); font-size: 13px; min-width: 220px; }
.ticker { display: inline-block; font-weight: 700; font-size: 12px; letter-spacing: 0.02em; padding: 1px 6px; border-radius: 4px; background: var(--low-bg); color: var(--text); }
.up { color: var(--up); font-weight: 600; }
.vol { font-weight: 600; }
.vol-low { color: var(--muted); }
.vol-moderate { color: var(--text); }
.vol-high { color: var(--high-text); }
.vol-very_high { color: var(--down); }
.down { color: var(--down); font-weight: 600; }

.badge { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge.high { background: var(--high-bg); color: var(--high-text); }
.badge.low { background: var(--low-bg); color: var(--low-text); }
.badge.pending { border: 1px dashed var(--border); color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 16px; }
.filters fieldset { display: flex; flex-wrap: wrap; gap: 4px 14px; border: 0; padding: 0; margin: 0; }
.filters legend { float: left; font-weight: 600; margin-right: 10px; padding: 0; }
.filters label { cursor: pointer; }
.filters select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 3px 6px; margin-left: 6px; }

.session { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.session.s-pre_market { color: var(--accent); }
.session.s-after_hours, .session.s-non_trading_day { color: var(--high-text); }

.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: 8px; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 28px; margin-bottom: 8px; }
.prose li { margin-bottom: 8px; }
.button { display: inline-block; padding: 10px 18px; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 600; }
.button:hover { text-decoration: none; opacity: 0.9; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0 28px; color: var(--muted); font-size: 13px; }
