:root { --bg:#f4f6f9; --card:#fff; --text:#1d2733; --muted:#66727f; --accent:#1f6fd1; --line:#e2e6ec; --warn:#b54708; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#12161c; --card:#1b2129; --text:#e6eaef; --muted:#93a0ad; --accent:#5ea2ff; --line:#2a323d; --warn:#f5a25d; }
}
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--text); }
header.top { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; padding:14px 16px; background:var(--card); border-bottom:1px solid var(--line); }
header h1 { font-size:1.2rem; margin:0; }
nav a { color:var(--muted); text-decoration:none; margin-left:14px; font-weight:500; }
nav a.on, nav a:hover { color:var(--accent); }
main { max-width:1100px; margin:0 auto; padding:16px; }
.upd { color:var(--muted); margin:0 0 12px; font-size:.9rem; }
.upd.warn { color:var(--warn); }
.cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:12px; margin-bottom:20px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px; }
.card h2 { font-size:.8rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:0 0 6px; font-weight:600; }
.card .val { font-size:2rem; font-weight:600; }
.card.big .val { font-size:2.6rem; }
.card .val small { font-size:.9rem; color:var(--muted); margin-left:3px; font-weight:400; }
.card .sub { color:var(--muted); font-size:.85rem; margin-top:4px; }
.tabs, .years { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.tabs button, .years a { border:1px solid var(--line); background:var(--card); color:var(--text); padding:6px 12px; border-radius:16px; cursor:pointer; text-decoration:none; font-size:.9rem; }
.tabs button.on, .years a.on { background:var(--accent); border-color:var(--accent); color:#fff; }
.chart { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:12px; margin-bottom:12px; height:280px; display:flex; flex-direction:column; }
.chart h3 { margin:0 0 6px; font-size:.9rem; color:var(--muted); font-weight:600; }
.chart canvas { flex:1; min-height:0; }
.tablewrap { overflow-x:auto; background:var(--card); border:1px solid var(--line); border-radius:10px; }
table { border-collapse:collapse; width:100%; font-size:.9rem; }
th, td { padding:8px 10px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap; }
th:first-child, td:first-child { text-align:left; }
tfoot td { font-weight:600; }
section > h2 { font-size:1.1rem; }
footer { text-align:center; color:var(--muted); font-size:.8rem; padding:20px; }
