/* ══════════════════════════════════════════════════════════════════════════
   Savage Basketball — "Parallel" Design System
   One identity, two temperatures (hot = live season · cool = record book).
   Mobile-first; wide data tables scroll inside their shell, never the page.
   ══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
    /* Surfaces (dark Parallel base) */
    --bg:              #141020;
    --surface:         #1E1832;
    --surface-raised:  #241D3B;
    --surface-overlay: #2B2247;
    --border:          #302747;
    --border-subtle:   #241D38;

    /* Text */
    --text:            #F2ECFC;
    --text-secondary:  #9E96B6;
    --text-muted:      #6B6388;

    /* Five-world identity family */
    --w1: #3FA6F5;  --w2: #3FD69C;  --w3: #B189FF;  --w4: #F5B13C;  --w5: #FF6E9C;
    --w1-dim: rgba(63,166,245,.14);
    --w1-border: rgba(63,166,245,.42);

    /* Accent — driven per temperature (blue when hot, bronze when cool) */
    --accent:          var(--w1);
    --accent-hover:    #6FBEFB;
    --accent-dim:      rgba(63,166,245,.12);
    --accent-border:   rgba(63,166,245,.42);

    /* Semantic / live-state */
    --live:            #3FD69C;   /* in playoffs */
    --live-dim:        rgba(63,214,156,.13);
    --hot:             #F5B13C;   /* hot streak */
    --cold:            #6B6388;   /* eliminated */
    --loss:            #FF6E9C;
    --red:             #FF5C7A;
    --gold:            #F5B13C;
    --purple:          #B189FF;
    --archive:         #D9A85C;   /* cool record accent */

    /* Typography */
    --font:      'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-mono: 'Space Mono', ui-monospace, 'SF Mono', monospace;
    --font-serif: var(--font);  /* fonts stay consistent across pages/temperatures */

    /* Type scale */
    --text-xs: 11px; --text-sm: 12px; --text-base: 13px; --text-md: 14px;
    --text-lg: 16px; --text-xl: 20px; --text-2xl: 26px; --text-3xl: 34px; --text-4xl: 46px;

    /* Spacing */
    --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px;
    --sp-8:32px; --sp-10:40px; --sp-12:48px;

    /* Radii */
    --radius-sm:8px; --radius-md:12px; --radius-lg:16px; --radius-xl:20px; --radius-pill:999px;

    /* Shadows */
    --shadow-card:     0 1px 3px rgba(0,0,0,0.30), 0 1px 2px rgba(0,0,0,0.20);
    --shadow-elevated: 0 12px 34px rgba(0,0,0,0.45), 0 3px 8px rgba(0,0,0,0.30);

    /* Transitions */
    --ease:      180ms cubic-bezier(0.4, 0, 0.2, 1);
    --ease-fast: 110ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* Clip any horizontal overflow at the document root so mobile Safari never picks an
   initial zoom > 1 to "fit" content that extends past the viewport (the world-chip
   strip and wide tables scroll inside their own containers, so this doesn't affect them).
   `clip` (not `hidden`) avoids turning the root into a scroll container, so the sticky
   top bar keeps working. */
html { overflow-x: clip; }

body {
    margin: 0;
    max-width: 100%;
    overflow-x: clip;
    background:
        radial-gradient(1100px 560px at 86% -10%, rgba(177,137,255,.10), transparent 58%),
        radial-gradient(880px 480px at 2% -4%, rgba(63,166,245,.08), transparent 52%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    font-size: var(--text-md);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-overlay); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ══════════════════════════════════════════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════════════════════════════════════════ */
.top-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    background: linear-gradient(180deg, rgba(36,29,59,.72), rgba(20,16,32,.55));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--sp-6);
    min-height: 66px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; flex-shrink: 0; }

/* Type wordmark + Savage seam-monogram mark (SVG) */
.app-mark { width: 32px; height: 32px; flex-shrink: 0; display: block; }
.top-bar-logo { display: none; }  /* retire the old raster logo */

.top-bar-title {
    color: var(--text);
    font-family: var(--font);
    font-weight: 700;
    font-size: var(--text-xl);
    letter-spacing: -0.03em;
    white-space: nowrap;
}
.top-bar-title-accent { color: var(--text); font-weight: 700; }
.brand-kicker {
    display: block; font-family: var(--font-mono); font-size: 9px; font-weight: 400;
    letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px;
}

