/* ============================================
   Matchup Grid — Position Carousel + 18-week Grid
   ============================================ */

.matchup-grid-section {
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

/* ── Dot Grid Background ── */
.matchup-grid-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.matchup-grid-section > .container {
  position: relative;
  z-index: 1;
}

.matchup-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.matchup-grid-header h2 {
  margin-bottom: 0;
}

/* ── Position Label (animated) ── */
#grid-pos-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  transition: opacity 0.3s ease;
}

#grid-pos-label.fade-in {
  animation: fadeLabel 0.4s ease;
}

@keyframes fadeLabel {
  0% { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Legend ── */
.matchup-grid-legend {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  transition: transform 0.2s ease;
}

.legend-item:hover .legend-dot {
  transform: scale(1.3);
}

.legend-dot.easy { background: var(--diff-easy); }
.legend-dot.medium { background: var(--diff-medium); }
.legend-dot.hard { background: var(--diff-hard); }
.legend-dot.bye { background: var(--diff-bye); }

/* ── Carousel Tabs ── */
.sos-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  position: relative;
}

.sos-tab {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.3s var(--ease-smooth), color 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.sos-tab__icon {
  font-size: 1rem;
  vertical-align: middle;
  margin-right: 2px;
}

.sos-tab:hover {
  border-color: var(--border);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.sos-tab.active {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 20px color-mix(in oklch, var(--accent-start) 30%, transparent);
}

/* Progress bar inside active tab */
.sos-tab__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(255,255,255,0.5);
  width: 0;
  transition: none;
}

.sos-tab.active .sos-tab__progress {
  animation: tabProgress 5s linear forwards;
}

@keyframes tabProgress {
  from { width: 0; }
  to { width: 100%; }
}

.sos-tab--locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.sos-tab--locked:hover {
  border-color: var(--border-subtle);
  color: var(--text-secondary);
  transform: none;
}

/* ── Grid Wrapper ── */
.matchup-grid-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  transition: opacity 0.25s ease, transform 0.25s ease;
  background: linear-gradient(180deg, var(--surface-data, var(--bg-elevated)) 0%, var(--bg-void) 100%);
  contain: layout style paint;
}

.matchup-grid-wrap.grid-sliding {
  opacity: 0.3;
  transform: translateY(4px);
}

/* ── Grid Table ── */
.matchup-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  min-width: 900px;
}

.matchup-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  white-space: nowrap;
}

.matchup-grid-table thead th:first-child {
  text-align: left;
  padding-left: 12px;
  position: sticky;
  left: 0;
  z-index: 15;
  background: var(--bg-elevated);
}

/* ── Grid Rows (staggered entrance) ── */
.grid-row--animate {
  animation: rowSlideIn 0.4s ease both;
}

@keyframes rowSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.matchup-grid-table td {
  padding: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.02);
  text-align: center;
}

.matchup-grid-table td:first-child {
  text-align: left;
  padding-left: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-void);
}

.matchup-grid-table tbody tr:nth-child(even) td:first-child {
  background: var(--bg-elevated);
}

/* ── Grid Cells ── */
.grid-cell {
  width: 40px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
  position: relative;
  margin: 0 auto;
}

/* Cell pop-in animation */
.grid-cell--pop {
  animation: cellPop 0.35s ease both;
}

