:root {
    --bg: #f7f7f8;
    --panel: #ffffff;
    --text: #1b1b1f;
    --muted: #6b6b76;
    --line: #e3e3e8;
    --accent: #3b5bdb;
    --accent-soft: #e7ecfd;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16161a;
        --panel: #1e1e24;
        --text: #eceaf0;
        --muted: #9b9ba6;
        --line: #2e2e38;
        --accent: #8da2fb;
        --accent-soft: #232a45;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header.site {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.brand { font-weight: 650; font-size: 17px; text-decoration: none; color: var(--text); }
.brand span { color: var(--muted); font-weight: 400; }

header.site nav { display: flex; gap: 4px; flex-wrap: wrap; }

header.site nav a {
    padding: 6px 12px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
}

header.site nav a:hover { background: var(--bg); color: var(--text); }
header.site nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 550; }

main { max-width: 900px; margin: 0 auto; padding: 32px 16px 56px; }

h1 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 36px 0 12px; }
p.lede { color: var(--muted); margin: 0 0 28px; }

.counter {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 28px;
}

.counter .n {
    display: block;
    font-size: 46px;
    font-weight: 680;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    line-height: 1.1;
}

.counter .label { color: var(--muted); font-size: 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

.tile {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
}

.tile .n {
    display: block;
    font-size: 27px;
    font-weight: 640;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.tile .label { color: var(--muted); font-size: 13px; }

.chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 130px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
}

.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.chart .bar i { display: block; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.chart .bar u { text-decoration: none; color: var(--muted); font-size: 10px; text-align: center; padding-top: 5px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 550; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td .trunc { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

.empty { padding: 20px; color: var(--muted); }

.note {
    background: var(--accent-soft);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13.5px;
    color: var(--text);
    margin: 28px 0 0;
}

code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }

footer.site {
    border-top: 1px solid var(--line);
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    background: var(--panel);
}
