/* ═══════════════════════════════════════════════════════════════
   DELLS RACING TIPS — BetVictor-inspired Design System
   Dark chrome navigation + White content cards
   Font: Lato 400 + 700
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. CSS TOKENS ─────────────────────────────────────────────── */
:root {
  /* Chrome (nav, header, sidebar) */
  --bv-dark:        #1D252D;
  --bv-mid:         #384652;
  --bv-deep:        #242628;
  --bv-hover-dark:  #414449;
  --bv-divider-dark:rgba(255,255,255,0.08);

  /* Content (race cards, panels) */
  --bv-page:        #F5F6F6;
  --bv-card:        #FFFFFF;
  --bv-odds-bg:     #F3F7F8;
  --bv-border:      #E5E7E8;
  --bv-card-head:   #FAFBFC;
  --bv-shadow:      0 2px 8px rgba(0,0,0,0.09), 0 1px 3px rgba(0,0,0,0.05);

  /* Brand blue (interactive / selected) */
  --bv-blue:        #41B6E6;
  --bv-blue-light:  #D8EFF9;
  --bv-blue-dark:   #1381B6;

  /* Action colours */
  --bv-green:       #009A44;
  --bv-green-light: #D7F5E4;
  --bv-red:         #E73C3E;
  --bv-amber:       #FFAA4D;
  --bv-amber-bg:    #FFF0D4;

  /* Text */
  --bv-text:        #1D252D;
  --bv-muted:       #656D75;
  --bv-disabled:    #AAB1B6;

  /* Semantic status */
  --state-won-bg:   #D7F5E4;
  --state-lost-bg:  #FDECEA;
  --state-live-bg:  #D7F5E4;
  --state-ended-bg: #E5E7E8;

  /* Legacy aliases for older components */
  --bg:             #F5F6F6;
  --panel:          #FFFFFF;
  --panel-2:        #F3F7F8;
  --panel-strong:   #F5F6F6;
  --text:           #1D252D;
  --muted:          #656D75;
  --accent:         #41B6E6;
  --accent-bright:  #41B6E6;
  --accent-soft:    #D8EFF9;
  --accent-glow:    rgba(65,182,230,0.20);
  --line:           rgba(0,0,0,0.07);
  --line-strong:    #E5E7E8;
  --green:          #009A44;
  --blue:           #41B6E6;
  --purple:         #41B6E6;
  --purple-soft:    #D8EFF9;
  --gold:           #FFAA4D;
  --amber:          #FFAA4D;
  --red:            #E73C3E;
  --shadow:         var(--bv-shadow);
  --sidebar-width:  240px;

  font-family: 'Lato', 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: var(--bv-page);
  color: var(--bv-text);
}

/* ── 2. RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; min-height: 100vh; background: var(--bv-page); }
h1, h2, h3, h4 { font-family: 'Lato', sans-serif; }

/* ── 3. APP SHELL ──────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0,1fr);
  min-height: 100vh;
}

/* ── 4. SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bv-dark);
  border-right: 1px solid var(--bv-divider-dark);
  padding: 0 12px 20px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 10px 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--bv-divider-dark);
}
.sidebar-brand strong { display: block; color: #fff; font-size: 0.95rem; }
.sidebar-brand small  { color: #8A97A8; font-size: 0.74rem; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bv-blue);
  color: var(--bv-dark);
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.nav-group-label {
  margin: 16px 10px 6px;
  color: #8A97A8;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.13s;
}
.sidebar-nav .nav-link:hover { background: var(--bv-mid); }
.sidebar-nav .nav-link.active {
  background: rgba(65,182,230,0.15);
  color: var(--bv-blue);
  position: relative;
}
.sidebar-nav .nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--bv-blue);
}
.nav-icon { width: 1.2rem; text-align: center; opacity: 0.85; font-size: 0.85rem; }
.sidebar-nav .nav-link.active .nav-icon { opacity: 1; color: var(--bv-blue); }

/* ── 5. MOBILE TOPBAR ──────────────────────────────────────────── */
.mobile-topbar { display: none; }
.nav-backdrop  { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  min-height: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: var(--bv-mid);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.18s, opacity 0.18s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ── 6. MAIN HEADER / STATUS BAR ───────────────────────────────── */
.main-area { display: flex; flex-direction: column; min-width: 0; }

.main-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--bv-dark);
  border-bottom: 1px solid var(--bv-divider-dark);
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #8A97A8;
}
.status-sep  { color: rgba(255,255,255,0.20); }
#status-time { color: #fff; font-weight: 700; }
#status-next-update { color: var(--bv-blue); font-weight: 600; }

.header-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
}
.status-pill.ok      { background: rgba(0,154,68,0.20); color: #00BF50; border-color: rgba(0,154,68,0.30); }
.status-pill.warn    { background: rgba(255,170,77,0.20); color: #FFAA4D; border-color: rgba(255,170,77,0.30); }
.status-pill.neutral { color: #8A97A8; }
.status-pill.processing { background: rgba(65,182,230,0.15); color: #41B6E6; border-color: rgba(65,182,230,0.30); animation: pill-pulse 1.4s ease-in-out infinite; }
@keyframes pill-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Readiness stats strip on the AI Learning page */
.readiness-stats-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.readiness-stat { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); border-radius: 8px; padding: 10px 16px; min-width: 110px; flex: 1; }
.readiness-stat strong { font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1.1; }
.readiness-stat small  { font-size: 0.7rem; color: #8A97A8; margin-top: 3px; text-align: center; }

/* ── 7. DASHBOARD CONTENT AREA ─────────────────────────────────── */
.dashboard-content { padding: 16px 20px 80px; background: var(--bv-page); }
.loading-spinner   { padding: 60px; text-align: center; color: var(--bv-muted); }

/* ── 8. BUTTONS ────────────────────────────────────────────────── */
button { font-family: 'Lato', sans-serif; cursor: pointer; min-height: 36px; padding: 0 14px; border-radius: 6px; font-size: 0.88rem; font-weight: 700; transition: background 0.13s; border: none; background: var(--bv-green); color: #fff; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: btn-spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
button:not(:disabled):hover { background: #00BF50; }

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--bv-green);
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  transition: background 0.13s;
  border: none;
  cursor: pointer;
}
.button-link:hover { background: #00BF50; color: #fff; }
.button-link.secondary { background: var(--bv-odds-bg); color: var(--bv-text); border: 1px solid var(--bv-border); }
.button-link.secondary:hover { background: var(--bv-border); }
.wide-link { width: fit-content; }
.big-cta { min-height: 48px; font-size: 1rem; border-radius: 10px; }

/* ── 9. BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}
.badge.green  { background: var(--bv-green-light); color: #006C30; border-color: rgba(0,154,68,0.25); }
.badge.blue   { background: var(--bv-blue-light);  color: var(--bv-blue-dark); border-color: rgba(65,182,230,0.25); }
.badge.gold   { background: var(--bv-amber-bg);    color: #7A4800; border-color: rgba(255,170,77,0.25); }
.badge.amber  { background: var(--bv-amber-bg);    color: #7A4800; border-color: rgba(255,170,77,0.25); }
.badge.red    { background: var(--state-lost-bg);  color: var(--bv-red); border-color: rgba(231,60,62,0.25); }
.badge.purple { background: var(--bv-blue-light);  color: var(--bv-blue-dark); border-color: rgba(65,182,230,0.25); }
.badge.neutral{ background: var(--bv-odds-bg);     color: var(--bv-muted); border-color: var(--bv-border); }

/* ── 10. LAYOUT GRIDS ──────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0,1.55fr) minmax(320px,0.85fr);
  gap: 16px;
  align-items: start;
}
.main-column, .side-column { display: grid; gap: 16px; }
.home-grid   { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,0.65fr); gap: 16px; align-items: start; }
.ops-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.split-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── 11. PANELS & SECTIONS ─────────────────────────────────────── */
.panel {
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  border-radius: 10px;
  padding: 18px;
  box-shadow: var(--bv-shadow);
  color: var(--bv-text);
}
.panel h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--bv-text); letter-spacing: -0.02em; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--bv-border); padding-bottom: 12px; }
.section-kicker { margin: 0 0 2px; color: var(--bv-muted); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.feature-panel, .wide-panel { grid-column: 1 / -1; }
.wide-panel { margin-top: 16px; }
.eyebrow { margin: 0 0 4px; color: var(--bv-muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

/* Page hero */
.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  margin-bottom: 18px;
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  border-radius: 12px;
  box-shadow: var(--bv-shadow);
}
.page-hero h1 { margin: 4px 0 6px; font-size: clamp(1.5rem,3vw,2rem); letter-spacing: -0.04em; color: var(--bv-text); }
.page-hero p:not(.eyebrow) { margin: 0; color: var(--bv-muted); line-height: 1.5; }
.page-hero-action { flex: 0 0 auto; }

/* Empty state */
.empty-state {
  padding: 20px;
  border: 1px dashed var(--bv-border);
  border-radius: 10px;
  color: var(--bv-muted);
  background: var(--bv-odds-bg);
}
.empty-state strong { display: block; margin-bottom: 4px; color: var(--bv-text); }
.error-panel { border-color: rgba(231,60,62,0.35); }

/* ── 12. METRIC CARDS ──────────────────────────────────────────── */
.metrics-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric-card {
  min-height: 120px;
  padding: 16px;
  border-radius: 12px;
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  box-shadow: var(--bv-shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--bv-text);
}
.metric-card span  { order: 1; font-size: 0.78rem; font-weight: 700; color: var(--bv-muted); }
.metric-card strong{ order: 2; margin: 6px 0 2px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; color: var(--bv-text); display: block; }
.metric-card small { order: 3; font-size: 0.76rem; color: var(--bv-muted); }
.metric-card.green  strong { color: var(--bv-green); }
.metric-card.blue   strong { color: var(--bv-blue-dark); }
.metric-card.gold   strong { color: #7A4800; }
.metric-card.amber  strong { color: var(--bv-amber); }
.metric-card.purple strong { color: var(--bv-blue); }
.metric-card.red    strong { color: var(--bv-red); }

/* ── 13. TABLES ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--bv-border); background: var(--bv-card); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; font-size: 0.84rem; color: var(--bv-text); border-bottom: 1px solid var(--bv-odds-bg); }
thead th { background: var(--bv-odds-bg); font-size: 0.74rem; color: var(--bv-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:hover { background: var(--bv-odds-bg); }
tbody tr:last-child td { border-bottom: none; }

/* ── 14. FORMS & INPUTS ────────────────────────────────────────── */
input[type="text"], input[type="email"] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--bv-border);
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  background: var(--bv-card);
  color: var(--bv-text);
  width: 100%;
}
input:focus { outline: none; border-color: var(--bv-blue); }
.email-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.recipient-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.recipient-chip {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--bv-border);
  border-radius: 999px;
  background: var(--bv-odds-bg);
  color: var(--bv-text);
  font-size: 0.8rem;
  cursor: pointer;
}
.recipient-chip:hover { background: var(--bv-border); }

/* ── 15. COMPACT LIST ──────────────────────────────────────────── */
.compact-list, .score-list, .source-grid { display: grid; gap: 10px; }
.compact-list article,
.score-list   article,
.mini-card,
.perf-card {
  padding: 12px;
  border: 1px solid var(--bv-border);
  border-radius: 8px;
  background: var(--bv-card);
  color: var(--bv-text);
}
.compact-list strong, .score-list strong { color: var(--bv-text); display: block; }
.compact-list span,   .score-list small  { color: var(--bv-muted); font-size: 0.82rem; display: block; }
.compact-list small                      { color: var(--bv-muted); font-size: 0.76rem; display: block; margin-top: 2px; }
.score-list article { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bv-blue-light); color: var(--bv-blue-dark); font-weight: 900; font-size: 0.82rem; }
.source-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.source-grid article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.mini-grid { display: grid; gap: 10px; }
.support-line { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── 16. ACCORDION ─────────────────────────────────────────────── */
.accordion-stack { display: flex; flex-direction: column; gap: 8px; }
.accordion-item { border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); overflow: hidden; }
.accordion-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 700; font-size: 0.92rem; color: var(--bv-text); }
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after { content: "▾"; color: var(--bv-muted); font-size: 0.88rem; transition: transform 0.15s; }
.accordion-item[open] summary::after { transform: rotate(180deg); }
.accordion-item summary:hover { background: var(--bv-odds-bg); }
.accordion-summary-text { display: block; margin-top: 2px; color: var(--bv-muted); font-size: 0.8rem; font-weight: 500; }
.accordion-body { padding: 0 16px 16px; color: var(--bv-text); font-size: 0.88rem; line-height: 1.6; border-top: 1px solid var(--bv-border); }
.accordion-body p   { margin: 10px 0; color: var(--bv-muted); }
.accordion-body ul  { margin: 8px 0; padding-left: 20px; color: var(--bv-muted); }
.accordion-body li  { margin: 4px 0; }
.accordion-body strong { color: var(--bv-text); }