@keyframes cellPop {
  0% { opacity: 0; transform: scale(0.6); }
  70% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.grid-cell.easy {
  --cell-rgb: 59, 130, 246;
  background: rgba(var(--cell-rgb), 0.15);
  color: var(--diff-easy);
  border: 1px solid rgba(var(--cell-rgb), 0.2);
}

.grid-cell.medium {
  --cell-rgb: 148, 163, 184;
  background: rgba(var(--cell-rgb), 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(var(--cell-rgb), 0.15);
}

.grid-cell.hard {
  --cell-rgb: 220, 38, 38;
  background: rgba(var(--cell-rgb), 0.15);
  color: var(--diff-hard);
  border: 1px solid rgba(var(--cell-rgb), 0.2);
}

.grid-cell.bye {
  --cell-rgb: 71, 85, 105;
  background: rgba(var(--cell-rgb), 0.3);
  color: var(--text-tertiary);
  border: 1px solid rgba(var(--cell-rgb), 0.3);
}

.grid-cell.best-week {
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
  border-color: rgba(59, 130, 246, 0.5);
  animation: cellPop 0.35s ease both, bestGlow 2s ease-in-out infinite alternate;
}

@keyframes bestGlow {
  from { box-shadow: 0 0 6px rgba(59, 130, 246, 0.3); }
  to { box-shadow: 0 0 14px rgba(59, 130, 246, 0.6); }
}

.grid-cell:hover {
  transform: scale(1.2);
  z-index: 20;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

@media (prefers-reduced-motion: reduce) {
  .grid-cell:hover {
    transform: none;
    box-shadow: 0 0 0 2px var(--accent-solid);
  }
  .grid-cell.best-week {
    animation: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6);
  }
}

/* ── Tooltip ── */
.grid-tooltip {
  position: fixed;
  z-index: 300;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-popover, var(--shadow-lg));
  font-size: 0.8125rem;
  color: var(--text-primary);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 220px;
}

.grid-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.grid-tooltip-team {
  font-weight: 600;
  margin-bottom: 4px;
}

.grid-tooltip-detail {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.grid-tooltip-difficulty {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ── Loading / Locked ── */
.grid-loading {
  text-align: center;
  padding: var(--space-12);
  color: var(--text-tertiary);
}

.grid-locked-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-8) 0;
}

/* ── Freemium: Gated Cells ── */
.grid-cell--gated {
  filter: blur(3px);
  user-select: none;
  pointer-events: none;
  cursor: default;
}

.grid-cell--gated:hover {
  transform: none;
  box-shadow: none;
}

/* ── Freemium: Paywall Overlay ── */
.grid-paywall-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 55%;
  background: linear-gradient(90deg, transparent 0%, rgba(15,23,42,0.7) 25%, rgba(15,23,42,0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  pointer-events: auto;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  backdrop-filter: blur(2px);
}

[data-theme="light"] .grid-paywall-overlay {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.8) 25%, rgba(255,255,255,0.97) 100%);
}

.grid-paywall-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  padding: var(--space-6);
}

.grid-paywall-cta strong {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.grid-paywall-cta span {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.grid-paywall-cta .lock-icon {
  display: block;
  margin-bottom: 4px;
}

/* ── Scroll Reveal ── */
.reveal,
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed,
.fade-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.fade-up-1 { transition-delay: 0.1s; }
.fade-up-2 { transition-delay: 0.2s; }
.fade-up-3 { transition-delay: 0.3s; }
.fade-up-4 { transition-delay: 0.4s; }

/* ── Skeleton Loader ── */
.skeleton {
  display: block;
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-elevated) 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton--cell {
  width: 40px;
  height: 32px;
  margin: 0 auto;
}

.skeleton--text {
  height: 14px;
  display: inline-block;
}

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

/* ── State: Loading ── */
.grid-state--loading {
  text-align: center;
  padding: var(--space-12);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* ── State: Empty ── */
.grid-state--empty {
  text-align: center;
  padding: var(--space-12);
  color: var(--text-secondary);
}

.grid-state--empty-icon {
  font-size: 2rem;
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

/* ── State: Error ── */
.grid-state--error {
  text-align: center;
  padding: var(--space-12);
  color: var(--text-secondary);
}

.grid-state--error-icon {
  font-size: 2rem;
  margin-bottom: var(--space-3);
  color: var(--error, #dc2626);
}

.grid-retry-btn {
  margin-top: var(--space-4);
}

/* ── State: Locked (blur overlay on data cells, team names visible) ── */
.grid-row--locked td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.grid-row--locked td:not(:first-child) {
  position: relative;
}

.grid-row--locked td:not(:first-child)::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--bg-surface);
  opacity: 0.72;
  border-radius: 4px;
  filter: blur(4px);
  pointer-events: none;
}

.grid-locked-cta-row {
  text-align: center;
}

.grid-locked-cta-row td {
  padding: var(--space-6);
}

.grid-locked-cta-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px dashed var(--border-data-active, oklch(0.52 0.12 155 / 0.32));
  border-radius: var(--radius-lg);
  background: oklch(0.965 0.006 155 / 0.4);
}

.grid-locked-cta-inner strong {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.grid-locked-cta-inner span {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ── State: Success ── */
.grid-state--success {
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  padding: var(--space-3) 0;
}

/* ── State Bar (below table) ── */
.grid-state-bar {
  min-height: 0;
  transition: min-height 0.2s ease;
}

.grid-state-bar:empty {
  min-height: 0;
}

/* ── Locked Footer ── */
.grid-locked-footer {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ── Timestamp ── */
.grid-timestamp {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .matchup-grid-wrap {
    margin: 0 calc(-1 * var(--space-6));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .grid-cell {
    width: 36px;
    height: 28px;
    font-size: 0.625rem;
  }

  .matchup-grid-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sos-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-2);
  }

  .sos-tab {
    min-height: 44px;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .grid-cell--pop,
  .grid-row--animate {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .sos-tab__progress {
    animation: none !important;
  }

  .reveal,
  .fade-up {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .skeleton {
    animation: none;
  }
}

/* ============================================
   Playoff Gauntlet — Yardline Grid
   Weeks 15-17 horizontal difficulty view.
   ============================================ */

.playoff-gauntlet {
  padding: var(--space-20) 0;
  position: relative;
  border-top: 1px solid var(--border-subtle);
}

/* ── Header ── */
.gauntlet-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-start);
  margin-bottom: var(--space-2);
}

.gauntlet-header .section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.gauntlet-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.6;
}

/* ── Position Chip Filters ── */
.gauntlet-filters {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-8) 0 var(--space-6);
}

.gauntlet-chip {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth);
}

.gauntlet-chip:hover {
  border-color: var(--border);
  color: var(--text-primary);
}

.gauntlet-chip.active {
  background: var(--surface-data);
  border-color: var(--border-data-active);
  color: var(--text-primary);
}

/* ── Grid Wrapper ── */
.gauntlet-grid-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 24%,
      oklch(0.35 0.01 155 / 0.06) 24%,
      oklch(0.35 0.01 155 / 0.06) 24.5%
    ),
    linear-gradient(180deg, var(--surface-data) 0%, var(--bg-void) 100%);
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* Yardline tick marks on week columns */
.gauntlet-table thead th:not(.gauntlet-th-team):not(.gauntlet-th-avg)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 4px;
  background: var(--border-subtle);
}

