:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --fg: #111;
  --muted: #666;
  --border: #e2e2e2;
  --accent: #c0392b;
  --good: #27ae60;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111; --fg: #eee; --muted: #999; --border: #2a2a2a; }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  padding: 2rem 1rem;
  max-width: 1100px;
  margin-inline: auto;
}
header h1 { margin: 0 0 .25rem; font-size: 1.75rem; }
header .subtitle { color: var(--muted); margin-top: 0; }
header a { color: var(--muted); text-decoration: none; }
header a:hover { color: var(--fg); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}
.filters label {
  display: flex;
  flex-direction: column;
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.filters select {
  margin-top: .25rem;
  padding: .4rem .6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--fg);
  font-size: .9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
th, td {
  text-align: left;
  padding: .65rem .5rem;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
tbody tr:hover { background: rgba(127,127,127,.06); }
td.empty { text-align: center; color: var(--muted); padding: 2rem; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pct-down { color: var(--accent); font-weight: 600; }
.pct-up   { color: var(--good); font-weight: 600; }
.badge {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .4rem;
  border-radius: 3px;
  background: rgba(127,127,127,.15);
}
a.row-link { color: inherit; text-decoration: none; }
a.row-link:hover { text-decoration: underline; }

#chart {
  width: 100%;
  height: 240px;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  background: transparent;
}
#chart svg { width: 100%; height: 100%; }