/* ── 17. RACE STRIP (time navigation tabs) ─────────────────────── */
.race-strip-shell {
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--bv-border);
  border-radius: 10px;
  background: var(--bv-card);
  box-shadow: var(--bv-shadow);
}
.race-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px 6px;
  background: var(--bv-card);
  color: var(--bv-text);
}
.race-strip-head strong { font-size: 0.88rem; font-weight: 700; color: var(--bv-text); }
.race-strip-head span   { padding: 3px 9px; border-radius: 999px; background: var(--bv-odds-bg); color: var(--bv-muted); font-size: 0.72rem; font-weight: 700; }
.race-strip { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--bv-border); scroll-snap-type: x proximity; scrollbar-width: thin; }
.race-strip-item {
  flex: 0 0 108px !important;
  min-width: 108px;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--bv-border);
  border-radius: 0;
  background: var(--bv-card) !important;
  color: var(--bv-muted) !important;
  box-shadow: none !important;
  cursor: pointer;
  scroll-snap-align: start;
}
.race-strip-item strong, .race-strip-item span { display: block; }
.race-strip-item strong { color: var(--bv-text) !important; font-size: 0.9rem; font-weight: 700; letter-spacing: -0.02em; }
.race-strip-item span   { color: var(--bv-muted) !important; font-size: 0.68rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.race-strip-item.active { color: var(--bv-blue) !important; position: relative; }
.race-strip-item.active strong, .race-strip-item.active span { color: var(--bv-blue) !important; }
.race-strip-item.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--bv-blue); }

