/* ════════════════════════════════════════════════
   TrackLab — Main Stylesheet
   ════════════════════════════════════════════════ */

:root {
  --navy: #0a0e1a;
  --navy-mid: #0f1525;
  --navy-light: #161d30;
  --navy-card: #111828;
  --navy-card-h: #151e34;
  --lime: #c8ff00;
  --lime-dim: #8fad15;
  --lime-soft: rgba(200,255,0,0.07);
  --lime-bdr: rgba(200,255,0,0.12);
  --white: #eef0f4;
  --white-d: #c0c4cf;
  --grey: #5a6275;
  --grey-l: #8890a4;
  --red: #ff3b3b;
  --red-bg: rgba(255,59,59,0.1);
  --green: #34d399;
  --green-bg: rgba(52,211,153,0.08);
  --orange: #ff9f1c;
  --gold: #fbbf24;
  --blue: #60a5fa;
}

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

body {
  background: var(--navy);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}


/* ═══ NAV ═══ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(200,255,0,0.04);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,26,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-m {
  width: 34px;
  height: 34px;
  background: var(--lime);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.logo-w {
  font-weight: 800;
  font-size: 21px;
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo-w span { color: var(--lime); }

.nav-r {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-a {
  color: var(--grey-l);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-a:hover { color: var(--white); }

/* Active page indicator */
.nav-a--on { color: var(--white); }
.nav-a--on::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--lime);
  border-radius: 1px;
}

/* Seasonal / event link */
.nav-a--event { color: var(--lime-dim); }
.nav-a--event:hover { color: var(--lime); }
.nav-a--event.nav-a--on { color: var(--lime); }

.nav-cta {
  background: var(--lime);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  display: inline-block;
}

.nav-cta:hover {
  background: #d4ff33;
  transform: translateY(-1px);
}

/* Mobile nav group — hidden on desktop */
.nav-mob { display: none; }

/* ═══ NAV BURGER ═══ */
.nav-burger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: 12px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--grey-l);
  border-radius: 1px;
  transition: all 0.2s;
}
.nav-burger:hover span { background: var(--white); }

/* ═══ FIXED CLOCK ═══ */
.site-clock {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 8000;
  background: var(--navy-mid);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  padding: 6px 12px;
  display: flex;
  align-items: baseline;
  gap: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  font-family: 'Space Mono', monospace;
  user-select: none;
}
.sc-h, .sc-m {
  font-size: 16px;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 1px;
}
.sc-colon {
  font-size: 16px;
  font-weight: 700;
  color: #ef4444;
  margin: 0 1px;
  transition: opacity 0.3s;
}
.sc-colon.off { opacity: 0.15; }
.sc-ampm {
  font-size: 10px;
  font-weight: 400;
  color: var(--grey-l);
  margin-left: 4px;
  letter-spacing: 0.5px;
}

/* ═══ HERO ═══ */
.hero {
  padding: 48px 32px 20px;
  max-width: 960px;
  margin: 0 auto;
}

.hero-ey {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--lime);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fu 0.6s 0.1s ease-out forwards;
}

.hero-ey::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--lime);
}

.hero-h1 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.08;
  margin-bottom: 14px;
  opacity: 0;
  animation: fu 0.6s 0.2s ease-out forwards;
}

.hero-h1 .hl { color: var(--lime); }

.hero-p {
  font-size: 17px;
  color: var(--grey-l);
  max-width: 580px;
  line-height: 1.65;
  font-weight: 400;
  margin-bottom: 32px;
  opacity: 0;
  animation: fu 0.6s 0.35s ease-out forwards;
}

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


/* ═══ SECTION WRAPPER ═══ */
.sw {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px;
}


/* ═══ TABS ═══ */
.tabs-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.tabs {
  display: flex;
  gap: 4px;
  background: var(--navy-mid);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
}

.tab {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--grey-l);
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
}

.tab:hover { color: var(--white); }
.tab.on { background: var(--navy-light); color: var(--white); }

.tc {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  background: rgba(200,255,0,0.1);
  color: var(--lime);
  padding: 2px 6px;
  border-radius: 5px;
}

.td {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: pu 1s ease-in-out infinite;
}


/* ═══ BADGES ═══ */
.bg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bg-up {
  background: var(--lime-soft);
  color: var(--lime);
  border: 1px solid rgba(200,255,0,0.15);
}


/* ═══ SECTION LABELS ═══ */
.sec-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--grey);
  margin-bottom: 4px;
  margin-top: 8px;
}

.meeting-summary {
  font-size: 13px;
  color: var(--grey-l);
  margin-bottom: 12px;
  line-height: 1.4;
}

/* ═══ ACCURACY STATS BAR ═══ */
.acc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy-card);
  border: 1px solid rgba(200,255,0,0.10);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  gap: 12px;
}
.acc-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.acc-val {
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}
.acc-val.acc-good { color: var(--lime); }
.acc-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
}
.acc-pct {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--grey-l);
}
.acc-div {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.acc-q {
  font-size: 10px;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-left: 2px;
}
.acc-disclaimer {
  font-size: 11px;
  color: var(--grey);
  text-align: center;
  margin-top: -8px;
  margin-bottom: 14px;
}

@media (max-width: 400px) {
  .acc-bar { flex-wrap: wrap; gap: 8px; }
  .acc-stat { min-width: 80px; }
  .acc-div { display: none; }
}

/* ═══ COMPACT ROWS ═══ */
.compact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.compact-row {
  display: grid;
  grid-template-columns: 1fr 280px;
  align-items: center;
  background: var(--navy-card);
  border: 1px solid var(--lime-bdr);
  border-radius: 12px;
  padding: 12px 16px;
  gap: 12px;
  transition: all 0.2s;
  cursor: pointer;
}

.compact-row:hover {
  border-color: rgba(200,255,0,0.22);
  background: var(--navy-card-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.cr-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.cr-time-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.cr-time {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--lime);
  background: rgba(200,255,0,0.08);
  padding: 3px 8px;
  border-radius: 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.cr-time-b365 {
  font-size: 9px;
  color: var(--grey);
  font-weight: 400;
  white-space: nowrap;
}

.cr-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}

.cr-venue-label {
  color: var(--grey-l);
  font-weight: 400;
  font-size: 12px;
}

.cr-sub {
  font-size: 11px;
  color: var(--grey-l);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  overflow: hidden;
}

.cr-top-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--lime-soft);
  border: 1px solid rgba(200,255,0,0.08);
  border-radius: 6px;
  padding: 4px 10px;
  width: 52px;
  flex-shrink: 0;
}

.cr-ts-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  color: var(--lime);
}