.top-bar-controls {
    display: flex; flex-direction: column; align-items: flex-start;
    margin-left: var(--sp-5); margin-right: auto; gap: var(--sp-1);
}
.top-bar-controls-row { display: flex; align-items: center; gap: var(--sp-2); }

.top-bar-context-badge {
    color: var(--text); font-family: var(--font-mono); font-size: 10px; font-weight: 400;
    background: var(--accent-dim); border: 1px solid var(--accent-border);
    border-radius: var(--radius-pill); padding: 6px 11px; letter-spacing: 0.06em;
    text-transform: uppercase; white-space: nowrap;
}
.top-bar-badge {
    color: var(--text-secondary); font-family: var(--font-mono); font-size: 10px; font-weight: 400;
    background: var(--surface-raised); padding: 8px 12px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); white-space: nowrap; letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════════════════
   NAV TABS
   ══════════════════════════════════════════════════════════════════════════ */
.custom-tabs { background: transparent !important; border-bottom: none !important; }
.tab--selected { font-weight: 700 !important; }

#main-tabs {
    background: rgba(20,16,32,.6);
    border-bottom: 1px solid var(--border) !important;
    padding: 0 var(--sp-4);
    overflow-x: auto !important; overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}
#main-tabs > .tab-container { display: flex !important; flex-wrap: nowrap !important; }
#main-tabs .tab {
    flex-shrink: 0 !important; white-space: nowrap !important; touch-action: manipulation !important;
    background: transparent !important; border: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ══════════════════════════════════════════════════════════════════════════ */
.page-content {
    min-height: calc(100vh - 132px);
    padding: var(--sp-6) var(--sp-8);
    max-width: 1560px;
    margin: 0 auto;
}

/* ── Temperature: cool (history + Hall of Fame) ─────────────────────────── */
.temp-cool {
    --accent: var(--archive);
    --accent-dim: rgba(217,168,92,.10);
    --accent-border: rgba(217,168,92,.34);
}
/* Record-book gravitas: serif headings, quieter chrome */
.temp-cool .page-title,
.temp-cool .section-title,
.temp-cool .conference-header,
.temp-cool .scores-header { font-family: var(--font-serif); letter-spacing: -0.01em; }
.temp-cool .section-label,
.temp-cool .situation-room-label,
.temp-cool .trust-note-label { color: var(--archive); }
.temp-cool .live-only { display: none !important; }

.temp-hot .archive-only { display: none !important; }

/* ══════════════════════════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════════════════════════ */
.page-header { margin-bottom: var(--sp-6); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--border-subtle); }
.page-title {
    color: var(--text); font-family: var(--font); font-size: var(--text-3xl); font-weight: 700;
    letter-spacing: -0.03em; margin: 0 0 var(--sp-2); line-height: 1.04;
}
.page-subtitle { color: var(--text-secondary); font-size: var(--text-md); margin: 0; font-weight: 400; line-height: 1.5; max-width: 70ch; }

.context-pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.context-pill {
    display: inline-flex; align-items: center; padding: 6px 12px; border-radius: var(--radius-pill);
    background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-secondary);
    font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════════════
   WORLD SWITCHER (portals)  — used where a page selects a world
   ══════════════════════════════════════════════════════════════════════════ */
.world-portals { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-4); max-width: 100%; }
.world-portal {
    position: relative; display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: 9px 14px 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface); color: var(--text-secondary); font-family: var(--font-mono);
    font-size: var(--text-sm); font-weight: 400; cursor: pointer; transition: var(--ease); white-space: nowrap;
}
.world-portal::before { content:""; width: 8px; height: 8px; border-radius: 3px; background: var(--wc, var(--accent)); }
.world-portal:hover { border-color: var(--wc, var(--accent)); color: var(--text); }
.world-portal.on { background: var(--surface-overlay); color: var(--text); border-color: var(--wc, var(--accent)); box-shadow: inset 0 0 0 1px var(--wc, var(--accent)); }
.world-portal.p1 { --wc: var(--w1); } .world-portal.p2 { --wc: var(--w2); } .world-portal.p3 { --wc: var(--w3); }
.world-portal.p4 { --wc: var(--w4); } .world-portal.p5 { --wc: var(--w5); } .world-portal.pall { --wc: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.card {
    background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border);
    padding: var(--sp-5); margin-bottom: var(--sp-4); box-shadow: var(--shadow-card); transition: border-color var(--ease);
}
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-header { padding: var(--sp-5) var(--sp-5) var(--sp-3); }
.card-flush > .card-body { padding: 0 var(--sp-5) var(--sp-5); }
.card-accent { border-top: 2px solid var(--accent); }

