    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg: #0f0f13;
      --surface: #1a1a24;
      --surface2: #222230;
      --border: #2e2e42;
      --accent: #7c6dfa;
      --accent-rgb: 124, 109, 250;
      --accent-glow: rgba(124, 109, 250, 0.18);
      --header-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
      --accent2: #fa6d9a;
      --gold: #f5c518;
      --silver: #b0b8c4;
      --bronze: #cd7f32;
      --text: #e8e8f0;
      --muted: #8888aa;
      --green: #4ade80;
      --radius: 10px;
    }

    .ad-unit {
      margin: 20px 0;
      min-height: 90px;
      background: rgba(255,255,255,0.03);
      border: 1px dashed var(--border);
      border-radius: var(--radius);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    html[data-sport="MAG"] {
      --accent: #34d399;
      --accent-rgb: 52, 211, 153;
      --accent-glow: rgba(52, 211, 153, 0.18);
      --header-bg: linear-gradient(135deg, #0f1a13 0%, #132a1e 50%, #1a4a30 100%);
    }

    html[data-sport="ACRO"] {
      --accent: #fb923c;
      --accent-rgb: 251, 146, 60;
      --accent-glow: rgba(251, 146, 60, 0.18);
      --header-bg: linear-gradient(135deg, #1a130f 0%, #2e1a0a 50%, #4a2a06 100%);
    }

    /* system preference fallback (no-JS); guarded so explicit dark selection wins */
    @media (prefers-color-scheme: light) {
      html:not([data-theme="dark"]) {
        --bg: #f4f4f8;
        --surface: #ffffff;
        --surface2: #eeeef4;
        --border: #d4d4e8;
        --text: #1a1a2a;
        --muted: #5a5a78;
        --green: #16a34a;
        --gold: #a16207;
        --accent-glow: rgba(124, 109, 250, 0.10);
        --header-bg: linear-gradient(135deg, #ede9ff 0%, #dde5f8 50%, #c8d8f8 100%);
      }
      html:not([data-theme="dark"])[data-sport="MAG"] {
        --accent-glow: rgba(52, 211, 153, 0.10);
        --header-bg: linear-gradient(135deg, #e4f5ee 0%, #cff0e0 50%, #b8e8d0 100%);
      }
      html:not([data-theme="dark"])[data-sport="ACRO"] {
        --accent-glow: rgba(251, 146, 60, 0.10);
        --header-bg: linear-gradient(135deg, #fff3e8 0%, #ffe8cc 50%, #ffd5aa 100%);
      }
      html:not([data-theme="dark"]) .ad-unit { background: rgba(0,0,0,0.03); }
      html:not([data-theme="dark"]) .header-logo-group h1 { color: #1a1a2a; }
      html:not([data-theme="dark"]) .header-logo-group h1 span { color: #6b5ce7; }
      html:not([data-theme="dark"]) .header-logo-group p { color: #5a5a78; }
    }

    /* JS-driven explicit light theme */
    html[data-theme="light"] {
      --bg: #f4f4f8;
      --surface: #ffffff;
      --surface2: #eeeef4;
      --border: #d4d4e8;
      --text: #1a1a2a;
      --muted: #5a5a78;
      --green: #16a34a;
      --gold: #a16207;
      --accent-glow: rgba(124, 109, 250, 0.10);
      --header-bg: linear-gradient(135deg, #ede9ff 0%, #dde5f8 50%, #c8d8f8 100%);
    }
    html[data-theme="light"][data-sport="MAG"] {
      --accent-glow: rgba(52, 211, 153, 0.10);
      --header-bg: linear-gradient(135deg, #e4f5ee 0%, #cff0e0 50%, #b8e8d0 100%);
    }
    html[data-theme="light"][data-sport="ACRO"] {
      --accent-glow: rgba(251, 146, 60, 0.10);
      --header-bg: linear-gradient(135deg, #fff3e8 0%, #ffe8cc 50%, #ffd5aa 100%);
    }
    html[data-theme="light"] .ad-unit { background: rgba(0,0,0,0.03); }
    html[data-theme="light"] .header-logo-group h1 { color: #1a1a2a; }
    html[data-theme="light"] .header-logo-group h1 span { color: #6b5ce7; }
    html[data-theme="light"] .header-logo-group p { color: #5a5a78; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: system-ui, -apple-system, sans-serif;
      font-size: 15px;
      line-height: 1.5;
    }

    /* ── SHARED HEADER ─────────────────────────────────────────────────────── */
    .site-header {
      background: var(--header-bg);
      border-bottom: 2px solid var(--accent);
      padding: 20px 32px;
    }
    .header-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }
    .site-header h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; }
    .site-header h1 span { color: var(--accent); }
    .site-header .site-logo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; display: block; flex-shrink: 0; }
    .header-logo-group { display: flex; align-items: center; gap: 12px; }
    .header-logo-group .site-logo { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: block; flex-shrink: 0; }
    .header-logo-group h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; margin: 0; letter-spacing: -0.02em; line-height: 1; color: #f2f3fa; }
    .header-logo-group h1 span { color: #c9a4ff; }
    .header-logo-group p { font: 600 11px/1 'JetBrains Mono', monospace; color: #8d92ac; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px; }
    .site-header p { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
    .badge {
      background: var(--accent);
      color: #fff;
      font-size: 0.7rem;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 999px;
      letter-spacing: 1px;
      text-transform: uppercase;
      white-space: nowrap;
    }

    /* ── SPORT BAR (legacy — kept for safety) ──────────────────────────────── */
    #sport-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    #back-btn {
      background: none;
      border: 1px solid var(--border);
      color: var(--muted);
      padding: 5px 13px;
      border-radius: 999px;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 600;
      transition: all 0.12s;
      white-space: nowrap;
    }
    #back-btn:hover { border-color: var(--accent); color: var(--text); }
    #apparatus-year option { background: #ffffff; color: #111111; }

    /* ── NAV ───────────────────────────────────────────────────────────────── */
    nav {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      display: flex;
      padding: 0 32px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    nav::-webkit-scrollbar { display: none; }
    nav button {
      background: none;
      border: none;
      color: var(--muted);
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: 600;
      padding: 14px 18px;
      border-bottom: 3px solid transparent;
      transition: color 0.15s, border-color 0.15s;
      white-space: nowrap;
      flex-shrink: 0;
    }
    nav button:hover { color: var(--text); }
    nav button.active { color: var(--accent); border-bottom-color: var(--accent); }

    /* ── MAIN CONTENT ──────────────────────────────────────────────────────── */
    main { padding: 28px 32px; max-width: 1200px; margin: 0 auto; }

    .view { display: none; }
    .view.active { display: block; }

    h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
    h3 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; color: var(--muted); }

    .table-context-header {
      font-size: 1.6rem;
      font-weight: 700;
      line-height: 1.2;
      margin-bottom: 20px;
      letter-spacing: -0.3px;
    }
    .table-context-header .ctx-season { color: var(--accent); }
    .table-context-header .ctx-sep    { color: var(--muted); font-weight: 400; }
    .table-context-header .ctx-part   { color: var(--text); }

    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px 24px;
      margin-bottom: 16px;
    }
    .table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0; }

    /* ── LEADERBOARD TABLE ─────────────────────────────────────────────────── */
    .leaderboard { width: 100%; border-collapse: collapse; min-width: 480px; }
    .leaderboard th {
      text-align: left;
      color: var(--muted);
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      padding: 8px 12px;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    .leaderboard td {
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
    }
    .leaderboard tr:last-child td { border-bottom: none; }
    .leaderboard tr:hover td { background: var(--surface2); }

    .rank-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px; height: 28px;
      border-radius: 50%;
      font-weight: 800;
      font-size: 0.8rem;
      flex-shrink: 0;
    }
    .rank-1 { background: linear-gradient(135deg, #9a7508 0%, #ffd740 42%, #c8a00a 100%); color: #000; }
    .rank-2 { background: linear-gradient(135deg, #78838e 0%, #d4dbe3 42%, #96a2ac 100%); color: #000; }
    .rank-3 { background: linear-gradient(135deg, #7a3c0a 0%, #e08c35 42%, #9c5018 100%); color: #fff; }
    .rank-n { background: var(--surface2); color: var(--muted); }

    .stat-chip {
      background: var(--surface2);
      border-radius: 6px;
      padding: 2px 8px;
      font-size: 0.78rem;
      font-weight: 600;
    }
    .stat-chip.gold   { background: rgba(245,197,24,0.15);  color: var(--gold); }
    .stat-chip.silver { background: rgba(176,184,196,0.15); color: var(--silver); }
    .stat-chip.bronze { background: rgba(205,127,50,0.15);  color: var(--bronze); }
    .stat-chip.green  { background: rgba(74,222,128,0.12);  color: var(--green); }

    .score { font-variant-numeric: tabular-nums; font-weight: 600; }
    .score-hi { color: var(--green); }

    /* ── COMPETITION CARDS ─────────────────────────────────────────────────── */
    .comp-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 14px;
    }
    .comp-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
      transition: border-color 0.15s, transform 0.1s;
    }
    .comp-card:hover { border-color: var(--accent); transform: translateY(-2px); }
    .comp-card h3 { font-size: 0.97rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
    .comp-meta { color: var(--muted); font-size: 0.82rem; }
    .comp-actions { display: flex; gap: 8px; margin-top: 10px; }
    .comp-btn { flex: 1; padding: 7px 10px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 600; min-height: 36px; }
    .btn-results { background: var(--accent); color: #fff; }
    .btn-pdfs { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
    .pdf-list { list-style: none; padding: 12px 0; margin: 0; }
    .pdf-list li { padding: 8px 12px; border-bottom: 1px solid var(--border); }
    .pdf-list li:last-child { border-bottom: none; }
    .pdf-list li a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
    .pdf-list li a:hover { text-decoration: underline; }
    .standings-subtitle { margin: 20px 0 8px; font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
    .club-code { font-size: 0.72rem; font-weight: 700; color: var(--muted); background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; letter-spacing: 0.04em; }
    .club-logo-sm { height: 28px; width: 28px; object-fit: contain; border-radius: 4px; vertical-align: middle; }
    .club-logo-md { height: 44px; width: 44px; object-fit: contain; border-radius: 5px; vertical-align: middle; }
    .club-logo-lg { height: 56px; width: 56px; object-fit: contain; border-radius: 6px; vertical-align: middle; }
    .logo-hover-wrap { position: relative; display: inline-block; }
    .logo-preview { display: none; position: fixed; width: 256px; height: 256px; object-fit: contain; background: rgba(255,255,255,0.3); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 1000; pointer-events: none; }
    td.logo-cell { width: 48px; text-align: center; padding: 6px 8px; }
    td.logo-cell-md { width: 60px; text-align: center; padding: 8px 10px; }
    .sortable:hover { color: var(--accent); cursor: pointer; }
    .sort-icon { font-size: 0.7rem; opacity: 0.5; margin-left: 2px; }
    .sort-icon.asc::after { content: "↑"; }
    .sort-icon.desc::after { content: "↓"; }
    .sort-icon.asc, .sort-icon.desc { opacity: 1; color: var(--accent); }
    .region-pill { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
    .venue-list { font-size: 0.7rem; color: var(--muted); margin-top: 3px; }
    .region-metro-east    { background: var(--accent-glow); color: #a99fff; }
    .region-metro-north   { background: rgba(56,189,248,0.18);  color: #7dd3fc; }
    .region-metro-south   { background: rgba(52,211,153,0.18);  color: #6ee7b7; }
    .region-metro-west    { background: rgba(251,191,36,0.18);  color: #fcd34d; }
    .region-regional-ne   { background: rgba(249,115,22,0.18);  color: #fdba74; }
    .region-regional-se   { background: rgba(236,72,153,0.18);  color: #f9a8d4; }
    .region-regional-west { background: rgba(163,230,53,0.18);  color: #bef264; }
    .region-multi         { background: rgba(148,163,184,0.18); color: #94a3b8; }
    .region-interstate    { background: rgba(148,163,184,0.12); color: #64748b; }
    .standings-note { font-size: 0.82rem; color: var(--muted); margin: 0 0 16px; padding: 10px 14px; background: rgba(var(--accent-rgb), 0.08); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
    .comp-pill {
      display: inline-block;
      background: rgba(var(--accent-rgb), 0.15);
      color: var(--accent);
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 999px;
      margin-top: 8px;
    }

    /* ── FILTER BARS ───────────────────────────────────────────────────────── */
    .filter-bar {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 16px;
      align-items: center;
    }
    .filter-bar label { color: var(--muted); font-size: 0.82rem; margin-right: 4px; flex-shrink: 0; }
    .filter-btn {
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--muted);
      padding: 5px 13px;
      border-radius: 999px;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 600;
      transition: all 0.12s;
      min-height: 32px;
    }
    .filter-btn:hover { border-color: var(--accent); color: var(--text); }
    .filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
    .filter-btn.pulse-attn { animation: stl-btn-pulse 1.6s ease-in-out infinite; }
    @keyframes stl-btn-pulse {
      0%, 100%  { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
      50%       { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
    }

    /* ── FILTER ROW (dropdown selects) ────────────────────────────────────── */
    .filter-row { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-end; }
    .filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; }
    .filter-label { color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
    .filter-select {
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 6px 10px;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 500;
      cursor: pointer;
      min-height: 34px;
      width: 100%;
    }
    .filter-select:hover { border-color: var(--accent); }
    .filter-select:focus { outline: none; border-color: var(--accent); }

    .no-data { text-align: center; color: var(--muted); padding: 48px 20px; font-size: 0.95rem; }
    .no-data strong { display: block; font-size: 1.1rem; color: var(--text); margin-bottom: 8px; }
    .updated { color: var(--muted); font-size: 0.78rem; margin-bottom: 20px; }

    /* ── DRILL-DOWN OVERLAY ────────────────────────────────────────────────── */
    #drill-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.7);
      z-index: 100;
      overflow-y: auto;
      padding: 40px 16px;
    }
    #drill-overlay.open { display: block; }
    #tip-box {
      position: fixed;
      background: #1e1e2e;
      color: #e8e8f0;
      border: 1px solid var(--border);
      padding: 7px 11px;
      border-radius: 8px;
      font-size: 0.78rem;
      line-height: 1.45;
      max-width: 230px;
      white-space: pre-line;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.15s;
      z-index: 9999;
      box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    }
    #tip-box.visible { opacity: 1; }

    #drill-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      max-width: 1100px;
      margin: 0 auto;
      padding: 28px;
    }
    #drill-box h2 { margin-bottom: 4px; }
    #drill-box .close-btn {
      float: right;
      background: none;
      border: none;
      color: var(--muted);
      font-size: 1.4rem;
      cursor: pointer;
      line-height: 1;
      margin-top: -4px;
      padding: 4px;
    }
    .event-section { margin-top: 20px; overflow-x: auto; }
    .event-section h4 {
      font-size: 0.8rem;
      font-weight: 700;
      letter-spacing: 0.6px;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 8px;
    }

    /* ── SEARCH BUTTON ────────────────────────────────────────────────────── */
    #search-btn {
      background: none;
      border: none;
      border-bottom: 3px solid transparent;
      color: var(--muted);
      padding: 14px 16px;
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: 600;
      transition: color 0.15s;
      white-space: nowrap;
      flex-shrink: 0;
    }
    #search-btn:hover { color: var(--text); }
    .stickit-nav-link {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 11px;
      border: 1px solid var(--border);
      border-radius: 20px;
      color: var(--muted);
      font-size: 0.78rem;
      text-decoration: none;
      white-space: nowrap;
      transition: all 0.12s;
    }
    .stickit-nav-link:hover { border-color: var(--accent); color: var(--text); }

    /* ── SEARCH OVERLAY ───────────────────────────────────────────────────── */
    #search-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.75);
      z-index: 200;
      overflow-y: auto;
      padding: 40px 16px;
    }
    #search-overlay.open { display: block; }
    #search-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      max-width: 680px;
      margin: 0 auto;
      padding: 28px;
    }
    #search-box h2 { margin-bottom: 20px; font-size: 1.1rem; }
    .search-close-btn {
      float: right;
      background: none;
      border: none;
      color: var(--muted);
      font-size: 1.4rem;
      cursor: pointer;
      line-height: 1;
      margin-top: -4px;
      padding: 4px;
    }
    .search-input-wrap {
      position: relative;
      margin-bottom: 8px;
    }
    .search-input-wrap input {
      width: 100%;
      box-sizing: border-box;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      font-size: 1rem;
      padding: 10px 14px 10px 36px;
      outline: none;
      transition: border-color 0.15s;
    }
    .search-input-wrap input:focus { border-color: var(--accent); }
    .search-input-wrap .search-icon {
      position: absolute;
      left: 11px; top: 50%;
      transform: translateY(-50%);
      color: var(--muted);
      font-size: 0.95rem;
      pointer-events: none;
    }
    #search-suggestions {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 20px;
    }
    .search-suggestion-item {
      padding: 9px 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      border-bottom: 1px solid var(--border);
      transition: background 0.1s;
    }
    .search-suggestion-item:last-child { border-bottom: none; }
    .search-suggestion-item:hover { background: var(--surface); }
    .search-suggestion-item .sug-name { font-weight: 600; flex: 1; }
    .search-suggestion-item .sug-meta { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
    .search-mode-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 20px;
      font-size: 0.88rem;
      color: var(--muted);
      font-weight: 600;
    }
    .search-go-btn {
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: 8px;
      padding: 9px 20px;
      font-size: 0.92rem;
      font-weight: 700;
      cursor: pointer;
      transition: opacity 0.12s;
    }
    .search-go-btn:hover { opacity: 0.85; }
    .search-go-btn:disabled { opacity: 0.4; cursor: default; }
    .comp-results-section-heading {
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
      margin: 24px 0 8px;
    }
    .comp-results-section-heading:first-child { margin-top: 0; }

    .search-view-bar {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 24px;
    }
    .search-back-btn {
      background: none;
      border: 1px solid var(--border);
      color: var(--muted);
      padding: 6px 14px;
      border-radius: 999px;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 600;
      white-space: nowrap;
      transition: all 0.12s;
    }
    .search-back-btn:hover { border-color: var(--accent); color: var(--text); }
    .browse-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 20px;
      align-items: center;
    }
    .browse-select {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      font-size: 0.88rem;
      padding: 7px 10px;
      cursor: pointer;
      outline: none;
      transition: border-color 0.15s;
      flex: 1;
      min-width: 120px;
    }
    .browse-select:focus { border-color: var(--accent); }
    .browse-select:disabled { opacity: 0.4; cursor: default; }
    .athlete-profile-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }
    .athlete-profile-header .ap-name { font-size: 1.15rem; font-weight: 700; }
    .athlete-profile-header .ap-meta { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
    .athlete-profile-table { width: 100%; border-collapse: collapse; }
    .athlete-profile-table th {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--muted);
      padding: 6px 8px;
      text-align: right;
      border-bottom: 1px solid var(--border);
    }
    .athlete-profile-table th:first-child,
    .athlete-profile-table th:nth-child(2) { text-align: left; }
    .athlete-profile-table td {
      padding: 8px 8px;
      font-size: 0.88rem;
      border-bottom: 1px solid var(--border);
      text-align: right;
    }
    .athlete-profile-table td:first-child,
    .athlete-profile-table td:nth-child(2) { text-align: left; }
    .athlete-profile-table tr:last-child td { border-bottom: none; }
    .ap-comp-name { font-weight: 600; font-size: 0.88rem; }
    .ap-comp-name small { display: block; font-weight: 400; color: var(--muted); font-size: 0.75rem; }

    /* ── LINK BUTTON (shared) ─────────────────────────────────────────────── */
    .link-btn {
      background: none; border: none; color: var(--accent); cursor: pointer;
      font-size: inherit; padding: 0; font-family: inherit;
      text-decoration: underline; text-underline-offset: 2px;
    }
    .link-btn:hover { color: #a99fff; }

    /* ── LANDING PAGE (V3 SCOREBOARD) ─────────────────────────────────────── */
    #landing-view {
      display: block; min-height: 100vh;
      background: #0a0b10; color: #f2f3fa;
      font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
      font-size: 15px; line-height: 1.45;
    }
    #landing-view * { box-sizing: border-box; }

    /* HEADER */
    #landing-view .v3-header {
      padding: 24px 36px 0; display: flex; justify-content: space-between; align-items: center;
    }
    #landing-view .v3-logo { display: flex; align-items: center; gap: 12px; }
    #landing-view .v3-logo .glyph {
      width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: block;
    }
    #landing-view .v3-logo h1 {
      font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px;
      margin: 0; letter-spacing: -0.02em; line-height: 1; cursor: default; color: #f2f3fa;
    }
    #landing-view .v3-logo h1 .accent { color: #c9a4ff; }
    #landing-view .v3-logo h1 + .sub {
      font: 600 11px/1 'JetBrains Mono', monospace;
      color: #8d92ac; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px;
    }
    #landing-view .v3-header .right {
      display: flex; gap: 22px;
      font: 600 11px/1 'JetBrains Mono', monospace;
      color: #8d92ac; text-transform: uppercase; letter-spacing: 0.1em; align-items: center;
    }

    /* HERO */
    #landing-view .v3-hero {
      padding: 30px 36px 24px;
      display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: end;
    }
    #landing-view .v3-hero .copy .kicker {
      font: 700 11px/1 'JetBrains Mono', monospace;
      color: #ffd24a; letter-spacing: 0.18em; text-transform: uppercase;
    }
    #landing-view .v3-hero h1 {
      font-family: 'Space Grotesk', sans-serif !important; font-weight: 700 !important;
      font-size: 64px !important; line-height: 0.95 !important;
      margin: 14px 0 0 !important; letter-spacing: -0.04em !important; color: #f2f3fa;
    }
    #landing-view .v3-hero h1 .stack { display: block; }
    #landing-view .v3-hero h1 .acc1 { color: #ffd24a; }
    #landing-view .v3-hero h1 .acc2 { color: #5ee6a8; }
    #landing-view .v3-hero h1 .slash { color: #ffd24a; }
    #landing-view .v3-hero p {
      font-size: 17px; color: #8d92ac; margin: 8px 0 0; max-width: 60ch; line-height: 1.5;
    }

    /* STATS */
    #landing-view .v3-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    #landing-view .v3-stat {
      border: 1px solid #232944; border-radius: 10px; padding: 12px 12px 10px;
      background: #161927; display: flex; flex-direction: column; gap: 2px;
      position: relative; overflow: hidden;
    }
    #landing-view .v3-stat::after {
      content: ''; position: absolute; right: -16px; top: -16px;
      width: 50px; height: 50px; border-radius: 50%; opacity: 0.14;
    }
    #landing-view .v3-stat.a::after { background: #c9a4ff; }
    #landing-view .v3-stat.b::after { background: #5ee6a8; }
    #landing-view .v3-stat.c::after { background: #ffd24a; }
    #landing-view .v3-stat .n {
      font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px;
      letter-spacing: -0.025em; line-height: 1;
    }
    #landing-view .v3-stat.a .n { color: #c9a4ff; }
    #landing-view .v3-stat.b .n { color: #5ee6a8; }
    #landing-view .v3-stat.c .n { color: #ffd24a; }
    #landing-view .v3-stat .l {
      font: 600 9px/1.1 'JetBrains Mono', monospace;
      text-transform: uppercase; letter-spacing: 0.1em; color: #8d92ac; margin-top: 6px;
    }

    /* SPORT NAV — 1 row of 6 compact tiles */
    #landing-view .v3-sports {
      padding: 0 36px 20px;
      display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
    }
    #landing-view .v3-sport {
      position: relative; padding: 12px 14px; border-radius: 12px; overflow: hidden;
      cursor: pointer; transition: transform 0.2s; min-height: 80px;
      display: flex; flex-direction: row; align-items: center; gap: 10px;
      border: 1px solid #232944; color: #f2f3fa; background: none; width: 100%;
      font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
      text-decoration: none; background-size: cover; background-position: center;
    }
    #landing-view .v3-sport:hover { transform: translateY(-2px); }
    #landing-view .v3-sport.wag  { background-image: linear-gradient(to bottom, rgba(20,5,60,0.45) 0%, rgba(20,5,60,0.75) 100%), url('/assets/images/WAG_button.jpg'); }
    #landing-view .v3-sport.mag  { background-image: linear-gradient(to bottom, rgba(0,30,15,0.45) 0%, rgba(0,30,15,0.75) 100%), url('/assets/images/MAG_button.jpg'); }
    #landing-view .v3-sport.acro { background-image: linear-gradient(to bottom, rgba(40,15,0,0.45) 0%, rgba(40,15,0,0.75) 100%), url('/assets/images/ACRO_button.jpg'); }
    #landing-view .v3-sport.game { background-image: linear-gradient(to bottom, rgba(26,13,46,0.45) 0%, rgba(59,26,106,0.75) 100%), url('/assets/images/stickit_playnow.jpg'); background-size: cover; background-position: center; background-color: #2a1045; }
    #landing-view .v3-sport.cal  { background: linear-gradient(135deg, #0d1f3c 0%, #1a3a6a 100%); }
    #landing-view .v3-sport.gal  {
      padding: 0;
      background-image: linear-gradient(to bottom, rgba(5,15,30,0.35) 0%, rgba(5,15,30,0.82) 100%),
                        url('/galleries/senior-vic-champs-2026/og-image.jpg');
    }
    #landing-view .v3-sport.gal .gal-cover {
      display: flex; flex-direction: row; align-items: center;
      flex: 1; padding: 12px 14px; text-decoration: none; color: inherit; gap: 10px;
    }
    #landing-view .v3-sport.gal .top { flex-shrink: 0; justify-content: flex-start; }
    #landing-view .v3-sport.gal .lvls { display: none; }
    #landing-view .v3-sport.gal .gal-title {
      font-size: 12px; font-weight: 600; line-height: 1.3; opacity: 0.9;
    }
    #landing-view .v3-sport.gal .gal-links { display: none; }
    #landing-view .v3-sport .top { display: flex; flex-shrink: 0; align-items: center; }
    #landing-view .v3-sport .code {
      font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 26px;
      letter-spacing: -0.03em; line-height: 1;
    }
    #landing-view .v3-sport .bottom {
      flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    }
    #landing-view .v3-sport .name { font-size: 12px; font-weight: 600; opacity: 0.9; }
    #landing-view .v3-sport .arrow { display: none; }
    #landing-view .v3-sport .soon {
      background: #ffd24a; color: #0a0b10;
      font: 700 10px/1 'JetBrains Mono', monospace; padding: 4px 7px; letter-spacing: 0.1em;
    }

    /* NEWS SECTION HEADING */
    #landing-view .v3-section-head {
      padding: 20px 36px 14px; display: flex; align-items: center; gap: 14px;
    }
    #landing-view .v3-section-head h3 {
      font-family: 'Space Grotesk', sans-serif !important; font-weight: 700 !important;
      font-size: 28px !important; margin: 0 !important; letter-spacing: -0.02em; color: #f2f3fa !important;
    }
    #landing-view .v3-section-head .bar { flex: 1; height: 2px; background: linear-gradient(90deg, #232944, transparent); }
    #landing-view .v3-section-head a {
      font: 700 11px/1 'JetBrains Mono', monospace; color: #ffd24a;
      letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
    }

    /* NEWS CARDS */
    #landing-view .v3-news {
      padding: 0 36px 16px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px;
    }
    #landing-view .v3-card.big { grid-row: span 2; }
    #landing-view .v3-card {
      background: #161927; border: 1px solid #232944; border-radius: 14px;
      padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 12px;
      cursor: pointer; transition: border-color 0.2s; color: #f2f3fa; text-decoration: none;
    }
    #landing-view .v3-card:hover { border-color: #ffd24a; }
    #landing-view .v3-card .head { display: flex; justify-content: space-between; align-items: center; }
    #landing-view .v3-card .cat {
      font: 700 10.5px/1 'JetBrains Mono', monospace; padding: 5px 7px; letter-spacing: 0.1em;
    }
    #landing-view .v3-card .cat.wag { color: #c9a4ff; border: 1px solid #c9a4ff; }
    #landing-view .v3-card .cat.mag { color: #5ee6a8; border: 1px solid #5ee6a8; }
    #landing-view .v3-card .cat.neutral { color: #8d92ac; border: 1px solid #232944; }
    #landing-view .v3-card .date { font: 600 11px/1 'JetBrains Mono', monospace; color: #5d6285; letter-spacing: 0.06em; }
    #landing-view .v3-card h4 {
      font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 19px;
      line-height: 1.2; margin: 0; letter-spacing: -0.015em; color: #f2f3fa;
    }
    #landing-view .v3-card p { font-size: 13.5px; color: #8d92ac; margin: 0; }
    #landing-view .v3-card.big h4 { font-size: 26px; }
    #landing-view .v3-card.big .thumb {
      aspect-ratio: 16/9; border-radius: 8px; position: relative; overflow: hidden;
      background: linear-gradient(135deg, rgba(106,61,240,0.25), rgba(11,139,90,0.25)),
                  repeating-linear-gradient(45deg, #1a1d2e, #1a1d2e 8px, #232744 8px, #232744 9px);
    }
    #landing-view .v3-card.big .thumb::after {
      content: 'photo'; position: absolute; top: 10px; left: 12px;
      font: 600 10px/1 'JetBrains Mono', monospace; color: rgba(255,255,255,0.5); letter-spacing: 0.1em;
    }
    #landing-view .v3-card.big .thumb .score {
      position: absolute; bottom: 10px; right: 12px;
      font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 28px;
      color: #ffd24a; letter-spacing: -0.02em;
    }
    /* Row-thumb: big card uses .thumb on desktop; small cards show image on desktop only */
    @media (min-width: 601px) {
      #landing-view .v3-card.big .row-thumb { display: none; }
      #landing-view .v3-card:not(.big) .row-thumb {
        display: block; height: 130px; border-radius: 8px;
        background-size: cover; background-position: center;
        background-color: #1a1d2e;
        background-image: linear-gradient(135deg, rgba(106,61,240,0.25), rgba(11,139,90,0.25)),
                          repeating-linear-gradient(45deg, #1a1d2e, #1a1d2e 8px, #232744 8px, #232744 9px);
      }
    }
    #landing-view .v3-card .body { flex: 1; display: flex; flex-direction: column; gap: 12px; }

    /* GAME CTA */
    #landing-view .v3-game {
      margin: 16px 36px 20px; position: relative;
      background: linear-gradient(110deg, #1a0f33 0%, #2b1565 50%, #6a3df0 110%);
      border-radius: 18px; padding: 26px 30px;
      display: flex; align-items: center; gap: 24px; overflow: hidden;
      border: 1px solid rgba(255,210,74,0.2); text-decoration: none; color: #f2f3fa;
    }
    #landing-view .v3-game::before {
      content: ''; position: absolute; right: 0; top: 0; width: 360px; height: 100%;
      background: radial-gradient(circle at 80% 50%, rgba(255,210,74,0.35), transparent 55%);
      pointer-events: none;
    }
    #landing-view .v3-game .icon {
      width: 64px; height: 64px; background: #ffd24a; color: #0a0b10;
      display: grid; place-items: center; border-radius: 14px;
      transform: rotate(-6deg); font-size: 32px; flex-shrink: 0; z-index: 1;
    }
    #landing-view .v3-game .gbody { flex: 1; z-index: 1; }
    #landing-view .v3-game .k {
      font: 700 11px/1 'JetBrains Mono', monospace; color: #ffd24a;
      letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 6px;
    }
    #landing-view .v3-game .t {
      font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 30px;
      letter-spacing: -0.02em; line-height: 1.05;
    }
    #landing-view .v3-game .s { font-size: 14px; color: rgba(255,255,255,0.75); margin-top: 6px; }
    #landing-view .v3-game .btn {
      z-index: 1; background: #ffd24a; color: #0a0b10; padding: 13px 22px; border-radius: 10px;
      font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px;
      white-space: nowrap; display: inline-flex; align-items: center; gap: 8px;
    }

    /* ABOUT */
    #landing-view .v3-about {
      margin: 0 36px; padding: 18px 22px; background: #161927;
      border: 1px solid #232944; border-left: 3px solid #ffd24a;
      border-radius: 10px; font-size: 13.5px; color: #8d92ac; line-height: 1.55;
    }
    #landing-view .v3-about strong { color: #f2f3fa; }
    #landing-view .v3-about .link-btn { color: #ffd24a; }
    #landing-view .v3-about .link-btn:hover { color: #ffe07a; }
    #landing-view .v3-about a { color: #ffd24a; }
    #landing-view .v3-about a:visited { color: #ffd24a; }
    #landing-view .v3-about a:hover { color: #ffe07a; }

    /* AD + FOOTER */
    #landing-view .v3-ad { margin: 16px 36px 0; }
    #landing-view .v3-foot {
      margin-top: 26px; padding: 18px 36px 28px; border-top: 1px solid #232944;
      display: flex; justify-content: space-between; align-items: center;
      font: 600 11px/1 'JetBrains Mono', monospace;
      color: #5d6285; letter-spacing: 0.08em; text-transform: uppercase;
    }
    #landing-view .v3-foot a { color: #5d6285; text-decoration: none; }
    #landing-view .v3-foot a:hover { color: #8d92ac; }
    #landing-view .v3-foot .link-btn {
      font: 600 11px/1 'JetBrains Mono', monospace;
      letter-spacing: 0.08em; text-transform: uppercase; color: #5d6285;
    }
    #landing-view .v3-foot .link-btn:hover { color: #8d92ac; }

    /* ── COMING SOON MODAL ─────────────────────────────────────────────────── */
    #coming-soon-modal {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.72);
      z-index: 300;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    #coming-soon-modal.open { display: flex; }
    #coming-soon-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 40px 36px;
      max-width: 420px;
      width: 100%;
      text-align: center;
      position: relative;
    }
    #coming-soon-box .cs-icon { font-size: 3rem; margin-bottom: 16px; }
    #coming-soon-box h2 { font-size: 1.5rem; margin-bottom: 12px; }
    #coming-soon-box p { color: var(--muted); line-height: 1.65; margin-bottom: 28px; font-size: 0.93rem; }
    .modal-close {
      position: absolute; top: 14px; right: 16px;
      background: none; border: none; color: var(--muted);
      font-size: 1.2rem; cursor: pointer; padding: 4px 6px; line-height: 1;
    }
    .modal-close:hover { color: var(--text); }
    .modal-dismiss {
      background: var(--accent); color: #fff; border: none;
      padding: 11px 32px; border-radius: 999px;
      cursor: pointer; font-size: 0.93rem; font-weight: 700;
      transition: opacity 0.15s; min-height: 44px;
    }
    .modal-dismiss:hover { opacity: 0.85; }

    /* ── LOADING OVERLAY ───────────────────────────────────────────────────── */
    #loading-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(15,15,19,0.88);
      z-index: 200;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 18px;
    }
    #loading-overlay.open { display: flex; }
    .loading-spinner {
      width: 44px; height: 44px;
      border: 3px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.75s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .loading-text { color: var(--muted); font-size: 0.9rem; }

    /* ── CONTACT PAGE ──────────────────────────────────────────────────────── */
    .contact-main {
      padding: 36px 32px;
      max-width: 640px;
      margin: 0 auto;
      width: 100%;
    }
    .back-btn-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: none;
      border: 1px solid var(--border);
      color: var(--muted);
      padding: 6px 14px;
      border-radius: 999px;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 600;
      transition: all 0.12s;
      margin-bottom: 32px;
      min-height: 36px;
    }
    .back-btn-link:hover { border-color: var(--accent); color: var(--text); }
    .contact-intro { color: var(--muted); font-size: 0.9rem; margin-bottom: 32px; line-height: 1.65; }
    .contact-form { display: flex; flex-direction: column; gap: 22px; }
    .form-group { display: flex; flex-direction: column; gap: 6px; }
    .form-group label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
    .form-group input,
    .form-group select,
    .form-group textarea {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      font-size: 0.95rem;
      padding: 10px 14px;
      width: 100%;
      font-family: inherit;
      transition: border-color 0.15s;
      min-height: 44px;
    }
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus { outline: none; border-color: var(--accent); }
    .form-group textarea { min-height: 140px; resize: vertical; }
    .form-group select {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238888aa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 40px;
    }
    .form-group select option { background: #1a1a24; }
    .form-submit {
      background: var(--accent); color: #fff; border: none;
      padding: 12px 32px; border-radius: 999px;
      cursor: pointer; font-size: 0.95rem; font-weight: 700;
      transition: opacity 0.15s; align-self: flex-start; min-height: 44px;
    }
    .form-submit:hover { opacity: 0.85; }
    .form-note { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

    /* ── MOBILE RESPONSIVE ─────────────────────────────────────────────────── */
    @media (max-width: 720px) {
      .site-header { padding: 16px 16px; }
      .site-header h1 { font-size: 1.35rem; }
      main { padding: 20px 16px; }
      nav { padding: 0 8px; }
      nav button { padding: 12px 14px; font-size: 0.85rem; }
      .header-inner { gap: 10px; }
      #sport-bar { gap: 6px; }
      #back-btn { padding: 4px 10px; font-size: 0.78rem; }
      .badge { font-size: 0.65rem; padding: 2px 6px; }
    }

    @media (max-width: 600px) {
      /* App shell */
      .contact-main { padding: 24px 16px; }
      #drill-box { padding: 20px 16px; border-radius: 12px; }
      #coming-soon-box { padding: 28px 20px; }
      h2 { font-size: 1.1rem; }
      .table-context-header { font-size: 1.15rem; }
      .comp-grid { grid-template-columns: 1fr; }

      /* Landing V3 mobile */
      #landing-view .v3-header { padding: 18px 18px 0; flex-direction: column; align-items: flex-start; gap: 12px; }
      #landing-view .v3-header .right { font-size: 10px; gap: 14px; }
      #landing-view .v3-hero { padding: 22px 18px 18px; grid-template-columns: 1fr; gap: 18px; }
      #landing-view .v3-hero h1 { font-size: 42px !important; }
      #landing-view .v3-hero p { font-size: 15px; }
      #landing-view .v3-stat .n { font-size: 18px; }
      #landing-view .v3-sports { padding: 0 18px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
      #landing-view .v3-sport { min-height: 74px; padding: 10px 6px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
      #landing-view .v3-sport .top { flex-shrink: 0; justify-content: center; }
      #landing-view .v3-sport .code { font-size: 20px; }
      #landing-view .v3-sport .bottom { display: flex; justify-content: center; }
      #landing-view .v3-sport .name { font-size: 10px; text-align: center; }
      #landing-view .v3-sport.gal .gal-cover { padding: 10px 6px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
      #landing-view .v3-sport.gal .top { justify-content: center; }
      #landing-view .v3-sport.gal .gal-title { display: block; font-size: 10px; text-align: center; }
      #landing-view .v3-sport.gal .gal-links { display: none; }
      #landing-view .v3-section-head { padding: 16px 18px 12px; }
      #landing-view .v3-section-head h3 { font-size: 22px !important; }
      #landing-view .v3-news { padding: 0 18px 16px; grid-template-columns: 1fr; gap: 10px; }
      /* Big (featured) card — column layout with full-width image */
      #landing-view .v3-card.big { flex-direction: column; padding: 0; overflow: hidden; }
      #landing-view .v3-card.big .row-thumb {
        display: block !important; width: 100%; height: 160px;
        border-radius: 0; background-size: cover; background-position: center;
        background-color: #1a1d2e;
        background-image: linear-gradient(135deg, rgba(106,61,240,0.25), rgba(11,139,90,0.25)),
                          repeating-linear-gradient(45deg, #1a1d2e, #1a1d2e 8px, #232744 8px, #232744 9px);
      }
      #landing-view .v3-card.big .body { padding: 14px; gap: 8px; }
      #landing-view .v3-card.big h4 { font-size: 18px; line-height: 1.2; }
      #landing-view .v3-card.big p { display: block; }
      /* Smaller cards — horizontal row layout */
      #landing-view .v3-card { flex-direction: row; align-items: stretch; padding: 12px; gap: 12px; }
      #landing-view .v3-card .thumb { display: none; }
      #landing-view .v3-card .row-thumb {
        display: block; flex-shrink: 0; width: 80px; align-self: stretch;
        border-radius: 8px; position: relative;
        background: linear-gradient(135deg, rgba(106,61,240,0.25), rgba(11,139,90,0.25)),
                    repeating-linear-gradient(45deg, #1a1d2e, #1a1d2e 6px, #232744 6px, #232744 7px);
      }
      #landing-view .v3-card .row-thumb .pill {
        position: absolute; bottom: 6px; left: 6px;
        font: 700 9px/1 'JetBrains Mono', monospace;
        background: rgba(0,0,0,0.55); padding: 3px 5px; border-radius: 4px;
        color: #ffd24a; letter-spacing: 0.05em;
      }
      #landing-view .v3-card .body { gap: 6px; }
      #landing-view .v3-card .cat { font-size: 9px; padding: 3px 5px; }
      #landing-view .v3-card h4 { font-size: 15px; line-height: 1.25; }
      #landing-view .v3-card p { display: none; }
      #landing-view .v3-game { margin: 10px 18px 16px; padding: 18px 20px; gap: 14px; border-radius: 14px; flex-wrap: wrap; }
      #landing-view .v3-game .icon { width: 48px; height: 48px; font-size: 24px; border-radius: 10px; }
      #landing-view .v3-game .t { font-size: 22px; }
      #landing-view .v3-game .s { font-size: 12.5px; }
      #landing-view .v3-game .btn { padding: 10px 16px; font-size: 13px; width: 100%; justify-content: center; }
      #landing-view .v3-about { margin: 0 18px; padding: 14px 16px; font-size: 12.5px; }
      #landing-view .v3-ad { margin: 16px 18px 0; }
      #landing-view .v3-foot { padding: 14px 18px 22px; font-size: 9.5px; flex-direction: column; gap: 6px; align-items: flex-start; }
    }

/* ── CALENDAR ────────────────────────────────────────────────────────────── */

.calendar-main { max-width: 900px; margin: 0 auto; padding: 28px 32px; }
.cal-month-group { margin-bottom: 36px; }
.cal-month-heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace; }
.cal-event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 12px; }
.cal-event-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s; }
.cal-event-card:hover { border-color: var(--accent); }
.cal-card--past { opacity: 0.45; }
.cal-card--today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.cal-card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-card-name { font-size: 0.95rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.cal-card-date, .cal-card-location { font-size: 0.82rem; color: var(--muted); display: flex; align-items: flex-start; gap: 7px; }
.cal-card-date i, .cal-card-location i { color: var(--accent); width: 14px; flex-shrink: 0; margin-top: 2px; }
.cal-sport-badge { display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; letter-spacing: 0.06em; text-transform: uppercase; font-family: 'JetBrains Mono', monospace; }
.cal-badge-wag  { background: rgba(124,109,250,0.18); color: #a99fff; }
.cal-badge-mag  { background: rgba(52,211,153,0.18);  color: #6ee7b7; }
.cal-badge-acro { background: rgba(251,146,60,0.18);  color: #fdba74; }
.cal-badge-all  { background: rgba(245,197,24,0.15);  color: #fcd34d; }
.cal-status-pill { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.cal-status-now  { background: rgba(245,197,24,0.2); color: var(--gold); }

@media (max-width: 600px) {
  .calendar-main { padding: 20px 16px; }
  .cal-event-grid { grid-template-columns: 1fr; }
}

/* ── GRAPHS VIEW ─────────────────────────────────────────────────────────── */
#view-graphs { padding: 0; }
.graph-container { max-width: 960px; margin: 0 auto; padding: 24px; }
.graph-search-bar { position: relative; max-width: 480px; margin-bottom: 4px; }
#graph-athlete-suggestions { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface2);
  border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden; z-index: 200; }
.graph-type-row { display: flex; gap: 8px; margin: 16px 0 24px; flex-wrap: wrap; }
.graph-type-row button { display: flex; align-items: center; gap: 7px; padding: 7px 16px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  transition: all 0.15s; font-family: inherit; }
.graph-type-row button:hover { border-color: var(--accent); color: var(--accent); }
.graph-type-row button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.graph-canvas-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 20px 14px; margin-bottom: 20px; }
.graph-canvas-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace; }
.graph-composite-inner { max-width: 420px; margin: 0 auto; }
.graph-slider-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 20px; margin-bottom: 20px; }
.graph-slider-card label { font-size: 0.92rem; color: var(--text); white-space: nowrap; }
.graph-slider-card input[type=range] { flex: 1; min-width: 100px; accent-color: var(--accent); cursor: pointer; }
.graph-slider-note { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.graph-empty { text-align: center; padding: 80px 24px; color: var(--muted); }
.graph-empty i { font-size: 3rem; display: block; margin-bottom: 16px; opacity: 0.3; }
.graph-empty p { font-size: 1rem; }
.graph-athlete-heading { font-size: 1.25rem; font-weight: 700; margin-bottom: 18px; }

@media (max-width: 600px) {
  .graph-container { padding: 14px; }
  .graph-composite-inner { max-width: 100%; }
  .graph-type-row button { padding: 6px 12px; font-size: 0.82rem; gap: 5px; }
  .graph-slider-card { gap: 10px; }
}

/* ── ATHLETE PROFILE ──────────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.profile-card { margin-bottom: 0; }
.profile-history { grid-column: 1 / -1; overflow-x: auto; }

.profile-hero-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.profile-img-wrap { position: relative; flex-shrink: 0; cursor: default; }
.profile-img {
  width: 96px; height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface2);
  display: block;
}
.profile-name  { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.profile-nickname { font-size: 0.88rem; color: var(--muted); margin: 3px 0 8px; font-style: italic; }

.profile-best-row {
  display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.profile-field-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); font-weight: 700;
}
.profile-app-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.8rem; font-weight: 600;
  padding: 2px 9px; border-radius: 20px;
}
.profile-app-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}

.profile-club-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.profile-club-name  { font-size: 0.95rem; font-weight: 600; }
.profile-club-level { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

.profile-hero-club {
  flex-shrink: 0;
  text-align: right;
}
.profile-affil-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.profile-affil-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.profile-affil-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; padding: 3px 8px; border-radius: 6px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
}

.profile-card-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--muted); margin-bottom: 12px;
}
.profile-pb-list { display: flex; flex-direction: column; gap: 8px; }
.profile-pb-item { display: flex; align-items: center; gap: 8px; }
.profile-pb-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.profile-pb-icon {
  width: 24px; height: 24px; flex-shrink: 0; display: inline-block;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.profile-pb-key  {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--muted); flex-shrink: 0;
}
.pb-name-short { display: none; }
.profile-pb-val  { font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; }
.profile-pb-aa {
  margin-top: 4px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.profile-pb-aa .profile-pb-key { color: var(--text); }
.profile-pb-aa .profile-pb-val { font-size: 1rem; color: var(--gold); }

.profile-card-header {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.profile-inner-tabs { display: flex; gap: 3px; }
.profile-inner-tabs .filter-btn { padding: 3px 9px; font-size: 0.72rem; }
.profile-level-filter { display: flex; gap: 4px; margin-bottom: 10px; }
.profile-level-filter .filter-btn { padding: 3px 9px; font-size: 0.72rem; }

/* ── PROFILE SLIDE SWITCHES ───────────────────────────────────────────────── */
.prof-switch { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.prof-switch input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.prof-sw-track {
  width: 28px; height: 16px; border-radius: 8px;
  background: var(--border); position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.prof-sw-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
.prof-switch input:checked + .prof-sw-track { background: var(--sw-color, var(--accent)); }
.prof-switch input:checked + .prof-sw-track::after { transform: translateX(12px); }
.prof-sw-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.prof-series-toggles { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }

.profile-canvas-wrap    { position: relative; width: 100%; }
.profile-canvas-sq canvas { max-height: 280px; }

/* ── PROFILE DATE RANGE SLIDER ── */
.prof-range-wrap { margin: 8px 0 4px; padding: 0 2px; }
.prof-range-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); margin-bottom: 6px; }
.prof-range-track { position: relative; height: 20px; display: flex; align-items: center; }
.prof-range-bg   { position: absolute; left: 0; right: 0; height: 3px; background: var(--border); border-radius: 2px; pointer-events: none; }
.prof-range-fill { position: absolute; height: 3px; background: var(--accent); border-radius: 2px; pointer-events: none; }
.prof-range-track input[type=range] {
  position: absolute; width: 100%; height: 100%;
  top: 0; left: 0; margin: 0;
  -webkit-appearance: none; appearance: none;
  background: transparent; pointer-events: none; outline: none;
}
/* Right slider on top by default so its thumb is reachable; JS swaps when thumbs meet */
.prof-range-track input.prof-range-r { z-index: 5; }
.prof-range-track input.prof-range-l { z-index: 4; }
.prof-range-track input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); cursor: pointer; pointer-events: all;
  border: 2px solid var(--surface); box-shadow: 0 1px 5px rgba(0,0,0,.45);
}
.prof-range-track input[type=range]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); cursor: pointer; pointer-events: all;
  border: 2px solid var(--surface); box-shadow: 0 1px 5px rgba(0,0,0,.45);
  box-sizing: border-box;
}