/* ── Table ── */
.gauntlet-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.gauntlet-th-team {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.gauntlet-th-week {
  text-align: center;
  padding: var(--space-3) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  width: 25%;
}

.gauntlet-th-avg {
  text-align: center;
  padding: var(--space-3) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
  width: 80px;
}

/* ── Rows ── */
.gauntlet-table tbody tr {
  border-bottom: 1px solid oklch(0.20 0.008 255 / 0.4);
}

.gauntlet-table tbody tr:last-child {
  border-bottom: none;
}

.gauntlet-table tbody td {
  padding: var(--space-3) var(--space-2);
  vertical-align: middle;
}

/* Team name cell */
.gauntlet-td-team {
  text-align: left;
  padding-left: var(--space-4);
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
  white-space: nowrap;
  letter-spacing: -0.01em;
}


/* Rank number prefix */
.gauntlet-rank-num {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-tertiary);
  display: inline-block;
  width: 18px;
  text-align: right;
  margin-right: 6px;
}
/* ── Difficulty Cells ── */
.gauntlet-cell {
  text-align: center;
  padding: var(--space-3) var(--space-2);
}

.gauntlet-cell-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.2s var(--ease-smooth);
}

/* Easy ▲ */
.gauntlet-cell-inner.easy {
  background: oklch(0.50 0.12 155 / 0.12);
  color: oklch(0.65 0.15 155);
  border: 1px solid oklch(0.50 0.10 155 / 0.18);
}

/* Neutral — */
.gauntlet-cell-inner.neutral {
  background: oklch(0.65 0.04 80 / 0.10);
  color: oklch(0.70 0.08 80);
  border: 1px solid oklch(0.65 0.06 80 / 0.15);
}

/* Hard ▼ */
.gauntlet-cell-inner.hard {
  background: oklch(0.55 0.15 25 / 0.12);
  color: oklch(0.65 0.18 25);
  border: 1px solid oklch(0.55 0.12 25 / 0.18);
}

/* Brutal ▼▼ */
.gauntlet-cell-inner.brutal {
  background: oklch(0.40 0.14 20 / 0.18);
  color: oklch(0.55 0.18 20);
  border: 1px solid oklch(0.40 0.12 20 / 0.25);
}

.gauntlet-symbol {
  font-size: 0.625rem;
  line-height: 1;
}

/* AVG column */
.gauntlet-td-avg {
  text-align: center;
  border-left: 1px solid var(--border-subtle);
}

.gauntlet-avg-value {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
}

.gauntlet-avg-value.rank-easy { color: oklch(0.65 0.15 155); }
.gauntlet-avg-value.rank-neutral { color: oklch(0.70 0.08 80); }
.gauntlet-avg-value.rank-hard { color: oklch(0.65 0.18 25); }
.gauntlet-avg-value.rank-brutal { color: oklch(0.55 0.18 20); }