/* Situation room / narrative framing */
.situation-room {
    margin-bottom: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-md);
    background: linear-gradient(100deg, var(--accent-dim), transparent 72%), rgba(255,255,255,.015);
    border: 1px solid var(--accent-border);
}
.situation-room-label { color: var(--accent); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 var(--sp-2); }
.situation-room-text { color: var(--text); font-size: var(--text-md); line-height: 1.6; margin: 0; }
.temp-cool .situation-room-text { font-family: var(--font-serif); font-size: var(--text-lg); }

/* Summary strip / stat tiles */
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.summary-card {
    background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-4);
    min-height: 108px; box-shadow: var(--shadow-card); position: relative; overflow: hidden;
}
.summary-card::before { content:""; position: absolute; left:0; top:0; bottom:0; width:3px; background: var(--tone, var(--accent)); }
.summary-card--accent  { --tone: var(--w1); }
.summary-card--success { --tone: var(--live); }
.summary-card--warning { --tone: var(--hot); }
.summary-card--info    { --tone: var(--w3); }
.summary-card-label { color: var(--text-secondary); font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 var(--sp-2); }
.summary-card-value { color: var(--text); font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 var(--sp-1); line-height: 1.1; }
.summary-card-detail { color: var(--text-secondary); font-size: var(--text-sm); margin: 0; line-height: 1.5; }
.temp-cool .summary-card-value { font-family: var(--font-serif); }

/* ══════════════════════════════════════════════════════════════════════════
   SECTION TITLES
   ══════════════════════════════════════════════════════════════════════════ */
