:root {
  /* AIBA Brand — Deep Navy to Midnight Navy surface stack */
  --bg: #020A18;
  --surface: #08132B;
  --surface-2: #0d1c3a;
  --surface-3: #142444;
  --border: #1c2e50;
  --border-bright: #2e4570;
  --text: #FFFFFF;
  --muted: #8A96A8;         /* Steel Gray */
  /* Electric Blue — the AI signal; accent/decorative only, never dominant */
  --accent: #00E5FF;
  --accent-light: #3DF3FF;  /* Bright Cyan — hover/glow */
  --accent-glow: rgba(0, 229, 255, 0.15);
  /* League Blue — secondary accent, nav, info elements */
  --blue: #0078FF;
  /* Championship Gold — THE action color; primary CTAs only, never decorative */
  --gold: #FFB800;
  --gold-hover: #CC9400;
  --gold-light: #FFD166;
  --gold-glow: rgba(255, 184, 0, 0.25);
  /* Premium metals */
  --silver: #C0C0C0;        /* Silver Metallic */
  /* Functional UI only — not for sport events */
  --green: #22c55e;
  --red: #ef4444;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  height: 64px;
  background: rgba(2, 10, 24, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 34px;
  background: var(--blue);
  color: white;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  border-radius: 4px;
}

.brand-copy {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 0;
}

.nav a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav a:hover { color: var(--text); }

.nav a.active {
  color: white;
  border-bottom-color: var(--accent);
}

.nav a.nav-cta {
  color: var(--gold);
  border: 1px solid rgba(255, 184, 0, 0.45);
  border-radius: 5px;
  padding: 5px 14px;
  margin: auto 4px;
}

.nav a.nav-cta:hover {
  color: var(--gold);
  background: rgba(255, 184, 0, 0.10);
  border-color: var(--gold);
}

.nav a.nav-cta.active {
  color: #08132B;
  background: var(--gold);
  border-color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── NAV DROPDOWNS ── */
.nav-group {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  padding: 4px 0;
  background: rgba(2, 10, 24, 0.98);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 200;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.nav-group:hover .nav-dropdown { display: block; }

.nav .nav-dropdown a {
  padding: 9px 16px;
  border-bottom: none;
  border-left: 3px solid transparent;
}

.nav .nav-dropdown a:hover { background: var(--surface-2); }

.nav .nav-dropdown a.active {
  border-bottom-color: transparent;
  border-left-color: var(--accent);
}

/* ── LAYOUT ── */
main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px);
}

/* ── HERO SECTIONS ── */
.league-hero,
.team-hero,
.player-hero,
.game-hero,
.commissioner-hero,
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 60px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.league-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 0% 100%, rgba(0, 229, 255, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(0, 120, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.commissioner-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 0% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.league-hero,
.team-hero,
.player-hero,
.game-hero,
.commissioner-hero,
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 28px;
  align-items: end;
  min-height: 240px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

p { overflow-wrap: anywhere; }

.league-hero p,
.page-hero p,
.team-hero p,
.player-hero p,
.game-hero p,
.commissioner-hero p {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ── STAT BOARDS ── */
.hero-board,
.hero-stats,
.mini-stats {
  display: grid;
  gap: 10px;
  z-index: 1;
}

.hero-board div,
.hero-stats div,
.mini-stats div {
  min-width: 120px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 6px;
}

.hero-board span,
.hero-stats dt,
.mini-stats dt {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.hero-board strong,
.hero-stats dd,
.mini-stats dd {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

/* ── GRID LAYOUT ── */
.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* ── PANELS ── */
.panel {
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-head a {
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  transition: color 0.15s;
}
.section-head a:hover { color: var(--accent-light); }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td { font-size: 0.9rem; }

tr:hover td { background: var(--surface-2); }

td a:hover { color: var(--accent); }

.good { color: var(--green); font-weight: 800; }
.bad  { color: var(--red);   font-weight: 800; }
.stat-focus { color: var(--accent-light); font-weight: 800; }

/* ── SCORE CARDS ── */
.score-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.score-grid.single { grid-template-columns: 1fr; }

.score-card {
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  transition: border-color 0.15s, transform 0.15s;
}

.score-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-1px);
}

.score-week,
.story-meta {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.score-week { color: var(--accent); }

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.score-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.score-row strong { text-align: right; color: var(--muted); }

.score-row.winner span,
.score-row.winner strong {
  color: var(--text);
  font-weight: 800;
}

.score-row.winner strong { color: var(--accent); }

/* ── TEAM CARDS ── */
.team-card {
  min-height: 220px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.team-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

a.team-card {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.team-abbr {
  width: 64px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-radius: 6px;
}

.team-abbr.xl,
.player-number {
  width: 120px;
  height: 96px;
  font-size: 1.8rem;
}

.player-number {
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-weight: 900;
  border-radius: 8px;
}

/* ── STORYLINES ── */
.story-list,
.log-list {
  display: grid;
  gap: 10px;
}

.story-item,
.log-list article,
.trade-card {
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
}

.story-item:hover,
.log-list article:hover {
  border-color: var(--border-bright);
}

.story-item p,
.log-list p,
.trade-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── FILTERS ── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.filters a,
.filters span {
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.filters a:hover { color: var(--text); border-color: var(--border-bright); }

.filters a.active {
  background: rgba(255, 184, 0, 0.10);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── BUTTONS ── */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border: none;
  border-radius: 7px;
  background: var(--gold);
  color: #08132B;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

button:hover {
  background: var(--gold-hover);
  box-shadow: 0 0 20px var(--gold-glow);
  transform: translateY(-1px);
}

button:active { transform: translateY(0); }

button.secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

button.secondary:hover {
  background: rgba(255, 184, 0, 0.10);
  box-shadow: none;
}

button.danger {
  background: #FF6B6B;
  color: white;
}

button.danger:hover { background: #E55555; }

button.cta-big {
  min-height: 56px;
  font-size: 1rem;
  letter-spacing: 0.09em;
  border-radius: 10px;
  box-shadow: 0 4px 20px var(--gold-glow);
}

button.cta-big:hover {
  box-shadow: 0 6px 28px rgba(255, 184, 0, 0.4);
}

/* ── COMMISSIONER SPECIFIC ── */
.action-stack,
.trade-actions {
  display: grid;
  gap: 10px;
}

/* Next-Action Banner */
.next-action {
  padding: 24px 28px;
  border-radius: 10px;
  border: 1px solid;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.next-action.ready {
  background: linear-gradient(135deg, rgba(0, 120, 255, 0.12), rgba(0, 120, 255, 0.04));
  border-color: var(--blue);
}

.next-action.trades-pending {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.10), rgba(192, 192, 192, 0.04));
  border-color: var(--silver);
}

.next-action.offseason {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
  border-color: var(--blue);
}

.next-action .na-label {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

.next-action.ready .na-label { color: var(--blue); }
.next-action.trades-pending .na-label { color: var(--silver); }
.next-action.offseason .na-label { color: var(--accent); }

.next-action h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.next-action p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.next-action form button {
  width: auto;
  min-width: 200px;
  white-space: nowrap;
}

.next-action.ready form button { background: var(--gold); color: #08132B; }
.next-action.trades-pending form button { background: var(--gold); color: #08132B; }
.next-action.offseason form button { background: var(--gold); color: #08132B; }

/* Trade cards */
.trade-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-bottom: 10px;
  align-items: start;
}

.veto-form {
  display: grid;
  gap: 8px;
}

/* Forms */
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; }

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.packet-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.full-field,
.packet-form button,
.copy-box,
.parsed-response {
  grid-column: 1 / -1;
}

.copy-box {
  margin-top: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  background: var(--surface-3);
}

.parsed-response {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
}

.note { color: var(--blue); font-weight: 700; }
.empty { color: var(--muted); font-size: 0.9rem; }

/* ── PACKET CARDS ── */
.packet-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.packet-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  border-radius: 8px;
}

/* Packet card accents — brand palette only; gold reserved for action buttons */
.packet-card.accent-orange { border-left-color: var(--accent); }       /* Electric Blue — AI signal */
.packet-card.accent-gold   { border-left-color: var(--silver); }       /* Silver Metallic — premium */
.packet-card.accent-blue   { border-left-color: var(--blue); }         /* League Blue */
.packet-card.accent-green  { border-left-color: var(--accent-light); } /* Bright Cyan */
.packet-card.accent-red    { border-left-color: var(--muted); }        /* Steel Gray — never red for sport */

.pc-type {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.packet-card.accent-orange .pc-type { color: var(--accent); }
.packet-card.accent-gold   .pc-type { color: var(--silver); }       /* Silver Metallic text */
.packet-card.accent-blue   .pc-type { color: var(--blue); }
.packet-card.accent-green  .pc-type { color: var(--accent-light); }
.packet-card.accent-red    .pc-type { color: var(--muted); }

.packet-card h3 { margin: 0; font-size: 0.97rem; }

.pc-prompt {
  margin: 0;
  padding: 8px 10px;
  border-left: 2px solid var(--border-bright);
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

.pc-box {
  flex: 1;
  margin: 0;
  font-size: 0.75rem;
  min-height: 120px;
}

.btn-copy {
  width: 100%;
  margin: 0;
  font-size: 0.78rem;
  min-height: 38px;
}

h4 {
  margin: 14px 0 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ── FLASH MESSAGES ── */
.flash-band {
  width: min(1440px, 100%);
  margin: 16px auto 0;
  padding: 0 clamp(20px, 4vw, 48px);
}

.flash {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.9rem;
}

.flash.error {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}

.flash.operation {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.08);
}

.flash pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 0.82rem;
}

/* ── FOOTER ── */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer span::before {
  content: "·";
  margin-right: 12px;
  opacity: 0.4;
}

.footer span:first-child::before { display: none; }

/* ── GM TRAIT BARS ── */
.gm-bar {
  width: 100px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.gm-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  min-width: 4px;
}

/* ── LINE SCORE ── */
.linescore th, .linescore td { text-align: center; min-width: 40px; }
.linescore th:first-child, .linescore td:first-child { text-align: left; min-width: 0; }
.linescore th.total, .linescore td.total {
  color: var(--text);
  font-weight: 800;
  border-left: 1px solid var(--border-bright);
  padding-left: 16px;
}

/* ── GAME MVP ── */
.mvp-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.06), rgba(255, 184, 0, 0.02));
  border: 1px solid var(--gold);
  border-radius: 10px;
  margin-top: 4px;
}
.mvp-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: #08132B;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mvp-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 3px;
}
.mvp-team {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin: 0;
}
.mvp-stats {
  display: flex;
  gap: 24px;
  margin-top: 14px;
}
.mvp-stat { text-align: center; }
.mvp-stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1; }
.mvp-stat span { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; display: block; }
tr.mvp-row td { background: rgba(255, 184, 0, 0.05); }
.mvp-pip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: .06em;
  color: #08132B;
  background: var(--gold);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
}

/* ── Articles ──────────────────────────────────────────────────── */
.article-list {
  display: grid;
  gap: 14px;
}

.article-item {
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
}

.article-item:hover {
  border-color: var(--border-bright);
}

.article-headline {
  margin: 6px 0 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.article-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ── PLAYOFF BRACKET ────────────────────────────────────────────── */
.playoff-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 48px rgba(255, 184, 0, 0.10), var(--shadow);
  margin-bottom: 16px;
}

.playoff-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 184, 0, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(0, 229, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.playoff-hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  position: relative;
}

.playoff-hero-header h1 {
  color: var(--gold);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
}

.playoff-hero-header p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: none;
}

.playoff-phase-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: rgba(255, 184, 0, 0.08);
  margin-top: 4px;
}

.bracket {
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  align-items: center;
  gap: 0;
  position: relative;
}

.bracket.with-champion {
  grid-template-columns: 1fr 48px 1fr 48px auto;
}

.bracket-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bracket-col-finals {
  justify-content: center;
}

.bracket-round-label {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.bracket-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.1rem;
  opacity: 0.7;
}

.bracket-matchup {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color 0.15s;
}

.bracket-matchup.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.08);
}

.bracket-matchup.complete {
  border-color: var(--border-bright);
}

.bracket-matchup.tbd {
  opacity: 0.45;
}

.bracket-team {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.bracket-team:last-of-type { border-bottom: none; }

.bracket-team.winner { background: rgba(255, 184, 0, 0.07); }

.bracket-seed {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--muted);
  min-width: 22px;
  letter-spacing: 0.04em;
}

.bracket-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.bracket-team.winner .bracket-name { color: var(--gold); }

.bracket-wins {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  min-width: 20px;
  text-align: right;
  color: var(--muted);
}

.bracket-team.winner .bracket-wins { color: var(--gold); }

.bracket-series-status {
  padding: 5px 14px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface-3);
}

.bracket-matchup.active .bracket-series-status { color: var(--accent); }
.bracket-matchup.complete .bracket-series-status { color: var(--gold-light); }

.bracket-champion {
  padding: 24px 28px;
  border: 2px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.12) 0%, rgba(255, 184, 0, 0.03) 100%);
  text-align: center;
}

