/* ═══════════════════════════════════════════════════════════════════════════
   OctaStats Design System v3
   Mobile-first. Desktop polished. UFC-inspired.
   Fonts: Barlow Condensed (display) + IBM Plex Mono (data)
═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,700&family=IBM+Plex+Mono:wght@300;400;500&family=Barlow:wght@300;400;500;600&display=swap');

/* ── Tokens: Dark Mode (default) ────────────────────────────────────────── */
:root {
  --bg:            #09090c;
  --bg-card:       #101014;
  --bg-elevated:   #18181f;
  --bg-input:      #1e1e28;
  --border:        #1e1e2a;
  --border-bright: #2a2a3a;
  --border-focus:  #d4192a;

  --red:           #d4192a;
  --red-dim:       #7a0e19;
  --red-hover:     #b5141f;
  --red-glow:      rgba(212,25,42,0.18);
  --red-glow-sm:   rgba(212,25,42,0.08);

  --text-primary:   #eeeef6;
  --text-secondary: #c8c8e8;
  --text-muted:     #8888b0;
  --text-inverse:   #ffffff;

  --green:       #22c55e;
  --green-dim:   rgba(34,197,94,0.12);
  --yellow:      #f59e0b;
  --yellow-dim:  rgba(245,158,11,0.12);
  --blue:        #3b82f6;
  --blue-dim:    rgba(59,130,246,0.12);

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.5);
  --shadow:     0 4px 20px rgba(0,0,0,0.6);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.7);

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  --nav-height: 58px;
  --radius-sm:  3px;
  --radius:     6px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --page-max:   1140px;
  --page-pad:   clamp(16px, 4vw, 40px);

  --transition: 0.15s ease;
  --transition-slow: 0.3s ease;
}

/* ── Tokens: Light Mode ──────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:            #f4f4f8;
  --bg-card:       #ffffff;
  --bg-elevated:   #ebebf2;
  --bg-input:      #f0f0f7;
  --border:        #dcdce8;
  --border-bright: #c8c8d8;

  --red:           #c8121e;
  --red-dim:       #fde8ea;
  --red-hover:     #a80f19;
  --red-glow:      rgba(200,18,30,0.10);
  --red-glow-sm:   rgba(200,18,30,0.05);

  --text-primary:   #111118;
  --text-secondary: #3a3a5e;
  --text-muted:     #6868a0;
  --text-inverse:   #ffffff;

  --green:       #15803d;
  --green-dim:   rgba(21,128,61,0.12);
  --yellow:      #d97706;
  --yellow-dim:  rgba(217,119,6,0.10);
  --blue:        #2563eb;
  --blue-dim:    rgba(37,99,235,0.10);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.10);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
button, input, select { font: inherit; }
a { color: inherit; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── Page transition system ──────────────────────────────────────────────── */
body.page-entering {
  opacity: 0;
  transform: translateY(10px);
}
body.page-entering * {
  animation-play-state: paused !important;
}
body {
  transition: opacity 0.25s ease, transform 0.25s ease, background var(--transition-slow), color var(--transition-slow);
}
body.page-entered {
  opacity: 1;
  transform: translateY(0);
}
body.page-exiting {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* subtle noise texture dark only */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.028'/%3E%3C/svg%3E");
  opacity: 1;
  transition: opacity var(--transition-slow);
}
[data-theme="light"] body::after { opacity: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-height);
  background: rgba(9,9,12,0.94);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-slow), border-color var(--transition-slow);
}
[data-theme="light"] .nav {
  background: rgba(244,244,248,0.96);
}

