:root {
  --ink: #1a2233;
  --muted: #5b6575;
  --accent: #0b5fff;
  --accent-dark: #0847bd;
  --bg: #ffffff;
  --bg-soft: #f4f6fa;
  --border: #dde3ec;
  --good: #0a7f4f;
  --bad: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.brand span { color: var(--accent); }
.site-header nav a { margin-left: 18px; color: var(--muted); font-size: 0.95rem; }
.site-header nav a:hover { color: var(--accent); }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 1.2em 0 0.4em; }
h2 { font-size: 1.35rem; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.1rem; margin: 1.4em 0 0.4em; }
.updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.2em; }
.answer-first { font-size: 1.08rem; background: var(--bg-soft); border-left: 4px solid var(--accent); padding: 14px 18px; border-radius: 0 8px 8px 0; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 1.4em 0; }
.stat-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat-card .label { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .value { font-size: 1.55rem; font-weight: 700; margin: 2px 0; }
.stat-card .sub { color: var(--muted); font-size: 0.85rem; }
.delta-up { color: var(--bad); }
.delta-down { color: var(--good); }

table.data { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: 0.95rem; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { background: var(--bg-soft); position: sticky; top: 0; cursor: pointer; white-space: nowrap; }
table.data thead th:hover { color: var(--accent); }
table.data tbody tr:hover { background: var(--bg-soft); }
table.data .rank { color: var(--muted); width: 2.2em; }

.estimator { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin: 1.4em 0; }
.estimator label { font-weight: 600; margin-right: 8px; }
.estimator input, .estimator select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; }
.estimator .result { font-size: 1.2rem; font-weight: 700; margin-top: 10px; }
.worked-example { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }

.chart-box { margin: 1.2em 0; }
details.fallback { margin: 0.6em 0 1.4em; }
details.fallback summary { color: var(--muted); cursor: pointer; font-size: 0.9rem; }

.src { color: var(--muted); font-size: 0.85rem; }
.note { background: #fff8e6; border: 1px solid #f0dfa8; border-radius: 8px; padding: 10px 14px; font-size: 0.92rem; }

.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin: 1em 0 2em; }
.state-grid a { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.92rem; }
.state-grid a:hover { background: var(--bg-soft); text-decoration: none; }

.breadcrumbs { color: var(--muted); font-size: 0.88rem; margin-top: 1em; }
.site-footer { border-top: 1px solid var(--border); margin-top: 3em; padding: 1.4em 0 2em; color: var(--muted); font-size: 0.88rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
