/* ============================================================================
   NRL DRAFT INDEX
   FILE: styles.css
   ----------------------------------------------------------------------------
   DESIGN CONCEPT
   A live draft room under stadium floodlights on match night. Deep navy
   "night sky" backgrounds, a warm floodlight-gold accent used only for the
   thing that matters most right now (whoever is on the clock), and a
   scoreboard/ticker feel carried by the condensed display face and a mono
   utility face for every number on the page.

   TOKEN SYSTEM — SECTION 0.1
   ========================================================================== */

:root {
  /* ---- Colour: backgrounds ---- */
  --bg-void: #071620;
  --bg-panel: #0F2530;
  --bg-panel-raised: #163544;
  --bg-panel-hover: #1C4152;

  /* ---- Colour: accents ---- */
  --floodlight: #FFC53D;   /* primary accent — on the clock, primary actions */
  --floodlight-dim: #8A6A1F;
  --siren: #FF4655;        /* alerts / injury status */
  --turf: #2A6B52;         /* success / subtle dividers */

  /* ---- Colour: text ---- */
  --text-hi: #F4F8F6;
  --text-lo: #85A0A8;
  --text-faint: #4E6871;

  /* ---- Colour: position system (also referenced inline via JS for chips) ---- */
  --pos-hok: #F2704F;
  --pos-mid: #4E8FB0;
  --pos-edg: #3FB88A;
  --pos-hfb: #B084E8;
  --pos-ctr: #E85D9E;
  --pos-wfb: #4ED2C7;

  /* ---- Type ---- */
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* ---- Layout ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --border-subtle: 1px solid rgba(133, 160, 168, 0.14);
}

/* ----------------------------------------------------------------------------
   SECTION 0.2 — RESET & BASE
---------------------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
  background: var(--bg-void);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(255, 197, 61, 0.07), transparent),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(78, 143, 176, 0.08), transparent);
  color: var(--text-hi);
  font-family: var(--font-body);
  line-height: 1.4;
  min-height: 100vh;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--floodlight);
  outline-offset: 2px;
}

input, select {
  font-family: inherit;
  color: var(--text-hi);
  background: var(--bg-panel-raised);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
}

.hidden { display: none !important; }

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

/* ============================================================================
   SECTION 0.5 — MAIN NAV (shared across every top-level page)
   ========================================================================== */
#main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 32px;
  background: var(--bg-void);
  border-bottom: var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 21; /* above scoreboard-header's own sticky z-index */
}
.main-nav-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}
.main-nav-links {
  display: flex;
  gap: 4px;
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
}
.main-nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-lo);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.main-nav-link:hover { color: var(--text-hi); }
.main-nav-link.is-active {
  background: var(--floodlight);
  color: #071620;
}

/* ============================================================================
   SECTION 1 — SCOREBOARD HEADER (signature element)
   ========================================================================== */
#scoreboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-void) 100%);
  border-bottom: var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: box-shadow 0.6s ease;
}

/* The "floodlight" — pulses gold when it's the human's turn to pick. */
#scoreboard-header.is-user-turn {
  box-shadow: 0 6px 40px -4px rgba(255, 197, 61, 0.35);
  animation: floodlight-pulse 2.4s ease-in-out infinite;
}
@keyframes floodlight-pulse {
  0%, 100% { box-shadow: 0 6px 40px -4px rgba(255, 197, 61, 0.28); }
  50%      { box-shadow: 0 6px 52px -2px rgba(255, 197, 61, 0.5); }
}

.header-brand { display: flex; flex-direction: column; gap: 2px; }

.header-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-lo);
  text-transform: uppercase;
}

.header-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-hi);
}
.header-title span { color: var(--floodlight); }

.header-clock {
  display: flex;
  align-items: stretch;
  gap: 2px;
  background: var(--bg-void);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.clock-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  min-width: 72px;
  border-right: var(--border-subtle);
}
.clock-block:last-child { border-right: none; }
.clock-block--status { min-width: 220px; }
.clock-block--timer { min-width: 110px; }
.clock-value--timer {
  font-size: 22px;
  color: var(--floodlight);
  transition: color 0.2s ease;
}
.clock-timer--urgent .clock-value--timer {
  color: var(--siren);
  animation: timer-urgent-pulse 1s ease-in-out infinite;
}
@keyframes timer-urgent-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.clock-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.clock-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-hi);
}
.clock-value--status {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-lo);
}
.is-user-turn .clock-value--status { color: var(--floodlight); font-weight: 700; }