.cr-ts-sub {
  font-size: 8px;
  color: var(--grey);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.cr-countdown {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--grey-l);
  text-align: right;
  width: 140px;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cr-cd-val {
  font-weight: 700;
  color: var(--white);
  font-size: 13px;
}
.cr-cd-started { color: var(--lime); }
.cr-cd-awaiting { color: #f59e0b; }

.cr-podium {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 180px;
  flex-shrink: 0;
  margin-left: auto;
}
.cr-pod-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  line-height: 1;
}
.cr-pod-pos {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 9px;
  width: 28px;
  text-align: center;
  padding: 2px 0;
  border-radius: 4px;
  flex-shrink: 0;
}
.cr-pod-1 { background: var(--lime); color: var(--navy); }
.cr-pod-2 { background: rgba(255,255,255,0.12); color: var(--white); }
.cr-pod-3 { background: rgba(255,255,255,0.06); color: var(--grey-l); }
.cr-pod-name {
  color: var(--white-d);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.cr-bet {
  background: var(--lime);
  color: var(--navy);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(200,255,0,0.12);
}

.cr-bet:hover {
  background: #d4ff33;
  transform: translateY(-1px);
}


/* ═══ EXPANDED RACE VIEW ═══ */
.expanded-race {
  display: none;
  background: var(--navy-card);
  border: 1px solid var(--lime);
  border-radius: 16px;
  overflow: hidden;
  scroll-margin-top: 72px;
  margin-bottom: 14px;
}

.expanded-race.open {
  display: block;
  overflow: visible;
}

.er-header {
  position: relative;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(200,255,0,0.06);
}

.er-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-l);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.er-close:hover { background: rgba(255,255,255,0.12); color: var(--white); }

.venue-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  margin-top: 8px;
}

.v-time {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--lime);
  background: rgba(200,255,0,0.08);
  padding: 2px 8px;
  border-radius: 5px;
}

.v-race-num {
  font-weight: 600;
  font-size: 13px;
  color: var(--white);
}

.v-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  letter-spacing: -0.2px;
}

.v-loc {
  font-size: 12px;
  color: var(--grey-l);
}

.r-type {
  font-size: 13px;
  color: var(--white-d);
  font-weight: 500;
}

.r-type-explain {
  font-size: 12px;
  color: var(--grey-l);
  margin-top: 4px;
}

.v-char {
  font-size: 12px;
  color: var(--grey-l);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}

.v-char .vi {
  font-style: normal;
  font-size: 11px;
}

/* Metadata tags with tooltips */
.metas {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.mt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--grey-l);
  background: rgba(255,255,255,0.03);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
  cursor: help;
}

.mt .ic {
  font-size: 11px;
  opacity: 0.75;
  font-style: normal;
}

.mt .pl {
  color: var(--white-d);
  font-weight: 500;
}

.mt .og {
  color: var(--grey);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
}

.mt .tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--navy-light);
  border: 1px solid rgba(200,255,0,0.15);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--white-d);
  line-height: 1.5;
  width: 230px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.mt .tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--navy-light);
}

.mt:hover .tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.tip-t {
  color: var(--lime);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

/* Countdown bar in expanded view */
.er-countdown {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 20px;
  background: rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(200,255,0,0.04);
}

.er-cd-time {
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--lime);
}
.er-cd-started { color: var(--lime); }
.er-cd-awaiting { color: #f59e0b; }

/* ═══ SPLIT LAYOUT (ROSTER + DETAIL) ═══ */
.er-body {
  padding: 16px 20px;
}

.er-body-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--grey);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sort-hint {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--grey-l);
  font-weight: 400;
}

.er-split {
  display: flex;
  gap: 20px;
}

/* Detail panel — left column on desktop (65%) */
.er-detail {
  flex: 1 1 0%;
  min-width: 0;
  order: 1;
}

.er-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: var(--grey-l);
  font-size: 14px;
  text-align: center;
  border: 1px dashed rgba(200,255,0,0.1);
  border-radius: 12px;
  padding: 24px;
}

.er-detail .hc {
  cursor: default;
  border-color: var(--lime);
  background: rgba(200,255,0,0.04);
  animation: detailFadeIn 0.3s ease-out;
}

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

.er-detail .hc:hover {
  transform: none;
  box-shadow: none;
}

/* Roster wrapper for result cards (label + roster together) */
.er-roster-wrap {
  flex: 0 0 300px;
  width: 300px;
  align-self: flex-start;
  position: sticky;
  top: 70px;
  order: 2;
}
.er-roster-wrap .er-roster {
  flex: none;
  width: 100%;
  position: static;
}

/* Compact horse roster — right column on desktop */
.er-roster {
  flex: 0 0 300px;
  width: 300px;
  overflow-y: auto;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 70px;
  align-self: flex-start;
  order: 2;
}

/* ═══ ROSTER ROW ═══ */
.hl-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  height: 40px;
  background: transparent;
  border-left: 3px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.hl-row:hover {
  background: rgba(200,255,0,0.04);
}

.hl-row.active {
  border-left-color: var(--lime);
  background: rgba(200,255,0,0.06);
}

.hl-indicator {
  display: none;
}

.hl-row.active .hl-indicator {
  display: none;
}

.hl-silk {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
}
.hl-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--grey-l);
  flex-shrink: 0;
  min-width: 16px;
  text-align: center;
}
.hl-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hl-score {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: auto;
}

.hl-score.hi { color: var(--lime); }
.hl-score.md { color: var(--orange); }
.hl-score.lo { color: var(--grey-l); }

.hl-unit {
  font-size: 10px;
  font-weight: 400;
  color: var(--grey);
}

.hl-tier {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.hl-tier.tier-hi {
  color: var(--lime);
  background: rgba(200,255,0,0.08);
}
.hl-tier.tier-md {
  color: var(--orange);
  background: rgba(255,159,28,0.08);
}
.hl-tier.tier-lo {
  color: var(--grey-l);
  background: rgba(255,255,255,0.04);
}

/* Hidden card pool */
.hc-pool {
  display: none !important;
}


/* ═══ HORSE CARD ═══ */
.hc {
  background: var(--navy-mid);
  border: 1px solid var(--lime-bdr);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.hc::before {
  display: none;
}

.hc:hover {
  border-color: rgba(200,255,0,0.22);
  background: var(--navy-card-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hc.selected {
  border-color: var(--lime);
  background: rgba(200,255,0,0.04);
  box-shadow: 0 0 0 1px var(--lime), 0 4px 24px rgba(200,255,0,0.1);
}

.hc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hc-id { flex: 1; }

.hc-rank {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.hc-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hc-silk {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.hc-num {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--grey-l);
  flex-shrink: 0;
}

.hc-jockey {
  font-size: 12px;
  color: var(--grey-l);
}

.profile-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--grey-l);
  transition: color 0.15s, border-color 0.15s;
}
.profile-link:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}
.profile-link--horse {
  border-bottom-color: var(--grey-m);
}
.profile-link--horse:hover {
  border-bottom-color: var(--lime);
}

.hc-sc {
  text-align: center;
  flex-shrink: 0;
  min-width: 100px;
}

.hc-sc-val {
  font-family: 'Space Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.hc-sc-val.hi { color: var(--lime); }
.hc-sc-val.md { color: var(--orange); }
.hc-sc-val.lo { color: var(--grey-l); }

@keyframes val-flash {
  0%   { background: rgba(250, 204, 21, 0.35); }
  100% { background: transparent; }
}
.val-flash {
  animation: val-flash 1s ease-out;
  border-radius: 4px;
}

.hc-sc-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--grey);
}

.hc-sc-tier {
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: 0.3px;
}

.hc-sc-tier.tier-hi { color: var(--lime); }
.hc-sc-tier.tier-md { color: var(--orange); }
.hc-sc-tier.tier-lo { color: var(--grey-l); }

.hc-sc-lbl {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
  margin-top: 4px;
  position: relative;
}

.hc-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--grey);
  font-size: 8px;
  color: var(--grey);
  font-weight: 700;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 2px;
}