.bracket-champion-label {
  margin: 0 0 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.bracket-champion-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.2;
}

.bracket-champion-year {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    padding: 14px clamp(16px, 4vw, 48px);
    gap: 10px;
  }

  .nav { flex-wrap: wrap; height: auto; }

  .league-hero,
  .team-hero,
  .player-hero,
  .game-hero,
  .commissioner-hero,
  .page-hero,
  .section-grid,
  .trade-card,
  .packet-form,
  .packet-cards,
  .next-action {
    grid-template-columns: 1fr;
  }

  .next-action form { justify-self: start; }

  h1 { font-size: clamp(2rem, 13vw, 4.2rem); }

  .team-abbr.xl,
  .player-number {
    width: 88px;
    height: 72px;
  }
}

/* Live postseason board */
.playoff-stage {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--gold);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 184, 0, 0.10), rgba(0, 229, 255, 0.03) 48%, rgba(8, 19, 43, 0.98)),
    var(--surface);
  box-shadow: 0 0 52px rgba(255, 184, 0, 0.12), var(--shadow);
}

.playoff-stage::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 184, 0, 0.16);
  pointer-events: none;
}

.playoff-stage-header,
.playoff-board,
.playoff-live-grid {
  position: relative;
  z-index: 1;
}

.playoff-stage-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}