/* ============================================================================
   SECTION 2 — PRE-DRAFT PANEL
   ========================================================================== */
#pre-draft-panel {
  display: flex;
  justify-content: center;
  padding: 64px 24px;
}

.pre-draft-card {
  max-width: 560px;
  width: 100%;
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 36px;
}

.pre-draft-card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.pre-draft-card p {
  color: var(--text-lo);
  font-size: 14px;
  margin-bottom: 24px;
}
.pre-draft-card p strong { color: var(--text-hi); }

.pre-draft-setting {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.pre-draft-setting--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.pre-draft-setting label {
  font-size: 13px;
  color: var(--text-lo);
  min-width: 120px;
}
.pre-draft-setting--stacked label { min-width: 0; }
.settings-select {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
}

.roster-preset-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.roster-preset-option {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(133, 160, 168, 0.2);
  background: var(--bg-panel-raised);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.roster-preset-option:hover { border-color: rgba(255, 197, 61, 0.4); }
.roster-preset-option.is-active {
  border-color: var(--floodlight);
  background: rgba(255, 197, 61, 0.08);
}
.roster-preset-option input[type="radio"] {
  grid-row: 1 / 3;
  accent-color: var(--floodlight);
  margin-top: 2px;
}
.roster-preset-option-title { font-size: 13px; font-weight: 600; color: var(--text-hi); }
.roster-preset-option-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-lo);
}

.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: var(--floodlight);
  color: #1A1300;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px -4px rgba(255, 197, 61, 0.5);
}
.btn-resume {
  background: transparent;
  border: 1px solid var(--floodlight);
  color: var(--floodlight);
  margin-bottom: 10px;
}
.btn-resume:hover { background: rgba(255, 197, 61, 0.1); box-shadow: none; }

/* ============================================================================
   SECTION 3 — MAIN THREE-COLUMN DRAFT LAYOUT
   ========================================================================== */
#draft-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 16px 24px 32px;
  align-items: start;
}

.panel-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-lo);
  padding: 14px 16px;
  border-bottom: var(--border-subtle);
}

#board-panel, #roster-panel {
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 96px;
}

/* ---- Section 3.1: Draft board ---- */
.board-scroll { overflow-y: auto; padding: 10px; }

.board-round { margin-bottom: 10px; }
.board-round-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding: 4px 6px;
}
.board-round-picks {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.board-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-raised);
  font-size: 12px;
  border: 1px solid transparent;
}
.board-cell--user { background: rgba(255, 197, 61, 0.08); border-color: rgba(255, 197, 61, 0.25); }
.board-cell--current {
  border-color: var(--floodlight);
  box-shadow: 0 0 0 1px var(--floodlight);
}
.board-cell--new { animation: cell-flash 0.9s ease; }
@keyframes cell-flash {
  0%   { background: var(--floodlight); border-color: var(--floodlight); }
  100% { background: var(--bg-panel-raised); }
}
.board-cell-pick {
  font-family: var(--font-mono);
  color: var(--text-faint);
  min-width: 30px;
}
.board-cell-player { flex: 1; color: var(--text-hi); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-cell-team { flex: 1; color: var(--text-lo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-cell-pos {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  color: #071620;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ---- Section 3.2: Player pool (center) ---- */
#player-pool-panel {
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: var(--border-subtle);
  background: var(--bg-panel-raised);
}

.search-input {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 9px 12px;
  font-size: 13px;
}

.position-filters { display: flex; gap: 6px; flex-wrap: wrap; }

.pos-filter-btn {
  --pos-color: var(--text-lo);
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(133, 160, 168, 0.25);
  color: var(--text-lo);
  transition: all 0.12s ease;
}
.pos-filter-btn:hover { border-color: var(--pos-color); color: var(--text-hi); }
.pos-filter-btn.is-active {
  background: var(--pos-color);
  border-color: var(--pos-color);
  color: #071620;
}

.draft-status-message {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--floodlight);
  min-height: 36px;
  display: flex;
  align-items: center;
}

.player-table-wrap { overflow-x: auto; max-height: calc(100vh - 260px); overflow-y: auto; }

.player-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.player-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-panel);
  text-align: left;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: var(--border-subtle);
  z-index: 1;
}
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s ease;
}
.sortable-th:hover { color: var(--text-lo); }
.sortable-th.is-sorted { color: var(--floodlight); }
.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 8px;
  color: var(--floodlight);
}
.player-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(133, 160, 168, 0.08);
}
.player-table tbody tr:hover { background: var(--bg-panel-raised); }