.hc-q-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: -10px;
  background: var(--navy-light);
  border: 1px solid rgba(200,255,0,0.15);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  font-family: 'Outfit', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--white-d);
  line-height: 1.55;
  width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  font-weight: 400;
}

.hc-q-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 16px;
  border: 6px solid transparent;
  border-top-color: var(--navy-light);
}

.hc-q:hover .hc-q-tip {
  opacity: 1;
  pointer-events: auto;
}

/* SHAP factor tooltip */
.hc-shap-wrap {
  display: inline-block;
  margin-top: 2px;
}

.shap-q {
  margin-left: 4px;
}

.shap-tip {
  width: 260px;
  padding: 14px 16px;
}

.shap-title {
  display: block;
  font-weight: 700;
  color: var(--white);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.shap-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.shap-dir {
  width: 14px;
  text-align: center;
  font-size: 10px;
  flex-shrink: 0;
}

.shap-dir.up { color: var(--green); }
.shap-dir.down { color: var(--red); }

.shap-label {
  flex: 1;
  color: var(--white-d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shap-bar-bg {
  width: 50px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  flex-shrink: 0;
}

.shap-bar {
  height: 100%;
  border-radius: 2px;
}

.shap-bar.bar-up { background: var(--green); }
.shap-bar.bar-down { background: var(--red); }

/* Result entries */
.result-hc { cursor: default; }
.result-hc:hover { background: var(--navy-card); }
.res-pos { font-weight: 700; }
.res-pos.p1 { color: var(--gold); }
.res-pos.p2 { color: var(--grey-l); }
.res-pos.p3 { color: #cd7f32; }
.res-margin { padding: 4px 16px 8px; font-size: 12px; color: var(--grey-l); }
.res-dnf { padding: 4px 16px 8px; font-size: 12px; color: var(--red); }
.res-winner-label { font-size: 13px; }

/* Horse info tags */
.hc-info {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hc-tag {
  font-size: 11px;
  color: var(--white-d);
  background: rgba(255,255,255,0.04);
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.04);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hc-tag .tl {
  color: var(--grey);
  font-size: 9px;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hc-tag .tv { font-weight: 600; }
.tv.good { color: var(--green); }
.tv.ok   { color: var(--orange); }
.tv.poor { color: var(--red); }

/* Horse odds — money first */
.hc-odds {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hc-odds-money {
  font-size: 15px;
  font-weight: 700;
  color: var(--lime);
}

.hc-odds-frac {
  font-size: 11px;
  color: var(--grey);
  font-weight: 400;
}

.hc-odds-bookie {
  font-size: 11px;
  color: var(--grey-l);
  margin-bottom: 8px;
  padding-left: 2px;
}

.hc-odds-help {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.hc-odds-help-text {
  font-size: 11px;
  color: var(--blue);
  cursor: default;
}

/* Personality blurb */
.hc-personality {
  font-size: 12px;
  color: var(--grey-l);
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(200,255,0,0.03);
  border-radius: 8px;
  border-left: 2px solid rgba(200,255,0,0.15);
  font-style: italic;
  position: relative;
  z-index: 1;
}

.hc-personality .pl {
  font-style: normal;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
  display: block;
  margin-bottom: 3px;
}

/* ═══ BET BUTTON (inside horse card) ═══ */
.hc-bet-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px 20px;
  background: #1a6c34;
  color: #ffd700;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border: 2px solid #1a6c34;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

.hc-bet-btn:hover {
  background: #228b3b;
  border-color: #228b3b;
  transform: translateY(-1px);
}

.hc-bet-btn:active {
  transform: translateY(0);
}

/* ═══ BET PANEL ═══ */
.bet-panel {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: var(--navy-mid);
  border-top: 2px solid var(--lime);
  padding: 20px 24px 28px;
  z-index: 200;
  transition: bottom 0.4s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
}

.bet-panel.open { bottom: 0; }

.bp-inner {
  max-width: 720px;
  margin: 0 auto;
}

.bp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bp-title {
  font-size: 13px;
  color: var(--grey-l);
}

.bp-horse {
  font-size: 20px;
  font-weight: 800;
}

.bp-score-wrap {
  text-align: right;
}

.bp-score {
  font-family: 'Space Mono', monospace;
  color: var(--lime);
  font-weight: 700;
  font-size: 14px;
}

.bp-tier {
  font-size: 10px;
  color: var(--grey-l);
  margin-top: 1px;
}

.bp-close {
  background: none;
  border: none;
  color: var(--grey-l);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.bp-close:hover { color: var(--white); }

.bp-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
}

.bp-si {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bp-sl {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bp-sv {
  font-size: 14px;
  font-weight: 600;
  color: var(--white-d);
}

.bp-money-first {
  font-size: 16px;
  font-weight: 700;
  color: var(--lime);
}

.bp-odds-frac {
  font-size: 12px;
  color: var(--grey);
  font-weight: 400;
}

.bp-sd {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.06);
}

.bp-amount-label {
  font-size: 13px;
  color: var(--white-d);
  margin-bottom: 8px;
  font-weight: 500;
}

.bp-amounts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.bp-amt {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--white-d);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.bp-amt:hover {
  border-color: rgba(200,255,0,0.2);
  background: rgba(200,255,0,0.05);
}

.bp-amt.sel {
  border-color: var(--lime);
  background: rgba(200,255,0,0.08);
  color: var(--lime);
}

.bp-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(200,255,0,0.04);
  border-radius: 10px;
  border: 1px solid rgba(200,255,0,0.08);
  margin-bottom: 6px;
}

.bp-return-label {
  font-size: 13px;
  color: var(--grey-l);
}

.bp-return-val {
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--lime);
}

.bp-odds-help {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.bp-odds-help-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--grey-l);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bp-odds-help-text {
  font-size: 12px;
  color: var(--grey);
  line-height: 1.5;
}

.bp-return-note {
  font-size: 11px;
  color: var(--grey);
  margin-bottom: 16px;
  padding-left: 4px;
}

.bp-breakdown {
  background: rgba(200,255,0,0.04);
  border: 1px solid rgba(200,255,0,0.08);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 6px;
}

.bp-bk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.bp-bk-label {
  font-size: 13px;
  color: var(--grey-l);
}

.bp-bk-val {
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--white-d);
}

.bp-bk-profit {
  color: var(--lime);
}

.bp-bk-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}

.bp-bk-total-row .bp-bk-label {
  font-weight: 600;
  color: var(--white-d);
}

.bp-bk-total {
  font-size: 18px;
  color: var(--lime);
}

.bp-place-bet {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: #127b3b;
  color: #ffdf1b;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.bp-place-bet:hover {
  background: #159445;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}


/* ═══ FOOTER ═══ */
.foot {
  text-align: center;
  padding: 40px 32px 48px;
  max-width: 960px;
  margin: 0 auto;
}

.foot p {
  font-size: 14px;
  color: var(--grey);
}

.foot a {
  color: var(--lime);
  text-decoration: none;
}


/* ═══ LIVE CARD ═══ */
.live-card {
  background: var(--navy-card);
  border: 1px solid var(--lime-bdr);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  margin-bottom: 14px;
  position: relative;
}

.live-card:hover { border-color: rgba(200,255,0,0.22); }

.lc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px 12px;
  gap: 16px;
}

.lc-id { flex: 1; }

.lc-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.bg-live {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(255,59,59,0.2);
}

.ld {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: pu 1s ease-in-out infinite;
}

@keyframes pu {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.6); }
}

.lc-act {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.ca-t { text-align: right; }

.ca-l {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--grey);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: block;
}

.ca-v {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  line-height: 1.1;
}

.bet-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lime);
  color: var(--navy);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(200,255,0,0.15);
}

.bet-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(200,255,0,0.25);
  background: #d4ff33;
}