/* ── CLUB DIRECTORY (still used by the directory table, unrelated to the club profile page) ── */
.club-dir-row:hover { background: var(--surface2); }

/* ── CLUB PROFILE ──────────────────────────────────────────────────────────────
   Ported near-verbatim from the design handoff (club-profile-direction-a.jsx),
   scoped under .clubA so it doesn't fight the site's own --surface/--border tokens.
   See D:\Downloads\design_handoff_club_profile\README.md for the design rationale. */
.clubA {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  font-size: 13px;
}
.clubA *, .clubA *::before, .clubA *::after { box-sizing: border-box; }
/* Tracks the site's live html[data-theme] toggle (assets/nav.js), not a snapshot
   taken at render time, so flipping the theme after the page has loaded works. */
.clubA {
  --cA-bg: #0a0b10; --cA-panel: #14161f; --cA-panel-2: #191c29; --cA-line: #232739; --cA-line-2: #2c3148;
  --cA-text: #f2f3fa; --cA-muted: #8d92ac; --cA-dim: #5d6285;
}
html[data-theme="light"] .clubA {
  --cA-bg: #f7f7f5; --cA-panel: #ffffff; --cA-panel-2: #fbfbfa; --cA-line: #e6e5e0; --cA-line-2: #d8d7d0;
  --cA-text: #1a1a1f; --cA-muted: #63636f; --cA-dim: #93939c;
}
.clubA { background: var(--cA-bg); color: var(--cA-text); border-radius: 12px; overflow: hidden; }
.clubA a { color: inherit; }

