/* ─────────────────────────────────────────────────────────
   MARCH MADNESS 2026 — STYLES
   Engineering dashboard aesthetic (inspired by dead-reckoning)
   ───────────────────────────────────────────────────────── */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── CSS VARIABLES ── */
:root {
  /* Surfaces */
  --bg-base: #FFFFFF;
  --bg-raised: #FFFFFF;
  --bg-overlay: #fafafa;
  --bg-dark: #111111;
  --bg-dark-raised: #1a1a1a;

  /* Brand / Primary */
  --blue:        #003399;
  --blue-light:  #0044cc;
  --blue-faint:  #e8eef8;

  /* Region Colors */
  --east:    #003399;
  --west:    #8B1A1A;
  --south:   #1a6b1a;
  --midwest: #7a3a00;

  /* Accents */
  --accent-green:  #1a8a3f;
  --accent-red:    #cc2200;
  --accent-orange: #FF4500;
  --accent-yellow: #cc8800;
  --accent-purple: #5522aa;

  /* Text */
  --text-primary:   #111111;
  --text-secondary: #555555;
  --text-muted:     #888888;
  --text-dim:       #aaaaaa;
  --text-on-dark:   #eeeeee;

  /* Borders */
  --border: 2px solid #E5E5E5;
  --border-heavy: 2px solid #003399;
  --border-dark: 1px solid #333333;
  --divider: #E5E5E5;

  /* Spacing */
  --screen-padding: 24px;
  --section-gap: 56px;
  --card-padding: 20px;
  --card-gap: 14px;

  /* Radii — zero for engineering feel */
  --radius: 0px;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: 'Archivo', sans-serif; }
.mono { font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace; font-size: 0.9em; }

/* ── NAVIGATION ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--bg-base);
  border-bottom: var(--border-heavy);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 var(--screen-padding);
  display: flex; align-items: center;
  height: 56px; gap: 32px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo { color: var(--accent-orange); font-size: 18px; }
.nav-title {
  color: var(--blue);
  font-size: 14px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.nav-year { color: var(--accent-orange); }
.nav-links {
  display: flex; gap: 0; margin-left: auto;
}
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  padding: 0 16px; height: 56px;
  display: flex; align-items: center;
  border-left: 1px solid var(--divider);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--blue); background: var(--blue-faint); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  background: var(--bg-base);
  border-bottom: var(--border-heavy);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 80px var(--screen-padding) 40px;
  position: relative; overflow: hidden;
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent 49.5%, #E5E5E5 49.5%, #E5E5E5 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, #E5E5E5 49.5%, #E5E5E5 50.5%, transparent 50.5%);
  background-size: 80px 80px;
  opacity: 0.5;
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 900px; width: 100%;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.badge {
  display: inline-block;
  border: 2px solid #E5E5E5;
  color: var(--text-muted);
  padding: 5px 14px; font-size: 10px;
  font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
.badge-year { border-color: var(--accent-orange); color: var(--accent-orange); }
.badge-updated { border-color: var(--accent-green); color: var(--accent-green); }
.hero-title {
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.01em; line-height: 1.05;
  text-transform: uppercase;
}
.hero-title-accent { color: var(--accent-orange); }
.hero-subtitle { color: var(--text-muted); font-size: 18px; max-width: 600px; }

.hero-champions {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  width: min(720px, 100%);
}

.hero-champion-card {
  border: var(--border);
  background: var(--bg-raised);
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
}

.hero-champion-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 6px;
}

.hero-champion-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.01em;
}

.hero-stats {
  display: flex; gap: 0;
  border: var(--border-heavy);
  width: fit-content;
}
.hero-stat {
  padding: 18px 28px; border-right: 1px solid var(--divider);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.hero-stat:last-child { border-right: none; }
.hero-stat-val {
  font-size: 28px; font-weight: 800;
  color: var(--blue); font-family: 'SF Mono', monospace;
}
.hero-stat-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--text-muted); text-transform: uppercase;
}

.hero-flow {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: center;
}
.flow-step {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-base); border: var(--border);
  padding: 10px 16px;
}
.flow-icon { color: var(--accent-orange); font-size: 14px; }
.flow-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-secondary); }
.flow-arrow { color: #aaa; font-size: 18px; font-weight: 300; }

.hero-scroll-hint {
  position: absolute; bottom: 24px;
  display: flex; flex-direction: column; align-items: center;
  animation: bounce 2s infinite;
}
.scroll-arrow { color: #aaa; font-size: 20px; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── SECTIONS ── */
.section { padding: var(--section-gap) var(--screen-padding); }
.section-dark { background: var(--bg-overlay); }
.section-inner { max-width: 1400px; margin: 0 auto; }
.section-header { margin-bottom: 32px; }
.section-title {
  font-size: 26px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-primary);
  border-left: 4px solid var(--blue);
  padding-left: 14px;
}
.section-subtitle { color: var(--text-muted); font-size: 15px; margin-top: 6px; padding-left: 18px; }

.section-subheader { margin: 40px 0 20px; border-top: var(--border); padding-top: 32px; }
.subheader-title { font-size: 16px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }

