:root {
  --bg: #eef2f3; --card: #fff; --ink: #172227; --muted: #5a676d; --line: #dde3e5;
  --river: #123b4a; --river-2: #1d5466; --salmon: #e5664a; --salmon-dark: #b8442b; --salmon-soft: #fdeee9;
  --up: #1d7a46; --down: #b3261e; --warn: #fff4c2; --warn-line: #e0b400;
  --shadow: 0 1px 2px rgba(18,34,40,.06), 0 4px 14px rgba(18,34,40,.07); --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; overflow-x: hidden; }
a { color: var(--salmon-dark); }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

.top { background: var(--river); color: #fff; padding: 12px 0; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; }
.brand { color: #fff; text-decoration: none; font-weight: 600; font-size: 17px; }
.brand b { color: #ffab95; }
.top nav { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; }
.top nav a { color: #d3e1e6; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { color: #fff; border-bottom-color: var(--salmon); }

h1 { font-size: clamp(27px, 5vw, 40px); line-height: 1.1; letter-spacing: -.02em; margin: 26px 0 8px; }
.lede { font-size: 17px; color: var(--muted); margin: 0 0 18px; max-width: 720px; }
h2 { font-size: clamp(19px, 3vw, 23px); margin: 0 0 12px; letter-spacing: -.01em; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.tool { border-top: 4px solid var(--salmon); }

.banner { padding: 10px 14px; border-radius: 9px; background: #e5eef1; border-left: 4px solid var(--river-2); margin: 0 0 16px; font-size: 15px; }
.banner.warn { background: var(--warn); border-left-color: var(--warn-line); }
.warn-t { color: #8a6a00; font-weight: 600; }

.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.data caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 6px; }
.data th, .data td { text-align: left; padding: 8px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data thead th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 650; white-space: nowrap; }
.data td.n { text-align: right; white-space: nowrap; }
.data th small, .data td small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.data td.n small { display: block; }
.data tr.sub th { padding-left: 22px; font-weight: 500; }
.data tr.avg { background: #f4f7f8; }
.data .pct { display: block; font-size: 12px; font-weight: 650; }
.data.home td.n b { font-size: 16px; }
.data.sortable thead th { cursor: pointer; }
.data.sortable thead th[aria-sort="descending"]::after { content: " ▼"; }
.data.sortable thead th[aria-sort="ascending"]::after { content: " ▲"; }
.up { color: var(--up); font-weight: 650; }
.down { color: var(--down); font-weight: 650; }

.verdicts { margin: 0; padding-left: 18px; }
.verdicts li { margin-bottom: 8px; }

.controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.controls select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1.5px solid #c9d2d5; margin-left: 4px; background: #fff; }
.controls .chk { display: flex; align-items: center; gap: 6px; }
.chart { width: 100%; height: auto; display: block; }
.chart .g { stroke: #e6ebed; stroke-width: 1; }
.chart .ax { font-size: 14px; fill: var(--muted); }
.chart .band { fill: rgba(29,84,102,.13); stroke: none; }
.chart .avg { fill: none; stroke: var(--river-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .last { fill: none; stroke: #8c979c; stroke-width: 2; }
.chart .cur { fill: none; stroke: var(--salmon); stroke-width: 3; stroke-linejoin: round; }
.chart .yr { fill: none; stroke: rgba(18,59,74,.35); stroke-width: 1; }
.legend { font-size: 13px; color: var(--muted); margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.legend .k { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin-right: 4px; border-top: 3px solid var(--salmon); }
.legend .k.last { border-top: 2px solid #8c979c; }
.legend .k.avg { border-top: 2px dashed var(--river-2); }
.legend .k.band { height: 10px; border: 0; background: rgba(29,84,102,.18); }
.legend .k.yr { border-top: 1px solid rgba(18,59,74,.5); }

.note, .source { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.source { margin: 0 0 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 8px 0 2px; color: #2e3a3f; }
.links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 16px; }
.gear { background: var(--salmon-soft); }
.prose ul { padding-left: 20px; }
footer { font-size: 13px; color: var(--muted); padding: 10px 16px 40px; }
footer a { color: var(--muted); }
@media (max-width: 560px) {
  .panel { padding: 14px 12px; }
  .data { font-size: 14px; }
  .data th, .data td { padding: 7px 6px; }
  .top nav { font-size: 13px; }
}