.tier-divider-row td {
  padding: 4px 12px;
  border-bottom: 1px dashed rgba(255, 197, 61, 0.3);
}
.tier-divider-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--floodlight-dim);
}

.col-rank, .col-adp, .col-proj, .col-tier, .col-bye { font-family: var(--font-mono); color: var(--text-lo); }
.col-pos { white-space: nowrap; }
.col-player { color: var(--text-hi); font-weight: 500; white-space: nowrap; }

.pos-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: #071620;
  flex-shrink: 0;
}
.status-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}

.player-pool-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-faint);
}

.draft-btn {
  padding: 6px 14px;
  background: var(--bg-panel-raised);
  border: 1px solid rgba(255, 197, 61, 0.4);
  color: var(--floodlight);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: all 0.12s ease;
}
.draft-btn:hover:not(:disabled) { background: var(--floodlight); color: #071620; }
.draft-btn:disabled { opacity: 0.3; cursor: not-allowed; border-color: rgba(133, 160, 168, 0.2); color: var(--text-faint); }

/* ---- Section 3.3: Roster panel (right) ---- */
.roster-scroll { overflow-y: auto; padding: 12px; }

.bye-clash-warning {
  margin-bottom: 14px;
  border: 1px solid rgba(255, 70, 85, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(255, 70, 85, 0.08);
  overflow: hidden;
}
.bye-clash-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
}
.bye-clash-row + .bye-clash-row { border-top: 1px solid rgba(255, 70, 85, 0.2); }
.bye-clash-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--siren);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bye-clash-detail {
  font-size: 12px;
  color: var(--text-lo);
}

.roster-group { margin-bottom: 14px; }
.roster-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-hi);
  margin-bottom: 6px;
}
.roster-group-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.roster-group-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.roster-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  margin-bottom: 3px;
  background: var(--bg-panel-raised);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-hi);
  border: 1px solid transparent;
}
.roster-slot--empty { color: var(--text-faint); font-style: italic; background: transparent; border: 1px dashed rgba(133, 160, 168, 0.2); }
.roster-slot--interactive { cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; }
.roster-slot--interactive:hover { border-color: rgba(255, 197, 61, 0.35); }
.roster-slot--selected {
  border-color: var(--floodlight) !important;
  background: rgba(255, 197, 61, 0.12) !important;
}
.roster-slot-pos {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  color: #071620;
}

/* ============================================================================
   SECTION 4 — DRAFT COMPLETE MODAL
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 22, 32, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}

.modal-content {
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 960px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: var(--border-subtle);
}
.modal-header h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-modal-action {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
}
.btn-modal-action--secondary {
  background: transparent;
  border: 1px solid var(--floodlight);
  color: var(--floodlight);
}
.btn-modal-action--secondary:hover { background: rgba(255, 197, 61, 0.1); }

.adp-trends-panel {
  padding: 16px 22px;
  border-bottom: var(--border-subtle);
  background: var(--bg-panel-raised);
}
.adp-trends-empty { color: var(--text-lo); font-size: 13px; }
.adp-trends-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.adp-trends-heading {
  font-size: 12px;
  color: var(--text-hi);
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adp-trends-heading span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 400;
}
.adp-trends-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.adp-trends-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-void);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.adp-trends-empty-row { color: var(--text-faint); font-style: italic; background: transparent !important; }
.adp-trend-name { flex: 1; color: var(--text-hi); }
.adp-trend-delta { font-family: var(--font-mono); font-weight: 700; font-size: 11px; }
.adp-trend-up { color: var(--turf); }
.adp-trend-down { color: var(--siren); }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-raised);
  font-size: 16px;
}
.modal-close:hover { background: var(--bg-panel-hover); }

.modal-body {
  overflow-y: auto;
  padding: 20px 22px;
}

.summary-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.summary-team {
  background: var(--bg-panel-raised);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.summary-team--user { border: 1px solid var(--floodlight); }
.summary-team h3 {
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-hi);
}
.summary-team-vorp {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.summary-team-vorp--positive { color: var(--turf); background: rgba(42, 107, 82, 0.15); }
.summary-team-vorp--negative { color: var(--siren); background: rgba(255, 70, 85, 0.1); }
.summary-team-grade {
  font-family: var(--font-display);
  font-size: 13px;
  padding: 1px 6px;
  border-radius: 4px;
}
.summary-team-grade--green  { color: var(--turf);   background: rgba(42, 107, 82, 0.25); }
.summary-team-grade--yellow { color: var(--floodlight); background: rgba(255, 197, 61, 0.18); }
.summary-team-grade--red    { color: var(--siren);  background: rgba(255, 70, 85, 0.2); }
.summary-team ul { list-style: none; }

/* ---- Focal-point grade card (top of the recap, user's team only) ---- */
.grade-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid;
}
.grade-card--green  { background: rgba(42, 107, 82, 0.14);   border-color: rgba(42, 107, 82, 0.4); }
.grade-card--yellow { background: rgba(255, 197, 61, 0.1);   border-color: rgba(255, 197, 61, 0.4); }
.grade-card--red     { background: rgba(255, 70, 85, 0.1);    border-color: rgba(255, 70, 85, 0.4); }

