/* Stat tables at #/table: two sortable tables with a totals / per-game switch. */
.stats-table-page { max-width: 1180px; margin: 0 auto; padding: 8px 0 36px; }
.stats-table-intro { padding: 18px 0 6px; }
.stats-table-intro h1 { margin: 6px 0 8px; font: 800 clamp(2.4rem, 6vw, 4rem)/.95 var(--display); letter-spacing: -.03em; text-transform: uppercase; }
.stats-table-intro p { margin: 0; }
.stats-table-section { margin: 28px 0 0; }
.stats-table-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; padding: 0 0 12px; border-bottom: 1px solid var(--line-2); }
.stats-table-head h2 { margin: 0 0 4px; font: 800 1.5rem/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.stats-table-head p { max-width: 72ch; margin: 0; font-size: .85rem; line-height: 1.4; }
.stats-table-modes.player-position-buttons { grid-template-columns: repeat(2, minmax(104px, 1fr)); }
.stats-table-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.stats-table-positions.player-position-buttons { grid-template-columns: repeat(4, minmax(72px, auto)); }
.stats-table-minutes { flex: 1 1 240px; }
.stats-table-minutes input { flex: 1 1 120px; width: auto; max-width: 260px; }
.stats-table-count { margin-left: auto; font-size: .78rem; white-space: nowrap; }
.stats-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stats-table { min-width: 680px; margin: 0; }
.stats-table th, .stats-table td { padding: 10px 12px; }
.stats-table thead th { white-space: nowrap; }
.stats-table thead th button { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.stats-table thead th button:hover { color: var(--text); }
.stats-table thead th button:focus-visible { outline: 2px solid var(--pi-blue, var(--green-bright)); outline-offset: 3px; }
.stats-table thead th[aria-sort="ascending"] button, .stats-table thead th[aria-sort="descending"] button { color: var(--green-bright); }
.stats-table thead th[aria-sort="descending"] button::after { content: "▼"; font-size: .6em; }
.stats-table thead th[aria-sort="ascending"] button::after { content: "▲"; font-size: .6em; }
.stats-table tbody td { font-variant-numeric: tabular-nums; }
.stats-table td.stats-table-sorted { color: var(--green-bright); font-weight: 700; }
.stats-table .stats-table-name { position: sticky; left: 0; z-index: 1; min-width: 210px; background: var(--bg, #0b100e); }
.stats-table thead .stats-table-name { text-align: left; }
.stats-table .stats-table-name a { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; align-items: center; color: inherit; text-decoration: none; }
.stats-table .stats-table-name a:hover strong { color: var(--green-bright); }
.stats-table-rank { grid-row: 1 / span 2; color: var(--text-3); font: 700 .78rem/1 var(--display); letter-spacing: .04em; }
.stats-table .stats-table-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.stats-table .stats-table-name small { color: var(--text-3); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
.stats-table td[data-context="true"] { color: var(--text-3); }
.stats-table tr.stats-table-limited td, .stats-table tr.stats-table-limited td strong { color: var(--text-3); }
@media (max-width: 640px) {
  .stats-table-page { padding-top: 0; }
  .stats-table th, .stats-table td { padding: 9px 8px; }
  .stats-table .stats-table-name { min-width: 160px; }
  .stats-table-modes.player-position-buttons { width: 100%; }
  .stats-table-positions.player-position-buttons { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-table-count { margin-left: 0; }
}