.playoff-stage-header h1 {
  color: var(--gold);
  font-size: clamp(2.6rem, 6vw, 6rem);
}

.playoff-stage-header p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--text);
  font-size: 1.02rem;
}

.playoff-stage-status {
  padding: 16px;
  border: 1px solid rgba(255, 184, 0, 0.38);
  border-radius: 8px;
  background: rgba(2, 10, 24, 0.55);
  text-align: right;
}

.playoff-stage-status span,
.playoff-round-label,
.playoff-series-topline span,
.playoff-trophy span,
.playoff-medal span {
  display: block;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.playoff-stage-status strong {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1.2;
}

.playoff-board {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 42px minmax(260px, 1.05fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: center;
}

.playoff-round {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.playoff-round-featured .playoff-series-card {
  border-color: var(--gold);
}

.playoff-flow {
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.28);
}

.playoff-series-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  background: rgba(13, 28, 58, 0.92);
}

.playoff-series-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.10);
}

.playoff-series-card.complete {
  border-color: rgba(255, 184, 0, 0.52);
}

.playoff-series-card.pending {
  opacity: 0.58;
}

.playoff-series-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 10, 24, 0.38);
}

.playoff-series-topline strong {
  color: var(--gold-light);
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: right;
  text-transform: uppercase;
}