.nav-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Brand */
.nav-brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.nav-brand-dot {
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--red);
  flex-shrink: 0;
  animation: dot-pulse 3s ease infinite;
}
@keyframes dot-pulse {
  0%,100% { opacity:1; box-shadow: 0 0 10px var(--red); }
  50%      { opacity:0.55; box-shadow: 0 0 3px var(--red); }
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-link {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover  { color: var(--text-primary); background: var(--bg-elevated); }
.nav-link.active { color: #b8924a; }

/* V2 toggle slider pill in nav */
.nav-v1-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: 99px;
  padding: 3px;
  margin-left: 8px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  text-decoration: none;
  user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-v1-toggle-option {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  transition: color 0.25s cubic-bezier(0.4,0,0.2,1);
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  position: relative;
  z-index: 1;
}
.nav-v1-toggle-option.active-opt {
  color: var(--text-primary);
}
/* Animated sliding pill behind the active option */
/* Use transform instead of left/right so the animation is reliable on first click */
.nav-v1-toggle::before {
  content: "";
  position: absolute;
  top: 3px; bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 99px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transform: translateX(0);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}
/* When V1 is active, slide pill to right half */
.nav-v1-toggle.v1-active::before {
  transform: translateX(100%);
}
[data-theme="light"] .nav-v1-toggle::before {
  background: var(--bg);
}

/* Theme slider toggle - animated sliding pill */
.theme-toggle-slider {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: 99px;
  padding: 3px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 4px;
  position: relative;
  user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle-option {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 99px;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  line-height: 1;
  color: var(--text-muted);
  user-select: none;
  position: relative;
  z-index: 1;
}
.theme-toggle-option.active-opt {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}
[data-theme="light"] .theme-toggle-option.active-opt {
  background: var(--bg);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  width: 36px; height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: 4px;
}
.nav-hamburger span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile dropdown */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 190;
  padding: 8px 16px 16px;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow);
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity:0; transform: translateY(-8px); }
  to   { opacity:1; transform: translateY(0); }
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu .nav-link {
  padding: 13px 12px;
  font-size: 15px;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--border);
}
.nav-mobile-menu .nav-link:last-child { border-bottom: none; }

/* mobile theme row */
.nav-mobile-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 4px;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-mobile-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* responsive breakpoint */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  /* Push toggles to the right, they sit left of the hamburger */
  .nav-brand { margin-right: auto; }
  .nav-v1-toggle { margin-left: auto; }
  /* Hide the duplicate toggle controls inside the mobile dropdown */
  .nav-mobile-controls { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT
══════════════════════════════════════════════════════════════════════════ */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 36px var(--page-pad) 80px;
  position: relative;
  z-index: 1;
}
@media (max-width: 600px) {
  .page { padding: 20px 16px 60px; }
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 28px; }

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-eyebrow::before { content: '//'; color: var(--text-muted); }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.02;
  text-transform: uppercase;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-bright); }

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 48px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.card-body { padding: 18px; }

/* ══════════════════════════════════════════════════════════════════════════
   STAT GRID
══════════════════════════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color var(--transition), transform 0.2s;
}
.stat-card:hover { border-color: var(--border-bright); transform: translateY(-1px); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card.positive .stat-value { color: var(--green); }
.stat-card.negative .stat-value { color: var(--red); }
.stat-card.accent   .stat-value { color: #b8924a; }
.stat-card.neutral  .stat-value { color: var(--text-primary); }
/* Win rate: always white/primary - no color coding */
.stat-card.winrate-card .stat-value { color: var(--text-primary) !important; }