/* ── TOP CONTENDERS ── */
.contenders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--card-gap);
}
.contender-card {
  background: var(--bg-raised);
  border: var(--border);
  border-top: 3px solid var(--region-color, var(--blue));
  padding: var(--card-padding);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  position: relative;
}
.contender-card:hover { background: var(--blue-faint); box-shadow: 4px 4px 0 rgba(0,51,153,0.1); }
.contender-seed {
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px;
}
.contender-name { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.contender-region { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.contender-probs { display: flex; flex-direction: column; gap: 6px; }
.contender-prob-row { display: flex; justify-content: space-between; align-items: center; }
.contender-prob-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.contender-prob-val { font-size: 16px; font-weight: 800; font-family: monospace; }
.contender-prob-val.model { color: var(--blue); }
.contender-prob-val.market { color: var(--text-secondary); }
.contender-edge {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid #2a2a2a;
}
.edge-pos { color: var(--accent-green); }
.edge-neg { color: var(--accent-red); }
.edge-neu { color: var(--text-muted); }

/* Champion bar */
.prob-bar-track {
  height: 4px; background: #2a2a2a; margin-top: 4px;
}
.prob-bar-fill { height: 100%; background: var(--blue); transition: width 0.4s; }

/* ── BRACKET ── */
.bk-compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.bk-view-toggle,
.bk-model-switcher {
  display: inline-flex;
  gap: 0;
  border: var(--border);
  background: var(--bg-base);
  margin-bottom: 20px;
}

.bk-model-switcher {
  margin-bottom: 16px;
}

.bk-view-btn,
.bk-model-switch {
  border: 0;
  border-right: 1px solid var(--divider);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 16px;
  cursor: pointer;
}

.bk-view-btn:last-child,
.bk-model-switch:last-child {
  border-right: none;
}

.bk-view-btn-active,
.bk-model-switch-active {
  background: var(--blue);
  color: var(--text-on-dark);
}

.bk-compare-shell {
  display: flex;
  flex-direction: column;
}

.bk-model-card {
  border: var(--border);
  background: var(--bg-base);
  padding: 20px;
}

.bk-model-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: var(--border);
}

.bk-model-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 6px;
}

.bk-model-title {
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.bk-model-copy {
  margin-top: 8px;
  max-width: 680px;
  color: var(--text-secondary);
  font-size: 14px;
}

.bk-model-meta {
  min-width: 220px;
  border: var(--border);
  background: var(--bg-overlay);
}

.bk-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--divider);
}

.bk-meta-row:last-child { border-bottom: none; }

.bracket-legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

