:root {
  color-scheme: dark;
  --page: #101113;
  --panel: #17191c;
  --panel-raised: #202327;
  --line: #303438;
  --red: #e52820;
  --red-soft: #3c1c1b;
  --text: #f0f1f2;
  --muted: #9da3aa;
  --green: #8dbda4;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--text); }
button, select { font: inherit; }
.page-shell { width: min(1480px, 100%); margin: 0 auto; padding: 0 44px 30px; }
.topbar { height: 94px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 24px; }
.brand { display: flex; align-items: center; gap: 24px; min-width: 0; }
.brand-wordmark { display: block; width: clamp(190px, 25vw, 330px); height: 68px; object-fit: contain; object-position: left center; }
.brand-crest { display: block; width: 58px; height: 58px; object-fit: contain; }
.live-status { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.live-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #8dbda419; }
.live-dot.offline { background: var(--red); box-shadow: 0 0 0 4px #e5282019; }
.intro { min-height: 162px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0 18px; }
.eyebrow { margin: 0 0 9px; color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(27px, 4vw, 42px); line-height: 1.1; font-weight: 500; letter-spacing: -.035em; }
.updated { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.result-count { display: flex; align-items: center; gap: 13px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.count-number { color: var(--red); font: 500 28px/1 Consolas, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; }
.count-label { color: var(--muted); font-size: 12px; line-height: 1.4; }
.results-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 16px 50px #00000018; }
.panel-heading { min-height: 82px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin: 0; font-size: 18px; font-weight: 500; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.filter-wrap select { min-width: 180px; padding: 10px 36px 10px 12px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; outline: none; background: var(--panel-raised); }
.filter-wrap select:focus-visible { border-color: var(--red); box-shadow: 0 0 0 3px #e5282026; }
.table-scroll { width: 100%; overflow-x: auto; scrollbar-color: #45494e var(--panel); }
.results-table { width: 100%; min-width: 1050px; border-collapse: collapse; text-align: left; }
.results-table thead { background: #1c1e21; }
.results-table th { height: 43px; padding: 0 12px; color: var(--red); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 650; letter-spacing: .035em; white-space: nowrap; }
.results-table td { height: 52px; padding: 8px 12px; border-bottom: 1px solid #2a2d30; color: var(--muted); font-size: 13px; white-space: nowrap; }
.results-table tbody tr:last-child td { border-bottom: 0; }
.results-table tbody tr:hover { background: #ffffff06; }
.results-table td.person { color: var(--text); font-weight: 550; }
.results-table td.rank { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.results-table td.number, .results-table th.number { text-align: right; font-variant-numeric: tabular-nums; }
.results-table td.result { color: var(--text); font: 17px Consolas, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; }
.results-table td.empty-state { height: 115px; text-align: center; color: var(--muted); }
.splits-button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-raised); color: var(--muted); cursor: pointer; font-size: 11px; }
.splits-button:hover, .splits-button[aria-expanded="true"] { border-color: #75403d; color: var(--text); }
.split-detail td { height: auto; padding: 0 14px 14px; background: #141517; white-space: normal; }
.split-list { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 5px; }
.split-chip { display: inline-flex; gap: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; }
.split-chip strong { color: var(--text); font: 12px Consolas, "SFMono-Regular", monospace; }
.panel-footer { display: flex; justify-content: space-between; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.panel-footer span:first-child { display: flex; align-items: center; gap: 8px; }
.live-dot.small { width: 6px; height: 6px; box-shadow: none; }
.site-footer { padding: 17px 0 0; color: #70767d; text-align: center; font-size: 11px; }
.site-footer span { padding: 0 5px; color: var(--red); }
.error-notice { padding: 14px 18px; color: #ffaaa3; border-top: 1px solid #642e2b; background: #351817; font-size: 13px; }
.mobile-results { display: none; }
.mobile-results .empty-state { padding: 28px 12px; color: var(--muted); text-align: center; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .page-shell { padding-right: 22px; padding-left: 22px; }
  .topbar { height: 78px; }
  .brand { gap: 14px; }
  .brand-wordmark { width: clamp(172px, 33vw, 280px); height: 56px; }
  .brand-crest { width: 48px; height: 48px; }
  .intro { min-height: 145px; }
}
@media (max-width: 640px) {
  .page-shell { padding: 0 12px 22px; }
  .topbar { height: 68px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-wordmark { width: min(52vw, 220px); height: 47px; }
  .brand-crest { width: 38px; height: 38px; }
  .live-status { gap: 7px; max-width: 125px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
  .intro { min-height: 132px; padding: 18px 2px; }
  .eyebrow { margin-bottom: 7px; font-size: 9px; }
  h1 { font-size: clamp(24px, 7vw, 32px); }
  .updated { font-size: 11px; }
  .result-count { gap: 8px; padding: 9px 10px; }
  .count-number { font-size: 22px; }
  .count-label { font-size: 10px; }
  .panel-heading { align-items: flex-start; padding: 15px 13px; }
  .panel-heading h2 { font-size: 16px; }
  .panel-heading p { max-width: 175px; font-size: 10px; }
  .filter-wrap select { min-width: 0; max-width: 150px; padding: 9px 24px 9px 8px; font-size: 11px; }
  .table-scroll { display: none; }
  .mobile-results { display: grid; gap: 9px; padding: 0 10px 12px; }
  .result-card { overflow: hidden; border: 1px solid #49302f; border-radius: 10px; background: #351b1a; }
  .result-card-top { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 11px 12px; }
  .card-rank { color: var(--red); font: 700 17px Consolas, "SFMono-Regular", monospace; }
  .card-person { min-width: 0; }
  .card-person strong { display: block; overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .card-person span { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .card-result { color: var(--text); font: 17px Consolas, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; }
  .card-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 9px 12px; border-top: 1px solid #59312f; color: #b9a9a8; font-size: 10px; }
  .card-details { width: 100%; padding: 8px 12px 10px; border-top: 1px solid #59312f; background: #2c1716; }
  .card-details summary { color: var(--muted); cursor: pointer; font-size: 10px; }
  .card-details .split-list { gap: 5px; padding-top: 9px; }
  .card-details .split-chip { padding: 5px 7px; font-size: 9px; }
  .card-details .split-chip strong { font-size: 10px; }
  .panel-footer { padding: 11px 12px; font-size: 9px; }
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 2.2s ease-out infinite; }
  @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px #8dbda419; } 50% { box-shadow: 0 0 0 6px #8dbda408; } }
}
