/* Shared by the leaderboard, admin, and docs pages. */
:root { color-scheme: dark; --surface: #0d1420; --panel: #151e2d; --line: #2a3648; --ink: #eef3fb; --ink2: #b5c1d3; --ink3: #8693a7; --series: #3987e5; --accent: #b7f34a; --link: #6fc3ee; --danger: #f08a7c; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--ink); }
a { color: var(--link); }
[hidden] { display: none !important; }
.site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.site-head .name { font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 22px 20px 60px; }
h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: -0.01em; }
.sub { margin: 0 0 22px; color: var(--ink2); line-height: 1.5; }
h2 { font-size: 17px; margin: 30px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 8px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tile dt { font-size: 12.5px; color: var(--ink2); }
.tile dd { margin: 4px 0 0; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
thead th { color: var(--ink2); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.desc { color: var(--ink2); min-width: 200px; overflow-wrap: anywhere; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.seg button { font: inherit; font-size: 13px; color: var(--ink2); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
.empty, .msg { color: var(--ink2); padding: 16px; }
.button { display: inline-block; font: inherit; font-weight: 700; color: #101a06; background: var(--accent); border: 0; border-radius: 8px; padding: 9px 14px; text-decoration: none; cursor: pointer; }
.danger { font: inherit; font-size: 13px; color: var(--danger); background: transparent; border: 1px solid var(--danger); border-radius: 7px; padding: 3px 9px; cursor: pointer; }
.quiet { font: inherit; font-size: 13px; color: var(--ink2); background: transparent; border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; cursor: pointer; }
.revoked { color: var(--danger); font-size: 12.5px; }

/* Charts */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.chart { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; position: relative; min-width: 0; }
.chart h3 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--series); }
.chart .band { fill: transparent; }
.chart .band:hover { fill: rgba(255, 255, 255, 0.06); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--ink3); font-size: 11px; }
.chart .tip { position: absolute; pointer-events: none; background: #05090f; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; padding: 4px 8px; white-space: nowrap; transform: translate(-50%, -110%); z-index: 2; }
.chart details { margin-top: 8px; font-size: 12.5px; color: var(--ink2); }
.chart details .table-wrap { max-height: 180px; overflow-y: auto; margin-top: 6px; }
.hbars { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 13px; }
.hbars .track { height: 12px; }
.hbars .fill { display: block; height: 100%; min-width: 2px; background: var(--series); border-radius: 0 4px 4px 0; }
.hbars .v { font-variant-numeric: tabular-nums; color: var(--ink2); }

/* Docs */
.doc { max-width: 800px; line-height: 1.6; }
.doc h1 { margin-top: 0; }
.doc h2 { margin-top: 34px; font-size: 21px; border-top: 1px solid var(--line); padding-top: 20px; }
.doc h3 { margin-top: 22px; font-size: 16px; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: var(--panel); border-radius: 4px; padding: 1px 4px; }
.doc pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; }
.doc pre code { background: none; padding: 0; font-size: 13px; }
.doc table { margin: 10px 0; }
.doc blockquote { margin: 12px 0; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--ink2); }