.bet-btn.off {
  background: rgba(200,255,0,0.08);
  color: var(--lime-dim);
  cursor: default;
  box-shadow: none;
  pointer-events: none;
  font-weight: 600;
}


/* ═══ TRACK ═══ */
.trk {
  width: 100%;
  height: 72px;
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,0.12);
  border-top: 1px solid rgba(200,255,0,0.03);
  border-bottom: 1px solid rgba(200,255,0,0.03);
}

/* Track parallax texture */
.trk::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg, transparent 0px, rgba(139,105,65,0.03) 2px,
    transparent 4px, rgba(80,60,30,0.02) 8px
  );
  background-size: 40px 100%;
  z-index: 0;
  pointer-events: none;
  animation: trackScroll var(--parallax-speed, 3s) linear infinite paused;
}
.trk.racing::before { animation-play-state: running; }
@keyframes trackScroll { to { background-position: -40px 0; } }

.tr-r {
  position: absolute;
  width: 100%;
  height: 1px;
}

.tr-t {
  top: 20%;
  background: linear-gradient(90deg, transparent, rgba(200,255,0,0.06) 15%, rgba(200,255,0,0.06) 85%, transparent);
}

.tr-b {
  bottom: 20%;
  background: linear-gradient(90deg, transparent, rgba(200,255,0,0.06) 15%, rgba(200,255,0,0.06) 85%, transparent);
}

/* Starting gate */
.tr-g {
  position: absolute;
  left: 4%;
  top: 15%;
  height: 70%;
  width: 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gs {
  flex: 1;
  background: rgba(200,255,0,0.15);
  border-radius: 1px;
}

/* Finish post */
.tr-f {
  position: absolute;
  right: 5%;
  top: 15%;
  height: 70%;
  width: 8px;
  background: repeating-conic-gradient(rgba(255,255,255,0.2) 0% 25%, transparent 0% 50%) 0 0 / 4px 4px;
  border-radius: 1px;
  opacity: 0.4;
}

/* Horse Lottie animation */
.horse {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  z-index: 3;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  overflow: hidden;
}

.horse svg {
  display: block;
  width: 100%;
  height: 100%;
}

.horse.idle {
  animation: idle-bob 2.5s ease-in-out infinite;
}

@keyframes idle-bob {
  0%, 100% { transform: translateY(-50%) scaleX(-1); }
  50%      { transform: translateY(calc(-50% - 2px)) scaleX(-1); }
}

.horse.go {
  animation: none;
}

/* Dust particles */
.dust-wrap {
  position: absolute;
  top: 50%;
  left: -10px;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

.dp {
  position: absolute;
  border-radius: 50%;
  background: var(--dust-color, rgba(139, 105, 65, 0.35));
}

.dp:nth-child(1) { width: 4px; height: 4px; top: -5px; left: 0;   animation: df 0.45s ease-out infinite; }
.dp:nth-child(2) { width: 6px; height: 6px; top: 1px;  left: -4px; animation: df 0.45s 0.07s ease-out infinite; }
.dp:nth-child(3) { width: 4px; height: 4px; top: 7px;  left: -2px; animation: df 0.45s 0.14s ease-out infinite; }

@keyframes df {
  0%   { transform: translate(0,0) scale(1); opacity: 0.5; }
  100% { transform: translate(-16px,0) scale(0.15); opacity: 0; }
}

/* Ghost horses */
.ghost-horse {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  z-index: 2;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  opacity: 0.25;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.3s;
}
.ghost-horse svg { display: block; width: 100%; height: 100%; }
.ghost-horse.highlighted { opacity: 0.6; z-index: 4; }
.ghost-horse.highlighted::after {
  content: attr(data-name);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) scaleX(-1);
  font-size: 9px;
  white-space: nowrap;
  color: var(--white-d);
  background: rgba(0,0,0,0.7);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* "They're Off!" flash */
.trk-sw {
  position: absolute;
  inset: 0;
  left: -120%;
  background: linear-gradient(90deg, transparent, rgba(200,255,0,0.06) 40%, rgba(200,255,0,0.1) 50%, rgba(200,255,0,0.06) 60%, transparent);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

.trk-sw.on {
  opacity: 1;
  animation: sw 1.2s ease-out forwards;
}

@keyframes sw { to { left: 120%; } }

.trk-tx {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%) scale(0.5);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--lime);
  text-shadow: 0 0 30px rgba(200,255,0,0.4);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.trk-tx.on {
  animation: txf 1.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes txf {
  0%  { opacity: 0; transform: translate(-50%,-50%) scale(0.5); }
  12% { opacity: 1; transform: translate(-50%,-50%) scale(1.05); }
  25% { transform: translate(-50%,-50%) scale(1); }
  70% { opacity: 1; }
  100%{ opacity: 0; }
}


/* ═══ PROGRESS BAR ═══ */
.cprog {
  padding: 0 20px;
  padding-top: 6px;
}

.pbar {
  width: 100%;
  height: 3px;
  background: rgba(200,255,0,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.pfill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lime), var(--lime-dim));
  border-radius: 3px;
}

.plbl {
  display: flex;
  justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--grey);
  padding-top: 4px;
}


/* ═══ SCORE CHIPS ═══ */
.score-section {
  padding: 10px 20px 16px;
}

.score-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--grey);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: help;
  position: relative;
}

.q-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--grey);
  font-size: 9px;
  color: var(--grey);
  font-weight: 700;
}