/* header */
.clubA-head { display:flex; align-items:center; justify-content:space-between; padding: 20px 32px 0; gap: 20px; flex-wrap: wrap; }
.clubA-brand { display:flex; align-items:center; gap: 13px; }
.clubA-logo { width: 44px; height: 44px; border-radius: 12px; display:grid; place-items:center;
  font: 700 20px 'Space Grotesk',sans-serif; flex-shrink:0; overflow: hidden; }
.clubA-logo img { width: 100%; height: 100%; object-fit: contain; }
.clubA-id h1 { margin:0; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.clubA-id .meta { display:flex; gap:8px; align-items:center; margin-top:4px; font: 600 10.5px/1 'JetBrains Mono',monospace;
  letter-spacing:.06em; text-transform:uppercase; color: var(--cA-muted); }
.clubA-id .meta .code { padding: 2px 6px; border-radius: 5px; border: 1px solid var(--cA-line-2); }

.clubA-switch { display:flex; gap:3px; padding:3px; border:1px solid var(--cA-line); border-radius: 10px; background: var(--cA-panel); }
.clubA-switch button { all:unset; cursor:pointer; padding: 7px 15px; border-radius: 7px; font: 700 12px 'Space Grotesk',sans-serif;
  color: var(--cA-muted); transition: background .15s, color .15s; }
.clubA-switch button.cur { color: #0a0b10; }
.clubA-switch button[disabled] { opacity: .4; cursor: default; }

/* two-column dashboard body */
.clubA-body { display:grid; grid-template-columns: 1fr 300px; gap: 16px; padding: 16px 32px 32px; align-items:start; }
.clubA-main, .clubA-sidebar { display:flex; flex-direction:column; gap: 14px; min-width:0; }

/* profile card (sidebar, non-data "about") */
.clubA-profile { border:1px solid var(--cA-line); border-radius: 12px; background: var(--cA-panel); overflow:hidden; }
.clubA-profile-pic { height: 64px; background-image: repeating-linear-gradient(45deg, var(--cA-panel-2) 0 7px, var(--cA-line) 7px 8px);
  display:flex; align-items:center; justify-content:center; }
.clubA-profile-pic .mono { font: 700 28px 'Space Grotesk',sans-serif; opacity:.4; }
.clubA-profile-body { padding: 12px 14px; display:flex; flex-direction:column; gap:6px; }
.clubA-profile-top { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.clubA-profile-top h2 { margin:0; font-size: 14px; font-weight: 700; }
.clubA-profile-top .est { font:700 9.5px 'JetBrains Mono',monospace; letter-spacing:.06em; text-transform:uppercase; color:var(--cA-muted);
  border:1px solid var(--cA-line-2); border-radius:999px; padding:2px 7px; }
.clubA-profile-desc { font-size: 12px; color: var(--cA-muted); line-height:1.5; margin:0; }
.clubA-profile-facts { display:flex; flex-direction:column; gap:4px; margin-top:2px; padding-top:8px; border-top:1px solid var(--cA-line); }
.clubA-profile-facts div { font-size: 11px; color: var(--cA-text); display:flex; justify-content:space-between; gap: 8px; }
.clubA-profile-facts b { font-family:'JetBrains Mono',monospace; color: var(--cA-muted); font-weight:600; text-align: right; }

/* sidebar stats */
.clubA-stats { display:grid; grid-template-columns: 1fr 1fr; gap:8px; }
.clubA-stat { border:1px solid var(--cA-line); border-radius: 12px; padding: 9px 11px; background: var(--cA-panel); }
.clubA-stat .n { font: 700 17px 'JetBrains Mono',monospace; letter-spacing:-0.02em; }
.clubA-stat .l { font: 600 8.5px/1.2 'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.06em; color:var(--cA-muted); margin-top:4px; }

/* section head */
.clubA-sec { padding: 4px 0 0; }
.clubA-sec .k { font: 700 10px/1 'JetBrains Mono',monospace; letter-spacing:.14em; text-transform:uppercase; }
.clubA-sec h2 { margin: 5px 0 3px; font-size: 19px; font-weight: 700; letter-spacing:-0.015em; }
.clubA-sec p { margin:0; color: var(--cA-muted); font-size: 11.5px; max-width: 62ch; }

/* two-up hero row: chart + records side by side. align-items:stretch (not the
   design mock's "start") plus the flex treatment below lets whichever side is
   naturally taller (varies a lot: MAG has 7 apparatus vs WAG's 4, so a fixed
   height ratio between the two sides doesn't hold) pull the shorter one up to
   match, instead of leaving a dead gap under it. */
.clubA-herorow { display:grid; grid-template-columns: 1.7fr 1fr; gap: 14px; align-items:stretch; }
.clubA-herorow > div { display:flex; flex-direction:column; min-height: 100%; }

/* centerpiece: diverging bar chart */
.clubA-chart { border:1px solid var(--cA-line); border-radius: 12px; background: var(--cA-panel); padding: 12px 14px 8px; display:flex; flex-direction:column; flex: 1; }
.clubA-chart-body { flex: 1; display:flex; flex-direction:column; }
.clubA-chart-rows { flex: 1; display:flex; flex-direction:column; justify-content: space-evenly; }

.clubA-chart-toggle { display:flex; gap:3px; padding:3px; border:1px solid var(--cA-line); border-radius:8px; background:var(--cA-panel); flex-shrink:0; }
.clubA-chart-toggle button { all:unset; cursor:pointer; padding:5px 10px; border-radius:6px; font:700 10px 'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.03em; color:var(--cA-muted); }
.clubA-chart-toggle button.cur { background:var(--cA-panel-2); color:var(--cA-text); }
.clubA-row { display:grid; grid-template-columns: 56px 1fr 64px; align-items:center; gap:8px; padding: 5px 0; border-bottom: 1px solid var(--cA-line); }
.clubA-row:last-child { border-bottom:none; }
.clubA-row .lvl { font: 700 11.5px 'Space Grotesk',sans-serif; }
.clubA-row .raw { font: 600 8px 'JetBrains Mono',monospace; color: var(--cA-muted); margin-top: 1px; }
.clubA-bars { position:relative; height: 11px; }
.clubA-axis0 { position:absolute; top:-3px; bottom:-3px; left:50%; width:1px; background: var(--cA-line-2); }
.clubA-bar-delta { position:absolute; top:0; bottom:0; border-radius:3px; }
.clubA-delta { text-align:right; font: 700 12px 'JetBrains Mono',monospace; }
.clubA-delta .sub { display:block; font: 600 7px 'JetBrains Mono',monospace; color:var(--cA-muted); text-transform:uppercase; letter-spacing:.05em; margin-top:0; }
.clubA-legend { display:flex; gap:12px; margin-top: 8px; flex-shrink: 0; font: 600 8.5px/1 'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.05em; color:var(--cA-muted); }
.clubA-legend span { display:inline-flex; align-items:center; gap:4px; }
.clubA-legend i { width:8px; height:8px; border-radius:2px; display:inline-block; }

/* records: compact list, sits beside the chart */
.clubA-reclist { display:flex; flex-direction:column; gap:6px; }
.clubA-rec { display:grid; grid-template-columns: 46px 1fr auto; align-items:center; gap:8px;
  border:1px solid var(--cA-line); border-radius: 9px; padding: 7px 10px 7px 9px; background: var(--cA-panel); position:relative; overflow:hidden; }
.clubA-rec .ap { font: 700 8.5px/1.2 'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.04em; color:var(--cA-muted); display:flex; flex-direction:column; align-items:flex-start; gap:3px; }
.clubA-rec-icon { width:16px; height:16px; }
.clubA-rec .who { font-size: 11px; font-weight: 600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.clubA-rec .meta { font-size: 8.5px; color: var(--cA-muted); margin-top: 1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.clubA-rec .sc { font: 700 16px 'JetBrains Mono',monospace; letter-spacing:-0.02em; text-align:right; }

/* radar: club-wide average per apparatus (optional levels only), same Chart.js
   component/styling as the athlete profile's Strength Radar. Sits under the
   records list and grows to fill any remaining stretched height. */
.clubA-radar { border:1px solid var(--cA-line); border-radius: 12px; background: var(--cA-panel); padding: 12px; margin-top: 8px; display:flex; flex-direction:column; align-items:center; gap:2px; flex: 1; }
.clubA-radar .cap { font: 600 9px/1 'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.08em; color: var(--cA-muted); align-self:flex-start; margin-bottom:2px; }
.clubA-radar-canvas-wrap { flex: 1; width: 100%; display:flex; align-items:center; justify-content:center; min-height: 230px; }
.clubA-radar-head { display:flex; align-items:center; justify-content:space-between; width:100%; gap:8px; margin-bottom:2px; }
.clubA-radar-select { font: 700 9.5px 'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.04em; color:var(--cA-text); background:var(--cA-panel-2); border:1px solid var(--cA-line-2); border-radius:6px; padding:3px 6px; cursor:pointer; }

/* podium (50%) + competition entries (50%), side by side */
.clubA-podiumrow { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items:start; }

.clubA-podium { display:flex; flex-direction:column; gap:7px; }
.clubA-p { display:grid; grid-template-columns: 28px 1fr 58px 1fr 54px; align-items:center; gap: 10px;
  border:1px solid var(--cA-line); border-radius: 10px; padding: 8px 12px; background: var(--cA-panel); }
.clubA-rank { width:24px; height:24px; border-radius:7px; display:grid; place-items:center; font:700 11px 'JetBrains Mono',monospace; color:#221a06; }
.clubA-rank.r1 { background: linear-gradient(135deg,#ffe27a,#d9a428); }
.clubA-rank.r2 { background: linear-gradient(135deg,#e7e9ee,#aab0bd); }
.clubA-rank.r3 { background: linear-gradient(135deg,#e7b481,#a86a34); }
.clubA-p .ath { font-weight: 700; font-size: 12px; }
.clubA-p .lvl2 { font: 600 9.5px 'JetBrains Mono',monospace; color:var(--cA-muted); text-transform:uppercase; }
.clubA-p .sc2 { font: 700 14px 'JetBrains Mono',monospace; text-align:right; }
.clubA-p .comp { font-size: 10.5px; color: var(--cA-muted); }

/* athletes-per-level: vertical list, sits in the sidebar under the roster
   (narrow column, so a row-per-level list reads better than side-by-side bars) */
.clubA-levels-v { border:1px solid var(--cA-line); border-radius: 12px; background: var(--cA-panel); padding: 12px 14px; display:flex; flex-direction:column; gap:6px; }
.clubA-lv-row { display:grid; grid-template-columns: 46px 1fr 22px; align-items:center; gap:8px; }
.clubA-lv-row .lbl { font: 700 9px 'JetBrains Mono',monospace; color:var(--cA-muted); text-transform:uppercase; }
.clubA-lv-row .track { background: var(--cA-panel-2); border-radius: 4px; overflow:hidden; height: 8px; }
.clubA-lv-row .bar { height: 100%; border-radius: 4px; }
.clubA-lv-row .cnt { font: 700 10px 'JetBrains Mono',monospace; text-align:right; }

.clubA-comps { border:1px solid var(--cA-line); border-radius: 12px; background: var(--cA-panel); padding: 10px 12px; display:flex; flex-direction:column; gap:7px; }
.clubA-yr-row { display:flex; align-items:baseline; gap:8px; }
.clubA-yr-row .y { font: 700 11px 'JetBrains Mono',monospace; color: var(--cA-muted); width: 30px; flex-shrink:0; }
.clubA-yr-chips { display:flex; flex-wrap:wrap; gap:5px; }
.clubA-yr-chip { font-size: 10px; font-weight:600; padding: 3px 7px; border-radius: 6px; background: var(--cA-panel-2); border:1px solid var(--cA-line-2); }
.clubA-yr-chip b { font-family:'JetBrains Mono',monospace; margin-left:3px; }

/* roster: compact scrollable list */
.clubA-roster { border:1px solid var(--cA-line); border-radius: 12px; background: var(--cA-panel); padding: 12px 14px; }
.clubA-roster-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom: 8px; }
.clubA-roster-head h2 { margin:0; font-size: 14px; font-weight: 700; }
.clubA-roster-head .cnt { font: 700 10px 'JetBrains Mono',monospace; color: var(--cA-muted); }
.clubA-rlist {
  display:flex; flex-direction:column; max-height: 228px; overflow-y:auto; border-top:1px solid var(--cA-line);
  scrollbar-width: thin; scrollbar-color: var(--cA-line-2) transparent;
}
.clubA-rlist::-webkit-scrollbar { width: 6px; }
.clubA-rlist::-webkit-scrollbar-track { background: transparent; }
.clubA-rlist::-webkit-scrollbar-thumb { background: var(--cA-line-2); border-radius: 999px; }
.clubA-rlist::-webkit-scrollbar-thumb:hover { background: var(--cA-dim); }
.clubA-rrow { display:flex; align-items:center; gap:9px; padding: 6px 2px; border-bottom: 1px solid var(--cA-line); text-decoration:none; color: var(--cA-text); cursor: pointer; }
.clubA-rrow:last-child { border-bottom:none; }
.clubA-av { width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font:700 8.5px 'JetBrains Mono',monospace; color:#0a0b10; flex-shrink:0; }
.clubA-rrow .nm { font-size: 11.5px; font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.clubA-rrow .lv { font: 700 9px 'JetBrains Mono',monospace; color: var(--cA-muted); border:1px solid var(--cA-line-2); border-radius:5px; padding: 2px 6px; flex-shrink:0; }
.clubA-more2 {
  display:block; width:100%; text-align:center; padding-top:8px; font-size: 10.5px; font-weight:700;
  font-family:'JetBrains Mono',monospace; background:none; border:none; cursor:pointer;
}
.clubA-more2:hover { text-decoration:underline; }

/* roster modal: full athlete list */
#roster-modal {
  display:none; position:fixed; inset:0; background: rgba(0,0,0,0.72); z-index: 300;
  align-items:center; justify-content:center; padding: 24px;
}
#roster-modal.open { display:flex; }
#roster-modal-box {
  background: var(--cA-panel, var(--surface)); border:1px solid var(--cA-line, var(--border));
  border-radius: 16px; padding: 22px 22px 18px; max-width: 420px; width:100%;
  max-height: 82vh; display:flex; flex-direction:column; position:relative; color: var(--cA-text, var(--text));
}
#roster-modal-box .modal-close { color: var(--cA-muted, var(--muted)); }
#roster-modal-box .modal-close:hover { color: var(--cA-text, var(--text)); }
#roster-modal-head { display:flex; justify-content:space-between; align-items:baseline; margin: 0 28px 10px 0; }
#roster-modal-head h2 { margin:0; font-size: 15px; font-weight:700; font-family:'Space Grotesk','Inter',sans-serif; }
#roster-modal-head .cnt { font: 700 10px 'JetBrains Mono',monospace; color: var(--cA-muted, var(--muted)); }
#roster-modal-filter {
  width:100%; margin-bottom:10px; background: var(--cA-panel-2, var(--surface2));
  border:1px solid var(--cA-line, var(--border)); border-radius:8px; padding:8px 11px;
  font-size:.85rem; color: var(--cA-text, var(--text)); font-family:'Space Grotesk',sans-serif; outline:none;
}
#roster-modal-filter:focus { border-color: var(--accent); }
#roster-modal-list { overflow-y:auto; flex:1; border-top:1px solid var(--cA-line, var(--border)); }
#roster-modal-empty { padding: 16px 2px; text-align:center; font-size:.82rem; color: var(--cA-muted, var(--muted)); }

/* curated links/news (distinct) */
.clubA-about { border: 1px dashed var(--cA-line-2); border-radius: 12px; padding: 12px 14px; background: var(--cA-panel-2); display:flex; flex-direction:column; gap: 12px; }
.clubA-about .k { font: 700 9px/1 'JetBrains Mono',monospace; letter-spacing:.1em; text-transform:uppercase; color: var(--cA-muted); margin-bottom:6px; }
.clubA-about h4 { margin:0 0 2px; font-size: 11.5px; font-weight:700; }
.clubA-about .addr { font-size: 10.5px; color: var(--cA-muted); margin-bottom: 6px; }
.clubA-about ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:5px; }
.clubA-about li a { font-size: 11px; font-weight:600; text-decoration: none; }
.clubA-about .news-item { font-size: 10.5px; }
.clubA-about .news-date { font: 600 9px 'JetBrains Mono',monospace; color: var(--cA-muted); display:block; margin-top:1px; }

.clubA-empty { color: var(--cA-muted); font-size: 12px; padding: 10px 2px; }
.clubA-loading { color: var(--cA-muted); font-size: 12px; padding: 40px 0; text-align: center; }

@media (max-width: 900px) {
  .clubA-body { grid-template-columns: 1fr; }
  .clubA-herorow, .clubA-podiumrow { grid-template-columns: 1fr; }
  .clubA-herorow > div { min-height: 0; }
}
@media (max-width: 560px) {
  .clubA-head { padding: 16px 16px 0; }
  .clubA-body { padding: 12px 16px 24px; }
  .clubA-p { grid-template-columns: 24px 1fr 54px; grid-template-rows: auto auto; }
  .clubA-p .comp { grid-column: 2 / -1; }
}

@media (max-width: 700px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-hero-row { flex-wrap: wrap; }
  .profile-hero-club {
    flex: 0 0 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .profile-hero-club .profile-field-label { display: none; }
  .profile-hero-club img { margin: 0; }
  .profile-pb-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .profile-pb-item {
    flex: 1 1 calc(16.66% - 6px);
    flex-direction: column; align-items: center;
    text-align: center; gap: 3px; min-width: 40px;
  }
  .profile-pb-key { width: auto; }
  .profile-pb-val { margin-left: 0; }
  .pb-name-full  { display: none; }
  .pb-name-short { display: inline; }
  .profile-pb-aa { margin-top: 0; padding-top: 0; border-top: none; }
  .profile-pb-aa .profile-pb-val { font-size: 0.9rem; }
}

/* ── LIGHT THEME: LANDING PAGE (must come after #landing-view dark rules) ── */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) #landing-view { background: var(--bg); color: var(--text); }
  html:not([data-theme="dark"]) #landing-view .v3-logo h1 { color: var(--text); }
  html:not([data-theme="dark"]) #landing-view .v3-logo h1 + .sub { color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-header .right { color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-hero h1 { color: var(--text); }
  html:not([data-theme="dark"]) #landing-view .v3-hero p { color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-stat { background: var(--surface); border-color: var(--border); }
  html:not([data-theme="dark"]) #landing-view .v3-stat .l { color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-sport { border-color: var(--border); }
  html:not([data-theme="dark"]) #landing-view .v3-section-head h3 { color: var(--text) !important; }
  html:not([data-theme="dark"]) #landing-view .v3-section-head .bar { background: linear-gradient(90deg, var(--border), transparent); }
  html:not([data-theme="dark"]) #landing-view .v3-card { background: var(--surface); border-color: var(--border); color: var(--text); }
  html:not([data-theme="dark"]) #landing-view .v3-card h4 { color: var(--text); }
  html:not([data-theme="dark"]) #landing-view .v3-card p { color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-card .date { color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-card .cat.neutral { color: var(--muted); border-color: var(--border); }
  html:not([data-theme="dark"]) #landing-view .v3-card.big .thumb {
    background: linear-gradient(135deg, rgba(106,61,240,0.12), rgba(11,139,90,0.12)),
                repeating-linear-gradient(45deg, #e8e8f0, #e8e8f0 8px, #d8d8ea 8px, #d8d8ea 9px);
  }
  html:not([data-theme="dark"]) #landing-view .v3-card:not(.big) .row-thumb {
    background-color: #e8e8f0;
    background-image: linear-gradient(135deg, rgba(106,61,240,0.12), rgba(11,139,90,0.12)),
                      repeating-linear-gradient(45deg, #e8e8f0, #e8e8f0 8px, #d8d8ea 8px, #d8d8ea 9px);
  }
  html:not([data-theme="dark"]) #landing-view .v3-about { background: var(--surface); border-color: var(--border); color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-about strong { color: var(--text); }
  html:not([data-theme="dark"]) #landing-view .v3-foot { border-top-color: var(--border); color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-foot a { color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-foot a:hover { color: var(--text); }
  html:not([data-theme="dark"]) #landing-view .v3-foot .link-btn { color: var(--muted); }
  html:not([data-theme="dark"]) #landing-view .v3-foot .link-btn:hover { color: var(--text); }
  html:not([data-theme="dark"]) #landing-view .v3-hero .copy .kicker { color: #c47d00; }
  html:not([data-theme="dark"]) #landing-view .v3-hero h1 .acc1 { color: #c47d00; }
  html:not([data-theme="dark"]) #landing-view .v3-hero h1 .acc2 { color: #1a8e63; }
  html:not([data-theme="dark"]) #landing-view .v3-hero h1 .slash { color: #c47d00; }
  html:not([data-theme="dark"]) #landing-view .v3-stat.b .n { color: #1a8e63; }
  html:not([data-theme="dark"]) #landing-view .v3-stat.c .n { color: #c47d00; }
  html:not([data-theme="dark"]) #landing-view .v3-section-head a { color: #c47d00; }
  html:not([data-theme="dark"]) #landing-view .v3-card .cat.mag { color: #1a8e63; border-color: #1a8e63; }
  html:not([data-theme="dark"]) #landing-view .v3-card:hover { border-color: #c47d00; }
  html:not([data-theme="dark"]) #landing-view .v3-about a,
  html:not([data-theme="dark"]) #landing-view .v3-about a:visited,
  html:not([data-theme="dark"]) #landing-view .v3-about .link-btn { color: #c47d00; }
}

html[data-theme="light"] #landing-view { background: var(--bg); color: var(--text); }
html[data-theme="light"] #landing-view .v3-logo h1 { color: var(--text); }
html[data-theme="light"] #landing-view .v3-logo h1 + .sub { color: var(--muted); }
html[data-theme="light"] #landing-view .v3-header .right { color: var(--muted); }
html[data-theme="light"] #landing-view .v3-hero h1 { color: var(--text); }
html[data-theme="light"] #landing-view .v3-hero p { color: var(--muted); }
html[data-theme="light"] #landing-view .v3-stat { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] #landing-view .v3-stat .l { color: var(--muted); }
html[data-theme="light"] #landing-view .v3-sport { border-color: var(--border); }
html[data-theme="light"] #landing-view .v3-section-head h3 { color: var(--text) !important; }
html[data-theme="light"] #landing-view .v3-section-head .bar { background: linear-gradient(90deg, var(--border), transparent); }
html[data-theme="light"] #landing-view .v3-card { background: var(--surface); border-color: var(--border); color: var(--text); }
html[data-theme="light"] #landing-view .v3-card h4 { color: var(--text); }
html[data-theme="light"] #landing-view .v3-card p { color: var(--muted); }
html[data-theme="light"] #landing-view .v3-card .date { color: var(--muted); }
html[data-theme="light"] #landing-view .v3-card .cat.neutral { color: var(--muted); border-color: var(--border); }
html[data-theme="light"] #landing-view .v3-card.big .thumb {
  background: linear-gradient(135deg, rgba(106,61,240,0.12), rgba(11,139,90,0.12)),
              repeating-linear-gradient(45deg, #e8e8f0, #e8e8f0 8px, #d8d8ea 8px, #d8d8ea 9px);
}
html[data-theme="light"] #landing-view .v3-card:not(.big) .row-thumb {
  background-color: #e8e8f0;
  background-image: linear-gradient(135deg, rgba(106,61,240,0.12), rgba(11,139,90,0.12)),
                    repeating-linear-gradient(45deg, #e8e8f0, #e8e8f0 8px, #d8d8ea 8px, #d8d8ea 9px);
}
html[data-theme="light"] #landing-view .v3-about { background: var(--surface); border-color: var(--border); color: var(--muted); }
html[data-theme="light"] #landing-view .v3-about strong { color: var(--text); }
html[data-theme="light"] #landing-view .v3-foot { border-top-color: var(--border); color: var(--muted); }
html[data-theme="light"] #landing-view .v3-foot a { color: var(--muted); }
html[data-theme="light"] #landing-view .v3-foot a:hover { color: var(--text); }
html[data-theme="light"] #landing-view .v3-foot .link-btn { color: var(--muted); }
html[data-theme="light"] #landing-view .v3-foot .link-btn:hover { color: var(--text); }
/* yellow/green accent legibility on light backgrounds */
html[data-theme="light"] #landing-view .v3-hero .copy .kicker { color: #c47d00; }
html[data-theme="light"] #landing-view .v3-hero h1 .acc1 { color: #c47d00; }
html[data-theme="light"] #landing-view .v3-hero h1 .acc2 { color: #1a8e63; }
html[data-theme="light"] #landing-view .v3-hero h1 .slash { color: #c47d00; }
html[data-theme="light"] #landing-view .v3-stat.b .n { color: #1a8e63; }
html[data-theme="light"] #landing-view .v3-stat.c .n { color: #c47d00; }
html[data-theme="light"] #landing-view .v3-section-head a { color: #c47d00; }
html[data-theme="light"] #landing-view .v3-card .cat.mag { color: #1a8e63; border-color: #1a8e63; }
html[data-theme="light"] #landing-view .v3-card:hover { border-color: #c47d00; }
html[data-theme="light"] #landing-view .v3-about a,
html[data-theme="light"] #landing-view .v3-about a:visited,
html[data-theme="light"] #landing-view .v3-about .link-btn { color: #c47d00; }

html[data-theme="light"] .cal-badge-wag  { background: rgba(107,92,231,0.1);  color: #5b4ac2; }
html[data-theme="light"] .cal-badge-mag  { background: rgba(26,169,112,0.1);  color: #1a8e63; }
html[data-theme="light"] .cal-badge-acro { background: rgba(217,119,6,0.1);   color: #b45309; }
html[data-theme="light"] .cal-badge-all  { background: rgba(161,138,0,0.1);   color: #856e00; }