/* ══════════════════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}
thead th:hover { color: var(--text-secondary); }
thead th.sorted { color: var(--red); }
thead th.sorted::after { content: ' \2193'; }
thead th.sorted.asc::after { content: ' \2191'; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-elevated); }
tbody td { padding: 11px 14px; vertical-align: middle; }

.td-mono     { font-family: var(--font-mono); font-size: 12px; }
.td-name     { font-weight: 600; font-size: 14px; }
.td-positive { color: var(--green);  font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.td-negative { color: var(--red);    font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.td-neutral  { color: var(--text-secondary); font-family: var(--font-mono); font-size: 12px; }

/* ══════════════════════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-style  { background: var(--blue-dim); color: var(--blue); border-color: rgba(59,130,246,0.25); }
.badge-shift  { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(245,158,11,0.3); }
.badge-won    { background: var(--green-dim); color: var(--green); border-color: rgba(34,197,94,0.25); }
.badge-lost   { background: rgba(212,25,42,0.10); color: #f87171; border-color: rgba(212,25,42,0.2); }
.badge-market { background: var(--green-dim); color: var(--green); border-color: rgba(34,197,94,0.25); }
.badge-model  { background: var(--blue-dim); color: var(--blue); border-color: rgba(59,130,246,0.25); }

/* ══════════════════════════════════════════════════════════════════════════
   PROBABILITY BAR
══════════════════════════════════════════════════════════════════════════ */
.prob-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 80px; }
.prob-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  min-width: 40px;
}
.prob-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent, #b8924a);
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
.prob-bar-fill.green { background: var(--green); }
.prob-bar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   FINISH BARS
══════════════════════════════════════════════════════════════════════════ */
.finish-bars { display: flex; flex-direction: column; gap: 5px; min-width: 110px; }
.finish-bar-row { display: flex; align-items: center; gap: 6px; }
.finish-bar-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  width: 26px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.finish-bar-track { flex: 1; height: 4px; background: var(--bg); border-radius: 2px; overflow: hidden; }
.finish-bar-fill { height: 100%; border-radius: 2px; transition: width 0.8s cubic-bezier(0.16,1,0.3,1); }
.finish-bar-fill.ko  { background: #e07070; }
.finish-bar-fill.sub { background: var(--yellow); }
.finish-bar-fill.dec { background: var(--blue); }
.finish-bar-pct {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
  z-index: 1;
}
.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 20px var(--red-glow);
}
.btn-red:hover, .btn-red:active { background: var(--red-hover); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
}
.btn-outline:hover, .btn-outline:active {
  border-color: var(--text-muted);
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-elevated); }

@media (max-width: 600px) {
  .btn { padding: 12px 18px; font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   TAB BAR
══════════════════════════════════════════════════════════════════════════ */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--red); }

/* ══════════════════════════════════════════════════════════════════════════
   PROP ACCORDION
══════════════════════════════════════════════════════════════════════════ */
.prop-accordion {
  border-top: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-elevated);
}
.prop-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition);
}
.prop-accordion-header:hover { background: var(--border); }
.prop-accordion-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.prop-accordion-chevron {
  color: var(--text-muted);
  font-size: 11px;
  transition: transform 0.2s;
}
.prop-accordion.open .prop-accordion-chevron { transform: rotate(180deg); }
.prop-accordion-body {
  display: none;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.prop-accordion.open .prop-accordion-body { display: block; }
/* Grouped props by fighter/fight-level */
.prop-group { margin-bottom: 6px; }
.prop-group:last-child { margin-bottom: 0; }
.prop-group-header {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 7px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
  color: var(--yellow);
}
.prop-group--fight .prop-group-header {
  color: var(--yellow);
}
.prop-group + .prop-group { border-top: 1px solid var(--border); padding-top: 4px; margin-top: 4px; }
.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.prop-row:last-child { border-bottom: none; }
.prop-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  flex: 1;
}
.prop-prob {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.prop-flagged {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid rgba(245,158,11,0.3);
  padding: 2px 6px;
  border-radius: 2px;
}

/* ── Big Parlay button ─────────────────────────────────────────────────────── */
.parlay-big-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34,197,94,0.10) 0%, rgba(34,197,94,0.06) 100%);
  border: 1px solid rgba(34,197,94,0.35);
  color: #4ade80;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  flex-wrap: wrap;
}
.parlay-big-btn:hover {
  background: linear-gradient(135deg, rgba(34,197,94,0.18) 0%, rgba(34,197,94,0.10) 100%);
  border-color: rgba(34,197,94,0.55);
}
/* V1 version uses gold theme instead of green */
.parlay-big-btn--v1 {
  background: linear-gradient(135deg, rgba(184,146,74,0.10) 0%, rgba(184,146,74,0.06) 100%);
  border-color: rgba(184,146,74,0.35);
}
.parlay-big-btn--v1:hover {
  background: linear-gradient(135deg, rgba(184,146,74,0.18) 0%, rgba(184,146,74,0.10) 100%);
  border-color: rgba(184,146,74,0.55);
}
.parlay-big-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-primary);
}
.parlay-big-odds {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
}
.parlay-big-sep {
  color: var(--text-muted);
  font-size: 14px;
}
.parlay-big-dk {
  height: 13px;
  opacity: 0.9;
  vertical-align: middle;
}
.parlay-big-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
}

