:root {
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --bg-dark: #120709;
  --accent: #c8102e;
  --neon-red: #ff4d5e;
  --gold: #f2c464;
  --gold-dim: #a97e2f;
  --cream: #f5e9d0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: radial-gradient(ellipse at 50% -10%, #2a1015 0%, var(--bg-dark) 60%) fixed;
  background-color: var(--bg-dark);
  color: white;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* --- Viva CFP marquee header --- */
.marquee {
  position: relative;
  margin: 28px auto 10px;
  max-width: 620px;
  background: linear-gradient(160deg, #170b0d 0%, #2a1015 100%);
  border: 4px solid var(--gold-dim);
  border-radius: 22px;
  padding: 34px 28px 30px;
  text-align: center;
  box-shadow:
    inset 0 0 0 2px rgba(242, 196, 100, 0.35),
    inset 0 0 40px rgba(0, 0, 0, 0.7),
    0 6px 12px rgba(0, 0, 0, 0.6),
    0 18px 50px rgba(0, 0, 0, 0.5);
}

.marquee-bulbs {
  position: absolute;
  inset: 9px;
  pointer-events: none;
}

.bulb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7dd, var(--gold) 55%, var(--gold-dim));
  transform: translate(-50%, -50%);
  animation: bulb-chase 1.6s steps(1) infinite;
}

.bulb.phase-b {
  animation-delay: -0.8s;
}

@keyframes bulb-chase {
  0%, 49% {
    opacity: 1;
    box-shadow: 0 0 6px 1px rgba(255, 230, 150, 0.9);
  }
  50%, 100% {
    opacity: 0.25;
    box-shadow: none;
  }
}

.marquee-inner {
  position: relative;
  z-index: 1;
}

.marquee-viva {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 2rem;
  color: var(--neon-red);
  text-shadow:
    0 0 8px rgba(255, 77, 94, 0.9),
    0 0 24px rgba(255, 77, 94, 0.5);
  line-height: 1;
}

.marquee-cfp {
  font-family: 'Alfa Slab One', 'Rockwell', serif;
  font-size: 4.6rem;
  color: var(--gold);
  line-height: 1.05;
  text-shadow:
    0 0 10px rgba(242, 196, 100, 0.8),
    0 0 34px rgba(242, 196, 100, 0.4),
    0 4px 0 rgba(0, 0, 0, 0.55);
  letter-spacing: 4px;
}

.marquee-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px auto 14px;
  max-width: 300px;
  color: var(--gold);
}

.marquee-divider::before,
.marquee-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}