.score-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--navy-light);
  border: 1px solid rgba(200,255,0,0.15);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  font-family: 'Outfit', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--white-d);
  line-height: 1.55;
  width: 300px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.score-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 24px;
  border: 6px solid transparent;
  border-top-color: var(--navy-light);
}

.score-label:hover .score-tip {
  opacity: 1;
  pointer-events: auto;
}

.chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lime-soft);
  border: 1px solid rgba(200,255,0,0.08);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  transition: all 0.2s;
  cursor: default;
}

.rc:hover {
  background: rgba(200,255,0,0.1);
  border-color: rgba(200,255,0,0.15);
}

.rc-n {
  color: var(--white-d);
  font-weight: 500;
}

.rc-s {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 11px;
}

.rc-s.hi { color: var(--lime); }
.rc-s.md { color: var(--orange); }
.rc-s.lo { color: var(--grey-l); }

.rc-cow {
  font-size: 9px;
  color: var(--grey);
  font-weight: 400;
}

.rc-tier {
  font-size: 8px;
  color: var(--grey);
  font-weight: 500;
}

.rc-more {
  font-size: 11px;
  color: var(--grey);
  font-family: 'Space Mono', monospace;
}

/* Clickable chips */
.rc[onclick] {
  cursor: pointer;
}

.rc.picked {
  border-color: var(--lime);
  background: rgba(200,255,0,0.12);
  box-shadow: 0 0 0 1px var(--lime);
}

/* Pick confirmation message */
.live-pick-msg {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--lime);
  margin-top: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Mobile pick button + message inside live card */
.live-card > .card-nav-all {
  margin: 0 20px 8px;
  width: calc(100% - 40px);
}
.live-card > .live-pick-msg {
  padding: 0 20px;
}

/* Loss result banner */
.res-bet-result.lost {
  background: rgba(255,59,59,0.1);
  color: var(--red);
  border: 1px solid rgba(255,59,59,0.2);
}

/* Neutral (no pick) result banner */
.res-bet-result.neutral {
  background: rgba(255,255,255,0.04);
  color: var(--grey-l);
  border: 1px solid rgba(255,255,255,0.06);
}


/* ═══ RESULTS OVERLAY ═══ */
.results-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: #0a0e1a;
  z-index: 20;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 16px;
  padding: 24px;
}

.results-overlay.show {
  display: flex;
  animation: res-in 0.5s ease-out;
}

@keyframes res-in { from { opacity: 0; } to { opacity: 1; } }

.res-title {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--grey-l);
}

.res-winner { text-align: center; }

.res-winner-label {
  font-size: 11px;
  color: var(--gold);
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.res-winner-name {
  font-size: 28px;
  font-weight: 900;
  color: var(--lime);
  letter-spacing: -0.5px;
  animation: wpop 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes wpop {
  0%   { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.res-winner-sub {
  font-size: 13px;
  color: var(--grey-l);
  margin-top: 2px;
}

.res-places {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.res-place {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.res-pos {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.res-pos.p1 { background: rgba(251,191,36,0.15); color: var(--gold); }
.res-pos.p2 { background: rgba(200,200,200,0.1);  color: #c0c0c0; }
.res-pos.p3 { background: rgba(205,127,50,0.1);   color: #cd7f32; }

.res-pname {
  color: var(--white-d);
  font-weight: 500;
}

.res-pscore {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--lime);
  font-weight: 700;
}

.res-pcow {
  font-size: 9px;
  color: var(--grey);
  font-weight: 400;
}

.res-ptier {
  font-size: 9px;
  color: var(--grey-l);
  font-weight: 500;
  margin-top: 1px;
}

.res-bet-result {
  margin-top: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  animation: bf 0.6s 0.3s ease-out both;
}

@keyframes bf {
  0%   { transform: scale(0.8); opacity: 0; }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.res-bet-result.won {
  background: rgba(52,211,153,0.12);
  color: var(--green);
  border: 1px solid rgba(52,211,153,0.25);
}


/* ═══ DEMO BAR ═══ */
.dbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy-mid);
  border-top: 1px solid var(--lime-bdr);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 150;
}

.dbar span {
  font-size: 11px;
  color: var(--grey);
  font-family: 'Space Mono', monospace;
}

.dbar button {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(200,255,0,0.2);
  background: transparent;
  color: var(--lime);
  cursor: pointer;
  transition: all 0.2s;
}

.dbar button:hover {
  background: rgba(200,255,0,0.08);
}

.dbar button.go {
  background: var(--lime);
  color: var(--navy);
  border-color: var(--lime);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}


/* ═══ HANDOFF MODAL ═══ */
.handoff-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.handoff-overlay.show {
  display: flex;
  animation: hoFadeIn 0.25s ease-out forwards;
}

@keyframes hoFadeIn {
  to { opacity: 1; }
}

.handoff-modal {
  background: var(--navy-mid);
  border: 1px solid var(--lime-bdr);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 24px;
}

.ho-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.ho-close {
  background: none;
  border: none;
  color: var(--grey-l);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s;
}
.ho-close:hover { color: var(--white); }

.ho-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0;
  text-align: center;
}

.ho-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}

.ho-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ho-label {
  font-size: 12px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Space Mono', monospace;
}

.ho-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--white-d);
}

.ho-value.ho-val-lime {
  color: var(--lime);
  font-weight: 700;
}

.ho-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}

.ho-steps-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}

.ho-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.ho-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ho-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(200,255,0,0.1);
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
}

.ho-step-text {
  font-size: 13px;
  color: var(--white-d);
  line-height: 1.5;
}

.ho-step-text strong {
  color: var(--white);
}

.ho-first-time {
  font-size: 12px;
  color: var(--grey-l);
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.ho-first-time strong {
  color: var(--white-d);
}

.ho-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.ho-continue {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: #127b3b;
  color: #ffd700;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  text-align: center;
  display: block;
}
.ho-continue:hover { background: #15923f; }

.ho-cancel {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: var(--grey-l);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.ho-cancel:hover {
  background: rgba(255,255,255,0.04);
  color: var(--white-d);
}

.ho-guide-link {
  font-size: 13px;
  color: var(--lime);
  text-decoration: none;
  margin-top: 4px;
}
.ho-guide-link:hover { text-decoration: underline; }

.ho-steps-summary {
  font-size: 12px;
  color: var(--grey);
  margin-bottom: 14px;
}


/* ═══ GUIDE PAGE ═══ */
/* ── Guide page component styles (used within profile layout) ── */

.guide-key-point {
  background: rgba(200,255,0,0.06);
  border-left: 3px solid var(--lime);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--lime);
  font-weight: 600;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
}

.guide-example {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}

.guide-example-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.guide-example p {
  margin-bottom: 4px;
}

.guide-tiers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.guide-tier {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--grey-l);
}

.guide-tier-range {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  min-width: 80px;
  text-align: center;
}

.tier-strong  { background: rgba(52,211,153,0.12);  color: var(--lime); }
.tier-mix     { background: rgba(251,191,36,0.12);   color: #fbbf24; }
.tier-outside { background: rgba(156,163,175,0.12);  color: var(--grey-l); }

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 12px 0;
}

.guide-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.guide-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200,255,0,0.1);
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
}