/* ── Units badge on bet fighter ─────────────────────────────────────────────── */
.pred-units-label {
  margin-top: 2px;
}
.pred-units-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #d4a96a;
  background: rgba(184,146,74,0.12);
  border: 1px solid rgba(184,146,74,0.3);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════════════════
   ODDS + BET CHIPS
══════════════════════════════════════════════════════════════════════════ */
.odds-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  background: var(--bg-elevated);
  display: inline-block;
}
.odds-chip.fav {
  background: var(--bg-elevated);
  border-color: var(--border-bright);
  color: var(--text-secondary);
}
.bet-unit-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--red);
  color: #fff;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

/* ══════════════════════════════════════════════════════════════════════════
   GRIDS
══════════════════════════════════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════════════════════════════ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
}
.alert-info { background: var(--blue-dim); border: 1px solid rgba(59,130,246,0.25); color: #93c5fd; }
[data-theme="light"] .alert-info { color: var(--blue); }
.alert-warn { background: var(--yellow-dim); border: 1px solid rgba(245,158,11,0.25); color: #fbbf24; }
[data-theme="light"] .alert-warn { color: #92400e; }
.alert-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════════════════════
   LOADING
══════════════════════════════════════════════════════════════════════════ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 56px 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border-bright);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 24px var(--page-pad);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════════════════ */
.fade-in { animation: fadeIn 0.35s ease both; }
@keyframes fadeIn {
  from { opacity:0; transform: translateY(6px); }
  to   { opacity:1; transform: translateY(0); }
}
.stagger > * { opacity:0; animation: fadeIn 0.4s ease forwards; }
.stagger > *:nth-child(1) { animation-delay:0.03s; }
.stagger > *:nth-child(2) { animation-delay:0.07s; }
.stagger > *:nth-child(3) { animation-delay:0.11s; }
.stagger > *:nth-child(4) { animation-delay:0.15s; }
.stagger > *:nth-child(5) { animation-delay:0.19s; }
.stagger > *:nth-child(6) { animation-delay:0.23s; }

/* ══════════════════════════════════════════════════════════════════════════
   HERO (index.html)
══════════════════════════════════════════════════════════════════════════ */
.hero {
  padding: 56px 0 44px;
  margin-bottom: 40px;
  position: relative;
  overflow: visible;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}
.hero-bg-text {
  position: absolute;
  right: clamp(-8px, -1vw, 0px); top: 48%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 170px);
  font-weight: 900;
  color: var(--bg-elevated);
  letter-spacing: -4px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  z-index: 0;
  opacity: 0.5;
  mask-image: linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 25%, rgba(0,0,0,1) 55%);
  -webkit-mask-image: linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 25%, rgba(0,0,0,1) 55%);
  /* Ensure it doesn't cause horizontal scroll */
  max-width: calc(100vw - var(--page-pad));
  overflow: hidden;
}
[data-theme="light"] .hero-bg-text { color: var(--border); }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative; z-index: 1;
}
.hero-eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--red);
  animation: dot-pulse 2.5s ease infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(46px, 9.5vw, 96px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  position: relative; z-index: 1;
}
.hero-title span { color: var(--red); }

.hero-desc {
  color: var(--text-secondary);
  max-width: 460px;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 26px;
  position: relative; z-index: 1;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative; z-index: 1;
}

/* Event banner */
.event-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.event-banner-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 4px;
}
.event-banner-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Method grid */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition), transform 0.2s;
}
.method-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.method-card.featured {
  border-color: var(--red-dim);
  background: linear-gradient(135deg, var(--bg-card), rgba(212,25,42,0.04));
}
.method-card.featured:hover { border-color: var(--red); }
.method-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--red);
  margin-bottom: 9px;
  letter-spacing: 0.12em;
}
.method-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  line-height: 1.2;
}
.method-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