.section-title { color: var(--text); font-family: var(--font); font-size: var(--text-lg); font-weight: 700; margin: 0 0 var(--sp-3); letter-spacing: -0.01em; }
.section-title-sm { color: var(--text); font-family: var(--font); font-size: var(--text-md); font-weight: 700; margin: 0 0 var(--sp-2); }
.section-label { color: var(--accent); font-family: var(--font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 var(--sp-2); }

.conference-header {
    color: var(--text); font-family: var(--font); font-size: var(--text-lg); font-weight: 700;
    margin: var(--sp-6) 0 var(--sp-3); letter-spacing: -0.01em; padding-bottom: var(--sp-2);
    border-bottom: 2px solid var(--accent); display: inline-flex; align-items: center; gap: var(--sp-2);
}
.conference-header:first-child { margin-top: 0; }

.scores-header { color: var(--text); font-family: var(--font); font-size: var(--text-xl); font-weight: 700; margin: var(--sp-2) 0 var(--sp-4); letter-spacing: -0.02em; display: flex; align-items: center; gap: var(--sp-2); }
.scores-header::before { content:""; display: inline-block; width: 3px; height: 20px; background: var(--accent); border-radius: 2px; }

/* ══════════════════════════════════════════════════════════════════════════
   FILTER CONTROLS
   ══════════════════════════════════════════════════════════════════════════ */
.filter-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-4);
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md);
    background: rgba(255,255,255,.02); border: 1px solid var(--border-subtle);
}
.filter-group { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.control-label { color: var(--text-secondary); font-family: var(--font-mono); font-weight: 400; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; align-self: center; white-space: nowrap; }
.filter-dropdown { font-size: var(--text-base); min-width: 0; max-width: 100%; }
.stat-subtitle { color: var(--text-secondary); font-size: var(--text-sm); margin-bottom: var(--sp-4); line-height: 1.5; }
.table-description { color: var(--text-secondary); font-size: var(--text-xs); margin: 0 0 var(--sp-3); line-height: 1.5; }

.trust-note {
    display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; margin: 0 0 var(--sp-4);
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
    background: rgba(255,255,255,.02); border: 1px solid var(--border-subtle);
}
.trust-note-label { color: var(--accent); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.trust-note-text { color: var(--text-secondary); font-size: var(--text-xs); line-height: 1.5; }
.filter-hint { color: var(--text-muted); font-family: var(--font-mono); font-size: 10px; margin: var(--sp-2) 0 0; }

.legend-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: 0 0 var(--sp-4); }
.legend-item { display: inline-flex; align-items: center; gap: var(--sp-2); }
.legend-swatch { width: 12px; height: 12px; border-radius: 4px; border: 1px solid transparent; flex-shrink: 0; }
.legend-swatch--accent  { background: var(--w1-dim); border-color: var(--w1-border); }
.legend-swatch--success { background: var(--live-dim); border-color: rgba(63,214,156,.4); }
.legend-swatch--warning { background: rgba(245,177,60,.2); border-color: rgba(245,177,60,.4); }
.legend-swatch--info    { background: rgba(177,137,255,.2); border-color: rgba(177,137,255,.4); }
.legend-label { color: var(--text-secondary); font-size: var(--text-sm); }

.divider { border: none; border-top: 1px solid var(--border-subtle); margin: var(--sp-4) 0; }

/* ══════════════════════════════════════════════════════════════════════════
   STANDINGS "BUG" — seed medallions + playoff cut line
   ══════════════════════════════════════════════════════════════════════════ */
.standings-world-card .card { border-top: 2px solid var(--accent); }
.seed-medallion {
    display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
    font-family: var(--font-mono); font-weight: 700; font-size: 12px;
    background: var(--surface-overlay); color: var(--text-secondary);
}
.seed-medallion.in { background: var(--accent); color: #0c1020; }
.cut-line {
    display: flex; align-items: center; gap: var(--sp-2); padding: 7px 14px; margin: 2px 0;
    background: repeating-linear-gradient(90deg, var(--live-dim) 0 14px, transparent 14px 26px);
    border-top: 1px dashed rgba(63,214,156,.5); border-bottom: 1px dashed rgba(63,214,156,.5);
}
.cut-line b { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--live); }
.cut-line span { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }

/* Hand-built standings table — classes so cells don't carry per-cell inline styles */
.standings-table { width: 100%; border-collapse: collapse; }
.standings-table th { font-family: var(--font-mono); font-size: 9.5px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--border-subtle); }
.standings-table th.l { text-align: left; }
.standings-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-subtle); text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-secondary); vertical-align: middle; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-row--playoff td { background: var(--accent-dim); }
/* Higher specificity than `.standings-table td` so the left columns win without inline overrides */
.standings-table td.standings-cell-seed { text-align: left; width: 40px; }
.standings-table td.standings-cell-team { text-align: left; max-width: clamp(130px, 38vw, 240px); }
.standings-team-name { font-family: var(--font); font-weight: 600; font-size: 15px; line-height: 1.15; color: var(--text); white-space: normal; }
.standings-team-name--out { color: var(--text-secondary); }
.standings-coach { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.standings-wl { font-weight: 700; color: var(--text); }
.standings-streak--w { color: var(--live); }
.standings-streak--l { color: var(--loss); }

/* ══════════════════════════════════════════════════════════════════════════
   RECORD SPINE (cool) — all-time leaderboard
   ══════════════════════════════════════════════════════════════════════════ */
.record-spine { display: grid; gap: 0; }
.record-row { display: grid; grid-template-columns: 62px 1fr auto; gap: var(--sp-4); align-items: center; padding: var(--sp-4) 0; border-bottom: 1px solid var(--border-subtle); }
.record-row:last-child { border-bottom: none; }
.record-rank { font-family: var(--font-serif); font-weight: 900; font-size: var(--text-4xl); line-height: .8; letter-spacing: -0.03em; color: var(--text); text-align: right; }
.record-row.one .record-rank { color: var(--archive); }
.record-who { font-family: var(--font-serif); font-weight: 700; font-size: var(--text-2xl); line-height: 1; }
.record-stat { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-secondary); margin-top: 4px; letter-spacing: 0.02em; }
.record-stat b { color: var(--text); }
.record-metric { font-family: var(--font-serif); font-weight: 700; font-size: var(--text-2xl); text-align: right; font-variant-numeric: tabular-nums; }
.record-metric small { display: block; font-family: var(--font-mono); font-size: 9px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   OFF-SEASON / EMPTY / AUTH
   ══════════════════════════════════════════════════════════════════════════ */
.offseason-container { text-align: center; padding: var(--sp-12) var(--sp-6); }
.offseason-badge { display: inline-block; background: var(--accent-dim); color: var(--accent); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-pill); border: 1px solid var(--accent-border); }