.guide-step p {
  margin-bottom: 0;
}

.guide-cta {
  text-align: center;
  margin-top: 40px;
}

.guide-cta-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--lime);
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s;
}
.guide-cta-btn:hover { background: #d4ff00; }


/* ═══ LIVE CARD EMPTY STATE ═══ */
.live-card--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.live-empty { text-align: center; padding: 48px 24px; }
.live-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.live-empty-title { font-size: 16px; font-weight: 600; color: var(--grey-l); margin-bottom: 4px; }
.live-empty-sub { font-size: 13px; color: var(--grey); }


/* ═══ RESULTS TAB ═══ */
.result-hc { cursor: default; }
.result-hc:hover { background: var(--navy-card); }
.res-margin { padding: 4px 16px 8px; font-size: 12px; color: var(--grey-l); }
.res-dnf { padding: 4px 16px 8px; font-size: 12px; color: var(--red); }

/* Result compact row: winner line */
.cr-winner-line {
  font-size: 11px;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Result roster: position badges */
.hl-pos {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  min-width: 28px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  color: var(--grey-l);
  padding: 0 4px;
}
.hl-pos.p1 { background: rgba(251,191,36,0.15); color: var(--gold); }
.hl-pos.p2 { background: rgba(200,200,200,0.1);  color: #c0c0c0; }
.hl-pos.p3 { background: rgba(205,127,50,0.1);   color: #cd7f32; }

/* Prediction accuracy indicator */
.pa-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.pa-indicator.pa-green {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  color: #22c55e;
}
.pa-indicator.pa-amber {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  color: #f59e0b;
}
.pa-indicator.pa-grey {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--grey-l);
}
.pa-icon { font-size: 14px; flex-shrink: 0; }
.pa-text { font-weight: 600; }
.pa-horse { font-weight: 400; color: var(--grey-l); font-size: 12px; }

/* Result detail card: odds line */
.res-odds-line {
  padding: 4px 16px 8px;
  font-size: 12px;
  color: var(--grey-l);
  font-family: 'Space Mono', monospace;
}
.res-comment {
  padding: 8px 16px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--grey-l);
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 4px;
}

/* ─── Date picker ─── */
.date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--grey-l);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
  padding-bottom: 2px;
}
.dp-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.dp-btn.dp-disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.dp-label {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}
.dp-today {
  margin-left: 4px;
  font-size: 12px;
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}
.dp-today:hover { text-decoration: underline; }

/* ─── Awaiting results panel ─── */
.aw-panel {
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.aw-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--grey-l);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.aw-toggle:hover { background: rgba(255,255,255,0.03); }
.aw-icon { font-size: 14px; flex-shrink: 0; }
.aw-text { font-weight: 500; }
.aw-chevron {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
}
.aw-panel.open .aw-chevron { transform: rotate(90deg); }
.aw-list {
  display: none;
  padding: 0 14px 10px;
}
.aw-panel.open .aw-list { display: block; }
.aw-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.aw-time {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--grey);
  flex-shrink: 0;
}
.aw-info { color: #fff; font-weight: 500; }
.aw-name {
  color: var(--grey-l);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.hc-odds-help-footer {
  font-size: 12px;
  color: var(--grey-l);
  text-align: center;
  padding: 12px 0 4px;
}

/* ═══ MOBILE CARD NAV BUTTONS (top-right of card) ═══ */
.hc-nav {
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}
.hc-nav-btn {
  background: var(--lime);
  border: none;
  color: var(--navy);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  width: 36px;
  height: 34px;
  padding-bottom: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.hc-nav-btn:first-child {
  border-radius: 8px 0 0 8px;
}
.hc-nav-btn:last-child {
  border-radius: 0 8px 8px 0;
}
.hc-nav-btn:active {
  background: #d4ff00;
  transform: scale(0.95);
}
.hc-nav-idx {
  background: rgba(200,255,0,0.15);
  color: var(--lime);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  height: 34px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}
.card-nav-all {
  background: none;
  border: 1px dashed rgba(200,255,0,0.2);
  color: var(--lime);
  font-size: 12px;
  font-family: 'Outfit', sans-serif;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-bottom: 8px;
  transition: background 0.15s, border-color 0.15s;
}
.card-nav-all:active {
  background: rgba(200,255,0,0.08);
  border-color: rgba(200,255,0,0.35);
}

/* ═══ HORSE LIST MODAL ═══ */
.hl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9500;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.hl-overlay.show {
  display: flex;
  animation: hlSlideUp 0.25s ease-out;
}
@keyframes hlSlideUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hl-modal {
  background: var(--navy-mid);
  border-top: 2px solid var(--lime);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 75vh;
  overflow-y: auto;
  padding: 16px 16px 24px;
  animation: hlModalUp 0.3s ease-out;
}
@keyframes hlModalUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.hl-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.hl-modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--white);
}
.hl-modal-close {
  background: none;
  border: none;
  color: var(--grey-l);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.hl-modal-close:hover { color: var(--white); }
.hl-modal-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hl-modal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.hl-modal-row:active {
  background: rgba(200,255,0,0.08);
}
.hl-modal-row.hl-modal-active {
  background: rgba(200,255,0,0.06);
  border: 1px solid rgba(200,255,0,0.15);
}
.hl-modal-pos {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--grey);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.hl-modal-name {
  flex: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hl-modal-score {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  width: 32px;
  text-align: right;
}
.hl-modal-score.hi { color: var(--lime); }
.hl-modal-score.md { color: #facc15; }
.hl-modal-score.lo { color: var(--grey-l); }
.hl-modal-silk {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.hl-modal-silk--empty {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}

/* ═══ MOBILE VISIBILITY UTILITIES ═══ */
.mob-hide  { }
.mob-only  { display: none; }
.mob-short .mob-brief { display: none; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 700px) {
  .mob-hide  { display: none !important; }
  .mob-only  { display: inline !important; }
  .mob-only.mob-only--block { display: block !important; }
  .mob-only.mob-only--flex  { display: flex !important; }
  .mob-short .mob-full  { display: none; }
  .mob-short .mob-brief { display: inline; }

  .nav { padding: 14px 16px; }
  .nav-r { display: none; }
  .nav-mob {
    display: flex;
    align-items: center;
  }

  /* ── Mobile nav drawer ── */
  .mob-nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.6);
    animation: mobTipFadeIn 0.2s ease-out;
  }
  .mob-nav-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--navy-mid);
    border-top: 2px solid var(--lime);
    border-radius: 16px 16px 0 0;
    padding: 20px 20px 32px;
    animation: mobTipSlideUp 0.25s ease-out;
  }
  .mob-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
  }
  .mob-nav-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--white);
  }
  .mob-nav-close {
    background: none;
    border: none;
    color: var(--grey-l);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
  }
  .mob-nav-close:hover { color: var(--white); }

  .mob-nav-links {
    display: flex;
    flex-direction: column;
  }
  .mob-nav-link {
    display: flex;
    align-items: center;
    padding: 14px 8px;
    text-decoration: none;
    color: var(--white-d);
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid rgba(200,255,0,0.06);
    transition: color 0.15s;
  }
  .mob-nav-link:last-child { border-bottom: none; }
  .mob-nav-link:hover { color: var(--white); }
  .mob-nav-link--on { color: var(--lime); }
  .mob-nav-link--cta {
    color: var(--navy);
    background: var(--lime);
    border-radius: 10px;
    justify-content: center;
    font-weight: 700;
    margin-top: 12px;
    border-bottom: none;
    padding: 14px;
  }
  .hero { padding: 28px 16px 16px; }
  .sw { padding: 0 16px; }

  .hc-top { flex-direction: column; }
  .hc-sc {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: auto;
  }
  .hc-sc-val { font-size: 20px; }
  .hc-sc-sub { font-size: 9px; }
  .hc-sc-lbl { width: 100%; }

  /* Disable CSS hover tooltips on mobile — JS handles tap-to-show */
  .mt:hover .tip,
  .hc-q:hover .hc-q-tip { opacity: 0; pointer-events: none; }
  .mt .tip, .hc-q-tip { display: none; }

  /* ── Mobile tip bottom-sheet ── */
  .mob-tip-scrim {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.6);
    animation: mobTipFadeIn 0.2s ease-out;
  }
  @keyframes mobTipFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .mob-tip-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--navy-mid);
    border-top: 2px solid var(--lime);
    border-radius: 16px 16px 0 0;
    padding: 16px 16px 24px;
    max-height: 60vh;
    overflow-y: auto;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: var(--white-d);
    line-height: 1.55;
    animation: mobTipSlideUp 0.25s ease-out;
  }
  @keyframes mobTipSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .mob-tip-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }
  .mob-tip-sheet-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--white);
  }
  .mob-tip-sheet-close {
    background: none;
    border: none;
    color: var(--grey-l);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
  }
  .mob-tip-sheet-close:hover { color: var(--white); }
  .mob-tip-sheet-body {
    font-size: 13px;
    color: var(--white-d);
    line-height: 1.6;
  }
  .mob-tip-sheet-body .shap-row {
    gap: 8px;
    margin-bottom: 8px;
  }
  .mob-tip-sheet-body .shap-bar-bg {
    width: 70px;
  }

  .er-split {
    flex-direction: column;
    gap: 0;
    min-height: auto;
  }
  .er-roster {
    flex: none;
    max-width: 100%;
    max-height: none;
    overflow-y: visible;
    order: 1;
    position: relative;
    top: auto;
  }
  .er-detail {
    flex: none;
    max-width: 100%;
    order: 2;
    margin-top: 12px;
    overflow: hidden;
  }
  .er-detail .hc { animation: none; }
  .er-detail-empty { display: none; }

  .bp-summary { flex-direction: column; gap: 8px; }
  .bp-sd { display: none; }

  .lc-top { flex-direction: column; }
  .lc-act {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
  .res-places { flex-direction: column; gap: 6px; }

  .handoff-modal { padding: 20px 16px; }
  .ho-summary { padding: 12px; }
  .ho-title { font-size: 18px; }


  .cr-time-wrap { text-align: center; }

  .acc-bar { padding: 10px 12px; }
  .acc-val { font-size: 14px; }
  .acc-lbl { font-size: 8px; }
  .acc-pct { font-size: 10px; }
  .acc-disclaimer { font-size: 9px; }

  .compact-row { grid-template-columns: 1fr auto; }
  .cr-right { width: auto; }
  .cr-countdown { width: auto; }
  .cr-podium { width: auto; }
  .cr-pod-row:nth-child(n+2) { display: none; }
  .cr-pod-pos { background: none; width: auto; padding: 0; }
}