/* ══════════════════════════════════════════════════════════════════════════
   FIGHT CARD (predictions.html)
══════════════════════════════════════════════════════════════════════════ */
.pred-fight {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}
.pred-fight:hover { border-color: var(--border-bright); }
.pred-fight.has-bet { border-left: 3px solid #b8924a; }

.pred-fight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  min-height: 38px;
}
.pred-fight-wc {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.pred-versus {
  display: grid;
  grid-template-columns: 1fr 54px 1fr;
  align-items: stretch;
}
.pred-fighter {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pred-fighter.right { text-align: right; align-items: flex-end; }
.pred-fighter-name {
  font-family: var(--font-display);
  font-size: clamp(15px, 3vw, 21px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.pred-fighter-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pred-fighter.right .pred-fighter-badges { justify-content: flex-end; }

.pred-vs-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
}
.pred-vs-text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

.pred-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.pred-stat-cell {
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pred-stat-cell:last-child { border-right: none; }
.pred-stat-label {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.pred-stat-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}
.pred-stat-val.green { color: var(--green); }
.pred-stat-val.red   { color: var(--red); }

/* mobile fight card stacking */
@media (max-width: 500px) {
  .pred-versus { grid-template-columns: 1fr; }
  .pred-vs-center {
    flex-direction: row;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 7px 16px;
    justify-content: center;
    background: var(--bg-elevated);
  }
  .pred-fighter.right { text-align: left; align-items: flex-start; }
  .pred-fighter.right .pred-fighter-badges { justify-content: flex-start; }
  .pred-stats { grid-template-columns: 1fr 1fr; }
}

/* no event */
.no-event {
  text-align: center;
  padding: 64px 20px;
}
.no-event-icon  { font-size: 38px; margin-bottom: 14px; opacity: 0.3; }
.no-event-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.no-event-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════════════
   V1 OVERLAY (animates over top of V2 site)
══════════════════════════════════════════════════════════════════════════ */
.v1-overlay {
  display: none;
  width: 100%;
  background: var(--bg);
}

.v1-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-height);
  background: rgba(9,9,12,0.94);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid #3a2a10;
  display: flex;
  align-items: center;
  padding: 0 var(--page-pad);
}
[data-theme="light"] .v1-nav {
  background: rgba(244,244,248,0.96);
  border-bottom-color: #c8a86040;
}
.v1-nav-inner {
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.v1-brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}
.v1-brand-dot {
  width: 8px; height: 8px;
  background: #b8924a;
  border-radius: 50%;
  box-shadow: 0 0 10px #b8924a80;
  flex-shrink: 0;
}
.v1-nav-link {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: none;
}
.v1-nav-link:hover  { color: var(--text-secondary); background: var(--bg-elevated); }
.v1-nav-link.active { color: #b8924a; }

.v1-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-elevated);
  border: 1px solid #7a603060;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8924a;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 8px;
  white-space: nowrap;
}
.v1-back-btn:hover { background: var(--border); }

.v1-page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 36px var(--page-pad) 80px;
}