.empty-state { text-align: center; padding: var(--sp-12) var(--sp-6); color: var(--text-secondary); }
.unavailable-state .empty-state { padding-top: var(--sp-8); }
.empty-state-title { font-size: var(--text-lg); font-weight: 600; color: var(--text); margin-bottom: var(--sp-2); }
.empty-state-desc { font-size: var(--text-md); color: var(--text-secondary); max-width: 400px; margin: 0 auto; line-height: 1.5; }

.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--sp-6); }
.auth-card { max-width: 400px; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--sp-10) 36px; box-shadow: var(--shadow-elevated); text-align: center; }
.auth-logo { display: none; }
.auth-mark { width: 60px; height: 60px; display: block; margin: 0 auto var(--sp-5); }
.auth-title { color: var(--text); font-family: var(--font); font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.03em; margin: 0 0 var(--sp-1); }
.auth-title-accent { color: var(--text); }
.auth-subtitle { color: var(--text-secondary); font-size: var(--text-base); margin: 0 0 var(--sp-8); }
.auth-input { width: 100%; padding: var(--sp-3) var(--sp-4); background: var(--surface-raised); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--text-md); font-family: var(--font); margin-bottom: var(--sp-3); outline: none; transition: border-color var(--ease), box-shadow var(--ease); }
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.auth-btn { width: 100%; padding: var(--sp-3); background: var(--accent); color: #0c1020; border: none; border-radius: var(--radius-sm); font-weight: 700; font-size: var(--text-md); font-family: var(--font); cursor: pointer; transition: background var(--ease), transform var(--ease-fast); }
.auth-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }
.auth-error { color: var(--red); font-size: var(--text-base); margin-top: var(--sp-3); min-height: 20px; }