/* ════════════════════════════════════════════════
   LANDING PAGE STYLES  (prefix: lp-)
   ════════════════════════════════════════════════ */

/* ═══ LP HERO ═══ */
.lp-hero {
  padding: 72px 32px 56px;
  text-align: center;
}

.lp-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.lp-hero .hero-ey {
  justify-content: center;
}

.lp-hero .hero-p {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lp-hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
  opacity: 0;
  animation: fu 0.6s 0.5s ease-out forwards;
}

/* ═══ LP BUTTONS ═══ */
.lp-btn-primary {
  display: inline-block;
  padding: 14px 28px;
  background: var(--lime);
  color: var(--navy);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid var(--lime);
}

.lp-btn-primary:hover {
  background: #d4ff33;
  transform: translateY(-1px);
}

.lp-btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  background: transparent;
  color: var(--lime);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  border: 2px solid rgba(200,255,0,0.3);
  text-decoration: none;
  transition: all 0.2s;
}

.lp-btn-secondary:hover {
  border-color: var(--lime);
  background: rgba(200,255,0,0.06);
}

/* ═══ LP SECTIONS ═══ */
.lp-section {
  padding: 64px 32px;
}

.lp-section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.lp-section-ey {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--lime);
  margin-bottom: 8px;
}

.lp-section-h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 32px;
  color: var(--white);
}

/* ═══ LP HOW IT WORKS ═══ */
.lp-how { border-top: 1px solid rgba(200,255,0,0.04); }

.lp-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.lp-how-card {
  background: var(--navy-card);
  border: 1px solid var(--lime-bdr);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all 0.2s;
}

.lp-how-card:hover {
  border-color: rgba(200,255,0,0.22);
  transform: translateY(-2px);
}

.lp-how-num {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--lime);
  background: rgba(200,255,0,0.1);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.lp-how-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.lp-how-text {
  font-size: 14px;
  color: var(--grey-l);
  line-height: 1.6;
}

/* ═══ LP WHY TRACKLAB ═══ */
.lp-why { border-top: 1px solid rgba(200,255,0,0.04); }

.lp-why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.lp-why-card {
  background: var(--navy-card);
  border: 1px solid var(--lime-bdr);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.2s;
}

.lp-why-card:hover {
  border-color: rgba(200,255,0,0.22);
  transform: translateY(-2px);
}

.lp-why-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.lp-why-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.lp-why-text {
  font-size: 14px;
  color: var(--grey-l);
  line-height: 1.6;
}

/* ═══ LP LIVE PREVIEW ═══ */
.lp-preview { border-top: 1px solid rgba(200,255,0,0.04); }