.playoff-team-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.playoff-team-row.winner {
  background: rgba(255, 184, 0, 0.08);
}

.playoff-seed {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.playoff-team-name {
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playoff-team-row strong {
  color: var(--gold);
  font-size: 1.45rem;
  line-height: 1;
  text-align: right;
}

.playoff-game-link {
  display: block;
  padding: 8px 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.playoff-game-link:hover {
  color: var(--accent-light);
}

.playoff-game-link.muted {
  color: var(--muted);
}

.playoff-trophy,
.playoff-medal {
  padding: 16px;
  border-radius: 8px;
  background: rgba(2, 10, 24, 0.45);
}

.playoff-trophy {
  border: 1px solid var(--gold);
}

.playoff-medal {
  border: 1px solid var(--border-bright);
}

.playoff-trophy strong,
.playoff-medal strong {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-size: 1rem;
  line-height: 1.2;
}

.playoff-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

@media (max-width: 960px) {
  .playoff-stage-header,
  .playoff-board,
  .playoff-live-grid {
    grid-template-columns: 1fr;
  }

  .playoff-stage-status {
    text-align: left;
  }

  .playoff-flow {
    width: 2px;
    height: 32px;
    justify-self: center;
    background: linear-gradient(180deg, var(--accent), var(--gold));
  }
}

/* Phase-specific homepage heroes */
.season-hero {
  border-color: rgba(0, 229, 255, 0.34);
  background:
    linear-gradient(115deg, rgba(0, 120, 255, 0.16), rgba(8, 19, 43, 0.96) 42%, rgba(2, 10, 24, 0.98)),
    var(--surface);
}

.season-hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-top: 1px solid rgba(0, 229, 255, 0.22);
  border-bottom: 1px solid rgba(0, 229, 255, 0.10);
  pointer-events: none;
}

.season-hero .hero-board {
  min-width: min(360px, 100%);
}

.season-hero .hero-board div {
  background: rgba(13, 28, 58, 0.88);
}

.season-latest strong {
  font-size: 1rem;
  line-height: 1.15;
  white-space: normal;
}

.offseason-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.35fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: stretch;
  min-height: 360px;
  margin-bottom: 16px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--silver);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(192, 192, 192, 0.12), rgba(0, 229, 255, 0.05) 38%, rgba(2, 10, 24, 0.98)),
    var(--surface);
  box-shadow: 0 0 42px rgba(192, 192, 192, 0.08), var(--shadow);
}