/* ── 18. FILTER BAR ────────────────────────────────────────────── */
.betting-filter-bar {
  position: sticky;
  top: 57px;
  z-index: 4;
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--bv-border);
  border-radius: 10px;
  background: var(--bv-card);
  box-shadow: var(--bv-shadow);
}
.betting-filter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--bv-border);
  border-radius: 999px;
  background: var(--bv-odds-bg);
  color: var(--bv-text);
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-size: 0.84rem;
  box-shadow: none;
}
.betting-filter span   { font-weight: 700; }
.betting-filter strong { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--bv-border); color: var(--bv-muted); font-size: 0.72rem; }
.betting-filter.active { background: var(--bv-blue); border-color: var(--bv-blue); color: #fff; }
.betting-filter.active strong { background: rgba(255,255,255,0.25); color: #fff; }

/* ── 19. TODAY SUMMARY STRIP ───────────────────────────────────── */
.tr-summary-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 0 0 12px; }
.tr-summary-item  { display: flex; align-items: baseline; gap: 5px; }
.tr-summary-item strong { font-size: 1.05rem; font-weight: 700; color: var(--bv-text); }
.tr-summary-item small  { font-size: 0.74rem; color: var(--bv-muted); }
.tr-summary-item.pos strong { color: var(--bv-green); }
.tr-summary-item.neg strong { color: var(--bv-red); }
.tr-summary-sep { color: var(--bv-border); }

/* Empty / no-racing state */
.tr-empty {
  padding: 36px 24px;
  text-align: center;
  border: 1px dashed var(--bv-border);
  border-radius: 10px;
  background: var(--bv-card);
  color: var(--bv-muted);
  margin-bottom: 16px;
}
.tr-empty strong { display: block; margin-bottom: 8px; font-size: 1.05rem; color: var(--bv-text); }
.tr-empty p      { margin: 0 0 18px; }

/* Steam alert banner */
.bv-steam-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 12px;
  background: var(--bv-amber-bg);
  border: 1px solid rgba(255,170,77,0.40);
  border-left: 4px solid var(--bv-amber);
  border-radius: 8px;
}
.bv-steam-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.bv-steam-content strong { display: block; font-size: 13px; font-weight: 700; color: #7A4800; margin-bottom: 4px; }
.bv-steam-item           { display: block; font-size: 12px; color: #7A4800; margin-bottom: 2px; }

/* ── 20. BV RACE CARD ──────────────────────────────────────────── */
.betting-board { display: grid; gap: 10px; }
.bv-race-card {
  overflow: hidden;
  border: 1px solid var(--bv-border);
  border-radius: 10px;
  background: var(--bv-card);
  box-shadow: var(--bv-shadow);
  font-family: 'Lato', sans-serif;
}
.bv-race-card[hidden] { display: none; }
.bv-race-card::before { content: ""; display: block; height: 3px; background: var(--bv-border); }
.bv-race-card.state-bet::before  { background: var(--bv-blue); }
.bv-race-card.state-won::before  { background: var(--bv-green); }
.bv-race-card.state-lost::before { background: var(--bv-red); }

/* Card header */
.bv-card-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--bv-border);
  background: var(--bv-card-head);
}
/* Three-column top row: course/time | status | watch */
.bv-card-header-top {
  --header-row-h: 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  min-height: var(--header-row-h);
}
.bv-card-header-left {
  justify-self: start;
  min-width: 0;
  line-height: 1.25;
}
.bv-card-header-center {
  justify-self: center;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 42%;
  height: var(--header-row-h);
}
.bv-card-header-right {
  justify-self: end;
  min-width: 0;
  display: flex;
  align-items: center;
  height: var(--header-row-h);
}
.bv-card-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; }
.bv-course { font-size: 13px; font-weight: 700; color: var(--bv-text); letter-spacing: 0.02em; text-transform: uppercase; }
.bv-time   { font-size: 13px; font-weight: 700; color: var(--bv-text); }
.bv-class-badge { font-size: 10px; font-weight: 700; background: var(--bv-dark); color: #fff; border-radius: 4px; padding: 2px 6px; }
.bv-card-meta     { font-size: 12px; color: var(--bv-muted); margin-bottom: 5px; }
.bv-card-race-name{ font-size: 13px; font-weight: 700; color: var(--bv-text); margin: 2px 0 6px; overflow-wrap: anywhere; }
.bv-card-terms { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; }
.bv-ew-terms   { font-size: 11px; font-weight: 700; color: var(--bv-text); background: var(--bv-odds-bg); border: 1px solid var(--bv-border); border-radius: 4px; padding: 2px 7px; }
.bv-book-pct   { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 2px 7px; background: var(--bv-odds-bg); border: 1px solid var(--bv-border); color: var(--bv-muted); }
.bv-book-pct.tight { background: var(--bv-green-light); border-color: rgba(0,154,68,0.25); color: #006C30; }
.bv-book-pct.loose { background: var(--bv-amber-bg);   border-color: rgba(255,170,77,0.25); color: #7A4800; }

/* Status badges */
.bv-status-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  white-space: nowrap;
}
.bv-card-header-center .bv-status-badge {
  white-space: normal;
  text-align: center;
}
.bv-status-badge.upcoming  { background: var(--bv-amber-bg); color: #7A4800; }
.bv-status-badge.live      { background: var(--state-live-bg); color: #006C30; }
.bv-status-badge.finished,
.bv-status-badge.resulted  {
  background: var(--state-ended-bg);
  color: var(--bv-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
/* Header row: compact but readable, centred in the middle column */
.bv-card-header-top .bv-status-badge.resulted,
.bv-card-header-top .bv-status-badge.finished {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 18px;
  padding: 0 12px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}
/* Other header status badges must not stretch the row */
.bv-card-header-top .bv-status-badge {
  max-height: var(--header-row-h);
  line-height: 1.15;
}
.bv-status-badge.no-bet    { background: var(--bv-odds-bg); color: var(--bv-muted); }

/* Price move notes */
.bv-price-move-header { font-size: 11px; font-weight: 700; margin-top: 5px; }
.bv-price-move-header.up   { color: var(--bv-green); }
.bv-price-move-header.down { color: var(--bv-red); }
.bv-rescored-note { font-size: 10px; color: var(--bv-amber); font-weight: 700; margin-top: 4px; }

/* ── Watch Now button ───────────────────────────────────────────────────────── */
.bv-watch-now-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  padding: 0 15px;
  border-radius: 6px;
  background: var(--bv-blue-light);
  color: var(--bv-blue-dark);
  border: 1px solid rgba(65,182,230,0.35);
  font-size: 13.5px;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  line-height: 1;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
  max-width: 100%;
}
/* Header row: fills the row without stretching the full card header */
.bv-card-header-top .bv-watch-now-btn {
  height: var(--header-row-h);
  min-height: 0;
}
.bv-watch-now-btn:hover, .bv-watch-now-btn:focus {
  background: var(--bv-blue);
  color: #fff;
  border-color: var(--bv-blue);
  outline: none;
}
.bv-watch-now-btn:focus-visible {
  outline: 2px solid var(--bv-blue-dark);
  outline-offset: 2px;
}

/* ── Live TV Panel ──────────────────────────────────────────────────────────── */
.bv-tv-panel {
  background: #0d1117;
  border-top: 2px solid var(--bv-blue);
  overflow: hidden;
}
.bv-tv-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  background: #161b22;
  padding: 6px 8px;
  border-bottom: 1px solid #30363d;
}
.bv-tv-tabs {
  display: flex;
  flex: 1;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.bv-tv-tabs::-webkit-scrollbar { display: none; }
.bv-tv-tab {
  flex: 1;
  min-width: 90px;
  padding: 6px 10px;
  border-radius: 5px;
  background: transparent;
  color: #8b949e;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.bv-tv-tab:hover { background: #21262d; color: #e6edf3; }
.bv-tv-tab.active {
  background: var(--bv-blue);
  color: #fff;
  border-color: var(--bv-blue-dark);
}
.bv-tv-arrow {
  background: transparent;
  border: 1px solid #30363d;
  color: #8b949e;
  border-radius: 5px;
  width: 30px;
  min-height: 30px;
  font-size: 0.75rem;
  cursor: pointer;
  margin: 0 4px;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.bv-tv-arrow:hover { background: #21262d; color: #e6edf3; }
.bv-tv-close {
  background: transparent;
  border: 1px solid #30363d;
  color: #8b949e;
  border-radius: 5px;
  width: 30px;
  min-height: 30px;
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 4px;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.bv-tv-close:hover { background: #3d1f1f; color: #f85149; border-color: #f85149; }
.bv-tv-unmute {
  background: var(--bv-blue);
  border: 1px solid var(--bv-blue-dark);
  color: #fff;
  border-radius: 5px;
  padding: 6px 10px;
  min-height: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  margin-left: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.bv-tv-unmute:hover { background: var(--bv-blue-dark); }
.bv-tv-unmute[hidden] { display: none; }
.bv-tv-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d1117;
  max-height: 400px;
}
.bv-tv-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.bv-tv-video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
  object-fit: contain;
}
.bv-tv-msg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  font-size: 11px;
  color: #c9d1d9;
  text-align: center;
  background: linear-gradient(transparent, rgba(13,17,23,0.92));
  pointer-events: none;
}
.bv-tv-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px 10px;
  font-size: 10px;
  color: #484f58;
  text-align: center;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(13,17,23,0.8));
}

/* ── CastleVision credentials form ─────────────────────────────────────────── */
.cv-creds-wrap {
  background: #0d1117;
  padding: 24px 20px 20px;
  border-bottom: 1px solid #21262d;
}
.cv-creds-inner { max-width: 420px; margin: 0 auto; }
.cv-creds-title {
  color: #e6edf3;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.cv-creds-hint {
  color: #8b949e;
  font-size: 0.8rem;
  margin: 0 0 16px;
  line-height: 1.5;
}
.cv-creds-form { display: flex; flex-direction: column; gap: 12px; }
.cv-creds-field { display: flex; flex-direction: column; gap: 4px; }
.cv-creds-field label { color: #8b949e; font-size: 0.78rem; font-weight: 700; }
.cv-creds-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  font-size: 0.88rem;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.12s;
}
.cv-creds-input:focus { border-color: var(--bv-blue); }
.cv-creds-pw-row { display: flex; gap: 8px; }
.cv-creds-pw-row .cv-creds-input { flex: 1; }
.cv-creds-toggle {
  background: #21262d;
  border: 1px solid #30363d;
  color: #8b949e;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.cv-creds-toggle:hover { background: #30363d; color: #e6edf3; }
.cv-creds-save {
  padding: 10px 20px;
  border-radius: 7px;
  background: var(--bv-blue);
  color: #fff;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.12s;
  align-self: flex-start;
}
.cv-creds-save:hover { background: var(--bv-blue-dark); }
.cv-creds-save:disabled { opacity: 0.6; cursor: not-allowed; }
.cv-creds-msg { color: #f85149; font-size: 0.8rem; margin: 0; min-height: 1em; }
.cv-creds-ok {
  color: #3fb950;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 16px 0;
  text-align: center;
}

/* Result line */
.bv-result-line {
  padding: 7px 12px;
  background: var(--bv-odds-bg);
  border-bottom: 1px solid var(--bv-border);
  font-size: 12px;
  color: var(--bv-muted);
}
.bv-result-line strong { color: var(--bv-text); font-weight: 700; }

/* Runner list */
.bv-runners { border-bottom: 1px solid var(--bv-border); }
.bv-runner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--bv-border);
  background: var(--bv-card);
  transition: background 0.1s;
}
.bv-runner-row:first-child { border-top: none; }
.bv-runner-row.is-selection { background: #F0FFF8; }

/* Silk / cloth badge */
.bv-silk {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}
.bv-silk.silk-1 { background: linear-gradient(135deg, #e53935 50%, #fff 50%); }
.bv-silk.silk-2 { background: linear-gradient(135deg, #1565c0 50%, #ffb300 50%); }
.bv-silk.silk-3 { background: linear-gradient(135deg, #2e7d32 50%, #fff 50%); }
.bv-silk.silk-4 { background: linear-gradient(135deg, #f57f17 50%, #1a237e 50%); }
.bv-silk.silk-5 { background: linear-gradient(135deg, #6a1b9a 50%, #fff9c4 50%); }
.bv-silk.silk-6 { background: linear-gradient(135deg, #00838f 50%, #f48fb1 50%); }
.bv-cloth-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.75); font-size: 12px; font-weight: 900; color: var(--bv-text); border-radius: 6px; }
.runner-silk.silk-1 { background: linear-gradient(135deg,#e53935 50%,#fff 50%); }
.runner-silk.silk-2 { background: linear-gradient(135deg,#1565c0 50%,#ffb300 50%); }
.runner-silk.silk-3 { background: linear-gradient(135deg,#2e7d32 50%,#fff 50%); }
.runner-silk.silk-4 { background: linear-gradient(135deg,#f57f17 50%,#1a237e 50%); }
.runner-silk.silk-5 { background: linear-gradient(135deg,#6a1b9a 50%,#fff9c4 50%); }
.runner-silk.silk-6 { background: linear-gradient(135deg,#00838f 50%,#f48fb1 50%); }

/* Runner info */
.bv-runner-info { flex: 1; min-width: 0; }
.bv-runner-name { font-size: 13px; font-weight: 700; color: var(--bv-text); overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.bv-runner-meta { font-size: 11px; color: var(--bv-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-runner-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bv-tf-stars     { color: var(--bv-amber); font-size: 11px; letter-spacing: 1px; }
.bv-trainer-chip { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--bv-blue-light); color: var(--bv-blue-dark); }
.bv-ofr-chip     { background: #EDE9FE; color: #5521B5; }
.bv-runner-comment { font-size: 11px; color: var(--bv-text); opacity: 0.75; font-style: italic; margin-top: 3px; line-height: 1.4; }
.bv-stable-tour  { opacity: 0.65; }
.bv-bf-chip      { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--bv-amber-bg); color: #7A4800; }
.bv-our-pick-badge   { display: inline-block; padding: 2px 7px; border-radius: 4px; background: var(--bv-green-light); color: #006C30; font-size: 10px; font-weight: 700; }
.bv-could-win-badge  { display: inline-block; padding: 2px 7px; border-radius: 4px; background: var(--bv-blue-light); color: var(--bv-blue-dark); font-size: 10px; font-weight: 700; }
.bv-result-badge     { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.bv-result-badge.won    { background: var(--bv-green); color: #fff; }
.bv-result-badge.placed { background: var(--bv-blue-light); color: var(--bv-blue-dark); }
.bv-result-badge.lost   { background: var(--state-lost-bg); color: var(--bv-red); }
.bv-result-badge.finish { background: var(--state-ended-bg); color: var(--bv-muted); }
.bv-finish-badge { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.bv-finish-badge.first { background: var(--bv-green); color: #fff; }
.bv-finish-badge.placed-pos { background: var(--bv-blue-light); color: var(--bv-blue-dark); }
.bv-finish-badge.finish { background: var(--state-ended-bg); color: var(--bv-muted); }
.bv-notified-badge { display: inline-block; padding: 2px 7px; border-radius: 4px; background: var(--bv-amber-bg); color: #7A4800; font-size: 10px; font-weight: 700; }
.tier-badge   { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; margin-left: 4px; }
.tier-a       { background: #d4edda; color: #155724; }
.tier-b       { background: #d1ecf1; color: #0c5460; }
.tier-c       { background: #f8f0dd; color: #7A4800; }
.bv-pl-amount     { display: block; font-size: 12px; font-weight: 700; margin-top: 3px; }
.bv-pl-amount.pos { color: var(--bv-green); }
.bv-pl-amount.neg { color: var(--bv-red); }

/* Odds column */
.bv-odds-col { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 110px; }
.bv-odds-col-label { font-size: 9px; font-weight: 700; color: var(--bv-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.bv-odds-btn {
  min-width: 52px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bv-odds-bg);
  border-radius: 4px;
  border-bottom: 2px solid var(--bv-blue);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--bv-text);
}
.bv-odds-btn.selected { background: var(--bv-blue); color: #fff; border-bottom-color: var(--bv-blue-dark); }
.bv-more-runners { padding: 8px 12px; font-size: 12px; color: var(--bv-muted); border-top: 1px solid var(--bv-border); text-align: center; }

/* Expand / detail */
.bv-expand { border-top: 1px solid var(--bv-border); background: var(--bv-card-head); }
.bv-expand > summary { list-style: none; padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--bv-blue); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; user-select: none; }
.bv-expand > summary::-webkit-details-marker { display: none; }
.bv-expand[open] > summary { border-bottom: 1px solid var(--bv-border); }
.bv-detail-body { padding: 12px; background: var(--bv-page); display: grid; gap: 10px; }
.bv-pick-detail, .bv-watch-detail { padding: 10px 12px; border-radius: 6px; background: var(--bv-card); border: 1px solid var(--bv-border); }
.bv-pick-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bv-muted); margin-bottom: 4px; }
.bv-pick-detail p, .bv-watch-detail p { margin: 0; font-size: 13px; color: var(--bv-text); line-height: 1.5; }
.bv-pick-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.bv-ai-badge    { padding: 3px 8px; border-radius: 4px; background: var(--bv-blue-light); color: var(--bv-blue-dark); font-size: 11px; font-weight: 700; }
.bv-devil-warning { padding: 8px 10px; border-radius: 6px; background: #FFF8E8; border: 1px solid var(--bv-amber); color: #7A4800; font-size: 12px; font-weight: 700; margin-top: 6px; }

/* Collapsed results */
.bv-results-collapsed { margin-top: 16px; border: 1px solid var(--bv-border); border-radius: 8px; background: var(--bv-card); overflow: hidden; }
.bv-results-collapsed > summary { list-style: none; padding: 11px 14px; font-size: 13px; font-weight: 700; color: var(--bv-muted); cursor: pointer; background: var(--bv-page); }
.bv-results-collapsed > summary::-webkit-details-marker { display: none; }
.bv-results-collapsed[open] > summary { border-bottom: 1px solid var(--bv-border); }

/* ── 21. TOMORROW EARLY VIEW ───────────────────────────────────── */
.bv-tomorrow-section { margin-top: 20px; font-family: 'Lato', sans-serif; }
.bv-tomorrow-section h2 { font-size: 15px; font-weight: 700; color: var(--bv-text); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.bv-tomorrow-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 10px; }
.bv-tomorrow-card { background: var(--bv-card); border: 1px solid var(--bv-border); border-radius: 8px; overflow: hidden; box-shadow: var(--bv-shadow); }
.bv-tomorrow-head { padding: 9px 12px 7px; border-bottom: 1px solid var(--bv-border); background: var(--bv-card-head); display: flex; align-items: baseline; gap: 8px; }
.bv-tomorrow-body { padding: 10px 12px; }
.bv-tomorrow-pick small  { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--bv-muted); margin-bottom: 2px; }
.bv-tomorrow-pick strong { display: block; font-size: 13px; font-weight: 700; color: var(--bv-text); }
.bv-tomorrow-odds { display: inline-block; padding: 4px 10px; background: var(--bv-odds-bg); border-bottom: 2px solid var(--bv-blue); border-radius: 4px; font-size: 12px; font-weight: 700; color: var(--bv-text); margin-top: 6px; }
.bv-tomorrow-signal { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.bv-tomorrow-signal.strong   { background: var(--bv-green-light); color: #006C30; }
.bv-tomorrow-signal.solid    { background: var(--bv-blue-light);  color: var(--bv-blue-dark); }
.bv-tomorrow-signal.moderate { background: var(--bv-odds-bg);     color: var(--bv-muted); }
.bv-tomorrow-outsider { font-size: 12px; color: var(--bv-muted); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--bv-odds-bg); }
.bv-tomorrow-note { font-size: 11px; color: var(--bv-disabled); margin-top: 10px; text-align: right; }

/* ── 22. RESEARCH CANDIDATES ───────────────────────────────────── */
.research-card-list { display: grid; gap: 10px; }
.research-candidate-card { overflow: hidden; border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); }
.research-candidate-card.is-bet { border-color: rgba(65,182,230,0.30); }
.research-race-head { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--bv-card-head); border-bottom: 1px solid var(--bv-border); }
.research-time-block { display: grid; gap: 2px; justify-items: center; }
.research-time-block strong { color: var(--bv-blue); font-size: 1rem; letter-spacing: -0.03em; }
.research-time-block span   { color: var(--bv-muted); font-size: 0.66rem; font-weight: 800; text-transform: uppercase; text-align: center; overflow-wrap: anywhere; }
.research-race-info p, .research-race-info small { margin: 0; color: var(--bv-muted); font-size: 0.78rem; font-weight: 700; }
.research-bet-tag   { padding: 4px 9px; border-radius: 6px; background: var(--bv-blue); color: #fff; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.04em; }
.research-watch-tag { padding: 4px 9px; border-radius: 6px; background: var(--bv-odds-bg); color: var(--bv-muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; }
.research-picks-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; }
.research-pick-cell { padding: 12px; border-right: 1px solid var(--bv-border); color: var(--bv-text); }
.research-pick-cell:last-child { border-right: 0; }
.research-pick-cell.green  { background: rgba(0,154,68,0.05); }
.research-pick-cell.amber  { background: rgba(255,170,77,0.05); }
.research-pick-cell.winner { background: var(--bv-green-light); }
.research-pick-cell.placed { background: var(--bv-blue-light); }
.research-pick-cell.empty  { color: var(--bv-muted); }
.research-pick-cell > span   { display: block; color: var(--bv-muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.research-pick-cell > strong { display: block; margin: 5px 0 6px; font-size: 1rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.research-pick-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.research-pick-meta b { padding: 4px 8px; border-radius: 999px; background: var(--bv-odds-bg); border: 1px solid var(--bv-border); font-size: 0.7rem; }
.research-result-bar { padding: 8px 12px; border-top: 1px solid var(--bv-border); background: var(--bv-page); color: var(--bv-muted); font-size: 0.8rem; }
.research-result-bar strong { color: var(--bv-text); }

/* ── 23. OLD BET-NOW + TIP CARDS (kept for compat) ────────────── */
.bet-now-panel    { margin-top: 6px; }
.bet-now-actions  { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.bet-now-results  { min-height: 100px; }
.bet-now-grid     { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 14px; }
.bet-now-card     { border: 1px solid var(--bv-border); border-left: 4px solid var(--bv-blue); border-radius: 12px; background: var(--bv-card); padding: 16px; box-shadow: var(--bv-shadow); }
.bet-now-card h3  { margin: 4px 0 0; font-size: 1.1rem; color: var(--bv-text); }
.bet-now-card p   { margin: 10px 0 0; color: var(--bv-muted); line-height: 1.5; }
.bet-now-card-head{ display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.bet-now-run-btn  { background: linear-gradient(135deg,var(--bv-green),#00BF50); border: 1px solid rgba(0,154,68,0.45); color: #fff; font-weight: 700; animation: bet-now-pulse 2s ease-in-out infinite; }
.bet-now-run-cost { display: block; margin-top: 10px; color: var(--bv-blue); font-size: 0.8rem; }
.bet-now-status   { margin: 0; color: var(--bv-muted); font-size: 0.92rem; }
@keyframes bet-now-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(0,154,68,0.45)} 50%{box-shadow:0 0 0 8px rgba(0,154,68,0)} }

/* Tip cards */
.tip-timeline, .tips-stage { display: grid; gap: 12px; }
.tip-card { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 14px; min-width: 0; padding: 16px; border: 1px solid var(--bv-border); border-left: 4px solid var(--bv-green); border-radius: 10px; background: var(--bv-card); box-shadow: var(--bv-shadow); }
.tip-card.gold   { border-left-color: var(--bv-amber); }
.tip-card.blue   { border-left-color: var(--bv-blue); }
.tip-card.red    { border-left-color: var(--bv-red); }
.tip-time { display: grid; align-content: start; gap: 4px; padding: 10px; border-radius: 8px; background: var(--bv-blue-light); text-align: center; }
.tip-time strong { font-size: 1.2rem; line-height: 1; letter-spacing: -0.03em; color: var(--bv-blue-dark); }
.tip-time span   { color: var(--bv-muted); font-weight: 800; font-size: 0.7rem; text-transform: uppercase; overflow-wrap: anywhere; }
.tip-main { min-width: 0; }
.tip-title-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tip-title-row h3 { margin: 3px 0 0; font-size: clamp(1.1rem,2.4vw,1.4rem); line-height: 1.1; letter-spacing: -0.03em; overflow-wrap: anywhere; color: var(--bv-text); }
.tip-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.tip-facts span   { padding: 9px 10px; border-radius: 8px; background: var(--bv-odds-bg); border: 1px solid var(--bv-border); }
.tip-facts small  { display: block; color: var(--bv-muted); font-weight: 600; font-size: 0.7rem; }
.tip-facts strong { display: block; margin-top: 3px; font-size: 0.9rem; overflow-wrap: anywhere; color: var(--bv-text); }
.tip-card p { margin-bottom: 10px; color: var(--bv-muted); line-height: 1.55; }

.bet-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 0 10px; border-radius: 6px; color: #fff; background: var(--bv-blue); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; }
.bet-pill.gold { background: var(--bv-amber); color: var(--bv-dark); }
.bet-pill.blue { background: var(--bv-blue); color: #fff; }
.bet-pill.red  { background: var(--bv-red); color: #fff; }
.race-meta { display: block; color: var(--bv-muted); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; }

/* Bet type grid */
.bet-type-grid { display: grid; gap: 12px; }
.bet-type-card { padding: 16px; border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); box-shadow: var(--bv-shadow); }
.leg-list { display: grid; gap: 4px; margin-top: 8px; }
.leg-list span { font-size: 0.82rem; color: var(--bv-muted); }

/* Selection card */
.selection-stack { display: grid; gap: 12px; }
.selection-card  { padding: 16px; border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); box-shadow: var(--bv-shadow); }
.selection-main  { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.selection-card h3 { margin: 3px 0 0; font-size: 1.1rem; letter-spacing: -0.03em; overflow-wrap: anywhere; color: var(--bv-text); }
.selection-grid  { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.selection-grid span  { padding: 9px 10px; border-radius: 8px; background: var(--bv-odds-bg); border: 1px solid var(--bv-border); }
.selection-grid small { display: block; color: var(--bv-muted); }
.selection-grid strong{ display: block; margin-top: 3px; color: var(--bv-text); }
.selection-card p { margin-bottom: 10px; color: var(--bv-muted); line-height: 1.55; }

/* Pick result cards */
.pick-result-shell   { display: grid; grid-template-columns: minmax(240px,0.5fr) minmax(0,1fr); gap: 16px; align-items: start; }
.pick-result-list    { display: grid; gap: 10px; }
.pick-result-card    { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 14px; border: 1px solid var(--bv-border); border-left: 4px solid rgba(0,0,0,0.10); border-radius: 10px; background: var(--bv-card); }
.pick-result-card.green  { border-left-color: var(--bv-green); }
.pick-result-card.blue   { border-left-color: var(--bv-blue); }
.pick-result-card.red    { border-left-color: var(--bv-red); }
.pick-result-card.amber  { border-left-color: var(--bv-amber); }
.pick-result-card h3 { margin: 3px 0 6px; color: var(--bv-text); }
.pick-result-card p  { margin: 0; color: var(--bv-muted); }
.pick-result-outcome { display: grid; justify-items: end; align-content: center; gap: 6px; text-align: right; }
.pick-result-outcome strong { font-size: 1.35rem; letter-spacing: -0.04em; color: var(--bv-text); }
.pick-result-outcome small  { color: var(--bv-muted); font-weight: 700; }
.result-summary-card { min-height: 160px; padding: 18px; border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); display: flex; flex-direction: column; justify-content: center; box-shadow: var(--bv-shadow); }
.result-summary-card span   { color: var(--bv-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.result-summary-card strong { margin: 8px 0 10px; font-size: clamp(1.8rem,3vw,2.4rem); line-height: 0.9; letter-spacing: -0.07em; color: var(--bv-text); display: block; }
.result-summary-card p      { margin: 0; color: var(--bv-muted); }

/* ── RESULTS RACE HISTORY ───────────────────────────────────────── */
.results-history { display: flex; flex-direction: column; }
.results-history-footer { padding: 16px 0 0; text-align: center; }
.results-history-group { display: contents; }
.results-race-divider { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 6px; border-top: 1px solid var(--bv-border); margin-top: 6px; flex-wrap: wrap; gap: 4px; }
.results-race-divider:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.results-race-divider-left { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.results-race-course { font-size: 13px; font-weight: 700; color: var(--bv-text); }
.results-race-meta { font-size: 11px; color: var(--bv-muted); }
.results-race-winner { font-size: 11px; color: var(--bv-muted); white-space: nowrap; }
.results-race-winner strong { color: var(--bv-text); font-weight: 700; }
.results-history-section { margin-top: 20px; }
.results-section-label { font-size: 12px; font-weight: 700; color: var(--bv-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.results-race-placed { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 0 8px; }
.results-placed-horse { font-size: 12px; color: var(--bv-text); }
.results-placed-pos { font-weight: 700; color: var(--bv-muted); margin-right: 2px; }
.results-placed-sp { font-size: 11px; color: var(--bv-muted); font-weight: 700; }

/* Outsider lab */
.outsider-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); }
.outsider-card { padding: 14px; border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); box-shadow: var(--bv-shadow); }
.outsider-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.outsider-card h3 { margin: 3px 0 0; font-size: 1rem; overflow-wrap: anywhere; color: var(--bv-text); }
.outsider-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.outsider-signals { margin: 8px 0 0; padding-left: 16px; }
.outsider-signals li { font-size: 0.8rem; color: var(--bv-muted); margin: 3px 0; }

/* ── 24. HOME PAGE COMPONENTS ──────────────────────────────────── */
.welcome-card { position: relative; overflow: hidden; padding: 24px; margin-bottom: 16px; border: 1px solid var(--bv-border); border-radius: 12px; background: var(--bv-card); box-shadow: var(--bv-shadow); }
.welcome-card h1 { margin: 3px 0 8px; font-size: clamp(1.5rem,3vw,2.1rem); letter-spacing: -0.04em; color: var(--bv-text); }
.welcome-sub { max-width: 700px; margin: 0 0 18px; color: var(--bv-muted); font-size: 0.96rem; line-height: 1.6; }
.welcome-sub strong  { color: var(--bv-text); }
.welcome-actions     { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.home-dashboard-top  { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,0.8fr); gap: 14px; margin-bottom: 14px; }
.home-title-block h1 { margin: 4px 0 6px; font-size: clamp(1.4rem,2.5vw,1.8rem); }
.home-title-block p  { color: var(--bv-muted); margin: 0; max-width: 600px; line-height: 1.5; }
.home-side { display: grid; gap: 16px; align-content: start; }
.home-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,0.65fr); gap: 16px; align-items: start; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.host-card { border: 1px solid var(--bv-border); border-radius: 12px; background: var(--bv-card); box-shadow: var(--bv-shadow); padding: 18px; color: var(--bv-text); }
.host-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.host-card-head h2 { margin: 0; font-size: 0.96rem; font-weight: 700; }
.host-card-head .host-tag { padding: 3px 9px; border-radius: 999px; background: var(--bv-blue-light); color: var(--bv-blue-dark); font-size: 0.7rem; font-weight: 700; }
.host-kv-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; }
.host-kv { display: flex; flex-direction: column; gap: 3px; }
.host-kv span   { color: var(--bv-muted); font-size: 0.76rem; font-weight: 600; }
.host-kv strong { font-size: 0.9rem; font-weight: 700; color: var(--bv-text); }

/* Simple tiles */
.simple-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.simple-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); box-shadow: var(--bv-shadow); }
.tile-icon   { font-size: 1.4rem; margin-bottom: 5px; }
.tile-label  { color: var(--bv-muted); font-size: 0.82rem; font-weight: 600; }
.tile-value  { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin: 3px 0 4px; color: var(--bv-text); }
.tile-meaning{ color: var(--bv-muted); font-size: 0.78rem; line-height: 1.4; }

/* Glance banner */
.glance-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 20px; border: 1px solid var(--bv-border); border-left: 4px solid var(--bv-muted); border-radius: 10px; background: var(--bv-card); }
.glance-banner.good    { border-left-color: var(--bv-blue); background: var(--bv-blue-light); }
.glance-banner.bad     { border-left-color: var(--bv-red);  background: var(--state-lost-bg); }
.glance-banner.neutral { border-left-color: var(--bv-blue); background: var(--bv-blue-light); }
.glance-icon { font-size: 1.4rem; line-height: 1.4; }
.glance-banner strong { display: block; font-size: 1rem; margin-bottom: 2px; color: var(--bv-text); }
.glance-banner p      { margin: 0; color: var(--bv-muted); font-size: 0.9rem; line-height: 1.5; }

/* Steps strip */
.steps-strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps-strip li { display: flex; gap: 10px; align-items: flex-start; opacity: 0.65; }
.steps-strip li.now, .steps-strip li.done { opacity: 1; }
.step-num { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--bv-odds-bg); border: 1px solid var(--bv-border); font-weight: 700; font-size: 0.82rem; color: var(--bv-muted); }
.steps-strip li.now  .step-num { background: var(--bv-blue); color: #fff; border-color: transparent; }
.steps-strip li.done .step-num { background: var(--bv-blue-light); color: var(--bv-blue-dark); border-color: rgba(65,182,230,0.30); }
.steps-strip strong { display: block; font-size: 0.92rem; color: var(--bv-text); }
.steps-strip small  { color: var(--bv-muted); font-size: 0.8rem; line-height: 1.4; }
.steps-strip a      { color: var(--bv-blue-dark); }

/* Health list */
.health-list { display: grid; gap: 10px; }
.health-row  { display: flex; gap: 10px; align-items: flex-start; }
.health-dot  { flex-shrink: 0; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--bv-border); }
.health-dot.ok   { background: var(--bv-green); }
.health-dot.warn { background: var(--bv-amber); }
.health-row strong { display: block; font-size: 0.88rem; color: var(--bv-text); }
.health-row small  { color: var(--bv-muted); font-size: 0.8rem; line-height: 1.4; }

/* ── 25. BANK CARD ──────────────────────────────────────────────── */
.bank-card { border: 1px solid var(--bv-border); border-radius: 12px; padding: 18px; background: var(--bv-card); box-shadow: var(--bv-shadow); }
.bank-card p { color: var(--bv-muted); }
.bank-tracker strong { color: var(--bv-text); }
.bank-tracker.bank-up strong { color: var(--bv-green); }
.bank-tracker.bank-down strong { color: var(--bv-red); }
.bank-tracker-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.bank-tracker-grid div span { display: block; font-size: 0.7rem; color: var(--bv-muted); margin-bottom: 3px; }
.bank-tracker-grid strong { font-size: 1rem; letter-spacing: -0.02em; color: var(--bv-text); }
.bank-tracker-grid .pos { color: var(--bv-green); }
.bank-tracker-grid .neg { color: var(--bv-red); }
.bank-sparkline { font-family: ui-monospace,monospace; letter-spacing: 0.25em; font-size: 0.96rem; color: var(--bv-text); }

/* ── 26. AI REVIEW PAGE ─────────────────────────────────────────── */
.ai-review-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,0.85fr); gap: 16px; align-items: start; }
.mini-card { padding: 12px; border: 1px solid var(--bv-border); border-radius: 8px; background: var(--bv-card); color: var(--bv-text); }
.mini-card strong { color: var(--bv-text); }
.mini-card span   { display: block; color: var(--bv-muted); font-size: 0.82rem; }
.mini-card small  { display: block; color: var(--bv-muted); font-size: 0.76rem; margin-top: 4px; }
.mini-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.method-meta { color: var(--bv-muted); font-size: 0.84rem; margin: 5px 0 10px; }
.method-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.method-card { border: 1px solid var(--bv-border); border-radius: 8px; background: var(--bv-card); padding: 12px; }
.method-verdict { color: var(--bv-text); font-size: 0.88rem; margin: 7px 0; }
.method-list li, .method-guards { font-size: 0.82rem; color: var(--bv-muted); margin: 3px 0; }
.review-history { display: grid; gap: 8px; }

/* Performance lab */
.performance-lab  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.perf-grid        { display: grid; gap: 8px; }
.perf-card        { padding: 10px 12px; border: 1px solid var(--bv-border); border-radius: 8px; background: var(--bv-card); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.perf-card small  { display: block; color: var(--bv-muted); font-size: 0.76rem; }
.leader-block     { display: grid; gap: 8px; }
.leaderboard      { display: grid; gap: 4px; }

/* ── 27. LEARNING PAGE ─────────────────────────────────────────── */
.learning-shell  { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.learning-summary{ display: grid; gap: 10px; }

/* ── 28. GLOSSARY ──────────────────────────────────────────────── */
.glossary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 22px; }
.glossary-item { padding: 9px 0; border-bottom: 1px solid var(--bv-border); }
.glossary-item strong { display: block; font-size: 0.88rem; margin-bottom: 1px; color: var(--bv-text); }
.glossary-item span   { color: var(--bv-muted); font-size: 0.82rem; line-height: 1.4; }

/* How It Works */
.how-intro { margin-bottom: 16px; padding: 16px 18px; border: 1px solid rgba(65,182,230,0.25); border-radius: 10px; background: var(--bv-blue-light); }
.how-intro p { margin: 0 0 10px; color: var(--bv-text); line-height: 1.55; }
.how-intro p:last-child { margin-bottom: 0; }
.how-stack { display: flex; flex-direction: column; gap: 12px; }
.how-section { border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); padding: 16px 18px; }
.how-section h3 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--bv-text); }
.how-section-kicker { margin: 4px 0 0; color: var(--bv-muted); font-size: 0.8rem; font-weight: 500; }
.how-section-body { margin-top: 10px; color: var(--bv-text); font-size: 0.88rem; line-height: 1.6; }
.how-section-body p { margin: 10px 0; color: var(--bv-muted); }
.how-section-body p:first-child { margin-top: 0; }
.how-section-body ul,
.how-section-body ol { margin: 8px 0; padding-left: 20px; color: var(--bv-muted); }
.how-section-body li { margin: 4px 0; }
.how-section-body strong { color: var(--bv-text); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 12px; }
.info-grid article { padding: 14px; border: 1px solid var(--bv-border); border-radius: 10px; background: var(--bv-card); }
.info-grid p { margin: 0; color: var(--bv-muted); font-size: 0.9rem; line-height: 1.55; }

/* ── 29. BLOCK LABEL & MISC ─────────────────────────────────────── */
.block-label    { margin: 0 0 10px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bv-muted); }
.job-notice     { margin: 6px 0 0; color: var(--bv-muted); font-size: 0.9rem; }
.force-rerun    { font-size: 0.82rem; color: var(--bv-muted); }
.wide-link      { width: fit-content; }
.odds-button    { min-width: 58px; padding: 8px 10px; border-radius: 6px; background: var(--bv-odds-bg); border-bottom: 2px solid var(--bv-blue); color: var(--bv-text); font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; font-size: 0.88rem; }
.runner-rank    { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bv-blue-light); color: var(--bv-blue-dark); font-weight: 900; }
.runner-name-block strong { display: block; overflow-wrap: anywhere; font-size: 0.92rem; color: var(--bv-text); }
.runner-name-block small  { display: block; color: var(--bv-muted); margin-top: 2px; font-size: 0.74rem; }
.runner-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.runner-number-block { display: grid; justify-items: center; gap: 5px; color: var(--bv-text); font-weight: 900; }
.runner-silk { width: 22px; height: 22px; border-radius: 4px; }
.runner-form-block, .runner-meta-block { color: var(--bv-muted); font-size: 0.75rem; }
.runner-form-block span, .runner-meta-block span { display: block; }
.runner-form-block strong { display: block; margin-top: 2px; color: var(--bv-text); font-size: 0.84rem; }
.runner-meta-block small { display: block; margin-top: 2px; }
.alert-card { padding: 12px; border-radius: 8px; border: 1px solid var(--bv-border); background: var(--bv-card); }
.alert-card.green  { border-left: 3px solid var(--bv-green); background: var(--bv-green-light); }
.alert-card.amber  { border-left: 3px solid var(--bv-amber); background: var(--bv-amber-bg); }
.decision-card { padding: 14px; border: 1px solid var(--bv-border); border-radius: 8px; background: var(--bv-card); }

/* ── 30. MOBILE BOTTOM NAV ─────────────────────────────────────── */
.mobile-bottom-nav { display: none; }

/* ── 31. RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .dashboard-layout, .home-grid, .ops-grid, .split-panel, .performance-lab, .learning-shell, .pick-result-shell, .bet-type-grid { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-hero   { align-items: flex-start; flex-direction: column; }
  .host-card, .home-dashboard-top { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 10px 14px;
    background: rgba(29,37,45,0.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--bv-divider-dark);
  }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 60;
    width: 82%;
    max-width: 300px;
    height: 100vh;
    height: 100dvh;
    border-right: 1px solid var(--bv-divider-dark);
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    overflow-y: auto;
  }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,0.5); }

  .nav-backdrop {
    display: block;
    position: fixed; inset: 0;
    z-index: 50;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .main-header { display: none; }
  .dashboard-content { padding: 12px 14px 76px; }
  .betting-filter-bar { top: 58px; }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 30;
    background: rgba(29,37,45,0.97);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--bv-divider-dark);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 4px;
    color: #8A97A8;
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .bottom-nav-item.active { color: var(--bv-blue); }
  .bottom-nav-icon { font-size: 1.1rem; }

  .mobile-status-pill { font-size: 0.66rem; font-weight: 900; padding: 3px 8px; border-radius: 999px; background: rgba(65,182,230,0.20); color: var(--bv-blue); }
  .mobile-status-pill:empty { display: none; }

  .method-grid { grid-template-columns: 1fr; }
  .mini-grid   { grid-template-columns: 1fr; }
  .bv-tomorrow-grid { grid-template-columns: 1fr 1fr; }
  .race-strip-item { flex: 0 0 96px !important; min-width: 96px !important; }
  .research-picks-row { grid-template-columns: 1fr; }
  .research-pick-cell { border-right: 0; border-bottom: 1px solid var(--bv-border); }
  .research-pick-cell:last-child { border-bottom: 0; }
}

@media (max-width: 600px) {
  .metrics-row     { grid-template-columns: 1fr 1fr; gap: 8px; }
  .simple-grid     { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tip-facts, .selection-grid { grid-template-columns: 1fr 1fr; }
  .tip-card        { grid-template-columns: 1fr; gap: 10px; }
  .tip-time        { grid-template-columns: auto minmax(0,1fr); align-items: center; }
  .glossary-grid   { grid-template-columns: 1fr; }
  .bv-tomorrow-grid{ grid-template-columns: 1fr; }
  .bank-tracker-grid { grid-template-columns: 1fr 1fr; }
  .home-dashboard-top { grid-template-columns: 1fr; }
  .pick-result-card   { flex-direction: column; }
  .pick-result-outcome{ justify-items: start; text-align: left; }
  .research-race-head { grid-template-columns: 58px minmax(0,1fr); }
  .bv-card-header-top { --header-row-h: 26px; }
  .bv-card-header-top .bv-status-badge.resulted { height: 17px; font-size: 10px; padding: 0 10px; }
  .bv-card-header-top .bv-watch-now-btn { font-size: 12.5px; padding: 0 12px; }
}

@media (max-width: 420px) {
  .metrics-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════════
   NEW RUNNER CARD ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* 15 distinct UK racing cloth colours */
.bv-silk.silk-c1  { background: linear-gradient(135deg, #CC0000 50%, #FFFFFF 50%); }
.bv-silk.silk-c2  { background: linear-gradient(135deg, #FFDD00 50%, #000000 50%); }
.bv-silk.silk-c3  { background: linear-gradient(135deg, #003399 50%, #FFFFFF 50%); }
.bv-silk.silk-c4  { background: linear-gradient(135deg, #FF8800 50%, #003399 50%); }
.bv-silk.silk-c5  { background: linear-gradient(135deg, #008800 50%, #FFDD00 50%); }
.bv-silk.silk-c6  { background: linear-gradient(135deg, #660066 50%, #FFDD00 50%); }
.bv-silk.silk-c7  { background: linear-gradient(135deg, #CC0000 50%, #003399 50%); }
.bv-silk.silk-c8  { background: linear-gradient(135deg, #FFDD00 50%, #008800 50%); }
.bv-silk.silk-c9  { background: linear-gradient(135deg, #FF8800 50%, #FFFFFF 50%); }
.bv-silk.silk-c10 { background: linear-gradient(135deg, #000000 50%, #CC0000 50%); }
.bv-silk.silk-c11 { background: linear-gradient(135deg, #008888 50%, #FFFFFF 50%); }
.bv-silk.silk-c12 { background: linear-gradient(135deg, #880000 50%, #FFDD00 50%); }
.bv-silk.silk-c13 { background: linear-gradient(135deg, #004400 50%, #FF8800 50%); }
.bv-silk.silk-c14 { background: linear-gradient(135deg, #220055 50%, #FFDD00 50%); }
.bv-silk.silk-c15 { background: linear-gradient(135deg, #CC6600 50%, #000000 50%); }

/* Real jockey silk image from Sporting Life */
.bv-silk-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}
.runner-silk-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Jockey + Trainer bar */
.bv-runner-jt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--bv-muted);
}
.bv-jockey::before { content: "J: "; font-weight: 700; }
.bv-trainer::before { content: "T: "; font-weight: 700; }
.bv-form { color: var(--bv-disabled); font-variant-numeric: tabular-nums; }

/* Two-box odds display */
.bv-odds-pair {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bv-odds-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 4px 5px;
  background: var(--bv-odds-bg);
  border: 1px solid var(--bv-border);
  border-radius: 4px;
}
.bv-odds-box.selected {
  background: var(--bv-blue);
  border-color: var(--bv-blue-dark);
}
.bv-odds-box-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 9px;
  font-weight: 700;
  color: var(--bv-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
  min-width: 44px;
}
.bv-odds-box-time {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bv-muted);
  font-variant-numeric: tabular-nums;
}
.bv-odds-box.selected .bv-odds-box-label { color: rgba(255,255,255,0.75); }
.bv-odds-box-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--bv-text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.bv-odds-box.selected .bv-odds-box-val { color: #fff; }
.bv-odds-arrow {
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.bv-odds-arrow.up      { color: var(--bv-green); }
.bv-odds-arrow.down    { color: var(--bv-red); }
.bv-odds-arrow.neutral { color: var(--bv-disabled); }
.bv-odds-single {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
/* Keep legacy .bv-odds-btn for watch row and any other uses */

/* Show all runners dropdown */
.bv-all-runners {
  border-top: 1px solid var(--bv-border);
  background: var(--bv-card-head);
}
.bv-all-runners > summary {
  list-style: none;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bv-blue);
  cursor: pointer;
  text-align: center;
}
.bv-all-runners > summary::-webkit-details-marker { display: none; }
.bv-runners-extra { border-top: none; }

/* ── Worth Watching flash banner ── */
.bv-watch-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bv-amber-bg);
  border: 1px solid rgba(255,170,77,0.40);
  border-left: 4px solid var(--bv-amber);
  border-radius: 8px;
}
.bv-watch-banner-icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.8;
  color: #7A4800;
}
.bv-watch-banner-body { flex: 1; min-width: 0; }
.bv-watch-banner-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #7A4800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}
.bv-watch-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-top: 1px solid rgba(255,170,77,0.25);
  font-size: 12px;
}
.bv-watch-item:first-of-type { border-top: none; padding-top: 0; }
.bv-watch-horse { font-weight: 700; color: #7A4800; }
.bv-watch-race  { color: #7A4800; opacity: 0.75; }
.bv-watch-move  { font-weight: 700; color: #7A4800; font-variant-numeric: tabular-nums; }
.bv-watch-drop  {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bv-amber);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.bv-watch-reason { color: #7A4800; opacity: 0.8; font-style: italic; }

/* ── Worth Watching banner enhancements ─────────────────────────────────── */

/* Header row: title left, "Checked X min ago" right */
.bv-watch-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.bv-watch-banner-header .bv-watch-banner-title { margin-bottom: 0; }
.bv-watch-updated {
  font-size: 10px;
  color: #7A4800;
  opacity: 0.55;
  font-style: italic;
  flex-shrink: 0;
}

/* Main line: icon · horse · score · course · odds */
.bv-watch-item-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  width: 100%;
}

/* Detail line: reason text + badges */
.bv-watch-item-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-top: 2px;
}

/* Score pill: "9/10" */
.bv-watch-score {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(122,72,0,0.12);
  color: #7A4800;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Category emoji */
.bv-watch-category { font-size: 13px; line-height: 1; }

/* Badges row */
.bv-watch-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* Base badge */
.bv-watch-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(122,72,0,0.10);
  color: #7A4800;
}

/* AI consensus — blue */
.bv-badge-ai { background: #EBF5FF; color: #1A56DB; }

/* Tipster — green */
.bv-badge-tipster { background: #DEF7EC; color: #03543F; }

/* Algorithm pick — warm gold */
.bv-badge-algo { background: rgba(255,170,77,0.22); color: #7A4800; }

/* Archive button inside watch banner */
.bv-tip-archive-btn {
  background: transparent;
  border: 1px solid rgba(122,72,0,0.30);
  border-radius: 4px;
  color: #7A4800;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 8px;
  line-height: 1.4;
}
.bv-tip-archive-btn:hover { background: rgba(122,72,0,0.08); }

/* ── Personal Tips banner — green tint ───────────────────────────────────── */
.bv-personal-tips-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #F0FDF4;
  border: 1px solid rgba(22,163,74,0.25);
  border-left: 4px solid #16A34A;
  border-radius: 8px;
}
.bv-personal-tip-item {
  padding: 5px 0;
  border-top: 1px solid rgba(22,163,74,0.18);
  font-size: 12px;
}
.bv-personal-tip-item:first-of-type { border-top: none; padding-top: 0; }

/* ── Bet Now BetVictor white card style ── */
.bv-bn-trigger { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.bv-bn-grid    { display: grid; gap: 10px; }

.bv-bn-card {
  overflow: hidden;
  border: 1px solid var(--bv-border);
  border-radius: 10px;
  background: var(--bv-card);
  box-shadow: var(--bv-shadow);
}
.bv-bn-card::before { content: ""; display: block; height: 3px; background: var(--bv-border); }
.bv-bn-card.state-bet::before  { background: var(--bv-blue); }
.bv-bn-card.state-won::before  { background: var(--bv-green); }

.bv-bn-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  border-bottom: 1px solid var(--bv-border);
}
.bv-bn-fact {
  padding: 10px 12px;
  border-right: 1px solid var(--bv-border);
}
.bv-bn-fact:last-child { border-right: none; }
.bv-bn-fact small    { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--bv-muted); margin-bottom: 3px; letter-spacing: 0.04em; }
.bv-bn-fact strong   { display: block; font-size: 14px; font-weight: 700; color: var(--bv-text); }

.bv-bn-reason { padding: 12px; }
.bv-bn-reason p { margin: 0; font-size: 13px; color: var(--bv-muted); line-height: 1.5; }

/* ── Bet Now changes panel ── */
.bv-bn-changes {
  margin-bottom: 16px;
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  border-left: 4px solid var(--bv-amber);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--bv-shadow);
}
.bv-bn-changes-head {
  padding: 10px 14px 8px;
  background: var(--bv-amber-bg);
  border-bottom: 1px solid var(--bv-border);
}
.bv-bn-changes-title { font-size: 13px; font-weight: 700; color: #7A4800; }
.bv-bn-change-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--bv-odds-bg);
  font-size: 12px;
}
.bv-bn-change-row.pick-changed { background: #FFF8E8; }
.bv-bn-change-row:last-child { border-bottom: none; }
.bv-bn-change-race  { font-weight: 700; color: var(--bv-text); }
.bv-bn-change-pick  { color: #7A4800; }
.bv-bn-change-same  { color: var(--bv-muted); }
.bv-bn-change-score { padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.bv-bn-change-score.up   { background: var(--bv-green-light); color: #006C30; }
.bv-bn-change-score.down { background: var(--state-lost-bg);  color: var(--bv-red); }
.bv-bn-change-move { font-size: 11px; color: var(--bv-text); }
.bv-bn-change-move.steam { color: var(--bv-green); font-weight: 700; }
.bv-bn-change-move.drift { color: var(--bv-red);   font-weight: 700; }

/* Keep old bet-now classes for backward compat */
.bet-now-changes { display: none; }

/* Mobile adjustments */
@media (max-width: 600px) {
  .bv-runner-jt { font-size: 10px; gap: 4px; }
  .bv-watch-banner { gap: 7px; padding: 10px 11px; }
  .bv-watch-item  { gap: 4px; }
  .bv-watch-now-btn { font-size: 12px; padding: 6px 12px; min-height: 32px; }
  .bv-status-badge.resulted { font-size: 11px; padding: 6px 12px; min-height: 32px; }
  .bv-card-header-top { gap: 6px; }
  .bv-card-header-center { max-width: 38%; }
  .bv-course, .bv-time { font-size: 12px; }
  .bv-odds-pair   { gap: 2px; }
  .bv-odds-box    { min-width: 38px; padding: 3px 4px; }
  .bv-odds-box-val { font-size: 12px; }
  .bv-odds-col    { min-width: 96px; }
  .bv-bn-facts    { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bv-bn-change-row { gap: 5px; }
}

/* ── Value Lab ────────────────────────────────────────────────────────────── */
.value-pos  { color: #006C30; font-weight: 700; }
.value-neg  { color: #C0392B; font-weight: 700; }
.value-flat { color: var(--muted); }
.value-explainer {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ── My Watchlist ─────────────────────────────────────────────────────────── */
.watchlist-panel { margin-top: 0; }
.watchlist-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.watchlist-form input,
.watchlist-form select,
.watchlist-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--bv-border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}
.watchlist-form textarea { resize: vertical; min-height: 56px; }
.watchlist-form-row {
  display: flex;
  gap: 8px;
}
.watchlist-form-row select,
.watchlist-form-row input { flex: 1; }
.watchlist-form .button-link { width: 100%; }
.pt-search-wrap { position: relative; }
.pt-search-wrap label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--bv-muted);
  margin-bottom: 4px;
}
.pt-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  border-radius: 8px;
  box-shadow: var(--bv-shadow);
  max-height: 280px;
  overflow-y: auto;
}
.pt-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--bv-odds-bg);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.pt-search-item:hover { background: var(--bv-odds-bg); }
.pt-search-item:last-child { border-bottom: none; }
.pt-search-item strong { font-size: 0.92rem; color: var(--bv-text); }
.pt-search-item span { font-size: 0.8rem; color: var(--bv-muted); }
.pt-search-item small { font-size: 0.78rem; color: var(--bv-green); font-weight: 700; }
.pt-search-empty {
  margin: 0;
  padding: 12px;
  font-size: 0.82rem;
  color: var(--bv-muted);
  line-height: 1.4;
}
.pt-confirm-card {
  padding: 12px 14px;
  background: var(--bv-blue-light);
  border: 1px solid var(--bv-blue);
  border-radius: 8px;
}
.pt-confirm-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bv-blue-dark);
  letter-spacing: 0.04em;
}
.pt-confirm-body strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.pt-confirm-body span {
  display: block;
  font-size: 0.82rem;
  color: var(--bv-muted);
  line-height: 1.5;
}
.pt-status {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
}
.watchlist-subhead {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--muted);
}
.watchlist-next-race {
  display: block;
  font-size: 0.82rem;
  color: var(--bv-blue-dark);
  font-weight: 600;
}
.watchlist-last-run {
  display: block;
  font-size: 0.82rem;
  color: var(--bv-muted);
}
.watchlist-people {
  display: block;
  font-size: 0.82rem;
  color: var(--bv-text);
}
.watchlist-muted-line {
  display: block;
  font-size: 0.82rem;
  color: var(--bv-muted);
  font-style: italic;
}
.pt-search-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bv-odds-bg);
  color: var(--bv-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
}
.pt-search-manual {
  background: var(--bv-amber-bg);
  border-top: 1px solid var(--bv-border);
}
.pt-search-manual:hover { background: #fff0d4; }
.pt-search-loading {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--bv-blue-dark);
  border-top: 1px solid var(--bv-odds-bg);
  animation: pt-pulse 1.2s ease-in-out infinite;
}
.pt-search-loading.done {
  animation: none;
  color: var(--bv-muted);
}
.pt-search-tag.online {
  background: var(--bv-green-light);
  color: #006C30;
}
.pt-confirm-research {
  display: block;
  font-size: 0.8rem;
  color: var(--bv-muted);
  font-style: italic;
  margin-top: 6px;
}
.watchlist-research-note {
  display: block;
  font-size: 0.8rem;
  color: var(--bv-muted);
  font-style: italic;
}
.watchlist-profile-line,
.watchlist-career {
  display: block;
  font-size: 0.82rem;
  color: var(--bv-text);
}
.watchlist-profile-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--bv-blue-dark);
  text-decoration: none;
}
.watchlist-profile-link:hover { text-decoration: underline; }
@keyframes pt-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.watchlist-empty {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.watchlist-item-actions {
  margin-top: 4px;
  display: flex;
  gap: 6px;
}
.watchlist-item-actions button {
  font-size: 0.75rem;
  padding: 2px 8px;
}
.watchlist-item-actions .bv-tip-delete-btn {
  background: transparent;
  color: #E73C3E;
  border: 1px solid #E73C3E;
}
.watchlist-archived { margin-top: 12px; }
.watchlist-archived summary {
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}
.watchlist-tipster-details { margin-top: 20px; }
.watchlist-tipster-summary {
  padding: 14px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.watchlist-tipster-summary::-webkit-details-marker { display: none; }
.watchlist-tipster-body { padding: 0 16px 16px; }

/* ══════════════════════════════════════════════════════════════════════════
   Worth Watching — dedicated page cards  (.ww-*)
   ══════════════════════════════════════════════════════════════════════════ */

/* Responsive card grid: 1 col mobile → 2 col ≥640px → 3 col ≥1100px */
.ww-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px)  { .ww-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .ww-grid { grid-template-columns: repeat(3, 1fr); } }

/* Card shell */
.ww-card {
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  border-top: 3px solid var(--bv-amber);
  border-radius: 8px;
  box-shadow: var(--bv-shadow);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Header row: horse name left, race meta right */
.ww-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ww-horse {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bv-text);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
}
.ww-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.ww-race-meta {
  font-size: 0.78rem;
  color: var(--bv-muted);
  white-space: nowrap;
  padding-top: 2px;
}

/* Category reason pill */
.ww-reason-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bv-amber-bg);
  border: 1px solid rgba(255,170,77,0.45);
  color: #7A4800;
  font-size: 0.78rem;
  font-weight: 600;
  font-style: italic;
  align-self: flex-start;
}

/* Odds trajectory block */
.ww-trajectory {
  background: var(--bv-odds-bg);
  border: 1px solid var(--bv-border);
  border-radius: 6px;
  padding: 8px 10px;
}
.ww-trajectory-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bv-muted);
  margin-bottom: 6px;
}
.ww-timeline-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* A single snapshot in the timeline */
.ww-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.ww-step-time {
  font-size: 0.65rem;
  color: var(--bv-muted);
  font-variant-numeric: tabular-nums;
}
.ww-step-odds {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bv-text);
  font-variant-numeric: tabular-nums;
}

/* Arrow between steps */
.ww-arrow {
  color: var(--bv-amber);
  font-size: 0.75rem;
  line-height: 1;
  margin-top: 10px;
}

/* Total drop badge at the end of the flow */
.ww-total-drop {
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bv-amber);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  align-self: center;
}

/* Signals row: score · AI · tipsters */
.ww-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
  border-top: 1px solid var(--bv-border);
}
.ww-signal-item {
  font-size: 0.82rem;
  color: var(--bv-text);
}
.ww-signal-item strong { color: var(--bv-text); }

/* ══════════════════════════════════════════════════════════════════════════
   First-time visitor email gate modal  (.vg-*)
   ══════════════════════════════════════════════════════════════════════════ */

.vg-card {
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 400px;
  position: relative;
  text-align: center;
  animation: vg-slide-in 0.22s ease;
}
@keyframes vg-slide-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.vg-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--bv-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.vg-close:hover { background: var(--bv-hover, rgba(0,0,0,0.07)); color: var(--bv-text); }

.vg-icon { font-size: 2.4rem; line-height: 1; margin-bottom: 12px; }

.vg-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--bv-text);
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.vg-subtitle {
  font-size: 0.9rem;
  color: var(--bv-muted);
  line-height: 1.5;
  margin: 0 0 20px;
}

.vg-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.vg-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--bv-border);
  border-radius: 8px;
  background: var(--bv-bg, #fff);
  color: var(--bv-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
.vg-input:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }

.vg-submit {
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: opacity 0.15s;
}
.vg-submit:hover:not(:disabled) { opacity: 0.9; }
.vg-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.vg-message {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 0 4px;
  min-height: 1.4em;
}

.vg-skip {
  background: none;
  border: none;
  color: var(--bv-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.vg-skip:hover { color: var(--bv-text); }

/* ══════════════════════════════════════════════════════════════════════════
   Worth Watching — AI Insights expandable panel  (.ww-ai-*)
   ══════════════════════════════════════════════════════════════════════════ */

/* Toggle button — sits below the signals row */
.ww-ai-toggle {
  background: none;
  border: 1px solid var(--bv-border);
  border-radius: 6px;
  color: var(--bv-muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 5px 11px;
  margin-top: 6px;
  align-self: flex-start;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ww-ai-toggle:hover {
  background: var(--bv-hover, rgba(0,0,0,0.05));
  border-color: var(--bv-muted);
  color: var(--bv-text);
}

/* Expanded panel — hidden by default, toggled via JS */
.ww-ai-panel {
  border-top: 1px solid var(--bv-border);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* One analyst block */
.ww-ai-analyst {
  background: var(--bv-odds-bg);
  border: 1px solid var(--bv-border);
  border-left: 3px solid var(--bv-border);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0.8;
}
/* AI picked this specific horse → green accent */
.ww-ai-analyst--match {
  border-left-color: #10b981;
  opacity: 1;
}
/* AI was routing-skipped → dimmed */
.ww-ai-analyst--skipped {
  opacity: 0.45;
}
/* Bouncer pre-filtered this horse → amber accent */
.ww-ai-analyst--bounced {
  border-left-color: var(--bv-amber);
  background: var(--bv-amber-bg);
  opacity: 1;
}

/* Header row: name · chip · confidence */
.ww-ai-analyst-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.ww-ai-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bv-text);
}
.ww-ai-conf {
  font-size: 0.7rem;
  color: var(--bv-muted);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* Status chips */
.ww-ai-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.ww-ai-chip--picked  { background: rgba(16,185,129,0.15); color: #059669; }
.ww-ai-chip--other   { background: var(--bv-border); color: var(--bv-muted); }
.ww-ai-chip--nobet   { background: var(--bv-border); color: var(--bv-muted); }
.ww-ai-chip--skipped { background: rgba(120,120,120,0.12); color: var(--bv-muted); }
.ww-ai-chip--bounced { background: var(--bv-amber); color: #fff; }

/* Reasoning quotation box */
.ww-ai-reasoning {
  font-size: 0.77rem;
  line-height: 1.55;
  color: var(--bv-text);
  font-style: italic;
  background: var(--bv-card);
  border: 1px solid var(--bv-border);
  border-radius: 4px;
  padding: 6px 9px;
}
