/* Self-hosted Google Fonts (DM Serif Display, Plus Jakarta Sans, JetBrains Mono, Archivo).
   Served locally from /fonts/ so visitor IPs are never sent to Google
   (GDPR — avoids third-party IP transfer to fonts.gstatic.com).
   Regenerate with the loader in tools/ if weights change. */

/* JetBrains Mono — the numeric face. Every edge, probability, unit and price is
   set in this, with tabular figures, so columns of numbers align down the page.
   Google ships it as a single VARIABLE file per subset, so one file covers the
   whole 100-800 range: declaring per-weight @font-face would download the same
   43KB four times over. */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-variable-latin-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-variable-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-serif-display-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-serif-display-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Archivo (direction C, Nov 10 2026): one VARIABLE file per subset carries both the
   width axis (62-125%, the condensed figures) and the weight axis (100-900). */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-variable-latin-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-variable-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Olympus Bets - Compact Design System */
/* UI-only cleanup: reduces wasted space, unifies spacing across all pages */

:root{
  --space-0: 0;
  --space-1: .25rem;  /* 4px */
  --space-2: .5rem;   /* 8px */
  --space-3: .75rem;  /* 12px */
  --space-4: 1rem;    /* 16px */
  --space-6: 1.5rem;  /* 24px */
  --radius: 8px;
  --max-content: 1400px;
  --font-scale-1: .95rem;
  --font-scale-2: 1.05rem;
  --font-scale-3: 1.15rem;
}

/* ======================
   STREAMLIT CHROME CLEANUP
   ====================== */