.offseason-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(192, 192, 192, 0.035) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(0, 229, 255, 0.028) 0 1px, transparent 1px 70px);
  pointer-events: none;
}

.offseason-hero-copy,
.offseason-war-room {
  position: relative;
  z-index: 1;
}

.offseason-hero h1 {
  color: var(--silver);
  font-size: clamp(2.4rem, 5.6vw, 5.4rem);
}

.offseason-hero-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.55;
}

.offseason-war-room {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(220px, 1fr);
  gap: 14px;
  align-content: start;
}

.offseason-current,
.offseason-log {
  border: 1px solid rgba(192, 192, 192, 0.28);
  border-radius: 8px;
  background: rgba(2, 10, 24, 0.54);
}

.offseason-current {
  padding: 18px;
}

.offseason-current span,
.offseason-log > span {
  display: block;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.offseason-current strong {
  display: block;
  margin-top: 8px;
  color: var(--silver);
  font-size: 1.65rem;
  line-height: 1.05;
}

.offseason-current p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.offseason-timeline {
  display: grid;
  gap: 8px;
  grid-row: span 2;
}

.offseason-step {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(13, 28, 58, 0.70);
}

.offseason-step span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--muted);
  border-radius: 50%;
}

.offseason-step strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.offseason-step.complete {
  border-color: rgba(192, 192, 192, 0.35);
}

.offseason-step.complete span {
  background: var(--silver);
  border-color: var(--silver);
}

.offseason-step.complete strong {
  color: var(--silver);
}

.offseason-step.current {
  border-color: var(--gold);
  background: rgba(255, 184, 0, 0.08);
}

.offseason-step.current span {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 14px var(--gold-glow);
}

.offseason-step.current strong {
  color: var(--gold);
}

.offseason-log {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.offseason-log article {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.offseason-log article:first-of-type {
  margin-top: 2px;
}

.offseason-log strong {
  display: block;
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.offseason-log p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

@media (max-width: 960px) {
  .offseason-hero,
  .offseason-war-room {
    grid-template-columns: 1fr;
  }

  .offseason-war-room {
    gap: 12px;
  }

  .offseason-timeline {
    grid-row: auto;
  }

  .offseason-step strong {
    white-space: normal;
  }
}

/* ── LOGO ASSETS ─────────────────────────────────────────────────── */

/* League logos */
.logo-league-primary  { height: 36px; width: auto; display: block; }
.logo-league-secondary { height: 28px; width: auto; display: block; }

/* Team logos — sized by role */
.logo-primary   { height: 120px; width: auto; display: block; align-self: flex-start; }
.logo-secondary { height: 30px;  width: auto; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.logo-tertiary  { height: 18px;  width: auto; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.logo-wordmark  { height: 36px;  width: auto; display: block; margin-bottom: 4px; }
.logo-citymark  { height: 38px;  width: auto; display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* Standings: team cell wraps logo + name */
.standings-team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Score card: team name cell wraps city mark + text */
.score-team {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Leaders / players table: abbr cell wraps tertiary logo + text */
.abbr-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

/* Nav brand: league primary logo replaces the AIBA text box */
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

/* ── LOGO SHOWCASE ───────────────────────────────────────────────── */
.logo-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.logo-showcase-item {
  flex: 1;
  min-width: 100px;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 12px 16px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.logo-showcase-item:hover { border-color: var(--border-bright); }

.logo-showcase-item img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.logo-showcase-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ── TEAM FAQ ────────────────────────────────────────────────────── */
.team-faq { margin-top: 16px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.faq-item[open] { border-color: var(--border-bright); }

.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item[open] summary { color: var(--text); }

.faq-answer {
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