/* ── Gated gauntlet cells ── */
.gauntlet-cell--gated {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}
.gauntlet-row--gated .gauntlet-td-team {
  filter: blur(4px);
  user-select: none;
}
.gauntlet-paywall-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, oklch(0.10 0.015 255 / 0.6) 20%, oklch(0.10 0.015 255 / 0.92) 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(2px);
}
.gauntlet-paywall-inner {
  text-align: center;
  padding: var(--space-6);
  max-width: 360px;
}
.gauntlet-paywall-lock {
  font-size: var(--text-3xl);
  display: block;
  margin-bottom: var(--space-3);
}
.gauntlet-paywall-title {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.gauntlet-paywall-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

/* ── Row highlight on hover ── */
.gauntlet-table tbody tr:hover {
  background: oklch(0.16 0.010 255 / 0.5);
}

/* ── Footer ── */
.gauntlet-footer {
  margin-top: var(--space-4);
  text-align: center;
}

.gauntlet-footer-note {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .gauntlet-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-2);
  }

  .gauntlet-chip {
    min-height: 44px;
  }

  .gauntlet-cell-inner {
    padding: 4px 8px;
    font-size: 0.6875rem;
    gap: 4px;
  }

  .gauntlet-grid-wrap {
    margin: 0 calc(-1 * var(--space-6));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* ── Mobile: Stacked Cards (580px) ── */
@media (max-width: 580px) {
  .gauntlet-table thead { display: none; }

  .gauntlet-table,
  .gauntlet-table tbody { display: block; }

  .gauntlet-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    padding: var(--space-4) var(--space-3);
    gap: var(--space-2);
    align-items: center;
    border-bottom: 1px solid oklch(0.20 0.008 255 / 0.4);
  }

  .gauntlet-table tbody td {
    display: block;
    padding: 0;
  }

  .gauntlet-td-team {
    flex: 1 1 auto;
    padding: 0;
    font-size: var(--text-sm);
    min-width: 0;
  }

  .gauntlet-td-avg {
    flex: 0 0 auto;
    border-left: 1px solid var(--border-subtle);
    padding-left: var(--space-3);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .gauntlet-td-avg::before {
    content: "AVG";
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
  }

  .gauntlet-cell {
    flex: 1 1 30%;
    min-width: 0;
    text-align: center;
  }

  .gauntlet-cell:nth-child(2)::before,
  .gauntlet-cell:nth-child(3)::before,
  .gauntlet-cell:nth-child(4)::before {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 2px;
  }

  .gauntlet-cell:nth-child(2)::before { content: "WK 15"; }
  .gauntlet-cell:nth-child(3)::before { content: "WK 16"; }
  .gauntlet-cell:nth-child(4)::before { content: "WK 17"; }

  .gauntlet-cell-inner {
    width: 100%;
    padding: 4px 6px;
    font-size: 0.625rem;
    gap: 3px;
  }

  .gauntlet-symbol { font-size: 0.5625rem; }

  .gauntlet-filters {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .gauntlet-grid-wrap {
    margin: 0 calc(-1 * var(--space-6));
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow-x: hidden;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .gauntlet-cell-inner {
    transition: none;
  }
}

/* ============================================
   Floor/Ceiling Confidence Bar
   ============================================ */
.grid-cell {
  position: relative;
}
.grid-cell__range {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--diff-easy, #60A5FA), var(--diff-hard, #EF4444));
  opacity: 0.4;
  pointer-events: none;
}
.grid-tooltip-range {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}
.grid-tooltip-range .sos-easy { color: #60A5FA; }
.grid-tooltip-range .sos-hard { color: #EF4444; }

/* ============================================
   Scoring Format Toggle
   ============================================ */
.scoring-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 2px;
}
.scoring-toggle__btn {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.scoring-toggle__btn:hover {
  color: var(--text-secondary);
}
.scoring-toggle__btn.active {
  color: oklch(0.98 0.02 155);
  background: oklch(0.52 0.12 155);
  border-color: oklch(0.52 0.12 155);
}
.scoring-toggle__btn:focus-visible {
  outline: 2px solid oklch(0.52 0.12 155);
  outline-offset: 2px;
}

/* ============================================
   Share SOS Cards
   ============================================ */
.grid-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  vertical-align: middle;
  margin-left: var(--space-2);
}
.grid-share-btn:hover {
  color: var(--accent-start);
  border-color: var(--accent-start);
}
.grid-share-btn svg {
  width: 12px;
  height: 12px;
}

/* Share modal overlay */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.share-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.share-modal__preview {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.share-modal__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}
.share-modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: var(--text-lg);
  cursor: pointer;
}

@media (max-width: 640px) {
  .scoring-toggle {
    width: 100%;
    justify-content: center;
  }
}