/* V1 amber accent override */
.v1-overlay .page-eyebrow { color: #b8924a; }
.v1-overlay .page-eyebrow::before { color: var(--text-muted); }
.v1-overlay .stat-card.accent .stat-value { color: #b8924a; }
.v1-overlay .tab.active { border-bottom-color: #b8924a; color: var(--text-primary); }
.v1-overlay .pred-fight.has-bet { border-left-color: #b8924a; }
.v1-overlay .badge-market { background: rgba(184,146,74,0.12); color: #b8924a; border-color: rgba(184,146,74,0.3); }
.v1-overlay .btn-red { background: #8a6020; box-shadow: 0 0 20px rgba(138,96,32,0.2); }
.v1-overlay .btn-red:hover { background: #6a4a16; }

/* V1 hero */
.v1-hero-section {
  padding: 44px 0 36px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
.v1-hero-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #7a603040 20%, #7a603040 80%, transparent);
}
.v1-heritage-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid #7a6030;
  background: rgba(122,96,48,0.08);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #b8924a;
  margin-bottom: 16px;
}
.v1-heritage-dot {
  width: 5px; height: 5px;
  background: #b8924a;
  border-radius: 50%;
  flex-shrink: 0;
}
.v1-hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 8.5vw, 86px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-secondary);
  position: relative; z-index: 1;
}
.v1-hero-bg {
  position: absolute;
  right: 16px; top: 48%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 170px);
  font-weight: 900;
  color: var(--bg-elevated);
  letter-spacing: -4px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  z-index: 0;
  opacity: 0.6;
}
[data-theme="light"] .v1-hero-bg { color: var(--border); }

/* V1 sub-nav tabs */
.v1-subnav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #7a603040;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v1-subnav::-webkit-scrollbar { display: none; }
.v1-subnav-tab {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  user-select: none;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.v1-subnav-tab:hover { color: var(--text-secondary); }
.v1-subnav-tab.active { color: #b8924a; border-bottom-color: #b8924a; }

/* comparison table */
.diff-table { width: 100%; }
.diff-table td, .diff-table th {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.diff-table th {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.diff-table .v1-col { color: var(--text-muted); }
.diff-table .v2-col { color: var(--text-primary); font-weight: 500; }
.diff-table tbody tr:last-child td { border-bottom: none; }

/* ══════════════════════════════════════════════════════════════════════════
   CHART CONTAINERS
══════════════════════════════════════════════════════════════════════════ */
.chart-wrap { position: relative; width: 100%; min-height: 200px; }
canvas { max-height: 280px; }

/* Statistics page extras */
.ttest-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.ttest-result {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 6px;
  margin-bottom: 16px;
}
.ttest-result.pass { color: var(--green); }
.ttest-result.fail { color: var(--red); }
.ttest-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.ttest-row:last-child { border-bottom: none; }
.ttest-row-label { color: var(--text-secondary); font-family: var(--font-mono); font-size: 11px; }
.ttest-row-val   { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  margin-top: 32px;
}

/* ══════════════════════════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════════════════════════ */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.text-red   { color: var(--red); }
.text-green { color: var(--green); }
.text-muted { color: var(--text-muted); }
.text-mono  { font-family: var(--font-mono); }
.gap-12 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gap-8  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-4  { margin-top:  4px; }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ══════════════════════════════════════════════════════════════════════════
   VISUALIZATION TABS (statistics page)
══════════════════════════════════════════════════════════════════════════ */
.viz-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.viz-tabs::-webkit-scrollbar { display: none; }
.viz-tab {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  user-select: none;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.viz-tab:hover { color: var(--text-secondary); }
.viz-tab.active { color: var(--text-primary); border-bottom-color: var(--red); }
.viz-panel { display: none; }
.viz-panel.active { display: block; animation: fadeIn 0.3s ease; }

/* Cumulative P&L chart special sizing */
.chart-wrap-lg { position: relative; width: 100%; min-height: 280px; }
.chart-wrap-lg canvas { max-height: 340px; }

/* Division / gender breakdown grid */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: 8px;
  margin-top: 8px;
}
.breakdown-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.breakdown-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.breakdown-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.breakdown-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Text readability ──────────────────────────────────────────── */
.stat-label, .stat-sub, .page-subtitle, .card-title,
.method-desc, .ttest-row-label, .breakdown-label,
.filter-label, .event-banner-label, .page-eyebrow,
th, .viz-tab, .tab { color: var(--text-secondary) !important; }

.viz-tab.active, .tab.active { color: var(--text-primary) !important; }
.ttest-row-val { color: var(--text-primary) !important; }
tbody td { color: var(--text-primary); }
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--text-primary); }

/* ── Hero bg text fix ──────────────────────────────────────────── */
.hero-bg-text {
  right: auto !important;
  left: 0 !important;
  mask-image: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 70%, transparent 95%) !important;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 70%, transparent 95%) !important;
}

/* ── V1 overlay - normal page flow, no scrolldown ──────────────── */
.v1-overlay { min-height: 100vh; }

/* ── V1 nav - sticky within the page, same height as main nav ──── */
.v1-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* ── Mobile improvements ────────────────────────────────────────── */
@media (max-width: 720px) {
  .method-grid { grid-template-columns: 1fr !important; }
  .viz-tabs { flex-wrap: wrap; gap: 4px; }
  .viz-tab { font-size: 10px !important; padding: 5px 8px !important; }
  .hero-bg-text { font-size: clamp(60px, 20vw, 110px) !important; opacity: 0.3 !important; }
  .v1-hero-bg { display: none; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .stat-value { font-size: clamp(20px, 7vw, 30px) !important; }
  .page-title { font-size: clamp(22px, 7vw, 36px) !important; }
  .v1-nav-inner { flex-wrap: wrap; padding: 8px 12px; gap: 4px; }
  .v1-nav-link { font-size: 11px !important; padding: 4px 8px !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
}

/* ── Redesigned prediction card (2026 layout) ─────────────────────────────── */
.pred-side {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.pred-side--right { text-align: right; align-items: flex-end; }
.pred-side--bet {
  background: rgba(184,146,74,0.04);
  position: relative;
}
.pred-side--right.pred-side--bet {
  /* no inner border on either side */
}
.pred-side--no-bet {
  background: transparent;
  opacity: 0.82;
}

/* Prob bar must always fill the full width of its side */
.pred-side .prob-bar-wrap {
  width: 100%;
}
.pred-side--right .prob-bar-wrap {
  flex-direction: row-reverse;
}
.pred-side--right .prob-bar-label {
  text-align: left;
}

.pred-fighter-name.is-bet {
  color: #d4a96a;
  font-size: clamp(15px, 3vw, 20px);
}

/* Market implied probability shown under non-bet fighter to fill space */
.pred-market-ctx {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pred-side--right .pred-market-ctx { align-items: flex-end; }
.pred-market-ctx-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-muted);
}
.pred-market-ctx-val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}
.pred-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.pred-side--right .pred-badges { justify-content: flex-end; }

.pred-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pred-side--right .pred-meta { justify-content: flex-end; }

.pred-edge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.pred-edge.positive { color: var(--green); }

/* Bet button inline in card */
.pred-bet-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 6px 14px;
  border-radius: var(--radius);
  background: rgba(184,146,74,0.10);
  border: 1px solid rgba(184,146,74,0.35);
  color: #c9a55a;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.pred-bet-btn:hover {
  background: rgba(184,146,74,0.20);
  border-color: rgba(184,146,74,0.55);
  color: #d4a96a;
}

/* VS divider with finish bars */
/* VS divider — slim centered column, just the word VS */
.pred-vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  min-width: 44px;
  max-width: 44px;
}
/* Finish bars — full-width row below both fighters */
/* Finish bar base - slightly bigger */
.finish-bar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  width: 30px;
  flex-shrink: 0;
  text-transform: uppercase;
  font-weight: 600;
}
.finish-bar-track { flex: 1; height: 5px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.finish-bar-pct {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

.pred-finish-row {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.pred-finish-row .finish-bars {
  flex-direction: row;
  gap: 0;
  min-width: unset;
  width: 100%;
}
.pred-finish-row .finish-bar-row {
  flex: 1;
  padding: 0 12px;
  border-right: 1px solid var(--border);
}
.pred-finish-row .finish-bar-row:first-child { padding-left: 0; }
.pred-finish-row .finish-bar-row:last-child { padding-right: 0; border-right: none; }

@media (max-width: 520px) {
  .pred-vs-divider {
    flex-direction: row;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    justify-content: center;
    min-width: unset;
    max-width: unset;
    width: 100%;
  }
  .pred-side--right { text-align: left; align-items: flex-start; }
  .pred-side--right .pred-badges { justify-content: flex-start; }
  .pred-side--right .pred-meta { justify-content: flex-start; }
  .pred-finish-row .finish-bars { flex-direction: column; gap: 6px; }
  /* Reset all bar-row padding and borders when stacked — fixes indent and stray lines */
  .pred-finish-row .finish-bar-row {
    padding: 0;
    border-right: none;
  }
  .pred-finish-row .finish-bar-row:first-child { padding-left: 0; }
  .pred-finish-row .finish-bar-row:last-child  { padding-right: 0; border-right: none; }
}

/* ── Prop row variants ─────────────────────────────────────────────────────── */
.prop-row--flagged {
  background: rgba(34,197,94,0.04);
  border-radius: var(--radius-sm);
}
.prop-market {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  margin-left: auto;
  padding-right: 6px;
}