.lp-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.lp-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy-card);
  border: 1px solid var(--lime-bdr);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.lp-preview-row:hover {
  border-color: rgba(200,255,0,0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.lp-pr-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-pr-icon { font-size: 20px; }

.lp-pr-venue {
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  display: block;
}

.lp-pr-meta {
  font-size: 12px;
  color: var(--grey-l);
  display: block;
  margin-top: 2px;
}

.lp-pr-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.lp-pr-score { text-align: center; }

.lp-pr-score-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  color: var(--lime);
  display: block;
}

.lp-pr-score-label {
  font-size: 9px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lp-pr-countdown {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--grey-l);
}

.lp-link-arrow {
  display: inline-block;
  color: var(--lime);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.lp-link-arrow:hover { text-decoration: underline; }

/* ═══ LP CHELTENHAM BANNER ═══ */
.lp-cheltenham { padding: 32px 32px 64px; }

.lp-chelt-inner {
  background: linear-gradient(135deg, var(--navy-card), var(--navy-light));
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
}

.lp-chelt-badge {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 8px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

.lp-chelt-h2 {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.lp-chelt-text {
  font-size: 15px;
  color: var(--grey-l);
  max-width: 540px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* ═══ LP SCROLL ANIMATIONS ═══ */
[data-anim] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-anim].lp-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.lp-how-card[data-anim]:nth-child(2) { transition-delay: 0.1s; }
.lp-how-card[data-anim]:nth-child(3) { transition-delay: 0.2s; }
.lp-why-card[data-anim]:nth-child(2) { transition-delay: 0.1s; }
.lp-why-card[data-anim]:nth-child(3) { transition-delay: 0.2s; }
.lp-why-card[data-anim]:nth-child(4) { transition-delay: 0.3s; }
.lp-preview-row[data-anim]:nth-child(2) { transition-delay: 0.1s; }
.lp-preview-row[data-anim]:nth-child(3) { transition-delay: 0.2s; }

/* ═══ FOOTER LINKS ═══ */
.foot-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.foot-links a {
  font-size: 13px;
  color: var(--grey-l);
  text-decoration: none;
  transition: color 0.2s;
}

.foot-links a:hover { color: var(--lime); }

.foot-legal {
  font-size: 12px;
  color: var(--grey);
  margin-top: 8px;
}

.foot-legal a {
  color: var(--blue);
  text-decoration: none;
}

.foot-legal a:hover { text-decoration: underline; }

/* ═══ LP RESPONSIVE ═══ */
@media (max-width: 700px) {
  .lp-hero { padding: 40px 16px 32px; }
  .lp-section { padding: 40px 16px; }

  .lp-how-grid { grid-template-columns: 1fr; }
  .lp-why-grid { grid-template-columns: 1fr; }

  .lp-hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .lp-btn-primary,
  .lp-btn-secondary {
    width: 100%;
    text-align: center;
    max-width: 320px;
  }

  .lp-preview-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .lp-pr-right {
    width: 100%;
    justify-content: space-between;
  }

  .lp-cheltenham { padding: 24px 16px 40px; }
  .lp-chelt-inner { padding: 28px 20px; }

  .foot-links { gap: 16px; }
}


/* ═══════════════════════════════════════════════════════════════════
   CHELTENHAM FESTIVAL PAGE
   ═══════════════════════════════════════════════════════════════════ */

.chelt-hero {
  background: linear-gradient(135deg, var(--navy-card), var(--navy-light));
  border-bottom: 1px solid rgba(251,191,36,0.15);
  padding: 48px 32px 40px;
  text-align: center;
}

.chelt-badge {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 8px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

.chelt-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  color: var(--white);
  margin: 0 0 8px;
}

.chelt-subtitle {
  font-size: 15px;
  color: var(--grey-l);
  margin: 0;
}

/* Empty state */
.chelt-empty {
  text-align: center;
  padding: 64px 24px;
}

.chelt-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.chelt-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}

.chelt-empty-sub {
  font-size: 14px;
  color: var(--grey-l);
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.chelt-empty-link {
  display: inline-block;
  font-size: 13px;
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

.chelt-empty-link:hover { text-decoration: underline; }

/* Day headers */
.chelt-day-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 20px 0 8px;
  border-bottom: 1px solid rgba(251,191,36,0.12);
  margin-bottom: 8px;
}

.chelt-day-header:first-child { padding-top: 0; }

.chelt-day-label {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}

.chelt-day-count {
  font-size: 12px;
  color: var(--grey);
}

@media (max-width: 700px) {
  .chelt-hero { padding: 32px 16px 28px; }
  .chelt-empty { padding: 40px 16px; }
}

/* ─── Meeting group headers (upcoming/results tabs) ─── */
.meeting-group-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 20px 0 8px;
  border-bottom: 1px solid var(--navy-light);
  margin-bottom: 8px;
}
.meeting-group-header:first-child { padding-top: 0; }
.meeting-group-icon { font-size: 16px; }
.meeting-group-name { font-size: 16px; font-weight: 700; color: var(--white); }
.meeting-group-loc { font-size: 12px; color: var(--grey); }
.meeting-group-count { font-size: 12px; color: var(--grey); margin-left: auto; }
.meeting-group-char { font-size: 12px; color: var(--grey-l); margin-bottom: 8px; padding-left: 2px; }


/* ═══ VENUE FILTER TABS ═══ */
.venue-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 3px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.venue-filters::-webkit-scrollbar { display: none; }

.vf-tab {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid rgba(200,255,0,0.1);
  border-radius: 8px;
  background: transparent;
  color: var(--grey-l);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.vf-tab:hover {
  color: var(--white);
  border-color: rgba(200,255,0,0.25);
  background: rgba(200,255,0,0.04);
}

.vf-tab.on {
  background: rgba(200,255,0,0.1);
  color: var(--lime);
  border-color: rgba(200,255,0,0.3);
  font-weight: 600;
}

/* ═══ RACE NAME (compact rows) ═══ */
.cr-race-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}

.cr-race-name {
  font-size: 12px;
  font-weight: 400;
  color: var(--lime-dim);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ═══ RACE NAME (expanded views + live card) ═══ */
.er-race-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--lime);
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

/* ═══ LANDING PAGE RACE NAME ═══ */
.lp-pr-rname {
  color: var(--grey-l);
  font-weight: 400;
  font-size: 13px;
}

/* ═══ VENUE HEADER (shown only when a specific venue tab is active) ═══ */
.vg-header { display: none; padding-top: 8px; margin-bottom: 4px; }

/* ═══ VENUE MODE — hide redundant venue name on cards ═══ */
.venue-mode .cr-venue-label { display: none; }

/* ═══ WEATHER BAR (venue header) ═══ */
.weather-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--grey-l);
  padding: 6px 0 2px;
}
.wb-emoji { font-size: 14px; }
.wb-temp { font-weight: 600; color: var(--white); font-family: 'Space Mono', monospace; }
.wb-cond { color: var(--grey-l); }
.wb-wind { color: var(--grey); font-size: 11px; }

/* ═══ WEATHER INLINE (compact row) ═══ */
.cr-weather {
  font-size: 11px;
  color: var(--grey);
}

@media (max-width: 700px) {
  .vf-tab { font-size: 11px; padding: 5px 10px; }
}

/* ═══ SCROLL TO TOP ═══ */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  font-family: inherit;
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--bg-selected);
  color: var(--accent-lime);
}
@media (max-width: 768px) {
  .scroll-top { width: 36px; height: 36px; font-size: 16px; bottom: 16px; right: 16px; }
}