.bracket-container {
  display: flex; gap: 4px; overflow-x: auto;
  padding-bottom: 12px;
}
.bracket-region {
  flex: 1; min-width: 220px;
  border: var(--border);
}
.bracket-region-header {
  padding: 10px 12px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  color: #fff;
}
.bracket-team-row {
  display: flex; align-items: center; gap: 0;
  border-bottom: var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.bracket-team-row:hover { background: rgba(255,255,255,0.08); }
.bracket-team-row:last-child { border-bottom: none; }
.bracket-seed {
  width: 28px; min-width: 28px; text-align: center;
  font-size: 10px; font-weight: 800; color: #aaa;
  padding: 6px 0;
  border-right: 1px solid #2a2a2a;
  background: #1a1a1a;
}
.bracket-name {
  flex: 1; padding: 6px 10px;
  font-size: 12px; font-weight: 700; color: #ddd;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bracket-champ-pct {
  padding: 6px 8px;
  font-size: 10px; font-family: monospace; font-weight: 700;
  text-align: right; min-width: 42px;
}

/* Probability tier colors */
.tier-high   { border-left: 3px solid var(--accent-green); }
.tier-med    { border-left: 3px solid var(--blue); }
.tier-low    { border-left: 3px solid #555; }
.tier-long   { border-left: 3px solid var(--accent-red); }
.pct-high    { color: var(--accent-green); }
.pct-med     { color: #6699ff; }
.pct-low     { color: #888; }
.pct-long    { color: var(--accent-red); }

.round-labels {
  display: flex; justify-content: center; gap: 8px;
  flex-wrap: wrap; margin-top: 12px;
}
.round-labels span {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--text-muted); text-transform: uppercase;
}

@media (min-width: 1500px) {
  .bk-compare-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 900px) {
  .hero-champions {
    grid-template-columns: 1fr;
  }

  .bk-model-head {
    flex-direction: column;
  }

  .bk-model-meta {
    width: 100%;
    min-width: 0;
  }
}

/* ── TABLES ── */
.table-controls {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.table-sort-hint { font-size: 13px; color: var(--text-muted); }
.table-filter { display: flex; gap: 8px; flex-wrap: wrap; }

.search-input, .select-input {
  padding: 7px 12px;
  border: var(--border-heavy); border-color: #333;
  background: #1a1a1a;
  color: #ccc;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  font-family: inherit; text-transform: uppercase;
  outline: none; cursor: pointer;
  appearance: none;
}
.search-input:focus, .select-input:focus { border-color: var(--blue); }

.table-wrapper { overflow-x: auto; max-height: 500px; overflow-y: auto; }
.table-wrapper thead th {
  position: sticky; top: 0; z-index: 1;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  padding: 10px 12px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; text-align: left;
  background: #111111; color: #aaaaaa;
  border-bottom: 2px solid var(--blue);
  cursor: pointer; white-space: nowrap;
  user-select: none;
  position: sticky; top: 0; z-index: 1;
}
.data-table thead th:hover { color: #fff; }
.data-table thead th.sort-active { color: var(--accent-orange); }
.data-table thead th.sort-desc::after { content: " ↓"; }
.data-table thead th.sort-asc::after { content: " ↑"; }
.data-table tbody tr {
  border-bottom: var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.data-table tbody tr:hover { background: var(--blue-faint); }
.section-dark .data-table tbody tr:hover { background: #1a1a1a; }
.data-table tbody td {
  padding: 10px 12px; font-size: 14px;
  color: var(--text-primary);
}
.data-table tbody td.team-cell {
  font-weight: 700; cursor: pointer; color: var(--blue);
}
.data-table tbody td.team-cell:hover { text-decoration: underline; }
.data-table td.edge-pos { color: var(--accent-green); font-weight: 800; }
.data-table td.edge-neg { color: var(--accent-red); font-weight: 800; }
.region-tag {
  display: inline-block;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 2px 6px; text-transform: uppercase;
  color: #fff;
}
.seed-badge {
  display: inline-block;
  font-size: 11px; font-weight: 800;
  font-family: monospace; color: var(--text-secondary);
}

/* ── MONTE CARLO ── */
.round-selector {
  display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 28px;
  border: var(--border-heavy);
  width: fit-content;
}
.round-btn {
  padding: 9px 18px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-base); color: var(--text-secondary);
  border: none; border-right: 1px solid var(--divider);
  cursor: pointer; transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.round-btn:last-child { border-right: none; }
.round-btn:hover { background: var(--blue-faint); color: var(--blue); }
.round-btn-active { background: var(--blue) !important; color: #fff !important; }

.mc-grid {
  display: flex; flex-direction: column; gap: 6px;
}
.mc-bar-row {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; padding: 4px 0;
  transition: opacity 0.1s;
}
.mc-bar-row:hover { opacity: 0.85; }
.mc-bar-rank {
  width: 24px; font-size: 11px; font-weight: 800;
  color: var(--text-muted); text-align: right; flex-shrink: 0;
}
.mc-bar-name {
  width: 180px; font-size: 13px; font-weight: 700;
  color: var(--text-primary); flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-bar-seed { font-size: 10px; color: var(--text-muted); margin-left: 4px; }
.mc-bar-track {
  flex: 1; height: 20px; background: #f0f0f0;
  border: 1px solid var(--divider); position: relative;
}
.mc-bar-fill {
  height: 100%; position: absolute; left: 0; top: 0;
  transition: width 0.4s ease;
}
.mc-bar-pct {
  width: 54px; font-size: 13px; font-weight: 800;
  font-family: monospace; color: var(--text-primary);
  text-align: right; flex-shrink: 0;
}
.mc-bar-market {
  width: 54px; font-size: 11px;
  font-family: monospace; color: var(--text-muted);
  text-align: right; flex-shrink: 0;
}

/* Champion histogram */
.histogram-container {
  display: flex; align-items: flex-end; gap: 3px;
  height: 160px; padding: 0 4px;
  border-bottom: 2px solid #333;
  overflow-x: auto;
}
.hist-bar-group { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 50px; }
.hist-bar {
  width: 44px;
  background: var(--blue);
  transition: height 0.4s;
  cursor: pointer;
  border-top: 2px solid var(--blue-light);
}
.hist-bar:hover { opacity: 0.8; }
.hist-label { font-size: 8px; color: #555; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 44px; }

/* ── UPSET WATCH ── */
.upsets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--card-gap);
}
.upset-card {
  background: var(--bg-raised); border: var(--border);
  border-left: 4px solid var(--accent-orange);
  padding: var(--card-padding);
  cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
}
.upset-card:hover { background: #fff8f5; box-shadow: 4px 4px 0 rgba(255,69,0,0.1); }
.upset-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.upset-badge {
  background: var(--accent-orange); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  padding: 3px 8px; text-transform: uppercase;
}
.upset-prob { font-size: 24px; font-weight: 800; color: var(--accent-orange); font-family: monospace; }
.upset-matchup { display: flex; align-items: center; gap: 10px; }
.upset-team { font-size: 17px; font-weight: 800; }
.upset-seed-tag { font-size: 12px; color: var(--text-muted); }
.upset-vs { font-size: 13px; color: var(--text-muted); font-weight: 700; }
.upset-region { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 8px; }
.no-upsets { color: var(--text-muted); font-size: 14px; padding: 24px 0; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg-raised);
  border: var(--border-heavy);
  max-width: 700px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: var(--border-heavy);
  background: var(--bg-dark);
}
.modal-title { font-size: 18px; font-weight: 800; color: #fff; text-transform: uppercase; }
.modal-close {
  background: none; border: 1px solid #444; color: #aaa;
  width: 28px; height: 28px; cursor: pointer; font-size: 14px;
  transition: color 0.15s, border-color 0.15s;
}
.modal-close:hover { color: #fff; border-color: #fff; }
.modal-body { padding: 20px; }
.modal-section { margin-bottom: 24px; }
.modal-section-title {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: var(--border); padding-bottom: 6px; margin-bottom: 14px;
}
.modal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.modal-stat { }
.modal-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.modal-stat-val { font-size: 16px; font-weight: 800; font-family: monospace; }
.modal-round-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.modal-round-item { text-align: center; }
.modal-round-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; }
.modal-round-model { font-size: 15px; font-weight: 800; color: var(--blue); font-family: monospace; }
.modal-round-market { font-size: 11px; color: var(--text-muted); font-family: monospace; }

/* ── PROBABILITY FACTORS BREAKDOWN ── */
.factors-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.factor-block {
  flex: 1; min-width: 80px; text-align: center;
  border: 1px solid var(--border-color); padding: 10px 8px;
}
.factor-result-block {
  background: var(--blue-faint);
  border-color: var(--blue);
}
.factor-val {
  font-size: 18px; font-weight: 800; font-family: monospace;
  color: var(--text-primary);
}
.factor-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--text-muted); margin-top: 3px;
}
.factor-weight {
  font-size: 9px; color: var(--text-dim); font-family: monospace; margin-top: 2px;
}
.factor-op {
  font-size: 20px; font-weight: 300; color: var(--text-muted);
  flex: 0 0 auto; padding: 0 2px;
}

/* ── FOOTER ── */
.footer {
  background: var(--bg-dark);
  border-top: var(--border-heavy); border-top-color: #333;
  padding: 32px var(--screen-padding);
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; gap: 40px; flex-wrap: wrap;
}
.footer-col { flex: 1; min-width: 200px; }
.footer-brand { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-note { font-size: 13px; color: #555; line-height: 1.6; }
.footer-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--accent-orange); text-transform: uppercase; margin-bottom: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #666; }
.footer-code {
  font-family: 'SF Mono', monospace; font-size: 11px;
  color: var(--accent-green);
  background: #1a1a1a; border: 1px solid #333;
  padding: 8px 12px;
}

/* ── LOADING STATE ── */
.loading-msg {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted); font-size: 14px;
}
.loading-msg .loading-icon {
  font-size: 32px; display: block; margin-bottom: 12px;
  animation: spin 2s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── BRACKET TREE ── */
.section-inner-wide { max-width: 1800px; }

/* Round labels — ESPN-style blue header */
.bk-round-labels {
  display: flex;
  background: var(--blue);
  margin-bottom: 8px;
  border: 2px solid var(--blue);
}
.bk-rl-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 7px 4px;
  border-right: 1px solid rgba(255,255,255,0.2);
  min-width: 0;
}
.bk-rl-item:last-child { border-right: none; }
.bk-rl-center { flex: 1.4; }
.bk-rl-name {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff;
}
.bk-rl-date {
  font-size: 8px; color: rgba(255,255,255,0.65);
  margin-top: 2px; letter-spacing: 0.04em;
}
.bk-rl-presented {
  font-size: 7px; color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.bk-rl-sponsor {
  font-size: 12px; font-weight: 800; color: #fff;
  letter-spacing: 0.06em;
}

.bk-scroll { overflow-x: auto; padding-bottom: 16px; }

.bk-full {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-width: 1400px;
}

.bk-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bk-region-row {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bk-region-lbl {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--text-dim);
  padding: 4px 6px;
  border-left: 3px solid currentColor;
  margin-bottom: 4px;
}

.bk-region-cols {
  display: flex;
  flex-direction: row;
  flex: 1;
}
.bk-cols-rtl { flex-direction: row-reverse; }

.bk-region-separator {
  height: 1px;
  background: var(--divider);
  margin: 6px 0;
}

/* Each round column */
.bk-col {
  display: flex;
  flex-direction: column;
  width: 130px;
  min-width: 130px;
  position: relative;
}


/* Horizontal connector line from right edge of left-half cols (except last) */
.bk-half-left .bk-col:not(:last-child) .bk-game::after {
  content: "";
  position: absolute;
  right: -6px;
  width: 6px;
  border-top: 1px solid #ccc;
  pointer-events: none;
}
/* Odd game (top of pair): line goes from center DOWN to meet bottom game's line */
.bk-half-left .bk-col:not(:last-child) .bk-game:nth-child(odd)::after {
  top: 50%;
  bottom: 0;
  border-top: none;
  border-right: 1px solid #ccc;
}
/* Even game (bottom of pair): line goes from center UP + horizontal stub right */
.bk-half-left .bk-col:not(:last-child) .bk-game:nth-child(even)::after {
  top: 0;
  bottom: 50%;
  border-top: none;
  border-right: 1px solid #ccc;
}
/* Horizontal stub to the right for even (pair-bottom) */
.bk-half-left .bk-col:not(:last-child) .bk-game:nth-child(even)::before {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 6px;
  border-top: 1px solid #ccc;
  pointer-events: none;
}

/* Right half: mirror — connectors on left edge */
.bk-half-right .bk-col:not(:last-child) .bk-game::after {
  content: "";
  position: absolute;
  left: -6px;
  width: 6px;
  pointer-events: none;
}
.bk-half-right .bk-col:not(:last-child) .bk-game:nth-child(odd)::after {
  top: 50%;
  bottom: 0;
  border-left: 1px solid #ccc;
}
.bk-half-right .bk-col:not(:last-child) .bk-game:nth-child(even)::after {
  top: 0;
  bottom: 50%;
  border-left: 1px solid #ccc;
}
.bk-half-right .bk-col:not(:last-child) .bk-game:nth-child(even)::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 6px;
  border-top: 1px solid #ccc;
  pointer-events: none;
}

/* Each game cell — card style */
.bk-game {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 2px 0;
  min-height: 56px;
  background: #fff;
  border: 1px solid #dde3ed;
  margin: 2px 4px;
}

/* Team row */
.bk-team {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  cursor: pointer;
  padding: 0 4px 0 4px;
  transition: background .15s;
}
.bk-team:hover { background: var(--blue-faint); }

.bk-winner { font-weight: 700; }
.bk-loser  { font-weight: 400; }

.bk-seed {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  background: #f0f0f0;
  padding: 1px 4px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.bk-winner .bk-seed { background: #dde8ff; color: var(--blue); }

.bk-name {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  flex: 1;
}
.bk-loser .bk-name { color: #aaa; }

/* Pick indicator — checkmark (winner) or empty circle (loser) */
.bk-pick-icon {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 9px; font-weight: 900;
  font-style: normal;
}
.bk-picked   { background: var(--blue); color: #fff; }
.bk-unpicked { border: 1.5px solid #ccc; background: transparent; }

/* Info icon */
.bk-info-icon {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #dde8ff;
  color: var(--blue);
  font-size: 8px; font-weight: 800; font-style: italic;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 1;
}

.bk-divider {
  height: 1px;
  background: #dde3ed;
  margin: 0;
}

/* Final Four columns */
.bk-f4-col {
  width: 120px;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bk-f4-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.bk-f4-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--text-dim);
  text-align: center;
  text-transform: uppercase;
}

/* NCG column — championship box */
.bk-ncg-col {
  width: 230px;
  min-width: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.bk-ncg-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* Championship game box */
.bk-champ-box {
  width: 100%;
  border: 1px solid #dde3ed;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bk-champ-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 7px 10px;
  text-align: center;
}

.bk-champ-title {
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-primary);
}

.bk-champ-date {
  font-size: 9px; color: var(--text-muted);
  margin-top: 2px; letter-spacing: 0.04em;
}

/* Two finalists side by side */
.bk-champ-matchup {
  display: flex;
  align-items: center;
  padding: 8px 6px;
  gap: 4px;
  border-bottom: 1px solid #eee;
}

.bk-champ-team {
  flex: 1;
  display: flex; align-items: center; gap: 4px;
  cursor: pointer;
  padding: 3px 2px;
  transition: background .15s;
  min-width: 0;
}
.bk-champ-team:hover { background: var(--blue-faint); }

.bk-champ-left  { flex-direction: row; }
.bk-champ-right { flex-direction: row-reverse; }

.bk-champ-pick-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 10px; font-weight: 900; font-style: normal;
}

.bk-champ-team-seed {
  font-size: 10px; font-weight: 800;
  background: #f0f0f0; padding: 1px 5px;
  color: var(--text-secondary); flex-shrink: 0;
}
.bk-champ-team-name {
  font-size: 11px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-primary);
}

/* Tiebreaker */
.bk-tiebreaker {
  padding: 8px 10px;
  text-align: center;
}

.bk-tb-label {
  font-size: 8px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.bk-tb-input {
  border: 1px solid #ddd;
  padding: 4px 8px; width: 72px;
  text-align: center;
  font-family: inherit; font-size: 13px; font-weight: 700;
  outline: none;
}
.bk-tb-input:focus { border-color: var(--blue); }

/* Clear / Save buttons */
.bk-bracket-buttons {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 10px; width: 100%;
}
.bk-btn-clear {
  background: none; border: none;
  color: var(--blue); font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; padding: 6px 10px;
  text-decoration: underline;
}
.bk-btn-save {
  background: #e0e0e0; border: none;
  color: #aaa; font-size: 12px; font-weight: 800;
  cursor: not-allowed; font-family: inherit; padding: 6px 16px;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Champion display */
.bk-champion-section {
  text-align: center; margin-top: 16px; width: 100%;
}
.bk-champion-label {
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.bk-champion-team {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  cursor: pointer;
}
.bk-champion-logo {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: #fff;
  letter-spacing: -1px;
}
.bk-champion-name {
  font-size: 12px; font-weight: 800;
  color: var(--text-primary); text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── HOW IT WORKS ── */

/* Pipeline overview bar */
.how-pipeline {
  display: flex; align-items: stretch; gap: 0;
  flex-wrap: wrap;
  border: var(--border-heavy); border-color: #ddd;
  margin-bottom: 48px;
}
.pipeline-step {
  flex: 1; min-width: 180px;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 20px;
  border-right: 1px solid #e0e0e0;
  background: #fff;
}
.pipeline-step:last-child { border-right: none; }
.pipeline-num {
  font-size: 32px; font-weight: 800;
  color: #ddd; line-height: 1; flex-shrink: 0;
  font-family: 'SF Mono', monospace;
}
.pipeline-title {
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 4px;
}
.pipeline-body { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.pipeline-connector { display: none; } /* hidden — borders between cards serve as separators */

/* Section blocks */
.how-block {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: var(--border);
}
.how-block-last { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.how-block-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.how-block-num {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--accent-orange);
  background: #fff5f0; border: 1px solid #ffccaa;
  padding: 4px 10px;
}
.how-block-title {
  font-size: 17px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-primary);
}

/* Data sources */
.how-sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.source-card {
  background: #fff; border: var(--border);
  border-top: 3px solid var(--blue);
  padding: 20px;
}
.source-name {
  font-size: 13px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 2px;
}
.source-type {
  font-size: 12px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 12px;
}
.source-desc {
  font-size: 15px; color: var(--text-secondary); line-height: 1.65;
  margin-bottom: 14px;
}
.source-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.source-tag {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 8px;
  border: 1px solid #ddd; color: var(--text-muted); background: #f8f8f8;
}

/* ML cards */
.how-ml-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.ml-card {
  background: #fff; border: var(--border);
  padding: 20px;
}
.ml-card-primary {
  border-top: 3px solid var(--accent-orange);
}
.ml-card-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-orange); margin-bottom: 4px;
}
.ml-card:not(.ml-card-primary) .ml-card-label { color: var(--text-muted); }
.ml-card-name {
  font-size: 17px; font-weight: 800; color: var(--text-primary); margin-bottom: 10px;
}
.ml-card-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 14px;
}
.ml-card-meta {
  display: flex; gap: 6px; flex-wrap: wrap;
  border-top: 1px solid #eee; padding-top: 12px;
}
.ml-card-meta span {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 8px;
  border: 1px solid #ddd; color: var(--text-muted); background: #f8f8f8;
  font-family: 'SF Mono', monospace;
}

/* ML card learn-more links */
.ml-card-links {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid #eee; padding-top: 12px; margin-top: 4px;
}
.ml-card-links-label {
  font-size: 9px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 2px;
}
.ml-card-links a {
  font-size: 12px; font-weight: 600;
  color: var(--blue); text-decoration: none;
  border-left: 2px solid var(--blue-faint);
  padding-left: 8px;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1.4;
}
.ml-card-links a:hover {
  color: var(--blue-light);
  border-left-color: var(--blue);
}

/* Prediction flow */
.how-predict-flow {
  display: flex; align-items: stretch; gap: 0;
  flex-wrap: wrap;
  border: var(--border);
  background: #fff;
}
.predict-step {
  flex: 1; min-width: 180px;
  padding: 20px; border-right: 1px solid #e0e0e0;
  display: flex; flex-direction: column; gap: 10px;
}
.predict-step:last-child { border-right: none; }
.predict-step-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-orange);
}
.predict-step-title {
  font-size: 15px; font-weight: 800; color: var(--text-primary); margin-bottom: 8px;
}
.predict-step-items {
  display: flex; flex-direction: column; gap: 4px;
}
.predict-step-items span {
  font-size: 13px; color: var(--text-secondary);
  font-family: 'SF Mono', monospace;
  padding: 2px 0;
  border-bottom: 1px solid #f0f0f0;
}
.predict-step-items span:last-child { border-bottom: none; }
.predict-arrow { display: none; } /* borders serve as visual separators */

/* AI vs Human collab */
.collab-intro {
  font-size: 16px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 24px; max-width: 760px;
  border-left: 3px solid #ddd; padding-left: 16px;
}
.collab-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.collab-col {
  background: #fff; border: var(--border);
  padding: 24px;
}
.collab-ai { border-top: 3px solid var(--blue); }
.collab-human { border-top: 3px solid var(--accent-green); }
.collab-col-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: var(--border);
}
.collab-icon { font-size: 16px; }
.collab-ai .collab-icon { color: var(--blue); }
.collab-human .collab-icon { color: var(--accent-green); }
.collab-col-title {
  font-size: 13px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; flex: 1;
}
.collab-ai .collab-col-title { color: var(--blue); }
.collab-human .collab-col-title { color: var(--accent-green); }
.collab-pct {
  font-size: 20px; font-weight: 800;
  font-family: 'SF Mono', monospace; color: var(--text-muted);
}
.collab-list {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.collab-list li {
  font-size: 15px; color: var(--text-secondary); line-height: 1.6;
  padding-left: 16px; position: relative;
}
.collab-list li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--text-dim); font-weight: 400;
}

/* ── PREDICTION ENGINE (Section 05) ── */

.pe-intro {
  font-size: 16px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 32px; max-width: 780px;
  border-left: 3px solid #ddd; padding-left: 16px;
}

.pe-section-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: var(--border); padding-bottom: 6px; margin-bottom: 16px;
}

.pe-desc {
  font-size: 15px; color: var(--text-secondary); line-height: 1.65;
  margin-bottom: 18px; max-width: 760px;
}

/* ── DATA COMPARISON TABLE ── */
.pe-data-section { margin-bottom: 40px; }

.pe-data-table-wrapper {
  overflow-x: auto; margin-bottom: 10px;
}

.pe-data-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: var(--border);
}
.pe-data-table th {
  padding: 8px 12px; font-size: 10px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: #f5f7ff; color: var(--text-muted);
  border-bottom: 2px solid var(--blue); text-align: right;
  white-space: nowrap;
}
.pe-data-table th:first-child { text-align: left; }
.pe-data-table td {
  padding: 9px 12px; font-size: 13px; font-weight: 600;
  font-family: 'SF Mono', monospace; text-align: right;
  border-bottom: 1px solid #eee; color: var(--text-primary);
}
.pe-data-table td:first-child {
  font-family: inherit; font-size: 14px; font-weight: 800;
  text-align: left; color: var(--text-primary);
}
.pe-row-a td:first-child { color: var(--blue); border-left: 3px solid var(--blue); }
.pe-row-b td:first-child { color: #666; border-left: 3px solid #ccc; }
.pe-row-delta {
  background: #fff9f0;
}
.pe-row-delta td {
  font-weight: 800; color: var(--accent-orange);
  border-bottom: none; border-top: 2px solid #f5cca0;
}
.pe-row-delta td:first-child {
  color: var(--accent-orange); border-left: 3px solid var(--accent-orange);
  font-size: 10px; letter-spacing: 0.1em;
}
.pe-val-pos { color: var(--accent-green) !important; }
.pe-val-neg { color: var(--accent-red) !important; }

.pe-table-note {
  font-size: 12px; color: var(--text-muted); font-style: italic;
  padding-left: 4px; line-height: 1.6;
}

/* ── SIGNAL CARDS ── */
.pe-signals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.pe-signal {
  background: #fff; border: var(--border);
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}

.pe-signal-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px; border-bottom: 1px solid #eee;
}
.pe-signal-badge {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff; letter-spacing: 0.04em;
}
.pe-badge-ml   { background: var(--blue); }
.pe-badge-hist { background: var(--accent-green); }
.pe-badge-h2h  { background: var(--accent-orange); }

.pe-signal-title {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; flex: 1; color: var(--text-primary);
}
.pe-signal-wt {
  font-size: 10px; font-weight: 800; font-family: monospace;
  color: var(--text-muted); white-space: nowrap;
}
.pe-signal-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.pe-signal-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.65;
}

/* ── ML MODEL DIAGRAM ── */
.pe-ml-diagram {
  display: flex; align-items: center; gap: 6px;
  background: #f5f7ff; border: 1px solid #dde8ff; padding: 10px;
}
.pe-ml-inputs { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.pe-ml-feat {
  font-size: 9px; font-weight: 700; font-family: 'SF Mono', monospace;
  color: var(--blue); background: #dde8ff;
  padding: 2px 5px; text-align: center;
  white-space: nowrap;
}
.pe-ml-arrow { color: #bbb; font-size: 14px; flex-shrink: 0; }
.pe-ml-model {
  text-align: center; background: var(--blue); color: #fff;
  padding: 10px 8px; flex-shrink: 0;
}
.pe-ml-model-label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; }
.pe-ml-model-sub   { font-size: 8px; color: rgba(255,255,255,0.65); margin-top: 3px; line-height: 1.3; }
.pe-ml-output {
  text-align: center; background: var(--accent-green); color: #fff;
  padding: 10px 8px; flex-shrink: 0;
}
.pe-ml-prob         { font-size: 18px; font-weight: 800; font-family: monospace; }
.pe-ml-output-label { font-size: 8px; color: rgba(255,255,255,0.8); margin-top: 2px; }

/* ── SEED HISTORY BARS ── */
.pe-seed-bars { display: flex; flex-direction: column; gap: 5px; }
.pe-seed-row-item { display: flex; align-items: center; gap: 7px; }
.pe-seed-lbl {
  font-size: 9px; font-weight: 800; font-family: monospace;
  color: var(--text-muted); width: 44px; flex-shrink: 0;
}
.pe-seed-track {
  flex: 1; height: 14px; background: #f0f0f0; border: 1px solid #e0e0e0;
  position: relative; overflow: hidden;
}
.pe-seed-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--blue); transition: width 0.4s;
}
.pe-seed-fill-upset { background: var(--accent-orange); }
.pe-seed-fill-mid   { background: #6699cc; }
.pe-seed-pct-lbl {
  font-size: 9px; font-weight: 800; font-family: monospace;
  color: var(--text-muted); width: 28px; text-align: right; flex-shrink: 0;
}
.pe-seed-highlight .pe-seed-lbl   { color: var(--accent-orange); }
.pe-seed-highlight .pe-seed-pct-lbl { color: var(--accent-orange); font-weight: 900; }
.pe-seed-note {
  font-size: 10px; color: var(--text-muted); font-style: italic;
  margin-top: 4px; line-height: 1.5;
}

/* ── H2H DIAGRAM ── */
.pe-h2h-diag {
  display: flex; flex-direction: column; gap: 10px;
  background: #f8f8f8; border: 1px solid #e5e5e5; padding: 12px;
}
.pe-h2h-lookup {
  display: flex; align-items: center; gap: 6px; justify-content: space-between;
}
.pe-h2h-team-box {
  flex: 1; text-align: center; padding: 8px 6px;
  background: #fff; border: 1px solid #e0e0e0;
}
.pe-h2h-team-name {
  font-size: 11px; font-weight: 800; color: var(--text-primary);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.pe-h2h-vs-badge {
  text-align: center; background: var(--blue); color: #fff;
  padding: 8px 10px; flex-shrink: 0;
}
.pe-h2h-vs-record { font-size: 18px; font-weight: 800; font-family: monospace; }
.pe-h2h-vs-label  { font-size: 8px; color: rgba(255,255,255,0.7); margin-top: 2px; line-height: 1.3; }

.pe-h2h-calc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-h2h-winrate {
  font-size: 11px; font-family: monospace; font-weight: 700;
  color: var(--text-secondary); background: #fff;
  border: 1px solid #ddd; padding: 3px 8px;
}
.pe-h2h-arrow-r { color: #aaa; }
.pe-h2h-adj-pos { font-size: 13px; font-weight: 800; font-family: monospace; color: var(--accent-green); }
.pe-h2h-cap     { font-size: 9px; color: var(--text-muted); }

.pe-h2h-zero {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px dashed #ddd; padding-top: 8px; flex-wrap: wrap;
}
.pe-h2h-zero-lbl  { font-size: 10px; font-weight: 800; color: var(--text-muted); }
.pe-h2h-zero-val  { font-size: 12px; font-weight: 800; font-family: monospace; color: var(--text-muted); }
.pe-h2h-zero-note { font-size: 9px; color: var(--text-muted); line-height: 1.4; }

/* ── BLEND FORMULA ── */
.pe-blend-box {
  background: #fff; border: var(--border-heavy);
  padding: 24px; margin-top: 0;
}

.pe-formula {
  display: flex; align-items: stretch; gap: 0;
  flex-wrap: wrap; border: 1px solid #e5e5e5;
  margin: 16px 0;
}
.pe-formula-term {
  flex: 1; min-width: 90px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 10px; gap: 3px; text-align: center;
  border-right: 1px solid #e5e5e5;
}
.pe-formula-coef {
  font-size: 22px; font-weight: 800; color: var(--blue);
  font-family: 'SF Mono', monospace; line-height: 1;
}
.pe-formula-h2h .pe-formula-coef { color: var(--accent-orange); }
.pe-formula-times { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.pe-formula-var {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-primary); line-height: 1.3;
}
.pe-formula-eg {
  font-size: 10px; color: var(--text-muted); font-family: monospace;
}
.pe-formula-op {
  display: flex; align-items: center; justify-content: center;
  padding: 0 10px; font-size: 22px; color: #bbb; font-weight: 300;
  background: #f8f8f8; border-right: 1px solid #e5e5e5; flex-shrink: 0;
}
.pe-formula-result {
  flex: 1.2; min-width: 90px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 10px; background: var(--blue-faint); text-align: center; gap: 3px;
}
.pe-formula-result-val {
  font-size: 30px; font-weight: 800; color: var(--blue);
  font-family: 'SF Mono', monospace; line-height: 1;
}
.pe-formula-result-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--blue); line-height: 1.3;
}
.pe-formula-note {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.pe-formula-note strong { color: var(--blue); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-stats { flex-direction: column; width: 100%; }
  .hero-stat { border-right: none; border-bottom: 1px solid var(--divider); }
  .mc-bar-name { width: 130px; }
  .modal-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-round-grid { grid-template-columns: repeat(3, 1fr); }
  .collab-grid { grid-template-columns: 1fr; }
  .how-ml-grid { grid-template-columns: 1fr 1fr; }
  .pe-signals-grid { grid-template-columns: 1fr; }
  .pe-formula { flex-direction: column; }
  .pe-formula-term, .pe-formula-result { border-right: none; border-bottom: 1px solid #e5e5e5; min-width: unset; }
  .pe-formula-op { border-right: none; padding: 6px; }
}
@media (max-width: 600px) {
  :root { --screen-padding: 14px; }
  .hero-title { font-size: 28px; }
  .contenders-grid { grid-template-columns: repeat(2, 1fr); }
  .bracket-container { flex-direction: column; }
  .mc-bar-market { display: none; }
  .how-ml-grid { grid-template-columns: 1fr; }
  .how-sources-grid { grid-template-columns: 1fr; }
  .how-predict-flow { flex-direction: column; }
  .predict-step { border-right: none; border-bottom: 1px solid #e0e0e0; }
  .predict-step:last-child { border-bottom: none; }
  .pipeline-step { min-width: 100%; border-right: none; border-bottom: 1px solid #e0e0e0; }
  .pipeline-step:last-child { border-bottom: none; }
}
