:root {
  color-scheme: dark;
  --ink: #e9eadf;
  --muted: #92968a;
  --paper: #11130f;
  --panel: #181b16;
  --line: #30352b;
  --acid: #c9f04a;
  --orange: #ff7a45;
  --blue: #65a9ff;
  --pink: #e983be;
  --violet: #a98cff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 75% -10%, #28321c 0, transparent 34rem), var(--paper); }
button, input, select { font: inherit; }
.masthead { min-height: 176px; padding: 42px max(24px, calc((100vw - 1440px) / 2)); display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); }
h1, h2, p { margin: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(46px, 7vw, 88px); font-weight: 400; letter-spacing: -0.055em; line-height: .9; }
h2 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.eyebrow { margin-bottom: 10px; color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.sync-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px rgb(201 240 74 / 9%); }
main { max-width: 1440px; margin: auto; padding: 0 24px 64px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.summary article { min-height: 128px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary span, label, .muted { color: var(--muted); font-size: 12px; }
.summary strong { font-family: Georgia, serif; font-size: 37px; font-weight: 400; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; margin-top: 16px; }
.panel { border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent); }
.chart-panel { min-height: 540px; padding: 26px; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.panel-heading.compact { align-items: center; }
.controls { display: flex; align-items: end; gap: 12px; }
label { display: grid; gap: 6px; }
select, .search { height: 37px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: #11130f; outline: none; }
select { width: 245px; padding: 0 34px 0 11px; }
select:focus, .search:focus { border-color: var(--acid); }
.range { display: flex; height: 37px; border: 1px solid var(--line); }
.range button { width: 46px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; }
.range button:last-child { border-right: 0; }
.range button.active { color: #11130f; background: var(--acid); }
.view-range button { width: 58px; }
.custom-range { display: flex; height: 37px; border: 1px solid var(--line); }
.custom-range:focus-within { border-color: var(--acid); }
.custom-range input { width: 60px; border: 0; padding: 0 8px; color: var(--ink); background: #11130f; outline: none; }
.custom-range button { border: 0; border-left: 1px solid var(--line); padding: 0 10px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.custom-range.active button { color: #11130f; background: var(--acid); }
.chart { height: 355px; margin-top: 30px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.grid-line { stroke: #30352b; stroke-width: 1; stroke-dasharray: 2 6; }
.axis-label { fill: #777c70; font-size: 10px; }
.series-line { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.series-dot { stroke: #181b16; stroke-width: 1.5; }
.empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.legend { min-height: 34px; display: flex; flex-wrap: wrap; gap: 9px 18px; align-items: end; }
.legend span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.legend i { width: 15px; height: 2px; }
.roster-panel { padding: 22px 16px 12px; min-height: 540px; }
.text-button { border: 0; padding: 0; color: var(--acid); background: none; cursor: pointer; font-size: 11px; }
.roster-actions { display: flex; gap: 12px; }
.search { width: 100%; margin: 20px 0 10px; padding: 0 11px; }
.member-list { max-height: 428px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4a5043 transparent; }
.member { width: 100%; display: grid; grid-template-columns: 17px 1fr auto; gap: 10px; align-items: center; padding: 9px 5px; border: 0; border-bottom: 1px solid #252920; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.member:hover { background: #1e221b; }
.member .check { width: 12px; height: 12px; border: 1px solid #596050; border-radius: 50%; }
.member.selected .check { border: 3px solid var(--panel); background: var(--member-color); box-shadow: 0 0 0 1px var(--member-color); }
.member small { color: var(--muted); font-size: 10px; }
.member.former { opacity: .58; }
.leaderboard-panel { margin-top: 16px; padding: 25px 26px 14px; }
.table-wrap { margin-top: 22px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table[aria-busy="true"] tbody { opacity: .45; }
tbody { transition: opacity 120ms ease; }
th { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-align: right; text-transform: uppercase; }
th:nth-child(2), th:nth-child(3), td:nth-child(2), td:nth-child(3) { text-align: left; }
td { padding: 14px 10px; border-bottom: 1px solid #252920; text-align: right; }
td:first-child { width: 55px; color: var(--muted); }
.delta { color: var(--acid); font-variant-numeric: tabular-nums; }
.rank-name { font-weight: 600; }
.top-player { overflow: hidden; font-family: inherit !important; font-size: 22px !important; font-weight: 650 !important; text-overflow: ellipsis; white-space: nowrap; }
.error { position: fixed; right: 20px; bottom: 20px; max-width: 420px; padding: 14px 18px; border: 1px solid #9c4633; background: #2f1914; color: #ffb19c; font-size: 13px; }
@media (max-width: 900px) {
  .summary { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  .roster-panel { min-height: 0; }
  .member-list { max-height: 280px; }
}
@media (max-width: 620px) {
  .masthead { min-height: 150px; padding: 30px 18px; align-items: start; flex-direction: column; }
  main { padding: 0 12px 40px; }
  .summary article { min-height: 105px; padding: 18px; }
  .summary strong { font-size: 30px; }
  .chart-panel, .leaderboard-panel { padding: 20px 14px; }
  .panel-heading { align-items: start; flex-direction: column; gap: 18px; }
  .controls { width: 100%; align-items: stretch; flex-direction: column; }
  select { width: 100%; }
  .range button { flex: 1; }
  .custom-range input { width: 100%; }
  .chart { height: 290px; margin-top: 24px; }
  .muted { display: none; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}
