/* =============================================================================
   Olympus Bets — Design v2 Token Sheet
   =============================================================================
   Single source of truth for the v2 design system. Loaded once at app boot.
   Defining tokens has zero visual effect until a v2-scoped rule consumes them.
   v2 rules are scoped under `html:has(.ob-design-v2-flag)` so v1 stays untouched.

   Brand DNA (anchored on /assets/ob_logo.jpg):
     - Logo black                   #050810  (slight blue undertone)
     - Logo light blue              #5DA9DA  (the brand accent)
     - Bone / off-white text        #F8FAFC

   Typography (self-hosted from /fonts/, font-display: swap — no render block):
     - Display:  Plus Jakarta Sans 600/700  (tight tracking, confident)
     - Body:     Plus Jakarta Sans 400/500
     - Numerics: JetBrains Mono, tabular figures — the signature. Numbers are
                 the product here, so every edge, probability, unit and price
                 is monospaced and aligns down its column.
   ============================================================================= */


:root {
  /* --- TYPE STACKS ----------------------------------------------------- */
  /* One voice, two jobs. Plus Jakarta Sans carries every word; JetBrains Mono
     carries every number. Both are self-hosted from /fonts/ (see
     styles/fonts_selfhosted.css) — these families are actually DELIVERED, unlike
     the Fraunces/Inter stacks that stood here until Jul 25 2026 and silently
     fell back to whatever serif the visitor's OS happened to have. */
  --ob-font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  --ob-font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  --ob-font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, 'Menlo', monospace;
  /* Direction C (Nov 10 2026): Archivo, variable on width + weight, one file for the
     condensed figures and the redesign's text face. Used inside .obc surfaces only
     until the sitewide flip; --ob-font-display/-body above stay for legacy pages. */
  --ob-font-grotesk: 'Archivo', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  --ob-wdth-display: 68%;                 /* figures: probabilities, scores, edges */
  --ob-wdth-data:    86%;                 /* table figures: spread, total, prices */

  /* --- TYPE SCALE ------------------------------------------------------ */
  /* Eleven steps. If a size isn't here, it doesn't belong on the page. */
  --ob-text-2xs:     0.6875rem;           /* 11 — eyebrows, micro labels */
  --ob-text-xs:      0.75rem;             /* 12 — table captions, chips */
  --ob-text-sm:      0.875rem;            /* 14 — secondary/supporting */
  --ob-text-md:      1rem;                /* 16 — body default */
  --ob-text-lg:      1.125rem;            /* 18 — lead paragraph */
  --ob-text-xl:      1.375rem;            /* 22 — card titles */
  --ob-text-2xl:     1.75rem;             /* 28 — section headings */
  --ob-text-3xl:     2.25rem;             /* 36 — page headings */
  --ob-text-4xl:     clamp(2.5rem, 4.4vw, 3.5rem);  /* hero only */
  --ob-text-5xl:     3rem;                /* 48 — phone card probability, door scores, edge side */
  --ob-text-6xl:     5rem;                /* 80 — pane and door probability */

  /* --- LEADING / TRACKING --------------------------------------------- */
  --ob-leading-tight: 1.08;               /* display — set tight, it earns it */
  --ob-leading-snug:  1.3;                /* headings, card titles */
  --ob-leading-body:  1.6;                /* running text */
  --ob-tracking-display: -0.02em;         /* large type needs negative tracking */
  --ob-tracking-eyebrow: 0.14em;          /* uppercase micro labels need air */

  /* --- SPACING SCALE --------------------------------------------------- */
  /* 4px base. Nine steps, geometric after step 4 — arbitrary margins are the
     single biggest source of the "close but not quite" feeling. */
  --ob-space-1:      0.25rem;             /*  4 */
  --ob-space-2:      0.5rem;              /*  8 */
  --ob-space-3:      0.75rem;             /* 12 */
  --ob-space-4:      1rem;                /* 16 */
  --ob-space-5:      1.5rem;              /* 24 */
  --ob-space-6:      2rem;                /* 32 */
  --ob-space-7:      3rem;                /* 48 */
  --ob-space-8:      4rem;                /* 64 */
  --ob-space-9:      6rem;                /* 96 — major section breaks */

  /* --- INK / SURFACES -------------------------------------------------- */
  --ob-ink:          #050810;             /* near-black w/ blue undertone */
  --ob-surface-0:    #0B0F1C;             /* page bg */
  --ob-surface-1:    rgba(255,255,255,0.03);
  --ob-surface-2:    rgba(255,255,255,0.06);

  /* --- ROYAL BLUE SCALE (anchored on logo blue) ----------------------- */
  --ob-royal-50:     #E8F2FB;
  --ob-royal-300:    #93C2E6;
  --ob-royal-500:    #5DA9DA;             /* logo blue — primary brand accent */
  --ob-royal-700:    #2E78B0;             /* hover / pressed */
  --ob-royal-900:    #1A4470;             /* deep royal — premium tier surface */

  /* --- ROYAL ALPHA TINTS (for soft fills, hairlines, glows) ----------- */
  --ob-royal-500-04: rgba(93,169,218,0.04);
  --ob-royal-500-08: rgba(93,169,218,0.08);
  --ob-royal-500-16: rgba(93,169,218,0.16);
  --ob-royal-500-32: rgba(93,169,218,0.32);
  --ob-royal-500-45: rgba(93,169,218,0.45);

  /* --- NEUTRALS -------------------------------------------------------- */
  --ob-bone:         #F8FAFC;             /* primary text */
  --ob-bone-soft:    rgba(248,250,252,0.62);
  --ob-bone-mute:    rgba(248,250,252,0.47);  /* 4.64:1 on surface-0 — WCAG AA.
                                                 0.45 measured 4.39:1 and failed
                                                 AA for normal text; this is the
                                                 smallest bump that clears it. */
  --ob-line:         rgba(255,255,255,0.10);
  --ob-line-soft:    rgba(255,255,255,0.07);

  /* --- STATE (only colors outside the royal scale) -------------------- */
  --ob-warn:         #FACC15;             /* warnings, sparing */
  --ob-negative:     #E76A6A;             /* losses */
  --ob-positive:     #2DD4A8;             /* wins, +units, +ROI */

  /* --- ACCENT RULE ------------------------------------------------------
     Four accents, four jobs. Anything outside this list is a bug, not a
     choice — the MLB product row shipped blue + gold + purple side by side,
     which is what "three accents" always looks like.
       royal   -> interactive and brand (links, CTAs, selected states)
       positive-> a good outcome (wins, +units, +ROI, model-ahead)
       negative-> a bad outcome (losses, -units, drains)
       warn    -> premium/tier marks and genuine warnings, used sparingly
     Purple has no job. Gold is retired except semantic rank tiers
     (golf ELITE, NHL goalie tier-elite, arena S-tier, oracle wallet tiers). */
  --ob-accent-interactive: var(--ob-royal-500);
  --ob-accent-positive:    var(--ob-positive);
  --ob-accent-negative:    var(--ob-negative);
  --ob-accent-premium:     var(--ob-warn);

  /* --- RADII (only 4 allowed) ----------------------------------------- */
  --ob-r-xs:         4px;                 /* direction C: anything pressed or boxed */
  --ob-r-sm:         8px;
  --ob-r-md:         16px;
  --ob-r-pill:       999px;

  /* --- SHADOWS (only 2 allowed) --------------------------------------- */
  --ob-shadow-rest:  0 4px 16px rgba(0,0,0,0.18);
  --ob-shadow-hover: 0 12px 30px rgba(0,0,0,0.34);

  /* --- MOTION (animation budget — 3 max per page in v2) -------------- */
  --ob-ease:         cubic-bezier(0.2, 0.8, 0.2, 1);
  --ob-dur-fast:     0.18s;
  --ob-dur-base:     0.28s;
  --ob-dur-slow:     0.6s;
}

/* Tabular numerics — apply globally to anything that uses the mono stack
   so percentages, units, and odds line up in tables without per-site
   font-feature-settings declarations. */
