/* Public leaderboards page (leaderboards.catnipgames.net).
 * Derived from infra/landing/resources/resources.css so the site stays visually consistent;
 * kept self-contained (no cross-page @import, no cross-origin stylesheet — this page is served
 * from its own vhost alongside the board JSON it reads).
 *
 * Committed to a dark surface, deliberately: every sibling page on this site is dark. */
:root{
  --bg:#0b0e14; --panel:#161d29; --panel2:#1c2533; --line:#2a3445;
  --text:#e7ecf3; --muted:#9aa7bd; --gold:#d9b25a; --gold2:#f0cf85; --accent:#5aa9e6;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
html,body{margin:0;min-height:100%}
html{background:#0a0c11}
body{
  font-family:"Segoe UI",Inter,system-ui,Arial,sans-serif; color:var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, #1a2840 0%, rgba(26,40,64,0) 60%),
    linear-gradient(180deg,#0b0e14 0%, #0a0c11 100%);
  background-attachment:fixed; min-height:100%;
}

header{
  display:flex; align-items:center; gap:16px; padding:20px 24px;
  border-bottom:1px solid var(--line); flex-wrap:wrap;
}
.crest{
  width:46px;height:46px;border-radius:50%;flex:none;
  background:radial-gradient(circle at 50% 35%, var(--gold2), var(--gold) 60%, #8a6d2c 100%);
  display:flex;align-items:center;justify-content:center;font-weight:700;color:#2a2208;font-size:18px;
}
.titles{flex:1 1 auto;min-width:0}
h1{margin:0;font-size:22px;letter-spacing:.5px}
h1 .accent{color:var(--gold2)}
.sub{margin:2px 0 0;color:var(--muted);font-size:13px;word-break:break-word}
.back{color:var(--accent);text-decoration:none;font-size:13px;white-space:nowrap}
.back:hover{text-decoration:underline}

main{max-width:1100px;margin:0 auto;padding:18px 16px 40px}
footer{text-align:center;color:var(--muted);font-size:12px;padding:18px;border-top:1px solid var(--line)}

.intro{color:var(--muted);max-width:78ch;line-height:1.6;font-size:14px;margin:4px 2px 18px}
.meta{color:var(--muted);font-size:13px;margin:6px 2px 14px}
.err{color:#e5534b;font-size:13px;margin:10px 2px}

.filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.filters select,.filters input[type=search]{
  background:var(--panel);color:var(--text);border:1px solid var(--line);
  border-radius:8px;padding:7px 10px;font-size:13px;font-family:inherit;
}
.filters input[type=search]{flex:1 1 180px;max-width:260px}
.filters select:focus,.filters input:focus{outline:none;border-color:var(--accent)}
.filters .count{color:var(--muted);font-size:12.5px}

.tablebox{
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border:1px solid var(--line);border-radius:10px;padding:6px 14px 10px;overflow-x:auto;
}
table.msgs{width:100%;border-collapse:collapse;font-size:13.5px}
table.msgs th{
  text-align:left;color:var(--muted);font-size:12.5px;font-weight:600;
  padding:7px 10px;border-bottom:1px solid var(--line);white-space:nowrap;cursor:pointer;user-select:none;
}
table.msgs th:hover{color:var(--text)}
table.msgs th[aria-sort]{color:var(--gold2)}
table.msgs td{padding:7px 10px;border-bottom:1px solid var(--line);vertical-align:top}
table.msgs tr:last-child td{border-bottom:none}
table.msgs th.num-c,table.msgs td.num-c{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
table.msgs tbody tr:hover td{background:rgba(255,255,255,.025)}
td.rank-c{color:var(--muted);font-variant-numeric:tabular-nums;text-align:right;width:52px}
.empty{color:var(--muted);font-size:13px;padding:14px 10px}