.marquee-divider::after {
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

.marquee-ribbon {
  display: inline-block;
  background: linear-gradient(180deg, #a30d24, #7c0a1c);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--cream);
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 22px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.ribbon-pop {
  color: var(--neon-red);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 77, 94, 0.8);
}

.marquee-sub {
  margin-top: 14px;
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(245, 233, 208, 0.55);
}

@media (max-width: 480px) {
  .marquee {
    padding: 26px 16px 22px;
    border-radius: 16px;
  }

  .marquee-viva { font-size: 1.5rem; }
  .marquee-cfp { font-size: 3rem; letter-spacing: 2px; }
  .marquee-ribbon { font-size: 0.8rem; padding: 6px 14px; }
  .marquee-sub { font-size: 0.6rem; letter-spacing: 2.5px; }
}

.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 30px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 18px;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.tab-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ESPN Top 25 tiles (mirror the W²-Index rows, compact) */
.poll-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
}

.poll-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--team-color);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.poll-tile-rank {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.poll-tile:nth-child(-n+4) .poll-tile-rank {
  color: var(--gold);
}

.poll-tile-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.poll-tile-team {
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poll-tile-conf {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.68rem;
  letter-spacing: 1px;
}

.poll-tile-w2 {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.poll-row {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.poll-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.poll-row:nth-child(-n+4) .poll-rank {
  background: var(--accent);
}

.poll-team {
  flex: 1;
  font-weight: 700;
  font-size: 1.05rem;
}

.poll-conf {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.poll-source {
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  margin-top: 20px;
}

.poll-source a {
  color: rgba(255, 255, 255, 0.5);
}

/* W²-Index search */
.w2-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

/* Schedule */
.schedule-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Week radar: which weeks are loaded */
.week-radar {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 6px;
  overflow-x: auto;
  padding: 4px 2px;
}

.wr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 4px 4px;
  cursor: pointer;
  width: 44px;
  flex-shrink: 0;
  position: relative;
  font-family: inherit;
}

.wr-col:hover {
  border-color: var(--gold-dim);
}

.wr-col.wr-active {
  border-color: var(--accent);
  background: rgba(200, 16, 46, 0.1);
}

.wr-crown {
  position: absolute;
  top: -10px;
  color: var(--gold);
  font-size: 0.75rem;
  text-shadow: 0 0 8px rgba(242, 196, 100, 0.8);
}

.wr-max {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  width: auto;
  height: auto;
}

.wr-track {
  height: 54px;
  width: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 7px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.wr-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  border-radius: 7px;
}

.wr-week {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.66rem;
  font-weight: 700;
}

.wr-legend {
  text-align: center;
  color: rgba(245, 233, 208, 0.4);
  font-size: 0.72rem;
  margin-bottom: 16px;
}

.sched-cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 9px 12px;
}

.mpr-chip {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Alfa Slab One', 'Rockwell', serif;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.mpr-hot {
  background: linear-gradient(160deg, rgba(242, 196, 100, 0.25), rgba(242, 196, 100, 0.08));
  border: 1px solid var(--gold);
  color: var(--gold);
  box-shadow: 0 0 14px rgba(242, 196, 100, 0.3);
}

.mpr-good {
  background: rgba(242, 196, 100, 0.08);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}

.mpr-mid {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: rgba(245, 233, 208, 0.7);
}

.mpr-low {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
}

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

.game-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 0.92rem;
}

.game-team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.game-team img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.game-rank {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
}

.game-rank.dim {
  color: rgba(255, 255, 255, 0.3);
}

.game-sub {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.76rem;
  margin-top: 3px;
}

.game-market {
  color: rgba(245, 233, 208, 0.6);
  font-size: 0.76rem;
  margin-top: 3px;
}

.game-market strong { color: var(--cream); font-weight: 700; }

.game-books {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edge-chip {
  flex-shrink: 0;
  width: 46px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 0;
  line-height: 1.1;
}

.edge-num {
  font-family: 'Alfa Slab One', 'Rockwell', serif;
  font-size: 0.95rem;
}

.edge-lbl {
  font-size: 0.52rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}

.edge-strong {
  background: linear-gradient(160deg, rgba(46, 204, 113, 0.22), rgba(46, 204, 113, 0.06));
  border: 1px solid rgba(46, 204, 113, 0.5);
  color: #7ddf8f;
}

.edge-mid {
  background: rgba(242, 196, 100, 0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}

.edge-low {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: rgba(255, 255, 255, 0.5);
}

.week-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}

.ranked-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.ranked-toggle input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.game-row {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-teams {
  font-weight: 600;
  font-size: 0.95rem;
}

.game-at {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  font-size: 0.8rem;
}

.rank-badge {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.8rem;
}

.game-score {
  font-weight: 800;
  font-size: 1rem;
}

.game-date {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Teams directory */
.teams-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.team-search {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 9px 14px;
  border-radius: 30px;
  font-size: 0.9rem;
  width: 260px;
  max-width: 100%;
}

.team-search:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.class-pills {
  display: flex;
  gap: 6px;
}

.class-pill {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: rgba(255, 255, 255, 0.6);
  padding: 7px 14px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.75rem;
}

.class-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.teams-count {
  text-align: center;
  color: rgba(245, 233, 208, 0.45);
  font-size: 0.8rem;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

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

.team-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--team-color);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-logo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.team-card-info {
  flex: 1;
  min-width: 0;
}

.team-card-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
}

.team-mascot {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.team-card-meta {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.team-acronym {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--gold);
}

.team-class {
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 1px 5px;
}

.tier-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
}

.tier-header:first-child {
  margin-top: 0;
}

.tier-header h4 {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}

.tier-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
  align-self: center;
}

.tier-rule {
  font-size: 0.72rem;
  color: rgba(245, 233, 208, 0.5);
  white-space: nowrap;
}

.nd-badge {
  color: var(--gold);
  font-size: 0.7rem;
  white-space: nowrap;
}

/* The Index */
.index-section-title {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 30px 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.index-section-title:first-child {
  margin-top: 0;
}

.index-section-title span {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: none;
  color: rgba(245, 233, 208, 0.45);
}

.conf-strength-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conf-strength-row {
  display: grid;
  grid-template-columns: 24px 150px 1fr 52px 110px;
  align-items: center;
  gap: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.conf-rank {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 800;
  font-size: 0.8rem;
}

.conf-name {
  font-weight: 700;
}

.conf-bar-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  overflow: hidden;
}

.conf-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 4px;
}

.conf-srs {
  text-align: right;
  font-weight: 800;
  color: var(--gold);
}

.conf-cross {
  text-align: right;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.index-footnote {
  color: rgba(245, 233, 208, 0.4);
  font-size: 0.75rem;
  margin-top: 12px;
  text-align: center;
}

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.conf-matrix {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.75rem;
  min-width: 560px;
}

.conf-matrix th,
.conf-matrix td {
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.conf-matrix th {
  font-family: 'Oswald', 'Outfit', sans-serif;
  letter-spacing: 1px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.25);
}

.conf-matrix tr th:first-child {
  text-align: left;
}

.mx-diag, .mx-empty {
  color: rgba(255, 255, 255, 0.2);
}

.mx-win {
  color: #7ddf8f;
  font-weight: 700;
}

.mx-loss {
  color: #e0707e;
}

.index-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.index-row {
  display: grid;
  grid-template-columns: 34px 26px 1fr 46px 52px 52px 52px;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--team-color);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.88rem;
}

.index-rank {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
}

.index-row:nth-child(-n+12) .index-rank {
  color: var(--gold);
}

.index-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.index-school {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.index-poll {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
}

.index-conf {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.index-stat {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.index-stat.dim {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  font-size: 0.8rem;
}

.info-toggle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(242, 196, 100, 0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.info-toggle:hover,
.info-toggle.open {
  background: var(--gold-dim);
  color: #1d0e11;
  box-shadow: 0 0 10px rgba(242, 196, 100, 0.35);
}

.index-explainer {
  background: linear-gradient(160deg, rgba(242, 196, 100, 0.07), rgba(0, 0, 0, 0.2));
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.explainer-section {
  margin-bottom: 14px;
}

.explainer-section:last-child {
  margin-bottom: 0;
}

.explainer-section h4 {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--neon-red);
  margin-bottom: 5px;
}

.explainer-section p,
.explainer-section li {
  color: rgba(245, 233, 208, 0.85);
  font-size: 0.88rem;
  line-height: 1.55;
}

.explainer-section ol {
  padding-left: 20px;
  margin-top: 6px;
}

.explainer-section li {
  margin-bottom: 4px;
}

.explainer-section strong {
  color: var(--cream);
}

.index-list-head {
  display: grid;
  grid-template-columns: 34px 26px 1fr 46px 52px 52px 52px;
  gap: 8px;
  padding: 0 12px 6px;
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(245, 233, 208, 0.45);
}

.index-list-head span {
  text-align: right;
  cursor: help;
}

.index-list-head span:nth-child(-n+3) {
  text-align: left;
  cursor: default;
}

@media (max-width: 560px) {
  .index-list-head {
    grid-template-columns: 30px 22px 1fr 40px 48px;
  }

  .index-list-head span:nth-last-child(-n+2) {
    display: none;
  }
}

.index-row {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.index-row:hover {
  border-color: var(--gold-dim);
  background: rgba(242, 196, 100, 0.06);
}

/* Team schedule modal */
.team-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
  padding-right: 36px;
}

.team-modal-head img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.team-modal-head h2 {
  font-family: 'Alfa Slab One', 'Rockwell', serif;
  font-size: 1.3rem;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(242, 196, 100, 0.35);
  margin: 0;
  padding: 0;
}

.team-modal-sub {
  color: rgba(245, 233, 208, 0.6);
  font-size: 0.82rem;
  margin-top: 2px;
}

.team-proj-record {
  text-align: center;
  margin: 14px 0;
  font-family: 'Oswald', 'Outfit', sans-serif;
  letter-spacing: 2px;
  font-size: 0.85rem;
  color: var(--cream);
}

.team-proj-record strong {
  color: var(--gold);
  font-size: 1.1rem;
}

.sched-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sched-row {
  display: grid;
  grid-template-columns: 44px 1fr 58px 52px;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.83rem;
}

.sched-date {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
}

.sched-opp {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sched-opp img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.sched-opp span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-at {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  font-size: 0.72rem;
}

.sched-opp-rank {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
}

.sched-edge {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}

.prob-chip {
  text-align: center;
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 8px;
  padding: 3px 0;
}

.prob-strong { background: rgba(46, 204, 113, 0.18); color: #7ddf8f; }
.prob-lean   { background: rgba(242, 196, 100, 0.15); color: var(--gold); }
.prob-toss   { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7); }
.prob-dog    { background: rgba(224, 112, 126, 0.15); color: #e0707e; }

@media (max-width: 560px) {
  .conf-strength-row {
    grid-template-columns: 20px 1fr 50px;
  }

  .conf-bar-track, .conf-cross { display: none; }

  .index-row {
    grid-template-columns: 30px 22px 1fr 40px 48px;
  }

  .index-stat.dim:last-child, .index-stat.dim:nth-last-child(2) { display: none; }
}

/* Playoff bracket */
.bracket-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
  /* break out of the 900px container so desktop gets the full bracket */
  width: min(1240px, 100vw - 32px);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.bracket {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  min-width: 720px;
}

.bracket-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
  min-width: 0;
}

.matchup,
.chip {
  min-width: 0;
}

.round-title {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}

.round-title span {
  font-size: 0.62rem;
  letter-spacing: 1px;
  color: rgba(245, 233, 208, 0.4);
  text-transform: none;
}

.matchup {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 8px;
  border-left: 3px solid var(--team-color);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
  font-weight: 700;
  min-height: 32px;
}

.chip-win {
  background: linear-gradient(90deg, rgba(242, 196, 100, 0.16), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(242, 196, 100, 0.35);
  border-left: 3px solid var(--team-color);
}

.chip-loser {
  opacity: 0.55;
}

.chip-upset {
  background: linear-gradient(180deg, #a30d24, #7c0a1c);
  color: var(--cream);
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 1.5px;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  text-shadow: 0 0 6px rgba(255, 77, 94, 0.7);
}

.sim-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sim-note {
  font-size: 0.72rem;
  color: rgba(245, 233, 208, 0.45);
  letter-spacing: 0.5px;
}

.chip-tbd {
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
}

.chip-seed {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.68rem;
  width: 14px;
  text-align: right;
  flex-shrink: 0;
}

.chip-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.chip-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-prob {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  flex-shrink: 0;
}

.champ-card {
  background: linear-gradient(160deg, rgba(242, 196, 100, 0.12), rgba(0, 0, 0, 0.2));
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 0 24px rgba(242, 196, 100, 0.12);
}

.champ-label {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245, 233, 208, 0.6);
  margin-bottom: 8px;
}

.champ-team {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(242, 196, 100, 0.5);
}

.champ-team img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.bid-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.bid-group {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
}

.bid-group h4 {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--neon-red);
  margin-bottom: 6px;
}

.bid-group p {
  font-size: 0.82rem;
  color: rgba(245, 233, 208, 0.85);
  line-height: 1.5;
}

/* Mobile bracket: logos only — names live in the tooltip */
@media (max-width: 700px) {
  .bracket {
    min-width: 0;
    gap: 6px;
  }

  .round-title {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }

  .round-title span {
    font-size: 0.52rem;
  }

  .matchup {
    padding: 4px;
    gap: 3px;
  }

  .chip {
    padding: 5px 4px;
    gap: 4px;
    justify-content: center;
    min-height: 30px;
  }

  .chip-name,
  .chip-upset {
    display: none;
  }

  .chip-seed {
    width: auto;
    font-size: 0.62rem;
  }

  .chip-logo {
    width: 22px;
    height: 22px;
  }

  .chip-prob {
    font-size: 0.6rem;
  }

  .champ-card {
    padding: 10px 6px;
  }

  .champ-team {
    font-size: 0.85rem;
  }

  .champ-team img {
    width: 24px;
    height: 24px;
  }
}

/* Learn hub + Field Guide */
.learn-group {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--neon-red);
  margin: 22px 0 10px;
}

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

.learn-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 16px;
  color: white;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-family: inherit;
  font-size: inherit;
}

.learn-card:hover {
  border-color: var(--gold-dim);
  background: rgba(242, 196, 100, 0.06);
}

.learn-card-icon {
  font-size: 1.5rem;
  line-height: 1.2;
}

.learn-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.learn-card-body strong {
  font-size: 0.95rem;
}

.learn-card-body span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  line-height: 1.4;
}

.learn-back {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.learn-back:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.fg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fg-entry {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
}

.fg-entry h4 {
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.fg-entry p {
  color: rgba(245, 233, 208, 0.82);
  font-size: 0.88rem;
  line-height: 1.55;
}

.fg-entry p + p {
  margin-top: 6px;
}

.fg-signal strong {
  color: var(--cream);
}

.fg-example {
  border-left: 3px solid var(--gold-dim);
  padding-left: 10px;
  font-style: italic;
  color: rgba(245, 233, 208, 0.6) !important;
  font-size: 0.82rem !important;
}

.fg-compact .fg-entry {
  padding: 10px 14px;
}

.fg-compact .fg-entry h4 {
  margin-bottom: 2px;
  font-size: 0.88rem;
}

/* Governance & Rules */
.gov-tier {
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--tier-color);
  border-radius: 14px;
  background: var(--glass-bg);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.gov-binding { --tier-color: #2ecc71; }
.gov-pressure { --tier-color: var(--gold); }
.gov-pending { --tier-color: #e08b3c; }

.gov-tier-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gov-tier-head h3 {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream);
}

.gov-badge {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 2px;
  font-weight: 600;
  color: #14090b;
  background: var(--tier-color);
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.gov-tier-desc {
  color: rgba(245, 233, 208, 0.5);
  font-size: 0.8rem;
  margin: 4px 0 12px;
}

.gov-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.gov-item:last-child {
  margin-bottom: 0;
}

.gov-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.gov-item-head h4 {
  font-size: 0.98rem;
  color: var(--cream);
}

.gov-date {
  color: var(--tier-color);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.gov-summary {
  color: rgba(245, 233, 208, 0.78);
  font-size: 0.87rem;
  line-height: 1.55;
  margin-top: 6px;
}

.gov-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.gov-sources a {
  color: rgba(245, 233, 208, 0.65);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 0.72rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.gov-sources a:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

/* Season Sim — team projection card (click a Fate Field marker) */
.scard { border-top: 4px solid var(--team-color); }

.scard-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-right: 30px;
}

.scard-head img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.scard-head h2 { font-family: 'Alfa Slab One', 'Rockwell', serif; font-size: 1.25rem; color: var(--gold); }
.scard-sub { color: rgba(245, 233, 208, 0.6); font-size: 0.78rem; margin-top: 2px; }

.scard-rank {
  margin-left: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.scard-rank span {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(245, 233, 208, 0.45);
}
.scard-rank strong { font-family: 'Alfa Slab One', 'Rockwell', serif; font-size: 1.5rem; color: var(--cream); }

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

.scard-stat {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.scard-stat span {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(245, 233, 208, 0.5);
}
.scard-stat strong { font-size: 0.95rem; color: var(--cream); }

/* Season Sim */
.chaos-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: -6px 0 18px;
  flex-wrap: wrap;
}

.chaos-row label {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}

.chaos-end {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(245, 233, 208, 0.6);
  white-space: nowrap;
}

.chaos-row input[type=range] {
  width: 220px;
  accent-color: var(--neon-red);
}

.chaos-val {
  font-weight: 800;
  color: var(--neon-red);
  font-size: 0.9rem;
  min-width: 44px;
}

.sim-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.sim-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
}

.sim-card h4 {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245, 233, 208, 0.5);
  margin-bottom: 7px;
}

.sim-card-team {
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-card-team img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.sim-card-val {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 4px;
}

.sim-running {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--gold);
  font-weight: 700;
  animation: fadeIn 0.3s ease-out;
}

.fate-wrap {
  width: min(1100px, 100vw - 32px);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 10px;
}

.fate-svg {
  width: 100%;
  display: block;
}

.ff-grid {
  stroke: rgba(255, 255, 255, 0.06);
}

.ff-tick {
  fill: rgba(245, 233, 208, 0.4);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
}

.ff-axis {
  fill: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
}

.ff-trail {
  fill: none;
  stroke: rgba(242, 196, 100, 0.25);
  stroke-dasharray: 3 5;
}

.ff-marker:hover rect {
  stroke: var(--gold);
  stroke-width: 2.5;
}

.sim-table td, .sim-table th {
  text-align: center;
}

/* Coming soon placeholders */
.stub-card {
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.stub-card h3 {
  color: white;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.back-link {
  display: block;
  text-align: center;
  margin: 30px 0 10px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-size: 0.85rem;
}

.back-link:hover {
  color: white;
}

/* --- Playoff Format button + modal --- */
.format-btn-row {
  text-align: center;
  margin: -14px 0 26px;
}

.format-btn {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(242, 196, 100, 0.14), rgba(242, 196, 100, 0.04));
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 9px 22px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(242, 196, 100, 0.35);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 6, 0.8);
  backdrop-filter: blur(6px);
  /* above the sticky site header (z 4000) so the modal + its ✕ are never occluded */
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  background: linear-gradient(160deg, #1d0e11, #14090b);
  border: 2px solid var(--gold-dim);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(242, 196, 100, 0.25), 0 20px 60px rgba(0, 0, 0, 0.7);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 26px;
}

.modal-card h2 {
  font-family: 'Alfa Slab One', 'Rockwell', serif;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 18px;
  padding-right: 36px;
  text-shadow: 0 0 12px rgba(242, 196, 100, 0.35);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(30, 14, 17, 0.92);
  border: 1px solid var(--gold-dim);
  color: var(--cream);
  cursor: pointer;
  font-size: 1rem;
  z-index: 3;
}

@media (max-width: 640px) {
  /* top-align on phones so a tall modal's ✕ clears the header instead of centering under it */
  .modal-overlay { align-items: flex-start; padding: 12px; }
  .modal-card { max-height: calc(100vh - 24px); }
}

.modal-close:hover {
  color: white;
  border-color: var(--gold-dim);
}

.format-section {
  margin-bottom: 16px;
}

.format-section h3 {
  font-family: 'Oswald', 'Outfit', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--neon-red);
  margin-bottom: 6px;
}

.format-section p,
.format-section li {
  color: rgba(245, 233, 208, 0.85);
  font-size: 0.92rem;
  line-height: 1.5;
}

.format-section ul {
  padding-left: 20px;
}

.format-section li {
  margin-bottom: 4px;
}

.format-section strong {
  color: var(--cream);
}