html:has(.ob-design-v2-flag) [class*="-num"],
html:has(.ob-design-v2-flag) .ob-num,
html:has(.ob-design-v2-flag) code,
html:has(.ob-design-v2-flag) kbd,
html:has(.ob-design-v2-flag) samp {
  font-family: var(--ob-font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* =============================================================================
   v2 Phase 1 — Display typography
   -----------------------------------------------------------------------------
   Replace DM Serif Display + linear-gradient text fills with solid Fraunces in
   --ob-bone. Kill italic emphasis on hero <em>. Keep optical-sizing dialed up
   at hero scale, dialed back at card scale. !important is required because the
   v1 rules use it themselves and the inline-style hero (app.py:2220) has
   specificity 1000.
   ============================================================================= */

/* Inline-style hero wordmark (app.py:2220). Needs `class="ob-hero-mark"` added
   to the <h1>. Adding the class is harmless under v1 (no v1 rules consume it). */
html:has(.ob-design-v2-flag) .ob-hero-mark {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 144, "wght" 600 !important;
  font-style: normal !important;
  font-weight: 600 !important;
  letter-spacing: -0.035em !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
  color: var(--ob-bone) !important;
}

/* Olympus hub hero — section title + (now-disabled) italic emphasis */
html:has(.ob-design-v2-flag) .oh-hero-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 120, "wght" 550 !important;
  font-style: normal !important;
  letter-spacing: -0.03em !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .oh-hero-title em {
  color: var(--ob-bone) !important;
  font-style: normal !important;
}

/* Primary CTA, featured card, hub card name — calmer optical-size at card scale */
html:has(.ob-design-v2-flag) .oh-primary-cta-title,
html:has(.ob-design-v2-flag) .oh-featured-title,
html:has(.ob-design-v2-flag) .oh-card-name {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 32, "wght" 550 !important;
  font-style: normal !important;
  letter-spacing: -0.015em !important;
  color: var(--ob-bone) !important;
}

/* Premium bet card hero (components/premium_bet_card.py:48-55) — gradient kill */
html:has(.ob-design-v2-flag) .premium-hero h1 {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 120, "wght" 600 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.03em !important;
}

/* Premium hero secondary title class (app.py:2996) — also gradient-clipped */
html:has(.ob-design-v2-flag) .hero-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 120, "wght" 600 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.03em !important;
}

/* Athena callout (premium_bet_card.py:545-568) — currently italic serif tag.
   v2 keeps it serif (it's a quote-like callout), but drops italic and uses
   the deep royal as the accent instead of gold. */
html:has(.ob-design-v2-flag) .ob-athena-tag {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 14, "wght" 700 !important;
  color: var(--ob-royal-300) !important;
  background: var(--ob-royal-500-16) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
}
html:has(.ob-design-v2-flag) .ob-athena-headline {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 32, "wght" 500 !important;
  font-style: normal !important;
  color: var(--ob-bone) !important;
}

/* =============================================================================
   v2 Phase 2 — Body type (Inter) + numerics (JetBrains Mono, tabular figures)
   -----------------------------------------------------------------------------
   Body text everywhere becomes Inter via a cascade root on html:has(.ob-design-v2-flag)
   and explicit overrides for the few sites that hard-code Plus Jakarta Sans
   inline or in v1 rules. Numeric values (edges, units, prob %, prices) are
   targeted by their existing class hooks (.ob-pick-edge, .ob-pick-units,
   .ob-pick-prob-label) plus a generic .ob-num class for new uses.
   ============================================================================= */

/* Cascade root — every text node under v2 inherits Inter unless explicitly
   overridden (display headlines stay Fraunces, numerics stay mono). */
html:has(.ob-design-v2-flag),
html:has(.ob-design-v2-flag) .stApp,
html:has(.ob-design-v2-flag) .stApp * {
  font-family: var(--ob-font-body);
}

/* Display headlines (set in Phase 1) keep their Fraunces — the wildcard above
   would override them, so re-assert. Use :where() so the existing Phase 1
   declarations win on specificity ties. */
html:has(.ob-design-v2-flag) .ob-hero-mark,
html:has(.ob-design-v2-flag) .oh-hero-title,
html:has(.ob-design-v2-flag) .oh-hero-title em,
html:has(.ob-design-v2-flag) .oh-primary-cta-title,
html:has(.ob-design-v2-flag) .oh-featured-title,
html:has(.ob-design-v2-flag) .oh-card-name,
html:has(.ob-design-v2-flag) .premium-hero h1,
html:has(.ob-design-v2-flag) .hero-title,
html:has(.ob-design-v2-flag) .ob-athena-tag,
html:has(.ob-design-v2-flag) .ob-athena-headline {
  font-family: var(--ob-font-display) !important;
}

/* Sites that hard-code Plus Jakarta Sans — beat them with !important */
html:has(.ob-design-v2-flag) .olympus-hub-root,
html:has(.ob-design-v2-flag) .olympus-hub-root *,
html:has(.ob-design-v2-flag) .premium-page,
html:has(.ob-design-v2-flag) .premium-page * {
  font-family: var(--ob-font-body) !important;
}

/* Hero subtitle <p> at app.py:2222 has Plus Jakarta Sans inline */
html:has(.ob-design-v2-flag) .ob-hero-mark + div p,
html:has(.ob-design-v2-flag) .ob-hero-mark ~ p {
  font-family: var(--ob-font-body) !important;
}

/* --- Numerics — JetBrains Mono with tabular figures --------------------- */

html:has(.ob-design-v2-flag) .ob-pick-edge,
html:has(.ob-design-v2-flag) .ob-pick-units,
html:has(.ob-design-v2-flag) .ob-pick-prob-label,
html:has(.ob-design-v2-flag) .ob-pick-prob,
html:has(.ob-design-v2-flag) .ob-num,
html:has(.ob-design-v2-flag) .stat-num,
html:has(.ob-design-v2-flag) .num,
html:has(.ob-design-v2-flag) [data-num] {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1, "ss01" 1 !important;
  letter-spacing: -0.01em !important;
}

/* Proof-strip chips on home — the <strong> inside chip pills is always a
   numeric value (counts, "10K", "33K+"). app.py:2261-2267. */
html:has(.ob-design-v2-flag) .ob-section-1 strong,
html:has(.ob-design-v2-flag) .ob-pillar-card strong {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
  letter-spacing: -0.005em !important;
}

/* Inter — load slightly tighter optical for body, looser for body-large */
html:has(.ob-design-v2-flag) body,
html:has(.ob-design-v2-flag) p,
html:has(.ob-design-v2-flag) li,
html:has(.ob-design-v2-flag) span,
html:has(.ob-design-v2-flag) div {
  font-feature-settings: "cv11" 1, "ss01" 1, "ss03" 1;  /* Inter alternates */
}

/* =============================================================================
   v2 Phase 3 — Royal palette (gold killed, mint killed)
   -----------------------------------------------------------------------------
   Every gold rgba(212,175,55,*) / #D4AF37 / #F5D77B and every mint #2dd4a8 /
   #6ee7c7 / rgba(45,212,168,*) gets reassigned to the royal scale. Premium
   tier becomes deep royal #1A4470 with brighter --ob-royal-500 hairlines.
   Edge-positive values render in --ob-royal-500 (brand consistency).
   ============================================================================= */

/* --- Pick cards: edge color, units chip, stripe accent ----------------- */
html:has(.ob-design-v2-flag) .ob-pick-edge {
  color: var(--ob-royal-500) !important;
}
html:has(.ob-design-v2-flag) .ob-pick-units {
  color: var(--ob-royal-300) !important;
  border-color: var(--ob-royal-500-32) !important;
  background: var(--ob-royal-500-08) !important;
}
html:has(.ob-design-v2-flag) .ob-pick-card:hover {
  border-color: var(--ob-royal-500-32) !important;
  box-shadow: var(--ob-shadow-hover),
              0 0 0 1px var(--ob-royal-500-08) !important;
}

/* --- Hero badge: gold pill → royal pill -------------------------------- */
html:has(.ob-design-v2-flag) .ob-hero-mark + div span[style*="rgba(212,175,55"],
html:has(.ob-design-v2-flag) [style*="background: linear-gradient(135deg, rgba(212,175,55"],
html:has(.ob-design-v2-flag) [style*="rgba(212,175,55,0.12)"] {
  background: linear-gradient(135deg, var(--ob-royal-500-16), var(--ob-royal-500-08)) !important;
  border-color: var(--ob-royal-500-32) !important;
  color: var(--ob-royal-300) !important;
  box-shadow: 0 2px 12px var(--ob-royal-500-08) !important;
}

/* --- Olympus hub eyebrow + section labels: gold gradient → royal ------ */
html:has(.ob-design-v2-flag) .oh-hero-eyebrow {
  color: var(--ob-royal-500) !important;
  border-bottom-color: var(--ob-royal-500-45) !important;
}
html:has(.ob-design-v2-flag) .oh-section-label::before,
html:has(.ob-design-v2-flag) .oh-section-label::after {
  background: linear-gradient(90deg, transparent, var(--ob-royal-500-32), transparent) !important;
}
html:has(.ob-design-v2-flag) .oh-hub-label::before,
html:has(.ob-design-v2-flag) .oh-hub-label::after {
  background: linear-gradient(90deg, transparent, var(--ob-royal-500-32), transparent) !important;
}

/* --- Primary CTA: gold border + top stripe → royal --------------------- */
html:has(.ob-design-v2-flag) .oh-primary-cta {
  border-color: var(--ob-royal-500-45) !important;
  background: linear-gradient(135deg, var(--ob-surface-0) 0%, var(--ob-ink) 70%, var(--ob-surface-0) 100%) !important;
}
html:has(.ob-design-v2-flag) .oh-primary-cta::before {
  background: linear-gradient(90deg, var(--ob-royal-700) 0%, var(--ob-royal-500) 50%, var(--ob-royal-700) 100%) !important;
}
html:has(.ob-design-v2-flag) .oh-primary-cta:hover {
  border-color: var(--ob-royal-500) !important;
  box-shadow: var(--ob-shadow-hover), 0 0 0 1px var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .oh-primary-cta-eyebrow {
  color: var(--ob-royal-500) !important;
}
html:has(.ob-design-v2-flag) .oh-primary-cta-arrow {
  color: var(--ob-royal-500) !important;
}

/* --- Quicklinks: gold hover + gold variant → royal -------------------- */
html:has(.ob-design-v2-flag) .oh-quicklink:hover {
  background: var(--ob-royal-500-08) !important;
  border-color: var(--ob-royal-500-45) !important;
  color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .oh-quicklink.gold {
  background: linear-gradient(135deg, var(--ob-royal-500-16), var(--ob-royal-500-08)) !important;
  border-color: var(--ob-royal-500-45) !important;
  color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .oh-quicklink.gold:hover {
  background: linear-gradient(135deg, var(--ob-royal-500-32), var(--ob-royal-500-16)) !important;
  border-color: var(--ob-royal-500) !important;
}

/* --- Featured card: gold border + side stripe → royal ----------------- */
html:has(.ob-design-v2-flag) .oh-featured {
  border-color: var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .oh-featured::before {
  background: linear-gradient(180deg, var(--ob-royal-300), var(--ob-royal-500)) !important;
}
html:has(.ob-design-v2-flag) .oh-featured:hover {
  border-color: var(--ob-royal-500) !important;
  box-shadow: var(--ob-shadow-hover), 0 0 0 1px var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .oh-featured-eyebrow {
  color: var(--ob-royal-500) !important;
}
html:has(.ob-design-v2-flag) .oh-featured-arrow {
  color: var(--ob-royal-500) !important;
}

/* --- Hub cards: peak (gold) + in-season (mint) → royal scale ---------- */
html:has(.ob-design-v2-flag) .oh-card:hover {
  border-color: var(--ob-royal-500-45) !important;
  box-shadow: var(--ob-shadow-hover), 0 0 0 1px var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .oh-card:hover::before {
  background: linear-gradient(90deg, transparent, var(--ob-royal-500), transparent) !important;
}

/* peak = currently in playoffs/spotlight → DEEP royal (heraldic, premium) */
html:has(.ob-design-v2-flag) .oh-card.peak {
  border-color: var(--ob-royal-500-45) !important;
  background: linear-gradient(135deg, var(--ob-royal-900) 0%, var(--ob-surface-0) 100%) !important;
  box-shadow: var(--ob-shadow-rest), inset 0 1px 0 var(--ob-royal-500-16) !important;
}
html:has(.ob-design-v2-flag) .oh-card.peak::before {
  background: linear-gradient(90deg, var(--ob-royal-300), var(--ob-royal-500), var(--ob-royal-300)) !important;
}
html:has(.ob-design-v2-flag) .oh-card.peak:hover {
  border-color: var(--ob-royal-500) !important;
  box-shadow: var(--ob-shadow-hover),
              0 0 0 1px var(--ob-royal-500-45),
              inset 0 1px 0 var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .oh-card.peak .oh-card-cta {
  color: var(--ob-royal-300) !important;
}

/* in-season = active regular season → mid royal */
html:has(.ob-design-v2-flag) .oh-card.in-season {
  border-color: var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .oh-card.in-season::before {
  background: linear-gradient(90deg, transparent, var(--ob-royal-500), transparent) !important;
}

/* --- Hub card status pills (peak / in-season / preseason / offseason) -- */
html:has(.ob-design-v2-flag) .oh-card-status.peak {
  background: var(--ob-royal-500-32) !important;
  color: var(--ob-bone) !important;
  border-color: var(--ob-royal-500) !important;
}
html:has(.ob-design-v2-flag) .oh-card-status.in-season {
  background: var(--ob-royal-500-16) !important;
  color: var(--ob-royal-300) !important;
  border-color: var(--ob-royal-500-45) !important;
}
html:has(.ob-design-v2-flag) .oh-card-status.preseason {
  background: rgba(255,255,255,0.06) !important;
  color: var(--ob-bone-soft) !important;
  border-color: var(--ob-line) !important;
}

/* --- Premium teaser: gold border + pulse-gold animation → deep royal -- */
html:has(.ob-design-v2-flag) .ob-section-4 > div {
  background: linear-gradient(135deg, var(--ob-royal-900) 0%, var(--ob-surface-0) 100%) !important;
  border-color: var(--ob-royal-500-45) !important;
  animation: none !important;  /* kill the gold pulse */
}
html:has(.ob-design-v2-flag) .ob-section-4 > div > div:first-child {
  background: linear-gradient(90deg, transparent, var(--ob-royal-500), transparent) !important;
}
html:has(.ob-design-v2-flag) .ob-section-4 [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) .ob-section-4 [style*="color:#F5D77B"] {
  color: var(--ob-bone) !important;
}

/* --- Pillar cards: "follow" gold variant → royal --------------------- */
html:has(.ob-design-v2-flag) .ob-pillar-card.follow {
  border-color: var(--ob-royal-500-32) !important;
  background: linear-gradient(135deg, var(--ob-royal-500-04) 0%, var(--ob-surface-1) 100%) !important;
}
html:has(.ob-design-v2-flag) .ob-pillar-card.follow .ob-pillar-title {
  color: var(--ob-royal-300) !important;
}

/* --- Hero proof-strip chips: gold strong → royal numerics ------------- */
html:has(.ob-design-v2-flag) .ob-section-1 strong[style*="rgba(212,175,55"],
html:has(.ob-design-v2-flag) .ob-section-1 strong[style*="rgba(245,215,123"] {
  color: var(--ob-royal-300) !important;
}

/* --- Marquee gold pill strong → royal --------------------------------- */
html:has(.ob-design-v2-flag) .ob-marq-pill strong {
  color: var(--ob-royal-300) !important;
}

/* --- Hero ambient: gold particles → royal particles ------------------- */
html:has(.ob-design-v2-flag) .ob-particle:not(.white) {
  background: var(--ob-royal-500) !important;
  box-shadow: 0 0 6px var(--ob-royal-500-45) !important;
}

/* --- Hero distribution curve gradient stops → royal ------------------- */
html:has(.ob-design-v2-flag) #ob-curve-grad stop[stop-color*="rgba(212,175,55"],
html:has(.ob-design-v2-flag) #ob-curve-grad stop[stop-color*="rgba(245,215,123"] {
  stop-color: var(--ob-royal-500) !important;
}

/* --- Premium pricing line gold strong → royal ------------------------- */
html:has(.ob-design-v2-flag) .ob-section-4 strong {
  color: var(--ob-royal-300) !important;
}

/* =============================================================================
   v2 Phase 4 — Hero atmosphere reduction
   -----------------------------------------------------------------------------
   Restless multi-layer hero atmosphere (14 particles + radial glow + marquee
   + pulse-gold + drifting mesh = 8 simultaneous animations) reduces to:
     - Distribution curve (kept — signature element, product-specific)
     - Mesh background (kept, dimmed and slowed)
     - Scroll-reveal fades (kept)
   Killed:
     - 14 particle spans (display:none — HTML stays for easy revert)
     - Radial glow blob behind hero
     - Bottom marquee (counter-scrolling pill rows)
     - Pulse-gold animation on premium teaser (already killed in Phase 3)
   ============================================================================= */

/* Kill all particles (14 spans inside .ob-hero-atmos) */
html:has(.ob-design-v2-flag) .ob-particle {
  display: none !important;
  animation: none !important;
}

/* Kill the radial glow blob — it's the absolutely-positioned div with
   `radial-gradient(ellipse, rgba(30,58,138,0.14)...)` immediately following
   .ob-hero-atmos. Targets the inline-style div without disturbing the
   hero text container.

   Selector: any div with that specific gradient signature inside the hero. */
html:has(.ob-design-v2-flag) [style*="radial-gradient(ellipse, rgba(30,58,138,0.14)"] {
  display: none !important;
}

/* Kill the bottom marquee entirely */
html:has(.ob-design-v2-flag) .ob-marquee {
  display: none !important;
}

/* Dim and slow the ambient mesh (keep one ambient layer, calmer) */
html:has(.ob-design-v2-flag) .ob-bg-mesh {
  opacity: 0.55 !important;
  animation-duration: 120s !important;
  /* Soften the gold radial gradient stop in the mesh — replace gold with
     deep royal so the ambient depth matches the brand. */
  background:
    radial-gradient(ellipse 58% 40% at 18% 12%, rgba(30,58,138,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 48% 34% at 82% 20%, rgba(93,169,218,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 55% 40% at 50% 92%, rgba(91,140,255,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 36% 28% at 88% 78%, rgba(93,169,218,0.05) 0%, transparent 55%) !important;
}

/* Reduce hero distribution curve gradient stops to royal scale */
html:has(.ob-design-v2-flag) .ob-dist-curve path {
  stroke: var(--ob-royal-500) !important;
  opacity: 0.4 !important;
}

/* Hero atmos container itself stays but with no children visible */
html:has(.ob-design-v2-flag) .ob-hero-atmos {
  /* let dist-curve through; particles already hidden */
  contain: layout paint;
}

/* =============================================================================
   v2 Phase 5 — Hero live Monte Carlo histogram
   -----------------------------------------------------------------------------
   Real distribution from today's NBA sim cache (10K samples → 48 bins).
   Inline SVG, ~3KB DOM, zero JS. Animation: bars fade up left-to-right on
   first paint, ~1.0s total. Respects prefers-reduced-motion.
   v1 keeps the decorative curve. v2 with no data also keeps the curve.
   ============================================================================= */

/* v1 default: hide the histogram entirely (the section wrapper too) */
.ob-hist-section,
.ob-hist-wrap {
  display: none;
}

/* v2: show histogram as a dedicated section in normal flow, with breathing
   room above and below. NO absolute positioning — never overlaps text. */
html:has(.ob-design-v2-flag) .ob-hist-section {
  display: block;
  max-width: 520px;
  margin: 0.5rem auto 1.75rem;
  padding: 0 1rem;
  pointer-events: none;
}
html:has(.ob-design-v2-flag) .ob-hist-wrap {
  display: block;
  width: 100%;
}
html:has(.ob-design-v2-flag) .ob-hist {
  display: block;
  width: 100%;
  height: 64px;          /* shorter — supporting visual, not centerpiece */
  opacity: 0.78;
}

/* Soft horizontal baseline gradient — subtle grounding line under bars */
.ob-hist-baseline {
  opacity: 0.6;
}

/* Median line — vertical, dotted, brand royal. Real model median, not decorative. */
.ob-hist-median {
  stroke: var(--ob-royal-300, #93C2E6);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0;
  animation: ob-hist-median-in 0.5s var(--ob-ease, cubic-bezier(0.2,0.8,0.2,1)) 0.85s both;
}
@keyframes ob-hist-median-in {
  from { opacity: 0; transform: scaleY(0.6); }
  to   { opacity: 0.78; transform: scaleY(1); }
}

/* Bar fade-up — staggered via per-bar inline --ob-hist-delay (16ms per index).
   Subtle vertical scale + opacity. Total run ~1s for 48 bars. */
@keyframes ob-hist-grow {
  0%   { transform: scaleY(0);    opacity: 0; }
  60%  { transform: scaleY(1.04); opacity: 1; }
  100% { transform: scaleY(1);    opacity: 1; }
}
.ob-hist-bar {
  transform-origin: bottom center;
  transform-box: fill-box;
  animation: ob-hist-grow 0.55s var(--ob-ease, cubic-bezier(0.2, 0.8, 0.2, 1)) both;
  animation-delay: var(--ob-hist-delay, 0ms);
}

/* Modal/peak bar — slow ambient pulse implies the engine is "still running".
   Single animation, runs after entrance completes (1.2s delay). */
@keyframes ob-hist-peak-pulse {
  0%, 100% { opacity: 1;   filter: brightness(1); }
  50%      { opacity: 0.92; filter: brightness(1.18); }
}
.ob-hist-bar.ob-hist-peak {
  animation:
    ob-hist-grow 0.55s var(--ob-ease) both,
    ob-hist-peak-pulse 4.5s ease-in-out 1.2s infinite;
}

/* Histogram attribution label — sits below bars in the same wrapper.
   JetBrains Mono on the sample count, Inter on the matchup. */
.ob-hist-label {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;            /* long matchups wrap centered instead of overflowing left */
  gap: 0.2rem 0.45rem;
  margin-top: 6px;
  padding: 0 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
  opacity: 0;
  animation: ob-hist-label-in 0.6s var(--ob-ease) 1.05s both;
}
@keyframes ob-hist-label-in {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 0.85; transform: translateY(0); }
}
.ob-hist-label-num {
  font-family: var(--ob-font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ob-royal-300);
  letter-spacing: 0;
}
.ob-hist-label-sep {
  color: rgba(255,255,255,0.47);
}
.ob-hist-label-text {
  font-family: var(--ob-font-body);
  font-weight: 500;
  color: rgba(248,250,252,0.55);
}

@media (prefers-reduced-motion: reduce) {
  .ob-hist-bar,
  .ob-hist-bar.ob-hist-peak,
  .ob-hist-median,
  .ob-hist-label { animation: none !important; opacity: 1 !important; transform: none !important; }
}

@media (max-width: 520px) {
  html:has(.ob-design-v2-flag) .ob-hist { height: 70px; }
  .ob-hist-label { font-size: 0.6875rem; }
}

/* =============================================================================
   v2 Phase 9 — Streamlit primitive overrides (SITE-WIDE)
   -----------------------------------------------------------------------------
   Generic v2 styling for every Streamlit primitive that appears on every
   page: buttons, metrics, expanders, tabs, dataframes, inputs, alerts,
   progress, forms. By targeting Streamlit's stable data-testid selectors
   (with legacy attribute fallbacks), every non-home page picks up v2
   styling without touching its file.
   ============================================================================= */

/* --- BUTTONS ----------------------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-primary"],
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-primaryFormSubmit"],
html:has(.ob-design-v2-flag) button[kind="primary"],
html:has(.ob-design-v2-flag) button[kind="primaryFormSubmit"] {
  font-family: var(--ob-font-body) !important;
  font-weight: 600 !important;
  letter-spacing: -0.005em !important;
  border-radius: var(--ob-r-sm) !important;
  background: linear-gradient(135deg, var(--ob-royal-700) 0%, var(--ob-royal-500) 100%) !important;
  border: 1px solid var(--ob-royal-500) !important;
  color: var(--ob-bone) !important;
  box-shadow: var(--ob-shadow-rest), inset 0 1px 0 rgba(255,255,255,0.08) !important;
  transition: transform var(--ob-dur-fast) var(--ob-ease),
              box-shadow var(--ob-dur-fast) var(--ob-ease),
              background var(--ob-dur-fast) var(--ob-ease) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-primary"]:hover,
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-primaryFormSubmit"]:hover,
html:has(.ob-design-v2-flag) button[kind="primary"]:hover,
html:has(.ob-design-v2-flag) button[kind="primaryFormSubmit"]:hover {
  transform: translateY(-1px) !important;
  background: linear-gradient(135deg, var(--ob-royal-500) 0%, var(--ob-royal-300) 100%) !important;
  box-shadow: var(--ob-shadow-hover), 0 0 0 1px var(--ob-royal-500-32) !important;
}

html:has(.ob-design-v2-flag) [data-testid="stBaseButton-secondary"],
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-secondaryFormSubmit"],
html:has(.ob-design-v2-flag) button[kind="secondary"],
html:has(.ob-design-v2-flag) button[kind="secondaryFormSubmit"] {
  font-family: var(--ob-font-body) !important;
  font-weight: 600 !important;
  letter-spacing: -0.005em !important;
  border-radius: var(--ob-r-sm) !important;
  background: var(--ob-surface-1) !important;
  border: 1px solid var(--ob-line) !important;
  color: var(--ob-bone) !important;
  transition: all var(--ob-dur-fast) var(--ob-ease) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-secondary"]:hover,
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-secondaryFormSubmit"]:hover,
html:has(.ob-design-v2-flag) button[kind="secondary"]:hover,
html:has(.ob-design-v2-flag) button[kind="secondaryFormSubmit"]:hover {
  background: var(--ob-royal-500-08) !important;
  border-color: var(--ob-royal-500-45) !important;
  color: var(--ob-royal-300) !important;
}

/* --- METRICS (st.metric) ----------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stMetric"] {
  background: var(--ob-surface-1) !important;
  border: 1px solid var(--ob-line-soft) !important;
  border-radius: var(--ob-r-sm) !important;
  padding: 1rem 1.25rem !important;
}
html:has(.ob-design-v2-flag) [data-testid="stMetricValue"] {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1, "ss01" 1 !important;
  font-weight: 500 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.01em !important;
}
@media (max-width: 768px) {
  html:has(.ob-design-v2-flag) [data-testid="stMetric"] {
    padding: var(--ob-space-2) var(--ob-space-3) !important;
  }
}
html:has(.ob-design-v2-flag) [data-testid="stMetricLabel"] {
  font-family: var(--ob-font-body) !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--ob-bone-mute) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stMetricDelta"] {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-weight: 500 !important;
}
/* delta positive — royal blue (brand consistent, not green) */
html:has(.ob-design-v2-flag) [data-testid="stMetricDelta"] svg[data-testid="stMetricDeltaIcon-Up"] ~ div,
html:has(.ob-design-v2-flag) [data-testid="stMetricDelta"][data-direction="up"] {
  color: var(--ob-royal-300) !important;
}

/* --- EXPANDERS --------------------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stExpander"] {
  border: 1px solid var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
  background: var(--ob-surface-1) !important;
  overflow: hidden !important;
}
html:has(.ob-design-v2-flag) [data-testid="stExpander"] summary,
html:has(.ob-design-v2-flag) [data-testid="stExpander"] details > div:first-child {
  font-family: var(--ob-font-body) !important;
  font-weight: 600 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.005em !important;
}
html:has(.ob-design-v2-flag) [data-testid="stExpander"]:hover {
  border-color: var(--ob-royal-500-32) !important;
}

/* --- TABS -------------------------------------------------------------- */
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab-list"] {
  border-bottom: 1px solid var(--ob-line) !important;
  gap: 0.25rem !important;
}
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"],
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"] *,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"] p,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"] div,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"] span {
  font-family: var(--ob-font-body) !important;
  font-weight: 600 !important;
  letter-spacing: -0.005em !important;
  color: var(--ob-bone-soft) !important;  /* ~62% opacity — readable on dark */
}
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"] {
  border-radius: var(--ob-r-sm) var(--ob-r-sm) 0 0 !important;
  transition: color var(--ob-dur-fast) var(--ob-ease),
              background var(--ob-dur-fast) var(--ob-ease) !important;
}
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"]:hover,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"]:hover *,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"]:hover p,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"]:hover div,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"]:hover span {
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"]:hover {
  background: var(--ob-royal-500-04) !important;
}
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"][aria-selected="true"],
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"][aria-selected="true"] *,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"][aria-selected="true"] p,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"][aria-selected="true"] div,
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"][aria-selected="true"] span {
  color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab"][aria-selected="true"] {
  border-bottom-color: var(--ob-royal-500) !important;
}
html:has(.ob-design-v2-flag) .stTabs [data-baseweb="tab-highlight"] {
  background: var(--ob-royal-500) !important;
}

/* --- TABS: BULLETPROOF FALLBACK SELECTORS ----------------------------
   Streamlit 1.49 may use any of these patterns for tab text rendering.
   We hit ALL of them so no DOM variation can leave a tab invisible. */
html:has(.ob-design-v2-flag) .stTabs button[role="tab"],
html:has(.ob-design-v2-flag) .stTabs button[role="tab"] *,
html:has(.ob-design-v2-flag) .stTabs button,
html:has(.ob-design-v2-flag) .stTabs button *,
html:has(.ob-design-v2-flag) [role="tablist"] button,
html:has(.ob-design-v2-flag) [role="tablist"] button *,
html:has(.ob-design-v2-flag) [role="tab"],
html:has(.ob-design-v2-flag) [role="tab"] *,
html:has(.ob-design-v2-flag) [role="tab"] p,
html:has(.ob-design-v2-flag) [role="tab"] div,
html:has(.ob-design-v2-flag) [role="tab"] span {
  color: var(--ob-bone-soft) !important;
  font-family: var(--ob-font-body) !important;
  font-weight: 600 !important;
}
html:has(.ob-design-v2-flag) .stTabs button[role="tab"]:hover,
html:has(.ob-design-v2-flag) .stTabs button[role="tab"]:hover *,
html:has(.ob-design-v2-flag) .stTabs button:hover,
html:has(.ob-design-v2-flag) .stTabs button:hover *,
html:has(.ob-design-v2-flag) [role="tab"]:hover,
html:has(.ob-design-v2-flag) [role="tab"]:hover * {
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .stTabs button[aria-selected="true"],
html:has(.ob-design-v2-flag) .stTabs button[aria-selected="true"] *,
html:has(.ob-design-v2-flag) [role="tab"][aria-selected="true"],
html:has(.ob-design-v2-flag) [role="tab"][aria-selected="true"] *,
html:has(.ob-design-v2-flag) [role="tab"][aria-selected="true"] p,
html:has(.ob-design-v2-flag) [role="tab"][aria-selected="true"] div,
html:has(.ob-design-v2-flag) [role="tab"][aria-selected="true"] span {
  color: var(--ob-royal-300) !important;
}

/* =============================================================================
   CRITICAL: UNCONDITIONAL TAB VISIBILITY FIX
   -----------------------------------------------------------------------------
   Tab labels must ALWAYS be visible regardless of v1/v2 state. This rule is
   intentionally NOT scoped under the v2 flag. It uses `html body` prefix for
   maximum specificity (beats any Streamlit emotion-css inline class) plus
   `!important` to defeat inline styles that may set color via React's
   theme system. Targets every selector pattern Streamlit might use.
   ============================================================================= */

html body .stTabs button[role="tab"]:not([aria-selected="true"]),
html body .stTabs button[role="tab"]:not([aria-selected="true"]) p,
html body .stTabs button[role="tab"]:not([aria-selected="true"]) div,
html body .stTabs button[role="tab"]:not([aria-selected="true"]) span,
html body .stTabs [data-baseweb="tab"]:not([aria-selected="true"]),
html body .stTabs [data-baseweb="tab"]:not([aria-selected="true"]) p,
html body .stTabs [data-baseweb="tab"]:not([aria-selected="true"]) div,
html body .stTabs [data-baseweb="tab"]:not([aria-selected="true"]) span,
html body [role="tablist"] button:not([aria-selected="true"]),
html body [role="tablist"] button:not([aria-selected="true"]) p,
html body [role="tablist"] button:not([aria-selected="true"]) div,
html body [role="tablist"] button:not([aria-selected="true"]) span,
html body [role="tab"]:not([aria-selected="true"]),
html body [role="tab"]:not([aria-selected="true"]) p,
html body [role="tab"]:not([aria-selected="true"]) div,
html body [role="tab"]:not([aria-selected="true"]) span {
  color: rgba(248, 250, 252, 0.78) !important;
  opacity: 1 !important;
}

html body .stTabs button[role="tab"][aria-selected="true"],
html body .stTabs button[role="tab"][aria-selected="true"] p,
html body .stTabs button[role="tab"][aria-selected="true"] div,
html body .stTabs button[role="tab"][aria-selected="true"] span,
html body .stTabs [data-baseweb="tab"][aria-selected="true"],
html body .stTabs [data-baseweb="tab"][aria-selected="true"] p,
html body .stTabs [data-baseweb="tab"][aria-selected="true"] div,
html body .stTabs [data-baseweb="tab"][aria-selected="true"] span,
html body [role="tablist"] button[aria-selected="true"],
html body [role="tablist"] button[aria-selected="true"] p,
html body [role="tablist"] button[aria-selected="true"] div,
html body [role="tablist"] button[aria-selected="true"] span,
html body [role="tab"][aria-selected="true"],
html body [role="tab"][aria-selected="true"] p,
html body [role="tab"][aria-selected="true"] div,
html body [role="tab"][aria-selected="true"] span {
  color: #5DA9DA !important;     /* royal-500, brand blue */
  opacity: 1 !important;
}

html body .stTabs button[role="tab"]:hover:not([aria-selected="true"]),
html body .stTabs button[role="tab"]:hover:not([aria-selected="true"]) p,
html body .stTabs button[role="tab"]:hover:not([aria-selected="true"]) div,
html body .stTabs button[role="tab"]:hover:not([aria-selected="true"]) span,
html body .stTabs [data-baseweb="tab"]:hover:not([aria-selected="true"]),
html body .stTabs [data-baseweb="tab"]:hover:not([aria-selected="true"]) p,
html body .stTabs [data-baseweb="tab"]:hover:not([aria-selected="true"]) div,
html body .stTabs [data-baseweb="tab"]:hover:not([aria-selected="true"]) span {
  color: #F8FAFC !important;     /* full bone on hover */
  opacity: 1 !important;
}

/* --- DATAFRAMES + TABLES ----------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stDataFrame"],
html:has(.ob-design-v2-flag) [data-testid="stTable"] {
  font-family: var(--ob-font-body) !important;
  border-radius: var(--ob-r-sm) !important;
  overflow: hidden !important;
}
html:has(.ob-design-v2-flag) [data-testid="stDataFrame"] [data-testid="stDataFrameResizable"] {
  font-family: var(--ob-font-body) !important;
}
/* Numeric cells in tables — best-effort target via column type or class */
html:has(.ob-design-v2-flag) [data-testid="stDataFrame"] [class*="numeric"],
html:has(.ob-design-v2-flag) [data-testid="stTable"] [class*="numeric"],
html:has(.ob-design-v2-flag) [data-testid="stTable"] td[class*="num"] {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- CODE BLOCKS ------------------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stCodeBlock"],
html:has(.ob-design-v2-flag) pre code {
  font-family: var(--ob-font-mono) !important;
  border-radius: var(--ob-r-sm) !important;
  background: var(--ob-surface-1) !important;
  border: 1px solid var(--ob-line-soft) !important;
}

/* --- INPUTS ------------------------------------------------------------ */
html:has(.ob-design-v2-flag) [data-testid="stTextInput"] input,
html:has(.ob-design-v2-flag) [data-testid="stTextArea"] textarea,
html:has(.ob-design-v2-flag) [data-testid="stNumberInput"] input,
html:has(.ob-design-v2-flag) [data-testid="stDateInput"] input,
html:has(.ob-design-v2-flag) [data-testid="stTimeInput"] input,
html:has(.ob-design-v2-flag) [data-baseweb="input"] input,
html:has(.ob-design-v2-flag) [data-baseweb="textarea"] textarea {
  font-family: var(--ob-font-body) !important;
  border-radius: var(--ob-r-sm) !important;
  background: var(--ob-surface-1) !important;
  border: 1px solid var(--ob-line) !important;
  color: var(--ob-bone) !important;
  transition: border-color var(--ob-dur-fast) var(--ob-ease),
              box-shadow var(--ob-dur-fast) var(--ob-ease) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stTextInput"] input:focus,
html:has(.ob-design-v2-flag) [data-testid="stTextArea"] textarea:focus,
html:has(.ob-design-v2-flag) [data-testid="stNumberInput"] input:focus,
html:has(.ob-design-v2-flag) [data-baseweb="input"] input:focus,
html:has(.ob-design-v2-flag) [data-baseweb="textarea"] textarea:focus {
  border-color: var(--ob-royal-500) !important;
  box-shadow: 0 0 0 3px var(--ob-royal-500-16) !important;
  outline: none !important;
}
/* Numeric inputs in monospace */
html:has(.ob-design-v2-flag) [data-testid="stNumberInput"] input {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- SELECTBOX / MULTISELECT ------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stSelectbox"] [data-baseweb="select"] > div,
html:has(.ob-design-v2-flag) [data-testid="stMultiSelect"] [data-baseweb="select"] > div {
  font-family: var(--ob-font-body) !important;
  border-radius: var(--ob-r-sm) !important;
  background: var(--ob-surface-1) !important;
  border: 1px solid var(--ob-line) !important;
  transition: border-color var(--ob-dur-fast) var(--ob-ease) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stSelectbox"] [data-baseweb="select"] > div:hover,
html:has(.ob-design-v2-flag) [data-testid="stMultiSelect"] [data-baseweb="select"] > div:hover {
  border-color: var(--ob-royal-500-45) !important;
}

/* Selectbox/Multiselect TEXT visibility — Streamlit wraps the displayed
   value and dropdown options in child elements with default light-theme
   color (dark gray). On our dark surfaces this renders dark-on-dark.
   Force readable color on the value text + dropdown options. */
html:has(.ob-design-v2-flag) [data-testid="stSelectbox"] [data-baseweb="select"] *,
html:has(.ob-design-v2-flag) [data-testid="stSelectbox"] [data-baseweb="select"] div,
html:has(.ob-design-v2-flag) [data-testid="stSelectbox"] [data-baseweb="select"] span,
html:has(.ob-design-v2-flag) [data-testid="stMultiSelect"] [data-baseweb="select"] *,
html:has(.ob-design-v2-flag) [data-testid="stMultiSelect"] [data-baseweb="select"] div,
html:has(.ob-design-v2-flag) [data-testid="stMultiSelect"] [data-baseweb="select"] span {
  color: var(--ob-bone) !important;
}
/* Multiselect chips (selected values shown as pills) */
html:has(.ob-design-v2-flag) [data-testid="stMultiSelect"] [data-baseweb="tag"] {
  background: var(--ob-royal-500-16) !important;
  border: 1px solid var(--ob-royal-500-32) !important;
  color: var(--ob-bone) !important;
}
/* Dropdown menu (popover that appears when clicked) — global, hits
   selectbox AND multiselect AND any baseweb dropdown */
html:has(.ob-design-v2-flag) [data-baseweb="popover"] [role="listbox"],
html:has(.ob-design-v2-flag) [data-baseweb="menu"] {
  background: var(--ob-surface-0) !important;
  border: 1px solid var(--ob-line) !important;
  border-radius: var(--ob-r-md) !important;
  box-shadow: var(--ob-shadow-hover) !important;
}
html:has(.ob-design-v2-flag) [data-baseweb="popover"] [role="option"],
html:has(.ob-design-v2-flag) [data-baseweb="menu"] li,
html:has(.ob-design-v2-flag) [data-baseweb="menu"] [role="option"] {
  color: var(--ob-bone-soft) !important;
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) [data-baseweb="popover"] [role="option"]:hover,
html:has(.ob-design-v2-flag) [data-baseweb="popover"] [role="option"][aria-selected="true"],
html:has(.ob-design-v2-flag) [data-baseweb="menu"] [role="option"]:hover,
html:has(.ob-design-v2-flag) [data-baseweb="menu"] [aria-selected="true"] {
  color: var(--ob-bone) !important;
  background: var(--ob-royal-500-08) !important;
}

/* --- RADIO / CHECKBOX / TOGGLE ----------------------------------------- */
/* Every radio option is a 44px tap target (was 34px at 390px). */
html:has(.ob-design-v2-flag) [data-testid="stRadio"] label[data-baseweb="radio"] {
  min-height: 44px;
  align-items: center;
}
html:has(.ob-design-v2-flag) [data-testid="stRadio"] label,
html:has(.ob-design-v2-flag) [data-testid="stRadio"] label *,
html:has(.ob-design-v2-flag) [data-testid="stRadio"] label p,
html:has(.ob-design-v2-flag) [data-testid="stRadio"] label div,
html:has(.ob-design-v2-flag) [data-testid="stCheckbox"] label,
html:has(.ob-design-v2-flag) [data-testid="stCheckbox"] label *,
html:has(.ob-design-v2-flag) [data-testid="stCheckbox"] label p,
html:has(.ob-design-v2-flag) [data-testid="stCheckbox"] label div,
html:has(.ob-design-v2-flag) [data-testid="stToggle"] label,
html:has(.ob-design-v2-flag) [data-testid="stToggle"] label *,
html:has(.ob-design-v2-flag) [data-testid="stToggle"] label p,
html:has(.ob-design-v2-flag) [data-testid="stToggle"] label div {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}

/* Segmented control (st.segmented_control) — same dark-on-dark issue */
html:has(.ob-design-v2-flag) [data-testid="stSegmentedControl"] *,
html:has(.ob-design-v2-flag) .stSegmentedControl * {
  color: var(--ob-bone-soft) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stSegmentedControl"] [aria-pressed="true"],
html:has(.ob-design-v2-flag) [data-testid="stSegmentedControl"] [aria-pressed="true"] *,
html:has(.ob-design-v2-flag) [data-testid="stSegmentedControl"] [data-checked="true"],
html:has(.ob-design-v2-flag) [data-testid="stSegmentedControl"] [data-checked="true"] * {
  color: var(--ob-bone) !important;
  background: var(--ob-royal-500-16) !important;
}

/* Pills (st.pills) — selected pill text */
html:has(.ob-design-v2-flag) [data-testid="stPills"] *,
html:has(.ob-design-v2-flag) .stPills * {
  color: var(--ob-bone-soft) !important;
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stPills"] [aria-pressed="true"],
html:has(.ob-design-v2-flag) [data-testid="stPills"] [aria-pressed="true"] * {
  color: var(--ob-bone) !important;
  background: var(--ob-royal-500-16) !important;
}

/* Generic safety net: any baseweb tab-like control with aria-selected
   that we may have missed (Streamlit uses baseweb for several wigets) */
html:has(.ob-design-v2-flag) [data-baseweb="radio"] *,
html:has(.ob-design-v2-flag) [data-baseweb="checkbox"] * {
  color: var(--ob-bone-soft) !important;
}
/* stCheckbox is NOT listed: st.toggle shares that testid and in Streamlit 1.54
   the div after the input is the LABEL TEXT, so this painted every switched-on
   toggle label as a solid royal block (1.07:1). Streamlit paints the track and
   box itself. */
html:has(.ob-design-v2-flag) [data-testid="stRadio"] input:checked + div {
  background: var(--ob-royal-500) !important;
  border-color: var(--ob-royal-500) !important;
}

/* --- SLIDER ------------------------------------------------------------
   Streamlit 1.54:  [baseweb=slider] > div (row) > div (4px rail)
                      > div (thumb layer) > [role=slider] > [stSliderThumbValue]
                      + div (Streamlit's selected-range gradient)
   The row is not a field: no box, so a thumb at either end has nothing to
   overhang. The rail takes the neutral fill and Streamlit's gradient paints
   the selected span royal over it — painting the rail royal hid the range.
   The thumb draws a 24px dot; its ::before is the 44px touch area. */
html:has(.ob-design-v2-flag) [data-testid="stSlider"] [data-baseweb="slider"] [role="slider"] {
  background: var(--ob-royal-500) !important;
  border: 2px solid var(--ob-bone) !important;
  box-shadow: var(--ob-shadow-rest) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stSlider"] [data-baseweb="slider"] [role="slider"]::before {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
html:has(.ob-design-v2-flag) [data-testid="stSlider"] [data-baseweb="slider"] > div:first-child {
  background: transparent !important;
  border: none !important;
}
html:has(.ob-design-v2-flag) [data-testid="stSlider"] [data-baseweb="slider"] > div:first-child > div:first-child {
  background: var(--ob-surface-2) !important;
  border-radius: var(--ob-r-sm) !important;
}
/* Streamlit insets the thumb layer by half ITS thumb (0.375rem); ours is 24px,
   so the ends of the range would hang 6px past the rail. */
html:has(.ob-design-v2-flag) [data-testid="stSlider"] [data-baseweb="slider"] div:has(> [role="slider"]) {
  left: 12px !important;
  right: 12px !important;
}
html:has(.ob-design-v2-flag) [data-testid="stSliderThumbValue"],
html:has(.ob-design-v2-flag) [data-testid="stSliderThumbValue"] * {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums;
}
html:has(.ob-design-v2-flag) [data-testid="stSliderTickBar"] [data-testid="stMarkdownContainer"] {
  background: transparent !important;
}

/* --- ALERTS ------------------------------------------------------------
   Streamlit 1.49 nests these three deep:
     [stAlert] > [stAlertContainer] > [stAlertContent<Kind>] > [stMarkdownContainer]
   and it puts the KIND on the inner content element, NOT on [stAlert]. So the
   old `[data-testid="stAlert"][kind="success"]` selectors matched nothing:
   the outer kept `border-style: solid` with no colour — currentColor, i.e. bone
   — drawing a stark WHITE outline, while [stAlertContainer] (which nothing
   targeted) kept Streamlit's default green fill. That box-inside-a-box was on
   every league page.

   Fix: the outer is a pure wrapper, [stAlertContainer] is the visual panel, and
   the kind is read off the child with :has(). */
html:has(.ob-design-v2-flag) [data-testid="stAlert"] {
  font-family: var(--ob-font-body) !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
html:has(.ob-design-v2-flag) [data-testid="stAlertContainer"] {
  border-radius: var(--ob-r-md) !important;
  border: 1px solid var(--ob-line) !important;
  background: var(--ob-surface-1) !important;
  color: var(--ob-bone) !important;
  padding: var(--ob-space-3) var(--ob-space-4) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stAlertContainer"]:has([data-testid="stAlertContentSuccess"]) {
  background: rgba(45,212,168,0.08) !important;
  border-color: rgba(45,212,168,0.32) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stAlertContainer"]:has([data-testid="stAlertContentInfo"]) {
  background: var(--ob-royal-500-08) !important;
  border-color: var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stAlertContainer"]:has([data-testid="stAlertContentWarning"]) {
  background: rgba(250,204,21,0.08) !important;
  border-color: rgba(250,204,21,0.32) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stAlertContainer"]:has([data-testid="stAlertContentError"]) {
  background: rgba(231,106,106,0.08) !important;
  border-color: rgba(231,106,106,0.32) !important;
}
/* The content elements themselves carry Streamlit's own fill; neutralise it so
   only the container above paints. */
html:has(.ob-design-v2-flag) [data-testid^="stAlertContent"] {
  background: transparent !important;
  color: var(--ob-bone) !important;
}

/* --- PROGRESS BAR ------------------------------------------------------ */
html:has(.ob-design-v2-flag) [data-testid="stProgress"] > div > div {
  background: var(--ob-surface-2) !important;
  border-radius: var(--ob-r-pill) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stProgress"] > div > div > div {
  background: linear-gradient(90deg, var(--ob-royal-700), var(--ob-royal-500)) !important;
  border-radius: var(--ob-r-pill) !important;
}

/* --- SPINNER ----------------------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stSpinner"] > div {
  border-top-color: var(--ob-royal-500) !important;
}

/* --- FORMS ------------------------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stForm"] {
  border-radius: var(--ob-r-md) !important;
  border: 1px solid var(--ob-line-soft) !important;
  background: var(--ob-surface-1) !important;
  padding: 1.5rem !important;
}

/* --- DIVIDERS + CAPTIONS ---------------------------------------------- */
html:has(.ob-design-v2-flag) [data-testid="stDivider"] hr {
  background: var(--ob-line) !important;
  border: 0 !important;
}
html:has(.ob-design-v2-flag) [data-testid="stCaption"],
html:has(.ob-design-v2-flag) small,
html:has(.ob-design-v2-flag) .caption {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.005em !important;
}

/* --- LINKS ------------------------------------------------------------- */
/* Bare links only. `:not([class])` must be on BOTH selectors — without it the
   markdown-container rule's !important swallows every classed CTA anchor
   rendered through st.markdown (they all live inside stMarkdownContainer),
   which forced .obh-cta's near-black label to royal-300 on a royal-500 fill:
   1.36:1 contrast. Classed anchors own their color. */
html:has(.ob-design-v2-flag) a:not([class]),
html:has(.ob-design-v2-flag) [data-testid="stMarkdownContainer"] a:not([class]) {
  color: var(--ob-royal-300) !important;
  text-decoration-color: var(--ob-royal-500-32) !important;
  text-underline-offset: 2px !important;
  transition: color var(--ob-dur-fast) var(--ob-ease) !important;
}
html:has(.ob-design-v2-flag) a:not([class]):hover,
html:has(.ob-design-v2-flag) [data-testid="stMarkdownContainer"] a:not([class]):hover {
  color: var(--ob-royal-500) !important;
  text-decoration-color: var(--ob-royal-500) !important;
}

/* =============================================================================
   v2 Phase 10 — Persistent UI: nav bar + footer
   -----------------------------------------------------------------------------
   NOTE (2026-07, Phase 10b): the nav STRUCTURE is no longer frozen — the
   2026-07 nav UX wave intentionally added the mobile sports sheet, league
   chip rail, click-open menus and progress bar (see Phase 10b below and
   components/nav_bar.py). The list below is the baseline geometry that
   still holds unless nav_bar.py says otherwise:
     - Heights: 44px desktop nav, 56px mobile tabs (+ safe-area-inset)
     - Breakpoint at 768px (desktop ↔ mobile switch)
     - Tap target full-column behavior on mobile
     - :hover + :focus-within dual triggers on dropdowns (touch fallback)
     - env(safe-area-inset-bottom) for notched phones
     - z-index 99999/100000 stack
     - The `:has()` overflow-visible workarounds at nav_bar.py:187-190
     - Backdrop-filter blur values
     - The 4→2→1 column footer breakpoints (768px, 380px)

   CHANGED under v2:
     - Gold accents → royal blue scale
     - Plus Jakarta Sans → Inter (body) / Fraunces opsz:14 (brand wordmark only)
     - Token radii on dropdown panels + sport items
     - Token color for hairlines and hover states
   ============================================================================= */

/* --- DESKTOP TOP NAV — color, type, hairlines (NO layout changes) ----- */
html:has(.ob-design-v2-flag) .ob-topnav {
  font-family: var(--ob-font-body) !important;
  /* Glass tint shifts subtly toward royal undertone — same opacity */
  background: rgba(11, 15, 28, 0.95) !important;
  border-bottom-color: var(--ob-line-soft) !important;
}
html:has(.ob-design-v2-flag) .ob-topnav a,
html:has(.ob-design-v2-flag) .ob-topnav .ob-dd-trigger {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
  border-radius: var(--ob-r-sm) !important;
}
html:has(.ob-design-v2-flag) .ob-topnav a:hover,
html:has(.ob-design-v2-flag) .ob-topnav .ob-dd-trigger:hover {
  color: var(--ob-bone) !important;
  background: var(--ob-royal-500-08) !important;
}
html:has(.ob-design-v2-flag) .ob-topnav a.ob-active,
html:has(.ob-design-v2-flag) .ob-topnav .ob-dd-trigger.ob-active {
  color: var(--ob-royal-300) !important;
}

/* Brand wordmark in nav — Fraunces at opsz=14 (small-text optical) */
html:has(.ob-design-v2-flag) .ob-topnav .ob-brand {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 14, "wght" 600 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.015em !important;
  font-size: 0.92rem !important;
}

/* Sport dropdown panel — token radii, royal-tinted hairline */
html:has(.ob-design-v2-flag) .ob-dd-panel {
  background: rgba(11, 15, 28, 0.98) !important;
  border-color: var(--ob-line) !important;
  border-radius: var(--ob-r-md) !important;
  box-shadow: var(--ob-shadow-hover), 0 0 0 1px var(--ob-royal-500-08) !important;
}
html:has(.ob-design-v2-flag) .ob-sg {
  font-family: var(--ob-font-body) !important;
  border-radius: var(--ob-r-sm) !important;
  color: var(--ob-bone-soft) !important;
}
html:has(.ob-design-v2-flag) .ob-sg:hover {
  background: var(--ob-royal-500-08) !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .ob-sg.ob-sg-active {
  color: var(--ob-royal-300) !important;
  background: var(--ob-royal-500-08) !important;
}

/* --- MOBILE BOTTOM TABS — color, type, hairlines (NO layout/height) -- */
html:has(.ob-design-v2-flag) .ob-tabs {
  font-family: var(--ob-font-body) !important;
  background: rgba(11, 15, 28, 0.97) !important;
  border-top-color: var(--ob-line) !important;
}
html:has(.ob-design-v2-flag) .ob-tabs a {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}
html:has(.ob-design-v2-flag) .ob-tabs a:active {
  color: var(--ob-bone-soft) !important;
}
html:has(.ob-design-v2-flag) .ob-tabs a.ob-active {
  color: var(--ob-royal-300) !important;
}

/* --- PRODUCT NAV (standalone product pages: Daily Props etc.) --------- */
html:has(.ob-design-v2-flag) .ob-pnav {
  font-family: var(--ob-font-body) !important;
  background: rgba(11, 15, 28, 0.95) !important;
  border-bottom-color: var(--ob-line-soft) !important;
}
html:has(.ob-design-v2-flag) .ob-pnav a {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
  border-radius: var(--ob-r-sm) !important;
}
html:has(.ob-design-v2-flag) .ob-pnav a:hover {
  color: var(--ob-bone) !important;
  background: var(--ob-royal-500-08) !important;
}
html:has(.ob-design-v2-flag) .ob-pnav a.ob-pa {
  color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .ob-pnav .ob-pbrand {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 14, "wght" 600 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.015em !important;
  font-size: 0.92rem !important;
}
html:has(.ob-design-v2-flag) .ob-ptabs {
  font-family: var(--ob-font-body) !important;
  background: rgba(11, 15, 28, 0.97) !important;
  border-top-color: var(--ob-line) !important;
}
html:has(.ob-design-v2-flag) .ob-ptabs a {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}
html:has(.ob-design-v2-flag) .ob-ptabs a.ob-pa {
  color: var(--ob-royal-300) !important;
}

/* --- FOOTER (preserve grid breakpoints; swap colors + fonts) ---------- */
html:has(.ob-design-v2-flag) .ob-footer-grid {
  font-family: var(--ob-font-body) !important;
}
/* Footer brand "Olympus Bets" — gold → bone */
html:has(.ob-design-v2-flag) .ob-footer-grid > div:first-child > div:first-child {
  color: var(--ob-bone) !important;
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 16, "wght" 600 !important;
}
/* Footer body links default state */
html:has(.ob-design-v2-flag) .ob-footer-link {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}
html:has(.ob-design-v2-flag) .ob-footer-link:hover {
  color: var(--ob-bone-soft) !important;
}
/* Footer "Subscribe" link — was gold, now royal */
html:has(.ob-design-v2-flag) .ob-footer-link-gold {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .ob-footer-link-gold:hover {
  color: var(--ob-royal-500) !important;
}
/* Footer top hairline + bottom legal disclaimer container */
html:has(.ob-design-v2-flag) [class*="ob-footer"] {
  font-family: var(--ob-font-body) !important;
}

/* =============================================================================
   v2 Phase 10b (2026-07) — Nav UX wave: sports sheet, chip rail, click menus,
   progress bar. Recolors the new nav_bar.py elements to the royal system;
   geometry/behavior stays in nav_bar.py.
   ============================================================================= */
html:has(.ob-design-v2-flag) .ob-tabs label {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}
html:has(.ob-design-v2-flag) .ob-tabs label:active {
  color: var(--ob-bone-soft) !important;
}
html:has(.ob-design-v2-flag) .ob-tabs label.ob-active {
  color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .ob-sheet {
  font-family: var(--ob-font-body) !important;
  background: rgba(11, 15, 28, 0.98) !important;
  border-top-color: var(--ob-line) !important;
}
html:has(.ob-design-v2-flag) .ob-sheet-title { color: var(--ob-bone) !important; }
html:has(.ob-design-v2-flag) .ob-sheet-hub { color: var(--ob-royal-300) !important; }
html:has(.ob-design-v2-flag) .ob-sheet-tile {
  color: var(--ob-bone-soft) !important;
  border-radius: var(--ob-r-sm) !important;
  border-color: var(--ob-line-soft) !important;
  background: var(--ob-royal-500-04) !important;
}
html:has(.ob-design-v2-flag) .ob-sheet-tile:active {
  background: var(--ob-royal-500-16) !important;
}
html:has(.ob-design-v2-flag) .ob-sheet-tile.ob-tile-active {
  color: var(--ob-royal-300) !important;
  border-color: var(--ob-royal-500) !important;
  background: var(--ob-royal-500-08) !important;
}
html:has(.ob-design-v2-flag) .ob-sheet-link {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
  border-radius: var(--ob-r-pill) !important;
}
html:has(.ob-design-v2-flag) .ob-chip-rail {
  font-family: var(--ob-font-body) !important;
  background: rgba(11, 15, 28, 0.95) !important;
  border-bottom-color: var(--ob-line-soft) !important;
}
html:has(.ob-design-v2-flag) .ob-chip {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-pill) !important;
}
html:has(.ob-design-v2-flag) .ob-chip:hover {
  color: var(--ob-bone) !important;
  background: var(--ob-royal-500-08) !important;
}
html:has(.ob-design-v2-flag) .ob-chip.ob-chip-active {
  color: var(--ob-royal-50) !important;
  background: var(--ob-royal-500-25) !important;
  border-color: var(--ob-royal-500) !important;
}
html:has(.ob-design-v2-flag) .ob-dd-head {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}
html:has(.ob-design-v2-flag) .ob-nav-progress {
  background: linear-gradient(90deg, var(--ob-royal-700), var(--ob-royal-300)) !important;
}

/* =============================================================================
   v2 Phase 11 — Premium bet card (REVENUE-CRITICAL)
   -----------------------------------------------------------------------------
   Member-facing surface. Override premium_bet_card.py PREMIUM_CSS classes
   under v2 only. Preserve:
     - All layout (padding, gaps, grids, flex)
     - All transitions/durations
     - SEMANTIC colors (Sharp Money green, Red Zone red, Pace yellow, etc.)
       — those are data meanings, not brand. Stay green/red/yellow.
   Change:
     - Brand gold accents → royal scale
     - "Edge positive" mint highlight on pick line → royal (consistent with
       Phase 3: royal IS our edge-positive color)
     - Plus Jakarta Sans → Inter (body), Fraunces (matchup/league pills)
     - Token radii on the pick card and chips
   ============================================================================= */

/* Hero subtitle + timestamp */
html:has(.ob-design-v2-flag) .premium-hero-subtitle {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}
html:has(.ob-design-v2-flag) .premium-hero-timestamp {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  color: var(--ob-bone-mute) !important;
  letter-spacing: 0.01em !important;
}

/* Summary strip + chips */
html:has(.ob-design-v2-flag) .premium-summary-strip {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .summary-chip {
  font-family: var(--ob-font-body) !important;
  background: var(--ob-surface-2) !important;
  border-color: var(--ob-line) !important;
  border-radius: var(--ob-r-pill) !important;
  color: var(--ob-bone-soft) !important;
}
html:has(.ob-design-v2-flag) .summary-chip-value {
  color: var(--ob-royal-300) !important;
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- PREMIUM PICK CARD ------------------------------------------------- */
html:has(.ob-design-v2-flag) .premium-pick-card {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line) !important;
  border-radius: var(--ob-r-md) !important;
  box-shadow: var(--ob-shadow-rest), inset 0 1px 1px rgba(255,255,255,0.04) !important;
}
html:has(.ob-design-v2-flag) .premium-pick-card:hover {
  border-color: var(--ob-royal-500-32) !important;
  box-shadow: var(--ob-shadow-hover), inset 0 1px 1px rgba(255,255,255,0.06) !important;
}
/* Featured card — was gold-bordered, now deep royal */
html:has(.ob-design-v2-flag) .premium-pick-card.featured {
  border-color: var(--ob-royal-500-45) !important;
  background: linear-gradient(135deg, var(--ob-royal-900) 0%, var(--ob-surface-0) 100%) !important;
  box-shadow: var(--ob-shadow-hover),
              0 0 0 1px var(--ob-royal-500-32),
              inset 0 1px 1px var(--ob-royal-500-16) !important;
}
html:has(.ob-design-v2-flag) .premium-pick-card.featured:hover {
  box-shadow: var(--ob-shadow-hover),
              0 0 0 1px var(--ob-royal-500-45),
              inset 0 1px 1px var(--ob-royal-500-32) !important;
}

/* Pick card header + meta */
html:has(.ob-design-v2-flag) .pick-card-header {
  border-bottom-color: var(--ob-line-soft) !important;
}
html:has(.ob-design-v2-flag) .pick-league-pill {
  font-family: var(--ob-font-body) !important;
  background: var(--ob-royal-500-16) !important;
  border-color: var(--ob-royal-500-45) !important;
  border-radius: var(--ob-r-sm) !important;
  color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .pick-matchup {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 24, "wght" 550 !important;
  letter-spacing: -0.015em !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .pick-time {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}
/* Fresh-date pill stays GREEN — it's a semantic "newly resolved" indicator */
/* No override on .pick-date-fresh — keep its green palette */

/* Pick odds (the big number) — JBM mono, royal */
html:has(.ob-design-v2-flag) .pick-odds {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1, "ss01" 1 !important;
  font-weight: 600 !important;
  color: var(--ob-royal-300) !important;
  letter-spacing: -0.025em !important;
}
html:has(.ob-design-v2-flag) .pick-market-label {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}

/* Pick line (the bet itself) — was mint green highlight, now royal.
   This is the visual "this is the bet" callout; v2's edge-positive is royal. */
html:has(.ob-design-v2-flag) .pick-line-container {
  background: linear-gradient(135deg, var(--ob-royal-500-16), var(--ob-royal-500-08)) !important;
  border-top-color: var(--ob-royal-500-32) !important;
  border-bottom-color: var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .pick-line-text {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 28, "wght" 600 !important;
  font-weight: 600 !important;
  color: var(--ob-royal-300) !important;
  letter-spacing: -0.015em !important;
}

/* Quant chips */
html:has(.ob-design-v2-flag) .quant-chip {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-sm) !important;
}
html:has(.ob-design-v2-flag) .quant-chip-label {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}
/* Any quant chip value is numeric — JBM mono */
html:has(.ob-design-v2-flag) .quant-chip > div:not(.quant-chip-label),
html:has(.ob-design-v2-flag) .quant-chip-value {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
}

/* --- ATHENA CALLOUT — full royal pass ---------------------------------- */
html:has(.ob-design-v2-flag) .ob-athena-block {
  background: linear-gradient(135deg, var(--ob-royal-500-08), var(--ob-royal-500-04)) !important;
  border-color: var(--ob-royal-500-32) !important;
  border-left: 3px solid var(--ob-royal-500) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .ob-athena-source {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}
html:has(.ob-design-v2-flag) .ob-athena-thesis {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}
html:has(.ob-design-v2-flag) .ob-athena-factors,
html:has(.ob-design-v2-flag) .ob-athena-risks {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}
/* The bold heading inside factors/angle was mint/gold — royal under v2 */
html:has(.ob-design-v2-flag) .ob-athena-factors b,
html:has(.ob-design-v2-flag) .ob-athena-risks b,
html:has(.ob-design-v2-flag) .ob-athena-angle b {
  color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .ob-athena-angle {
  border-top-color: var(--ob-royal-500-32) !important;
}

/* --- EMPTY STATE ------------------------------------------------------- */
html:has(.ob-design-v2-flag) .premium-empty-state {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .empty-state-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 28, "wght" 550 !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .empty-state-text {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}

/* --- INLINE GOLD ATTRIBUTE OVERRIDES ---------------------------------- */
/* Many gold colors are inlined via Python f-string output (lines 822, 832,
   838, 1003, 1060 etc. in premium_bet_card.py). Target the substring
   pattern. Scoped to the premium card region so we don't accidentally
   recolor other gold uses. */
html:has(.ob-design-v2-flag) .premium-pick-card [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .premium-pick-card [style*="color:#D4AF37"],
html:has(.ob-design-v2-flag) .premium-pick-card [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) .premium-pick-card [style*="color:#F5D77B"],
html:has(.ob-design-v2-flag) .premium-summary-strip [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .premium-summary-strip [style*="color:#D4AF37"] {
  color: var(--ob-royal-300) !important;
}
/* Inline gold backgrounds inside premium card */
html:has(.ob-design-v2-flag) .premium-pick-card [style*="rgba(212,175,55"] {
  background-image: none !important;
}

/* =============================================================================
   v2 Phase 12 — Page-level hero standardization
   -----------------------------------------------------------------------------
   Each page has its own hero pattern (.arena-hero, .ret-hero, .bb-hero,
   .bp-hero, .tr-hero-grid, .sub-hero, .guide-title-block, .pv-title etc.).
   Rather than rewriting each page, we write v2 overrides that catch the
   common naming patterns AND specifically-named hero classes found in the
   page survey.
   ============================================================================= */

/* --- GENERIC PATTERNS — class-substring matches ------------------------ */
/* Hero containers — anything ending in "-hero" or containing "-hero " */
html:has(.ob-design-v2-flag) [class$="-hero"],
html:has(.ob-design-v2-flag) [class*="-hero "],
html:has(.ob-design-v2-flag) [class*="-hero-grid"],
html:has(.ob-design-v2-flag) [class*="-hero-block"] {
  font-family: var(--ob-font-body) !important;
}

/* Hero titles — *-title, *-headline */
html:has(.ob-design-v2-flag) [class$="-title"],
html:has(.ob-design-v2-flag) [class*="-title "],
html:has(.ob-design-v2-flag) [class$="-headline"],
html:has(.ob-design-v2-flag) [class*="-headline "] {
  font-family: var(--ob-font-display) !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.02em !important;
  font-style: normal !important;
}

/* Subtitles — generic .subtitle class + named patterns */
html:has(.ob-design-v2-flag) .subtitle,
html:has(.ob-design-v2-flag) [class$="-subtitle"],
html:has(.ob-design-v2-flag) [class*="-subtitle "],
html:has(.ob-design-v2-flag) [class$="-sub"],
html:has(.ob-design-v2-flag) [class*="-sub "] {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
  font-weight: 400 !important;
  letter-spacing: 0.005em !important;
}

/* --- SPECIFIC NAMED HEROES (preserve any unique structural styling) ---- */

/* Arena hero (pages/arena.py) */
html:has(.ob-design-v2-flag) .arena-hero h1,
html:has(.ob-design-v2-flag) .arena-hero .arena-hero-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 96, "wght" 600 !important;
  color: var(--ob-bone) !important;
}

/* Retirement Parlays hero (pages/retirement_parlays.py) */
html:has(.ob-design-v2-flag) .ret-hero {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .ret-hero-accent {
  background: linear-gradient(90deg, transparent, var(--ob-royal-500-32), transparent) !important;
}
html:has(.ob-design-v2-flag) .ret-hero-sub {
  color: var(--ob-bone-soft) !important;
}

/* Sub-hero (pages/todays_best_bets.py probably) */
html:has(.ob-design-v2-flag) .sub-hero,
html:has(.ob-design-v2-flag) .sub-hero-headline,
html:has(.ob-design-v2-flag) .sub-hero-sub {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .sub-hero-headline {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 72, "wght" 600 !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .sub-hero-sub {
  color: var(--ob-bone-soft) !important;
}

/* Track Record hero (pages/track_record.py) */
html:has(.ob-design-v2-flag) .tr-hero-grid {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .tr-section-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 28, "wght" 550 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.015em !important;
}

/* Standalone product titles (Daily Props, Season Bible, Bracket Blueprint).
   These are tracking pixels for marketing pages — already loud uppercase
   wordmarks. Keep that energy but in v2 type. */
html:has(.ob-design-v2-flag) .pv-title,
html:has(.ob-design-v2-flag) .bb-title,
html:has(.ob-design-v2-flag) .bp-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 96, "wght" 600 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.02em !important;
  /* kill any gradient-clip if present */
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
}
html:has(.ob-design-v2-flag) .bb-hero,
html:has(.ob-design-v2-flag) .bp-hero {
  font-family: var(--ob-font-body) !important;
}

/* Guide title block (pages/guides.py) */
html:has(.ob-design-v2-flag) .guide-title-block {
  font-family: var(--ob-font-body) !important;
}

/* Game card titles (.gc-title) */
html:has(.ob-design-v2-flag) .gc-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 22, "wght" 550 !important;
  color: var(--ob-bone) !important;
}

/* Pool / tier list patterns (Arena ladder system) */
html:has(.ob-design-v2-flag) .pool-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 28, "wght" 600 !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .tierlist-subtitle {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}

/* NHL Goalie War Room title block */
html:has(.ob-design-v2-flag) .nhl-goalie-war-room-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 32, "wght" 600 !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .nhl-goalie-war-room-subtitle {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}

/* --- CATCH-ALL: STREAMLIT MARKDOWN H1/H2/H3 ON ANY PAGE --------------- */
/* Pages that just use plain st.markdown('# Title') get Fraunces too. */
html:has(.ob-design-v2-flag) [data-testid="stMarkdownContainer"] h1,
html:has(.ob-design-v2-flag) [data-testid="stMarkdown"] h1 {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 88, "wght" 600 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.025em !important;
}
html:has(.ob-design-v2-flag) [data-testid="stMarkdownContainer"] h2,
html:has(.ob-design-v2-flag) [data-testid="stMarkdown"] h2 {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 36, "wght" 550 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.015em !important;
}
html:has(.ob-design-v2-flag) [data-testid="stMarkdownContainer"] h3,
html:has(.ob-design-v2-flag) [data-testid="stMarkdown"] h3 {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 24, "wght" 550 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.01em !important;
}

/* =============================================================================
   v2 Phase 13 — League hubs Round A: NBA + NHL
   -----------------------------------------------------------------------------
   Most styling in sports/nba.py and sports/nhl.py is inline f-string output,
   not class-based, so we lean on:
     - The few defined classes (.best-bet-card, .game-card, .edge-badge, etc.)
     - Phase 9 (Streamlit primitives) + Phase 12 (h1/h2/h3) which cascade here
     - Inline-style attribute selectors for the most prominent gold patterns
   ============================================================================= */

/* --- NBA hub (sports/nba.py) ------------------------------------------ */
html:has(.ob-design-v2-flag) .today-best-bets,
html:has(.ob-design-v2-flag) .best-bet-card {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .best-bet-card {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
  box-shadow: var(--ob-shadow-rest) !important;
}
html:has(.ob-design-v2-flag) .best-bet-card:hover {
  border-color: var(--ob-royal-500-32) !important;
  box-shadow: var(--ob-shadow-hover) !important;
}

/* --- NHL hub (sports/nhl.py) ------------------------------------------ */
html:has(.ob-design-v2-flag) .today-best-bets-nhl,
html:has(.ob-design-v2-flag) .nhl-header,
html:has(.ob-design-v2-flag) .game-card,
html:has(.ob-design-v2-flag) .bet-card,
html:has(.ob-design-v2-flag) .best-bet-card-nhl,
html:has(.ob-design-v2-flag) .stat-box,
html:has(.ob-design-v2-flag) .edge-badge,
html:has(.ob-design-v2-flag) .nhle {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .nhl-header {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 56, "wght" 600 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.02em !important;
}
html:has(.ob-design-v2-flag) .game-card,
html:has(.ob-design-v2-flag) .bet-card,
html:has(.ob-design-v2-flag) .best-bet-card-nhl {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
  box-shadow: var(--ob-shadow-rest) !important;
}
html:has(.ob-design-v2-flag) .game-card:hover,
html:has(.ob-design-v2-flag) .bet-card:hover,
html:has(.ob-design-v2-flag) .best-bet-card-nhl:hover {
  border-color: var(--ob-royal-500-32) !important;
  box-shadow: var(--ob-shadow-hover) !important;
}
html:has(.ob-design-v2-flag) .stat-box {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-sm) !important;
}
/* Stat-box value (numeric) — JBM mono + tabular */
html:has(.ob-design-v2-flag) .stat-box [class*="value"],
html:has(.ob-design-v2-flag) .stat-box > div:not([class*="label"]) {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}
/* Edge badge — was likely gold/mint, now royal */
html:has(.ob-design-v2-flag) .edge-badge {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  background: var(--ob-royal-500-16) !important;
  border: 1px solid var(--ob-royal-500-45) !important;
  color: var(--ob-royal-300) !important;
  border-radius: var(--ob-r-pill) !important;
}

/* --- INLINE-STYLE GOLD ATTRIBUTE OVERRIDES (NBA + NHL pages) ---------- */
/* Many sites in these files use inline `style="color: #D4AF37"` etc.
   Scope to Streamlit's main container so we don't accidentally hit
   admin/internal pages. */
html:has(.ob-design-v2-flag) .today-best-bets [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .today-best-bets-nhl [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .best-bet-card [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .best-bet-card-nhl [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .bet-card [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .game-card [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .today-best-bets [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) .today-best-bets-nhl [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) .best-bet-card [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) .best-bet-card-nhl [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) .bet-card [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) .game-card [style*="color: #F5D77B"] {
  color: var(--ob-royal-300) !important;
}

/* =============================================================================
   v2 Phase 14+15 — League hubs Round B+C (CBB, MLB, Soccer, NFL, CFB,
                    Tennis, NBA Playoffs, CBB March Madness, plus league
                    premium pages: lol, cs2, golf, soccer)
   -----------------------------------------------------------------------------
   Pattern: write generic catch-all rules that target shared league markup
   conventions (`.best-bet-card-{LEAGUE}`, `.today-best-bets-{LEAGUE}`, etc.)
   plus the specifically-named classes found per file.
   ============================================================================= */

/* --- CBB hub (sports/cbb.py + sports/cbb_march_madness.py) ------------ */
html:has(.ob-design-v2-flag) .today-best-bets-cbb,
html:has(.ob-design-v2-flag) .best-bet-card-cbb {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .best-bet-card-cbb {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
  box-shadow: var(--ob-shadow-rest) !important;
}
html:has(.ob-design-v2-flag) .best-bet-card-cbb:hover {
  border-color: var(--ob-royal-500-32) !important;
  box-shadow: var(--ob-shadow-hover) !important;
}

/* --- CFB hub (sports/cfb.py) ------------------------------------------ */
html:has(.ob-design-v2-flag) .favorite-team,
html:has(.ob-design-v2-flag) .game-card-header,
html:has(.ob-design-v2-flag) .strength-badge,
html:has(.ob-design-v2-flag) .win-probability {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .strength-badge {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  border-radius: var(--ob-r-pill) !important;
  background: var(--ob-royal-500-16) !important;
  color: var(--ob-royal-300) !important;
  border: 1px solid var(--ob-royal-500-45) !important;
}
html:has(.ob-design-v2-flag) .win-probability {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- Generic per-league bet card patterns -----------------------------
   Catches .best-bet-card-{any-suffix} and .today-best-bets-{any-suffix} */
html:has(.ob-design-v2-flag) [class^="best-bet-card-"],
html:has(.ob-design-v2-flag) [class*=" best-bet-card-"],
html:has(.ob-design-v2-flag) [class^="today-best-bets-"],
html:has(.ob-design-v2-flag) [class*=" today-best-bets-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) [class^="best-bet-card-"],
html:has(.ob-design-v2-flag) [class*=" best-bet-card-"] {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) [class^="best-bet-card-"]:hover,
html:has(.ob-design-v2-flag) [class*=" best-bet-card-"]:hover {
  border-color: var(--ob-royal-500-32) !important;
  box-shadow: var(--ob-shadow-hover) !important;
}

/* --- League hero patterns: .{league}-hero, .{league}-header ------------ */
html:has(.ob-design-v2-flag) [class$="-hero"],
html:has(.ob-design-v2-flag) [class*="-hero "],
html:has(.ob-design-v2-flag) [class$="-header"],
html:has(.ob-design-v2-flag) [class*="-header "] {
  font-family: var(--ob-font-body) !important;
}
/* The header/hero TITLE inside is usually the wordmark — Fraunces */
html:has(.ob-design-v2-flag) [class$="-hero"] h1,
html:has(.ob-design-v2-flag) [class*="-hero "] h1,
html:has(.ob-design-v2-flag) [class$="-header"] h1,
html:has(.ob-design-v2-flag) [class*="-header "] h1 {
  font-family: var(--ob-font-display) !important;
  color: var(--ob-bone) !important;
}

/* --- NBA Playoffs tab (sports/nba_playoffs_tab.py — 42 gold refs) ---- */
/* Heavy inline-style file. Catch via attribute selectors scoped to the tab. */
html:has(.ob-design-v2-flag) [class*="playoff"] [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) [class*="playoff"] [style*="color:#D4AF37"],
html:has(.ob-design-v2-flag) [class*="playoff"] [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) [class*="playoff"] [style*="color:#F5D77B"],
html:has(.ob-design-v2-flag) [class*="bracket"] [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) [class*="bracket"] [style*="color:#D4AF37"],
html:has(.ob-design-v2-flag) [class*="bracket"] [style*="color: #F5D77B"] {
  color: var(--ob-royal-300) !important;
}

/* --- Tennis hub (sports/tennis.py — 14 gold refs, no class structure) -- */
/* Tennis renders via inline f-strings. We rely on Phase 9 cascade + Phase 12
   generic h1/h2 + the global tab/button overrides. No specific classes to
   target; safety-net via inline-attribute below. */

/* --- Generic inline-style gold/mint catchall, scoped to Streamlit main */
html:has(.ob-design-v2-flag) .stApp [style*="rgba(212, 175, 55"],
html:has(.ob-design-v2-flag) .stApp [style*="rgba(212,175,55"] {
  /* Don't auto-rewrite the background/border (could break gradient stops);
     just nudge the text color when explicit color rgba present */
}
/* Specific: anything with explicit color: rgba(212,175,55,X) inline */
html:has(.ob-design-v2-flag) [style*="color: rgba(212,175,55"],
html:has(.ob-design-v2-flag) [style*="color:rgba(212,175,55"] {
  color: var(--ob-royal-300) !important;
}

/* --- League premium pages (pages/{league}_premium.py) ----------------- */
/* These pages all share the .premium-pick-card / .premium-hero / .premium-
   summary-strip pattern from premium_bet_card.py — already covered in Phase
   11. They also share the generic page hero patterns from Phase 12. So no
   new rules needed; they pick up v2 automatically. */

/* --- Hub-level container backgrounds ---------------------------------- */
/* Each league file sets a .stApp / .main / .block-container background.
   Phase 9 inputs already targeted .stApp transparent. No additional touch. */

/* =============================================================================
   v2 Phase 16 — Specialty components
   -----------------------------------------------------------------------------
   Oracle preview, MLB BVP simulator, MLB career BVP, MLB cheat sheet, MLB
   slate insights, premium UI helpers, social links, league performance
   header, golf tracker chart, member gate.
   ============================================================================= */

/* --- Oracle preview (components/oracle_preview.py — 22 gold refs) ----- */
html:has(.ob-design-v2-flag) [class^="ora-"],
html:has(.ob-design-v2-flag) [class*=" ora-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .ora-card,
html:has(.ob-design-v2-flag) .ora-body,
html:has(.ob-design-v2-flag) .ora-detail {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .ora-card-fire,
html:has(.ob-design-v2-flag) .ora-card-strong {
  border-color: var(--ob-royal-500-45) !important;
  background: linear-gradient(135deg, var(--ob-royal-900) 0%, var(--ob-surface-0) 100%) !important;
}
html:has(.ob-design-v2-flag) .ora-card-moderate {
  border-color: var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .ora-consensus {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- MLB BVP Simulator (components/mlb_bvp_simulator.py — 29 gold refs) -
   Heavy inline-style file. Catch via attribute selectors. */
html:has(.ob-design-v2-flag) [class*="bvp"] [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) [class*="bvp"] [style*="color:#D4AF37"],
html:has(.ob-design-v2-flag) [class*="bvp"] [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) [class*="bvp"] [style*="color:#F5D77B"] {
  color: var(--ob-royal-300) !important;
}

/* --- MLB Career BVP (components/mlb_career_bvp.py) -------------------- */
html:has(.ob-design-v2-flag) [class^="cbvp-"],
html:has(.ob-design-v2-flag) [class*=" cbvp-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .cbvp-glass {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .cbvp-chip,
html:has(.ob-design-v2-flag) .cbvp-chip-gold {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  background: var(--ob-royal-500-08) !important;
  border: 1px solid var(--ob-royal-500-32) !important;
  color: var(--ob-royal-300) !important;
  border-radius: var(--ob-r-pill) !important;
}
html:has(.ob-design-v2-flag) .cbvp-table,
html:has(.ob-design-v2-flag) .bbe-table {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- MLB Cheat Sheet (components/mlb_cheat_sheet.py) ------------------ */
html:has(.ob-design-v2-flag) [class^="cs-"],
html:has(.ob-design-v2-flag) [class*=" cs-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .cs-game,
html:has(.ob-design-v2-flag) .cs-overview {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .cs-headline {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 28, "wght" 550 !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .cs-cta {
  background: var(--ob-royal-500-08) !important;
  border-color: var(--ob-royal-500-45) !important;
  color: var(--ob-royal-300) !important;
}

/* --- MLB Slate Insights (components/mlb_slate_insights.py) ------------ */
html:has(.ob-design-v2-flag) [class^="si-"],
html:has(.ob-design-v2-flag) [class*=" si-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .si-game-card {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .si-arsenal-grid,
html:has(.ob-design-v2-flag) .si-batter-wrap,
html:has(.ob-design-v2-flag) .si-ivb {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- Premium UI helpers (components/premium_ui.py — 16 gold refs) ---- */
html:has(.ob-design-v2-flag) .premium-callout,
html:has(.ob-design-v2-flag) .premium-locked-card,
html:has(.ob-design-v2-flag) .pick-teaser-blur {
  background: linear-gradient(135deg, var(--ob-royal-900) 0%, var(--ob-surface-0) 100%) !important;
  border-color: var(--ob-royal-500-32) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .premium-badge {
  background: var(--ob-royal-500-16) !important;
  color: var(--ob-royal-300) !important;
  border: 1px solid var(--ob-royal-500-45) !important;
  border-radius: var(--ob-r-pill) !important;
  font-family: var(--ob-font-body) !important;
  font-weight: 600 !important;
}
html:has(.ob-design-v2-flag) .premium-cta-button,
html:has(.ob-design-v2-flag) .premium-callout-button {
  font-family: var(--ob-font-body) !important;
  background: linear-gradient(135deg, var(--ob-royal-700), var(--ob-royal-500)) !important;
  border: 1px solid var(--ob-royal-500) !important;
  color: var(--ob-bone) !important;
  border-radius: var(--ob-r-sm) !important;
  font-weight: 600 !important;
}
html:has(.ob-design-v2-flag) .premium-callout-text {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
}

/* --- Social links (components/social_links.py) ------------------------ */
html:has(.ob-design-v2-flag) [class^="social-"],
html:has(.ob-design-v2-flag) [class*=" social-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .social-link:hover,
html:has(.ob-design-v2-flag) .social-icon-link:hover {
  color: var(--ob-royal-300) !important;
}

/* --- Golf tracker chart (components/golf_tracker_chart.py) ----------- */
html:has(.ob-design-v2-flag) [class^="lt-"],
html:has(.ob-design-v2-flag) [class*=" lt-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .lt-wrap {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .lt-title {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 24, "wght" 550 !important;
  color: var(--ob-bone) !important;
}

/* --- Member gate (components/member_gate.py — 2 gold refs) ----------- */
/* Mostly inline. Catchall via the component-scoped attribute selectors. */
html:has(.ob-design-v2-flag) [class*="member-gate"] [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) [class*="locked"] [style*="color: #D4AF37"] {
  color: var(--ob-royal-300) !important;
}

/* --- League performance header (components/league_performance_header.py) */
/* Renders inline. Picks up Phase 9 cascade. */

/* =============================================================================
   v2 Phase 17 — Content + admin pages
   -----------------------------------------------------------------------------
   Methodology, FAQ, Compare, Guides, Subscribe, Kelly Calculator, Arena,
   Retirement Parlays, Admin Command Center, Tracking, Track Record,
   Members, Today's Best Bets.
   ============================================================================= */

/* --- Methodology / Compare (similar prefix .meth- / .comp-) ----------- */
html:has(.ob-design-v2-flag) [class^="meth-"],
html:has(.ob-design-v2-flag) [class*=" meth-"],
html:has(.ob-design-v2-flag) [class^="comp-"],
html:has(.ob-design-v2-flag) [class*=" comp-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .meth-section,
html:has(.ob-design-v2-flag) .comp-section {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}

/* --- FAQ ---------------------------------------------------------------- */
html:has(.ob-design-v2-flag) .faq-card,
html:has(.ob-design-v2-flag) .faq-cta-card {
  font-family: var(--ob-font-body) !important;
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .faq-cta-card {
  background: linear-gradient(135deg, var(--ob-royal-900) 0%, var(--ob-surface-0) 100%) !important;
  border-color: var(--ob-royal-500-32) !important;
}

/* --- Guides ------------------------------------------------------------- */
html:has(.ob-design-v2-flag) [class^="guide-"],
html:has(.ob-design-v2-flag) [class*=" guide-"],
html:has(.ob-design-v2-flag) .guides-header {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .guide-card,
html:has(.ob-design-v2-flag) .guide-article {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .guide-card:hover {
  border-color: var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .guide-back-link,
html:has(.ob-design-v2-flag) .guide-nav-link {
  color: var(--ob-royal-300) !important;
}

/* --- Subscribe (40 gold refs — biggest overhaul) ---------------------- */
html:has(.ob-design-v2-flag) [class^="sub-"],
html:has(.ob-design-v2-flag) [class*=" sub-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .sub-product-card,
html:has(.ob-design-v2-flag) .sub-pricing-grid {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .sub-product-card:hover {
  border-color: var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .sub-product-meta {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  color: var(--ob-bone-mute) !important;
}

/* --- Kelly Calculator -------------------------------------------------- */
html:has(.ob-design-v2-flag) [class^="kelly-"],
html:has(.ob-design-v2-flag) [class*=" kelly-"],
html:has(.ob-design-v2-flag) [class^="kb-"],
html:has(.ob-design-v2-flag) [class*=" kb-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .kelly-header {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 32, "wght" 600 !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .kelly-result,
html:has(.ob-design-v2-flag) .kelly-breakdown {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .kelly-formula {
  font-family: var(--ob-font-mono) !important;
  background: var(--ob-surface-2) !important;
  border-radius: var(--ob-r-sm) !important;
}
html:has(.ob-design-v2-flag) .kb-item {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- Arena (30 gold refs) ---------------------------------------------- */
html:has(.ob-design-v2-flag) [class^="arena-"],
html:has(.ob-design-v2-flag) [class*=" arena-"],
html:has(.ob-design-v2-flag) [class^="tierlist-"],
html:has(.ob-design-v2-flag) [class*=" tierlist-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .arena-game-card,
html:has(.ob-design-v2-flag) .arena-debate-box {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .arena-game-card:hover {
  border-color: var(--ob-royal-500-32) !important;
}
html:has(.ob-design-v2-flag) .arena-lb-table {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}
html:has(.ob-design-v2-flag) .tierlist-pill,
html:has(.ob-design-v2-flag) .tierlist-letter {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 18, "wght" 600 !important;
}

/* --- Retirement Parlays ----------------------------------------------- */
html:has(.ob-design-v2-flag) [class^="ret-"],
html:has(.ob-design-v2-flag) [class*=" ret-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .ret-parlay-card {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .ret-chip {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  border-radius: var(--ob-r-pill) !important;
}
html:has(.ob-design-v2-flag) .ret-chip-gold {
  background: var(--ob-royal-500-08) !important;
  color: var(--ob-royal-300) !important;
  border: 1px solid var(--ob-royal-500-45) !important;
}
html:has(.ob-design-v2-flag) .ret-chip-blue {
  background: var(--ob-royal-500-16) !important;
  color: var(--ob-royal-300) !important;
}
/* Keep ret-chip-green semantic green (data meaning) */

/* --- Admin Command Center --------------------------------------------- */
html:has(.ob-design-v2-flag) [class^="admin-"],
html:has(.ob-design-v2-flag) [class*=" admin-"],
html:has(.ob-design-v2-flag) .quick-stat,
html:has(.ob-design-v2-flag) .action-btn {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .admin-card {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .quick-stat {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-sm) !important;
}
html:has(.ob-design-v2-flag) .quick-stat-value {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .quick-stat-label {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-mute) !important;
}

/* --- Tracking + Track Record ------------------------------------------ */
html:has(.ob-design-v2-flag) [class^="kpi-"],
html:has(.ob-design-v2-flag) [class*=" kpi-"],
html:has(.ob-design-v2-flag) [class^="tr-"],
html:has(.ob-design-v2-flag) [class*=" tr-"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) .kpi-card {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .kpi-value {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  color: var(--ob-bone) !important;
}
html:has(.ob-design-v2-flag) .kpi-label {
  color: var(--ob-bone-mute) !important;
}
html:has(.ob-design-v2-flag) .tr-conf-stats,
html:has(.ob-design-v2-flag) .tr-league-stats,
html:has(.ob-design-v2-flag) .tr-log-pick,
html:has(.ob-design-v2-flag) .tr-log-ri {
  font-family: var(--ob-font-mono) !important;
  font-variant-numeric: tabular-nums !important;
}
html:has(.ob-design-v2-flag) .tr-combined-bar {
  background: var(--ob-surface-2) !important;
  border-radius: var(--ob-r-pill) !important;
}

/* --- Today's Best Bets (the free picks page) -------------------------- */
html:has(.ob-design-v2-flag) [class^="ob-"],
html:has(.ob-design-v2-flag) [class*=" ob-"] {
  font-family: var(--ob-font-body) !important;
}
/* (The ob-* classes on home are already extensively covered in earlier phases) */
html:has(.ob-design-v2-flag) .ob-premium-teaser {
  background: linear-gradient(135deg, var(--ob-royal-900) 0%, var(--ob-surface-0) 100%) !important;
  border-color: var(--ob-royal-500-32) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) .ob-access-links,
html:has(.ob-design-v2-flag) .ob-access-thesis {
  color: var(--ob-bone-soft) !important;
}
html:has(.ob-design-v2-flag) .ob-refresh-note {
  font-family: var(--ob-font-mono) !important;
  color: var(--ob-bone-mute) !important;
  letter-spacing: 0.01em !important;
}

/* --- Members page ----------------------------------------------------- */
html:has(.ob-design-v2-flag) .member-badge {
  font-family: var(--ob-font-body) !important;
  font-weight: 700 !important;
  background: var(--ob-royal-500-16) !important;
  color: var(--ob-royal-300) !important;
  border: 1px solid var(--ob-royal-500-45) !important;
  border-radius: var(--ob-r-pill) !important;
  letter-spacing: 0.04em !important;
}
html:has(.ob-design-v2-flag) .premium-masked-notice {
  background: var(--ob-surface-1) !important;
  border-color: var(--ob-line) !important;
  border-radius: var(--ob-r-md) !important;
  font-family: var(--ob-font-body) !important;
}

/* =============================================================================
   v2 Phase 18 — Final QA pass + missed-surface catchall
   -----------------------------------------------------------------------------
   434 raw gold/mint inline refs exist across sports/, pages/, and components/.
   Earlier phases covered the named-class sites and many of the highest-value
   inline patterns. This phase is the final SAFETY NET — a global inline-style
   attribute catchall scoped to the Streamlit main container.

   Order: this section comes LAST so it wins all earlier rules where they
   conflict. !important ensures inline styles surrender.
   ============================================================================= */

/* --- Global inline gold-color catchall (TEXT only) --------------------- */
/* Any element with an inline color of gold (#D4AF37 / #F5D77B / rgba 212,175,55)
   inside Streamlit's main app container gets royal-300. Background gradients
   are NOT touched here (they often define stops we shouldn't replace
   wholesale — those have been individually targeted in earlier phases). */
html:has(.ob-design-v2-flag) .stApp [style*="color: #D4AF37"],
html:has(.ob-design-v2-flag) .stApp [style*="color:#D4AF37"],
html:has(.ob-design-v2-flag) .stApp [style*="color: #F5D77B"],
html:has(.ob-design-v2-flag) .stApp [style*="color:#F5D77B"],
html:has(.ob-design-v2-flag) .stApp [style*="color: #E8C866"],
html:has(.ob-design-v2-flag) .stApp [style*="color:#E8C866"] {
  color: var(--ob-royal-300) !important;
}

/* --- Global inline gold border catchall ------------------------------- */
html:has(.ob-design-v2-flag) .stApp [style*="border-color: #D4AF37"],
html:has(.ob-design-v2-flag) .stApp [style*="border-color:#D4AF37"],
html:has(.ob-design-v2-flag) .stApp [style*="border-color: #F5D77B"],
html:has(.ob-design-v2-flag) .stApp [style*="border-color:#F5D77B"] {
  border-color: var(--ob-royal-500-45) !important;
}

/* --- Global inline gold rgba border/text catchall (lower opacities) -- */
html:has(.ob-design-v2-flag) .stApp [style*="color: rgba(212, 175, 55"],
html:has(.ob-design-v2-flag) .stApp [style*="color: rgba(212,175,55"],
html:has(.ob-design-v2-flag) .stApp [style*="color: rgba(245, 215, 123"],
html:has(.ob-design-v2-flag) .stApp [style*="color: rgba(245,215,123"] {
  color: var(--ob-royal-300) !important;
}

/* --- Streamlit base container — royal-tinted page background ---------- */
/* Phase 9 made .stApp transparent on home; ensure other pages also pick up
   the dark surface. Some pages set their own bg via inline style; the
   surface-0 token kicks in only where no override exists. */
html:has(.ob-design-v2-flag) .stApp {
  background-color: var(--ob-surface-0) !important;
}

/* --- Block container max-widths preserved (no layout change) ---------- */
/* Streamlit's .main .block-container has padding/width set per-page in v1.
   We do NOT override those — preserves each page's existing density. */

/* --- Coverage notes (NOT covered by v2; intentional) ------------------ */
/* The following surfaces are intentionally untouched by v2:
     - Stripe Checkout iframe (third-party, can't style)
     - Streamlit's debug overlays (dev-only)
     - PDF export rendering (server-side, not subject to client CSS)
     - Email templates (separate template file)
     - Discord embeds (Discord renders, not us)
   ============================================================================= */

/* =============================================================================
   v2 Phase 7 — League pick-card accents → unified OKLCH scale
   -----------------------------------------------------------------------------
   v1 league accents (app.py:2074-2086) use hex values at varying saturations:
     NBA #FB923C (orange), NHL #38BDF8 (sky), NFL #EF4444 (red), CBB #A78BFA
     (violet), CFB #F97316, Soccer #4ADE80, MLB #F5D77B, Tennis #BEF264, Golf
     #22D3EE, LoL #C084FC, CS2 #60A5FA, WBC #FACC15.
   These chroma-vary so much that the cards feel like they were emoji-color-
   matched. Under v2, normalize to a single OKLCH(0.78 0.15 H) scale where
   only the hue varies. Provides intentional visual coherence; modern browsers
   support oklch() universally as of mid-2026 (Chrome 111+, Safari 15.4+,
   Firefox 113+). Hex fallbacks via Phase 5+ rules already in place for older.
   ============================================================================= */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-NBA    { --lg-accent: oklch(0.78 0.15 60);  } /* orange-amber */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-NHL    { --lg-accent: oklch(0.78 0.15 230); } /* sky */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-NFL    { --lg-accent: oklch(0.74 0.16 25);  } /* red */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-CBB    { --lg-accent: oklch(0.78 0.15 295); } /* violet */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-CFB    { --lg-accent: oklch(0.78 0.15 50);  } /* warm orange */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-Soccer { --lg-accent: oklch(0.78 0.15 145); } /* green */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-MLB    { --lg-accent: oklch(0.78 0.12 90);  } /* warm yellow */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-Tennis { --lg-accent: oklch(0.78 0.15 130); } /* lime */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-Golf   { --lg-accent: oklch(0.78 0.15 195); } /* cyan */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-LoL    { --lg-accent: oklch(0.78 0.15 305); } /* magenta-violet */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-CS2    { --lg-accent: oklch(0.78 0.15 250); } /* cobalt */
html:has(.ob-design-v2-flag) .ob-pick-card.lg-WBC    { --lg-accent: oklch(0.78 0.13 80);  } /* amber */

/* =============================================================================
   v2 Phase 18b — Material Symbols / Material Icons font preservation
   -----------------------------------------------------------------------------
   Bug found in production v2: expander chevron icons (and similar Streamlit-
   rendered Material icons) showed the literal text "keyboard_arrow_right"
   instead of the icon glyph. Cause: Phase 9 set Inter on
   [data-testid="stExpander"] summary, which inherits to the child icon
   <span>, overriding the Material Symbols font that ligature-maps the
   text to the icon character.

   Fix: highest-specificity rules that re-assert the icon font on every
   known Material Symbols / Material Icons / generic icon selector.
   These must come LAST in the file to win the cascade.

   Also re-enables the "liga" font-feature so the text→glyph ligature
   substitution works (some of the JBM/Inter rules earlier in this file
   set tnum/ss01 explicitly which can clobber the default liga).
   ============================================================================= */

[class*="material-symbols"],
[class*="material-icons"],
[data-testid="stExpanderToggleIcon"],
[data-testid="stExpanderIcon"],
[data-testid="stIconMaterial"],
[data-testid*="IconMaterial"],
[data-testid="stIcon"] span,
/* All Streamlit-rendered icons enumerated from streamlit 1.49 sources */
[data-testid="stTooltipIcon"],
[data-testid="stTooltipIcon"] span,
[data-testid="stAlertDynamicIcon"],
[data-testid="stAlertDynamicIcon"] span,
[data-testid="stToastDynamicIcon"],
[data-testid="stToastDynamicIcon"] span,
[data-testid="stTextInputIcon"],
[data-testid="stTextInputIcon"] span,
[data-testid="stNumberInputIcon"],
[data-testid="stNumberInputIcon"] span,
[data-testid="stImageIcon"],
[data-testid="stImageIcon"] span,
[data-testid="stElementToolbarButtonIcon"],
[data-testid="stElementToolbarButtonIcon"] span,
[data-testid="stToolbarActionButtonIcon"],
[data-testid="stToolbarActionButtonIcon"] span,
[data-testid="stStatusWidgetRunningIcon"],
[data-testid="stStatusWidgetRunningIcon"] span,
[data-testid="stHelpIcon"],
[data-testid="stHelpIcon"] span,
[data-testid="stCloseButton"] svg,
[data-testid="stDialogCloseButton"] span,
[data-testid="stFileUploaderIcon"],
[data-testid="stCameraInputIcon"],
[data-testid="stMaterialIcon"],
.material-symbols-outlined,
.material-symbols-rounded,
.material-symbols-sharp,
.material-icons,
.material-icons-outlined,
.material-icons-rounded,
.material-icons-sharp,
i.icon,
span[class*="MuiIcon"] {
  font-family: 'Material Symbols Rounded',
               'Material Symbols Outlined',
               'Material Icons Rounded',
               'Material Icons Outlined',
               'Material Icons' !important;
  font-feature-settings: 'liga' 1 !important;
  font-variation-settings: normal !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-variant-numeric: normal !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: nowrap !important;
  word-wrap: normal !important;
  direction: ltr !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  -webkit-font-feature-settings: 'liga' !important;
  text-rendering: optimizeLegibility !important;
}

/* Belt-and-suspenders: Streamlit sometimes wraps the icon glyph in a
   stEmotionCache-* span that has no semantic class. Target by content
   pattern via :has() — if a <summary> contains a child whose innerText
   is a known Material Symbols name, force the icon font on it. */
[data-testid="stExpander"] summary > span:not([data-testid]):last-child,
[data-testid="stExpander"] details > summary > svg ~ span,
[data-testid="stExpander"] [data-baseweb] > span[aria-label] {
  font-family: 'Material Symbols Rounded',
               'Material Symbols Outlined',
               'Material Icons' !important;
  font-feature-settings: 'liga' 1 !important;
}

/* =============================================================================
   v2 Polish — Missed Streamlit primitives caught in /review
   -----------------------------------------------------------------------------
   stHeading + stTitle + stSubheader (st.title()/st.header()/st.subheader()
   render under different testids than st.markdown('# X')); stWidgetLabel
   (input widget labels); stPopover (1.30+ popover component); stChatMessage
   / stChatInput (chat features); stDataEditor (editable dataframe); chart
   container minimal treatment.
   ============================================================================= */

/* st.title() / st.header() / st.subheader() — Streamlit-rendered headings */
html:has(.ob-design-v2-flag) [data-testid="stHeading"] h1,
html:has(.ob-design-v2-flag) [data-testid="stTitle"],
html:has(.ob-design-v2-flag) [data-testid="stTitle"] h1 {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 96, "wght" 600 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.025em !important;
}
html:has(.ob-design-v2-flag) [data-testid="stHeading"] h2,
html:has(.ob-design-v2-flag) [data-testid="stHeader"],
html:has(.ob-design-v2-flag) [data-testid="stHeader"] h2 {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 36, "wght" 550 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.015em !important;
}
html:has(.ob-design-v2-flag) [data-testid="stHeading"] h3,
html:has(.ob-design-v2-flag) [data-testid="stSubheader"],
html:has(.ob-design-v2-flag) [data-testid="stSubheader"] h3 {
  font-family: var(--ob-font-display) !important;
  font-variation-settings: "opsz" 24, "wght" 550 !important;
  color: var(--ob-bone) !important;
  letter-spacing: -0.01em !important;
}

/* Widget labels (above text inputs, selectboxes, etc.) — Inter, muted */
html:has(.ob-design-v2-flag) [data-testid="stWidgetLabel"],
html:has(.ob-design-v2-flag) [data-testid="stWidgetLabel"] p,
html:has(.ob-design-v2-flag) label[data-testid="stWidgetLabel"] {
  font-family: var(--ob-font-body) !important;
  color: var(--ob-bone-soft) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.005em !important;
}

/* Popover (st.popover() — 1.30+) — match expander treatment */
html:has(.ob-design-v2-flag) [data-testid="stPopover"],
html:has(.ob-design-v2-flag) [data-testid="stPopoverButton"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stPopoverBody"] {
  background: var(--ob-surface-1) !important;
  border: 1px solid var(--ob-line) !important;
  border-radius: var(--ob-r-md) !important;
  box-shadow: var(--ob-shadow-hover), 0 0 0 1px var(--ob-royal-500-08) !important;
}

/* Chat message + chat input (st.chat_message + st.chat_input) */
html:has(.ob-design-v2-flag) [data-testid="stChatMessage"],
html:has(.ob-design-v2-flag) [data-testid="stChatMessageContent"] {
  font-family: var(--ob-font-body) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stChatMessage"] {
  background: var(--ob-surface-1) !important;
  border: 1px solid var(--ob-line-soft) !important;
  border-radius: var(--ob-r-md) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stChatInput"] {
  border-radius: var(--ob-r-md) !important;
  background: var(--ob-surface-1) !important;
  border: 1px solid var(--ob-line) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stChatInput"]:focus-within {
  border-color: var(--ob-royal-500) !important;
  box-shadow: 0 0 0 3px var(--ob-royal-500-16) !important;
}
html:has(.ob-design-v2-flag) [data-testid="stChatInput"] textarea {
  font-family: var(--ob-font-body) !important;
  background: transparent !important;
  border: 0 !important;
}

/* Data editor (editable dataframe — st.data_editor) */
html:has(.ob-design-v2-flag) [data-testid="stDataEditor"],
html:has(.ob-design-v2-flag) [data-testid="stDataFrameResizable"] {
  font-family: var(--ob-font-body) !important;
  border-radius: var(--ob-r-sm) !important;
}

/* Chart containers — minimal treatment so they don't look orphaned */
html:has(.ob-design-v2-flag) [data-testid="stPlotlyChart"],
html:has(.ob-design-v2-flag) [data-testid="stAltairChart"],
html:has(.ob-design-v2-flag) [data-testid="stVegaLiteChart"],
html:has(.ob-design-v2-flag) [data-testid="stPyDeckChart"] {
  border-radius: var(--ob-r-md) !important;
  overflow: hidden !important;
}

/* Color picker */
html:has(.ob-design-v2-flag) [data-testid="stColorPicker"] [data-baseweb="block"] > div {
  border-radius: var(--ob-r-sm) !important;
  border: 1px solid var(--ob-line) !important;
}

/* st.video / st.audio — give them token radii so they look intentional */
html:has(.ob-design-v2-flag) [data-testid="stVideo"] video,
html:has(.ob-design-v2-flag) [data-testid="stAudio"] audio {
  border-radius: var(--ob-r-md) !important;
}

/* =============================================================================
   v2 Phase 8 — Lucide icon styling (replaces home pillar emoji + lock)
   -----------------------------------------------------------------------------
   The 3 home pillars (Model Everything / Research Any Edge / Or Follow the
   System) and the premium-teaser lock emoji have been swapped for inline
   Lucide SVGs in app.py. This block sizes them and themes them properly:
     - v1 fallback: SVGs render in --ob-bone-soft (subtle white) on the first
       two pillars, gold on the "follow" pillar (matches v1 gold accent).
     - v2 active: SVGs render in royal — bone on first two, royal-300 on
       the "follow" pillar (matches v2 royal accent).
   The .ob-pillar-icon span is a flex container so the SVG doesn't inherit
   the legacy font-size:1.4rem rule from .ob-pillar-icon.
   ============================================================================= */

/* v1 fallback — neutral SVG color */
.ob-pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.78);
  margin-bottom: 0.5rem;
}
.ob-pillar-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}
.ob-pillar-card.follow .ob-pillar-icon {
  color: #F5D77B;  /* v1 fallback gold */
}

/* v2 — royal accent on "follow" pillar (matches Phase 3 palette) */
html:has(.ob-design-v2-flag) .ob-pillar-icon {
  color: var(--ob-bone);
}
html:has(.ob-design-v2-flag) .ob-pillar-card.follow .ob-pillar-icon {
  color: var(--ob-royal-300);
}

/* Premium teaser lock — v2 royal */
html:has(.ob-design-v2-flag) .ob-section-4 svg[aria-hidden="true"] {
  color: var(--ob-royal-300) !important;
}

/* ============================================================================
   v2 Phase 19 — legacy gold-class cleanup (shared stylesheets)
   ----------------------------------------------------------------------------
   The shared v1 sheets (style/liquid_glass.css, style/app_theme.css,
   style/home_compact.css) are loaded on every page via page_bootstrap and
   still carry brand gold (#D4AF37 / rgba(212,175,55,*)). The v2 sheet had no
   override for these shared classes, so bright gold leaked through under v2.
   These rules remap them onto the royal palette. All scoped under the v2 flag,
   so the ?design=v1 fallback keeps its gold identity untouched.
   ============================================================================ */

/* CSS custom properties consumed by app_theme.css / home_compact.css */
html:has(.ob-design-v2-flag) {
  --gold: #5DA9DA;       /* --ob-royal-500 */
  --gold-600: #2E78B0;   /* --ob-royal-700 */
}

/* Gold gradient text (liquid_glass .lg-text-gold) -> royal gradient */
html:has(.ob-design-v2-flag) .lg-text-gold {
  background: linear-gradient(135deg, var(--ob-royal-300) 0%, var(--ob-royal-500) 50%, var(--ob-royal-300) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Announcement badge + dot */
html:has(.ob-design-v2-flag) .lg-announce-badge {
  background: var(--ob-royal-500-08);
  border-color: var(--ob-royal-500-25);
  color: var(--ob-royal-300);
}
html:has(.ob-design-v2-flag) .lg-badge-dot {
  background: var(--ob-royal-500);
}

/* Gold accent card */
html:has(.ob-design-v2-flag) .lg-card-gold,
html:has(.ob-design-v2-flag) .lg-card-gold:hover {
  border-color: var(--ob-royal-500-25);
}

/* Premium teaser card (kill the gold glow pulse, recolor surface/accent) */
html:has(.ob-design-v2-flag) .lg-premium-teaser {
  background: linear-gradient(135deg, var(--ob-royal-500-08) 0%, var(--ob-royal-500-04) 100%);
  border-color: var(--ob-royal-500-25);
  animation: none;
}
html:has(.ob-design-v2-flag) .lg-premium-teaser::before {
  background: linear-gradient(90deg, transparent, var(--ob-royal-500-45), transparent);
}

/* Footer gold link */
html:has(.ob-design-v2-flag) .lg-footer-link-gold {
  color: var(--ob-royal-300);
}
html:has(.ob-design-v2-flag) .lg-footer-link-gold:hover {
  color: var(--ob-royal-50);
}

/* app_theme.css decorative gold accents */
html:has(.ob-design-v2-flag) hr.gold {
  border-top-color: var(--ob-royal-500-25);
}
html:has(.ob-design-v2-flag) .pill {
  border-color: var(--ob-royal-500-25);
}

/* =============================================================================
   v2 Phase 20 — Type system delivery + tabular numerics (2026-07-25)

   Phases 1-19 styled colour, radius and chrome. The TYPE layer was never
   actually delivered: :root asked for Fraunces/Inter/JetBrains Mono and none of
   the three were ever loaded, so every headline resolved to whatever serif the
   visitor's OS supplied (Iowan Old Style on macOS, Times New Roman on Windows,
   DejaVu on Android). Two unrelated faces then fought over the page — the
   hardcoded DM Serif Display in app.py versus the system fallback.

   This phase ships the fonts, retires the serif from product surfaces, and
   gives numbers their own face. Scoped under the v2 flag like every other phase.
   ========================================================================== */

/* --- 1. One voice for words ------------------------------------------- */
html:has(.ob-design-v2-flag) h1,
html:has(.ob-design-v2-flag) h2,
html:has(.ob-design-v2-flag) h3,
html:has(.ob-design-v2-flag) h4 {
  font-family: var(--ob-font-display);
  letter-spacing: var(--ob-tracking-display);
  line-height: var(--ob-leading-tight);
}

/* Retire DM Serif Display from the product. It stays available for marketing
   creatives; on screen it read as a second brand. Attribute matchers catch the
   inline font-family declarations in app.py without touching that file. */
html:has(.ob-design-v2-flag) [style*="DM Serif Display"],
html:has(.ob-design-v2-flag) .obh-h1,
html:has(.ob-design-v2-flag) .obh-pick,
html:has(.ob-design-v2-flag) .oh-card-name {
  font-family: var(--ob-font-display) !important;
  font-weight: 700;
  letter-spacing: var(--ob-tracking-display);
}

/* --- 2. Numbers are the product --------------------------------------- */
/* Tabular figures so a column of edges, prices or units aligns on the decimal.
   This is the one place the design spends its distinctiveness. */
html:has(.ob-design-v2-flag) .ob-num,
html:has(.ob-design-v2-flag) [data-testid="stMetricValue"],
html:has(.ob-design-v2-flag) [data-testid="stMetricDelta"] {
  font-family: var(--ob-font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

/* Tabular figures everywhere numbers sit in a repeated row, without changing
   the face — proportional digits make stacked stat rows look misaligned even
   when the markup is perfect. */
html:has(.ob-design-v2-flag) table,
html:has(.ob-design-v2-flag) [data-testid="stDataFrame"],
html:has(.ob-design-v2-flag) .tr-hero-value,
html:has(.ob-design-v2-flag) .tr-conf-stats {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* --- 3. Eyebrows --------------------------------------------------------
   Uppercase micro-labels need tracking or they set as a solid block. */
html:has(.ob-design-v2-flag) .ob-eyebrow {
  font-family: var(--ob-font-body);
  font-size: var(--ob-text-2xs);
  font-weight: 600;
  letter-spacing: var(--ob-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ob-bone-mute);
}

/* --- 4. Accessibility floor -------------------------------------------
   Not decoration: a visible focus ring and honoured reduced-motion are the
   difference between "enterprise" and "looks enterprise". */
html:has(.ob-design-v2-flag) :focus-visible {
  outline: 2px solid var(--ob-royal-500);
  outline-offset: 2px;
  border-radius: var(--ob-r-sm);
}

@media (prefers-reduced-motion: reduce) {
  html:has(.ob-design-v2-flag) *,
  html:has(.ob-design-v2-flag) *::before,
  html:has(.ob-design-v2-flag) *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   v2 Phase 21 — Segmented control (2026-07-25)

   st.segmented_control ships a hard-black, full-bleed default that matched
   nothing else on the page — on the MLB slate it read as a raw form control
   dropped into a designed layout. Styling it here fixes every instance on the
   site at once rather than per page.
   ========================================================================== */

/* Streamlit 1.54 puts the widget label INSIDE [stButtonGroup], beside the
   buttons. Painting the pill on the group squeezed labels to one word per
   line ("Te/am") and pushed options onto a second row. The group stacks
   label over buttons; the pill is the button row. */
html:has(.ob-design-v2-flag) [data-testid="stButtonGroup"] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ob-space-2);
}
html:has(.ob-design-v2-flag) [data-testid="stButtonGroup"] > div:not([data-testid]) {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--ob-surface-1);
  border: 1px solid var(--ob-line-soft);
  border-radius: var(--ob-r-pill);
}

html:has(.ob-design-v2-flag) [data-testid="stBaseButton-segmented_control"],
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-segmented_controlActive"] {
  font-family: var(--ob-font-body);
  font-size: var(--ob-text-sm);
  font-weight: 600;
  letter-spacing: 0;
  border: none;
  border-radius: var(--ob-r-pill);
  padding: var(--ob-space-2) var(--ob-space-5);
  transition: background var(--ob-dur-fast) var(--ob-ease),
              color var(--ob-dur-fast) var(--ob-ease);
}

html:has(.ob-design-v2-flag) [data-testid="stBaseButton-segmented_control"] {
  background: transparent;
  color: var(--ob-bone-soft);
}

html:has(.ob-design-v2-flag) [data-testid="stBaseButton-segmented_control"]:hover {
  background: var(--ob-royal-500-08);
  color: var(--ob-bone);
}

/* Selected reads as a raised surface, not an inverted slab. */
html:has(.ob-design-v2-flag) [data-testid="stBaseButton-segmented_controlActive"] {
  background: var(--ob-royal-500-16);
  color: var(--ob-bone);
  box-shadow: inset 0 0 0 1px var(--ob-royal-500-32);
}

/* Phones (Oct 28 2026): a 7-option picker (Track Record's period) wrapped into
   three rows inside one pill-radius box, a 140px blob. One swipeable row
   instead, the same pattern as the stateful_tabs strip; options never wrap. */
@media (max-width: 768px) {
  html:has(.ob-design-v2-flag) [data-testid="stButtonGroup"] {
    max-width: 100%;
  }
  html:has(.ob-design-v2-flag) [data-testid="stButtonGroup"] > div:not([data-testid]) {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  html:has(.ob-design-v2-flag) [data-testid="stButtonGroup"] > div:not([data-testid])::-webkit-scrollbar {
    display: none;
  }
  /* flex 1 0 auto + width auto: fill the row when the options fit (a
     width="stretch" control set each button to width:100%, so with a fixed
     basis "All" filled the row and pushed Today/Tomorrow off-screen on the
     NBA date filter, Oct 28); never shrink below the label, scroll if not. */
  html:has(.ob-design-v2-flag) [data-testid="stBaseButton-segmented_control"],
  html:has(.ob-design-v2-flag) [data-testid="stBaseButton-segmented_controlActive"] {
    flex: 1 0 auto;
    width: auto;
    white-space: nowrap;
    padding: var(--ob-space-2) var(--ob-space-4);
  }
  /* st.pills is a stButtonGroup too: without natural width its chips were
     squeezed into the scroll row and clipped ("Today · Oct 28 · 36" on the
     CS2/LoL day filter, measured after the Oct 28 deploy). */
  html:has(.ob-design-v2-flag) [data-testid="stBaseButton-pills"],
  html:has(.ob-design-v2-flag) [data-testid="stBaseButton-pillsActive"] {
    flex: 1 0 auto;
    width: auto;
    white-space: nowrap;
  }
}

/* =============================================================================
   v2 Phase 22 — Plain st.radio selected state (2026-07-25)

   Period pickers and view toggles (Track Record's Published Picks / All Model
   Outputs, Yesterday / 7 Days / 30 Days ...) are plain st.radio, NOT the
   stateful_tabs strip, so the tab treatment never reached them. Streamlit paints
   the checked label's TEXT WRAPPER solid royal-500, which reads as a
   text-selection highlight rather than a chosen option — the most
   credibility-critical page on the site looked like someone had dragged their
   cursor across it.

   Only the wrapper holding the label text is cleared. The radio circle is a
   sibling div and is left alone: it stays the selection indicator.
   ========================================================================== */

html:has(.ob-design-v2-flag) [data-testid="stRadio"] label:has(input:checked)
  > div:has([data-testid="stMarkdownContainer"]) {
  background: transparent !important;
}

html:has(.ob-design-v2-flag) [data-testid="stRadio"] label:has(input:checked)
  [data-testid="stMarkdownContainer"] p {
  color: var(--ob-bone) !important;
  font-weight: 700 !important;
}

/* Unselected options recede so the chosen one carries the emphasis. */
html:has(.ob-design-v2-flag) [data-testid="stRadio"] label:not(:has(input:checked))
  [data-testid="stMarkdownContainer"] p {
  color: var(--ob-bone-soft) !important;
}

/* =============================================================================
   UX wave 1 — spacing repair + motion basics (2026-09-28)

   1. Headings. The global `* { margin-top: 0 !important }` reset in
      utils/page_bootstrap.py makes every margin-top inert, so a block after an
      st.subheader() sat 0-3px under it (NFL "Trusted opportunities" touched its
      card). Space is pushed from above, the same way the home sections do it.

   2. Motion, two behaviours only, each tied to something the user did or to
      data arriving (docs/PRODUCT_DESIGN_SYSTEM.md caps a page at three):
        Settle — a block fades in when Streamlit first mounts it, so a streaming
                 page reads as arriving rather than popping. Opacity only: a
                 transform would make every position:fixed descendant (bottom
                 nav, sticky CTA) resolve against the container for 200ms.
                 fill-mode `backwards`, not `both`, so Streamlit's own stale-
                 element dimming during a rerun still applies afterwards.
        Press  — anything actionable dips to 98% on press.
      Both collapse under the prefers-reduced-motion rule above.
   ========================================================================== */
html:has(.ob-design-v2-flag) [data-testid="stHeading"] {
  padding-bottom: var(--ob-space-3);
}

@keyframes ob-settle {
  from { opacity: 0; }
  to   { opacity: 1; }
}
html:has(.ob-design-v2-flag) [data-testid="stMainBlockContainer"] [data-testid="stElementContainer"],
html:has(.ob-design-v2-flag) [data-testid="stMainBlockContainer"] [data-testid="stExpander"] {
  animation: ob-settle var(--ob-dur-base) var(--ob-ease) backwards;
}

html:has(.ob-design-v2-flag) .stButton > button,
html:has(.ob-design-v2-flag) [data-testid^="stBaseButton"],
html:has(.ob-design-v2-flag) .stLinkButton > a,
html:has(.ob-design-v2-flag) a.obh-cta,
html:has(.ob-design-v2-flag) .ob-chip,
html:has(.ob-design-v2-flag) .ob-tabs a {
  /* Superset of what these already transitioned (buttons: transform, box-shadow,
     background; chips/tabs: color) — narrower would make hover glows snap. */
  transition: transform var(--ob-dur-fast) var(--ob-ease),
              box-shadow var(--ob-dur-fast) var(--ob-ease),
              background-color var(--ob-dur-fast) var(--ob-ease),
              border-color var(--ob-dur-fast) var(--ob-ease),
              color var(--ob-dur-fast) var(--ob-ease);
}
html:has(.ob-design-v2-flag) .stButton > button:active,
html:has(.ob-design-v2-flag) [data-testid^="stBaseButton"]:active,
html:has(.ob-design-v2-flag) .stLinkButton > a:active,
html:has(.ob-design-v2-flag) a.obh-cta:active,
html:has(.ob-design-v2-flag) .ob-chip:active,
html:has(.ob-design-v2-flag) .ob-tabs a:active {
  transform: scale(0.98);
}

/* =============================================================================
   Retire gradient-filled text (2026-09-28)

   Phase 1 (above) already set the rule — solid ink, no linear-gradient text
   fills — but five live elements kept theirs (runtime census of home,
   subscribe, today's projections, NFL, MLB, track record). Gradient type is
   the most recognisable AI-template tell on the site. Each keeps a solid
   colour chosen by the palette's jobs: royal marks the figures we produced and
   the promise; ink carries everything else; green stays on the settled
   +units figure, which never had a gradient.
   ========================================================================== */
html:has(.ob-design-v2-flag) .obh-h1 .a,
html:has(.ob-design-v2-flag) .sub-hero-headline,
html:has(.ob-design-v2-flag) .lg-stat-value.lg-text-gradient,
html:has(.ob-design-v2-flag) .lg-stat-value.lg-text-gold,
html:has(.ob-design-v2-flag) .trial-price {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}
html:has(.ob-design-v2-flag) .obh-h1 .a,
html:has(.ob-design-v2-flag) .lg-stat-value.lg-text-gold,
html:has(.ob-design-v2-flag) .trial-price {
  color: var(--ob-royal-300) !important;
  -webkit-text-fill-color: var(--ob-royal-300) !important;
}
html:has(.ob-design-v2-flag) .sub-hero-headline,
html:has(.ob-design-v2-flag) .lg-stat-value.lg-text-gradient {
  color: var(--ob-bone) !important;
  -webkit-text-fill-color: var(--ob-bone) !important;
}

/* Streamlit 1.49 renders "Missing Submit Button" inside any form whose submit button is not
   registered at the instant the script run stops — which happens transiently between the
   reruns a page performs while loading, even though the button exists (measured Sep 29 2026:
   a red error flashed 0.3–0.9s on most loads of MLB Daily Props). Its container is the only
   non-testid direct child of stForm that holds an stAlert; every form we ship has a button
   (AppTest boot tests exercise them), so the warning is hidden, not the form. */
[data-testid="stForm"] > div:not([data-testid]):has(> [data-testid="stAlert"]) {
  display: none !important;
}

/* =============================================================================
   Invisible wrappers take no space (Oct 28 2026)

   Scroll anchors (`<div id="game-…"></div>`) and empty st.markdown calls each
   left a 12px element wrapper plus its gap: about 60px of dead space per game
   row on the soccer slate (20+ rows), and the same on every page using anchors.
   The anchor stays in the DOM at zero height, so #game-… jumps still land.
   ========================================================================== */
[data-testid="stElementContainer"]:has(> [data-testid="stMarkdown"] [data-testid="stMarkdownContainer"]:empty),
[data-testid="stElementContainer"]:has(> [data-testid="stMarkdown"] [data-testid="stMarkdownContainer"] > div[id]:only-child:empty) {
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

