:root {
  --bg: #fbfbf9; --fg: #1c1d1f; --muted: #6b6f76; --line: #e4e4e0; --card: #ffffff;
  --accent: #2456d6; --pos: #13795b; --neg: #c2410c;
  --robust: #13795b; --moderate: #9a6a00;
  --me: #2456d6; --other: #d97706;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214; --fg: #e8e8e6; --muted: #9a9ea6; --line: #2a2c30; --card: #17181b;
    --accent: #7aa2ff; --pos: #4ade9b; --neg: #fb923c;
    --robust: #4ade9b; --moderate: #facc15;
    --me: #7aa2ff; --other: #fbbf24;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main, footer { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
header.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  max-width: 1080px; margin: 0 auto; padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--fg); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 6px; display: block; }
.brand span { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 14px; }
nav { display: flex; gap: 16px; flex-wrap: wrap; }
nav a { color: var(--fg); }
.search { margin-left: auto; }
.search input, .filters input, .filters select {
  font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--fg);
}
.search input { width: 120px; text-transform: uppercase; }
h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 28px 0 8px; }
h1 .name { font-size: 18px; font-weight: 400; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
h2 { font-size: 19px; margin: 32px 0 4px; letter-spacing: -0.01em; }
section { margin-bottom: 8px; }
.lede { font-size: 17px; max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; min-width: 130px; }
.stats dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stats dd { margin: 2px 0 0; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats small { font-size: 13px; font-weight: 400; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin-top: 10px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
th[data-k] { cursor: pointer; user-select: none; }
th[data-k]:hover { color: var(--fg); }
.r { text-align: right; }
.num.pos { color: var(--pos); } .num.neg { color: var(--neg); }
.sym { font-weight: 600; }
.tier { font-size: 12px; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; text-transform: lowercase; }
.tier-robust { color: var(--robust); } .tier-moderate { color: var(--moderate); }
.badge { font-size: 11px; background: var(--accent); color: var(--bg); border-radius: 4px; padding: 0 5px; vertical-align: 1px; }
.empty { color: var(--muted); text-align: center; padding: 18px; white-space: normal; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 16px 0 4px; }
.filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
.filters input[name=sym] { width: 110px; text-transform: uppercase; }
.filters input[type=number] { width: 80px; }
button { font: inherit; padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); cursor: pointer; }
.chart { margin: 10px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .line { fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.chart .me { stroke: var(--me); } .chart .other { stroke: var(--other); }
.chart .base { stroke: var(--line); stroke-dasharray: 4 4; }
.chart figcaption { font-size: 13px; margin-top: 6px; }
.key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin: 0 4px 0 8px; }
.key.me { background: var(--me); } .key.other { background: var(--other); }
.prose { max-width: 720px; }
.prose li { margin: 4px 0; }
details { margin: 8px 0; } summary { cursor: pointer; color: var(--muted); }
footer { margin-top: 48px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; }
footer p { margin: 4px 0; }
.note { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 2px 14px; margin-top: 16px; }
.groups { padding-left: 18px; } .groups li { margin: 4px 0; }