/* Hide default Streamlit header and footer clutter */
header[data-testid="stHeader"],
#MainMenu,
footer,
.stDeployButton,
[data-testid="stDecoration"],
[data-testid="stStatusWidget"],
[data-testid="stToolbar"] {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Tighten main container padding — targets both old and v1.49 class names */
.block-container,
.stMainBlockContainer,
[data-testid="stMainBlockContainer"],
section.main > div:first-child > div.block-container {
  padding-top: var(--space-2) !important;
  padding-bottom: var(--space-2) !important;
  max-width: var(--max-content); 
  padding-left: var(--space-4) !important;
  padding-right: var(--space-4) !important;
}

/* ======================
   TYPOGRAPHY & HEADINGS
   ====================== */
/* Reduce default heading margins */
h1, h2, h3, h4, h5, h6 { 
  margin: var(--space-2) 0 var(--space-2) 0 !important; 
  line-height: 1.3 !important;
}

h1 { 
  font-size: 1.75rem !important; 
  margin-bottom: var(--space-3) !important;
}

h2 { 
  font-size: 1.4rem !important; 
}

h3 { 
  font-size: 1.2rem !important; 
}

p { 
  margin: var(--space-2) 0; 
  line-height: 1.35; 
}

.stCaption, 
[data-testid="stCaptionContainer"] { 
  font-size: 0.85rem !important; 
  margin: var(--space-1) 0 !important;
}

/* ======================
   TABS & NAVIGATION
   ====================== */
.stTabs [data-baseweb="tab-list"]{ 
  gap: var(--space-2) !important; 
  margin-bottom: var(--space-3) !important;
}

.stTabs [data-baseweb="tab"]{ 
  padding: var(--space-2) var(--space-3) !important; 
  font-size: var(--font-scale-1) !important;
}

.stTabs [data-baseweb="tab-panel"]{ 
  padding-top: var(--space-3) !important; 
}

/* ======================
   CARD SYSTEM
   ====================== */
.card{ 
  border: 1px solid rgba(0,0,0,.08); 
  border-radius: var(--radius); 
  padding: var(--space-3); 
  margin-bottom: var(--space-2); 
  background: rgba(255,255,255,0.02);
}

.cards{ 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: var(--space-2); 
  margin: var(--space-3) 0;
}

@media (max-width: 1100px){ 
  .cards{ 
    grid-template-columns: repeat(2, 1fr);
  } 
}

@media (max-width: 768px){ 
  .cards{ 
    grid-template-columns: 1fr; 
  }
  
  .block-container {
    padding-left: var(--space-2) !important;
    padding-right: var(--space-2) !important;
  }
  
  h1 {
    font-size: 1.5rem !important;
  }
}

/* Compact game cards */
.game-card-header {
  padding: var(--space-4);
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: var(--space-3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.game-card-compact {
  padding: var(--space-3);
  margin-bottom: var(--space-2);
}

/* ======================
   TABLES & DATAFRAMES
   ====================== */
[data-testid="stDataFrame"] div[role="grid"]{ 
  font-size: var(--font-scale-1); 
}

[data-testid="stTable"] table{ 
  font-size: var(--font-scale-1); 
}

[data-testid="stDataFrame"],
[data-testid="stTable"] {
  margin: var(--space-2) 0 !important;
}

/* ======================
   METRICS & WIDGETS
   ====================== */
[data-testid="stMetric"]{ 
  padding: var(--space-1) var(--space-2); 
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius);
}

[data-testid="stMetricValue"]{ 
  font-size: var(--font-scale-3) !important; 
}

[data-testid="stMetricLabel"] {
  font-size: var(--font-scale-1) !important;
}

/* Tighten button spacing */
.stButton > button {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-scale-1);
  border-radius: var(--radius);
}

/* Tighten selectbox/input spacing */
.stSelectbox,
.stTextInput,
.stNumberInput {
  margin-bottom: var(--space-2) !important;
}

/* ======================
   COLUMNS & LAYOUT
   ====================== */
[data-testid="column"] {
  padding: var(--space-1) !important;
}

.row-widget {
  margin: var(--space-2) 0 !important;
}

/* ======================
   EXPANDERS
   ====================== */
[data-testid="stExpander"] {
  margin: var(--space-2) 0 !important;
  border-radius: var(--radius);
  border: 1px solid rgba(128,128,128,0.2);
}

[data-testid="stExpander"] summary {
  padding: var(--space-2) var(--space-3) !important;
  font-weight: 600;
}

[data-testid="stExpander"] > div:last-child {
  padding: var(--space-3) !important;
}

/* ======================
   ALERTS & MESSAGES
   ====================== */
.stAlert,
[data-testid="stAlert"] {
  padding: var(--space-2) var(--space-3) !important;
  margin: var(--space-2) 0 !important;
  border-radius: var(--radius);
}

.stSuccess,
.stInfo,
.stWarning,
.stError {
  padding: var(--space-2) var(--space-3) !important;
  margin: var(--space-2) 0 !important;
}

/* ======================
   DIVIDERS
   ====================== */
hr, .stDivider {
  margin: var(--space-3) 0 !important;
}

/* ======================
   LISTS
   ====================== */
ul, ol{ 
  margin: var(--space-2) 0 var(--space-2) var(--space-3); 
  padding-left: var(--space-4);
}

li {
  margin-bottom: var(--space-1);
}

/* ======================
   TRUNCATION HELPERS
   ====================== */
.truncate-1{ 
  display: -webkit-box; 
  -webkit-line-clamp: 1; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
}

.truncate-2{ 
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
}

.truncate-3{ 
  display: -webkit-box; 
  -webkit-line-clamp: 3; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
}

/* ======================
   CUSTOM BADGES
   ====================== */
.strength-badge {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.favorite-team {
  font-size: 2rem;
  font-weight: bold;
  color: #FFD700;
  margin: var(--space-2) 0;
}

.win-probability {
  font-size: 1.2rem;
  color: white;
  margin: 0;
}

.score-projection {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: var(--space-2);
}

.edge-badge {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-weight: bold;
  font-size: 1rem;
  display: inline-block;
  margin: var(--space-2) 0;
}

.edge-badge-success {
  background: #16a34a;
  color: white;
}

.edge-badge-warning {
  background: #f59e0b;
  color: white;
}

.edge-badge-danger {
  background: #dc2626;
  color: white;
}

/* ======================
   MOBILE OPTIMIZATIONS
   ====================== */
@media (max-width: 768px) {
  /* Ensure touch targets are at least 40px */
  .stButton > button,
  [data-baseweb="tab"] {
    min-height: 40px;
  }
  
  /* Reduce card padding on mobile */
  .game-card-header {
    padding: var(--space-3);
  }
  
  .card {
    padding: var(--space-2);
  }
  
  /* Stack metrics vertically on mobile */
  [data-testid="stMetric"] {
    margin-bottom: var(--space-2);
  }
  
  /* Reduce font sizes slightly */
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  h3 { font-size: 1.1rem !important; }
  
  .favorite-team {
    font-size: 1.5rem;
  }
  
  .win-probability {
    font-size: 1rem;
  }
}

/* ======================
   DESKTOP OPTIMIZATIONS
   ====================== */
@media (min-width: 1366px) {
  .block-container {
    max-width: var(--max-content);
    margin: 0 auto;
  }
  
  /* Utilize more horizontal space */
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ======================
   ACCESSIBILITY
   ====================== */
/* Ensure focus indicators are visible */
*:focus-visible {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
}

/* Improve link visibility */
a {
  color: #4A90E2;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ======================
   UTILITY CLASSES
   ====================== */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.fw-bold { font-weight: 600 !important; }
.fw-normal { font-weight: 400 !important; }

/* ⚠ NAME COLLISION: this is the SMALL design-token sheet at `style/app_theme.css`,
   loaded via the css_parts list in app.py::load_css() and utils/page_bootstrap.py.
   It is NOT the ~48KB hub sheet at the repo root (`app_theme.css`), which is loaded
   via raw open() in app.py/marketing/app.py. Edit the right one. */
:root{
  --royal:#1E3A8A; --royal-600:#2745A1;
  --gold:#5DA9DA; --gold-600:#2E78B0;
  --bg:#0B1020; --surface:#0F162E;
  --text-high:#F8FAFC; --text-low:#A7B3C7;
  --text-dark:#0B1020; --muted:rgba(255,255,255,.45);
  --glass-bg:rgba(255,255,255,0.03); --glass-border:rgba(255,255,255,0.08);
  --glass-blur:12px; --glass-inset:inset 0 1px 1px rgba(255,255,255,0.05);
}
html,body{ font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
h1,h2,h3{ font-family: 'DM Serif Display', Georgia, serif; letter-spacing:-0.01em; }
header[data-testid="stHeader"]{
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
}
[data-testid="stSidebar"]{ border-right: 1px solid rgba(93,169,218,.15); }
.block-container{ padding-top: 2.25rem; padding-bottom: 3rem; }
.stButton>button, button[kind="primary"]{
  background: var(--royal); color: var(--text-high);
  border: 1px solid rgba(93,169,218,.35);
  border-radius: 10px; padding: 10px 16px; font-weight: 700;
  transition: transform .08s ease, background .2s ease;
}
.stButton>button:hover, button[kind="primary"]:hover{ background: var(--royal-600); transform: translateY(-1px); }
.stButton>button:focus{ outline: 2px solid var(--gold-600); outline-offset: 2px; }
.card{ background: var(--surface); border:1px solid rgba(93,169,218,.18);
  border-radius:14px; padding:18px; box-shadow:0 10px 24px rgba(0,0,0,.22); }
.card h3{ margin:.1rem 0 .25rem 0; }
.metric{ background: linear-gradient(180deg, rgba(30,58,138,.18), rgba(30,58,138,0));
  border:1px solid rgba(93,169,218,.25); border-radius:14px; padding:14px 16px; }
.metric .label{ color: var(--muted); font-size:12px; }
.metric .value{ font-weight:800; font-size:22px; }
.pill{ border:1px solid rgba(93,169,218,.35); border-radius:999px; padding:4px 12px; display:inline-block; }
.pill-gold{ color: var(--gold); border-color: var(--gold); }
hr.gold{ border:none; border-top:1px solid rgba(93,169,218,.2); margin:32px 0; }
.stTextInput>div>div>input, .stNumberInput input, .stSelectbox>div>div>div, .stMultiSelect>div>div>div{
  border-radius: 10px !important; border:1px solid rgba(93,169,218,.25) !important;
}
.footer-min{ color: var(--muted); font-size:13px; text-align:center; padding:12px 0 24px; }

/* ============================================================
   LIQUID GLASS DESIGN SYSTEM — Olympus Bets
   Extends app_theme.css with depth, blur, glow, and animation.
   All class names prefixed lg- to avoid collisions.
   ============================================================ */

/* ---- KEYFRAME ANIMATIONS ---- */

@keyframes lg-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes lg-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes lg-pulse-gold {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 20px rgba(93,169,218,0.1), 0 0 60px rgba(93,169,218,0.03); }
  50%      { box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 30px rgba(93,169,218,0.2), 0 0 80px rgba(93,169,218,0.06); }
}

@keyframes lg-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes lg-number-pop {
  0%   { opacity: 0; transform: scale(0.6) translateY(8px); }
  60%  { opacity: 1; transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes lg-badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}


/* ---- BASE GLASS CARD ---- */

.lg-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.2),
    inset 0 1px 1px rgba(255,255,255,0.06);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.lg-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.3),
    inset 0 1px 1px rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

/* Gradient border via mask-composite — the signature liquid glass edge */
.lg-card-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(93,169,218,0.3) 0%,
    rgba(255,255,255,0.1) 40%,
    rgba(30,58,138,0.3) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Gold accent variant */
.lg-card-gold {
  border-color: rgba(93,169,218,0.2);
  background: linear-gradient(
    135deg,
    rgba(93,169,218,0.05) 0%,
    rgba(255,255,255,0.02) 100%
  );
}

.lg-card-gold:hover {
  border-color: rgba(93,169,218,0.4);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.3),
    0 0 40px rgba(93,169,218,0.08);
}


/* ---- GRADIENT TEXT ---- */

.lg-text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, rgba(248,250,252,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lg-text-gold {
  background: linear-gradient(135deg, #5DA9DA 0%, #93C2E6 50%, #5DA9DA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ---- ANNOUNCEMENT BADGE ---- */

.lg-announce-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(93,169,218,0.08);
  border: 1px solid rgba(93,169,218,0.2);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(93,169,218,0.9);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.lg-badge-dot {
  width: 6px;
  height: 6px;
  background: #5DA9DA;
  border-radius: 50%;
  animation: lg-badge-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}


/* ---- SECTION UTILITIES ---- */

.lg-section {
  padding: 2.5rem 1rem;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .lg-section {
    padding: 1.5rem 0.75rem;
  }
}

.lg-section-label {
  color: rgba(248,250,252,0.4);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}


/* ---- STATS ROW (big numbers) ---- */

.lg-stats-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .lg-stats-row {
    gap: 1.5rem;
  }
}

.lg-stat-item {
  text-align: center;
  animation: lg-number-pop 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.lg-stat-value {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #F8FAFC;
}

.lg-stat-label {
  color: rgba(248,250,252,0.47);
  font-size: 0.6875rem;
  font-weight: 500;
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Stagger animation delays */
.lg-stat-item:nth-child(1) { animation-delay: 0.1s; }
.lg-stat-item:nth-child(2) { animation-delay: 0.2s; }
.lg-stat-item:nth-child(3) { animation-delay: 0.3s; }
.lg-stat-item:nth-child(4) { animation-delay: 0.4s; }


/* ---- FEATURE PILLAR CARDS ---- */

.lg-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .lg-pillars {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

.lg-pillar {
  position: relative;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lg-pillar:hover {
  transform: translateY(-2px);
  border-color: rgba(93,169,218,0.2);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.05), 0 8px 24px rgba(0,0,0,0.15);
}

.lg-pillar-icon {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
  display: block;
}

.lg-pillar-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.lg-pillar-desc {
  font-size: 0.75rem;
  color: rgba(248,250,252,0.5);
  line-height: 1.5;
}


/* ---- PROOF MARQUEE ---- */

.lg-marquee-wrap {
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.015);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 0.55rem 0;
}

.lg-marquee-track {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  animation: lg-marquee 35s linear infinite;
  width: max-content;
}

.lg-marquee-item {
  color: rgba(248,250,252,0.47);
  font-size: 0.72rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lg-marquee-item strong {
  color: rgba(248,250,252,0.8);
}

/* Fade edges */
.lg-marquee-wrap::before,
.lg-marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}

.lg-marquee-wrap::before {
  left: 0;
  background: linear-gradient(90deg, #0A0A0F, transparent);
}

.lg-marquee-wrap::after {
  right: 0;
  background: linear-gradient(270deg, #0A0A0F, transparent);
}


/* ---- PICK CARD (glass upgrade for inline projections) ---- */

.lg-pick-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.04), 0 4px 16px rgba(0,0,0,0.12);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.lg-pick-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.14);
}


/* ---- PREMIUM TEASER CARD ---- */

.lg-premium-teaser {
  position: relative;
  background: linear-gradient(135deg, rgba(93,169,218,0.06) 0%, rgba(93,169,218,0.02) 100%);
  border: 1px solid rgba(93,169,218,0.25);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: lg-pulse-gold 4s ease-in-out infinite;
  overflow: hidden;
}

/* Top gold accent line */
.lg-premium-teaser::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(93,169,218,0.6), transparent);
}


/* ---- FOOTER GRID ---- */

.lg-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .lg-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 380px) {
  .lg-footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.lg-footer-heading {
  color: rgba(248,250,252,0.5);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.lg-footer-link {
  display: block;
  color: rgba(248,250,252,0.4);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  transition: color 0.15s ease;
}

.lg-footer-link:hover {
  color: rgba(248,250,252,0.7);
}

.lg-footer-link-gold {
  color: rgba(93,169,218,0.7);
  font-weight: 600;
}

.lg-footer-link-gold:hover {
  color: rgba(93,169,218,0.95);
}


/* ---- ACCESSIBILITY ---- */

@media (prefers-reduced-motion: reduce) {
  .lg-marquee-track {
    animation: none;
  }
  .lg-stat-item {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .lg-badge-dot {
    animation: none;
  }
  .lg-premium-teaser {
    animation: none;
  }
  .lg-card,
  .lg-pillar,
  .lg-pick-card {
    transition: none;
  }
}

/* 
   Olympus Bets - Professional Responsive Design System
   Mobile-first, tablet-optimized, desktop-enhanced
   Follows modern web app standards
*/

/* =================================================================== */
/* ROOT VARIABLES - Consistent spacing system */
/* =================================================================== */

:root {
    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Breakpoints */
    --mobile-max: 768px;
    --tablet-max: 1024px;
    --desktop-min: 1025px;
    
    /* Touch targets (mobile) */
    --touch-target: 44px;
    
    /* Container widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
}

/* =================================================================== */
/* RESET STREAMLIT EXCESSIVE SPACING */
/* =================================================================== */

/* ZERO PADDING - Nav hidden properly + NO HORIZONTAL SCROLL */
html, body, .stApp, .main {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

.main .block-container {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
}

/* HIDE STREAMLIT HEADER COMPLETELY */
header[data-testid="stHeader"] {
    display: none !important;
}

[data-testid="stToolbar"] {
    display: none !important;
}

#MainMenu {
    visibility: hidden !important;
}

.stDeployButton {
    display: none !important;
}

footer {
    visibility: hidden !important;
}

/* =================================================================== */
/* TYPOGRAPHY - Compact & Readable */
/* =================================================================== */

/* Page titles - compact */
h1 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin: 0.5rem 0 0.75rem 0 !important;
    line-height: 1.2 !important;
}

h2 {
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    margin: 0.75rem 0 0.5rem 0 !important;
    line-height: 1.3 !important;
}

h3 {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    margin: 0.5rem 0 0.4rem 0 !important;
}

/* Body text */
p, .stMarkdown {
    line-height: 1.6 !important;
    margin-bottom: 0.5rem !important;
}

/* =================================================================== */
/* RESPONSIVE GRID SYSTEM */
/* =================================================================== */

/* Mobile-first: Stack columns by default */
[data-testid="column"] {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 var(--space-sm) !important;
}

/* Tablet: 2-column layout */
@media (min-width: 769px) and (max-width: 1024px) {
    [data-testid="column"] {
        width: 50% !important;
    }
    
    /* 3-column becomes 2-column on tablet */
    [data-testid="stHorizontalBlock"]:has([data-testid="column"]:nth-child(3)) [data-testid="column"] {
        width: 50% !important;
    }
    
    /* 4-column becomes 2x2 grid */
    [data-testid="stHorizontalBlock"]:has([data-testid="column"]:nth-child(4)) [data-testid="column"] {
        width: 50% !important;
    }
}

/* Desktop: Full layout */
@media (min-width: 1025px) {
    .main .block-container {
        max-width: 1400px !important;
        margin: 0 auto !important;
        padding: 1.5rem 2rem !important;
    }
}

/* =================================================================== */
/* BUTTONS - Touch-friendly */
/* =================================================================== */

.stButton > button {
    min-height: var(--touch-target) !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    width: 100% !important;
}

/* Desktop: Buttons can be auto-width */
@media (min-width: 769px) {
    .stButton > button {
        width: auto !important;
    }
}

/* Primary button */
.stButton > button[kind="primary"] {
    background: linear-gradient(135deg, #1E3A8A 0%, #2745A1 100%) !important;
    color: white !important;
    border: 1px solid #5DA9DA !important;
}

.stButton > button[kind="primary"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4) !important;
}

/* =================================================================== */
/* METRICS - Responsive sizing */
/* =================================================================== */

[data-testid="stMetric"] {
    background: rgba(30, 58, 138, 0.1) !important;
    border: 1px solid rgba(93, 169, 218, 0.25) !important;
    border-radius: 10px !important;
    padding: 0.75rem !important;
    margin-bottom: var(--space-sm) !important;
}

[data-testid="stMetricLabel"] {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-testid="stMetricValue"] {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
}

/* Mobile: Smaller metrics */
@media (max-width: 768px) {
    [data-testid="stMetricValue"] {
        font-size: var(--ob-text-lg, 1.125rem) !important;
    }
    
    [data-testid="stMetricLabel"] {
        font-size: 0.8rem !important;
    }
}

/* =================================================================== */
/* DATAFRAMES/TABLES - Fully responsive */
/* =================================================================== */

[data-testid="stDataFrame"] {
    margin: var(--space-sm) 0 !important;
}

/* Mobile: Horizontal scroll + compact */
@media (max-width: 768px) {
    [data-testid="stDataFrame"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    [data-testid="stDataFrame"] table {
        font-size: 0.75rem !important;
        min-width: 100% !important;
    }
    
    [data-testid="stDataFrame"] th,
    [data-testid="stDataFrame"] td {
        padding: 0.4rem 0.5rem !important;
        white-space: nowrap !important;
    }
}

/* Tablet: Slightly larger text */
@media (min-width: 769px) and (max-width: 1024px) {
    [data-testid="stDataFrame"] table {
        font-size: 0.875rem !important;
    }
}

/* Desktop: Full size */
@media (min-width: 1025px) {
    [data-testid="stDataFrame"] table {
        font-size: 0.95rem !important;
    }
}

/* =================================================================== */
/* SIDEBAR - Responsive behavior */
/* =================================================================== */

[data-testid="stSidebar"] {
    padding: 1rem 0.75rem !important;
    overflow-x: hidden !important;
}

[data-testid="stSidebar"] [data-testid="stMarkdownContainer"] {
    padding: 0 !important;
}

/* Mobile: Sidebar collapses by default */
@media (max-width: 768px) {
    [data-testid="stSidebar"] {
        width: 20rem !important;  /* Full width when open */
        max-width: 85vw !important;
    }
    
    /* Tighter padding on mobile */
    .main .block-container {
        padding: 0.75rem !important;
    }
}

/* =================================================================== */
/* EXPANDERS - Touch-friendly */
/* =================================================================== */

[data-testid="stExpander"] {
    border: 1px solid rgba(93, 169, 218, 0.2) !important;
    border-radius: 8px !important;
    margin: var(--space-sm) 0 !important;
    background: rgba(15, 22, 46, 0.3) !important;
}

[data-testid="stExpander"] summary {
    padding: 0.75rem !important;
    min-height: var(--touch-target) !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

[data-testid="stExpander"] summary:hover {
    background: rgba(93, 169, 218, 0.05) !important;
}

/* =================================================================== */
/* FORMS & INPUTS - Responsive & accessible */
/* =================================================================== */

/* All inputs: Touch-friendly sizing */
input, select, textarea, button {
    font-size: 1rem !important;
}

@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;  /* Prevents iOS zoom on focus */
        min-height: var(--touch-target) !important;
    }
}

/* Text inputs */
.stTextInput > div > div > input,
.stNumberInput > div > div > input {
    border-radius: 8px !important;
    border: 1px solid rgba(93, 169, 218, 0.25) !important;
    padding: 0.75rem !important;
}

/* Select boxes */
.stSelectbox > div > div {
    border-radius: 8px !important;
}

/* Sliders - larger touch targets */
.stSlider {
    padding: 1rem 0 !important;
}

/* Slider thumb: 24px dot everywhere; the 44px touch area is its ::before
   (static/css/design_tokens.css, SLIDER). */
.stSlider [data-baseweb="slider"] div[role="slider"] {
    width: 24px !important;
    height: 24px !important;
}

/* =================================================================== */
/* ALERTS & MESSAGES - Compact */
/* =================================================================== */

.stAlert, .stSuccess, .stInfo, .stWarning, .stError {
    padding: 0.75rem 1rem !important;
    margin: var(--space-sm) 0 !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
}

@media (max-width: 768px) {
    .stAlert, .stSuccess, .stInfo, .stWarning, .stError {
        font-size: 0.875rem !important;
        padding: 0.6rem 0.8rem !important;
    }
}

/* =================================================================== */
/* TABS - Responsive navigation */
/* =================================================================== */

.stTabs [data-baseweb="tab-list"] {
    gap: 0.25rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.stTabs [data-baseweb="tab"] {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.95rem !important;
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .stTabs [data-baseweb="tab"] {
        padding: 0.6rem 1rem !important;
        font-size: 0.875rem !important;
    }
}

/* =================================================================== */
/* SPINNER/LOADING - Compact */
/* =================================================================== */

[data-testid="stSpinner"] {
    min-height: 3rem !important;
}

/* =================================================================== */
/* CAPTIONS - Proper spacing */
/* =================================================================== */

[data-testid="stCaptionContainer"] {
    margin-top: -0.25rem !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.875rem !important;
    opacity: 0.8 !important;
}

/* =================================================================== */
/* DIVIDERS - Subtle */
/* =================================================================== */

hr {
    margin: var(--space-md) 0 !important;
    border: none !important;
    border-top: 1px solid rgba(93, 169, 218, 0.2) !important;
}

/* =================================================================== */
/* IMAGES - Responsive */
/* =================================================================== */

img {
    max-width: 100% !important;
    height: auto !important;
}

/* =================================================================== */
/* UTILITY CLASSES */
/* =================================================================== */

/* Hide on mobile */
.hide-mobile {
    display: block !important;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Show only on mobile */
.show-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

/* =================================================================== */
/* PERFORMANCE OPTIMIZATIONS */
/* =================================================================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hardware acceleration */
.stButton > button,
[data-testid="stMetric"],
.stTabs [data-baseweb="tab"] {
    transform: translateZ(0);
    will-change: transform;
}

/* =================================================================== */
/* ACCESSIBILITY */
/* =================================================================== */

/* Focus states */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #5DA9DA !important;
    outline-offset: 2px !important;
}

/* Larger click/tap areas */
@media (max-width: 768px) {
    button, a, [role="button"] {
        min-height: var(--touch-target) !important;
        min-width: var(--touch-target) !important;
    }
}

/* =================================================================== */
/* MOBILE-FIRST OVERRIDES */
/* =================================================================== */

/* Mobile default (< 768px) */
@media (max-width: 768px) {
    .main .block-container {
        padding-top: 0.5rem !important;
    }
    
    /* Compact everything */
    .element-container {
        margin-bottom: var(--space-sm) !important;
    }
    
    /* Full-width sidebar when open */
    [data-testid="stSidebar"] {
        width: 85vw !important;
        max-width: 320px !important;
    }
    
    /* Reduce whitespace */
    .stMarkdown {
        margin-bottom: var(--space-sm) !important;
    }
    
    /* Compact headers */
    h1 {
        font-size: 1.5rem !important;
        margin: 0.25rem 0 0.5rem 0 !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
        margin: 0.5rem 0 0.4rem 0 !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
}

/* Tablet (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .main .block-container {
        padding-top: 1rem !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    h1 {
        font-size: 1.65rem !important;
    }
}

/* Desktop (> 1024px) */
@media (min-width: 1025px) {
    .main .block-container {
        padding-top: 1.5rem !important;
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        max-width: 1400px !important;
        margin: 0 auto !important;
    }
    
    h1 {
        font-size: 2rem !important;
        margin-top: 0.75rem !important;
    }
}

/* =================================================================== */
/* SPECIFIC COMPONENT FIXES */
/* =================================================================== */

/* Status ribbons - responsive */
.status-ribbon {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin: var(--space-md) 0;
}

@media (max-width: 768px) {
    .status-ribbon {
        flex-direction: column;
    }
}

/* Metric rows on a phone (Nov 2 2026, founder: "big ugly cards"): a row of
   st.metric tiles used to stack into full-width cards, one value per screen
   third. Now the row keeps its tiles side by side and wraps: a column with no
   metric (a label/description) takes the full width, metric columns share
   the next line three-up. Compact tile, smaller value. */
@media (max-width: 768px) {
    [data-testid="stHorizontalBlock"]:has([data-testid="stMetric"]) {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: var(--space-sm) !important;
    }
    [data-testid="stHorizontalBlock"]:has([data-testid="stMetric"]) > [data-testid="stColumn"] {
        flex: 1 1 calc(33.333% - var(--space-sm)) !important;
        min-width: calc(33.333% - var(--space-sm)) !important;
        width: auto !important;
    }
    [data-testid="stHorizontalBlock"]:has([data-testid="stMetric"]) > [data-testid="stColumn"]:not(:has([data-testid="stMetric"])) {
        flex-basis: 100% !important;
        min-width: 100% !important;
    }
    /* exactly four metric tiles: 2 x 2, never 3 + a lonely full-width one */
    /* (no nested :has(), which browsers reject: a 4-column row whose FIRST
       column is a metric is an all-metric strip; a label + 3 row is not) */
    [data-testid="stHorizontalBlock"]:has(> [data-testid="stColumn"]:nth-child(4):last-child):has(> [data-testid="stColumn"]:first-child [data-testid="stMetric"]) > [data-testid="stColumn"] {
        flex-basis: calc(50% - var(--space-sm)) !important;
        min-width: calc(50% - var(--space-sm)) !important;
    }
    [data-testid="stMetric"] {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    /* a narrow tile wraps a long value ("-108 DraftKings") instead of "-108 dra..." */
    [data-testid="stMetricValue"],
    [data-testid="stMetricValue"] > div {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        overflow-wrap: anywhere !important;
    }
}

/* =================================================================== */
/* PRINT STYLES (Bonus) */
/* =================================================================== */

@media print {
    .stButton, .stSidebar, .stSpinner {
        display: none !important;
    }
    
    .main .block-container {
        padding: 0 !important;
    }
}

/* =================================================================== */
/* DARK MODE OPTIMIZATION */
/* =================================================================== */

@media (prefers-color-scheme: dark) {
    /* Already dark, enhance contrast */
    [data-testid="stMetric"] {
        background: rgba(30, 58, 138, 0.15) !important;
    }
}

/* =================================================================== */
/* LANDSCAPE MOBILE */
/* =================================================================== */

@media (max-width: 768px) and (orientation: landscape) {
    /* Extra compact in landscape mode */
    .main .block-container {
        padding-top: 0.25rem !important;
    }
    
    h1 {
        font-size: 1.35rem !important;
        margin: 0.25rem 0 0.4rem 0 !important;
    }
    
    [data-testid="stMetric"] {
        padding: 0.5rem !important;
    }
}

