/* TrackingBench results tables. What both looks share; TABLE_STYLE in leaderboard-table.js picks one of the two below.
   :where() keeps the look's selector out of specificity, so neither look outranks the shared rules by being scoped. */
.leaderboard-table { max-width: 100%; overflow-x: auto; margin-bottom: 24px; font-size: 14px;
  /* Edge shadows show only while more columns are out of view: the "local" layers cover them at each end of the scroll. */
  background:
    linear-gradient(to right, var(--paper) 30%, transparent) left center / 32px 100% no-repeat local,
    linear-gradient(to left, var(--paper) 30%, transparent) right center / 32px 100% no-repeat local,
    linear-gradient(to right, var(--shadow), transparent) left center / 12px 100% no-repeat scroll,
    linear-gradient(to left, var(--shadow), transparent) right center / 12px 100% no-repeat scroll; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th, .data-table td { text-align: left; vertical-align: middle; }
.data-table thead th { white-space: normal; vertical-align: bottom; }
.data-table th button { padding: 0; border: 0; background: none; font: inherit; color: inherit; }
.data-table th button:hover { color: var(--ink); }
.data-table th[aria-sort] button { color: var(--ink); }
.data-table th[aria-sort="ascending"] button::after { content: "\00a0▴"; }
.data-table th[aria-sort="descending"] button::after { content: "\00a0▾"; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr:target td { background: var(--place-2); }
.data-table .system { min-width: 230px; max-width: 330px; white-space: normal; font-weight: 500; }
/* The author's chart color, so names stay in plain ink. */
.data-table .system::before { content: ""; display: inline-block; background: var(--author-color); }
.system small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; line-height: 1.45; margin-top: 2px; }
.status { color: var(--ink-3); }
.status[data-status="verified"] { color: var(--verified); }
.status[data-status="community"] { color: var(--community); }
:where([data-table-style="boxed"]) [data-key-for="ruled"], :where([data-table-style="ruled"]) [data-key-for="boxed"] { display: none; }

/* Boxed: bordered cells, monospace headers, the top three shaded. */
:where([data-table-style="boxed"]) .data-table tbody tr:hover td { background: var(--tint); }
:where([data-table-style="boxed"]) .data-table th, :where([data-table-style="boxed"]) .data-table td { padding: 9px 10px; border: 1px solid var(--rule); }
:where([data-table-style="boxed"]) .data-table thead th { font: 600 12px/1.35 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
:where([data-table-style="boxed"]) .data-table th[aria-sort] button::after { color: var(--blue); }
:where([data-table-style="boxed"]) .data-table .system::before { width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
:where([data-table-style="boxed"]) .data-table td[data-place="1"], :where([data-table-style="boxed"]) .table-key [data-place="1"] { background: var(--place-1); font-weight: 600; color: var(--ink); }
:where([data-table-style="boxed"]) .data-table td[data-place="2"], :where([data-table-style="boxed"]) .table-key [data-place="2"] { background: var(--place-2); }
:where([data-table-style="boxed"]) .data-table td[data-place="3"], :where([data-table-style="boxed"]) .table-key [data-place="3"] { background: var(--place-3); }
:where([data-table-style="boxed"]) .data-table .group-band th { background: var(--tint); font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* Ruled, adapted from FrontierCS's results table (MIT; see assets/vendor/frontier-cs/LICENSE): rules between rows only, a square
   for the author, bold for the best, a faint dash where nothing was measured. */
:where([data-table-style="ruled"]) .data-table th, :where([data-table-style="ruled"]) .data-table td { padding: 11px 7px; border-bottom: 1px solid var(--rule); color: var(--ink); }
:where([data-table-style="ruled"]) .data-table tr > :first-child { padding-left: 0; }
:where([data-table-style="ruled"]) .data-table tr > :last-child { padding-right: 0; }
:where([data-table-style="ruled"]) .data-table thead th { padding-block: 10px; font: 600 13px/1.25 var(--font-sans); color: var(--ink-2); border-bottom-color: var(--ink-2); }
:where([data-table-style="ruled"]) .data-table .system { font-weight: 400; }
:where([data-table-style="ruled"]) .data-table .system::before { width: 10px; height: 10px; margin-right: 9px; vertical-align: 0; }
:where([data-table-style="ruled"]) .data-table td[data-place="1"] { font-weight: 600; }
:where([data-table-style="ruled"]) .data-table td.missing { color: var(--faint); }
:where([data-table-style="ruled"]) .data-table .group-band th { padding-top: 24px; font-size: 14px; font-weight: 600; border-bottom-color: var(--ink-2); }
:where([data-table-style="ruled"]) .data-table tbody:first-of-type .group-band th { padding-top: 14px; }
