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

    :root, [data-theme="dark"] {
      --bg:       #181e26;
      --surface:  #232a34;
      --surface2: #2d3640;
      --surface3: #38424e;
      --border:   #333c44;
      --border-light: #3e4850;
      --teal:     #F58800;
      --teal-dim: rgba(245,136,0,0.10);
      --blue:     #266867;
      --yellow:   #F8BC24;
      --red:      #c47055;
      --text:     #e8eaec;
      --text-secondary: #9aa0a8;
      --muted:    #5c646c;
      --accent:   #F8BC24;
      --accent-dim: rgba(248,188,36,0.10);
      --mono:     'JetBrains Mono', monospace;
      --sans:     'Space Grotesk', sans-serif;
      --radius:   10px;
      --radius-sm: 6px;
      --transition: 0.2s ease;
    }

    [data-theme="light"] {
      --bg:       #ddd4bf;
      --surface:  #ffffff;
      --surface2: #f0ebde;
      --surface3: #e2dac8;
      --border:   #b8a985;
      --border-light: #9c8d6a;
      --teal:     #d65a00;
      --teal-dim: rgba(214,90,0,0.10);
      --blue:     #2c5e7c;
      --yellow:   #c08a10;
      --red:      #b04a30;
      --text:     #14100c;
      --text-secondary: #3a2f24;
      --muted:    #756855;
      --accent:   #c08a10;
      --accent-dim: rgba(192,138,16,0.12);
    }

    /* bolder borders in light mode */
    [data-theme="light"] .card,
    [data-theme="light"] .stat-card,
    [data-theme="light"] .chart-card,
    [data-theme="light"] .player-card,
    [data-theme="light"] .loading-steps,
    [data-theme="light"] .proj-card {
      border-width: 2px !important;
      box-shadow: 0 3px 10px rgba(60,40,20,0.1) !important;
    }
    [data-theme="light"] .card:hover,
    [data-theme="light"] .stat-card:hover,
    [data-theme="light"] .chart-card:hover,
    [data-theme="light"] .player-card:hover,
    [data-theme="light"] .proj-card:hover {
      box-shadow: 0 6px 20px rgba(60,40,20,0.15) !important;
    }
    [data-theme="light"] header { box-shadow: 0 2px 12px rgba(60,40,20,0.08); border-bottom-width: 2px; }
    [data-theme="light"] sidebar { box-shadow: 3px 0 12px rgba(60,40,20,0.06); border-right-width: 2px; }
    [data-theme="light"] .search-bar-wrap { border-width: 2px !important; box-shadow: 0 4px 20px rgba(60,40,20,0.1); }
    [data-theme="light"] textarea,
    [data-theme="light"] input[type="text"],
    [data-theme="light"] input[type="number"],
    [data-theme="light"] select { border-width: 2px !important; }
    [data-theme="light"] .nav-item.active { border-left-width: 4px; }
    [data-theme="light"] .team-strip { border-bottom-width: 2px; }
    [data-theme="light"] .site-footer { border-top-width: 2px; }
    [data-theme="light"] .search-chip,
    [data-theme="light"] .example-q { border-width: 2px; }
    [data-theme="light"] .pos-badge { border: 1px solid currentColor; font-weight: 800; }
    [data-theme="light"] body { font-size: 17px; font-weight: 500; }
    [data-theme="light"] .nav-item { font-weight: 600; font-size: 16px; }
    [data-theme="light"] .page-title { font-size: 32px; font-weight: 800; }
    [data-theme="light"] .page-sub { font-weight: 500; }
    [data-theme="light"] .card-title { font-weight: 800; font-size: 19px; }
    [data-theme="light"] .stat-value { font-weight: 800; }
    [data-theme="light"] .player-name { font-weight: 800; font-size: 17px; }
    [data-theme="light"] .dynasty-value { font-weight: 800; }
    [data-theme="light"] .findings li { color: var(--text); font-weight: 500; }
    [data-theme="light"] .card p { color: var(--text-secondary); font-weight: 500; }

    body {
      font-family: var(--sans);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      font-size: 17px;
      line-height: 1.6;
    }

    /* ── HEADER ──────────────────────────────────────────────────────────── */
    header {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 18px 28px;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
      box-shadow: 0 1px 8px rgba(0,0,0,0.2);
      position: relative;
      z-index: 10;
    }

    .logo {
      font-family: var(--mono);
      font-size: 22px;
      font-weight: 700;
      color: var(--teal);
      letter-spacing: -0.5px;
      text-decoration: none;
      cursor: pointer;
      transition: opacity 0.15s ease;
    }
    .logo:hover { opacity: 0.8; }

    .logo span { color: var(--accent); }

    .logo-block {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .tagline {
      font-family: var(--sans);
      font-size: 11px;
      font-weight: 500;
      color: var(--muted);
      letter-spacing: 0.1px;
      max-width: 480px;
      line-height: 1.4;
    }

    @media (max-width: 768px) {
      .tagline { display: none; }
    }

    .header-meta {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .league-badge {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
      background: var(--surface2);
      border: 1px solid var(--border);
      padding: 5px 12px;
      border-radius: var(--radius-sm);
      letter-spacing: 0.3px;
    }

    .status-pill {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 600;
      padding: 5px 12px;
      border-radius: 20px;
      border: 1px solid var(--border);
      letter-spacing: 0.3px;
      transition: all var(--transition);
    }

    .status-pill.online  { color: var(--teal); border-color: var(--teal); background: var(--teal-dim); }
    .status-pill.offline { color: var(--red);  border-color: var(--red);  background: rgba(255,97,136,0.08); }

    /* ── LAYOUT ──────────────────────────────────────────────────────────── */
    .layout {
      display: flex;
      min-height: calc(100vh - 53px);
    }

    /* ── SIDEBAR ─────────────────────────────────────────────────────────── */
    sidebar {
      width: 240px;
      min-width: 240px;
      background: var(--surface);
      border-right: 1px solid var(--border);
      padding: 20px 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
      box-shadow: 2px 0 8px rgba(0,0,0,0.1);
      z-index: 5;
    }

    .nav-label {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 600;
      color: var(--muted);
      padding: 8px 20px 6px;
      letter-spacing: 1.5px;
      text-transform: uppercase;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 20px;
      font-size: 15px;
      font-weight: 500;
      color: var(--muted);
      cursor: pointer;
      border-left: 3px solid transparent;
      transition: all var(--transition);
      background: none;
      border-top: none;
      border-right: none;
      border-bottom: none;
      width: 100%;
      text-align: left;
      font-family: var(--sans);
      text-decoration: none;
    }
    .nav-item:link, .nav-item:visited { text-decoration: none; }

    .nav-item:hover {
      color: var(--text-secondary);
      background: var(--surface2);
    }

    .nav-item.active {
      color: var(--teal);
      font-weight: 600;
      border-left-color: var(--teal);
      background: var(--teal-dim);
    }

    .nav-icon {
      font-size: 15px;
      width: 20px;
      text-align: center;
      flex-shrink: 0;
    }

    .nav-spacer { flex: 1; }

    .sidebar-settings {
      padding: 12px 16px;
      border-top: 1px solid var(--border);
      margin-top: 8px;
    }

    .sidebar-settings-title {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1.5px;
      margin-bottom: 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .sidebar-settings-title .arrow {
      transition: transform var(--transition);
      font-size: 12px;
    }

    .sidebar-settings-body {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .sidebar-setting-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .sidebar-setting-row .setting-label {
      font-size: 10px;
      margin-right: 0;
    }

    .nav-footer {
      padding: 12px 20px;
      border-top: 1px solid var(--border);
      margin-top: 8px;
    }

    .nav-version {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 0.5px;
    }

    /* ── CONTENT ─────────────────────────────────────────────────────────── */
    .content {
      flex: 1;
      padding: 36px 40px;
      max-width: 960px;
      overflow-y: auto;
      background: linear-gradient(180deg, var(--bg) 0%, var(--surface2) 100%);
      background-attachment: fixed;
    }

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

    .page-title {
      font-family: var(--sans);
      font-size: 30px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 6px;
      letter-spacing: -0.5px;
    }

    .page-sub {
      font-size: 15px;
      color: var(--muted);
      margin-bottom: 32px;
      line-height: 1.5;
    }

    /* ── FORMS ────────────────────────────────────────────────────────────── */
    textarea, input[type="text"], input[type="number"], select {
      width: 100%;
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: var(--radius-sm);
      padding: 12px 16px;
      font-size: 15px;
      font-family: var(--mono);
      margin-bottom: 12px;
      transition: border-color var(--transition), box-shadow var(--transition);
      box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    }

    textarea { resize: vertical; font-family: var(--sans); font-size: 16px; }

    textarea:focus, input:focus, select:focus {
      outline: none;
      border-color: var(--teal);
      box-shadow: 0 0 0 3px var(--teal-dim);
    }

    label {
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      display: block;
      margin-bottom: 6px;
      letter-spacing: 0.8px;
      text-transform: uppercase;
    }

    .label-optional {
      font-size: 10px;
      font-weight: 400;
      color: var(--muted);
      text-transform: none;
      letter-spacing: 0;
      margin-left: 6px;
    }

    .field { margin-bottom: 16px; }

    /* ── BUTTONS ──────────────────────────────────────────────────────────── */
    .btn-primary {
      width: 100%;
      background: linear-gradient(135deg, var(--teal) 0%, #F8BC24 100%);
      color: #0a0a12;
      border: none;
      padding: 13px 24px;
      border-radius: var(--radius-sm);
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      font-family: var(--mono);
      transition: all var(--transition);
      letter-spacing: 0.3px;
      text-transform: uppercase;
    }

    .btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,136,0,0.3); }
    .btn-primary:active { transform: translateY(0); }
    .btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

    .btn-danger {
      background: none;
      color: var(--red);
      border: 1px solid var(--red);
      padding: 7px 14px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      font-family: var(--mono);
      transition: all var(--transition);
    }
    .btn-danger:hover { background: rgba(255,97,136,0.1); }

    .btn-secondary {
      background: none;
      color: var(--teal);
      border: 1px solid var(--teal);
      padding: 7px 14px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      font-family: var(--mono);
      transition: all var(--transition);
    }
    .btn-secondary:hover { background: var(--teal-dim); }

    .btn-ghost {
      background: var(--surface2);
      color: var(--text-secondary);
      border: 1px solid var(--border);
      padding: 8px 14px;
      border-radius: var(--radius-sm);
      font-size: 13px;
      cursor: pointer;
      font-family: var(--sans);
      transition: all var(--transition);
      text-align: left;
      width: 100%;
    }
    .btn-ghost:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }

    /* ── SEARCH HERO ──────────────────────────────────────────────────────── */
    .search-hero {
      margin-bottom: 28px;
    }

    .search-bar-wrap {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 6px;
      display: flex;
      align-items: flex-end;
      gap: 8px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.2);
      transition: border-color var(--transition), box-shadow var(--transition);
    }
    .search-bar-wrap:focus-within {
      border-color: var(--teal);
      box-shadow: 0 4px 24px rgba(245,136,0,0.15);
    }

    .search-input {
      flex: 1;
      background: none !important;
      border: none !important;
      box-shadow: none !important;
      padding: 12px 14px !important;
      font-size: 16px !important;
      font-family: var(--sans) !important;
      resize: none;
      color: var(--text);
      margin-bottom: 0 !important;
      line-height: 1.5;
    }
    .search-input:focus { outline: none; }
    .search-input::placeholder { color: var(--muted); }

    .search-btn {
      background: linear-gradient(135deg, var(--teal) 0%, #F8BC24 100%);
      color: var(--bg);
      border: none;
      border-radius: 10px;
      padding: 12px 24px;
      font-family: var(--mono);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: all var(--transition);
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .search-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,136,0,0.3); }
    .search-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
    .search-btn-icon { font-size: 16px; }

    .search-chips {
      display: flex;
      gap: 8px;
      margin-top: 14px;
      flex-wrap: wrap;
    }

    .search-chip {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 7px 16px;
      font-size: 12px;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all var(--transition);
      font-family: var(--sans);
      white-space: nowrap;
    }
    .search-chip:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }

    .sleeper-connect {
      margin-top: 16px;
    }

    .sleeper-connect-toggle {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--muted);
      cursor: pointer;
      padding: 8px 0;
      transition: color var(--transition);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .sleeper-connect-toggle:hover { color: var(--text-secondary); }

    .sleeper-fields {
      display: flex;
      gap: 10px;
      margin-top: 8px;
    }
    .sleeper-fields input {
      flex: 1;
      font-size: 13px !important;
      padding: 9px 12px !important;
    }

    /* ── LOADING STEPS ───────────────────────────────────────────────────── */
    .loading-steps {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 24px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }

    .loading-step {
      display: flex;
      align-items: center;
      gap: 10px;
      font-family: var(--mono);
      font-size: 12px;
      color: var(--muted);
      transition: color 0.3s;
    }
    .loading-step.active { color: var(--teal); }
    .loading-step.done   { color: var(--muted); }

    .step-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      background: var(--border);
      flex-shrink: 0;
      transition: all 0.3s;
    }
    .loading-step.active .step-dot { background: var(--teal); box-shadow: 0 0 8px rgba(0,212,170,0.5); }
    .loading-step.done .step-dot   { background: var(--muted); }

    /* ── CARDS ────────────────────────────────────────────────────────────── */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 24px;
      margin-bottom: 16px;
      transition: all var(--transition);
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    .card:hover { border-color: var(--border-light); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

    .card-title {
      font-family: var(--sans);
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .card p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

    .badge {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .badge.high     { background: var(--teal-dim);            color: var(--teal); }
    .badge.medium   { background: rgba(246,201,14,0.12);      color: var(--yellow); }
    .badge.low      { background: rgba(255,97,136,0.12);      color: var(--red); }
    .badge.active   { background: rgba(59,130,246,0.12);      color: var(--blue); }
    .badge.paused   { background: rgba(90,101,120,0.15);      color: var(--muted); }
    .badge.injury   { background: rgba(255,97,136,0.12);      color: var(--red); }

    /* position badges for player cards */
    .pos-badge {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .pos-badge.QB { background: rgba(255,97,136,0.15); color: #ff6188; }
    .pos-badge.RB { background: rgba(59,130,246,0.15); color: #3b82f6; }
    .pos-badge.WR { background: rgba(0,212,170,0.15);  color: #00d4aa; }
    .pos-badge.TE { background: rgba(246,161,14,0.15); color: #f6a10e; }

    .findings { margin: 12px 0; }
    .findings li {
      font-size: 14px;
      color: var(--text-secondary);
      margin-left: 0;
      margin-bottom: 6px;
      line-height: 1.7;
      list-style: none;
      padding-left: 18px;
      position: relative;
    }
    .findings li::before {
      content: '\203A';
      position: absolute;
      left: 0;
      color: var(--teal);
      font-family: var(--mono);
      font-weight: 700;
    }

    .sources { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
    .sources a {
      display: inline-block;
      font-size: 12px;
      font-family: var(--mono);
      color: var(--accent);
      text-decoration: none;
      margin-right: 16px;
      margin-bottom: 4px;
      transition: color var(--transition);
    }
    .sources a:hover { color: var(--teal); }

    .stats-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-bottom: 24px;
    }

    .stat-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 18px;
      transition: all var(--transition);
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }
    .stat-card:hover { border-color: var(--border-light); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

    .stat-label {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-bottom: 8px;
    }

    .stat-value {
      font-family: var(--mono);
      font-size: 28px;
      font-weight: 700;
      color: var(--teal);
    }

    pre {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px;
      font-family: var(--mono);
      font-size: 12px;
      color: var(--teal);
      overflow-x: auto;
      white-space: pre-wrap;
      line-height: 1.6;
    }

    .spinner {
      display: inline-block;
      width: 14px; height: 14px;
      border: 2px solid var(--border);
      border-top-color: var(--teal);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      margin-right: 8px;
      vertical-align: middle;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .row { display: flex; gap: 12px; align-items: flex-end; }
    .row .field { flex: 1; margin-bottom: 0; }

    .optional-row {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
    }

    .optional-row .field {
      flex: 1;
      margin-bottom: 0;
    }

    /* ── EMPTY STATES ────────────────────────────────────────────────────── */
    .empty-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 48px 24px;
      color: var(--muted);
      text-align: center;
    }
    .empty-state-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.5; }
    .empty-state-text { font-family: var(--mono); font-size: 13px; }

    .empty {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--muted);
      padding: 24px 0;
    }

    .run-meta {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
      margin-top: 14px;
      border-top: 1px solid var(--border);
      padding-top: 12px;
    }

    .alert-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-left: 3px solid var(--accent);
      border-radius: var(--radius);
      padding: 16px 20px;
      margin-bottom: 12px;
      transition: border-color var(--transition);
    }
    .alert-card:hover { border-color: var(--border-light); }

    .job-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 20px;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: border-color var(--transition);
    }
    .job-card:hover { border-color: var(--border-light); }

    .job-title {
      font-family: var(--mono);
      font-size: 13px;
      color: var(--text);
      margin-bottom: 4px;
    }

    .job-meta {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
    }

    /* ── PLAYER CARDS ────────────────────────────────────────────────────── */
    .player-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 18px;
      min-width: 200px;
      flex: 1;
      cursor: pointer;
      transition: all var(--transition);
      position: relative;
      overflow: hidden;
    }
    .player-card { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
    .player-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
    .player-card-header { position: sticky; top: 0; background: var(--surface); z-index: 2; padding-bottom: 8px; }
    .player-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
    }
    .player-card.pos-QB::before { background: linear-gradient(90deg, #ff6188, #ff618844); }
    .player-card.pos-RB::before { background: linear-gradient(90deg, #3b82f6, #3b82f644); }
    .player-card.pos-WR::before { background: linear-gradient(90deg, #00d4aa, #00d4aa44); }
    .player-card.pos-TE::before { background: linear-gradient(90deg, #f6a10e, #f6a10e44); }

    .player-name {
      font-weight: 700;
      font-size: 15px;
      color: var(--text);
      margin-bottom: 4px;
    }

    .player-meta {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .dynasty-value {
      font-family: var(--mono);
      font-size: 22px;
      font-weight: 700;
      margin-top: 8px;
    }
    .dynasty-value.high   { color: var(--teal); }
    .dynasty-value.mid    { color: var(--yellow); }
    .dynasty-value.low    { color: var(--red); }

    /* hide dynasty-only UI when the user is in redraft mode (toggled by
       LEAGUE_SETTINGS.format via the .redraft-mode class on <html>) */
    html.redraft-mode .dynasty-only { display: none !important; }

    .dynasty-label {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-top: 2px;
    }

    .gamelog-btn {
      display: inline-block;
      margin-top: 10px;
      padding: 7px 14px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 6px;
      font-family: var(--sans);
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all var(--transition);
      letter-spacing: 0.2px;
    }
    .gamelog-btn:hover {
      border-color: var(--teal);
      color: var(--teal);
      background: var(--teal-dim);
    }

    /* ── Card actions + primary (Compare / Start-Sit) vs secondary (drill-downs) ── */
    .card-actions {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 10px;
    }
    .card-actions .gamelog-btn { margin-top: 0; }

    /* Tab strip inside a player card — replaces the old row of 3 drill-down
       buttons. One tab active, one panel visible below. Tabs flex-share the
       card width so all three fit inside a narrow card (~200px) without any
       horizontal scroll. */
    .card-tabs {
      display: flex;
      gap: 0;
      margin-top: 14px;
      border-bottom: 1px solid var(--border);
    }
    .tab-btn {
      flex: 1 1 0;
      padding: 8px 6px;
      background: none;
      border: none;
      font-family: var(--sans);
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      margin-bottom: -1px;
      transition: color var(--transition), border-color var(--transition);
      white-space: nowrap;
      text-align: center;
    }
    .tab-btn:hover { color: var(--text-secondary); }
    .tab-btn.active {
      color: var(--teal);
      border-bottom-color: var(--teal);
    }
    .card-tab-panel {
      margin-top: 14px;
    }
    .card-action-primary {
      background: var(--teal-dim) !important;
      border-color: var(--teal) !important;
      color: var(--teal) !important;
    }
    .card-action-primary:hover {
      background: var(--teal) !important;
      color: var(--bg) !important;
    }

    /* ── Clickable player name (jumps to /player.html) ── */
    .player-name-link {
      display: inline-block;
      text-decoration: none;
      color: var(--text);
      margin-bottom: 4px;
      transition: color var(--transition);
    }
    .player-name-link:hover {
      color: var(--teal);
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    /* ── Tier badge + positional rank (Elite · RB #3 of 50) ── */
    .dynasty-meta {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 4px;
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
    }
    .tier-badge {
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      border: 1px solid transparent;
    }
    .tier-badge.tier-elite {
      background: linear-gradient(135deg, rgba(245,136,0,0.2), rgba(248,188,36,0.2));
      color: #F58800;
      border-color: rgba(245,136,0,0.4);
    }
    .tier-badge.tier-strong {
      background: rgba(85,196,194,0.15);
      color: var(--teal);
      border-color: rgba(85,196,194,0.4);
    }
    .tier-badge.tier-average {
      background: var(--surface3);
      color: var(--text-secondary);
      border-color: var(--border);
    }
    .tier-badge.tier-depth {
      background: rgba(220,38,38,0.08);
      color: #b53838;
      border-color: rgba(220,38,38,0.25);
    }
    .rank-text {
      font-size: 10px;
      color: var(--muted);
    }

    /* ── CONVERSATION HISTORY ────────────────────────────────────────────── */
    .history-toggle {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--teal) 0%, #F8BC24 100%);
      color: var(--bg);
      border: none;
      font-size: 18px;
      cursor: pointer;
      box-shadow: 0 4px 16px rgba(245,136,0,0.3);
      z-index: 100;
      transition: all var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .history-toggle:hover { transform: scale(1.1); }
    .history-toggle .notif-dot {
      position: absolute;
      top: -2px;
      right: -2px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--red);
      display: none;
    }

    .history-panel {
      position: fixed;
      bottom: 74px;
      right: 20px;
      width: 360px;
      max-height: 480px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: 0 8px 32px rgba(0,0,0,0.4);
      z-index: 99;
      display: none;
      flex-direction: column;
      overflow: hidden;
      animation: fadeIn 0.2s ease;
    }
    .history-panel.open { display: flex; }

    .history-header {
      padding: 14px 16px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .history-header-title {
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 700;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .history-list {
      flex: 1;
      overflow-y: auto;
      padding: 8px;
    }

    .history-item {
      padding: 10px 12px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: background var(--transition);
      margin-bottom: 4px;
    }
    .history-item:hover { background: var(--surface2); }

    .history-q {
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 4px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .history-a {
      font-size: 11px;
      color: var(--muted);
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .history-time {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--muted);
      margin-top: 4px;
    }

    @media (max-width: 768px) {
      .history-panel { width: calc(100vw - 40px); right: 20px; bottom: 74px; }
    }

    /* ── LEAGUE SETTINGS BAR ─────────────────────────────────────────────── */
    .settings-bar {
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 10px 28px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    .setting-group {
      display: flex;
      align-items: center;
      gap: 0;
      flex-shrink: 0;
    }

    .setting-label {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-right: 8px;
      flex-shrink: 0;
    }

    .toggle-group {
      display: flex;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      overflow: hidden;
    }

    .toggle-btn {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 500;
      padding: 6px 12px;
      color: var(--muted);
      background: none;
      border: none;
      cursor: pointer;
      transition: all var(--transition);
      white-space: nowrap;
      border-right: 1px solid var(--border);
    }
    .toggle-btn:last-child { border-right: none; }
    .toggle-btn:hover { color: var(--text-secondary); background: var(--surface3); }
    .toggle-btn.active {
      color: var(--teal);
      background: var(--teal-dim);
      font-weight: 700;
    }

    .settings-divider {
      width: 1px;
      height: 20px;
      background: var(--border);
      flex-shrink: 0;
    }

    /* Mobile-only league settings strip injected by renderMobileSettings().
       Hidden on desktop (sidebar version is used there). */
    .mobile-settings-strip { display: none; }

    @media (max-width: 768px) {
      .settings-bar {
        padding: 8px 16px;
        gap: 12px;
      }
      .setting-label { font-size: 9px; margin-right: 4px; }
      .toggle-btn { font-size: 10px; padding: 5px 8px; }

      .mobile-settings-strip {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 14px;
        padding: 10px 14px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        align-items: center;
      }
      .mobile-setting-group {
        display: flex;
        align-items: center;
        gap: 6px;
      }
      .mobile-setting-label {
        font-family: var(--mono);
        font-size: 9px;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 1px;
      }
      .mobile-settings-strip .toggle-btn { font-size: 10px; padding: 4px 8px; }
    }

    /* ── PLAYER SPLITS ───────────────────────────────────────────────────── */
    .splits-panel {
      margin-top: 16px;
      border-top: 2px solid var(--border);
      padding-top: 18px;
    }

    .split-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }

    .split-label {
      font-family: var(--sans);
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.4px;
      min-width: 90px;
      text-align: right;
      flex-shrink: 0;
    }

    .split-bars {
      flex: 1;
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .split-bar {
      height: 22px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 0 10px;
      font-family: var(--sans);
      font-size: 13px;
      font-weight: 800;
      color: #fff;
      min-width: 40px;
      transition: width 0.6s ease;
    }

    .split-vs {
      font-family: var(--sans);
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
      flex-shrink: 0;
      text-transform: uppercase;
    }

    .tendency-badge {
      display: inline-block;
      font-family: var(--sans);
      font-size: 13px;
      font-weight: 600;
      padding: 7px 14px;
      border-radius: 6px;
      margin: 4px 6px 4px 0;
      line-height: 1.4;
    }

    .tendency-badge.positive { background: var(--teal-dim); color: var(--teal); border: 1px solid var(--teal); }
    .tendency-badge.negative { background: rgba(196,112,85,0.12); color: var(--red); border: 1px solid var(--red); }
    .tendency-badge.neutral  { background: rgba(59,130,246,0.12); color: var(--blue); border: 1px solid var(--blue); }

    .opp-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
      gap: 6px;
      margin-top: 10px;
    }

    .opp-cell {
      text-align: center;
      padding: 10px 6px;
      border-radius: 6px;
      font-family: var(--sans);
      font-size: 14px;
      font-weight: 800;
    }

    .opp-cell .opp-team {
      font-size: 11px;
      font-weight: 700;
      opacity: 0.85;
      margin-bottom: 4px;
      letter-spacing: 0.3px;
    }

    @media (max-width: 768px) {
      .split-label { min-width: 60px; font-size: 11px; }
      .split-bar { font-size: 12px; height: 20px; }
      .opp-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
      .tendency-badge { font-size: 12px; padding: 6px 12px; }
    }

    /* ── ANALYTICS PANEL ────────────────────────────────────────────────── */
    .analytics-panel {
      border-top: 1px solid var(--border);
      padding-top: 14px;
    }

    /* ── rankings page ──────────────────────────────────────────────────── */
    .rankings-controls {
      display: flex;
      gap: 12px;
      align-items: center;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .rankings-filters {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    /* All three controls in the filter row share the same shell so they
       line up pixel-for-pixel even when flex-wraps push them onto their
       own row. Padding-based sizing (not explicit height) so that both
       <button> and <select> end up at the same pixel height — some
       browsers ignore `height` on <select> with flex. Total box height =
       10 + 12 + 10 + 2 = 34px. */
    .rankings-pos,
    .rankings-year {
      box-sizing: border-box;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 700;
      padding: 10px 14px;
      line-height: 1;
      border-radius: 18px;
      cursor: pointer;
      transition: all var(--transition);
      vertical-align: middle;
    }
    .rankings-pos:hover,
    .rankings-year:hover { border-color: var(--accent); color: var(--accent); }
    .rankings-pos.active {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }
    .rankings-year {
      color: var(--text);
      appearance: none;
      -webkit-appearance: none;
      padding-right: 28px;
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23888' d='M0 0l5 6 5-6z'/></svg>");
      background-repeat: no-repeat;
      background-position: right 10px center;
      /* Keep the select at its intrinsic content width; without this it
         stretches to fill the row when the flex container wraps. */
      flex: 0 0 auto;
      width: auto;
      min-width: 92px;
    }
    .rankings-year:focus { outline: none; border-color: var(--accent); }
    .rankings-year:hover { border-color: var(--accent); color: var(--accent); }
    .rankings-year:focus { outline: none; border-color: var(--accent); }

    /* ── Rookies page — small table chips (view-tabs CSS removed with the Current
       Rookies view; keeping .rookie-head-cell + the chips below for the
       prospect table) ──────────────────────────────────────────────────────── */
    .rookie-head-cell { width: 44px; padding-right: 4px !important; }
    .rookie-unranked {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      font-weight: 500;
      letter-spacing: 0.5px;
    }
    .rookie-tier-chip {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 800;
      padding: 2px 7px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--text-secondary);
      letter-spacing: 0.5px;
    }
    .rookie-source-chip {
      font-family: var(--mono);
      font-size: 9px;
      font-weight: 700;
      padding: 1px 5px;
      border-radius: 4px;
      margin-left: 6px;
      letter-spacing: 0.5px;
      vertical-align: middle;
    }
    .rookie-source-ktc { background: rgba(85,196,194,0.15); color: var(--teal); border: 1px solid rgba(85,196,194,0.4); }
    .rookie-source-rb  { background: var(--surface3); color: var(--muted); border: 1px solid var(--border); }
    .rookie-note {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--yellow);
      cursor: help;
      margin-left: 4px;
    }
    #rankings-search {
      box-sizing: border-box;
      flex: 1;
      min-width: 200px;
      padding: 10px 14px;
      border: 1px solid var(--border);
      border-radius: 18px;
      background: var(--surface);
      color: var(--text);
      font-family: var(--mono);
      font-size: 12px;
      line-height: 1;
      vertical-align: middle;
    }
    .rank-section-title {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 700;
      margin: 18px 0 8px;
    }
    .rankings-table-wrap {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      overflow-x: auto;
    }
    .rankings-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    .rankings-table th {
      text-align: left;
      padding: 10px 12px;
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      font-weight: 700;
      border-bottom: 1px solid var(--border);
      background: var(--surface2);
    }
    .rankings-table th.sortable {
      cursor: pointer;
      user-select: none;
      transition: color 0.12s ease;
      /* Kill browser default click/focus outlines — the caret + color
         change are enough to indicate the active sort; an extra outline
         made the active column read as a pill/button. */
      outline: none;
    }
    .rankings-table th.sortable:hover { color: var(--accent); }
    .rankings-table th.sortable:focus,
    .rankings-table th.sortable:active { outline: none; }
    .rankings-table th.sortable .sort-caret {
      display: inline-block;
      margin-left: 4px;
      opacity: 0.35;
      font-size: 9px;
    }
    .rankings-table th.sortable.sorted { color: var(--accent); }
    .rankings-table th.sortable.sorted .sort-caret { opacity: 1; }
    .rankings-table td {
      padding: 8px 12px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
    }
    .rank-row { cursor: pointer; transition: background 0.12s ease; }
    .rank-row:hover { background: var(--surface2); }
    .rank-num {
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 800;
      color: var(--muted);
      width: 40px;
    }
    .rank-star { width: 32px; padding-right: 4px !important; }
    .watch-btn {
      background: none;
      border: none;
      color: var(--muted);
      font-size: 18px;
      cursor: pointer;
      padding: 2px 4px;
      transition: color 0.15s ease;
    }
    .watch-btn:hover, .watch-btn.starred { color: var(--yellow); }
    .rank-name { font-weight: 700; color: var(--text); white-space: nowrap; }
    .rank-team {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--text-secondary);
      font-weight: 700;
    }
    .rank-age { font-family: var(--mono); font-size: 12px; color: var(--text-secondary); width: 50px; text-align: right; }
    .rankings-table th:nth-child(6) { text-align: right; }  /* Age header aligns with numeric data cells */
    .rank-value {
      font-family: var(--mono);
      font-size: 14px;
      font-weight: 800;
      width: 96px;
      text-align: right;
      /* Give the right-rail column its own breathing room so the Δ Value
         arrows in the preceding cell don't crowd the dynasty value. */
      padding-left: 20px !important;
      padding-right: 16px !important;
    }
    .rank-value.high { color: var(--teal); }
    .rank-value.mid { color: var(--yellow); }
    .rank-value.low { color: var(--muted); }
    .rankings-table th.rank-value-head { text-align: right; }

    /* Position-specific stat columns — only rendered when a single position
       is selected. Right-aligned numeric cells; pending/muted variants for
       loading vs missing data (didn't play that season). */
    .rank-stat {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--text);
      text-align: right;
      white-space: nowrap;
    }
    .rank-stat.muted { color: var(--muted); }
    .rank-stat.pending { color: var(--border); font-weight: 400; }
    .rankings-table th.rank-stat-head { text-align: right; }

    .rank-trend {
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 700;
      text-align: right;
      width: 100px;
      white-space: nowrap;
    }
    .rank-trend.up    { color: #2d9d6b; }
    .rank-trend.down  { color: #c14545; }
    .rank-trend.muted { color: var(--muted); font-weight: 500; }
    .rank-trend-head { text-align: right; }

    /* Tier-band row shading — subtle gradient from the left accent into the row. */
    .rank-row.tier-row-elite td:first-child,
    .rank-row.tier-row-elite .rank-num {
      box-shadow: inset 3px 0 0 #F58800;
    }
    .rank-row.tier-row-strong td:first-child,
    .rank-row.tier-row-strong .rank-num {
      box-shadow: inset 3px 0 0 var(--teal);
    }
    .rank-row.tier-row-average td:first-child,
    .rank-row.tier-row-average .rank-num {
      box-shadow: inset 3px 0 0 var(--border);
    }
    .rank-row.tier-row-depth td:first-child,
    .rank-row.tier-row-depth .rank-num {
      box-shadow: inset 3px 0 0 transparent;
    }

    @media (max-width: 768px) {
      .rankings-controls { flex-direction: column; align-items: stretch; }
      /* hide Age column on phones (col 6: # · star · name · pos · team · age · value/trend) */
      .rankings-table th:nth-child(6), .rankings-table td:nth-child(6) { display: none; }
      .rankings-table { font-size: 12px; }
      .rank-trend { width: 70px; font-size: 11px; }
    }

    /* ── start/sit page ─────────────────────────────────────────────────── */
    .ss-wrap { display: flex; flex-direction: column; gap: 16px; }
    .ss-verdict-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 24px 28px;
      display: flex;
      align-items: center;
      gap: 24px;
      box-shadow: var(--shadow);
    }
    .ss-verdict-meta { flex: 1; }
    .ss-player-name {
      font-size: 24px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.1;
      margin-bottom: 4px;
    }
    .ss-player-sub {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.6px;
    }
    .ss-verdict-badge {
      color: #fff;
      font-family: var(--mono);
      font-weight: 800;
      font-size: 24px;
      padding: 14px 26px;
      border-radius: var(--radius-sm);
      letter-spacing: 1px;
    }
    .ss-confidence {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
      letter-spacing: 0.8px;
    }
    .ss-summary {
      background: var(--surface);
      border: 1px solid var(--border);
      border-left: 3px solid var(--accent);
      border-radius: var(--radius-sm);
      padding: 16px 20px;
      font-size: 15px;
      color: var(--text-secondary);
      line-height: 1.6;
    }
    .ss-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 14px;
    }
    .ss-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 16px 18px;
    }
    .ss-card-title {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      font-weight: 700;
      margin-bottom: 10px;
    }
    .ss-big-num {
      font-family: var(--mono);
      font-size: 36px;
      font-weight: 800;
      color: var(--accent);
      line-height: 1;
    }
    .ss-big-text {
      font-size: 22px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.1;
    }
    .ss-small-label {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 0.6px;
      margin-top: 4px;
      margin-bottom: 8px;
    }
    .ss-meta-line {
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 4px;
    }
    .ss-factors {
      list-style: none;
      padding: 0;
      margin: 8px 0 0 0;
    }
    .ss-factors li {
      font-size: 12px;
      color: var(--text-secondary);
      padding: 4px 0;
      border-bottom: 1px dashed var(--border);
    }
    .ss-factors li:last-child { border-bottom: none; }

    @media (max-width: 768px) {
      .ss-verdict-card { flex-direction: column; align-items: flex-start; padding: 18px 20px; gap: 14px; }
      .ss-verdict-badge { font-size: 18px; padding: 10px 18px; }
      .ss-player-name { font-size: 20px; }
    }

    /* head-to-head verdict + side-by-side columns */
    .ss-h2h-verdict {
      background: var(--surface);
      border: 1px solid var(--border);
      border-left: 6px solid var(--teal);
      border-radius: var(--radius);
      padding: 22px 28px;
      box-shadow: var(--shadow);
    }
    .ss-h2h-label {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 800;
      color: var(--teal);
      text-transform: uppercase;
      letter-spacing: 1.4px;
      margin-bottom: 6px;
    }
    .ss-h2h-winner {
      font-size: 32px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.1;
    }
    .ss-h2h-sub {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      margin-top: 6px;
    }
    .ss-h2h-reason {
      font-size: 14px;
      color: var(--text-secondary);
      margin-top: 10px;
      line-height: 1.5;
    }

    .ss-h2h-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .ss-h2h-col {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 16px 18px;
    }
    .ss-h2h-col.winner {
      border: 2px solid var(--teal);
      box-shadow: 0 0 0 2px rgba(38, 166, 154, 0.12);
    }
    .ss-h2h-col-header {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 10px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border);
    }
    .ss-h2h-name {
      font-size: 17px;
      font-weight: 800;
      color: var(--text);
      flex: 1;
      min-width: 0;
    }
    .ss-h2h-meta {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 0.4px;
    }
    .ss-h2h-badge {
      color: #fff;
      font-family: var(--mono);
      font-weight: 800;
      font-size: 11px;
      padding: 5px 10px;
      border-radius: 4px;
      letter-spacing: 0.6px;
    }
    .ss-h2h-summary {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.5;
      margin-bottom: 12px;
      padding-bottom: 12px;
      border-bottom: 1px dashed var(--border);
    }
    .ss-h2h-stat {
      margin-bottom: 12px;
    }
    .ss-h2h-stat:last-child { margin-bottom: 0; }
    .ss-h2h-stat-label {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .ss-h2h-stat-big {
      font-family: var(--mono);
      font-size: 20px;
      font-weight: 800;
      color: var(--accent);
    }
    .ss-h2h-stat-unit {
      font-size: 11px;
      color: var(--muted);
      font-weight: 600;
    }
    .ss-h2h-stat-sub {
      font-size: 11px;
      color: var(--text-secondary);
      margin-top: 2px;
    }

    @media (max-width: 768px) {
      .ss-h2h-grid { grid-template-columns: 1fr; }
      .ss-h2h-winner { font-size: 24px; }
      .ss-h2h-verdict { padding: 18px 20px; }
    }

    /* ── player profile page ─────────────────────────────────────────────── */
    .profile-back {
      display: inline-block;
      font-family: var(--mono);
      font-size: 12px;
      color: var(--muted);
      text-decoration: none;
      margin-bottom: 14px;
      transition: color 0.15s ease;
    }
    .profile-back:hover { color: var(--accent); }

    #profile-card.player-card {
      padding: 24px 28px;
    }
    .profile-header {
      display: flex;
      align-items: center;
      gap: 20px;
      margin-bottom: 20px;
      padding-bottom: 20px;
      border-bottom: 1px solid var(--border);
    }
    #profile-headshot {
      width: 96px;
      height: 96px;
      border-radius: 12px;
      object-fit: cover;
      border: 2px solid var(--border);
      flex-shrink: 0;
    }
    .profile-meta { flex: 1; min-width: 0; }
    .profile-name {
      font-size: 28px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.1;
      margin-bottom: 6px;
    }
    .profile-sub {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--muted);
      letter-spacing: 0.4px;
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      flex-wrap: wrap;
    }
    .profile-status { font-size: 12px; }

    .profile-stat-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 12px;
      margin-bottom: 18px;
    }
    .profile-stat {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 14px 16px;
    }
    .profile-stat-label {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .profile-stat-value {
      font-family: var(--mono);
      font-size: 24px;
      font-weight: 800;
      color: var(--accent);
      line-height: 1;
    }

    .profile-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 4px;
    }
    .profile-actions .btn-secondary {
      padding: 9px 16px;
      font-size: 13px;
    }

    @media (max-width: 768px) {
      #profile-card.player-card { padding: 18px 18px; }
      .profile-header { flex-direction: column; align-items: flex-start; gap: 14px; }
      #profile-headshot { width: 72px; height: 72px; }
      .profile-name { font-size: 22px; }
      .profile-stat-value { font-size: 20px; }
    }

    /* single-column split cards */
    .split-stack {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .split-card {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 12px 14px;
    }
    .split-card-title {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      font-weight: 700;
      margin-bottom: 8px;
    }
    .split-card-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 4px;
    }
    .split-card-row:last-child { margin-bottom: 0; }
    .split-card-name {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      width: 70px;
      flex-shrink: 0;
    }
    .split-card-bar-wrap {
      flex: 1;
      height: 18px;
      background: var(--surface);
      border-radius: 4px;
      overflow: hidden;
    }
    .split-card-bar {
      height: 100%;
      border-radius: 4px;
      transition: width 0.4s ease;
    }
    .split-card-val {
      font-family: var(--mono);
      font-size: 14px;
      font-weight: 800;
      min-width: 44px;
      text-align: right;
    }

    /* per-opponent color legend */
    .opp-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      margin-bottom: 10px;
      font-family: var(--mono);
      font-size: 10px;
      color: var(--text-secondary);
    }
    .opp-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .opp-legend-swatch {
      display: inline-block;
      width: 14px;
      height: 14px;
      border: 1.5px solid;
      border-radius: 3px;
    }

    /* metric definition cards: name, value, plain-english blurb */
    .metric-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 10px;
      margin-bottom: 4px;
    }
    .metric-card {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
    }
    .metric-card .metric-name {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .metric-card .metric-value {
      font-family: var(--mono);
      font-size: 20px;
      font-weight: 800;
      color: var(--accent);
      line-height: 1.1;
      margin-bottom: 4px;
    }
    .metric-card .metric-blurb {
      font-size: 11px;
      color: var(--text-secondary);
      line-height: 1.4;
    }

    /* 3 key insights — bold, numbered, prominent */
    .key-insights {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .key-insight {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--surface2);
      border-left: 3px solid var(--accent);
      border-radius: var(--radius-sm);
      padding: 12px 14px;
    }
    .key-insight-num {
      flex-shrink: 0;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-family: var(--mono);
      font-weight: 800;
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .key-insight-text {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.4;
    }

    .gauge-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
    }

    .gauge-label {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      min-width: 90px;
      text-align: right;
      flex-shrink: 0;
    }

    .gauge-bar-wrap {
      flex: 1;
      height: 14px;
      background: var(--surface2);
      border-radius: 4px;
      overflow: hidden;
      position: relative;
    }

    .gauge-bar {
      height: 100%;
      border-radius: 4px;
      transition: width 0.8s ease;
      position: relative;
    }

    .gauge-value {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      min-width: 50px;
      text-align: right;
      flex-shrink: 0;
    }

    .donut-wrap {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
      align-items: center;
      justify-items: center;
      gap: 12px;
      margin: 16px 0;
    }

    .donut-label {
      text-align: center;
      min-width: 0;
      max-width: 100%;
    }

    .donut-label .donut-pct {
      font-family: var(--mono);
      font-size: 20px;
      font-weight: 800;
      color: var(--teal);
      white-space: nowrap;
    }

    .donut-label .donut-desc {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-top: 4px;
      line-height: 1.3;
    }

    .donut-wrap canvas { max-width: 100%; height: auto; }

    .epa-trend {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 10px 14px;
      background: var(--surface2);
      border-radius: var(--radius-sm);
      margin: 12px 0;
    }

    .epa-half {
      text-align: center;
      flex: 1;
    }

    .epa-half .epa-val {
      font-family: var(--mono);
      font-size: 18px;
      font-weight: 700;
    }

    .epa-half .epa-label {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--muted);
      text-transform: uppercase;
      margin-top: 2px;
    }

    .epa-arrow {
      font-size: 20px;
      flex-shrink: 0;
    }

    @media (max-width: 768px) {
      .gauge-label { min-width: 70px; font-size: 9px; }
      .donut-wrap { flex-direction: column; gap: 12px; }
    }

    /* ── NEWS TICKER ──────────────────────────────────────────────────────── */
    .news-ticker {
      background: var(--surface2);
      border-bottom: 1px solid var(--border);
      padding: 7px 28px 7px 70px;
      font-family: var(--mono);
      font-size: 12px;
      color: var(--text-secondary);
      overflow: hidden;
      white-space: nowrap;
      position: relative;
    }

    .ticker-label {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      padding: 0 16px;
      background: var(--surface2);
      color: var(--red);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-size: 10px;
      z-index: 2;
    }

    .ticker-content {
      display: inline-block;
      animation: tickerScroll 30s linear infinite;
    }

    .ticker-item {
      display: inline;
      margin-right: 40px;
    }

    .ticker-item .ticker-dot {
      color: var(--muted);
      margin: 0 8px;
    }

    @keyframes tickerScroll {
      0%   { transform: translateX(0); }
      100% { transform: translateX(-50%); }
    }

    .ticker-paused .ticker-content {
      animation-play-state: paused;
    }

    /* ── POWER RANKINGS ────────────────────────────────────────────────────── */
    .ranking-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 16px;
      border-bottom: 1px solid var(--border);
      transition: background var(--transition);
    }
    .ranking-row:last-child { border-bottom: none; }
    .ranking-row:hover { background: var(--surface2); }
    .ranking-row.is-you { background: var(--teal-dim); border-left: 3px solid var(--teal); }

    .rank-num {
      font-family: var(--mono);
      font-size: 16px;
      font-weight: 800;
      width: 28px;
      text-align: center;
      flex-shrink: 0;
    }

    .rank-bar-wrap {
      flex: 1;
      height: 20px;
      background: var(--surface2);
      border-radius: 4px;
      overflow: hidden;
      position: relative;
    }

    .rank-bar {
      height: 100%;
      border-radius: 4px;
      transition: width 0.8s ease;
    }

    .rank-tier {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      flex-shrink: 0;
      min-width: 80px;
      text-align: center;
    }
    .rank-tier.contender { background: var(--teal-dim); color: var(--teal); }
    .rank-tier.playoff   { background: rgba(59,130,246,0.12); color: var(--blue); }
    .rank-tier.bubble    { background: rgba(246,201,14,0.12); color: var(--yellow); }
    .rank-tier.rebuilder { background: rgba(255,97,136,0.12); color: var(--red); }

    /* ── SKELETON LOADING ─────────────────────────────────────────────────── */
    .skeleton {
      background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: var(--radius-sm);
    }

    .skeleton-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      margin-bottom: 14px;
    }

    .skeleton-line {
      height: 12px;
      margin-bottom: 10px;
      border-radius: 4px;
    }
    .skeleton-line.w-full { width: 100%; }
    .skeleton-line.w-75 { width: 75%; }
    .skeleton-line.w-50 { width: 50%; }
    .skeleton-line.w-25 { width: 25%; }
    .skeleton-line.h-lg { height: 20px; }

    .skeleton-circle {
      width: 48px;
      height: 48px;
      border-radius: 50%;
    }

    @keyframes shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    /* ── NOTIFICATION BADGE ─────────────────────────────────────────────── */
    .nav-badge {
      font-family: var(--mono);
      font-size: 9px;
      font-weight: 700;
      background: var(--red);
      color: #fff;
      border-radius: 10px;
      padding: 1px 6px;
      margin-left: auto;
      min-width: 16px;
      text-align: center;
      display: none;
    }
    .nav-badge.visible { display: inline-block; }

    /* ── THEME TOGGLE ────────────────────────────────────────────────────── */
    .theme-toggle {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 20px;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 16px;
      transition: all var(--transition);
      flex-shrink: 0;
    }
    .theme-toggle:hover { border-color: var(--teal); background: var(--teal-dim); }

    /* ── TRADE CALCULATOR ─────────────────────────────────────────────────── */
    .trade-columns {
      display: flex;
      gap: 16px;
      align-items: flex-start;
      margin-bottom: 16px;
    }

    .trade-side {
      flex: 1;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
    }

    .trade-side-header {
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      margin-bottom: 12px;
      text-align: center;
    }
    .trade-side-header.give    { background: rgba(255,97,136,0.12); color: var(--red); }
    .trade-side-header.receive { background: var(--teal-dim); color: var(--teal); }

    .trade-player-input {
      margin-bottom: 8px !important;
    }

    .trade-arrow {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      color: var(--muted);
      padding-top: 50px;
      flex-shrink: 0;
    }

    @media (max-width: 768px) {
      .trade-columns { flex-direction: column; }
      .trade-arrow { padding-top: 0; font-size: 20px; transform: rotate(90deg); }
    }

    /* ── ROSTER HEATMAP ─────────────────────────────────────────────────── */
    .heatmap-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-top: 20px;
    }

    .heatmap-col {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }

    .heatmap-header {
      padding: 12px 14px;
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .heatmap-header.QB { background: rgba(255,97,136,0.12); color: #ff6188; }
    .heatmap-header.RB { background: rgba(59,130,246,0.12); color: #3b82f6; }
    .heatmap-header.WR { background: rgba(0,212,170,0.12);  color: #00d4aa; }
    .heatmap-header.TE { background: rgba(246,161,14,0.12); color: #f6a10e; }

    .heatmap-header .col-total {
      font-size: 10px;
      font-weight: 600;
      opacity: 0.7;
    }

    .heatmap-player {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 14px;
      border-bottom: 1px solid var(--border);
      transition: background var(--transition);
    }
    .heatmap-player:last-child { border-bottom: none; }
    .heatmap-player:hover { background: var(--surface2); }

    .hm-name {
      font-size: 12px;
      color: var(--text);
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 120px;
    }

    .hm-value {
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 700;
      min-width: 40px;
      text-align: right;
    }

    .hm-bar {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 2px;
      transition: width 0.5s ease;
    }

    .heatmap-summary {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-top: 14px;
    }

    .hm-summary-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px;
      text-align: center;
    }

    .hm-summary-label {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 6px;
    }

    .hm-summary-grade {
      font-family: var(--mono);
      font-size: 28px;
      font-weight: 800;
    }

    @media (max-width: 768px) {
      .heatmap-grid { grid-template-columns: repeat(2, 1fr); }
      .heatmap-summary { grid-template-columns: repeat(2, 1fr); }
    }

    /* ── CHARTS ─────────────────────────────────────────────────────────── */
    .charts-section {
      margin-top: 20px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .chart-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      transition: all var(--transition);
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }
    .chart-card:hover { border-color: var(--border-light); box-shadow: 0 4px 16px rgba(0,0,0,0.18); }

    .chart-card.full-width {
      grid-column: 1 / -1;
    }

    .chart-title {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 16px;
    }

    .chart-card canvas {
      max-height: 260px;
    }

    /* ── PROJECTIONS ─────────────────────────────────────────────────────── */
    .proj-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .proj-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }

    .proj-card.full { grid-column: 1 / -1; }

    .proj-header {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 600;
      margin-bottom: 14px;
    }

    .proj-stat-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
    }
    .proj-stat-row:last-child { border-bottom: none; }

    .proj-stat-label {
      font-size: 12px;
      color: var(--text-secondary);
    }

    .proj-stat-value {
      font-family: var(--mono);
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
    }

    .proj-explanation {
      margin-top: 8px;
      margin-bottom: 14px;
    }
    .proj-explanation summary {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      cursor: pointer;
      padding: 4px 0;
      list-style: none;
      transition: color var(--transition);
      user-select: none;
    }
    .proj-explanation summary::-webkit-details-marker { display: none; }
    .proj-explanation summary:hover { color: var(--text-secondary); }
    .proj-explanation summary::before {
      content: '\25BE\00a0';
      display: inline-block;
      transition: transform var(--transition);
    }
    .proj-explanation[open] summary::before { transform: rotate(0deg); }
    .proj-explanation:not([open]) summary::before { transform: rotate(-90deg); }
    .proj-explanation-body {
      padding: 10px 12px;
      margin-top: 8px;
      background: var(--surface2);
      border-left: 2px solid var(--border);
      border-radius: 4px;
      font-size: 12px;
      font-style: italic;
      color: var(--text-secondary);
      line-height: 1.6;
      opacity: 0.9;
    }

    .proj-badge {
      display: inline-block;
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 4px;
      margin: 3px 4px 3px 0;
    }
    .proj-badge.boom { background: var(--teal-dim); color: var(--teal); }
    .proj-badge.bust { background: rgba(224,82,82,0.12); color: var(--red); }
    .proj-badge.info { background: rgba(85,196,194,0.12); color: #55c4c2; }

    .schedule-cell {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      padding: 6px 8px;
      border-radius: 4px;
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 600;
      min-width: 50px;
      margin: 2px;
    }
    .schedule-cell .opp { font-size: 9px; font-weight: 400; opacity: 0.7; margin-bottom: 2px; }
    .schedule-cell.easy { background: var(--teal-dim); color: var(--teal); }
    .schedule-cell.mid  { background: rgba(248,188,36,0.12); color: var(--yellow); }
    .schedule-cell.hard { background: rgba(224,82,82,0.12); color: var(--red); }

    @media (max-width: 768px) {
      .proj-grid { grid-template-columns: 1fr; }
    }

    /* ── NFL TEAM STRIP ──────────────────────────────────────────────────── */
    .ac-wrap { position: relative; }
    .ac-dropdown {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      right: 0;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.18);
      max-height: 260px;
      overflow-y: auto;
      z-index: 1000;
      display: none;
    }
    .ac-dropdown.open { display: block; }
    .ac-item {
      padding: 8px 12px;
      cursor: pointer;
      font-size: 13px;
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      border-bottom: 1px solid var(--border);
    }
    .ac-item:last-child { border-bottom: none; }
    .ac-item:hover, .ac-item.active { background: var(--surface2); }
    .ac-item .ac-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); flex-shrink: 0; }

    .team-strip {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      padding: 12px 20px;
    }

    .team-strip-row {
      display: grid;
      grid-template-columns: 80px 1fr 1fr 1fr 1fr;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }
    .team-strip-row:last-child { margin-bottom: 0; }

    .team-strip-row .conference-label {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 800;
      text-align: left;
    }

    .division-cell {
      display: flex;
      align-items: center;
      gap: 4px;
      justify-content: center;
      border-left: 1px solid var(--border);
      padding-left: 8px;
    }
    .division-cell:first-of-type { border-left: none; padding-left: 0; }

    .division-cell .division-name {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 800;
      white-space: nowrap;
      text-align: center;
      width: 100%;
    }

    .team-strip-header {
      margin-bottom: 4px;
    }
    .team-strip-header .division-cell {
      border-left: none;
      padding-left: 0;
    }

    .team-logo-btn {
      background: none;
      border: 2px solid transparent;
      border-radius: 6px;
      padding: 3px;
      cursor: pointer;
      transition: all var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .team-logo-btn:hover { border-color: var(--teal); background: var(--teal-dim); transform: translateY(-2px); }

    .team-logo-btn img {
      height: 42px;
      width: 42px;
      object-fit: contain;
    }

    /* ── TEAM MODAL ──────────────────────────────────────────────────────── */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      z-index: 999;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      backdrop-filter: blur(4px);
    }
    .modal-backdrop.open { display: flex; }

    .modal-content {
      background: var(--surface);
      border: 2px solid var(--border);
      border-radius: var(--radius);
      max-width: 800px;
      width: 100%;
      max-height: 85vh;
      overflow-y: auto;
      box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    }

    .modal-header {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 24px 28px;
      border-bottom: 2px solid var(--border);
      position: sticky;
      top: 0;
      background: var(--surface);
      z-index: 2;
    }

    .modal-header img {
      width: 64px;
      height: 64px;
      object-fit: contain;
    }

    .modal-team-info { flex: 1; }

    .modal-team-name {
      font-family: var(--sans);
      font-size: 24px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 4px;
    }

    .modal-team-meta {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }

    .modal-close {
      background: var(--surface2);
      border: 2px solid var(--border);
      border-radius: 50%;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 18px;
      color: var(--text);
      transition: all var(--transition);
      flex-shrink: 0;
    }
    .modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

    .modal-body {
      padding: 24px 28px;
    }

    .room-section {
      margin-bottom: 28px;
    }

    .room-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 2px solid var(--border);
    }

    .room-title {
      font-family: var(--sans);
      font-size: 14px;
      font-weight: 800;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .room-count {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
      margin-left: auto;
    }

    .room-players {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 10px;
    }

    .room-player {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all var(--transition);
    }
    .room-player:hover { border-color: var(--teal); background: var(--teal-dim); }

    .room-player img {
      width: 40px;
      height: 40px;
      border-radius: 6px;
      object-fit: cover;
      flex-shrink: 0;
      background: var(--surface3);
    }

    .room-player-info { flex: 1; min-width: 0; }

    .room-player-name {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .room-player-meta {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      margin-top: 2px;
    }

    .news-item {
      padding: 12px 14px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-left: 3px solid var(--teal);
      border-radius: var(--radius-sm);
      margin-bottom: 8px;
    }

    .news-headline {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
    }

    .news-snippet {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.5;
    }

    .news-meta {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      margin-top: 6px;
    }

    @media (max-width: 768px) {
      .team-strip { padding: 6px 8px; overflow-x: hidden; }
      .team-strip-header { display: none; }
      .team-strip-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 8px;
        margin-bottom: 6px;
        min-width: 0;
      }
      .team-strip-row .conference-label { display: none; }
      .division-cell {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 4px;
        padding: 0;
        border-left: none;
      }
      .division-cell .division-name { display: none; }
      .team-logo-btn { padding: 1px; }
      .team-logo-btn img { height: 34px; width: 34px; }
    }
    /* very narrow phones — shrink logos a touch so all 8 per row still fit */
    @media (max-width: 380px) {
      .team-strip { padding: 6px 6px; }
      .team-strip-row { gap: 4px 6px; }
      .division-cell { gap: 3px; }
      .team-logo-btn img { height: 28px; width: 28px; }
    }
    @media (max-width: 768px) {
      .modal-content { max-height: 92vh; }
      .modal-header { padding: 16px 18px; }
      .modal-body { padding: 16px 18px; }
      .modal-team-name { font-size: 18px; }
      .room-players { grid-template-columns: 1fr; }
    }

    /* ── HERO EMPTY STATE ─────────────────────────────────────────────────── */
    .hero-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 32px;
      margin-top: 24px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }

    .hero-title {
      font-family: var(--sans);
      font-size: 20px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 16px;
    }

    .hero-features {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .hero-feature {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px;
      background: var(--surface2);
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
    }

    .hero-feature-icon {
      font-size: 20px;
      flex-shrink: 0;
      width: 28px;
      text-align: center;
    }

    .hero-feature-text {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.5;
    }

    .hero-feature-text strong {
      color: var(--text);
      display: block;
      margin-bottom: 2px;
      font-size: 13px;
    }

    /* ── FOOTER ───────────────────────────────────────────────────────────── */
    .site-footer {
      border-top: 1px solid var(--border);
      padding: 20px 28px;
      padding-right: 80px;   /* clear the fixed conversation-history bubble (bottom-right: 20px + 44px + gap) */
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
      background: var(--surface);
    }

    .footer-links {
      display: flex;
      gap: 16px;
    }

    .footer-links a {
      color: var(--muted);
      text-decoration: none;
      transition: color var(--transition);
    }
    .footer-links a:hover { color: var(--text-secondary); }
    /* Data Sources link inherits the footer-link styling — don't override
       padding / line-height or it baseline-mismatches the draftmind.ai link. */
    .ds-footer-link { /* no overrides — inherits .footer-links a */ }

    /* ── Fantasy Calculator ──────────────────────────────────────────────────── */
    .fc-hero {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 22px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    }
    .fc-sides {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      gap: 16px;
      align-items: stretch;
      margin-bottom: 16px;
    }
    .fc-side {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 16px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
    }
    .fc-side-label {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      color: var(--muted);
    }
    .fc-side-label-a { color: #b53838; }
    .fc-side-label-b { color: var(--teal); }
    .fc-side-inputs { display: flex; flex-direction: column; gap: 8px; }
    .fc-side-inputs input {
      margin-bottom: 0 !important;
      box-shadow: none !important;
      border: 1px solid var(--border) !important;
      border-radius: 8px !important;
    }
    .fc-add-btn {
      align-self: flex-start;
      padding: 6px 12px;
      background: none;
      border: 1px dashed var(--border);
      border-radius: 6px;
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      cursor: pointer;
      transition: color var(--transition), border-color var(--transition);
    }
    .fc-add-btn:hover { color: var(--teal); border-color: var(--teal); }
    .fc-arrow {
      align-self: center;
      font-family: var(--mono);
      font-size: 24px;
      color: var(--muted);
      padding: 0 6px;
    }
    .fc-calc-btn { width: 100%; }

    /* Result */
    .fc-verdict-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-left-width: 4px;
      border-radius: var(--radius-sm);
      padding: 18px 20px;
      margin-bottom: 16px;
    }
    .fc-verdict-card.fc-verdict-fair  { border-left-color: var(--muted); }
    .fc-verdict-card.fc-verdict-win   { border-left-color: var(--teal); }
    .fc-verdict-card.fc-verdict-lose  { border-left-color: #b53838; }
    .fc-verdict-label {
      font-family: var(--sans);
      font-size: 20px;
      font-weight: 800;
      color: var(--text);
      letter-spacing: -0.3px;
    }
    .fc-verdict-detail {
      font-size: 13px;
      color: var(--text-secondary);
      margin-top: 4px;
      line-height: 1.5;
    }
    .fc-verdict-format {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 0.8px;
      text-transform: uppercase;
      margin-top: 10px;
    }
    .fc-sides-result {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .fc-side-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 16px;
    }
    .fc-side-card-head {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 12px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border);
    }
    .fc-side-card-label {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      color: var(--muted);
    }
    .fc-side-card-total {
      font-family: var(--mono);
      font-size: 22px;
      font-weight: 800;
      color: var(--text);
    }
    .fc-side-card-players { display: flex; flex-direction: column; gap: 10px; }
    .fc-player-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      gap: 10px;
      border-bottom: 1px dashed var(--border);
    }
    .fc-player-row:last-child { border-bottom: none; }
    .fc-player-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .fc-player-name { font-weight: 700; font-size: 14px; }
    .fc-player-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
    .fc-player-value-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .fc-player-value {
      font-family: var(--mono);
      font-size: 15px;
      font-weight: 800;
    }
    .fc-player-value.high { color: var(--teal); }
    .fc-player-value.mid  { color: var(--yellow); }
    .fc-player-value.low  { color: var(--red); }
    .fc-player-error .fc-player-name { color: var(--muted); }
    .fc-player-missing {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--red);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }

    /* Data Sources modal — block continues below */
    /* ── Auth (magic-link sign-in) ───────────────────────────────────────────
       [data-auth-nav] slot lives inside .header-meta. Button matches the
       existing pill-toggle aesthetic; modal reuses the same blur backdrop
       pattern as the Data Sources modal. */
    [data-auth-nav] {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .auth-email {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      padding: 4px 10px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 12px;
      max-width: 200px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      letter-spacing: 0.3px;
    }
    .auth-btn {
      padding: 6px 14px;
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      background: var(--surface2);
      color: var(--text-secondary);
      border: 1px solid var(--border);
      border-radius: 16px;
      cursor: pointer;
      transition: color var(--transition), border-color var(--transition), background var(--transition);
    }
    .auth-btn:hover {
      border-color: var(--teal);
      color: var(--teal);
      background: var(--teal-dim);
    }

    .auth-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.55);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1200;
      padding: 20px;
    }
    .auth-modal {
      position: relative;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 32px 32px 28px;
      width: 100%;
      max-width: 420px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    }
    .auth-modal h2 {
      margin: 0 0 10px;
      font-family: var(--sans);
      font-size: 20px;
      font-weight: 800;
      color: var(--text);
      letter-spacing: -0.2px;
    }
    .auth-modal p {
      margin: 0 0 20px;
      color: var(--text-secondary);
      font-size: 13px;
      line-height: 1.55;
    }
    .auth-modal input[type=email] {
      width: 100%;
      padding: 10px 12px;
      font-family: var(--sans);
      font-size: 15px;
      background: var(--surface2);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      box-sizing: border-box;
      margin-bottom: 12px;
      transition: border-color var(--transition), box-shadow var(--transition);
    }
    .auth-modal input[type=email]:focus {
      outline: none;
      border-color: var(--teal);
      box-shadow: 0 0 0 3px var(--teal-dim);
    }
    .auth-modal button[type=submit],
    .auth-modal button:not(.auth-close) {
      width: 100%;
      padding: 11px 14px;
      font-family: var(--sans);
      font-size: 14px;
      font-weight: 700;
      background: var(--teal);
      color: var(--bg);
      border: none;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: opacity var(--transition), transform var(--transition);
      letter-spacing: 0.2px;
    }
    .auth-modal button:hover:not(.auth-close) {
      opacity: 0.9;
      transform: translateY(-1px);
    }
    .auth-close {
      position: absolute;
      top: 12px;
      right: 14px;
      width: 36px;
      height: 36px;
      background: none;
      border: none;
      font-size: 22px;
      line-height: 1;
      color: var(--muted);
      cursor: pointer;
      border-radius: 50%;
      padding: 0;
      transition: color var(--transition), background var(--transition);
    }
    .auth-close:hover {
      color: var(--text);
      background: var(--surface2);
    }

    @media (max-width: 768px) {
      .auth-email { max-width: 120px; font-size: 10px; }
      .auth-btn { padding: 5px 10px; font-size: 10px; }
      .auth-modal { padding: 26px 22px 22px; }
      .auth-modal h2 { font-size: 17px; }
    }

    /* ── Data Sources modal ─────────────────────────────────────────────────── */
    .ds-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.55);
      z-index: 1200;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      backdrop-filter: blur(4px);
    }
    .ds-modal-backdrop.open { display: flex; }
    .ds-modal {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      max-width: 720px;
      width: 100%;
      max-height: 85vh;
      overflow-y: auto;
      padding: 28px 32px 24px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.35);
      position: relative;
    }
    .ds-close {
      position: absolute;
      top: 12px;
      right: 14px;
      width: 36px;
      height: 36px;
      background: none;
      border: none;
      color: var(--muted);
      font-size: 26px;
      line-height: 1;
      cursor: pointer;
      border-radius: 50%;
      transition: color var(--transition), background var(--transition);
    }
    .ds-close:hover { color: var(--text); background: var(--surface2); }
    .ds-title {
      font-family: var(--sans);
      font-size: 20px;
      font-weight: 800;
      color: var(--text);
      margin: 0 40px 10px 0;
      letter-spacing: -0.2px;
    }
    .ds-intro {
      font-size: 13px;
      line-height: 1.6;
      color: var(--text-secondary);
      margin: 0 0 20px 0;
    }
    .ds-section {
      margin-bottom: 18px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
    }
    .ds-cat {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1.2px;
      margin-bottom: 8px;
    }
    .ds-source {
      font-size: 13px;
      line-height: 1.55;
      color: var(--text-secondary);
      margin-bottom: 8px;
    }
    .ds-source:last-child { margin-bottom: 0; }
    .ds-source a {
      color: var(--teal);
      text-decoration: none;
      font-weight: 700;
    }
    .ds-source a:hover { text-decoration: underline; text-underline-offset: 3px; }
    .ds-plain {
      color: var(--text);
      font-weight: 700;
    }
    .ds-code {
      font-family: var(--mono);
      font-size: 11px;
      background: var(--surface2);
      border: 1px solid var(--border);
      padding: 1px 5px;
      border-radius: 4px;
      color: var(--text-secondary);
      white-space: nowrap;
    }
    .ds-meta {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 0.4px;
      margin-top: 20px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
    }

    @media (max-width: 768px) {
      .ds-modal-backdrop {
        padding: 0;
        align-items: flex-end;
      }
      .ds-modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 22px 20px 20px;
      }
      .ds-title { font-size: 17px; }
      .ds-intro { font-size: 12px; }
      .ds-source { font-size: 12px; }
    }

    /* ── RUNNING INDICATOR ────────────────────────────────────────────────── */
    .nav-item.running::after {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--teal);
      margin-left: auto;
      animation: pulse 1.5s ease infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.3; }
    }

    /* ── MOBILE ─────────────────────────────────────────────────────────── */
    @media (max-width: 768px) {
      header {
        padding: 12px 16px;
        gap: 8px;
      }

      .league-badge { display: none; }

      .layout {
        flex-direction: column;
        min-height: auto;
      }

      sidebar {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }

      .nav-label, .nav-spacer, .nav-footer, .sidebar-settings { display: none; }

      .nav-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 12px 16px;
        white-space: nowrap;
        font-size: 12px;
      }

      .nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--teal);
      }

      .nav-icon { font-size: 14px; }

      .content {
        padding: 20px 16px;
        max-width: 100%;
      }

      .page-title { font-size: 18px; }
      .page-sub { font-size: 12px; margin-bottom: 16px; }

      .optional-row {
        flex-direction: column;
        gap: 0;
      }

      .optional-row .field {
        margin-bottom: 12px;
      }

      .row {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
      }

      .row .field { flex: unset; }

      .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .stat-value { font-size: 20px; }

      .card { padding: 16px; }

      .job-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
      }

      #player-cards {
        flex-direction: column !important;
      }

      .charts-section {
        grid-template-columns: 1fr;
      }

      pre {
        font-size: 11px;
        padding: 12px;
      }

      textarea, input[type="text"], input[type="number"], select {
        font-size: 14px;
      }

      .search-bar-wrap { flex-direction: column; border-radius: 12px; align-items: stretch; }
      .search-bar-wrap .ac-wrap { width: 100%; }
      .search-btn { width: 100%; justify-content: center; border-radius: 8px; }
      .search-chips { gap: 6px; }
      .search-chip { font-size: 11px; padding: 6px 12px; }
      .sleeper-fields { flex-direction: column; }
      .hero-features { grid-template-columns: 1fr; }
      .site-footer { flex-direction: column; gap: 8px; text-align: center; }

      /* trade calculator mobile */
      .trade-columns { flex-direction: column; }
      .trade-arrow { padding-top: 0; font-size: 20px; transform: rotate(90deg); align-self: center; }

      /* fantasy calculator mobile — stack the two sides vertically, rotate the arrow */
      .fc-hero { padding: 16px; }
      .fc-sides { grid-template-columns: 1fr; }
      .fc-arrow { transform: rotate(90deg); padding: 4px 0; }
      .fc-sides-result { grid-template-columns: 1fr; }
      .fc-verdict-label { font-size: 17px; }

      /* power rankings mobile */
      .ranking-row { gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
      .rank-num { font-size: 14px; width: 22px; }
      .rank-bar-wrap { min-width: 60px; }
      .rank-tier { font-size: 9px; min-width: 65px; padding: 2px 6px; }

      /* chart flex rows (TD box + chart) mobile */
      .charts-section > div[style*="display:flex"] { flex-direction: column !important; }
      .charts-section > div[style*="display:flex"] > .chart-card { min-width: unset !important; max-width: unset !important; }

      /* compare cards mobile */
      #compare-cards { flex-direction: column !important; }

      /* settings bar dividers hidden on mobile */
      .settings-divider { display: none; }

      /* news ticker mobile */
      .news-ticker { font-size: 11px; padding: 6px 16px; }
    }

    /* ── PLAYER COMPS PAGE ──────────────────────────────────────────────── */

    /* top-k dropdown: explicit content-sized width so the native <select>
       can't auto-stretch to fill its flex parent and bleed past the
       rounded container edge. flex: 0 0 auto + width: auto + max-width
       gives a stable ~120-130px shell at the default font-size. */
    .comps-top-k-select {
      flex: 0 0 auto;
      width: auto;
      max-width: 140px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      font-family: var(--mono);
      font-size: 13px;
      cursor: pointer;
      -webkit-appearance: menulist;
      appearance: menulist;
    }

    .comps-target-summary {
      margin-top: 14px;
      font-size: 13px;
      color: var(--text-secondary);
      font-family: var(--mono);
      line-height: 1.6;
    }

    .comps-role-chip {
      display: inline-block;
      padding: 2px 8px;
      background: var(--surface3);
      color: var(--teal);
      border-radius: 4px;
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin: 0 4px;
    }

    .comps-radar-row {
      display: flex;
      gap: 16px;
      margin-top: 20px;
      align-items: stretch;
    }

    .comps-radar-card {
      flex: 1;
      padding: 18px;
    }

    .comps-radar-card canvas {
      max-height: 360px;
    }

    /* QB-only — tighter container, right-rail legend owns the negative space */
    .comps-radar-row-passer {
      max-width: 760px;
      margin-left: auto;
      margin-right: auto;
    }

    .comps-radar-row-passer .comps-radar-card {
      max-width: 380px;
      flex: 0 0 380px;
    }

    .comps-axis-legend {
      flex: 1;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .comps-axis-legend-title {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--muted);
      font-weight: 700;
      font-family: var(--mono);
      margin-bottom: 10px;
    }

    .comps-axis-row {
      font-size: 13px;
      color: var(--text-secondary);
      margin-bottom: 8px;
      line-height: 1.5;
    }

    .comps-axis-row strong {
      color: var(--teal);
      font-family: var(--mono);
      font-weight: 700;
      margin-right: 4px;
    }

    .comps-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 14px;
      margin-top: 20px;
    }

    .comps-card {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 14px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      text-decoration: none;
      color: inherit;
      transition: transform 0.15s ease, border-color 0.15s ease;
    }

    .comps-card:hover {
      transform: translateY(-2px);
      border-color: var(--teal);
      text-decoration: none;
    }

    .comps-card-head {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .comps-card-name {
      font-weight: 700;
      font-size: 14px;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .comps-card-meta {
      font-size: 11px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 4px;
      margin-top: 2px;
    }

    .comps-similarity-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 4px;
    }

    .comps-similarity-bar {
      flex: 1;
      height: 6px;
      background: var(--surface2);
      border-radius: 3px;
      overflow: hidden;
    }

    .comps-similarity-fill {
      height: 100%;
      border-radius: 3px;
      transition: width 0.4s ease;
    }

    .comps-sim-high { background: var(--teal); }
    .comps-sim-mid  { background: var(--yellow); }
    .comps-sim-low  { background: var(--muted); }

    .comps-similarity-pct {
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 700;
      color: var(--text);
      min-width: 38px;
      text-align: right;
    }

    .comps-axis-row-small {
      font-size: 11px;
      color: var(--text-secondary);
      font-family: var(--mono);
      line-height: 1.45;
    }

    .comps-axis-row-small strong {
      color: var(--teal);
      font-weight: 700;
      margin-right: 2px;
    }

    .comps-card-value {
      font-size: 11px;
      color: var(--muted);
      font-family: var(--mono);
      margin-top: 4px;
    }

    .comps-empty-card,
    .comps-error-card {
      margin-top: 20px;
      padding: 18px 20px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-left: 3px solid var(--yellow);
      border-radius: var(--radius);
      font-size: 14px;
      color: var(--text-secondary);
      line-height: 1.55;
      display: flex;
      align-items: flex-start;
      gap: 12px;
    }

    .comps-error-icon {
      color: var(--yellow);
      font-size: 22px;
      line-height: 1;
      flex-shrink: 0;
    }

    .comps-cache-chip {
      display: inline-block;
      margin-top: 12px;
      padding: 4px 10px;
      background: var(--surface2);
      color: var(--muted);
      border-radius: 12px;
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 600;
    }

    .comps-methodology {
      margin-top: 14px;
      padding: 12px 14px;
      font-size: 11px;
      color: var(--muted);
      font-family: var(--mono);
      line-height: 1.55;
      border-top: 1px solid var(--border);
    }

    /* skeleton loading */
    .comps-skeleton {
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin-top: 20px;
    }

    .comps-skeleton-header,
    .comps-skeleton-radar,
    .comps-skeleton-cards > div {
      background: linear-gradient(90deg, var(--surface2), var(--surface3), var(--surface2));
      background-size: 200% 100%;
      animation: shimmer 1.4s infinite;
      border-radius: var(--radius);
    }

    .comps-skeleton-header { height: 90px; }
    .comps-skeleton-radar  { height: 320px; }

    .comps-skeleton-cards {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 14px;
    }

    .comps-skeleton-cards > div { height: 160px; }

    /* mobile collapse */
    @media (max-width: 768px) {
      .comps-radar-row { flex-direction: column; }
      .comps-radar-row-passer { max-width: 100%; }
      .comps-radar-row-passer .comps-radar-card {
        max-width: 100%;
        flex: 1;
      }
      .comps-cards-grid { grid-template-columns: 1fr; }
      .comps-axis-legend { padding: 14px; }
      .comps-axis-row { font-size: 12px; }
    }

    /* very narrow phones: tighten the top-k pill so the autocomplete
       input keeps a reasonable amount of horizontal room next to it.
       At 380px viewport this leaves ~190px for the input vs. ~158px
       under the default 140px pill — meaningful for typing names. */
    @media (max-width: 480px) {
      .comps-top-k-select {
        max-width: 110px;
        padding: 10px 8px;
        font-size: 12px;
      }
    }