/* ══════════════════════════════════════════════════════════════════════════
   DATA TABLES
   ══════════════════════════════════════════════════════════════════════════ */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
    font-family: var(--font) !important; font-variant-numeric: tabular-nums;
}
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
    text-transform: uppercase !important; letter-spacing: 0.08em !important; font-family: var(--font-mono) !important;
}
.table-shell { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.table-shell .dash-table-container, .table-shell .dash-spreadsheet-container, .table-shell .dash-spreadsheet-inner { max-width: 100%; }

/* Quiet the native filter row: borderless until focused, so empty inputs read as a
   subtle utility strip instead of a row of empty boxes. */
.dash-table-container .dash-spreadsheet-container .dash-filter input {
    background-color: transparent !important; color: var(--text) !important;
    border: none !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important;
    font-size: var(--text-xs) !important; padding: var(--sp-1) var(--sp-2) !important;
}
.dash-table-container .dash-spreadsheet-container .dash-filter input::placeholder { color: var(--text-muted) !important; opacity: 0.55; }
.dash-table-container .dash-spreadsheet-container .dash-filter input:focus { border-bottom-color: var(--accent) !important; }
/* Dim the per-column case-sensitivity toggle so it doesn't clutter the header */
.dash-table-container .dash-spreadsheet-container .dash-filter .Select,
.dash-table-container .dash-spreadsheet-container th .column-header--edit { opacity: 0.5; }

.dash-table-container .previous-next-container { padding: var(--sp-3) 0 var(--sp-1) !important; }
.dash-table-container .previous-next-container button {
    background: var(--surface-raised) !important; color: var(--text) !important; border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important; font-size: var(--text-sm) !important; padding: var(--sp-1) var(--sp-3) !important; cursor: pointer !important;
}
.dash-table-container .previous-next-container button:hover { background: var(--surface-overlay) !important; }
.dash-table-container .page-number { color: var(--text-secondary) !important; font-size: var(--text-sm) !important; }

/* ── Dropdown overrides ─────────────────────────────────────────────────── */
.Select-control { background-color: var(--surface-raised) !important; border-color: var(--border) !important; border-radius: var(--radius-sm) !important; }
.Select-menu-outer { background-color: var(--surface-raised) !important; border-color: var(--border) !important; border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important; z-index: 9999 !important; box-shadow: var(--shadow-elevated) !important; }
.Select-option { color: var(--text) !important; padding: var(--sp-2) var(--sp-3) !important; font-size: var(--text-base) !important; background: var(--surface-raised) !important; }
.Select-option.is-focused { background-color: var(--accent) !important; color: #0c1020 !important; }
.Select-value-label { color: var(--text) !important; }
.Select-placeholder { color: var(--text-secondary) !important; }
.Select-arrow-zone .Select-arrow { border-top-color: var(--text-secondary) !important; }
.VirtualizedSelectOption { background: var(--surface-raised) !important; color: var(--text) !important; }
.VirtualizedSelectFocusedOption { background: var(--accent) !important; color: #0c1020 !important; }

input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
._dash-loading { background: rgba(20,16,32,.85) !important; }

/* ══════════════════════════════════════════════════════════════════════════
   HALL OF FAME layout
   ══════════════════════════════════════════════════════════════════════════ */
.hof-accolades-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); width: 100%; max-width: 100%; min-width: 0; }
.hof-accolades-row > .hof-accolade-col { flex: 1 1 0; min-width: 0; max-width: 100%; }
.hof-content, .hof-content > .card, .hof-content .hof-accolade-col { width: 100%; max-width: 100%; min-width: 0; }
.hof-content .table-shell, .hof-content .dash-table-container, .hof-content .dash-spreadsheet-container, .hof-content .dash-spreadsheet-inner { max-width: 100%; min-width: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   PLOTLY
   ══════════════════════════════════════════════════════════════════════════ */
.js-plotly-plot .plotly .modebar { background: transparent !important; }
.chart-container { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-subtle); }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .page-content { padding: var(--sp-5); }
    .hof-accolades-row { flex-direction: column; }
}

@media (max-width: 768px) {
    .page-content { padding: var(--sp-4); }
    .top-bar { padding: 0 var(--sp-4); min-height: 58px; gap: var(--sp-3); flex-wrap: wrap; }
    .top-bar-title { font-size: var(--text-md); }
    .top-bar-controls { margin-left: var(--sp-3); }
    .top-bar-controls-row { flex-wrap: wrap; }
    #main-tabs .tab { padding: 12px 14px !important; font-size: 12px !important; }
    .page-header { margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); }
    .page-title { font-size: var(--text-2xl); }
    .page-subtitle { font-size: var(--text-sm); }
    .filter-row { align-items: stretch; gap: var(--sp-2); padding: var(--sp-3); }
    .filter-group { width: 100%; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: var(--sp-1); }
    .filter-group .control-label { align-self: flex-start; }
    .filter-group .filter-dropdown { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
    .filter-group .filter-dropdown .Select-control, .filter-group .filter-dropdown .Select-menu-outer { max-width: 100%; }
    .card { padding: var(--sp-4); border-radius: var(--radius-md); min-width: 0; }
    .conference-header { font-size: var(--text-md); }
    .summary-strip { grid-template-columns: 1fr 1fr; }
    .record-row { grid-template-columns: 46px 1fr auto; gap: var(--sp-3); }
    .record-rank { font-size: var(--text-3xl); }
    .record-who { font-size: var(--text-xl); }
    .world-portals { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .world-portal { flex-shrink: 0; min-height: 40px; padding: 10px 15px 10px 13px; }
    #main-tabs .tab { min-height: 44px; display: flex; align-items: center; }
}

@media (max-width: 480px) {
    .top-bar-badge { display: none; }
    .top-bar-controls .control-label { display: none; }
    .auth-card { padding: var(--sp-8) var(--sp-5); }
    .scores-header { font-size: var(--text-lg); }
    .situation-room { padding: var(--sp-4); }
    .summary-strip { grid-template-columns: 1fr; }
    .brand-kicker { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOTION
   ══════════════════════════════════════════════════════════════════════════ */
#tab-content > * { animation: fadeIn 200ms ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
