/* ============================================================
   BENCH.CSS — Dark theme for AttributionBench
   ============================================================ */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1f2b3d;
  --bg-input: #0f1722;
  --border: #2a3a4e;
  --border-focus: #3b82f6;
  --text-primary: #f0f4f8;
  --text-secondary: #8899aa;
  --text-muted: #5a6a7a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --ch-discovery: #f59e0b;
  --ch-conversion: #3b82f6;
  --ch-social: #a855f7;
  --grade-a: #10b981;
  --grade-b: #3b82f6;
  --grade-c: #f59e0b;
  --grade-d: #ef4444;
  --grade-f: #6b7280;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform var(--transition), border-color var(--transition);
}
.card:hover { border-color: var(--border-focus); }
.card-clickable:hover { transform: translateY(-2px); cursor: pointer; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  gap: 8px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-large { padding: 14px 32px; font-size: 1.1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Grade Badges ---- */
.grade-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-mono);
}
.grade-aplus, .grade-a { background: rgba(16, 185, 129, 0.15); color: var(--grade-a); }
.grade-bplus, .grade-b { background: rgba(59, 130, 246, 0.15); color: var(--grade-b); }
.grade-cplus, .grade-c { background: rgba(245, 158, 11, 0.15); color: var(--grade-c); }
.grade-d { background: rgba(239, 68, 68, 0.15); color: var(--grade-d); }
.grade-f { background: rgba(107, 114, 128, 0.15); color: var(--grade-f); }

/* ---- Tables ---- */
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.lb-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.lb-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(42, 58, 78, 0.5);
}
.lb-table tr:hover td { background: rgba(59, 130, 246, 0.05); }
.lb-table .model-name { font-family: var(--font-mono); font-size: 0.85rem; }
.lb-empty { color: var(--text-muted); text-align: center; padding: 32px 16px; }

/* Stats bar above human table */
.lb-stats-bar {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 6px 12px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.lb-stats-bar strong { color: var(--text-primary); }
.lb-stats-sd { color: var(--text-muted); }

/* Min/Max stacked in one cell */
.lb-range-cell { line-height: 1.4; }
.lb-range-min, .lb-range-max { display: block; font-size: 0.8rem; }
.lb-range-min { color: var(--danger); opacity: 0.8; }
.lb-range-max { color: var(--success); opacity: 0.8; }

/* Sortable column headers */
.lb-sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}
.lb-sortable:hover { color: var(--text-primary); }
.lb-sort-active { color: var(--accent) !important; }

/* Score dimension (min/max) */
.score-val { font-family: var(--font-mono); font-weight: 700; }
.score-dim { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); }

/* Histogram cell */
.lb-hist-hdr { white-space: nowrap; }
.lb-hist-cell { padding: 4px 12px; vertical-align: middle; }

/* AI table panel: allow horizontal scroll on small viewports */
.lb-table-ai { min-width: 500px; }
.lb-panel { overflow-x: auto; }

/* AI leaderboard body scrolls vertically once it exceeds ~10 rows so the
   page layout stays stable as the lineup grows. Custom scrollbar styling
   keeps it visually aligned with the dark theme. */
#lb-llm { max-height: 560px; overflow-y: auto; }
#lb-llm::-webkit-scrollbar { width: 8px; }
#lb-llm::-webkit-scrollbar-track { background: transparent; }
#lb-llm::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
#lb-llm::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
#lb-llm thead th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 56px 24px 40px;
}
.hero h1 {
  font-size: 2.6rem;
  background: linear-gradient(135deg, #f0f4f8 0%, #3b82f6 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* Hero live sim preview */
.hero-video-wrap {
  margin: 0 auto 32px;
  max-width: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  background: #0d1420;
  aspect-ratio: 16/9;
}
.hero-video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ---- CTA Cards Grid ---- */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}
.cta-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.cta-card .icon { font-size: 2.5rem; margin-bottom: 12px; }
.cta-card h3 { margin-bottom: 8px; }
.cta-card p { color: var(--text-secondary); font-size: 0.9rem; }
.cta-card.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ---- Leaderboard Section ---- */
.lb-section {
  margin: 48px 0;
}

/* ---- Model Charts ---- */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}
.chart-panel {
  padding: 16px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.chart-legend-ring {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.8px solid var(--text-secondary);
  display: inline-block;
}
.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
  display: inline-block;
}
.chart-legend-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
}
.lb-cond-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 4px 6px 4px 12px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
}
.lb-cond-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.lb-cond-toggle button {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition: background var(--transition), color var(--transition);
}
.lb-cond-toggle button:hover { color: var(--text-primary); }
.lb-cond-toggle button.is-active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--text-primary);
}
.lb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.lb-panel h3 {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lb-panel h3 .tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}

/* ---- 3D Scene Canvas ---- */
#scene-canvas {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  display: block;
}

/* ---- Game UI (play.html) ---- */
.game-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.game-header .stat { display: flex; align-items: center; gap: 6px; }
.game-header .stat-label { color: var(--text-secondary); }
.game-header .stat-value { font-weight: 700; font-family: var(--font-mono); }

