:root {
  color-scheme: light dark;
  --bg: light-dark(#f9f9f7, #0d0d0d);
  --card: light-dark(#fcfcfb, #1a1a19);
  --ink: light-dark(#0b0b0b, #fff);
  --muted: light-dark(#52514e, #c3c2b7);
  --line: light-dark(#e1e0d9, #2c2c2a);
  --bar: light-dark(#2a78d6, #3987e5);
  --track: light-dark(#e8eef6, #24303f);
  --link: light-dark(#1c5cab, #86b6ef);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, sans-serif; }
header, main { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
header { padding-top: 32px; }
h1 { margin: 0; font-size: 1.9rem; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; margin: 40px 0 8px; }
header p, #count, .small { color: var(--muted); }
header p { margin: 4px 0 20px; }
section p, section ul { max-width: 75ch; }
section ul { padding-left: 1.2em; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--bar); outline-offset: 2px; }

/* Filters */
form { display: flex; flex-wrap: wrap; gap: 12px; }
form label { display: grid; gap: 3px; font-size: .8rem; color: var(--muted); }
form .grow { flex: 1 1 200px; }
input, select { font: inherit; font-size: .95rem; padding: 8px 10px; min-width: 0; max-width: 100%; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
#org { width: 200px; }
#count { margin: 14px 0 6px; font-size: .85rem; }

/* Table */
.scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
th.left, td.left { text-align: left; }
thead th { font-size: .8rem; font-weight: 600; color: var(--muted); }
thead button { all: unset; cursor: pointer; }
thead button:focus-visible { outline: 2px solid var(--bar); outline-offset: 2px; }
[aria-sort=descending] button::after { content: " ↓"; }
[aria-sort=ascending] button::after { content: " ↑"; }
tr.model { cursor: pointer; }
tr.model:hover { background: color-mix(in srgb, var(--track) 45%, transparent); }
td small { display: block; font-size: .75rem; color: var(--muted); }
.name { all: unset; cursor: pointer; font-weight: 600; }
.name:focus-visible { outline: 2px solid var(--bar); outline-offset: 2px; }
.name::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--muted); }
.name[aria-expanded=true]::before { content: "▾"; }
.model td.model-name { white-space: normal; min-width: 190px; }
.model-name small { padding-left: 1.4em; }
.rank { font-weight: 600; }
.tag { font-size: .7rem; font-weight: 500; padding: 1px 6px; margin-left: 6px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.bar { display: block; height: 4px; margin-top: 4px; min-width: 56px; background: var(--track); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--bar); border-radius: 0 2px 2px 0; }
.main-score { font-weight: 700; }
.none { color: var(--muted); }

/* Details */
.details > td { padding: 14px 20px 20px; text-align: left; white-space: normal; background: var(--bg); }
.groups { columns: 270px; column-gap: 28px; }
.groups div { break-inside: avoid; padding-bottom: 14px; }
.groups h3 { font-size: .85rem; margin: 0 0 4px; }
.groups dl { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 12px; margin: 0; font-size: .85rem; }
.groups dt a { color: inherit; text-decoration-color: var(--line); }
.groups dd { margin: 0; text-align: right; }
.groups dd + dd { color: var(--muted); }
.status { font-size: .85rem; color: var(--muted); }
@media (max-width: 700px) {
  header, main { padding-left: 12px; padding-right: 12px; }
  th, td { padding: 8px 7px; }
  .bar { min-width: 48px; }
  .model td.model-name { min-width: 140px; }
  .details > td { padding: 12px; }
  .groups { max-width: calc(100vw - 50px); }
}