.grade-card-letter {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  flex-shrink: 0;
  min-width: 110px;
  text-align: center;
}
.grade-card--green .grade-card-letter  { color: var(--turf); }
.grade-card--yellow .grade-card-letter { color: var(--floodlight); }
.grade-card--red .grade-card-letter     { color: var(--siren); }

.grade-card-info { flex: 1; min-width: 0; }
.grade-card-description {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-hi);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.grade-card-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}
.grade-card-stat { display: flex; flex-direction: column; gap: 2px; }
.grade-card-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.grade-card-stat-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-hi);
}
.summary-team li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-lo);
  padding: 3px 0;
}
.summary-pos {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  color: #071620;
  flex-shrink: 0;
}

/* ============================================================================
   SECTION 5 — RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
  #draft-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  #roster-panel { grid-column: 1 / -1; max-height: 320px; position: static; }

  .trends-content-grid { grid-template-columns: 1fr; }
  .trends-chart-panel { position: static; }
}

@media (max-width: 760px) {
  #main-nav { padding: 12px 16px; }
  .main-nav-links { width: 100%; justify-content: center; }
  .auth-widget { width: 100%; justify-content: center; }

  #scoreboard-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-clock { width: 100%; }
  .clock-block { flex: 1; min-width: 0; padding: 8px 10px; }
  .clock-block--status { min-width: 0; }

  #draft-layout { grid-template-columns: 1fr; padding: 12px; }
  #board-panel { max-height: 260px; position: static; }
  #roster-panel { position: static; }

  .trends-main { padding: 12px; }
  .dashboard-cards-grid { grid-template-columns: repeat(2, 1fr); }

  .matchup-row { grid-template-columns: 1fr; }
  .matchup-vs { margin: 0 auto; }
  .rankings-panel-header { flex-direction: column; align-items: stretch; }

  .grade-card { flex-direction: column; text-align: center; gap: 14px; }
  .grade-card-letter { min-width: 0; }
}

/* ============================================================================
   SECTION 6 — TRENDS PAGE
   ========================================================================== */
.trends-page-header {
  padding: 28px 32px 8px;
}
.trends-page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.01em;
  color: var(--text-hi);
}
.trends-page-subtitle {
  color: var(--text-lo);
  font-size: 14px;
  margin-top: 4px;
}

.trends-main {
  padding: 8px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Dashboard cards ---- */
.dashboard-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.dashboard-card {
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dashboard-card--accent { border-color: rgba(255, 197, 61, 0.35); }
.dashboard-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.dashboard-card-value {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-hi);
  line-height: 1.15;
}
.dashboard-card-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-lo);
}
.dashboard-card-sub--up { color: var(--turf); }
.dashboard-card-sub--down { color: var(--siren); }