/* ---- Instructions Flow ---- */
.instructions-flow {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.flow-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ---- Sliders / Allocation ---- */
.alloc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.alloc-panel-header {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 500;
}
.alloc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}
.alloc-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 122px;
  margin-bottom: 14px;
}
.alloc-label {
  width: 110px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.alloc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.alloc-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alloc-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.alloc-btn:hover { border-color: var(--accent); color: var(--accent); }
.alloc-btn:active { transform: scale(0.95); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-input);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--range-color, var(--accent));
  cursor: pointer;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--range-color, var(--accent));
  cursor: pointer;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
}

.alloc-value {
  width: 90px;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.alloc-pct {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 28px;
}

/* ---- Stacked Budget Bar ---- */
.budget-stack-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-input);
  margin-bottom: 18px;
}
.budget-stack-seg {
  height: 100%;
  transition: width 0.15s ease;
}

/* ---- Goal Reminder (budget phase) ---- */
.goal-reminder {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding: 8px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

/* ---- Simulation Trend Charts ---- */
.sim-trend-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 8px;
}
.sim-trend-charts canvas {
  background: var(--bg-input);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ---- First-month Tip ---- */
.first-month-tip {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.alloc-budget-bar {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.budget-remaining { font-family: var(--font-mono); font-weight: 700; }
.budget-remaining.over { color: var(--danger); }

/* ---- Simulation Panel ---- */
.sim-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.sim-day {
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
}
.sim-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}
.sim-stat {
  text-align: center;
}
.sim-stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 4px; }
.sim-stat-value { font-size: 1.3rem; font-weight: 700; font-family: var(--font-mono); }

.sim-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.speed-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}
.speed-btn.active, .speed-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ---- Weather ---- */
.weather-icon { font-size: 1.5rem; }

/* ---- Monthly History Chart ---- */
.history-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.history-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding-top: 8px;
}
.history-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  position: relative;
  transition: height 0.3s ease;
}
.history-bar-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.history-bar-empty {
  background: var(--bg-input);
  opacity: 0.4;
}

/* ---- Analytics Panel (condition B) ---- */
.analytics-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.analytics-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.analytics-tab {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--transition);
}
.analytics-tab.active {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.analytics-tab:hover { color: var(--text-primary); }
.analytics-content {
  padding: 20px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  line-height: 1.5;
  max-height: 300px;
  overflow-y: auto;
}
.analytics-content table {
  width: 100%;
  border-collapse: collapse;
}
.analytics-content th, .analytics-content td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(42, 58, 78, 0.5);
}
.analytics-content th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.corr-pos { color: var(--success); }
.corr-neg { color: var(--danger); }
.sig-stars { color: var(--warning); }

/* ---- Debrief ---- */
.debrief {
  text-align: center;
  padding: 40px 20px;
}
.debrief-grade {
  font-size: 6rem;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 8px;
}
.debrief-label {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.debrief-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}
.debrief-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.debrief-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.debrief-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.debrief-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ---- Stacked allocation chart (debrief) ---- */
.alloc-chart {
  margin: 24px 0;
}
.alloc-chart-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}
.alloc-chart-label {
  width: 30px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: right;
}
.alloc-chart-bar {
  flex: 1;
  height: 20px;
  display: flex;
  border-radius: 3px;
  overflow: hidden;
}
.alloc-chart-seg {
  height: 100%;
  transition: width 0.3s ease;
}

/* ---- Instructions Overlay ---- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 23, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.overlay-content {
  max-width: 600px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.overlay-content h2 { margin-bottom: 20px; }
.overlay-content p { margin-bottom: 12px; color: var(--text-secondary); }
.overlay-content ul {
  margin: 12px 0 20px 20px;
  color: var(--text-secondary);
}
.overlay-content li { margin-bottom: 6px; }
.overlay-content .channel-desc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

/* ---- Month Result Overlay ---- */
.month-result {
  padding: 24px;
  text-align: center;
}
.month-result h3 { margin-bottom: 16px; }
.month-result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

/* ---- Replay (watch.html) ---- */
.replay-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.replay-reasoning {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.7;
  max-height: 400px;
  overflow-y: auto;
}
.replay-reasoning .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.timeline {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px 0;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.timeline-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}
.timeline-dot.completed {
  background: var(--text-muted);
  border-color: var(--text-muted);
}
.timeline-dot:hover { border-color: var(--accent); }

.replay-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }
  .lb-grid { grid-template-columns: 1fr; }
  .replay-layout { grid-template-columns: 1fr; }
  .debrief-stats { grid-template-columns: 1fr; }
  .game-header { flex-wrap: wrap; gap: 8px; }
  .sim-stats { grid-template-columns: 1fr; }
  .alloc-row { flex-wrap: wrap; }
  .alloc-label { width: 100%; }
  .alloc-hint { margin-left: 0; }
  #scene-canvas { height: 200px; }
  .sim-trend-charts { grid-template-columns: 1fr; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Loading spinner ---- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Fade in ---- */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Section headers ---- */
.section-header {
  text-align: center;
  margin-bottom: 32px;
}
.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--text-secondary); }

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 16px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }

/* ---- Model selector ---- */
.model-selector {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}
.model-selector:focus { outline: none; border-color: var(--accent); }

/* ---- Always-skip checkbox ---- */
.skip-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.skip-check input { accent-color: var(--accent); }

/* ---- Nav ---- */
.bench-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.bench-nav .logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.bench-nav .nav-links {
  display: flex;
  gap: 24px;
}
.bench-nav .nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}
.bench-nav .nav-links a:hover { color: var(--text-primary); }