/* ---- Main content grid: table + chart ---- */
.trends-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.trends-table-panel {
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.trends-table-wrap { max-height: calc(100vh - 340px); }
.trends-row { cursor: pointer; }
.trends-row.is-selected { background: rgba(255, 197, 61, 0.1); }
.trends-delta-up { color: var(--turf); font-family: var(--font-mono); }
.trends-delta-down { color: var(--siren); font-family: var(--font-mono); }

.settings-select--compact { flex: 0 0 auto; width: auto; min-width: 130px; }

/* ---- Chart panel ---- */
.trends-chart-panel {
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
.trends-chart-body {
  padding: 14px 16px;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trends-chart-empty {
  color: var(--text-lo);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}
.trends-chart-canvas { width: 100% !important; height: 260px !important; }

/* ============================================================================
   SECTION 7 — COMMUNITY RANKINGS PAGE
   ========================================================================== */
.vote-panel {
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.matchup-container { margin-top: 16px; }
.matchup-empty, .rankings-table-empty {
  color: var(--text-lo);
  font-size: 13px;
  text-align: center;
  padding: 30px 20px;
}

.matchup-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.matchup-vs {
  font-family: var(--font-display);
  font-size: 16px;
  color: #071620;
  background: var(--floodlight);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vote-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 24px 20px;
  background: var(--bg-panel-raised);
  border: 1px solid rgba(133, 160, 168, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
  font-family: inherit;
}
.vote-card:hover:not(:disabled) {
  border-color: var(--floodlight);
  background: rgba(255, 197, 61, 0.06);
  transform: translateY(-2px);
}
.vote-card:disabled, .vote-card.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.vote-card-pos {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  color: #071620;
}
.vote-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-hi);
  letter-spacing: 0.01em;
}
.vote-card-club {
  font-size: 13px;
  color: var(--text-lo);
}
.vote-card-stats {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed rgba(133, 160, 168, 0.2);
  width: 100%;
  justify-content: center;
}
.vote-card-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vote-card-stat dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.vote-card-stat dd {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-hi);
}

.matchup-status {
  text-align: center;
  font-size: 13px;
  color: var(--floodlight);
  min-height: 20px;
  margin-top: 12px;
}

.rankings-panel {
  background: var(--bg-panel);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.rankings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: var(--border-subtle);
}
.rankings-panel-header .panel-title { padding: 0; border-bottom: none; }
.community-rankings-wrap { max-height: 520px; }

.rankings-movement {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.rankings-movement--up { color: var(--turf); }
.rankings-movement--down { color: var(--siren); }
.rankings-movement--flat { color: var(--text-faint); }

/* ============================================================================
   SECTION 8 — AUTHENTICATION
   ========================================================================== */
.auth-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-widget-email {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-lo);
}
.auth-widget-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-lo);
  border: 1px solid rgba(133, 160, 168, 0.25);
  transition: all 0.12s ease;
}
.auth-widget-btn:hover { color: var(--text-hi); border-color: rgba(255, 197, 61, 0.4); }
.auth-widget-btn--accent {
  background: var(--floodlight);
  border-color: var(--floodlight);
  color: #071620;
}
.auth-widget-btn--accent:hover { color: #071620; opacity: 0.9; }

.auth-modal-content { max-width: 420px; }
.auth-modal-body { padding: 20px 22px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-lo);
}
.auth-input {
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
}
.auth-error {
  color: var(--siren);
  font-size: 12.5px;
  min-height: 16px;
}
.auth-success {
  color: var(--turf);
  font-size: 12.5px;
  min-height: 16px;
}
.auth-modal-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  align-items: center;
}
.auth-link {
  font-size: 12.5px;
  color: var(--floodlight);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-link:hover { color: var(--text-hi); }
.auth-confirm-message {
  font-size: 13.5px;
  color: var(--text-lo);
  line-height: 1.6;
  margin-bottom: 16px;
}
.auth-confirm-message strong { color: var(--text-hi); }
.auth-onboarding-intro {
  font-size: 13px;
  color: var(--text-lo);
  line-height: 1.6;
  margin-bottom: 16px;
}
.auth-onboarding-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.auth-onboarding-actions .btn-resume { flex: 1; margin-bottom: 0; }
.auth-onboarding-actions .btn-primary { flex: 1; }

/* ============================================================================
   SECTION 9 — DRAFT-TIME POSITION CHOICE MODAL
   ========================================================================== */
.position-choice-modal-content { max-width: 440px; }
.position-choice-intro {
  font-size: 13.5px;
  color: var(--text-lo);
  line-height: 1.6;
  margin-bottom: 18px;
}
.position-choice-options {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.position-choice-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px;
  background: var(--bg-panel-raised);
  border: 1px solid rgba(133, 160, 168, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  color: var(--text-hi);
  font-size: 13px;
  transition: border-color 0.12s ease, transform 0.1s ease;
}
.position-choice-btn:hover { border-color: var(--floodlight); transform: translateY(-2px); }
.position-choice-btn-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  color: #071620;
}

/* ============================================================================
   SECTION 10 — SOUND TOGGLE
   ========================================================================== */
.sound-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-raised);
  border: 1px solid rgba(133, 160, 168, 0.25);
  font-size: 17px;
  flex-shrink: 0;
  transition: border-color 0.12s ease, opacity 0.12s ease;
}
.sound-toggle-btn:hover { border-color: rgba(255, 197, 61, 0.4); }
.sound-toggle-btn--muted { opacity: 0.5; }
