/* ════════════════════════════════════════════════════════════════
   ITALIACRIT — Professional Cycling Statistics Platform
   Design System v3 · Override layer su style.css
   Ispirazione: FirstCycling × ProCyclingStats × Sofascore
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS (light = default) ───────────────────────────── */
:root {
  /* Background system */
  --bg-primary:   #F5F7FA;
  --bg-secondary: #FFFFFF;
  --bg-card:      #FFFFFF;
  --bg-elevated:  #EEF1F4;

  /* Text */
  --text-primary:   #111827;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;

  /* Accent — orange sports */
  --red-hot:    #FF6B00;
  --red-deep:   #D95A00;
  --red-glow:   rgba(255, 107, 0, 0.12);

  /* Secondary accent (podio giallo → warm amber) */
  --yellow-race: #F59E0B;
  --yellow-dim:  #D97706;

  /* Status */
  --green:  #10B981;
  --danger: #EF4444;

  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-active: rgba(255, 107, 0, 0.35);

  /* Typography — Inter ovunque */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Inter', system-ui, sans-serif;

  /* Sizing */
  --size-hero:  clamp(2.5rem, 6vw, 5rem);
  --size-h1:    clamp(1.6rem, 3vw, 2.5rem);
  --size-h2:    clamp(1.2rem, 2vw, 1.6rem);
  --size-label: 0.68rem;
  --size-body:  0.875rem;
  --size-mono:  0.8125rem;

  /* Gradients — no random gradients, solo utility */
  --gradient-hero:   linear-gradient(160deg, #F5F7FA 0%, #EEF1F4 100%);
  --gradient-male:   linear-gradient(180deg, #F5F7FA, #FFFFFF);
  --gradient-female: linear-gradient(180deg, #F5F7FA, #FFFFFF);

  /* Radius */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  /* Shadow — extremely subtle */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 2px 8px rgba(0,0,0,0.06);

  /* Nav */
  --nav-h: 60px;
}

/* Dark mode */
body:not(.light-mode) {
  --bg-primary:   #0F1117;
  --bg-secondary: #16181F;
  --bg-card:      #1C1F2A;
  --bg-elevated:  #242734;
  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;
  --border-subtle: rgba(255,255,255,0.07);
  --border-active: rgba(255,107,0,0.45);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 2px 8px rgba(0,0,0,0.35);
  --gradient-male:   linear-gradient(180deg, #1C1F2A, #242734);
  --gradient-female: linear-gradient(180deg, #1C1F2A, #242734);
}

body.light-mode {
  --bg-primary:   #F5F7FA;
  --bg-secondary: #FFFFFF;
  --bg-card:      #FFFFFF;
  --bg-elevated:  #EEF1F4;
  --text-primary:   #111827;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;
  --border-subtle: rgba(0,0,0,0.07);
  --border-active: rgba(255,107,0,0.35);
}

/* ── BASE ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Tabular numbers su tutti i dati numerici */
table, .rank-num, .rank-pts, .cat-pts,
.athlete-pts-value, .athlete-stat-val,
.team-stat-val, .td-pts, .td-pos,
.td-time, .sparkline-tooltip {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── NAVBAR ─────────────────────────────────────────────────────── */
#navbar {
  height: var(--nav-h);
  background: #111827 !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 8px rgba(0,0,0,0.35);
  padding: 0 24px;
  gap: 0;
}

.nav-logo-img {
  height: 52px;
}

.nav-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.12);
  margin: 0 16px;
  opacity: 1;
}

.nav-links {
  gap: 2px;
}

.nav-link {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}

/* Link nella navbar nera */
#navbar .nav-link {
  color: rgba(255,255,255,0.65);
}
#navbar .nav-link:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.08);
}
#navbar .nav-link.active {
  color: var(--red-hot);
  background: rgba(255,107,0,0.15);
  font-weight: 600;
}

/* ── Navbar dropdown groups ─────────────────────────────────────── */
.nav-group {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-group-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-chevron {
  font-size: .6em;
  transition: transform .2s;
  display: inline-block;
  opacity: .6;
}
.nav-group.open .nav-chevron { transform: rotate(180deg); opacity: 1; }

.nav-group-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #1f2937;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  padding: 5px 0;
  min-width: 150px;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s;
}
.nav-group.open .nav-group-panel {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-group-item {
  display: block;
  padding: 9px 18px;
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: background .1s, color .1s;
  white-space: nowrap;
}
.nav-group-item:hover  { background: rgba(255,255,255,0.08); color: #fff; }
.nav-group-item.active { color: var(--red-hot); background: rgba(255,107,0,0.12); font-weight: 600; }

/* Gruppo attivo: il bottone si illumina */
.nav-group-btn.active { color: var(--red-hot) !important; background: rgba(255,107,0,0.15) !important; font-weight: 600; }

/* ── Drawer msg badge (mobile) ───────────────────────────────────── */
.drawer-msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red-hot);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
}

/* ── Mobile drawer section labels ───────────────────────────────── */
.drawer-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: 12px 16px 4px;
  text-transform: uppercase;
}

/* Link nel drawer mobile (sfondo chiaro) */
#nav-drawer .nav-link {
  color: var(--text-primary);
}
#nav-drawer .nav-link:hover {
  color: var(--red-hot);
  background: var(--bg-elevated);
}

/* Footer link */
.footer-link {
  color: inherit;
  opacity: .7;
  text-decoration: none;
}
.footer-link:hover { opacity: 1; text-decoration: underline; }
#nav-drawer .nav-link.active {
  color: var(--red-hot);
  background: var(--red-glow);
  font-weight: 600;
}

.nav-search-wrap { margin-left: 20px; }

#nav-search {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  width: 180px;
  transition: border-color 0.15s, width 0.2s;
  outline: none;
}

#nav-search::placeholder { color: rgba(255,255,255,0.4); }
#nav-search:focus { border-color: var(--red-hot); width: 220px; }

.nav-search-icon { color: rgba(255,255,255,0.4); }

.badge-live { color: rgba(255,255,255,0.9); }

.theme-toggle { color: rgba(255,255,255,0.6); }
.theme-toggle:hover { color: #ffffff; background: rgba(255,255,255,0.08); }

#nav-hamburger span { background: rgba(255,255,255,0.8); }

.nav-search-icon { color: var(--text-muted); }

.badge-live {
  background: #EF4444;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  animation: none;
  box-shadow: none;
}

.badge-live .dot {
  background: #fff;
  animation: blink-dot 1s infinite;
}

.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--red-hot);
  background: var(--red-glow);
}

#nav-hamburger span {
  background: var(--text-secondary);
}

#nav-drawer {
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  top: var(--nav-h);
  box-shadow: var(--shadow-lg);
}

#nav-drawer .nav-link {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
}

/* ── LAYOUT ─────────────────────────────────────────────────────── */
#app {
  padding-top: var(--nav-h);
  background: var(--bg-primary);
}

.page {
  padding: 32px 24px;
  max-width: none;
}

.page-enter {
  animation: fade-in 0.18s ease;
}

/* ── SEARCH DROPDOWN ────────────────────────────────────────────── */
#search-results-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  margin-top: 4px;
}

.search-result-item {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

.search-result-item:hover { background: var(--bg-elevated); }

.search-result-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.search-result-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.search-result-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ── SECTION HEADER ─────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text-primary);
}

.section-subtitle {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── CATEGORY CARDS (HOME) ──────────────────────────────────────── */
.cat-grid {
  gap: 12px;
  margin-bottom: 40px;
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.cat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255,107,0,0.2);
}

.cat-card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px;
}

.cat-card-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.cat-card-body { padding: 4px 0; }

.cat-card-row {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
}

.cat-card-row:hover { background: var(--bg-elevated); }
.cat-card-row:last-child { border-bottom: none; }

.cat-pos {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.cat-pos.p1 { color: #D97706; }
.cat-pos.p2 { color: #6B7280; }
.cat-pos.p3 { color: #92400E; }

.cat-rider-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-primary);
}

.cat-rider-name a:hover { color: var(--red-hot); }

.cat-rider-team {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.cat-pts {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--red-hot);
  font-variant-numeric: tabular-nums;
  animation: none;
}

/* ── BADGE CATEGORIA ────────────────────────────────────────────── */
.badge-cat {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid currentColor;
}

/* ── TAB BUTTONS ────────────────────────────────────────────────── */
.tab-group {
  gap: 4px;
}

.tab-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all 0.15s;
  box-shadow: none;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

.tab-btn.active-gender {
  background: var(--red-hot);
  border-color: var(--red-hot);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

.tab-btn.active-cat {
  background: var(--bg-elevated);
  border-color: var(--red-hot);
  color: var(--red-hot);
  font-weight: 600;
  box-shadow: none;
}

/* ── RANKING TABLE ──────────────────────────────────────────────── */
.ranking-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.ranking-table {
  border-collapse: collapse;
}

.ranking-table th {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.ranking-row {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s;
  animation: none;
  cursor: default;
}

.ranking-row:last-child { border-bottom: none; }

.ranking-row:hover {
  background: rgba(255,107,0,0.04);
  border-left: 2px solid var(--red-hot);
}

.ranking-row td {
  padding: 10px 16px;
  vertical-align: middle;
  font-size: 0.875rem;
}

.rank-num {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  animation: none;
  min-width: 28px;
  display: block;
  font-variant-numeric: tabular-nums;
}

.rank-num.p1 { color: #D97706; }
.rank-num.p2 { color: #6B7280; }
.rank-num.p3 { color: #92400E; }

.rank-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  display: block;
  color: var(--text-primary);
}

.rank-name a:hover { color: var(--red-hot); text-decoration: none; }

.rank-team a {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.rank-team a:hover { color: var(--text-primary); }

.rank-pts {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--red-hot);
  animation: none;
  font-variant-numeric: tabular-nums;
}

.rank-progress-wrap { gap: 2px; }
.rank-progress-bar {
  height: 2px;
  border-radius: 1px;
  background: var(--red-hot);
  max-width: 160px;
}

/* ── HERO BAND ──────────────────────────────────────────────────── */
.hero-band {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 28px 24px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.hero-band::before { display: none; }

.hero-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin-bottom: 6px;
}

.hero-race-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}

.hero-race-meta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.hero-pos {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-pos.p1 { color: #D97706; }
.hero-pos.p2 { color: #6B7280; }
.hero-pos.p3 { color: #92400E; }

.hero-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-primary);
}

.hero-team { font-size: 0.8125rem; color: var(--text-secondary); }

.hero-pts {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--red-hot);
  font-variant-numeric: tabular-nums;
}

/* ── ATHLETE HEADER ─────────────────────────────────────────────── */
.athlete-header {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 32px;
  margin-bottom: 24px;
  overflow: visible;
}

.athlete-header::before { display: none; }

.athlete-cognome {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--size-hero);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--text-primary);
}

.athlete-nome {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.athlete-pts-dot { background: var(--red-hot); animation: none; }

.athlete-pts-value {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--red-hot);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.athlete-pts-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.athlete-stats-bar {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  margin-top: 20px;
}

.athlete-stat {
  padding: 14px 20px;
  border-right: 1px solid var(--border-subtle);
}

.athlete-stat-val {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  display: block;
}

.athlete-stat-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* ── SPARKLINE ──────────────────────────────────────────────────── */
.sparkline-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 24px;
}

.sparkline-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.sparkline-tooltip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
}

/* ── RESULTS TABLE ──────────────────────────────────────────────── */
.results-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.results-table {
  border-collapse: collapse;
}

.results-table th {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.results-table tr:nth-child(even) { background: transparent; }
.results-table tr:nth-child(odd)  { background: transparent; }

.results-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s;
}

.results-table tbody tr:last-child { border-bottom: none; }

.results-table tbody tr:hover {
  background: rgba(255,107,0,0.04);
  border-left: 2px solid var(--red-hot);
}

.results-table td {
  padding: 9px 16px;
  vertical-align: middle;
  font-size: 0.875rem;
}

.td-pos {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.td-pos.p1 { color: #D97706; }
.td-pos.p2 { color: #6B7280; }
.td-pos.p3 { color: #92400E; }
.td-pos.win { color: var(--red-hot); }

.td-date {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.td-race a { color: var(--text-primary); font-weight: 500; }
.td-race a:hover { color: var(--red-hot); }

.td-pts {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--red-hot);
  font-variant-numeric: tabular-nums;
}

.td-time {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ── TEAM HEADER ────────────────────────────────────────────────── */
.team-header {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.team-name-display {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.team-stat-val {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--red-hot);
  font-variant-numeric: tabular-nums;
  display: block;
}

.team-stat-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

/* ── RACE HEADER ────────────────────────────────────────────────── */
.race-header {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.race-name-display {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.race-meta-row {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.race-meta-sep { color: var(--border-subtle); }

/* ── CALENDARIO PAGE ────────────────────────────────────────────── */
.calendar-list { gap: 4px; }

/* Toggle Lista / Mappa */
.cal-view-toggle {
  display: flex;
  gap: 4px;
  margin: 12px 0 8px;
}
.cal-view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cal-view-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.cal-view-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* Contenitore mappa Leaflet */
#cal-map {
  height: 560px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-top: 4px;
}
@media (max-width: 600px) {
  #cal-map { height: 400px; }
}

.cal-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 12px 16px;
  box-shadow: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  animation: none;
}

.cal-item:hover {
  border-color: rgba(255,107,0,0.3);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

.cal-day {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cal-month {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cal-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-primary);
}

.cal-name a:hover { color: var(--red-hot); }

.cal-cat {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.cal-filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
}

/* ── RANKING CONTROLS ───────────────────────────────────────────── */
#ranking-search {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  outline: none;
}

#ranking-search:focus { border-color: var(--red-hot); }

.ranking-count {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── CAROUSEL ───────────────────────────────────────────────────── */
.carousel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.carousel-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255,107,0,0.2);
}

.carousel-date {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.carousel-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-primary);
}

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn-action {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 7px 16px;
  border-radius: var(--r-sm);
  transition: all 0.15s;
  box-shadow: none;
}

.btn-action:hover {
  background: var(--red-hot);
  border-color: var(--red-hot);
  color: #fff;
}

/* ── TREND INDICATORS ───────────────────────────────────────────── */
.trend { font-family: 'Inter', system-ui, sans-serif; font-size: 0.6875rem; }
.trend-up { color: #10B981; }
.trend-down { color: #EF4444; }
.trend-stable { color: var(--text-muted); opacity: 0.7; }
.trend-new { background: #3B82F6; color: #fff; font-size: 0.5625rem; padding: 1px 5px; border-radius: 3px; }

.rank-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.rank-badge .b-num {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ── CATEGORY DIVIDER ───────────────────────────────────────────── */
.category-divider {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ── TD-P (posizioni spaccate) ──────────────────────────────────── */
.td-p-wrap { font-family: 'Inter', system-ui, sans-serif; font-size: 0.8125rem; display: flex; gap: 10px; justify-content: center; }
.ranking-table td:nth-child(6) { text-align: center; }
.td-p.p1 { color: #D97706; }
.td-p.p2 { color: #6B7280; }
.td-p.p3 { color: #92400E; }
.td-p.pout { color: var(--text-muted); }

/* ── SHARE MODAL ────────────────────────────────────────────────── */
.share-modal-overlay {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.share-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.share-modal-header { border-bottom: 1px solid var(--border-subtle); }

.share-modal-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.share-modal-close {
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  background: transparent;
}

.share-modal-close:hover { border-color: var(--red-hot); color: var(--red-hot); }

.share-format-selector { border-bottom: 1px solid var(--border-subtle); }

.share-format-btn {
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.share-format-btn:hover { border-color: rgba(0,0,0,0.15); color: var(--text-primary); }
.share-format-btn.active { border-color: var(--red-hot); background: var(--red-glow); color: var(--red-hot); }

.share-format-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 600;
}

.share-preview-wrap { background: var(--bg-elevated); border-bottom: 1px solid var(--border-subtle); }

.share-action-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--r-md);
  letter-spacing: 0;
  text-transform: none;
}

.share-action-download { background: var(--red-hot); }
.share-action-download:hover { background: var(--red-deep); transform: none; box-shadow: none; }

.share-action-native {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary);
}

.share-platforms {
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 20px;
}

.share-plat-btn {
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  transition: all 0.15s;
}

.share-plat-btn:hover { transform: none; box-shadow: var(--shadow-sm); }
.share-plat-btn.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,.25); }
.plat-post.active { border-color: #6366f1; }

.share-plat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--bg-card);
}

.share-plat-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.5625rem;
  font-weight: 600;
}

/* ── AUTH PAGES ─────────────────────────────────────────────────── */
.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 32px 16px 64px;
}

/* Brand identity block above the card */
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--red-hot);
  line-height: 1;
}

.auth-brand-sub {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Main card */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--red-hot);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
  padding: 36px 40px 40px;
  width: 100%;
  max-width: 420px;
}

.auth-card-header { margin-bottom: 24px; }

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.auth-sub {
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin: 0;
}

/* Field wrapper: label + input stacked */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.auth-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Input with optional leading icon */
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap .auth-input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  font-size: 0.9375rem;
  padding: 11px 14px 11px 38px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Input without icon — used outside .auth-input-wrap */
.auth-input.no-icon { padding-left: 14px; }

.auth-input:focus {
  border-color: var(--red-hot);
  box-shadow: 0 0 0 3px var(--red-glow);
  outline: none;
}

/* Primary CTA button */
.auth-btn {
  width: 100%;
  margin-top: 8px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red-hot);
  border: none;
  border-radius: var(--r-sm);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.auth-btn:hover {
  background: var(--red-deep);
  box-shadow: 0 4px 16px rgba(255,107,0,0.35);
  transform: translateY(-1px);
}

.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Secondary / outline variant */
.auth-btn-secondary {
  margin-top: 0;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.auth-btn-secondary:hover {
  border-color: var(--red-hot);
  color: var(--red-hot);
  background: var(--red-glow);
  box-shadow: none;
  transform: none;
}

/* Divider between primary and secondary actions */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--r-sm);
  color: #EF4444;
  font-size: 0.8125rem;
  padding: 9px 12px;
  margin-bottom: 16px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-switch a { color: var(--red-hot); font-weight: 600; }

.profile-info-row {
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

.profile-info-row span:first-child {
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-result-row {
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  padding: 9px 12px;
  transition: background 0.1s;
}

.link-result-row:hover { background: rgba(255,107,0,0.06); }

body.light-mode .auth-card { background: #fff; box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.05); }
body.light-mode .auth-input { background: #f8f8f8; border-color: #e0e0e0; }
body.light-mode .auth-input:focus { background: #fff; }
body.light-mode .link-result-row { background: var(--bg-elevated); }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 32px; }
  .auth-brand-name { font-size: 1.25rem; }
}

/* ── PHOTO AREA ─────────────────────────────────────────────────── */
.photo-cam-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red-hot);
  border: 2px solid var(--bg-card);
  transition: background 0.15s, transform 0.15s;
}

.photo-cam-btn:hover { background: var(--red-deep); transform: scale(1.08); }

.upload-toast {
  background: var(--text-primary);
  color: var(--bg-card);
  border-radius: var(--r-md);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  padding: 10px 20px;
}

/* ── Editor di ritaglio foto ───────────────────────────────────── */
.crop-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.crop-modal {
  background: var(--bg-card, #fff); border: 1px solid var(--border-subtle, #e2e2e2);
  border-radius: 14px; padding: 22px; width: 100%; max-width: 360px;
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}
.crop-title {
  font-family: var(--font-display, sans-serif); font-size: 1.15rem;
  color: var(--text-primary); margin-bottom: 14px; text-align: center;
}
.crop-stage {
  position: relative; margin: 0 auto; border-radius: 10px; overflow: hidden;
  background: #0c0c0c; touch-action: none; user-select: none;
}
.crop-stage canvas { display: block; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-frame {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.55) inset;
}
.crop-frame--circle {
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35); border-radius: 50%;
}
.crop-controls {
  display: flex; align-items: center; gap: 10px; margin: 16px 2px 6px;
}
.crop-controls input[type=range] { flex: 1; accent-color: var(--red-hot, #e63329); cursor: pointer; }
.crop-zoom-ico { font-size: 1.1rem; color: var(--text-secondary); width: 14px; text-align: center; }
.crop-hint { font-size: .74rem; color: var(--text-muted); text-align: center; margin: 0 0 16px; }
.crop-actions { display: flex; gap: 12px; }
.crop-actions .auth-btn { flex: 1; }

/* ── Card "Il mio profilo" (campi personali) ───────────────────── */
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 10px; }
.pf-full { grid-column: 1 / -1; }
.pf-label { display: flex; flex-direction: column; gap: 4px; font-size: .76rem; font-weight: 600; color: var(--text-secondary); }
.pf-input {
  padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: var(--r-sm, 6px);
  background: var(--bg-base, #fff); color: var(--text-primary); font-size: .85rem; font-weight: 400;
  font-family: inherit; width: 100%; box-sizing: border-box;
}
.pf-input:focus { outline: none; border-color: var(--accent, #e63329); }
textarea.pf-input { resize: vertical; }
@media (max-width: 560px) { .pf-grid { grid-template-columns: 1fr; } }

/* ── ADMIN EDIT BUTTON ──────────────────────────────────────────── */
.admin-edit-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  padding: 5px 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  transition: all 0.15s;
}

.admin-edit-btn:hover {
  background: var(--red-hot);
  border-color: var(--red-hot);
  color: #fff;
}

/* ── NOT FOUND ──────────────────────────────────────────────────── */
.not-found h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 4rem;
  font-weight: 800;
  color: var(--red-hot);
}

.not-found p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ── EMPTY STATE ────────────────────────────────────────────────── */
.empty-state {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0;
  color: var(--text-muted);
}

/* ── LOADING BAR ────────────────────────────────────────────────── */
.loading-bar {
  height: 2px;
  background: var(--red-hot);
  animation: shimmer 1.2s linear infinite;
  border-radius: 0;
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 20px 24px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

footer strong {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-secondary);
}

footer .footer-sep { color: var(--border-subtle); margin: 0 10px; }

/* ── CALENDAR HOME ROWS ─────────────────────────────────────────── */
a.hcal-row {
  display: flex;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.1s;
  font-size: 0.875rem;
}

a.hcal-row:hover {
  background: rgba(255,107,0,0.04);
  border-color: var(--red-hot) !important;
}

/* ── SCROLLBAR ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── ANIMATIONS — solo fade, no bounce ─────────────────────────── */
@keyframes fade-in {
  from { opacity: 0; transform: scale(0.984) translateY(10px); }
  to   { opacity: 1; transform: scale(1)     translateY(0); }
}
@keyframes page-exit {
  from { opacity: 1; transform: scale(1)     translateY(0); }
  to   { opacity: 0; transform: scale(0.96)  translateY(-8px); }
}

.page-enter { animation: fade-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
.page-exit  { animation: page-exit 0.18s ease forwards; pointer-events: none; }

/* Disabilita animazioni aggressive dello stile base */
.ranking-row { animation: none !important; }
.cat-pts { animation: none !important; }
.rank-pts { animation: none !important; }
.rank-num { animation: none !important; }
.cat-card-row { animation: none !important; }
.cal-item { animation: none !important; }
.hero-podio-row { animation: none !important; }
.slide-up { animation: fade-in 0.2s ease !important; }

/* ── MOBILE ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  #navbar { height: var(--nav-h); padding: 0 12px; }
  .nav-logo-img { height: 38px; }
  /* +52px per la barra di ricerca mobile fissa sotto l'header */
  #app { padding-top: calc(var(--nav-h) + 52px); }
  #nav-drawer { top: var(--nav-h); }

  /* Chip si espande tra logo e search */
  #ctx-chip {
    flex-grow: 1;
    order: 2;
    margin: 0 6px;
    min-width: 0;
    justify-content: center;
  }
  #ctx-chip .ctx-chip-lbl { max-width: none; }

  .page { padding: 20px 16px; }

  .athlete-header { padding: 16px; }
  .team-header { padding: 16px; }
  .race-header { padding: 16px; }

  /* Foto + info: stack verticale su mobile */
  .profile-photo-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  /* Foto più piccola su mobile */
  .profile-photo-row .photo-area {
    width: 72px !important;
    height: 72px !important;
  }

  /* Nome atleta */
  .athlete-cognome { font-size: clamp(1.5rem, 6vw, 2rem) !important; }
  .athlete-nome    { font-size: clamp(1.1rem, 4.5vw, 1.5rem) !important; }
  .athlete-pts-display { gap: 12px !important; flex-wrap: wrap; }

  /* Stats atleta: scroll orizzontale */
  .athlete-stats-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .athlete-stat { min-width: 72px; }
  .athlete-stat-val { font-size: 1.25rem !important; }

  /* Nome e stats team — mobile */
  .team-name-display { font-size: clamp(1.15rem, 5vw, 1.8rem) !important; margin-bottom: 10px; }
  .team-header-identity { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }
  .team-header-identity .photo-area { width: 72px !important; height: 72px !important; }
  /* Grid 3 colonne invece di scroll orizzontale */
  .team-stats-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    overflow-x: unset !important;
    flex-wrap: unset !important;
    gap: 0 !important;
    padding-bottom: 0 !important;
  }
  .team-stat { min-width: unset !important; flex-shrink: unset !important; padding: 10px 8px !important; border-right: 1px solid rgba(255,255,255,0.07); border-bottom: 1px solid rgba(255,255,255,0.07); }
  .team-stat:nth-child(3n) { border-right: none !important; }
  .team-stat-val { font-size: 1.2rem !important; }
  .team-stat-label { font-size: 0.6rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .cal-item { grid-template-columns: 56px 1fr; }
  .cal-badges { display: none; }

  .tab-btn { padding: 5px 12px; font-size: 0.75rem; }

  .ranking-row td { padding: 9px 12px; }
  .ranking-table th, .results-table th { padding: 8px 12px; }

  /* ── TABELLA RISULTATI ATLETA: layout 2 righe ── */
  /* Colonne: 1=data 2=gara 3=cat 4=pos 5=molt 6=km 7=media 8=pts */
  .atleta-results,
  .atleta-results tbody { display: block; width: 100%; }
  .atleta-results thead { display: none; }
  .atleta-results tr {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 5px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
  }
  .atleta-results tr:hover { background: var(--bg-elevated) !important; }
  /* Riga 1: POS · GARA (span 2 col centrali) · PTS */
  .atleta-results td:nth-child(4) { grid-column: 1; grid-row: 1; align-self: center; }
  .atleta-results td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; align-self: center; white-space: normal; word-break: break-word; }
  .atleta-results td:nth-child(8) { grid-column: 4; grid-row: 1; align-self: center; text-align: right !important; }
  /* Riga 2: DATA · KM · MEDIA · MOLT */
  .atleta-results td:nth-child(1) { grid-column: 1; grid-row: 2; font-size: 0.72rem; color: var(--text-muted); align-self: center; }
  .atleta-results td:nth-child(6) { grid-column: 2; grid-row: 2; font-size: 0.72rem; color: var(--text-muted); align-self: center; }
  .atleta-results td:nth-child(7) { grid-column: 3; grid-row: 2; font-size: 0.72rem; color: var(--text-muted); align-self: center; }
  .atleta-results td:nth-child(5) { grid-column: 4; grid-row: 2; align-self: center; text-align: right !important; }
  /* Nascosto: CAT (già visibile nell'header della pagina) */
  .atleta-results td:nth-child(3) { display: none; }

  /* ── TABELLA RISULTATI TEAM: layout 2 righe ── */
  /* Colonne: 1=data 2=gara 3=atleta 4=pos 5=molt 6=km 7=media 8=rnk 9=pts */
  .team-results,
  .team-results tbody { display: block; width: 100%; }
  .team-results thead { display: none; }
  .results-table-wrap { overflow-x: visible !important; }
  .team-results tr {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 5px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
  }
  .team-results tr:hover { background: var(--bg-elevated) !important; }
  /* Riga 1: POS · GARA (span 2) · PTS */
  .team-results td:nth-child(4) { grid-column: 1; grid-row: 1; align-self: center; }
  .team-results td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; align-self: center; white-space: normal; word-break: break-word; }
  .team-results td:nth-child(9) { grid-column: 4; grid-row: 1; align-self: center; text-align: right !important; }
  /* Riga 2: DATA · ATLETA · KM · MOLT */
  .team-results td:nth-child(1) { grid-column: 1; grid-row: 2; font-size: 0.72rem; color: var(--text-muted); align-self: center; }
  .team-results td:nth-child(3) { grid-column: 2; grid-row: 2; align-self: center; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .team-results td:nth-child(6) { grid-column: 3; grid-row: 2; font-size: 0.72rem; color: var(--text-muted); align-self: center; }
  .team-results td:nth-child(5) { grid-column: 4; grid-row: 2; align-self: center; text-align: right !important; }
  /* Nascosti: media e rank team (meno prioritari) */
  .team-results td:nth-child(7),
  .team-results td:nth-child(8) { display: none; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  :root { --nav-h: 56px; }
  #navbar { height: var(--nav-h); }
  .nav-logo-img { height: 40px; }
  #app { padding-top: var(--nav-h); }
  #nav-drawer { top: var(--nav-h); }
}

/* ── LAYOUT REFINEMENTS ─────────────────────────────────────────── */

/* Titoli pagina — più compatti, meno imponenti */
h1[style*="font-display"], h1[style*="font-family"] {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 1.375rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Hero-name nei risultati — no uppercase */
.hero-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* Sezione leader mensili nella classifica — meno pesante */
.hero-band {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px !important;
  margin-bottom: 0;
}

/* Hero-band container su classifica — riduce gap */
.hero-band + .hero-band { margin-top: 0; }

/* "VAI ALLA CLASSIFICA COMPLETA" — link testuale discreto */
.btn-action.full {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  padding: 4px 0 !important;
  text-align: left !important;
  box-shadow: none !important;
  letter-spacing: 0.02em;
  display: inline-block;
  width: auto !important;
}

.btn-action.full:hover {
  background: transparent !important;
  border: none !important;
  color: var(--red-hot) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Punti nelle panoramica card — più grandi e dominanti */
.cat-pts {
  font-size: 1rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

/* hero-label "LEADER MENSILI" — più sottile */
.hero-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Sezione header section-title — più pulita */
.section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

/* Griglia leader su classifica — riduce spazio inferiore */
div[style*="grid-template-columns: repeat(auto-fit"] {
  margin-bottom: 24px !important;
}

/* Ranking controls — meno spazio verticale */
.ranking-controls { gap: 8px; margin-bottom: 20px; }

/* Cal item past — meno opacità riduzione */
.cal-item-past { opacity: 0.65; border-style: solid; }
.cal-item-past:hover { opacity: 1; }

/* Popup mappa — cliccabile come card */
.itc-map-popup { transition: background 0.15s; border-radius: 4px; }
.itc-map-popup:hover { background: rgba(0,0,0,0.03); }

/* Deep-link highlight — lampeggia brevemente quando si arriva da un link diretto */
@keyframes calHighlightPulse {
  0%   { box-shadow: 0 0 0 3px rgba(99,102,241,0); background: var(--bg-card); }
  15%  { box-shadow: 0 0 0 3px rgba(99,102,241,0.5); background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.6); }
  70%  { box-shadow: 0 0 0 3px rgba(99,102,241,0.2); background: rgba(99,102,241,0.04); }
  100% { box-shadow: 0 0 0 3px rgba(99,102,241,0); background: var(--bg-card); }
}
.cal-item-highlight {
  animation: calHighlightPulse 2.8s ease-out forwards;
}

/* ════════════════════════════════════════════════════════════════
   COMPARATORE — Sport TV Battle Experience
   ════════════════════════════════════════════════════════════════ */

/* Filter bar */
.comp-filter-bar {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
}

.comp-mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 3px;
  flex-shrink: 0;
}

.comp-tab {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0;
}

.comp-tab-active-a {
  background: #FF6B00;
  color: #fff;
}

.comp-tab-active-b {
  background: #10B981;
  color: #fff;
}

/* Selectors (pre-selection state) */
.comp-selectors {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.comp-selector-group {
  flex: 1;
  min-width: 200px;
}

.comp-select {
  width: 100%;
}

.comp-vs-badge {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  padding-bottom: 2px;
  flex-shrink: 0;
}

/* Selectors compact (when comparison is active) */
.comp-selectors-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.comp-select-inline {
  flex: 1;
  min-width: 160px;
}

.comp-vs-sm {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* Empty state */
.comp-empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.comp-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.comp-empty-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}

.comp-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ══════════════════════════════════════════════════════════════
   COMPARATORE — SPORT TV BATTLE ARENA
   ══════════════════════════════════════════════════════════════ */

/* ── COMPARATORE — Arena atleti ──────────────────────────────── */
.battle-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  margin-bottom: 16px;
}

.battle-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 28px 20px 24px;
  gap: 5px;
}

.battle-side-a {
  background: var(--bg-card);
  border-top: 3px solid #D97706;
}

.battle-side-b {
  background: var(--bg-card);
  border-top: 3px solid #16A34A;
}

.battle-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  margin-bottom: 8px;
  border: 2px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.battle-avatar-a {
  color: #D97706;
  border-color: #D97706;
}

.battle-avatar-b {
  color: #16A34A;
  border-color: #16A34A;
}

.battle-name {
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 2vw, 1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--text-primary);
}

.battle-team {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-stats-row {
  display: flex;
  gap: 16px;
  margin: 10px 0 4px;
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  justify-content: center;
}

.battle-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.battle-stat-val {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.battle-stat-lbl {
  font-size: 0.49rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.battle-form-strip {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.battle-trend {
  font-size: 0.65rem;
  font-weight: 600;
}

/* ── SEPARATORE VS ────────────────────────────────────────────── */
.battle-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  gap: 0;
}

.battle-vs-text {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0.5;
  /* no animation */
}

/* ── PANNELLO VERDETTO ────────────────────────────────────────── */
.battle-verdict {
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.battle-verdict-score {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  padding: 20px 24px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  background: var(--bg-elevated);
}

.battle-verdict-score-a {
  color: #D97706;
  border-right: 1px solid var(--border-subtle);
}

.battle-verdict-score-b {
  color: #16A34A;
  border-left: 1px solid var(--border-subtle);
}

.battle-verdict-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
}

.battle-verdict-label {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.battle-verdict-winner {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}

.battle-verdict-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── SHARE BUTTON ─────────────────────────────────────────────── */
.battle-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.03em;
  margin-top: 4px;
}

.battle-share-btn:hover {
  border-color: #D97706;
  color: #D97706;
  background: rgba(217,119,6,0.06);
}

/* ── BADGES ───────────────────────────────────────────────────── */
.battle-badge-row {
  display: grid;
  grid-template-columns: 1fr 16px 1fr;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 1px;
}

.battle-badges-side {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.battle-badges-a { justify-content: flex-end; }
.battle-badges-b { justify-content: flex-start; }

.comp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid currentColor;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* ── ROUND-BY-ROUND (metric duels) ───────────────────────────── */
.battle-rounds {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.battle-rounds-header {
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.battle-rounds-title {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.battle-round {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s;
}

.dark .battle-round {
  border-bottom-color: rgba(255,255,255,0.05);
}

.battle-round:last-child { border-bottom: none; }

.battle-round-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.battle-round-val-a { text-align: right; }
.battle-round-val-b { text-align: left; }

.battle-round-winner-a .battle-round-val-a { color: #D97706 !important; font-size: 1.12rem; }
.battle-round-winner-b .battle-round-val-b { color: #16A34A !important; font-size: 1.12rem; }

.battle-round-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.battle-round-lbl {
  font-size: 0.585rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.battle-bar-track {
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  width: 100%;
  background: var(--bg-elevated);
}

.battle-bar-a {
  height: 100%;
  background: #D97706;
  transition: width 0.4s ease;
}

.battle-bar-b {
  height: 100%;
  background: #16A34A;
  transition: width 0.4s ease;
}

/* ── TREND ROW ────────────────────────────────────────────────── */
.comp-trend-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 0 6px;
  border-top: 1px solid var(--border-subtle);
}

.comp-trend-val {
  font-size: 0.88rem;
  font-weight: 700;
}

.comp-trend-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.comp-trend-mid {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ── SECTIONS ─────────────────────────────────────────────────── */
.comp-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 12px;
}

.comp-section-title {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── METRIC BARS (usato in buildTeamResult) ───────────────────── */
.comp-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comp-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.comp-bar-row:last-child { border-bottom: none; }

.comp-bar-highlight {
  background: rgba(255,107,0,0.03);
  margin: 0 -24px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.comp-bar-val {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  transition: color 0.15s;
}

.comp-bar-val-a { text-align: right; }
.comp-bar-val-b { text-align: left; }
.comp-bar-winner { color: var(--text-primary) !important; font-size: 1.0625rem; }
.comp-bar-val-a.comp-bar-winner { color: #D97706 !important; }
.comp-bar-val-b.comp-bar-winner { color: #16A34A !important; }

.comp-bar-center {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.comp-bar-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.comp-bar-track {
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  background: var(--bg-elevated);
}

.comp-bar-fill-a {
  height: 100%;
  background: #D97706;
  transition: width 0.4s ease;
}

.comp-bar-fill-b {
  height: 100%;
  background: #16A34A;
  transition: width 0.4s ease;
}

/* ── HEAD TO HEAD ─────────────────────────────────────────────── */
.h2h-score-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 0 10px;
}

.h2h-score-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.h2h-score-right { align-items: flex-end; }

.h2h-score-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.h2h-score-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.h2h-score-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.h2h-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: #16A34A;
}

.h2h-bar-fill {
  height: 100%;
  background: #D97706;
  transition: width 0.4s ease;
}

.h2h-score-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.h2h-table .h2h-win-a { background: rgba(217,119,6,0.05); }
.h2h-table .h2h-win-b { background: rgba(22,163,74,0.05); }

/* ── FORMA RECENTE ────────────────────────────────────────────── */
.comp-recent-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.comp-recent-name {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── DISTANZA TABLE ───────────────────────────────────────────── */
.comp-dist-table {
  width: 100%;
  margin-top: 14px;
  font-size: 0.82rem;
  border-collapse: collapse;
}

.comp-dist-lbl {
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 8px;
}

/* (radar e insights rimossi — sostituiti con dati reali) */
/* ── COMPARATORE AUTOCOMPLETE ────────────────────────────────── */
.comp-ac {
  position: relative;
  flex: 1;
  min-width: 0;
}

.comp-ac-input {
  width: 100%;
  box-sizing: border-box;
}

.comp-ac-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.comp-ac-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.1s;
}

.comp-ac-item:last-child { border-bottom: none; }

.comp-ac-item:hover {
  background: rgba(255,107,0,0.06);
}

.comp-ac-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.comp-ac-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.comp-ac-empty {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ── RACE PHOTO GALLERY ───────────────────────────────────────── */
.race-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.race-gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-elevated);
  cursor: pointer;
}

.race-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.race-gallery-item:hover img { transform: scale(1.03); }

.race-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  font-size: 0.6875rem;
  color: #fff;
  font-weight: 500;
}

.race-photo-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.race-photo-upload-btn:hover {
  background: rgba(255,107,0,0.06);
  border-color: var(--red-hot);
  color: var(--red-hot);
}

/* Lightbox overlay */
#photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#photo-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--r-md);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

/* Admin pending photos */
.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.admin-photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
}

.admin-photo-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.admin-photo-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-photo-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-photo-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-approve {
  flex: 1;
  padding: 5px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--r-sm);
  color: #10B981;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-approve:hover { background: rgba(16,185,129,0.2); }

.btn-reject {
  flex: 1;
  padding: 5px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--r-sm);
  color: #EF4444;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-reject:hover { background: rgba(239,68,68,0.15); }

/* ── MOBILE COMPARATORE ───────────────────────────────────────── */
@media (max-width: 640px) {
  .comp-filter-bar { padding: 12px 14px; gap: 10px; }

  /* Battle Arena mobile */
  .battle-arena { min-height: 180px; }
  .battle-side { padding: 20px 10px 18px; gap: 4px; }
  .battle-avatar { width: 58px; height: 58px; font-size: 1.1rem; margin-bottom: 4px; }
  .battle-name { font-size: 0.82rem; }
  .battle-team { font-size: 0.58rem; max-width: 110px; }
  .battle-stats-row { gap: 12px; margin: 4px 0 2px; }
  .battle-stat-val { font-size: 1.4rem; }
  .battle-vs { padding: 0 10px; }
  .battle-vs-text { font-size: 1.5rem; }

  /* Verdict mobile */
  .battle-verdict-score { font-size: 2rem; padding: 14px 18px; }

  /* Round by round mobile */
  .battle-round { grid-template-columns: 60px 1fr 60px; gap: 6px; padding: 8px 14px; }
  .battle-round-val { font-size: 0.875rem; }
  .battle-round-lbl { font-size: 0.52rem; }

  .comp-section { padding: 16px; }
  .comp-bar-highlight { margin: 0 -16px; padding: 10px 16px; }
  .comp-bar-row { grid-template-columns: 64px 1fr 64px; gap: 8px; }
  .comp-bar-val { font-size: 0.8125rem; }
  .comp-bar-winner { font-size: 0.875rem; }
  .comp-bar-label { font-size: 0.5625rem; }

  .h2h-score-bar { gap: 10px; }
  .h2h-score-num { font-size: 1.75rem; }

  .comp-selectors-compact { gap: 8px; }
  .comp-select-inline { min-width: 120px; font-size: 0.8125rem; }

  /* Badges mobile */
  .battle-badge-row { grid-template-columns: 1fr 8px 1fr; }
  .comp-badge { font-size: 0.62rem; padding: 3px 7px; }

  /* Recent results mobile */
  .comp-recent-split { grid-template-columns: 1fr; gap: 16px; }

  /* Distanza table mobile */
  .comp-dist-table { font-size: 0.78rem; }
}

/* ── Risultati feed grid ─────────────────────────────────── */
.risultati-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width:1024px) {
  .risultati-feed { grid-template-columns: 1fr 1fr; gap:16px; }
}

/* ── Risultati card con foto/video ───────────────────────── */
.ris-card { display:flex; flex-direction:column; overflow:hidden; margin-bottom:0; padding:0; }

.ris-card-media { width:100%; flex-shrink:0; overflow:hidden; border-radius:var(--r-lg) var(--r-lg) 0 0; height:170px; }
@media (max-width:1024px) { .ris-card-media { height:200px; } }
.ris-card-media-split { display:flex; gap:2px; }

/* Metà sinistra: foto */
.ris-card-photo { display:block; width:100%; height:100%; overflow:hidden; text-decoration:none; position:relative; }
.ris-card-photo.ris-media-half { width:50%; flex-shrink:0; }
.ris-card-photo img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s; }
.ris-card-photo:hover img { transform:scale(1.04); }
.ris-photo-credit { position:absolute; bottom:0; left:0; right:0; padding:4px 8px; background:rgba(0,0,0,.6); font-size:0.62rem; color:#ccc; font-family:var(--font-mono); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Metà destra: video thumbnail */
.ris-card-video-thumb { position:relative; cursor:pointer; overflow:hidden; width:100%; height:100%; }
.ris-card-video-thumb.ris-media-half { width:50%; flex-shrink:0; }
.ris-card-video-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s; }
.ris-card-video-thumb:hover img { transform:scale(1.04); }
.ris-video-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.35); transition:background .2s; }
.ris-card-video-thumb:hover .ris-video-play { background:rgba(0,0,0,.55); }
.ris-video-play span { font-size:2.8rem; color:#fff; text-shadow:0 2px 10px rgba(0,0,0,.8); }
.ris-video-channel { position:absolute; bottom:0; left:0; right:0; padding:4px 8px; background:rgba(0,0,0,.6); font-size:0.62rem; color:#ccc; font-family:var(--font-mono); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.ris-card-body { flex:1; padding:20px; min-width:0; }

/* Titolo gara nelle card Risultati — stesso stile del calendario */
.ris-card .hero-race-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

/* Modal player YouTube */
.video-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.85); z-index:9999; display:flex; align-items:center; justify-content:center; padding:16px; box-sizing:border-box; }
.video-modal-box { background:#111; border-radius:12px; overflow:hidden; width:100%; max-width:900px; position:relative; box-shadow:0 8px 48px rgba(0,0,0,.8); }
.video-modal-close { position:absolute; top:8px; right:8px; z-index:10; background:rgba(255,255,255,.15); border:none; color:#fff; font-size:1.1rem; cursor:pointer; border-radius:50%; width:32px; height:32px; display:flex; align-items:center; justify-content:center; }
.video-modal-close:hover { background:rgba(255,255,255,.3); }
.video-modal-title { padding:10px 48px 10px 14px; font-size:0.78rem; color:#bbb; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:var(--font-mono); }
.video-modal-player { position:relative; padding-bottom:56.25%; height:0; }
.video-modal-player iframe { position:absolute; inset:0; width:100%; height:100%; border:none; }

@media (max-width:700px) {
  .risultati-feed { grid-template-columns:1fr; gap:16px; }
  .ris-card-media { height:160px; }
  .ris-card-media-split { flex-direction:column; height:320px; }
  .ris-card-photo.ris-media-half,
  .ris-card-video-thumb.ris-media-half { width:100%; height:50%; }
  .ris-card-body { padding:16px; }
  .ris-card .hero-race-name { font-size:0.95rem !important; }
}

/* ── Tabella gara/team: layout mobile ──────────────────────────── */
.td-team-mobile { display: none; font-size: 0.75rem; font-weight: 400; margin-top: 2px; }

.results-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

@media (max-width: 640px) {
  .td-hide-mobile { display: none !important; }
  .td-team-mobile { display: block; font-size: 0.85rem; }
  .td-pos { font-size: 1rem !important; }
  .team-stats-row { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; overflow-x: unset !important; -webkit-overflow-scrolling: unset !important; flex-wrap: unset !important; gap: 0 !important; padding-bottom: 0 !important; }
  .team-stat { min-width: unset !important; flex-shrink: unset !important; padding: 9px 6px !important; }
  .team-stat-val { font-size: 1.1rem !important; }
  .team-name-display { font-size: clamp(1rem, 4.5vw, 1.5rem) !important; }

  /* ── Tabella classifica — mobile compatta ── */
  .ranking-row td   { padding: 8px 6px; }
  .ranking-table th { padding: 8px 6px; }
  .rank-name        { font-size: 0.8rem; }
  .rank-pts         { font-size: 0.8rem; }
  .rank-num         { font-size: 0.8rem; min-width: 22px; }
  .rk-gap-label     { font-size: 0.6rem; }
  .rk-leader-tag    { font-size: 0.5rem; padding: 1px 4px; }
  /* Nascondi colonne non essenziali su mobile */
  .hide-mobile      { display: none !important; }
}

/* ── HOME v9 — Ticker, Trending, Matchup, Hero Editorial ──────── */

/* Ticker insights */
.home-ticker { overflow:hidden; background:var(--bg-card); border-bottom:1px solid var(--border-subtle); border-top:1px solid var(--border-subtle); padding:0; height:36px; display:flex; align-items:center; margin-bottom:32px; }
.home-ticker-track { display:flex; gap:0; animation:home-ticker-scroll 40s linear infinite; white-space:nowrap; flex-shrink:0; }
.home-ticker-item { display:inline-flex; align-items:center; gap:8px; padding:0 32px; font-size:0.8rem; font-family:var(--font-heading); color:var(--text-secondary); border-right:1px solid var(--border-subtle); height:36px; }
.home-ticker-item strong { color:var(--text-primary); }
@keyframes home-ticker-scroll { 0% { transform:translateX(0) } 100% { transform:translateX(-50%) } }

/* Trending scroll */
.trending-scroll { display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; scrollbar-width:thin; scrollbar-color:var(--border-subtle) transparent; -webkit-overflow-scrolling:touch; margin-bottom:40px; }
.trending-scroll::-webkit-scrollbar { height:4px; }
.trending-scroll::-webkit-scrollbar-track { background:transparent; }
.trending-scroll::-webkit-scrollbar-thumb { background:var(--border-subtle); border-radius:2px; }
.trend-card { flex-shrink:0; width:158px; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:6px; padding:14px 12px; text-decoration:none; color:inherit; transition:border-color .15s,transform .15s; display:flex; flex-direction:column; gap:5px; position:relative; overflow:hidden; }
.trend-card:hover { border-color:var(--red-hot); transform:translateY(-2px); }
.trend-rank { font-family:var(--font-display); font-size:2.2rem; line-height:1; color:var(--border-subtle); position:absolute; top:8px; right:10px; }
.trend-cat-tag { font-size:0.58rem; font-family:var(--font-mono); color:var(--red-hot); text-transform:uppercase; letter-spacing:0.05em; }
.trend-surname { font-family:var(--font-display); font-size:1.15rem; line-height:1; color:var(--text-primary); text-transform:uppercase; margin-top:2px; }
.trend-firstname { font-family:var(--font-heading); font-size:0.8rem; color:var(--text-secondary); font-weight:400; }
.trend-teamname { font-size:0.68rem; color:var(--text-muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.trend-pts-row { display:flex; align-items:baseline; gap:4px; margin-top:auto; padding-top:8px; border-top:1px solid var(--border-subtle); }
.trend-pts { font-family:var(--font-display); font-size:1.7rem; color:var(--yellow-race); line-height:1; }
.trend-pts-label { font-size:0.6rem; color:var(--text-muted); text-transform:uppercase; }
.trend-badges { display:flex; flex-wrap:wrap; gap:3px; }
.trend-badge { font-size:0.6rem; padding:1px 5px; border-radius:2px; }
.trend-badge-win { background:rgba(245,196,0,0.12); color:var(--gold); }
.trend-badge-pod { background:rgba(255,255,255,0.05); color:var(--text-muted); }

/* Home layout */
.home-2col { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:40px; }
.home-section { margin-bottom:40px; overflow:hidden; }
@media(max-width:700px) { .home-2col { grid-template-columns:1fr; } }
#app { overflow-x:hidden; }

/* Forma del momento grid */
.forma-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(175px,1fr)); gap:10px; margin-bottom:0; }
.forma-cat-card { background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:6px; padding:14px 12px; text-decoration:none; color:inherit; display:flex; flex-direction:column; gap:4px; transition:border-color .15s,transform .15s; }
.forma-cat-card:hover { border-color:var(--red-hot); transform:translateY(-2px); }
.forma-cat-badge { margin-bottom:4px; }
.forma-surname { font-family:var(--font-display); font-size:1.15rem; line-height:1; text-transform:uppercase; color:var(--text-primary); }
.forma-firstname { font-size:0.78rem; color:var(--text-secondary); }
.forma-team { font-size:0.65rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.forma-pts-row { display:flex; align-items:baseline; gap:4px; margin-top:auto; padding-top:8px; border-top:1px solid var(--border-subtle); }
.forma-pts { font-family:var(--font-display); font-size:1.7rem; color:var(--yellow-race); line-height:1; }
.forma-pts-label { font-size:0.6rem; color:var(--text-muted); text-transform:uppercase; }
.forma-sub { font-size:0.6rem; color:var(--text-muted); font-family:var(--font-mono); }
.forma-more { font-size:0.62rem; color:var(--red-hot); font-family:var(--font-mono); margin-top:2px; }

/* Team hot labels */
.team-hot-col-label { font-size:0.65rem; font-family:var(--font-mono); text-transform:uppercase; letter-spacing:0.1em; margin-bottom:8px; }
.team-hot-gender-label { font-family:var(--font-heading); font-size:0.72rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.08em; margin-bottom:10px; padding-bottom:6px; border-bottom:1px solid var(--border-subtle); }

/* Rischio posizioni card */
.rischio-card { flex-shrink:0; width:240px; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:6px; padding:12px; display:flex; flex-direction:column; gap:6px; }
.rischio-header { margin-bottom:4px; }
.rischio-row { display:flex; align-items:center; gap:6px; padding:3px 0; border-bottom:1px solid var(--border-subtle); }
.rischio-row:last-of-type { border-bottom:none; }
.rischio-pos { font-family:var(--font-display); font-size:1rem; width:22px; flex-shrink:0; }
.rischio-name { flex:1; font-family:var(--font-heading); font-size:0.78rem; font-weight:600; text-decoration:none; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rischio-name:hover { color:var(--red-hot); }
.rischio-pts { font-family:var(--font-mono); font-size:0.72rem; color:var(--text-secondary); flex-shrink:0; }
.rischio-icon { font-size:0.85rem; flex-shrink:0; }
.rischio-legend { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; font-size:0.55rem; color:var(--text-muted); font-family:var(--font-mono); }

/* Matchup card */
.matchup-card { display:flex; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:6px; overflow:hidden; margin-bottom:40px; }
.matchup-side { flex:1; padding:24px 16px; text-decoration:none; color:inherit; display:flex; flex-direction:column; align-items:center; gap:4px; transition:background .15s; }
.matchup-side:hover { background:var(--bg-elevated); }
.matchup-side-right { border-left:1px solid var(--border-subtle); }
.matchup-pos { font-family:var(--font-display); font-size:1.4rem; line-height:1; }
.matchup-surname { font-family:var(--font-display); font-size:1.5rem; text-align:center; text-transform:uppercase; line-height:1.1; margin-top:4px; }
.matchup-firstname { font-size:0.8rem; color:var(--text-secondary); }
.matchup-pts { font-family:var(--font-display); font-size:3rem; line-height:1; margin-top:auto; }
.matchup-center { width:100px; flex-shrink:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:16px 8px; border-left:1px solid var(--border-subtle); border-right:1px solid var(--border-subtle); gap:6px; }
.matchup-bar { width:64px; height:6px; background:var(--bg-elevated); border-radius:3px; overflow:hidden; }
.matchup-bar-fill { height:100%; border-radius:3px; }
.matchup-vs { font-family:var(--font-display); font-size:1.4rem; color:var(--text-muted); }
.matchup-gap { font-family:var(--font-display); font-size:1.1rem; color:var(--red-hot); }
@media(max-width:480px) { .matchup-card { flex-direction:column; } .matchup-center { width:100%; flex-direction:row; border:none; border-top:1px solid var(--border-subtle); border-bottom:1px solid var(--border-subtle); } .matchup-side-right { border-left:none; border-top:1px solid var(--border-subtle); } }

/* Hero redesigned */
.hero-editorial { position:relative; overflow:hidden; background:var(--gradient-hero); margin-bottom:0; }
.hero-editorial-slides { position:relative; }
.hero-slide-ed { display:none; padding:36px 28px 28px; }
.hero-slide-ed.active { display:block; animation:fadeIn 0.4s ease; }
.hero-ed-label { font-family:var(--font-heading); font-size:0.65rem; letter-spacing:0.18em; text-transform:uppercase; color:var(--red-hot); margin-bottom:12px; display:flex; align-items:center; gap:10px; }
.hero-ed-inner { display:grid; grid-template-columns:1fr auto; gap:24px; align-items:start; }
.hero-ed-race { font-family:var(--font-display); font-size:clamp(1.8rem,5vw,3.2rem); line-height:1; color:var(--text-primary); margin-bottom:8px; }
.hero-ed-meta { font-family:var(--font-heading); font-size:0.82rem; color:var(--text-secondary); display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.hero-ed-winner { background:rgba(255,255,255,0.03); border:1px solid var(--border-subtle); border-radius:6px; padding:14px 16px; min-width:200px; }
.hero-ed-w-label { font-size:0.6rem; font-family:var(--font-mono); color:var(--gold); text-transform:uppercase; letter-spacing:0.1em; margin-bottom:6px; }
.hero-ed-w-name { font-family:var(--font-display); font-size:1.8rem; line-height:1; color:var(--gold); }
.hero-ed-w-surname { font-family:var(--font-display); font-size:2.2rem; line-height:1; }
.hero-ed-w-team { font-size:0.75rem; color:var(--text-muted); margin-top:4px; }
.hero-ed-w-pts { font-family:var(--font-display); font-size:1.4rem; color:var(--yellow-race); margin-top:8px; }
.hero-ed-others { margin-top:12px; display:flex; flex-direction:column; gap:4px; }
.hero-ed-other-row { display:flex; align-items:center; gap:8px; }
.hero-ed-other-pos { font-family:var(--font-display); font-size:1.1rem; width:24px; }
.hero-ed-other-name { font-family:var(--font-heading); font-size:0.88rem; font-weight:600; }
.hero-ed-other-pts { font-family:var(--font-mono); font-size:0.75rem; color:var(--yellow-race); margin-left:auto; }
.hero-ed-nav { display:flex; align-items:center; justify-content:space-between; padding:10px 28px 16px; border-top:1px solid var(--border-subtle); }
.hero-ed-dots { display:flex; gap:6px; }
.hero-ed-dot { width:6px; height:6px; border-radius:50%; background:var(--border-subtle); cursor:pointer; transition:background .2s,transform .2s; border:none; padding:0; }
.hero-ed-dot.active { background:var(--red-hot); transform:scale(1.3); }
.hero-ed-arrows { display:flex; gap:8px; }
.hero-ed-arrow { background:var(--bg-elevated); border:1px solid var(--border-subtle); color:var(--text-secondary); border-radius:4px; padding:4px 10px; font-size:0.9rem; cursor:pointer; transition:color .15s,border-color .15s; }
.hero-ed-arrow:hover { color:var(--text-primary); border-color:var(--red-hot); }
@media(max-width:640px) { .hero-ed-inner { grid-template-columns:1fr; } .hero-ed-winner { min-width:unset; } }

/* Team hot rows */
.team-hot-row { display:flex; align-items:center; gap:12px; padding:10px 12px; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:4px; text-decoration:none; color:inherit; transition:border-color .15s; }
.team-hot-row:hover { border-color:var(--red-hot); }
.team-hot-pos { font-family:var(--font-display); font-size:1.6rem; width:28px; text-align:center; flex-shrink:0; }
.team-hot-name { font-family:var(--font-heading); font-weight:700; font-size:0.9rem; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; min-width:0; }
.team-hot-sub { font-size:0.68rem; color:var(--text-muted); }
.team-hot-wins { text-align:right; flex-shrink:0; }
.team-hot-wins-num { font-family:var(--font-display); font-size:1.5rem; color:var(--yellow-race); line-height:1; }
.team-hot-wins-label { font-size:0.58rem; color:var(--text-muted); text-transform:uppercase; }

/* Upcoming row improvements */
.upcoming-row { display:flex; align-items:center; gap:10px; padding:8px 12px; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:4px; text-decoration:none; color:inherit; transition:border-color .15s; }
.upcoming-row:hover { border-color:var(--red-hot); }
.upcoming-date-block { text-align:center; width:30px; flex-shrink:0; }
.upcoming-day-num { font-family:var(--font-display); font-size:1.4rem; line-height:1; }
.upcoming-mon { font-size:0.58rem; color:var(--text-muted); text-transform:uppercase; }
.upcoming-info { flex:1; min-width:0; }
.upcoming-name { font-family:var(--font-heading); font-weight:700; font-size:0.85rem; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.upcoming-loc { font-size:0.68rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.upcoming-right { display:flex; flex-direction:column; align-items:flex-end; gap:3px; flex-shrink:0; }
.upcoming-countdown { font-size:0.62rem; font-family:var(--font-mono); }
.countdown-today { color:var(--red-hot); font-weight:700; }
.countdown-soon { color:var(--yellow-race); }
.countdown-far { color:var(--text-muted); }

/* Gara hero media panel (foto + video affiancati) */
/* Sempre flex: funziona sia con solo foto, solo video, o entrambi */
.gara-hero-media { display:flex; gap:2px; width:100%; overflow:hidden; border-radius:var(--r-lg); height:260px; margin-bottom:4px; }
.gara-media-half { flex:1; overflow:hidden; position:relative; min-width:0; }
.gara-media-photo img { width:100%; height:100%; object-fit:cover; object-position:center; display:block; transition:transform .3s; }
.gara-media-photo:hover img { transform:scale(1.03); }
.gara-photo-hint { position:absolute; bottom:0; left:0; right:0; padding:5px 8px; background:linear-gradient(transparent,rgba(0,0,0,.65)); font-size:0.65rem; color:rgba(255,255,255,.9); text-align:center; pointer-events:none; }
.gara-media-video { cursor:pointer; background:var(--bg-elevated); }
.gara-media-video img { width:100%; height:100%; object-fit:cover; display:block; }
.gara-media-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.35); transition:background .15s; }
.gara-media-video:hover .gara-media-play { background:rgba(0,0,0,.5); }
.gara-media-play span { font-size:2.8rem; color:#fff; text-shadow:0 2px 10px rgba(0,0,0,.8); }
.gara-media-channel { position:absolute; bottom:24px; left:0; right:0; padding:3px 8px; background:rgba(0,0,0,.55); font-size:0.62rem; color:#ccc; font-family:var(--font-mono); }
/* Titolo del video hero — striscia scura in fondo, sopra il canale */
.gara-video-hero-caption { position:absolute; bottom:0; left:0; right:0; padding:4px 8px; background:rgba(0,0,0,.72); font-size:0.72rem; color:#fff; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; pointer-events:none; }
/* Solo foto (senza video): limita larghezza max così non diventa una striscia sottilissima */
.gara-hero-media:has(.gara-media-photo):not(:has(.gara-media-video)) .gara-media-half { max-width:560px; }
@media(max-width:600px) {
  .gara-hero-media { height:auto; flex-direction:column; gap:3px; }
  .gara-media-half { height:160px; }
  .gara-hero-media:has(.gara-media-photo):not(:has(.gara-media-video)) .gara-media-half { max-width:none; }
}

/* Galleria foto extra — griglia responsive con immagini di dimensione controllata */
.race-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:8px; margin-top:8px; }
.race-gallery-item { position:relative; border-radius:var(--r-md); overflow:hidden; aspect-ratio:4/3; background:var(--bg-elevated); cursor:zoom-in; }
.race-gallery-item img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .25s; }
.race-gallery-item:hover img { transform:scale(1.04); }
.race-gallery-caption { position:absolute; bottom:0; left:0; right:0; padding:4px 7px; background:linear-gradient(transparent,rgba(0,0,0,.65)); font-size:0.62rem; color:rgba(255,255,255,.88); pointer-events:none; }
@media(max-width:480px) { .race-gallery { grid-template-columns:repeat(2,1fr); } }

/* Video gara */
.gara-videos-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; margin-top:12px; }
.gara-video-card { display:flex; flex-direction:column; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--r-md); overflow:hidden; text-decoration:none; color:inherit; transition:border-color .15s,transform .15s; }
.gara-video-card:hover { border-color:var(--red-hot); transform:translateY(-2px); }
.gara-video-thumb { position:relative; width:100%; aspect-ratio:16/9; overflow:hidden; background:var(--bg-elevated); }
.gara-video-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.gara-video-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:2.2rem; color:#fff; text-shadow:0 2px 8px rgba(0,0,0,.7); opacity:.85; transition:opacity .15s; pointer-events:none; }
.gara-video-card:hover .gara-video-play { opacity:1; }
.gara-video-info { padding:10px 12px; }
.gara-video-title { font-family:var(--font-heading); font-weight:700; font-size:0.82rem; line-height:1.35; margin-bottom:4px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.gara-video-meta { font-size:0.68rem; color:var(--text-muted); font-family:var(--font-mono); }
@media(max-width:480px) { .gara-videos-grid { grid-template-columns:1fr; } }

/* ══════════════════════════════════════════════════════════════════
   CINEMATIC HOME REDESIGN
   ══════════════════════════════════════════════════════════════════ */

/* ── CINEMATIC HERO ─────────────────────────────────────────────── */
.ci-hero {
  position: relative;
  min-height: 100vh;
  background: #0F172A;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
  overflow: hidden;
}
.ci-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 40%, rgba(255,107,0,.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 70%, rgba(255,107,0,.06) 0%, transparent 50%),
    linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  pointer-events: none;
}
.ci-hero-bg::after {
  content: 'ITALIACRIT';
  position: absolute;
  bottom: -40px;
  right: -20px;
  font-size: clamp(80px, 15vw, 200px);
  font-weight: 900;
  color: rgba(255,255,255,.02);
  font-family: var(--font-heading);
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.ci-hero-left {
  position: relative;
  z-index: 2;
  padding: clamp(60px, 8vw, 120px) clamp(24px, 5vw, 72px);
}
.ci-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--red-hot);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.ci-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 7vw, 7rem);
  font-weight: 900;
  line-height: 0.92;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.ci-hero-accent { color: var(--red-hot); }
.ci-hero-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,.45);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin: 0 0 36px;
}
.ci-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ci-btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--red-hot);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  transition: background .2s, transform .15s;
}
.ci-btn-primary:hover { background: #e05500; transform: translateY(-1px); }
.ci-btn-ghost {
  display: inline-block;
  padding: 12px 28px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.8);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.12);
  transition: background .2s;
}
.ci-btn-ghost:hover { background: rgba(255,255,255,.12); }
.ci-hero-right {
  position: relative;
  z-index: 2;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px) clamp(40px, 6vw, 80px) 0;
  border-left: 1px solid rgba(255,255,255,.06);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.ci-results-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ci-slides-wrap { position: relative; flex: 1; }
.ci-slide { display: none; animation: ci-fade-in .4s ease; }
.ci-slide.ci-slide-active { display: block; }
@keyframes ci-fade-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.ci-slide-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ci-slide-cat { font-family: var(--font-mono); font-size: 0.7rem; color: rgba(255,255,255,.5); }
.ci-slide-sep { color: rgba(255,255,255,.2); }
.ci-slide-date { font-family: var(--font-mono); font-size: 0.7rem; color: rgba(255,255,255,.4); }
.ci-slide-reg { font-family: var(--font-mono); font-size: 0.7rem; color: rgba(255,255,255,.3); }
.ci-slide-race {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.ci-winner-block { margin-bottom: 16px; }
.ci-winner-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--red-hot);
  margin-bottom: 6px;
}
.ci-winner-name {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.ci-winner-first { color: var(--red-hot); }
.ci-winner-sub { font-size: 0.82rem; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ci-podio { display: flex; flex-direction: column; gap: 6px; }
.ci-podio-row { display: flex; align-items: center; gap: 10px; }
.ci-p2 { color: #C0C0C0; font-weight: 700; font-size: 0.8rem; min-width: 22px; }
.ci-p3 { color: #CD7F32; font-weight: 700; font-size: 0.8rem; min-width: 22px; }
.ci-podio-name { color: rgba(255,255,255,.6); font-size: 0.82rem; text-decoration: none; flex: 1; }
.ci-podio-name:hover { color: #fff; }
.ci-podio-pts { font-size: 0.72rem; color: rgba(255,255,255,.3); font-family: var(--font-mono); }
.ci-hero-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.ci-nav-btn {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.ci-nav-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.ci-dots { display: flex; gap: 6px; flex: 1; }
.ci-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: none; cursor: pointer;
  transition: background .2s, transform .2s;
  padding: 0;
}
.ci-dot.ci-dot-active { background: var(--red-hot); transform: scale(1.3); }

/* ── TICKER ─────────────────────────────────────────────────────── */
.ci-ticker {
  display: flex;
  align-items: center;
  background: var(--red-hot);
  overflow: hidden;
  height: 38px;
}
.ci-ticker-badge {
  background: #fff;
  color: var(--red-hot);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.ci-ticker-outer { flex: 1; overflow: hidden; }
.ci-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ci-ticker 40s linear infinite;
  gap: 0;
}
.ci-ticker-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #fff;
  padding: 0 24px;
  letter-spacing: 0.02em;
}
.ci-ticker-sep { color: rgba(255,255,255,.4); font-size: 1rem; padding: 0 4px; }
@keyframes ci-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ci-ticker:hover .ci-ticker-track { animation-play-state: paused; }

/* ── CORRIDORE IN EVIDENZA ──────────────────────────────────────── */
.ci-row-section {
  background: #F5F7FA;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
}
.ci-row-label-outer {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--red-hot);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.ci-row-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.ci-row-badge { margin-bottom: 12px; }
.ci-row-surname {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  color: #111827;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.ci-row-firstname {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--red-hot);
  letter-spacing: -0.01em;
  margin-top: 4px;
  margin-bottom: 10px;
}
.ci-row-team {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ci-row-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ci-stat-block {
  border-left: 3px solid var(--border-subtle);
  padding-left: 16px;
}
.ci-stat-block.ci-stat-hot { border-left-color: var(--red-hot); }
.ci-stat-num {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  color: #111827;
  line-height: 1;
  letter-spacing: -0.03em;
}
.ci-stat-hot .ci-stat-num { color: var(--red-hot); }
.ci-stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.ci-row-cta {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red-hot);
  text-decoration: none;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: 1px solid var(--red-hot);
  padding-bottom: 2px;
  transition: opacity .2s;
}
.ci-row-cta:hover { opacity: .7; }

/* ── SECTION SHARED UTILS ──────────────────────────────────────── */
.ci-section-hd {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.ci-section-hd-dark .ci-section-title { color: #fff; }
.ci-section-hd-dark .ci-section-sub { color: rgba(255,255,255,.4); }
.ci-section-title {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.ci-section-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  flex: 1;
}
.ci-section-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--red-hot);
  text-decoration: none;
  letter-spacing: 0.05em;
  font-weight: 700;
  white-space: nowrap;
  margin-left: auto;
}
.ci-section-link:hover { text-decoration: underline; }
.ci-light-section {
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  background: #F5F7FA;
}
.ci-dark-section {
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  background: #0F172A;
}

/* ── PROSSIME GARE ─────────────────────────────────────────────── */
.ci-upcoming-list { display: flex; flex-direction: column; gap: 2px; }
.ci-upcoming-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: #fff;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
  transition: border-color .2s, background .2s;
}
.ci-upcoming-row:hover { border-left-color: var(--red-hot); background: #fafafa; }
.ci-up-today { border-left-color: var(--red-hot) !important; background: rgba(255,107,0,.04) !important; }
.ci-up-soon { border-left-color: var(--yellow-race); }
.ci-up-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
  flex-shrink: 0;
}
.ci-up-day { font-family: var(--font-heading); font-weight: 900; font-size: 1.3rem; color: #111827; line-height: 1; }
.ci-up-mon { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-muted); letter-spacing: 0.08em; }
.ci-up-info { flex: 1; min-width: 0; }
.ci-up-name { font-family: var(--font-heading); font-weight: 700; font-size: 0.88rem; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-up-loc { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; }
.ci-up-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ci-up-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  background: var(--bg-elevated);
  border-radius: 3px;
  color: var(--text-muted);
}
.ci-up-today .ci-up-label { background: var(--red-hot); color: #fff; }
.ci-up-soon .ci-up-label { background: var(--yellow-race); color: #111; }

/* ── CHI SALE ──────────────────────────────────────────────────── */
.ci-scalatori-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.ci-scalatore-card {
  flex-shrink: 0;
  width: 160px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-md);
  padding: 16px;
  text-decoration: none;
  color: #fff;
  transition: background .2s, border-color .2s, transform .15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ci-scalatore-card:hover { background: rgba(255,255,255,.08); border-color: var(--red-hot); transform: translateY(-2px); }
.ci-sc-rank { font-family: var(--font-mono); font-size: 0.6rem; color: rgba(255,255,255,.25); letter-spacing: 0.1em; margin-bottom: 4px; }
.ci-sc-cat { margin-bottom: 8px; }
.ci-sc-surname { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; line-height: 1.1; }
.ci-sc-firstname { font-size: 0.75rem; color: rgba(255,255,255,.55); margin-bottom: 4px; }
.ci-sc-team { font-family: var(--font-mono); font-size: 0.6rem; color: rgba(255,255,255,.3); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-sc-gain { font-family: var(--font-heading); font-weight: 900; font-size: 1.8rem; color: var(--red-hot); line-height: 1; letter-spacing: -0.02em; }
.ci-sc-gainlbl { font-size: 0.65rem; color: rgba(255,107,0,.6); font-family: var(--font-mono); font-weight: 400; }
.ci-sc-arrow { font-size: 0.72rem; color: rgba(255,255,255,.4); margin-top: 4px; }
.ci-sc-arrowglyph { color: rgba(255,255,255,.2); }
.ci-sc-newpos { color: #fff; }

/* ── SFIDA DELLA SETTIMANA ─────────────────────────────────────── */
.ci-matchup-section { }
.ci-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.ci-mu-athlete {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  background: #fff;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.ci-mu-athlete:hover { border-color: var(--red-hot); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.ci-mu-right { text-align: right; }
.ci-mu-pos { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.08em; }
.ci-mu-surname { font-family: var(--font-heading); font-weight: 900; font-size: clamp(1.5rem, 3vw, 2.5rem); color: #111827; line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.ci-mu-firstname { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 400; color: var(--red-hot); }
.ci-mu-team { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); }
.ci-mu-stat { font-size: 0.75rem; color: var(--text-secondary); margin-top: 8px; }
.ci-mu-gain { font-family: var(--font-heading); font-weight: 800; color: var(--red-hot); }
.ci-mu-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ci-vs-text {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.05em;
  line-height: 1;
}
.ci-vs-cat { display: flex; }

/* ── INSIGHTS ──────────────────────────────────────────────────── */
.ci-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.ci-insight-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-md);
  padding: 20px;
}
.ci-insight-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--red-hot);
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.ci-insight-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  margin: 0;
}
.ci-insight-text strong { color: #fff; }

/* ── FORMA DEL MOMENTO ─────────────────────────────────────────── */
.ci-forma-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.1) transparent;
}
.ci-forma-card {
  flex-shrink: 0;
  width: 160px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.ci-forma-card:hover { border-color: var(--red-hot); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.07); }
.ci-forma-cat { margin-bottom: 6px; }
.ci-forma-surname { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; color: #111827; line-height: 1.1; }
.ci-forma-firstname { font-size: 0.75rem; color: var(--red-hot); }
.ci-forma-team { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-forma-pts { font-family: var(--font-heading); font-weight: 900; font-size: 2rem; color: #111827; line-height: 1; letter-spacing: -0.02em; }
.ci-forma-pt-lbl { font-size: 0.65rem; color: var(--text-muted); font-family: var(--font-mono); font-weight: 400; margin-left: 3px; }
.ci-forma-sub { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-muted); margin-top: 4px; }

/* ── POSIZIONI A RISCHIO ───────────────────────────────────────── */
.ci-rischio-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.ci-rischio-card {
  flex-shrink: 0;
  min-width: 220px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-md);
  padding: 16px;
}
.ci-rischio-head { margin-bottom: 12px; }
.ci-rischio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.ci-rischio-row:last-child { border-bottom: none; }
.ci-rischio-name { flex: 1; color: rgba(255,255,255,.75); text-decoration: none; font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-rischio-name:hover { color: #fff; }
.ci-rischio-pts { font-family: var(--font-mono); font-size: 0.65rem; color: rgba(255,255,255,.3); }

/* ── MOBILE ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ci-hero { grid-template-columns: 1fr; min-height: auto; }
  .ci-hero-right {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.06);
    min-height: auto;
    padding: 32px 20px 40px;
  }
  .ci-hero-left { padding: 60px 20px 32px; }
  .ci-row-inner { grid-template-columns: 1fr; gap: 28px; }
  .ci-matchup { grid-template-columns: 1fr; gap: 16px; }
  .ci-mu-vs { flex-direction: row; }
  .ci-vs-text { font-size: 1.5rem; }
  .ci-mu-right { text-align: left; }
  .ci-insights-grid { grid-template-columns: 1fr; }
  .ci-scalatori-scroll, .ci-forma-scroll, .ci-rischio-scroll { gap: 10px; }
  .ci-scalatore-card, .ci-forma-card { width: 140px; }
  .ci-rischio-card { min-width: 200px; }
  .ci-light-section, .ci-dark-section { padding: 36px 20px; }
  .ci-row-section { padding: 36px 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   EDITORIAL HOME v2 — em- prefix (editorial media)
   Cycling atmosphere, not dashboard
═══════════════════════════════════════════════════════════════ */

/* HERO */
.em-hero {
  position: relative;
  min-height: 62vh;
  min-height: 62dvh;
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.96) 0%, rgba(15,23,42,0.85) 55%, rgba(15,23,42,0.55) 100%),
    url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center 30%;
  display: flex;
  flex-direction: column;
  padding-top: 56px;
}
.em-hero-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 48px 48px;
  align-items: center;
  gap: 0;
}
.em-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.42);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.em-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 900;
  line-height: 0.88;
  color: #fff;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.em-title-red { color: #E11D48; }

/* ── Hero logo (replaces text title on home page) ───────────── */
.em-hero-logo {
  height: clamp(80px, 14vw, 180px);
  width: auto;
  display: block;
  margin: 0 0 16px;
}

.em-subtitle {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 36px;
}
.em-hero-winner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 28px;
}
.em-winner-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #E11D48;
  text-transform: uppercase;
}
.em-winner-name {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.em-winner-race {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.42);
}
.em-hero-ctas { display: flex; gap: 12px; }
.em-btn-primary {
  background: #E11D48;
  color: #fff;
  padding: 13px 30px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s;
}
.em-btn-primary:hover { background: #be123c; }
.em-btn-ghost {
  border: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.65);
  padding: 13px 30px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
}
.em-btn-ghost:hover { border-color: #fff; color: #fff; }
.em-hero-right {
  padding-left: 52px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.em-right-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.em-race-feed { display: flex; flex-direction: column; }
.em-race-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 3px;
}
.em-race-row:hover { background: rgba(255,255,255,0.05); }
.em-race-row--latest { border-bottom-color: rgba(225,29,72,0.25); }
.em-race-date {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.em-race-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.em-race-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.em-race-cat {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.em-race-winner {
  font-size: 0.68rem;
  color: #fbbf24;
  white-space: nowrap;
  font-weight: 600;
}
.em-all-link {
  display: block;
  margin-top: 18px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.em-all-link:hover { color: #E11D48; }

/* Ticker */
.em-ticker-bar {
  background: #E11D48;
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}
.em-ticker-inner { overflow: hidden; white-space: nowrap; width: 100%; display: flex; align-items: center; }
.em-ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: em-tick 70s linear infinite;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  padding-left: 100%;
}
.em-ticker-track strong { font-weight: 900; }
@keyframes em-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SPOTLIGHT */
.em-spotlight {
  position: relative;
  background: #0F172A;
  padding: 88px 48px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: center;
}
.em-spotlight-bg-name {
  position: absolute;
  right: -1%;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(8rem, 20vw, 22rem);
  font-weight: 900;
  color: rgba(255,255,255,0.025);
  text-transform: uppercase;
  letter-spacing: -0.06em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.em-spotlight-body {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
.em-spot-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
/* em-spot-badge removed — spotlight context is self-evident from section */
.em-spot-badge { display: none; }
/* Category label: plain uppercase text, no border pill */
.em-spot-cat {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.em-spot-name {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(3rem, 7vw, 7.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 0.93;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.em-spot-firstname {
  font-size: 0.52em;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.em-spot-team {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.36);
  text-decoration: none;
  margin: 12px 0 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.em-spot-team:hover { color: #fff; }
.em-spot-stats { display: flex; gap: 36px; margin-bottom: 36px; }
.em-stat { display: flex; flex-direction: column; gap: 3px; }
.em-stat-val {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.em-stat-lbl {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.em-spot-cta {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #E11D48;
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid #E11D48;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.em-spot-cta:hover { opacity: 0.65; }

/* VERSUS */
.em-versus {
  background-image:
    linear-gradient(rgba(9,15,30,0.9), rgba(9,15,30,0.9)),
    url('https://images.unsplash.com/photo-1541625602330-2277a4c46182?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  padding: 88px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}
.em-versus-label {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.42);
  text-transform: uppercase;
  text-align: center;
}
.em-versus-ring {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
  max-width: 960px;
}
.em-vs-side { display: flex; flex-direction: column; gap: 10px; }
.em-vs-a { text-align: right; align-items: flex-end; }
.em-vs-b { text-align: left; align-items: flex-start; }
.em-vs-pos {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}
.em-vs-name {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.8rem);
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.92;
  text-decoration: none;
  transition: color 0.2s;
}
.em-vs-name:hover { color: #E11D48; }
.em-vs-name small { font-size: 0.42em; color: rgba(255,255,255,0.38); font-weight: 400; display: block; letter-spacing: 0.06em; }
.em-vs-pts {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
}
.em-vs-pts span { font-size: 0.75rem; color: rgba(255,255,255,0.38); font-weight: 400; }
.em-vs-team {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.em-vs-center { text-align: center; flex-shrink: 0; }
.em-vs-vs {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 900;
  color: #E11D48;
  letter-spacing: -0.06em;
  line-height: 1;
}
.em-vs-gap {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
}
.em-vs-comp-bar {
  display: flex;
  justify-content: center;
  padding: 0 0 8px;
}

/* CHI STA VOLANDO */
.em-volando {
  background: #F5F7FA;
  padding: 72px 48px;
}
[data-theme="dark"] .em-volando { background: #1e293b; }
.em-section-header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.em-section-badge {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--text-primary);
  text-transform: uppercase;
}
.em-section-sub { font-size: 0.68rem; color: var(--text-muted); }
.em-volando-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.em-volando-scroll::-webkit-scrollbar { display: none; }
.em-vol-card {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 6px;
  padding: 20px 18px;
  min-width: 154px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0,0,0,0.06);
}
[data-theme="dark"] .em-vol-card { background: #0f172a; border-color: rgba(255,255,255,0.08); }
.em-vol-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.em-vol-gain {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #16a34a;
  line-height: 1;
  margin-bottom: 10px;
}
.em-vol-name { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; margin-bottom: 3px; }
.em-vol-team { font-size: 0.62rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.em-vol-cat { font-size: 0.58rem; font-weight: 800; color: #E11D48; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.em-vol-pts { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); }

/* UPCOMING */
.em-upcoming { background: #0F172A; padding: 72px 48px; }
.em-upcoming .em-section-badge { color: rgba(255,255,255,0.75); }
.em-upcoming-list { max-width: 860px; }
.em-ug-row {
  display: grid;
  grid-template-columns: 80px 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s;
}
.em-ug-row:hover { background: rgba(255,255,255,0.05); }
.em-ug-days {
  font-size: 0.62rem;
  font-weight: 900;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.em-ug-oggi { color: #22c55e !important; }
.em-ug-date { font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.38); }
.em-ug-name { font-size: 0.875rem; font-weight: 600; color: #fff; }
.em-ug-cat { font-size: 0.62rem; color: rgba(255,255,255,0.28); text-transform: uppercase; white-space: nowrap; }

/* ─── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .em-hero-content {
    grid-template-columns: 1fr;
    padding: 36px 20px 24px;
    gap: 32px;
  }
  .em-hero {
    background-image:
      linear-gradient(rgba(15,23,42,0.94), rgba(15,23,42,0.9)),
      url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?auto=format&fit=crop&w=1200&q=80');
  }
  .em-hero-right {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
  }
  .em-title { font-size: clamp(3.2rem, 16vw, 5rem); }
  .em-hero-logo { height: clamp(60px, 18vw, 100px); margin-bottom: 10px; }
  .em-spotlight { padding: 56px 20px; }
  .em-spot-stats { gap: 20px; flex-wrap: wrap; }
  .em-spot-name { font-size: clamp(2.5rem, 12vw, 4rem); }
  .em-versus { padding: 56px 20px; gap: 32px; }
  .em-versus-ring { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .em-vs-a, .em-vs-b { text-align: center; align-items: center; }
  .em-vs-center { order: -1; }
  .em-volando { padding: 56px 20px; }
  .em-upcoming { padding: 56px 20px; }
  .em-ug-row { grid-template-columns: 68px 1fr; gap: 10px; }
  .em-ug-date, .em-ug-cat { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FULL-WIDTH BROADCAST LAYOUT OVERRIDES
   Removes boxed SaaS feeling — makes it a media platform
═══════════════════════════════════════════════════════════════ */

/* Homepage: remove .page container constraints so sections go edge-to-edge */
.page:has(.em-hero) {
  max-width: none;
  padding: 0;
}

/* Hero: true full-bleed, no max-width cap */
.em-hero-content {
  max-width: none;
  padding: 52px clamp(20px, 7vw, 140px) 36px;
  grid-template-columns: 55fr 45fr;
}
.em-title {
  font-size: clamp(3.5rem, 8vw, 9rem);
  letter-spacing: -0.05em;
}
.em-hero-right {
  padding-left: clamp(28px, 4vw, 72px);
}

/* Spotlight: full-bleed interior */
.em-spotlight {
  padding: 100px clamp(20px, 7vw, 140px);
  overflow: clip;
}
.em-spotlight-body {
  max-width: none;
}
.em-spotlight-bg-name {
  font-size: clamp(10rem, 26vw, 32rem);
  opacity: 1;
}

/* Versus: breathing room */
.em-versus {
  padding: 100px clamp(20px, 7vw, 140px);
}
.em-versus-ring {
  max-width: none;
  width: 100%;
}
.em-vs-name {
  font-size: clamp(2rem, 5vw, 5rem);
}
.em-vs-vs {
  font-size: clamp(4rem, 11vw, 11rem);
}

/* Volando: full-bleed with scroll edge */
.em-volando {
  padding: 80px 0 80px clamp(20px, 7vw, 140px);
}
.em-section-header {
  padding-right: clamp(20px, 7vw, 140px);
}
.em-volando-scroll {
  padding-right: clamp(20px, 7vw, 140px);
}

/* Upcoming: no max-width cap */
.em-upcoming {
  padding: 80px clamp(20px, 7vw, 140px);
}
.em-upcoming-list {
  max-width: none;
}

/* Race Photo Band */
.em-photo-band {
  position: relative;
  height: clamp(220px, 28vw, 440px);
  background-image:
    linear-gradient(to bottom,
      rgba(15,23,42,0.6) 0%,
      rgba(15,23,42,0.15) 40%,
      rgba(15,23,42,0.5) 80%,
      rgba(9,15,30,0.92) 100%),
    url('https://images.unsplash.com/photo-1517649763962-0c623066013b?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center 45%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.em-photo-band-inner {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 clamp(20px, 7vw, 140px) 36px;
}
.em-photo-band-text {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 5rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.em-photo-band-text small {
  font-size: 0.28em;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}
.em-photo-band-cta {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 10px 24px;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  margin-bottom: 6px;
}
.em-photo-band-cta:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

/* ── MOBILE COMPREHENSIVE FIX ────────────────────────────── */
@media (max-width: 768px) {

  /* Hero: single column, touch-friendly */
  .em-hero {
    min-height: 48vh;
    min-height: 48dvh;
  }
  .em-hero-content {
    grid-template-columns: 1fr !important;
    padding: 28px 20px 20px !important;
  }
  .em-eyebrow { font-size: 0.58rem; letter-spacing: 0.14em; }
  .em-title {
    font-size: clamp(2rem, 11vw, 3.5rem) !important;
    letter-spacing: -0.04em;
  }
  .em-subtitle { font-size: 0.65rem; letter-spacing: 0.08em; margin-bottom: 24px; }
  .em-hero-winner { margin-bottom: 20px; }
  .em-winner-name { font-size: 1.15rem; }
  .em-hero-right {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
  }
  .em-race-row { padding: 8px 4px; gap: 8px; }
  .em-race-name { font-size: 0.72rem; }
  .em-btn-primary, .em-btn-ghost { padding: 10px 20px; font-size: 0.68rem; }

  /* Spotlight: watermark must stay within box */
  .em-spotlight { padding: 52px 20px; overflow: clip; }
  /* watermark bg: clamp min was 10rem (160px) — overflows 375px */
  .em-spotlight-bg-name {
    font-size: clamp(4rem, 22vw, 8rem) !important;
    right: -2%;
  }
  .em-spot-name {
    font-size: clamp(2rem, 11vw, 3.5rem) !important;
    letter-spacing: -0.03em;
  }
  .em-spot-stats { gap: 20px; flex-wrap: wrap; }
  .em-stat-val { font-size: 2rem; }

  /* Photo band */
  .em-photo-band { height: 200px; }
  .em-photo-band-inner {
    padding: 0 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .em-photo-band-text { font-size: clamp(1.4rem, 7vw, 2.2rem); }
  .em-photo-band-cta { align-self: flex-start; font-size: 0.68rem; padding: 8px 18px; }

  /* Versus: stack vertically */
  .em-versus { padding: 52px 20px; gap: 28px; }
  .em-versus-ring {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 20px;
  }
  .em-vs-a, .em-vs-b { text-align: center; align-items: center; }
  .em-vs-center { order: -1; }
  /* VS text: clamp min was 4rem (64px) — ok on mobile */
  .em-vs-vs { font-size: clamp(3rem, 16vw, 5rem) !important; }
  .em-vs-name { font-size: clamp(1.6rem, 8vw, 2.8rem) !important; }
  .em-vs-pts { font-size: 1.6rem; }

  /* Chi Scala */
  .em-volando { padding: 52px 0 52px 20px; }
  .em-section-header { padding-right: 20px; }
  .em-volando-scroll { padding-right: 20px; }
  .em-vol-card { min-width: 136px; padding: 14px 14px; }
  .em-vol-gain { font-size: 1.8rem; }
  .em-vol-name { font-size: 0.72rem; }

  /* Upcoming */
  .em-upcoming { padding: 52px 20px; }
  .em-ug-row { grid-template-columns: 64px 1fr; gap: 8px; }
  .em-ug-date, .em-ug-cat { display: none; }
  .em-ug-name { font-size: 0.8rem; }
}

/* Extra small: 320px devices */
@media (max-width: 360px) {
  .em-title { font-size: clamp(2rem, 12vw, 3rem) !important; }
  .em-spot-name { font-size: clamp(1.8rem, 10vw, 3rem) !important; }
  .em-hero-ctas { flex-direction: column; gap: 8px; }
  .em-btn-primary, .em-btn-ghost { text-align: center; }
}


/* ═══════════════════════════════════════════════════════════════
   VISUAL UNIFICATION v24 — Editorial sports media style
   All pages: dark headers, Inter Tight typography, red accent
   ═══════════════════════════════════════════════════════════════ */

/* ── A) Cinematic section-header (Risultati, Atleti, Team, Regolamento) ── */
.content-wrapper > .section-header:first-child,
.section-header:first-child {
  margin-top: -32px;
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: 36px;
  padding: 52px clamp(20px, 5vw, 80px) 44px;
  background: #0F172A;
  position: relative;
  overflow: hidden;
}
.content-wrapper > .section-header:first-child::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, #E11D48 0%, transparent 60%);
}
.section-header h1 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(2.2rem, 5vw, 5rem) !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: -0.03em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 0.95 !important;
}
.section-header .section-line { display: none; }

/* ── B) Cinematic athlete-header ────────────────────────────── */
.athlete-header {
  background: linear-gradient(135deg, #0F172A 0%, #1e293b 100%);
  padding: 48px clamp(16px, 4vw, 64px) 40px;
  margin: -32px -24px 32px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.athlete-header-top .badge {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}
.athlete-cognome {
  font-family: 'Inter Tight', 'Inter', sans-serif !important;
  font-size: clamp(2rem, 6vw, 5rem) !important;
  font-weight: 900 !important;
  color: #fff !important;
  text-transform: uppercase !important;
  letter-spacing: -0.03em !important;
  line-height: 0.9 !important;
}
.athlete-nome {
  font-family: 'Inter Tight', 'Inter', sans-serif !important;
  font-size: clamp(1rem, 3vw, 2rem) !important;
  font-weight: 400 !important;
  color: rgba(255,255,255,0.55) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  display: block !important;
}
.athlete-stats-bar {
  background: rgba(255,255,255,0.05) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 0 !important;
  margin-left: clamp(-16px, -4vw, -64px) !important;
  margin-right: clamp(-16px, -4vw, -64px) !important;
  padding-left: clamp(16px, 4vw, 64px) !important;
  padding-right: clamp(16px, 4vw, 64px) !important;
}

/* ── C) Cinematic team-header ───────────────────────────────── */
.team-header {
  background: linear-gradient(135deg, #0F172A 0%, #1e293b 100%);
  padding: 48px clamp(16px, 4vw, 64px) 40px;
  margin: -32px -24px 32px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  /* Layout a colonna: identità (foto+nome) sopra, statistiche stagione SOTTO il nome */
  display: block;
}
.team-name-display {
  font-family: 'Inter Tight', 'Inter', sans-serif !important;
  font-size: clamp(1.6rem, 4vw, 4rem) !important;
  font-weight: 900 !important;
  color: #fff !important;
  text-transform: uppercase !important;
  letter-spacing: -0.03em !important;
  line-height: 1.05 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
}
/* Identity row: photo + name side-by-side on desktop */
.team-header-identity {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.team-header-name-block {
  flex: 1;
  min-width: 0;
}
.team-stats-row {
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  background: rgba(255,255,255,0.04) !important;
  margin-left: clamp(-16px, -4vw, -64px) !important;
  margin-right: clamp(-16px, -4vw, -64px) !important;
  padding-left: clamp(16px, 4vw, 64px) !important;
  padding-right: clamp(16px, 4vw, 64px) !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

/* ── D) Cinematic race-header (gara page) ───────────────────── */
.race-header {
  background: linear-gradient(135deg, #0F172A 0%, #1e293b 100%);
  padding: 48px clamp(16px, 4vw, 64px) 40px;
  margin: -32px -24px 32px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.race-name-display {
  font-family: 'Inter Tight', 'Inter', sans-serif !important;
  font-size: clamp(1.4rem, 4vw, 3.5rem) !important;
  font-weight: 900 !important;
  color: #fff !important;
  text-transform: uppercase !important;
  letter-spacing: -0.02em !important;
  line-height: 1 !important;
}
.race-meta-row {
  margin-top: 12px !important;
}
.race-meta-row .badge {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: rgba(255,255,255,0.75) !important;
}

/* ── E) Ranking table editorial style ───────────────────────── */
.ranking-table thead tr {
  background: var(--bg-elevated) !important;
}
.ranking-table thead th {
  color: var(--text-primary) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 11px 8px !important;
  border-bottom: 2px solid var(--border-subtle) !important;
  text-align: left !important;
}
/* ↕ centrato come la cella */
.ranking-table thead th:nth-child(2) { text-align: center !important; }
/* 1°/2°/3°/TOP10 centrato sopra i dati */
.ranking-table thead th:nth-child(6) { text-align: center !important; }

/* ── F) Calendar item editorial style ───────────────────────── */
.cal-item {
  border-left: 3px solid transparent !important;
  transition: border-color 0.2s, transform 0.15s !important;
}
.cal-item:hover {
  border-left-color: #E11D48 !important;
  transform: translateX(3px) !important;
}
.cal-name {
  font-family: 'Inter Tight', 'Inter', sans-serif !important;
  font-weight: 700 !important;
}

/* ── G) Mid-page section headers ────────────────────────────── */
.section-header:not(:first-child) {
  border-left: 3px solid #E11D48;
  padding-left: 12px;
  margin-bottom: 20px;
}
.section-header:not(:first-child) h2,
.section-header:not(:first-child) h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

/* ── H) Risultati cards — theme-aware with red accent ───────── */
.hero-race-name {
  font-family: 'Inter Tight', 'Inter', sans-serif !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  color: var(--text-primary) !important;
}
.ris-card {
  position: relative;
  overflow: hidden;
}
.ris-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #E11D48;
  border-radius: 2px 0 0 2px;
  z-index: 1;
}

/* ── PG-HEADER: Cinematic page banner for non-home pages ─────── */
.pg-header {
  background: #0F172A;
  padding: 52px clamp(20px, 5vw, 80px) 44px;
  margin: -32px -24px 36px;
  position: relative;
  overflow: hidden;
}
.pg-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, #E11D48 0%, transparent 55%);
}
.pg-eyebrow {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #E11D48;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.pg-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0;
  line-height: 0.9;
}

/* ── I) Mobile fixes for dark headers ───────────────────────── */
@media (max-width: 768px) {
  .content-wrapper > .section-header:first-child,
  .section-header:first-child {
    margin-top: -20px;
    margin-left: -16px;
    margin-right: -16px;
    padding: 40px 20px 36px;
  }
  .athlete-header, .team-header, .race-header {
    margin: -20px -16px 24px;
    padding: 36px 16px 28px;
  }
  .athlete-stats-bar {
    margin-left: -16px !important;
    margin-right: -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .team-header-identity {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }
  .team-header-identity .photo-area {
    width: 72px !important;
    height: 72px !important;
  }
  .team-stats-row {
    margin-left: -16px !important;
    margin-right: -16px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .pg-header {
    margin: -20px -16px 28px;
    padding: 40px 20px 36px;
  }
  .pg-title { font-size: clamp(2rem, 12vw, 3.5rem); }
}

/* ═══════════════════════════════════════════════════════════════
   SPORT INTELLIGENCE LAYER — si- prefix
═══════════════════════════════════════════════════════════════ */

/* Streak badge in spotlight */
.si-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(225,29,72,0.15);
  border: 1px solid rgba(225,29,72,0.3);
  color: #fca5a5;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 2px;
  text-transform: uppercase;
  margin-top: 8px;
}

/* Intelligence panel on athlete page */
.si-intel-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px clamp(16px, 3vw, 32px);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}
.si-intel-momentum {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.04);
  border-left: 3px solid var(--si-color, #E11D48);
  border-radius: 0 4px 4px 0;
  flex: 1;
  min-width: 200px;
}
[data-theme="dark"] .si-intel-momentum { background: rgba(255,255,255,0.04); }
.si-intel-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}
.si-intel-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.si-intel-streak {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(225,29,72,0.06);
  border: 1px solid rgba(225,29,72,0.2);
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--text-primary);
  gap: 8px;
}
.si-intel-rivals {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.si-intel-rivals-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.si-rival-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-secondary, rgba(0,0,0,0.05));
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.si-rival-chip:hover { border-color: #E11D48; color: #E11D48; }
.si-rival-chip small { font-size: 0.6em; color: var(--text-muted); font-weight: 400; }

/* Race intelligence section */
.si-race-intel {
  padding: 16px 0 8px;
  margin-bottom: 16px;
}
.si-race-intel-title {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  border-left: 3px solid #E11D48;
  padding-left: 10px;
}
.si-race-participants {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.si-race-participants::-webkit-scrollbar { display: none; }
.si-participant-card {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  min-width: 130px;
}
.si-participant-pos {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.si-participant-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0 2px;
  line-height: 1.2;
}
.si-participant-form {
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* Story cards for statistiche */
.si-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.si-story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.si-story-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.si-story-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, #E11D48, transparent);
}
.si-story-icon { font-size: 1.4rem; margin-bottom: 8px; }
.si-story-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #E11D48;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.si-story-value {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.si-story-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .si-intel-panel { padding: 16px; }
  .si-intel-momentum { min-width: 100%; }
  .si-stories-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ── DARK HEADER CONTRAST: force readable text on #0F172A backgrounds ── */
/* Athlete, Team, Race headers all use dark-gradient bg in light mode too  */
.athlete-header { color: rgba(255,255,255,0.82); }
.team-header    { color: rgba(255,255,255,0.82); }
.race-header    { color: rgba(255,255,255,0.82); }
.section-header:first-child { color: rgba(255,255,255,0.82); }

/* Stat labels explicitly use var(--text-muted) — override */
.athlete-stat-label,
.athlete-stat-value { color: rgba(255,255,255,0.65) !important; }
.team-stat-label,
.team-stat-value    { color: rgba(255,255,255,0.65) !important; }
.race-meta-row      { color: rgba(255,255,255,0.75) !important; }
.race-meta-sep      { color: rgba(255,255,255,0.2)  !important; }

/* Badge text inside dark headers */
.athlete-header-top .badge,
.race-meta-row .badge { color: rgba(255,255,255,0.85) !important; }

/* Position circle p3 (dark brown #92400E) unreadable on dark bg in any mode */
.hero-pos.p3 { color: #C4885A !important; }
.hero-pos.p2 { color: #9DB3C2 !important; }

/* ── HERO-NAME links in dark contexts ─────────────────────────── */
.em-spotlight .hero-name a,
.em-spotlight .hero-name { color: #fff !important; }
.em-spotlight .hero-team,
.em-spotlight .hero-team a { color: rgba(255,255,255,0.55) !important; }
@media (max-width: 480px) {
  .si-stories-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   SPORTS INTELLIGENCE LAYER — new components
   ════════════════════════════════════════════════════════════════ */

/* ── Newsroom feed (homepage) ────────────────────────────────── */
.em-newsroom {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}
/* HOME version — full-width constrained, same component */
.em-newsroom--home {
  max-width: 1200px;
  margin: 0 auto 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  background: transparent;
}
.em-newsroom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
/* Newsroom label: plain section text, no badge chip */
.em-newsroom-badge {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.em-newsroom-all {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.em-newsroom-all:hover { color: var(--red-hot); }
.em-newsroom-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* News items: minimal list — no background card, just left-border + text */
.em-news-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 0;
  background: transparent;
  border-left: 2px solid var(--border-subtle);
  margin-left: 2px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.em-news-item + .em-news-item { border-top: 1px solid var(--border-subtle); }
.em-news-item:hover { background: var(--bg-elevated); border-left-color: var(--red-hot); }
.em-news-icon { display: none; } /* removed — left border conveys type */
.em-news-text { flex: 1; line-height: 1.5; }
.em-news-text strong { color: var(--text-primary); font-weight: 600; }
.em-news-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
  opacity: 0.5;
}
/* Type-specific left border colors — intelligence through accent, not emoji */
.em-news-victory { border-left-color: #D97706; }
.em-news-streak  { border-left-color: var(--border-subtle); }
.em-news-mover   { border-left-color: #10B981; }
.em-news-team    { border-left-color: var(--border-subtle); }
.em-news-battle  { border-left-color: var(--red-hot); }
/* Season context item: italic editorial note */
.em-news-context {
  border-left-color: var(--border-subtle) !important;
  font-style: italic;
  color: var(--text-muted) !important;
}

/* ── Classifica intel strip ──────────────────────────────────── */
/* Editorial context line replaces chip strip */
.rk-intel-strip { display: none; } /* archived — replaced by rk-intel-line */
.rk-intel-chip  { display: none; }
.rk-intel-line {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.5;
  padding-left: 12px;
  border-left: 2px solid var(--border-subtle);
}
.rk-intel-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}
.rk-intel-link:hover { color: var(--red-hot); }

/* ── Weekly ranking story banner ─────────────────────────────── */
.rk-story-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--red-hot);
  border-radius: 10px;
  padding: 14px 18px 16px;
  margin-bottom: 16px;
}
.rk-story-label {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.rk-story-lines { display: flex; flex-direction: column; gap: 6px; }
.rk-story-line {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 10px;
  border-left: 2px solid var(--border-subtle);
}
.rk-story-line:first-child {
  color: var(--text-primary);
  font-weight: 600;
  border-left-color: var(--red-hot);
}

/* ── Ranking row tiers — intelligence via typography, not badges ── */
/* Position 1: gold tint + heavier name */
tr.rk-tier-1 {
  background: linear-gradient(90deg, rgba(245,158,11,0.05) 0%, transparent 55%);
}
tr.rk-tier-1 .rank-pts  { color: #D97706; }
tr.rk-tier-1 .rank-name { font-size: 0.9375rem; font-weight: 700; }
/* Positions 2–3: very subtle lift */
tr.rk-tier-top3 { background: transparent; }
tr.rk-tier-top3 .rank-pts  { color: var(--text-secondary); }
tr.rk-tier-top3 .rank-name { font-weight: 600; }
/* Positions 4–10: normal */
tr.rk-tier-top10 { opacity: 1; }
/* Everything else: visually receded */
tr.ranking-row:not(.rk-tier-1):not(.rk-tier-top3):not(.rk-tier-top10) {
  opacity: 0.72;
}

/* ── Ranking athlete cell — no chip clutter ───────────────────── */
.rk-athlete-cell { display: flex; flex-direction: column; gap: 1px; }
.rk-chips  { display: none; } /* chips removed */
.rk-form-chip { display: none; } /* intelligence via tier, not label */
.rk-streak-badge {
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(245,158,11,0.12);
  color: var(--gold);
  border: 1px solid rgba(245,158,11,0.2);
}
.rk-pts-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.rk-leader-badge {
  font-family: var(--font-heading);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(245,158,11,0.15);
  color: var(--gold);
  border: 1px solid rgba(245,158,11,0.3);
}
.rk-gap-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.rk-battle-dot {
  font-size: 0.7rem;
  margin-left: 4px;
  opacity: 0.8;
}

/* ══════════════════════════════════════════════════════════════ */
/* RANKING REVOLUTION — Narrative & Momentum UI                  */
/* ══════════════════════════════════════════════════════════════ */

/* ── Season Pulse Banner ─────────────────────────────────────── */
.rk-narrative {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--red-hot);
  border-radius: 10px;
  padding: 14px 18px 16px;
  margin-bottom: 14px;
}
.rk-narrative-label {
  font-family: var(--font-heading);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin-bottom: 8px;
}
.rk-narrative-headline {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 10px;
}
.rk-narrative-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: 4px;
}
.rk-narrative-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 8px;
  border-left: 2px solid var(--border-subtle);
}
.rk-narrative-detail:first-child {
  color: var(--text-primary);
  font-weight: 600;
  border-left-color: var(--red-hot);
}
/* Variante team: bordo/accento accent invece del rosso */
.rk-narrative--team { border-left-color: var(--accent); }
.rk-narrative--team .rk-narrative-label { color: var(--accent); }
.rk-narrative--team .rk-narrative-detail:first-child { border-left-color: var(--accent); }

/* ── Sort bar ────────────────────────────────────────────────── */
.rk-sort-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.rk-sort-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 2px;
}
.rk-sort-btn {
  font-family: var(--font-heading);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.rk-sort-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.rk-sort-btn.active {
  background: var(--red-hot);
  color: #fff;
  border-color: var(--red-hot);
}

/* ── Team sotto il nome corridore in classifica ──────────────── */
.rk-athlete-team {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.rk-athlete-team a {
  color: inherit;
  text-decoration: none;
}
.rk-athlete-team a:hover {
  color: var(--accent);
}

/* ── Athlete name row (name + badge inline) ──────────────────── */
.rk-athlete-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Momentum mini-bar ───────────────────────────────────────── */
.rk-momentum-wrap {
  width: 80px;
  height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.rk-momentum-bar {
  height: 100%;
  border-radius: 2px;
  transition: width .4s ease;
}

/* ── Badge pills ─────────────────────────────────────────────── */
.rk-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-heading);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-dominant { background: rgba(245,158,11,0.15); color: #D97706; border: 1px solid rgba(245,158,11,0.3); }
.badge-fire     { background: rgba(239,68,68,0.12);  color: #EF4444; border: 1px solid rgba(239,68,68,0.25); }
.badge-surge    { background: rgba(139,92,246,0.12); color: #8B5CF6; border: 1px solid rgba(139,92,246,0.25); }
.badge-growing  { background: rgba(16,185,129,0.12); color: #10B981; border: 1px solid rgba(16,185,129,0.25); }
.badge-comeback { background: rgba(59,130,246,0.12); color: #3B82F6; border: 1px solid rgba(59,130,246,0.25); }
.badge-idle     { background: rgba(107,114,128,0.12);color: #9CA3AF; border: 1px solid rgba(107,114,128,0.2); }
.badge-risk     { background: rgba(251,146,60,0.12); color: #F97316; border: 1px solid rgba(251,146,60,0.25); }
.badge-down     { background: rgba(107,114,128,0.08);color: #6B7280; border: 1px solid rgba(107,114,128,0.15); }

/* ── Leader tag (replaces empty gap for pos 1) ───────────────── */
.rk-leader-tag {
  font-family: var(--font-heading);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #D97706;
  text-transform: uppercase;
}

/* ── Leadership safety gauge ─────────────────────────────────── */
.rk-leader-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.rk-leader-gauge-track {
  width: 72px;
  height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.rk-leader-gauge-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .5s ease;
}
.rk-leader-gauge-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Catch-up hint ───────────────────────────────────────────── */
.rk-catchup {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #F59E0B;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

/* ── Battle zone separator row ───────────────────────────────── */
tr.rk-zone-sep td {
  padding: 4px 14px;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F97316;
  background: rgba(249,115,22,0.06);
  border-top: 1px solid rgba(249,115,22,0.2);
  border-bottom: 1px solid rgba(249,115,22,0.2);
}

/* ── Narrative table (same as ranking-table but class hook) ──── */
.rk-table-narrative tr.rk-tier-1 td { vertical-align: top; }

/* ─── Mobile tweaks ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .rk-narrative-headline { font-size: 0.85rem; }
  .rk-sort-bar            { gap: 4px; }
  .rk-sort-btn            { font-size: 0.62rem; padding: 3px 8px; }
  .rk-momentum-wrap       { width: 60px; }
}

/* ── Atleta story badge ──────────────────────────────────────── */
.si-athlete-story-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(239,68,68,0.12);
  color: var(--red-hot);
  border: 1px solid rgba(239,68,68,0.25);
  margin-bottom: 10px;
}

/* ── Team narrative strip ────────────────────────────────────── */
.si-team-narrative {
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--red-hot);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 16px 0 8px;
  line-height: 1.5;
}

/* ── Team identity strip ─────────────────────────────────────── */
.team-identity-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 0;
}
.team-intel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--red-hot);
  border-radius: 10px;
  padding: 16px 18px 18px;
}
.team-intel-label {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Mission */
.team-mission-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.team-mission-icon { display: none; } /* emoji removed */
.team-mission-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Dominance bars */
.team-dominance { display: flex; flex-direction: column; gap: 6px; }
.team-dom-row {
  display: grid;
  grid-template-columns: 72px 1fr 32px;
  align-items: center;
  gap: 7px;
}
.team-dom-cat {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-dom-track {
  height: 5px;
  background: var(--border-subtle);
  border-radius: 3px;
  overflow: hidden;
}
.team-dom-fill {
  height: 100%;
  background: var(--red-hot);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.team-dom-wins {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
}

/* Strengths */
.team-strength-list { display: flex; flex-direction: column; gap: 10px; }
.team-strength-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.team-strength-icon { display: none; } /* emoji removed */
.team-strength-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.team-strength-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 1px;
}

/* Momentum gauge */
.team-momentum-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.team-momentum-track {
  position: relative;
  height: 7px;
  background: var(--border-subtle);
  border-radius: 4px;
  overflow: visible;
  margin-bottom: 6px;
}
.team-momentum-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.team-momentum-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid var(--bg-card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: left 0.5s ease;
}
.team-momentum-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── Team top performers ─────────────────────────────────────── */
.team-performers-list { display: flex; flex-direction: column; gap: 8px; }
.team-performer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 12px 16px;
  transition: border-color 0.18s, background 0.18s;
}
.team-performer-card:hover {
  border-color: var(--red-hot);
  background: var(--bg-secondary);
}
.team-perf-rank {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.team-perf-info { flex: 1; min-width: 0; }
.team-perf-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-perf-name a { color: inherit; text-decoration: none; }
.team-perf-name a:hover { color: var(--red-hot); }
.team-perf-cat {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.team-perf-form {
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 3px;
  line-height: 1;
}
.team-perf-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.team-perf-pts {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.team-perf-pts small {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}
.team-perf-wins {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}
.team-perf-badge {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(239,68,68,0.12);
  color: var(--red-hot);
  border: 1px solid rgba(239,68,68,0.22);
}

/* Team quick stats — plain text row, no chip */
.team-cat-quickstats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}
.team-cat-stat-chip { display: none; } /* chip archived */
.team-cat-quickstat {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Mobile collapse */
@media (max-width: 700px) {
  .team-identity-strip {
    grid-template-columns: 1fr;
  }
  .team-dom-row {
    grid-template-columns: 64px 1fr 28px;
  }
}

/* ── Athlete hero season card ────────────────────────────────── */
.athlete-hero-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--red-hot);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 4px 0 16px;
}
.athlete-hero-left { flex: 1; min-width: 0; }
.athlete-hero-story {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(239,68,68,0.12);
  color: var(--red-hot);
  border: 1px solid rgba(239,68,68,0.25);
  margin-bottom: 10px;
}
.athlete-hero-form {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.athlete-hero-narrative {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.4;
}
.athlete-hero-recent {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.athlete-hero-right {
  flex-shrink: 0;
  min-width: 140px;
  text-align: right;
  border-left: 1px solid var(--border-subtle);
  padding-left: 20px;
}
.athlete-hero-moment-label {
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.athlete-hero-moment-pos {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}
.athlete-hero-moment-race {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
}
.athlete-hero-moment-race a { color: inherit; text-decoration: none; }
.athlete-hero-moment-race a:hover { color: var(--red-hot); }
.athlete-hero-moment-date {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ── Athlete identity strip ──────────────────────────────────── */
.ath-identity-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.ath-identity-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 16px 16px;
}
.ath-identity-label {
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Rivalries */
.ath-rival-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.ath-rival-item:last-child { border-bottom: none; }
.ath-rival-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}
.ath-rival-name:hover { color: var(--red-hot); }
.ath-rival-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.ath-empty-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}

/* Style tag — plain emphasis, no pill or badge */
.ath-style-tag {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.ath-style-icon { display: none; } /* emoji icon removed */
.ath-style-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}
.ath-streak-badge { display: none; } /* streak badge removed */
/* Strengths — plain comma-separated text, not chips */
.ath-strengths { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ath-strength-chip { display: none; } /* chip class archived */
.ath-strengths-line {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* Stats block */
.ath-stat-block { display: flex; flex-direction: column; gap: 4px; }
.ath-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  padding: 3px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.ath-stat-row:last-child { border-bottom: none; }
.ath-stat-row span { color: var(--text-muted); }
.ath-stat-row strong { color: var(--text-primary); font-weight: 700; }

@media (max-width: 700px) {
  .ath-identity-strip { grid-template-columns: 1fr; }
  .athlete-hero-card { flex-direction: column; gap: 14px; }
  .athlete-hero-right {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding-left: 0;
    padding-top: 14px;
    text-align: left;
    min-width: unset;
  }
}

/* ── Race narrative (risultati cards) ────────────────────────── */
.ris-race-narrative {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 4px 0 10px;
  line-height: 1.45;
  font-weight: 500;
}

/* ── Race card tiers (visual hierarchy) ──────────────────────── */
.ris-card-ci  { border-left: 3px solid var(--gold) !important; }
.ris-card-cr  { border-left: 3px solid var(--red-hot) !important; }
.ris-card-premium { border-left: 3px solid #7C3AED !important; }

/* ── Importance badge ────────────────────────────────────────── */
.ris-importance-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.ris-badge-ci      { background: rgba(245,158,11,0.15); color: var(--gold);    border: 1px solid rgba(245,158,11,0.3); }
.ris-badge-cr      { background: rgba(239,68,68,0.12);  color: var(--red-hot); border: 1px solid rgba(239,68,68,0.25); }
.ris-badge-mult    { background: rgba(124,58,237,0.12); color: #a78bfa;        border: 1px solid rgba(124,58,237,0.25); }

/* ── Cat section ─────────────────────────────────────────────── */
.ris-cat-section { margin-bottom: 12px; }
.ris-cat-label {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.ris-tech-bit {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.ris-cat-divider {
  border-top: 2px solid var(--border-subtle);
  margin: 14px 0;
}
.ris-full-link { padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--border-subtle); }
.ris-podio-row { grid-template-columns: 32px 1fr !important; }
.ris-podio-info { min-width: 0; }
.ris-region-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 6px;
}

/* ── Impact strip ────────────────────────────────────────────── */
.ris-impact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
}
.ris-insight-chip {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 3px 9px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.ris-chip-shakeup {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
  color: var(--red-hot);
}
.ris-mover {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 3px 8px;
  border-radius: 12px;
}
.ris-mover-up   { background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.ris-mover-down { background: rgba(239,68,68,0.08); color: var(--red-hot); border: 1px solid rgba(239,68,68,0.18); }

/* Posizione in classifica — mostrata sotto i punti nella tabella gara */
.ris-rank-pos {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-muted);
  opacity: .8;
  margin-top: 2px;
  white-space: nowrap;
}
/* Nella card podio risultati rimane inline */
.ris-podio-info .ris-rank-pos {
  display: inline-block;
  margin-left: 6px;
  margin-top: 0;
  vertical-align: middle;
}

/* ── Calendario hype strip ───────────────────────────────────── */
.cal-hype-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: linear-gradient(135deg, var(--red-hot) 0%, #7C3AED 100%);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
}
.cal-hype-race {
  flex: 1;
  padding: 18px 20px;
  color: #fff;
}
.cal-hype-label {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}
.cal-hype-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  line-height: 1.2;
  margin-bottom: 4px;
}
.cal-hype-name:hover { text-decoration: underline; }
.cal-hype-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}
.cal-hype-next {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.18);
  border-left: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  min-width: 120px;
  transition: background 0.15s;
}
.cal-hype-next:hover { background: rgba(0,0,0,0.28); }
.cal-hype-next-days {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  line-height: 1;
}
.cal-hype-next-name {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

/* (comp-duel-banner rimosso — sostituito con scoreboard e badge) */

/* ── Mobile tweaks ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .rk-intel-strip { flex-direction: column; }
  .cal-hype-next { display: none; }
  .em-newsroom { padding: 14px 16px; }
}

/* ════════════════════════════════════════════════════════════════
   MULTI-HUB SYSTEM
   ════════════════════════════════════════════════════════════════ */

/* ── Hub subnav — disabled, navigation handled by main navbar ── */
.hub-subnav {
  display: none !important;
}
._hub-subnav-archived {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--hub-color, #E11D48);
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 56px;
  z-index: 40;
  flex-wrap: nowrap;
  min-height: 44px;
}
.hub-subnav::-webkit-scrollbar { display: none; }
.hub-subnav-back {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0 12px 0 0;
  border-right: 1px solid var(--border-subtle);
  margin-right: 12px;
  transition: color 0.15s;
  flex-shrink: 0;
}
.hub-subnav-back:hover { color: var(--hub-color, #E11D48); }
.hub-subnav-name {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hub-color, #E11D48);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 12px;
}
.hub-subnav-tabs {
  display: flex;
  gap: 0;
  align-items: stretch;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.hub-subnav-tabs::-webkit-scrollbar { display: none; }
.hub-subnav-tab {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0 14px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  min-height: 44px;
}
.hub-subnav-tab:hover { color: var(--text-primary); }
.hub-subnav-active {
  color: var(--hub-color, #E11D48) !important;
  border-bottom-color: var(--hub-color, #E11D48) !important;
}

/* ── Hub hero ────────────────────────────────────────────────── */
.hub-hero {
  background: var(--hub-gradient, linear-gradient(135deg,#9F1239,#E11D48));
  padding: 60px 32px 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hub-hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.hub-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.hub-hero-desc {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.5;
}
.hub-hero-cta-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.hub-hero-btn {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  background: rgba(255,255,255,0.95);
  color: #0F172A;
  transition: background 0.15s, transform 0.1s;
}
.hub-hero-btn:hover { background: #fff; transform: translateY(-1px); }
.hub-hero-btn-ghost {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.2);
}
.hub-hero-btn-ghost:hover { background: rgba(255,255,255,0.22); }

/* ── Hub content grid ────────────────────────────────────────── */
.hub-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* ── Hub section headers — editorial restraint ───────────────── */
.hub-section-label {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.hub-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hub-section-more {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.hub-section-more:hover { color: var(--red-hot); }

/* ── Rider on Fire ───────────────────────────────────────────── */
.hub-fire-section {
  padding: 28px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.hub-fire-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--hub-color, #E11D48);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.hub-fire-card:hover { transform: translateY(-2px); }
.hub-fire-story {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hub-color, #E11D48);
  margin-bottom: 6px;
}
.hub-fire-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.hub-fire-team {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 4px 0 12px;
}
.hub-fire-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.hub-fire-stats strong { color: var(--text-primary); font-size: 1.05rem; }
.hub-fire-streak { display: none; } /* streak pill removed */
.hub-fire-arrow {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ── Rivalry card ────────────────────────────────────────────── */
.hub-rivalry-section {
  padding: 28px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.hub-rivalry-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}
.hub-rv-side {
  padding: 20px 16px;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}
.hub-rv-side:hover { background: var(--bg-secondary); }
.hub-rv-a { border-right: 1px solid var(--border-subtle); }
.hub-rv-b { border-left: 1px solid var(--border-subtle); }
.hub-rv-wins {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--red-hot);
  line-height: 1;
}
.hub-rv-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 6px;
  text-transform: uppercase;
}
.hub-rv-nom { font-size: 0.75rem; color: var(--text-secondary); }
.hub-rv-team { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; }
.hub-rv-center {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
}
.hub-rv-vs {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.hub-rv-enc { font-size: 0.65rem; color: var(--text-muted); text-align: center; }
.hub-rv-cat { font-size: 0.6rem; color: var(--text-muted); text-align: center; margin-top: 2px; }

/* ── Hub ranking list ────────────────────────────────────────── */
.hub-ranking-section {
  padding: 28px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.hub-rank-list { display: flex; flex-direction: column; gap: 4px; }
.hub-rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.hub-rank-row:hover { border-color: var(--red-hot); background: var(--bg-secondary); }
.hub-rank-leader { border-left: 3px solid var(--hub-color, #E11D48); }
.hub-rank-pos {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 28px;
  text-align: center;
}
.hub-rank-pos-1 { color: #F59E0B; }
.hub-rank-pos-2 { color: #9DB3C2; }
.hub-rank-pos-3 { color: #C4885A; }
.hub-rank-info { flex: 1; min-width: 0; }
.hub-rank-name {
  font-weight: 600;
  font-size: 0.87rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-rank-team { font-size: 0.72rem; color: var(--text-muted); }
.hub-rank-team a { color: inherit; text-decoration: none; }
.hub-rank-team a:hover { color: var(--accent); }
.hub-rank-pts {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--red-hot);
}
.hub-rank-pts small { font-size: 0.6rem; font-weight: 400; color: var(--text-muted); }

/* ── Recent winners ──────────────────────────────────────────── */
.hub-recent-section {
  padding: 28px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.hub-recent-list { display: flex; flex-direction: column; gap: 6px; }
.hub-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.hub-recent-row:last-child { border-bottom: none; }
.hub-recent-date {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 44px;
  text-transform: uppercase;
}
.hub-recent-info { flex: 1; min-width: 0; }
.hub-recent-name {
  font-weight: 700;
  font-size: 0.87rem;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
}
.hub-recent-name:hover { color: var(--red-hot); }
.hub-recent-race {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ── Upcoming races ──────────────────────────────────────────── */
.hub-upcoming-section {
  padding: 28px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.hub-upcoming-list { display: flex; flex-direction: column; gap: 6px; }
.hub-upcoming-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.hub-upcoming-row:hover { border-color: var(--red-hot); }
.hub-upcoming-badge {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.hub-upcoming-oggi { background: rgba(225,29,72,0.12); color: var(--red-hot); }
.hub-upcoming-info { flex: 1; min-width: 0; }
.hub-upcoming-date {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
}
.hub-upcoming-name {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ── Hub newsroom feed ───────────────────────────────────────── */
.hub-news-section {
  padding: 28px 24px;
}
.hub-news-feed { display: flex; flex-direction: column; gap: 6px; }
.hub-news-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
}
.hub-news-item:hover { background: var(--bg-secondary); }
.hub-news-icon { font-size: 1rem; flex-shrink: 0; }
.hub-news-text { flex: 1; line-height: 1.4; }
.hub-news-text strong { color: var(--text-primary); }
.hub-news-arrow { color: var(--text-muted); font-size: 0.8rem; }

/* ════════════════════════════════════════════════════════════════
   NETWORK SECTION (homepage hub selector)
   ════════════════════════════════════════════════════════════════ */
.em-network {
  padding: 60px 0 52px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.em-network-header {
  text-align: center;
  margin-bottom: 36px;
  padding: 0 24px;
}
.em-network-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin-bottom: 8px;
}
.em-network-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.05;
}
.em-network-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Gender entry cards */
.em-network-genders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 24px;
  margin-bottom: 24px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.em-gender-card {
  border-radius: 14px;
  padding: 32px 24px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}
.em-gender-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.25); }
.em-gender-m {
  background: linear-gradient(135deg, #1E3A5F 0%, #1D4ED8 100%);
  color: #fff;
}
.em-gender-f {
  background: linear-gradient(135deg, #7C1850 0%, #EC4899 100%);
  color: #fff;
}
.em-gender-symbol {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 10px;
  opacity: 0.9;
}
.em-gender-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.em-gender-cats {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-bottom: 8px;
}
.em-gender-stats { font-size: 0.72rem; opacity: 0.6; margin-bottom: 16px; }
.em-gender-cta {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  transition: background 0.15s;
}
.em-gender-card:hover .em-gender-cta { background: rgba(255,255,255,0.28); }

/* Category hub cards */
.em-network-hubs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 0 24px;
}
.hub-entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hub-entry-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--hub-gradient, var(--red-hot));
  border-radius: 12px 12px 0 0;
}
.hub-entry-card:hover {
  transform: translateY(-3px);
  border-color: var(--hub-color, #E11D48);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.hub-entry-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.hub-entry-icon { font-size: 1.6rem; }
/* Hot-dot: subtle pulsing dot instead of 🔥 emoji */
.hub-entry-hot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-hot);
  flex-shrink: 0;
  animation: hub-hot-pulse 2s ease-in-out infinite;
}
@keyframes hub-hot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
.hub-entry-label {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--hub-color, var(--text-primary));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.hub-entry-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 8px;
}
.hub-entry-count {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hub-entry-cta {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--hub-color, var(--red-hot));
  opacity: 0;
  transition: opacity 0.15s;
}
.hub-entry-card:hover .hub-entry-cta { opacity: 1; }

/* ── Hub responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .hub-subnav { top: 52px; padding: 0 10px; }
  .hub-subnav-name { display: none; }
  .hub-hero { padding: 40px 20px 36px; }
  .hub-fire-section,
  .hub-rivalry-section,
  .hub-ranking-section,
  .hub-recent-section,
  .hub-upcoming-section,
  .hub-news-section { padding: 20px 16px; }
  .em-network-genders { grid-template-columns: 1fr; max-width: 340px; }
  .em-network-hubs { grid-template-columns: repeat(2, 1fr); }
  .hub-rivalry-card { grid-template-columns: 1fr auto 1fr; }
  .hub-rv-wins { font-size: 1.4rem; }
}
@media (min-width: 768px) {
  .hub-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .hub-fire-section,
  .hub-rivalry-section { grid-column: span 1; }
  .hub-ranking-section,
  .hub-recent-section,
  .hub-upcoming-section,
  .hub-news-section { grid-column: span 1; }
}
@media (min-width: 1100px) {
  .hub-content-grid { grid-template-columns: 1fr 1fr 1fr; }
  .hub-fire-section { grid-column: span 2; }
  .hub-news-section { grid-column: span 1; }
}

/* ════════════════════════════════════════════════════════════════
   GLOBAL FILTER BAR — slim persistent context indicator
   ════════════════════════════════════════════════════════════════ */
.global-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--hub-color, #E11D48) 10%, var(--bg-secondary));
  border-bottom: 1px solid color-mix(in srgb, var(--hub-color, #E11D48) 30%, transparent);
  padding: 7px 20px;
  font-size: 0.78rem;
}
.gfb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hub-color, #E11D48);
  flex-shrink: 0;
  animation: gfb-blink 2s ease-in-out infinite;
}
@keyframes gfb-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.gfb-label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hub-color, #E11D48);
  flex: 1;
}
.gfb-clear {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.gfb-clear:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════════════
   CATEGORY FILTER STRIP — compact homepage chip row
   ════════════════════════════════════════════════════════════════ */
.cat-filter-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-filter-strip::-webkit-scrollbar { display: none; }
.cat-filter-label {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--chip-color, var(--text-secondary));
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.cat-chip:hover {
  background: color-mix(in srgb, var(--chip-color, #E11D48) 12%, var(--bg-card));
  border-color: var(--chip-color, #E11D48);
  transform: translateY(-1px);
}

/* em-network block (gender cards + hub cards) — demoted, smaller presence */
.em-network { padding: 40px 0 36px; }
.em-network-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.em-gender-card { padding: 24px 20px; }
.em-gender-symbol { font-size: 2.2rem; }

@media (max-width: 600px) {
  .cat-filter-strip { padding: 14px 16px; gap: 8px; }
  .global-filter-bar { padding: 6px 14px; }
}

/* Entry overlay disabled — legacy */
.entry-page { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE HERO — cinematic with inline contextual selector
   ═══════════════════════════════════════════════════════════════ */

.home-hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.home-hero-glow {
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(ellipse 65% 55% at 8% 55%, rgba(225,29,72,.11) 0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 92% 20%, rgba(99,102,241,.09) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 50% 100%, rgba(16,185,129,.06) 0%, transparent 55%);
  animation: heroGlowPulse 11s ease-in-out infinite alternate;
}

@keyframes heroGlowPulse {
  0%   { transform: scale(1)    rotate(0deg); }
  100% { transform: scale(1.07) rotate(2deg); }
}

.home-hero-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 56px 40px 44px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.home-hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  justify-content: center;
}

.home-hero-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* hero typography */
.hero-eyebrow {
  font-size: .62rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(255,255,255,.32);
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.06;
  margin: 0;
  color: var(--text-primary);
}

.hero-hl-accent { color: var(--primary, #E11D48); }

.hero-subline {
  font-size: .82rem;
  color: var(--text-muted);
  letter-spacing: .04em;
  margin: 0;
}

/* ── contextual selector ─────────────────────────────────────── */
.home-hero-ctx {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.hcs-gender-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.hcs-tab {
  background: none;
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.4);
  padding: .28rem .8rem;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
}
.hcs-tab.hcs-tab-on,
.hcs-tab:hover {
  border-color: rgba(255,255,255,.55);
  color: var(--text-primary);
  background: rgba(255,255,255,.07);
}

.hcs-reset {
  background: none;
  border: none;
  color: rgba(255,255,255,.22);
  font-size: .65rem;
  cursor: pointer;
  letter-spacing: .04em;
  margin-left: auto;
  padding: .2rem .3rem;
  transition: color .2s;
}
.hcs-reset:hover { color: rgba(255,255,255,.55); }

.hcs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.hcs-pill {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  padding: .28rem .82rem;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.hcs-pill:hover {
  border-color: var(--pill-c, #E11D48);
  color: var(--pill-c, #E11D48);
  background: rgba(0,0,0,.15);
}
.hcs-pill.hcs-pill-on {
  background: var(--pill-c, #E11D48);
  border-color: var(--pill-c, #E11D48);
  color: #fff;
  font-weight: 800;
}

.hero-ctas { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ── hero responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .home-hero-body {
    grid-template-columns: 1fr;
    padding: 36px 20px 28px;
    gap: 24px;
  }
  .home-hero-right { order: -1; }
  .hero-headline { font-size: clamp(1.9rem, 6.5vw, 2.8rem); }
}

/* ═══════════════════════════════════════════════════════════════
   ENTRY EXPERIENCE (legacy — gateway removed, selector inline)
   ═══════════════════════════════════════════════════════════════ */

.entry-page-hidden {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #040712;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.entry-bg-glow {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(ellipse 90% 70% at 15% 60%, rgba(225,29,72,.14) 0%, transparent 55%),
    radial-gradient(ellipse 80% 70% at 85% 25%, rgba(99,102,241,.11) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 95%, rgba(16,185,129,.07) 0%, transparent 55%);
  animation: entryGlowPulse 9s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes entryGlowPulse {
  0%   { transform: scale(1)    rotate(0deg); }
  100% { transform: scale(1.08) rotate(3deg); }
}

.entry-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 660px;
  padding: 2rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.8rem;
  text-align: center;
}

/* brand block */
.entry-brand { display: flex; flex-direction: column; align-items: center; gap: .55rem; }

.entry-logo-ring {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(225,29,72,.65);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800;
  font-size: .95rem; letter-spacing: .12em; color: #E11D48;
  box-shadow: 0 0 22px rgba(225,29,72,.3);
  animation: entryRingPulse 3.5s ease-in-out infinite;
}

@keyframes entryRingPulse {
  0%, 100% { box-shadow: 0 0 22px rgba(225,29,72,.3); }
  50%       { box-shadow: 0 0 38px rgba(225,29,72,.55); }
}

.entry-title {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 9vw, 5rem);
  font-weight: 900;
  letter-spacing: .07em;
  color: #fff;
  margin: 0;
  line-height: 1;
  text-shadow: 0 2px 40px rgba(0,0,0,.5);
}

.entry-tagline {
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  margin: 0;
}

/* selector block */
.entry-selector {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
}

.entry-prompt {
  font-family: var(--font-heading);
  font-size: .68rem;
  letter-spacing: .32em;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  margin: 0;
}

/* gender cards */
.entry-gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

.entry-gender-card {
  border-radius: 18px;
  padding: 2.6rem 1.5rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s;
  border: 1px solid rgba(255,255,255,.06);
  user-select: none;
}

.entry-men {
  background: linear-gradient(150deg, #0c1a3d 0%, #1a3470 55%, #1d4ed8 100%);
  box-shadow: 0 8px 36px rgba(29,78,216,.22);
}
.entry-women {
  background: linear-gradient(150deg, #2a0818 0%, #6b1f3e 55%, #E11D48 100%);
  box-shadow: 0 8px 36px rgba(225,29,72,.22);
}

.entry-gender-card:hover { transform: translateY(-5px) scale(1.02); }
.entry-men:hover    { box-shadow: 0 18px 52px rgba(29,78,216,.45); }
.entry-women:hover  { box-shadow: 0 18px 52px rgba(225,29,72,.45); }

.entry-gender-symbol {
  font-size: 2.9rem; color: rgba(255,255,255,.88); line-height: 1;
}
.entry-gender-name {
  font-family: var(--font-heading); font-size: 1.45rem;
  font-weight: 800; letter-spacing: .1em; color: #fff;
}
.entry-gender-cta {
  font-size: .73rem; letter-spacing: .14em; color: rgba(255,255,255,.42); margin-top: .4rem;
}

/* category step */
.entry-cat-view .entry-content { gap: 1.4rem; }

.entry-back {
  background: none;
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.55);
  padding: .38rem 1rem;
  border-radius: 100px;
  font-size: .78rem;
  cursor: pointer;
  letter-spacing: .05em;
  transition: all .2s;
  align-self: flex-start;
}
.entry-back:hover { background: rgba(255,255,255,.08); color: #fff; }

.entry-prompt-cat { margin-bottom: -.3rem; }

.entry-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  width: 100%;
}

.entry-cat-card {
  border-radius: 15px;
  padding: 1.8rem 1.2rem 1.55rem;
  display: flex; flex-direction: column; align-items: center; gap: .32rem;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.07);
  transition: transform .25s cubic-bezier(.4,0,.2,1), filter .25s;
  position: relative; overflow: hidden;
  user-select: none;
}
.entry-cat-card:hover {
  transform: translateY(-4px);
  filter: brightness(1.1);
}

.entry-cat-name {
  font-family: var(--font-heading); font-size: 1rem;
  font-weight: 800; letter-spacing: .08em; color: #fff;
}
.entry-cat-sub {
  font-size: .68rem; letter-spacing: .16em;
  color: rgba(255,255,255,.42); text-transform: uppercase;
}
.entry-cat-go {
  font-size: 1.1rem; color: var(--cat-c, #fff);
  margin-top: .35rem; opacity: .65;
}

/* skip link */
.entry-skip {
  font-size: .7rem; letter-spacing: .1em;
  color: rgba(255,255,255,.22); cursor: pointer;
  text-transform: uppercase; transition: color .2s;
}
.entry-skip:hover { color: rgba(255,255,255,.48); }

/* ═══════════════════════════════════════════════════════════════
   CONTEXT CHIP — navbar persistent selector
   ═══════════════════════════════════════════════════════════════ */

#ctx-chip {
  display: flex; align-items: center; gap: .3rem;
  padding: .28rem .7rem;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: .68rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  transition: filter .2s, transform .2s;
  flex-shrink: 0;
  white-space: nowrap;
}
#ctx-chip:hover { filter: brightness(1.25); transform: translateY(-1px); }

#ctx-chip.ctx-chip-on {
  border: 1px solid var(--ctx-c, #E11D48);
  color: var(--ctx-c, #E11D48);
  background: rgba(0,0,0,.35);
}
#ctx-chip.ctx-chip-off {
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.04);
}

.ctx-chip-lbl { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.ctx-chip-arr { font-size: .5rem; opacity: .65; flex-shrink: 0; }

/* ── entry responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .entry-content { gap: 2rem; padding: 1.5rem 1rem 2rem; }
  .entry-gender-grid { gap: .7rem; }
  .entry-gender-card { padding: 2rem .9rem 1.6rem; border-radius: 14px; }
  .entry-gender-symbol { font-size: 2.3rem; }
  .entry-gender-name { font-size: 1.2rem; }
  .entry-cat-grid { gap: .6rem; }
  .entry-cat-card { padding: 1.5rem .9rem 1.3rem; border-radius: 12px; }
  .entry-cat-name { font-size: .9rem; }
  .ctx-chip-lbl { max-width: 70px; }
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORY BANNERS — oblique clip-path split, photo backgrounds
   ═══════════════════════════════════════════════════════════════ */

.cat-banners {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cat-banner {
  position: relative;
  height: clamp(160px, 20vw, 260px);
  overflow: hidden;
}

.cat-banner-half {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: filter .25s, transform .3s;
}
.cat-banner-half:hover { filter: brightness(1.18) contrast(1.04); transform: scale(1.025); }

.cat-banner-m {
  clip-path: polygon(0 0, calc(50% + 80px) 0, calc(50% - 80px) 100%, 0 100%);
}

.cat-banner-f {
  clip-path: polygon(calc(50% + 80px) 0, 100% 0, 100% 100%, calc(50% - 80px) 100%);
}

.cat-banner-on::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2.5px solid rgba(255,255,255,.4);
  pointer-events: none;
}

/* inner label layout */
.cbi {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 44%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: clamp(20px, 4vw, 60px);
  gap: .4rem;
}

.cbi-r {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 44%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding-right: clamp(20px, 4vw, 60px);
  gap: .4rem;
}

.cbi-text {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.cbi-text-r { align-items: flex-end; }

.cbi-name {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  font-weight: 900;
  letter-spacing: .06em;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}

.cbi-gender {
  font-size: .6rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* mobile */
@media (max-width: 600px) {
  .cat-banner { height: 100px; }
  .cat-banner-m { clip-path: polygon(0 0, calc(50% + 40px) 0, calc(50% - 40px) 100%, 0 100%); }
  .cat-banner-f { clip-path: polygon(calc(50% + 40px) 0, 100% 0, 100% 100%, calc(50% - 40px) 100%); }
  .cbi-name { font-size: .95rem; }
}

/* ═══════════════════════════════════════════════════════════════
   HUB THEMING — applies when body[data-hub] is set
   ═══════════════════════════════════════════════════════════════ */

/* Navbar accent stripe under active link */
body[data-hub] .nav-link.active {
  color: var(--hub-color) !important;
}
body[data-hub] .nav-link.active::after {
  background: var(--hub-color) !important;
}

/* Navbar bottom border gets hub color */
body[data-hub] #navbar {
  border-bottom-color: var(--hub-color);
  box-shadow: 0 1px 0 0 var(--hub-color);
}

/* Primary buttons use hub color */
body[data-hub] .em-btn-primary,
body[data-hub] .hub-hero-btn:not(.hub-hero-btn-ghost) {
  background: var(--hub-color) !important;
  border-color: var(--hub-color) !important;
}

/* Hub subnav active tab and border already use --hub-color via CSS variable */

/* Scroll indicator and dots */
body[data-hub] .gfb-dot { background: var(--hub-color); }

/* ── Hub category title (replaces ITALIACRIT in hub pages) ──── */
body[data-hub] .hub-cat-title {
  color: var(--hub-color);
}

/* ── Hub last results wrapper ────────────────────────────────── */
.hub-last-results {
  background: var(--bg-secondary);
  padding: 28px var(--sp-page);
  border-bottom: 1px solid var(--border-subtle);
}

/* ── Upcoming weekend ────────────────────────────────────────── */
.hub-upcoming-weekend {
  background: var(--bg-card);
  padding: 28px var(--sp-page) 24px;
  border-top: 3px solid var(--hub-color, var(--red-hot));
  border-bottom: 1px solid var(--border-subtle);
}
.hub-upcoming-weekend .hub-section-label {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 0;
}
.hub-last-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}
.hub-last-row {
  display: grid;
  grid-template-columns: 52px 110px 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.12s;
}
.hub-last-row:last-child { border-bottom: none; }
.hub-last-row:hover { background: var(--bg-secondary); }
@media (max-width: 580px) {
  .hub-last-row {
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    padding: 10px 12px;
  }
  .hub-last-date { grid-column: 1; grid-row: 1; }
  .hub-last-name { grid-column: 2; grid-row: 1; }
  .hub-last-cat  { grid-column: 1; grid-row: 2; font-size: 0.58rem; }
  .hub-last-winner { grid-column: 2; grid-row: 2; text-align: left; font-size: 0.75rem; }
}
.hub-last-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.hub-last-cat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--hub-color, var(--accent));
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-last-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-last-winner {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  text-align: right;
}

/* ── Hub section headers ─────────────────────────────────────── */
.hub-section-header--wide {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.hub-wk-date {
  font-weight: 400;
  color: var(--hub-color, var(--red-hot));
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ── Result rows — card style matching hub-rank-row ─────────── */
.hlr-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}
.hub-last-results--half .hlr-list,
.hub-last-results--home .hlr-list {
  grid-template-columns: 1fr 1fr;
}
.hlr-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
.hlr-row:hover {
  border-color: var(--hub-color, var(--red-hot));
  background: var(--bg-elevated);
}
.hlr-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  min-width: 34px;
  text-align: center;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.3;
}
.hlr-info { flex: 1; min-width: 0; }
.hlr-race-name {
  font-weight: 600;
  font-size: 0.87rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hlr-winner-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hlr-cat-badge {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--hub-color, var(--accent));
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 2px 5px;
  border-radius: 3px;
  opacity: 0.8;
  flex-shrink: 0;
  white-space: nowrap;
}
.hlr-no-winner { font-size: 0.87rem; color: var(--text-muted); opacity: 0.4; }

@media (max-width: 700px) {
  .hlr-list { grid-template-columns: 1fr; }
  .hub-last-results--half .hlr-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hlr-cat-badge { display: none; }
}

/* ── Hub dual layout — two sections side by side ───────────── */
.hub-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border-subtle);
}
.hub-dual > * {
  border-right: 1px solid var(--border-subtle);
}
.hub-dual > *:last-child {
  border-right: none;
}

/* Half-width spotlight (in dual) */
.em-spotlight--half {
  min-height: 280px;
  padding: 52px 36px;
}
.em-spotlight--half .em-spotlight-bg-name {
  font-size: clamp(4rem, 9vw, 11rem);
}
.em-spotlight--half .em-spot-name {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

/* ── Home last results ─────────────────────────────────────────── */
.hub-last-results--home {
  background: var(--bg-secondary);
}

/* ── Half-width versus (in dual — esordienti) ─────────────────── */
.em-versus--half {
  border-bottom: none;
  padding: 48px 24px;
  gap: 20px;
}
.em-versus--half .em-versus-ring {
  gap: 12px;
  max-width: none;
}
.em-versus--half .em-vs-name {
  font-size: clamp(1.1rem, 2.2vw, 2rem);
}
.em-versus--half .em-vs-vs {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

/* ── Full-width versus (non-esordienti hubs) — big names ───────── */
.em-versus:not(.em-versus--half) .em-versus-ring {
  max-width: 1400px;
  margin: 0 auto;
}
.em-versus:not(.em-versus--half) .em-vs-name {
  font-size: clamp(2.5rem, 5.5vw, 5.5rem);
}
.em-versus:not(.em-versus--half) .em-vs-vs {
  font-size: clamp(4rem, 10vw, 9rem);
}

/* Weekend upcoming */
.em-upcoming--weekends { max-width: 900px; margin: 0 auto; padding: 36px var(--sp-page); }
.hub-weekend-block { margin-bottom: 24px; }
.hub-weekend-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--hub-color, var(--red-hot));
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}
.hub-weekend-races { display: flex; flex-direction: column; }
.hub-ug-oggi   { color: var(--hub-color, var(--red-hot)); font-weight: 800; }
.hub-ug-domani { color: var(--yellow-race); font-weight: 700; }

@media (max-width: 600px) {
  .hub-dual {
    grid-template-columns: 1fr;
  }
  .hub-dual > * {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .hub-dual > *:last-child {
    border-bottom: none;
  }
  .em-spotlight--half { padding: 40px 20px; }
}

/* ── Home hero — centered single-column layout ─────────────── */
.em-hero-content--centered {
  grid-template-columns: 1fr;
  max-width: 760px;
  padding: 64px 48px 52px;
  text-align: center;
}
.em-hero-content--centered .em-hero-ctas {
  justify-content: center;
}

/* ── Ultimi risultati standalone section ────────────────────── */
.em-recent-results {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px var(--sp-page) 8px;
}
.em-recent-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.em-race-feed--standalone {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}
.em-race-feed--standalone .em-race-row {
  padding: 12px 18px;
  border-color: var(--border-subtle);
}
.em-race-feed--standalone .em-race-row:hover {
  background: var(--bg-secondary);
}
body[data-hub] .loading-bar { background: var(--hub-color) !important; }


/* ════════════════════════════════════════════════════════════════
   CINEMATIC ENTRY GATEWAY
   Premium sports broadcast opening sequence
   ════════════════════════════════════════════════════════════════ */

/* ── Base overlay ─────────────────────────────────────────────── */
.itc-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: #03060d;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
.itc-gate--in  { opacity: 1; pointer-events: auto; transition: opacity .5s ease; }
.itc-gate--out { opacity: 0; pointer-events: none;  transition: opacity .55s cubic-bezier(.4,0,.6,1); }

/* ── Film grain ───────────────────────────────────────────────── */
.itc-gate-grain {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 280px 280px;
  mix-blend-mode: overlay;
  animation: itc-grain-shift 0.4s steps(1) infinite;
}
@keyframes itc-grain-shift {
  0%  { background-position: 0 0; }
  25% { background-position: -40px -60px; }
  50% { background-position: 60px 30px; }
  75% { background-position: -20px 50px; }
}

/* ── Header (logo + tagline) ──────────────────────────────────── */
.itc-gate-hdr {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 4vh, 40px) 20px 0;
  pointer-events: none;
}
.itc-gate-logo {
  height: clamp(72px, 13vh, 130px);
  width: auto;
  filter: drop-shadow(0 0 28px rgba(255,255,255,.28));
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .6s ease .1s, transform .6s ease .1s;
}
.itc-gate--in .itc-gate-logo { opacity: 1; transform: none; }

.itc-gate-tagline {
  margin-top: 8px;
  font-family: 'Inter Tight', sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  opacity: 0;
  transition: opacity .6s ease .3s;
}
.itc-gate--in .itc-gate-tagline { opacity: 1; }

/* ── Skip button ──────────────────────────────────────────────── */
.itc-gate-skip {
  position: absolute;
  bottom: clamp(16px, 3vh, 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  background: none;
  border: none;
  font-family: 'Inter Tight', sans-serif;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.2);
  cursor: pointer;
  padding: 8px 16px;
  transition: color .25s, opacity .4s ease .5s;
  opacity: 0;
  white-space: nowrap;
}
.itc-gate--in .itc-gate-skip { opacity: 1; }
.itc-gate-skip:hover { color: rgba(255,255,255,.55); }

/* ── Split container ──────────────────────────────────────────── */
.itc-gate-split {
  display: flex;
  height: 100%;
  position: relative;
  z-index: 10;
}

/* ── Vertical divider ─────────────────────────────────────────── */
.itc-gate-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255,255,255,.12) 15%,
    rgba(255,255,255,.18) 50%,
    rgba(255,255,255,.12) 85%,
    transparent 100%
  );
  z-index: 20;
  pointer-events: none;
  transform: translateX(-0.5px);
  transition: opacity .4s ease;
}

/* ── World panels ─────────────────────────────────────────────── */
.itc-gate-world {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    flex 0.62s cubic-bezier(.22,.8,.35,1),
    opacity .42s ease;
  will-change: flex, opacity;
}

/* Men atmosphere */
.itc-atmo-M {
  position: absolute;
  inset: -5%;
  background:
    radial-gradient(ellipse 60% 55% at 35% 55%, rgba(29,78,216,.75) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 75% 20%, rgba(14,116,144,.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 85%, rgba(15,23,42,.9) 0%, transparent 60%),
    linear-gradient(165deg, #030712 0%, #060d1f 40%, #0a1a38 75%, #0d2248 100%);
  animation: itc-breathe-M 8s ease-in-out infinite;
  will-change: transform;
}
@keyframes itc-breathe-M {
  0%,100% { transform: scale(1) translate(0,0); }
  50%      { transform: scale(1.025) translate(-6px, 4px); }
}

/* Women atmosphere */
.itc-atmo-F {
  position: absolute;
  inset: -5%;
  background:
    radial-gradient(ellipse 60% 55% at 65% 55%, rgba(157,23,77,.75) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 25% 20%, rgba(109,40,217,.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 85%, rgba(30,0,20,.9) 0%, transparent 60%),
    linear-gradient(165deg, #0d0008 0%, #1a0014 40%, #2e0028 75%, #3a0035 100%);
  animation: itc-breathe-F 9s ease-in-out infinite;
  will-change: transform;
}
@keyframes itc-breathe-F {
  0%,100% { transform: scale(1) translate(0,0); }
  50%      { transform: scale(1.025) translate(6px, -4px); }
}

/* Hover glow per-side */
.itc-world-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}
.itc-world-M .itc-world-glow {
  background: radial-gradient(ellipse at center, rgba(59,130,246,.18) 0%, transparent 68%);
}
.itc-world-F .itc-world-glow {
  background: radial-gradient(ellipse at center, rgba(236,72,153,.18) 0%, transparent 68%);
}
.itc-gate-world:hover .itc-world-glow { opacity: 1; }

/* Subtle diagonal light lines */
.itc-world-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  background: repeating-linear-gradient(
    115deg,
    transparent 0,
    transparent 60px,
    rgba(255,255,255,1) 60px,
    rgba(255,255,255,1) 61px
  );
}

/* World label content */
.itc-world-body {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(80px,12vh,120px) 16px clamp(40px,6vh,80px);
  text-align: center;
  transition: transform .35s ease;
}
.itc-gate-world:hover .itc-world-body { transform: translateY(-5px); }

.itc-world-pre {
  display: block;
  font-family: 'Inter Tight', sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .28em;
  color: rgba(255,255,255,.28);
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0;
  transition: opacity .5s ease .35s;
}
.itc-gate--in .itc-world-pre { opacity: 1; }

.itc-world-word {
  display: block;
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(4rem, 9vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0,0,0,.6);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease .2s, transform .6s ease .2s;
}
.itc-gate--in .itc-world-word { opacity: 1; transform: none; }

.itc-world-enter {
  display: block;
  margin-top: 18px;
  font-family: 'Inter Tight', sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: rgba(255,255,255,.18);
  text-transform: uppercase;
  transition: color .25s;
  opacity: 0;
  transition: opacity .5s ease .45s, color .25s;
}
.itc-gate--in .itc-world-enter { opacity: 1; }
.itc-gate-world:hover .itc-world-enter { color: rgba(255,255,255,.6); }

/* ── World expand / collapse animation ───────────────────────── */
.itc-world--expanding { flex: 12 !important; }
.itc-world--collapsing {
  flex: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* ── Category panel ───────────────────────────────────────────── */
.itc-gate-cats {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px,13vh,130px) clamp(6vw,9vw,140px) clamp(50px,8vh,90px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity .38s ease, transform .38s ease;
}
.itc-gate-cats.itc-cats--M {
  background:
    radial-gradient(ellipse 70% 60% at 25% 50%, rgba(29,78,216,.65) 0%, transparent 65%),
    linear-gradient(165deg, #030712 0%, #06112b 100%);
}
.itc-gate-cats.itc-cats--F {
  background:
    radial-gradient(ellipse 70% 60% at 75% 50%, rgba(157,23,77,.65) 0%, transparent 65%),
    linear-gradient(165deg, #0d0008 0%, #2e0030 100%);
}
.itc-gate-cats.itc-cats--in  { opacity: 1; pointer-events: auto; transform: none; }
.itc-gate-cats.itc-cats--out { opacity: 0; pointer-events: none; transform: translateX(-16px);
                                 transition: opacity .28s ease, transform .28s ease; }

/* Back button */
.itc-cat-back {
  background: none;
  border: none;
  font-family: 'Inter Tight', sans-serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  cursor: pointer;
  padding: 0;
  margin-bottom: clamp(16px,3vh,32px);
  transition: color .2s;
  align-self: flex-start;
}
.itc-cat-back:hover { color: rgba(255,255,255,.7); }

/* Section title */
.itc-cat-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(255,255,255,.22);
  margin-bottom: clamp(12px,2.5vh,24px);
}

/* Category rows */
.itc-cat-row {
  display: flex;
  align-items: center;
  gap: clamp(14px,2vw,28px);
  padding: clamp(14px,2.2vh,22px) 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity .4s ease calc(var(--i) * 65ms),
    transform .4s ease calc(var(--i) * 65ms),
    border-color .2s ease;
  will-change: transform, opacity;
}
.itc-cats--in .itc-cat-row { opacity: 1; transform: none; }
.itc-cat-row:hover { border-bottom-color: var(--cc); }
.itc-cat-row:first-of-type { border-top: 1px solid rgba(255,255,255,.06); }
.itc-cat-row:hover:first-of-type { border-top-color: var(--cc); }

.itc-cat-idx {
  font-family: 'Inter Tight', sans-serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(255,255,255,.15);
  min-width: 22px;
  flex-shrink: 0;
}
.itc-cat-name {
  flex: 1;
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
  color: #fff;
  transition: color .22s ease, transform .22s ease;
}
.itc-cat-row:hover .itc-cat-name { color: var(--cc); transform: translateX(8px); }

.itc-cat-arr {
  font-size: 1.1rem;
  color: rgba(255,255,255,.12);
  flex-shrink: 0;
  transition: color .22s ease, transform .22s ease;
}
.itc-cat-row:hover .itc-cat-arr { color: var(--cc); transform: translateX(5px); }

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .itc-gate-split { flex-direction: column; }
  .itc-gate-divider {
    top: 50%; bottom: auto;
    left: 0; right: 0;
    width: auto; height: 1px;
    background: linear-gradient(
      to right,
      transparent 0%,
      rgba(255,255,255,.14) 20%,
      rgba(255,255,255,.14) 80%,
      transparent 100%
    );
    transform: none;
  }
  .itc-world--expanding { flex: 8 !important; }
  .itc-world-word { font-size: clamp(3.5rem, 18vw, 5.5rem); }
  .itc-gate-cats {
    padding: 70px 24px 40px;
  }
  .itc-cat-name { font-size: clamp(1.9rem, 11vw, 3rem); }
  .itc-cat-row { padding: 13px 0; }
  .itc-gate-skip { font-size: .58rem; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .itc-world-word { font-size: clamp(3.5rem, 7vw, 6rem); }
  .itc-cat-name   { font-size: clamp(1.8rem, 4.5vw, 3.5rem); }
}

/* ════════════════════════════════════════════════════════════════
   CATEGORY PICKER — compact drawer for in-session switching
   ════════════════════════════════════════════════════════════════ */

/* Backdrop */
.itc-picker {
  position: fixed;
  inset: 0;
  z-index: 8888;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.itc-picker--in  { opacity: 1; pointer-events: auto; }
.itc-picker--out { opacity: 0; pointer-events: none; }

/* Slide-in panel */
.itc-pk-panel {
  width: 320px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  background: #07091a;
  border-left: 1px solid rgba(255,255,255,.07);
  transform: translateX(100%);
  transition: transform .34s cubic-bezier(.22,.8,.35,1);
  overflow: hidden;
}
.itc-picker--in  .itc-pk-panel { transform: none; }
.itc-picker--out .itc-pk-panel { transform: translateX(100%); }

/* Header */
.itc-pk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.itc-pk-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: rgba(255,255,255,.35);
}
.itc-pk-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.25);
  font-size: .9rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.itc-pk-close:hover { color: #fff; background: rgba(255,255,255,.08); }

/* Scrollable body */
.itc-pk-body { flex: 1; overflow-y: auto; padding: 6px 0; }

/* Gender section header */
.itc-pk-shdr {
  font-family: 'Inter Tight', sans-serif;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .2em;
  padding: 14px 20px 6px;
}
.itc-pk-M { color: rgba(96, 165, 250, .65); }
.itc-pk-F { color: rgba(244, 114, 182, .65); }

/* Category row */
.itc-pk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  cursor: pointer;
  transition: background .18s;
}
.itc-pk-row:hover    { background: rgba(255,255,255,.04); }
.itc-pk-row--on      { background: rgba(255,255,255,.06); }

.itc-pk-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .55;
}
.itc-pk-row--on .itc-pk-dot  { opacity: 1; }

.itc-pk-name {
  flex: 1;
  font-family: 'Inter Tight', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255,255,255,.75);
  transition: color .18s;
}
.itc-pk-row:hover .itc-pk-name { color: var(--cc); }
.itc-pk-row--on   .itc-pk-name { color: var(--cc); }

.itc-pk-arr, .itc-pk-cur {
  font-size: .75rem;
  color: rgba(255,255,255,.15);
  flex-shrink: 0;
  transition: color .18s, transform .18s;
}
.itc-pk-row:hover .itc-pk-arr { color: var(--cc); transform: translateX(3px); }
.itc-pk-row--on   .itc-pk-cur { color: var(--cc); }

/* Separator between gender groups */
.itc-pk-sep {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 6px 20px;
}

/* "Tutte" button at bottom */
.itc-pk-all {
  flex-shrink: 0;
  margin: 10px 16px 16px;
  padding: 10px 16px;
  background: none;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  font-family: 'Inter Tight', sans-serif;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: rgba(255,255,255,.3);
  cursor: pointer;
  transition: color .2s, border-color .2s;
  text-align: left;
}
.itc-pk-all:hover { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.22); }

/* Mobile: drawer from bottom */
@media (max-width: 640px) {
  .itc-picker {
    align-items: flex-end;
    justify-content: stretch;
  }
  .itc-pk-panel {
    width: 100%;
    max-width: 100%;
    max-height: 82vh;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.08);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .itc-picker--in  .itc-pk-panel { transform: none; }
  .itc-picker--out .itc-pk-panel { transform: translateY(100%); }
}

/* ── Hub championship tension status line ───────────────────────
   Lives inside .em-hero, below the subtitle.
   Shows leader + gaps in a condensed scoreboard strip.          */
.hub-champ-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px var(--page-pad, 24px);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  font-size: 0.72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
/* Esordienti: due strip affiancate, 1° anno a sx, 2° a dx */
.hub-champ-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border-subtle);
}
.hub-champ-dual .hub-champ-status {
  border-bottom: none;          /* il bordo lo gestisce il wrapper */
  border-right: 1px solid var(--border-subtle);
}
.hub-champ-dual .hub-champ-status:last-child {
  border-right: none;
}
.hub-champ-anno {
  font-weight: 900;
  color: var(--text-secondary);
  letter-spacing: .08em;
  margin-right: 2px;
}

.hub-champ-tension {
  font-weight: 900;
  color: var(--red-hot, #E11D48);
  letter-spacing: .1em;
}
.hub-champ-sep { color: var(--text-muted); opacity: .5; }
.hub-champ-leader {
  font-weight: 800;
  color: var(--text-primary);
  font-size: 0.78rem;
}
.hub-champ-pts {
  color: var(--gold, #F59E0B);
  font-weight: 700;
}
.hub-champ-divider {
  color: var(--text-muted);
  opacity: .4;
  margin: 0 2px;
}
.hub-champ-rival { color: var(--text-secondary); font-weight: 500; }
.hub-champ-rival em { font-style: normal; color: var(--text-muted); }

/* ── Hub ranking — trend & gap: pure typography, no chip ────────  */
.hub-rank-trend {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
  letter-spacing: .02em;
  /* no background, no border-radius — just color */
}
.hub-rank-up   { color: #10B981; }
.hub-rank-down { color: #EF4444; opacity: 0.7; }
.hub-rank-gap {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: right;
  margin-right: 4px;
}
.hub-rank-leader-badge {
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: .09em;
  color: var(--gold, #F59E0B);
  border: 1px solid rgba(245,158,11,.35);
  padding: 2px 5px;
  border-radius: 3px;
  margin-right: 4px;
  text-transform: uppercase;
}

/* ── Spotlight — ranking context + streak lines ─────────────── */
.em-spot-rank-ctx {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 8px;
}
.em-spot-rank-leader {
  color: var(--gold, #F59E0B);
}
.em-spot-streak {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red-hot, #E11D48);
  margin: 6px 0 10px;
  padding: 4px 8px;
  border: 1px solid rgba(225,29,72,.3);
  border-radius: 4px;
  display: inline-block;
}

/* ── Stats page: editorial intelligence section ────────────── */
.stats-intel-section {
  margin-bottom: 32px;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}
.stats-intel-lead p {
  margin: 0 0 10px 0;
  line-height: 1.65;
  max-width: 72ch;
}
.stats-intel-lead p:last-child { margin-bottom: 0; }

/* Hub newsroom: season context item */
.em-news-context {
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
  padding-bottom: 8px;
}

/* ════════════════════════════════════════════════════════════════
   SEIA — Season Editorial Intelligence Platform
   Entry gate · Gender select · Editorial hub · News archive
   ════════════════════════════════════════════════════════════════ */

/* ── ENTRY GATE (Home) ─────────────────────────────────────────── */
.entry-gate {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.entry-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  max-width: 640px;
  width: 100%;
}
.entry-logo-wrap {
  text-align: center;
}
.entry-logo-img {
  height: 56px;
  width: auto;
  margin-bottom: 12px;
  filter: var(--logo-filter, none);
}
.entry-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.entry-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}
.entry-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .2s, box-shadow .2s, transform .15s;
  cursor: pointer;
}
.entry-choice:hover {
  border-color: var(--red-hot);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.entry-choice-label {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}
.entry-choice-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-align: center;
}
.entry-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
@media (max-width: 480px) {
  .entry-choices { grid-template-columns: 1fr; }
  .entry-choice { padding: 32px 20px; }
}

/* ── GENDER SELECT ─────────────────────────────────────────────── */
.gender-select-page {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}
.gender-select-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}
.gender-select-back {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.gender-select-back:hover { color: var(--text-primary); }
.gender-select-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}
.gender-select-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cat-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cat-entry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .2s, box-shadow .15s, transform .15s;
}
.cat-entry-card:hover {
  border-color: var(--red-hot);
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transform: translateY(-2px);
}
.cat-entry-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}
.cat-entry-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.cat-entry-stat {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.cat-entry-winner {
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: 4px;
}
.gender-select-footer {
  margin-top: 40px;
  text-align: center;
}
.gender-news-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2px;
}
.gender-news-link:hover { color: var(--text-primary); }
@media (max-width: 540px) {
  .cat-entry-grid { grid-template-columns: 1fr; }
}

/* ── EDITORIAL HUB HERO ────────────────────────────────────────── */
.editorial-hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  color: #fff;
  margin: -32px -24px 0;   /* esce dai bordi .page come .pg-header */
}
@media (max-width: 768px) {
  .editorial-hero { margin: -20px -16px 0; }
}
.editorial-hero-inner {
  padding: 48px 28px 32px;
  max-width: 860px;
  margin: 0 auto;
}
.editorial-hero-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 14px;
}
.editorial-hero-title {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-weight: 800;
  line-height: 1.18;
  color: #fff;
  margin: 0 0 20px;
  max-width: 72ch;
}
.editorial-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.editorial-hero-situation {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  letter-spacing: 0.04em;
}
.editorial-hero-leader {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.3);
  padding-bottom: 1px;
}
.editorial-hero-leader:hover { color: #fff; }

/* ── EDITORIAL SUBNAV ──────────────────────────────────────────── */
.editorial-subnav-wrap .hub-subnav {
  background: rgba(0,0,0,.25) !important;
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,.1) !important;
  color: rgba(255,255,255,.8);
}
.editorial-subnav-wrap .hub-subnav-tab { color: rgba(255,255,255,.65) !important; }
.editorial-subnav-wrap .hub-subnav-tab:hover,
.editorial-subnav-wrap .hub-subnav-active { color: #fff !important; }
.editorial-subnav-wrap .hub-subnav-back,
.editorial-subnav-wrap .hub-subnav-name { color: rgba(255,255,255,.55) !important; }

/* ── MAIN SEASON ARTICLE ───────────────────────────────────────── */
.main-season-article {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 24px 40px;
}
.article-header { margin-bottom: 24px; }
.article-eyebrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin-bottom: 10px;
}
.article-title {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 12px;
}
.article-byline {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.article-intro {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 32px;
  padding-left: 16px;
  border-left: 3px solid var(--red-hot);
}
/* Article data hook (inline classifica mini) */
.article-data-hook {
  display: flex;
  gap: 12px;
  margin: 0 0 32px;
  flex-wrap: wrap;
}
.adh-leader, .adh-second {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  transition: border-color .15s;
  flex: 1;
  min-width: 200px;
}
.adh-leader { border-left: 3px solid #D97706; }
.adh-second { border-left: 3px solid var(--border-subtle); }
.adh-leader:hover, .adh-second:hover { border-color: var(--red-hot); }
.adh-pos {
  font-size: 0.68rem; font-weight: 700; color: var(--text-muted);
  min-width: 20px;
}
.adh-leader .adh-pos { color: #D97706; }
.adh-name { font-weight: 700; flex: 1; }
.adh-pts {
  font-weight: 800; font-size: 0.88rem; color: var(--text-primary);
}
.adh-gap { font-size: 0.7rem; color: var(--text-muted); }

/* Article body */
.article-body { margin: 0 0 32px; }
.article-section { margin-bottom: 28px; }
.article-section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.article-section-body {
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--text-primary);
  margin: 0;
}
/* Article footer */
.article-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}
.article-conclusion {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0 0 16px;
}
.article-cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red-hot);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.article-cta:hover { text-decoration: underline; }

/* ── SECONDARY ARTICLES ────────────────────────────────────────── */
.secondary-articles {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 40px;
}
.sec-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.sec-article {
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  border-top: 3px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sec-article-rivalry  { border-top-color: var(--red-hot); }
.sec-article-momentum { border-top-color: #10B981; }
.sec-article-team     { border-top-color: #3B82F6; }
.sec-article-scenario { border-top-color: #8B5CF6; }
.sec-art-type {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sec-art-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0;
}
.sec-art-intro {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.sec-art-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}
.sec-art-cta {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.sec-art-cta a {
  color: var(--text-secondary);
  text-decoration: none;
}
.sec-art-cta a:hover { color: var(--text-primary); }

/* ── HUB CONTEXT LINE ──────────────────────────────────────────── */
.hub-context-line {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 32px;
}
.hub-context-inner {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 12px 16px;
  border-left: 2px solid var(--border-subtle);
  font-style: italic;
}

/* ── HUB DATA NAV ──────────────────────────────────────────────── */
.hub-data-nav {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hub-data-nav-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.hub-data-nav-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hub-data-tab {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  transition: color .15s, border-color .15s, background .15s;
}
.hub-data-tab:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: var(--bg-elevated);
}

/* ── NEWS PAGE ─────────────────────────────────────────────────── */

/* News hero usa .editorial-hero standard — nessun override specifico */
.news-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.news-grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  min-height: 24px;
}
.news-count-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pg-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 8px 0 32px;
  max-width: 58ch;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.news-card {
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .2s, border-color .2s;
}
.news-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  border-color: var(--text-muted);
}
.news-card-season_story { border-top: 3px solid var(--red-hot); }
.news-card-rivalry      { border-top: 3px solid var(--red-hot); }
.news-card-momentum     { border-top: 3px solid #10B981; }
.news-card-team         { border-top: 3px solid #3B82F6; }
.news-card-scenario     { border-top: 3px solid #8B5CF6; }
.news-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.news-card-type {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.news-card-cat {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.news-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0;
}
.news-card-intro {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.news-card-cta {
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}
.news-card-cta:hover { color: var(--text-primary); }

/* ── Profile Media Section (atleta + team) ───────────────────────────────── */
.profile-media-section { margin-bottom: 8px; }

.profile-media-sub-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.profile-media-grid {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-bottom: 4px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* hide scrollbar visually but keep functionality */
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}
.profile-media-grid::-webkit-scrollbar { height: 4px; }
.profile-media-grid::-webkit-scrollbar-track { background: transparent; }
.profile-media-grid::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 2px; }

.profile-media-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  flex: 0 0 160px;
  width: 160px;
  scroll-snap-align: start;
  transition: transform 0.15s, box-shadow 0.15s;
}
.profile-media-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
@media (max-width: 480px) {
  .profile-media-card { flex: 0 0 140px; width: 140px; }
}

.profile-media-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  overflow: hidden;
  position: relative;
}
.profile-media-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.profile-media-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.profile-media-play-icon {
  width: 38px; height: 38px;
  background: rgba(239,68,68,.88);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.profile-media-badge {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,.72);
  font-weight: 800; font-size: .7rem;
  padding: 2px 6px; border-radius: 4px;
}
.profile-media-info { padding: 6px 8px 8px; }
.profile-media-athlete {
  font-size: .7rem; font-weight: 700;
  color: var(--accent); margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-media-race {
  font-size: .74rem; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.profile-media-meta {
  font-size: .68rem; color: var(--text-muted);
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ════════════════════════════════════════════════════════════════
   ADMIN GESTIONALE — layout sidebar + main
   ════════════════════════════════════════════════════════════════ */

/* Shell: sidebar fissa + main scrollabile */
.admin-shell {
  display: flex;
  min-height: calc(100vh - 64px);
  margin: -16px -16px 0;   /* annulla il padding del container padre */
}

/* Sidebar */
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  z-index: 10;
}
.admin-sidebar-title {
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .15em;
  color: var(--accent);
  padding: 20px 16px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.admin-nav-group {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 16px 4px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: .83rem;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: background .12s, color .12s;
  user-select: none;
  position: relative;
}
.admin-nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.admin-nav-item.active {
  background: var(--bg-elevated);
  color: var(--accent);
  font-weight: 700;
  border-left-color: var(--accent);
}
.admin-nav-icon { font-size: .95rem; width: 18px; text-align: center; flex-shrink: 0; }
.admin-nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

/* Main content */
.admin-main {
  flex: 1;
  padding: 28px 32px;
  overflow-x: hidden;
  min-width: 0;
}
.admin-page-header { margin-bottom: 24px; }
.admin-page-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.admin-page-sub { font-size: .85rem; color: var(--text-muted); margin: 0; }

/* Loading state */
.admin-loading {
  color: var(--text-muted);
  font-size: .85rem;
  padding: 32px 0;
}

/* Overview stat cards */
.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 18px;
  transition: box-shadow .15s, transform .15s;
}
.admin-stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-2px); }
.admin-stat-icon { font-size: 1.6rem; margin-bottom: 8px; }
.admin-stat-label { font-size: .75rem; color: var(--text-muted); margin-bottom: 4px; }
.admin-stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--accent); }

/* Action card (sync page) */
.admin-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  max-width: 480px;
}

/* Mobile: sidebar collassa sopra */
@media (max-width: 700px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px;
    gap: 4px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .admin-sidebar-title { display: none; }
  .admin-nav-group { display: none; }
  .admin-nav-item {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: .78rem;
  }
  .admin-nav-item.active { border-bottom-color: var(--accent); }
  .admin-main { padding: 16px; }
}


/* ── Media Profile ─────────────────────────────────────────────────────────── */
.media-profile-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.media-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.media-profile-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0 0 4px;
}
.media-profile-bio { font-size: .9rem; color: var(--text-secondary); margin: 0 0 8px; }
.media-profile-links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.media-profile-link {
  font-size: .82rem;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.media-profile-link:hover { text-decoration: underline; }
.media-profile-stats { font-size: .8rem; color: var(--text-muted); }

/* ── Media Album Grid (profilo fotografo) ──────────────────────────────────── */
.media-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.media-album-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.media-album-card:hover .media-album-cover img { transform: scale(1.04); }
.media-album-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-elevated);
  position: relative;
  margin-bottom: 8px;
}
.media-album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.media-album-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 2rem;
  color: var(--text-muted);
}
.media-album-count {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 4px 8px;
  background: rgba(0,0,0,.55);
  font-size: .7rem;
  color: #fff;
  text-align: right;
}
.media-album-title {
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.3;
}
.media-album-gara { margin-top: 2px; }

/* ── Media Photos Grid (pagina profilo) ────────────────────────────────────── */
.media-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}
.media-photo-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  position: relative;
  cursor: zoom-in;
  background: var(--bg-elevated);
}
.media-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.media-photo-item:hover img { transform: scale(1.06); }
.media-photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 3px 6px;
  background: rgba(0,0,0,.55);
  font-size: .65rem;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Gallery fotografo in pagina gara — strip orizzontale ──────────────────── */
.media-gallery-section { margin-top: 16px; }

.media-gallery-album { margin-bottom: 4px; }

.media-gallery-album-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.media-gallery-album-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.media-gallery-photographer {
  font-size: .75rem;
  color: var(--accent);
  text-decoration: none;
}
.media-gallery-photographer:hover { text-decoration: underline; }

.media-gallery-strip-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.media-gallery-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  flex: 1;
  /* hide scrollbar visually but keep functional */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.media-gallery-strip::-webkit-scrollbar { height: 4px; }
.media-gallery-strip::-webkit-scrollbar-track { background: transparent; }
.media-gallery-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.media-gallery-thumb {
  flex-shrink: 0;
  height: 180px;
  width: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: var(--bg-elevated);
  position: relative;
}
.media-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .22s, opacity .2s;
  display: block;
}
.media-gallery-thumb:hover img { transform: scale(1.05); }

.media-gallery-arrow {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  align-self: center;
}
.media-gallery-arrow:hover { background: var(--bg-elevated); }

@media (max-width: 600px) {
  .media-album-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .media-photos-grid { grid-template-columns: repeat(2, 1fr); }
  .media-gallery-thumb { height: 130px; }
  .media-gallery-arrow { width: 24px; height: 24px; font-size: .9rem; }
}

/* ── Social icons (media profile) ──────────────────────────────────────────── */
.social-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.social-icon-ig {
  stroke: #e1306c;
}
.social-icon-fb {
  stroke: #1877f2;
  fill: #1877f2;
}
.social-icon-strava {
  stroke: none;
  fill: #fc4c02;
}
.profile-social-links { margin-top: 6px; }

/* ── Gallery thumb expand hint ─────────────────────────────────────────────── */
.media-gallery-thumb-cover { position: relative; }
.media-gallery-expand-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.38);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background .2s;
}
.media-gallery-thumb-cover:hover .media-gallery-expand-hint { background: rgba(0,0,0,.55); }

/* ── Carousel nav buttons ──────────────────────────────────────────────────── */
.mgc-nav-btn {
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.mgc-nav-btn:hover { background: rgba(255,255,255,.28); }

/* ── Notification bell ──────────────────────────────────────────────────────── */
.notif-bell {
  position: relative;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.notif-bell:hover { background: var(--bg-elevated); }

/* Forza visibilità icone nella navbar scura */
#navbar .notif-bell {
  color: rgba(255,255,255,0.65);
}
#navbar .notif-bell:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* Su mobile l'icona busta è nascosta: i messaggi si trovano nel drawer */
@media (max-width: 640px) {
  #msg-bell { display: none !important; }
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  pointer-events: none;
}

/* ── Notification panel (dropdown) ─────────────────────────────────────────── */
.notif-panel {
  position: fixed;
  top: 54px;
  right: 12px;
  width: 360px;
  max-height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 8000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-width: 480px) {
  .notif-panel { width: calc(100vw - 24px); right: 12px; }
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .9rem;
}
.notif-panel-head button {
  background: none;
  border: none;
  font-size: .75rem;
  color: var(--accent);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.notif-panel-head button:hover { background: var(--bg-elevated); }

.notif-list {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-elevated); }
.notif-item.unread { background: color-mix(in srgb, var(--accent) 6%, var(--bg-card)); }
.notif-item.unread:hover { background: color-mix(in srgb, var(--accent) 12%, var(--bg-card)); }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-item.read .notif-dot { background: transparent; }

.notif-content { flex: 1; min-width: 0; }
.notif-title   { font-weight: 600; font-size: .83rem; margin-bottom: 2px; }
.notif-body    { font-size: .76rem; color: var(--text-muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-time    { font-size: .68rem; color: var(--text-muted); margin-top: 4px; }

.notif-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.notif-item:hover .notif-del { opacity: 1; }
.notif-del:hover { color: #dc2626; background: var(--bg-elevated); }

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ── Carousel action buttons (vicino alla foto, non in cima) ─────────────────── */
.mgc-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   MESSAGGISTICA DIRETTA
   ═══════════════════════════════════════════════════════════════ */

/* Layout principale: inbox sidebar + thread */
.msg-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 110px);
  min-height: 500px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
}
@media (max-width: 700px) {
  .msg-layout { grid-template-columns: 1fr; }
  .msg-thread-panel { display: none; }
  .msg-layout.thread-open .msg-inbox-panel { display: none; }
  .msg-layout.thread-open .msg-thread-panel { display: flex; }
}

/* Inbox (sinistra) */
.msg-inbox-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.msg-inbox-head {
  padding: 16px 18px 10px;
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--text-primary);
  font-family: var(--font-display, inherit);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.msg-inbox-head a {
  font-size: .75rem;
  color: var(--accent);
  text-decoration: none;
}
/* Search nuova conversazione */
.msg-new-search {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.msg-new-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .82rem;
  background: var(--bg-elevated);
  color: var(--text-main);
  outline: none;
  transition: border-color .15s;
}
.msg-new-search input:focus { border-color: var(--accent); }
.msg-new-search .search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.msg-user-results {
  position: absolute;
  top: calc(100% - 2px);
  left: 16px;
  right: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.msg-user-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid var(--border);
}
.msg-user-result-item:last-child { border-bottom: none; }
.msg-user-result-item:hover { background: var(--bg-elevated); }
.msg-user-result-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
  flex-shrink: 0;
}
.msg-user-result-name  { font-weight: 600; font-size: .83rem; }
.msg-user-result-role  { font-size: .7rem; color: var(--text-muted); }

.msg-conv-list { overflow-y: auto; flex: 1; scrollbar-width: thin; padding: 6px; }

.msg-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .12s;
}
.msg-conv-item:hover  { background: var(--bg-elevated); }
.msg-conv-item.active { background: color-mix(in srgb, var(--accent) 12%, var(--bg-card)); }
.msg-conv-item.unread .msg-conv-preview { color: var(--text-primary); font-weight: 600; }
.msg-conv-item.unread .msg-conv-name    { font-weight: 800; }

.msg-conv-avatar {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
  flex-shrink: 0;
}
.msg-conv-avatar::after {
  content: ''; position: absolute; bottom: 1px; right: 1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #31a24c; border: 2px solid var(--bg-card);
}
.msg-conv-info { flex: 1; min-width: 0; }
.msg-conv-name {
  font-weight: 600; font-size: .88rem; color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.msg-conv-name > span:first-child {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-conv-preview {
  font-size: .78rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.msg-conv-time  { font-size: .68rem; color: var(--text-muted); flex-shrink: 0; font-weight: 500; }
.msg-conv-badge {
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.msg-inbox-empty {
  padding: 40px 20px; text-align: center;
  color: var(--text-muted); font-size: .85rem;
}

/* Thread (destra) */
.msg-thread-panel {
  display: flex; flex-direction: column; overflow: hidden;
}
.msg-thread-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: .92rem; color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  z-index: 2;
}
.msg-thread-head .msg-conv-avatar { width: 38px; height: 38px; font-size: .85rem; }
.msg-thread-head .msg-conv-avatar::after { width: 9px; height: 9px; }
.msg-thread-head .msg-thread-head-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.msg-thread-head .msg-thread-head-sub { font-size: .68rem; font-weight: 500; color: #31a24c; }
.msg-thread-head .msg-back-btn {
  background: none; border: none; cursor: pointer;
  color: var(--accent); font-size: 1.4rem; padding: 2px 4px;
  display: none;
}
@media (max-width: 700px) { .msg-thread-head .msg-back-btn { display: block; } }

.msg-thread-body {
  flex: 1; overflow-y: auto; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin;
  background: var(--bg-base);
}
.msg-thread-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .85rem; text-align: center; padding: 40px;
}

/* Bolle messaggio */
.msg-bubble-wrap {
  display: flex; flex-direction: column;
  align-items: flex-start; max-width: 68%;
  margin-top: 2px;
}
.msg-bubble-wrap.sent { align-items: flex-end; align-self: flex-end; }
.msg-bubble-wrap .msg-bubble-time { display: none; }
.msg-bubble-wrap:hover .msg-bubble-time { display: block; }

.msg-bubble {
  padding: 8px 14px;
  border-radius: 18px;
  font-size: .88rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.msg-bubble-wrap.received .msg-bubble {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-bottom-left-radius: 5px;
}
.msg-bubble-wrap.sent .msg-bubble {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  color: #fff;
  border-bottom-right-radius: 5px;
}
/* Bolle che contengono solo media: nessuno sfondo */
.msg-bubble:has(> .msg-media:only-child),
.msg-bubble:has(> a:only-child > .msg-media:only-child) {
  padding: 0; background: none !important; box-shadow: none;
}
.msg-bubble-time {
  font-size: .62rem; color: var(--text-muted);
  margin-top: 3px; padding: 0 6px;
}
.msg-date-sep {
  align-self: center; margin: 14px 0 6px;
  font-size: .68rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
}

/* Input area */
.msg-input-area {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: flex-end;
  flex-shrink: 0;
  background: var(--bg-card);
}
.msg-input-area textarea {
  flex: 1;
  resize: none;
  border: 1px solid transparent;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: .88rem;
  font-family: inherit;
  background: var(--bg-elevated);
  color: var(--text-main);
  outline: none;
  line-height: 1.4;
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  transition: border-color .15s;
}
.msg-input-area textarea:focus { border-color: var(--accent); }
.msg-send-btn {
  background: var(--accent); color: #fff;
  border: none; border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: transform .12s, opacity .15s;
}
.msg-send-btn:active { transform: scale(.9); }
.msg-attach-btn { width: 40px; height: 40px; }
.msg-send-btn:hover { opacity: .85; }
.msg-send-btn svg { width: 18px; height: 18px; }

/* ── Media condivisi nei messaggi ── */
.msg-media {
  display: block; max-width: 240px; max-height: 240px; width: auto;
  border-radius: 10px; margin-top: 4px; cursor: pointer;
  border: 1px solid var(--border-subtle);
}
video.msg-media { cursor: default; }
.msg-bubble .msg-link {
  display: inline-block; word-break: break-all;
  color: inherit; text-decoration: underline; font-weight: 600;
}
.msg-bubble-wrap.received .msg-link { color: var(--accent); }

/* ── Bottone allega + menu ── */
.msg-attach-wrap { position: relative; flex-shrink: 0; }
.msg-attach-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-secondary); font-size: 1.3rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.msg-attach-btn:hover { border-color: var(--accent); color: var(--accent); }
.msg-attach-menu {
  position: absolute; bottom: 46px; left: 0; z-index: 30;
  display: flex; flex-direction: column; min-width: 180px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; gap: 2px;
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
.msg-attach-menu button {
  text-align: left; background: none; border: none; cursor: pointer;
  padding: 9px 12px; border-radius: 8px; font-size: .82rem; font-weight: 600;
  color: var(--text-primary); font-family: inherit; transition: background .12s;
}
.msg-attach-menu button:hover { background: var(--bg-elevated); }

/* ── Picker raccolta ── */
.msg-picker-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.msg-picker-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 80vh; display: flex; flex-direction: column; overflow: hidden;
}
.msg-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-weight: 800; font-size: .95rem; color: var(--text-primary);
}
.msg-picker-head button {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.msg-picker-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 16px; overflow-y: auto;
}
.msg-pick-item {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: var(--bg-base); border: 1px solid var(--border-subtle);
  cursor: pointer; transition: transform .12s, border-color .12s;
}
.msg-pick-item:hover { transform: scale(1.04); border-color: var(--accent); }
.msg-pick-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-pick-vid {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 1.6rem;
}
.msg-pick-type {
  position: absolute; bottom: 3px; right: 3px;
  background: rgba(0,0,0,.6); border-radius: 8px; padding: 0 4px; font-size: .7rem;
}
@media (max-width: 600px) {
  .msg-picker-grid { grid-template-columns: repeat(3, 1fr); }
  .msg-media { max-width: 180px; max-height: 180px; }
}

/* Bottone "Scrivi messaggio" sui profili */
.btn-msg-write {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .8rem; font-weight: 600;
  cursor: pointer; color: var(--text-main);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn-msg-write:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Date separator in thread */
.msg-date-sep {
  text-align: center; font-size: .68rem;
  color: var(--text-muted); margin: 8px 0;
  position: relative;
}
.msg-date-sep::before, .msg-date-sep::after {
  content: ''; position: absolute; top: 50%;
  width: 30%; height: 1px; background: var(--border);
}
.msg-date-sep::before { left: 0; }
.msg-date-sep::after  { right: 0; }

/* ══════════════════════════════════════════════════════════════════
   HUB PAGE — photo-driven full-bleed design
   ══════════════════════════════════════════════════════════════════ */

/* Escape the .page max-width:1200px container */
main.page:has(.hub-page) {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

.hub-page { padding: 0; width: 100%; overflow-x: hidden; }

/* ── HERO ────────────────────────────────────────────────────────── */
.hub-hero {
  position: relative;
  min-height: 62vh;
  background: #080a12 center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Dark gradient: strong on left for text, fades right & upward */
.hub-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(4,5,14,.95) 0%,  rgba(4,5,14,.70) 45%, rgba(4,5,14,.15) 100%),
    linear-gradient(to top,    rgba(4,5,14,.80) 0%,  transparent 55%);
}

.hub-hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(32px,6vw,80px) clamp(24px,8vw,100px);
  max-width: 680px;
}

.hub-hero-eyebrow {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(8px);
  animation: hub-fade-up .6s .1s forwards;
}

.hub-hero-title {
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: .88;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(12px);
  animation: hub-fade-up .65s .22s forwards;
}

.hub-hero-sub {
  font-size: clamp(.82rem, 1.3vw, 1rem);
  color: rgba(255,255,255,.55);
  max-width: 440px;
  line-height: 1.65;
  opacity: 0;
  transform: translateY(10px);
  animation: hub-fade-up .65s .36s forwards;
}

@keyframes hub-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* Slideshow fade layer for hero photo rotation */
.hub-hero-bg2 {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hub-hero-bg2.active { opacity: 1; }

/* ── BARS ────────────────────────────────────────────────────────── */
.hub-bars { display: flex; flex-direction: column; gap: 3px; }

.hub-bar {
  position: relative;
  display: block;
  height: clamp(260px, 30vw, 400px);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  /* scroll-entry: slide in da sinistra */
  opacity: 0;
  transform: translateX(-60px);
  transition:
    opacity  .65s cubic-bezier(.22,.68,0,1.1),
    transform .65s cubic-bezier(.22,.68,0,1.1);
}
.hub-bar.hub-visible { opacity: 1; transform: translateX(0); }

/* Photo background */
.hub-bar-bg {
  position: absolute;
  inset: 0;
  background: #060810 center/cover no-repeat;
  transform: scale(1.0);
  transition: transform .8s cubic-bezier(.22,.68,0,1.1);
  will-change: transform;
}
.hub-bar:hover .hub-bar-bg { transform: scale(1.06); }

/* YouTube video background */
.hub-bar-video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #060810;
  pointer-events: none;
}
.hub-bar-video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 56.25vw; /* 16:9 */
  min-height: 100%;
  min-width: calc(100% * 16/9);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: none;
}

/* Overlay LEFT bars (text sinistra, foto destra) */
.hub-bar-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(4,5,14,.97)  0%,
    rgba(4,5,14,.88) 30%,
    rgba(4,5,14,.50) 55%,
    rgba(4,5,14,.04) 100%
  );
  transition: background .4s;
}
.hub-bar:hover .hub-bar-overlay {
  background: linear-gradient(to right,
    rgba(4,5,14,.95)  0%,
    rgba(4,5,14,.82) 34%,
    rgba(4,5,14,.38) 58%,
    rgba(4,5,14,.01) 100%
  );
}

/* RIGHT variant: testo destra, foto sinistra */
.hub-bar--right .hub-bar-overlay {
  background: linear-gradient(to left,
    rgba(4,5,14,.97)  0%,
    rgba(4,5,14,.88) 30%,
    rgba(4,5,14,.50) 55%,
    rgba(4,5,14,.04) 100%
  ) !important;
}
.hub-bar--right:hover .hub-bar-overlay {
  background: linear-gradient(to left,
    rgba(4,5,14,.95)  0%,
    rgba(4,5,14,.82) 34%,
    rgba(4,5,14,.38) 58%,
    rgba(4,5,14,.01) 100%
  ) !important;
}

/* Content row */
.hub-bar-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 40px);
  padding: 0 clamp(28px, 7vw, 110px);
}
/* RIGHT: inverti direzione */
.hub-bar--right .hub-bar-inner { flex-direction: row-reverse; }

/* Accent stripe */
.hub-bar-stripe {
  width: 3px;
  height: 0;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--red-hot);
  transition: height .55s cubic-bezier(.22,.68,0,1.2) .2s;
}
.hub-bar.hub-visible .hub-bar-stripe { height: clamp(50px, 6vw, 80px); }

/* Counter */
.hub-bar-num {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  flex-shrink: 0;
  transition: color .2s;
}
.hub-bar:hover .hub-bar-num { color: rgba(255,255,255,.6); }

/* Text group */
.hub-bar-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hub-bar--right .hub-bar-text { align-items: flex-end; text-align: right; }

.hub-bar-label {
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -.035em;
  text-transform: uppercase;
  color: #fff;
  line-height: .95;
  transition: color .2s;
}
.hub-bar:hover .hub-bar-label { color: var(--red-hot); }

.hub-bar-desc {
  font-size: clamp(.72rem, 1.1vw, .88rem);
  color: rgba(255,255,255,.40);
  margin-top: 8px;
  font-weight: 400;
  line-height: 1.4;
  max-width: 420px;
  transition: color .2s;
}
.hub-bar--right .hub-bar-desc { max-width: 420px; }
.hub-bar:hover .hub-bar-desc { color: rgba(255,255,255,.7); }

/* Sub-items pills */
.hub-bar-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.hub-bar--right .hub-bar-subs { justify-content: flex-end; }

.hub-bar-sub-item {
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  padding: 4px 13px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  white-space: nowrap;
  transition: all .2s;
  line-height: 1.4;
}
.hub-bar-sub-item:hover,
.hub-bar:hover .hub-bar-sub-item {
  border-color: var(--red-hot);
  color: var(--red-hot);
  background: rgba(255,107,0,.12);
}

/* Arrow */
.hub-bar-arrow {
  font-size: clamp(1rem, 2.2vw, 1.8rem);
  color: rgba(255,255,255,.22);
  flex-shrink: 0;
  transition: transform .35s cubic-bezier(.22,.68,0,1.2), color .2s;
  line-height: 1;
}
.hub-bar:hover .hub-bar-arrow       { color: var(--red-hot); transform: translateX(12px); }
.hub-bar--right:hover .hub-bar-arrow { transform: translateX(-12px); }

/* Clear filter */
.hub-clear-filter {
  margin-top: 22px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  transition: all .2s;
}
.hub-clear-filter:hover {
  background: rgba(255,107,0,.15);
  border-color: var(--red-hot);
  color: var(--red-hot);
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hub-hero { min-height: 42vh; }
  .hub-hero-content { padding: 24px 20px 32px; }
  .hub-bars { gap: 2px; }
  .hub-bar { height: 160px; }
  .hub-bar--right .hub-bar-inner { flex-direction: row; }
  .hub-bar--right .hub-bar-overlay {
    background: linear-gradient(to right,
      rgba(4,5,14,.97) 0%,
      rgba(4,5,14,.88) 30%,
      rgba(4,5,14,.50) 55%,
      rgba(4,5,14,.04) 100%
    ) !important;
  }
  .hub-bar--right .hub-bar-text { align-items: flex-start; text-align: left; }
  .hub-bar--right .hub-bar-subs { justify-content: flex-start; }
  .hub-bar-inner { padding: 0 20px; gap: 12px; }
  .hub-bar-num { display: none; }
  .hub-bar-desc { display: none; }
  .hub-bar-subs { display: none; }
  .hub-bar-label { font-size: clamp(1.5rem, 6vw, 2.2rem); }
  .hub-bar-arrow { font-size: .95rem; }
}

/* ════════════════════════════════════════════════════════════════
   ITALIACRIT DASHBOARD — Sistema visivo hub categoriale v1
   Componenti: Hero · Fire Card · Rank · Movers · VS · Feed · Cal
   ════════════════════════════════════════════════════════════════ */

/* Full-width override (like hub-page) */
main.page:has(.itc-dash) {
  max-width: none !important; padding: 0 !important;
  margin: 0 !important; width: 100% !important;
}
.itc-dash { width: 100%; background: var(--bg-primary); min-height: 100vh; }

/* ── HERO ─────────────────────────────────────────────────────── */
.itc-dash-hero {
  position: relative;
  min-height: clamp(38vh, 50vh, 56vh);
  background: #060810 center / cover no-repeat;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.itc-hero-bg2 {
  position: absolute; inset: 0; z-index: 0;
  background: #060810 center / cover no-repeat;
  opacity: 0; transition: opacity 1.4s ease;
  pointer-events: none;
}
.itc-hero-bg2.active { opacity: 1; }
.itc-dash-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to right,  rgba(4,5,14,.97) 0%, rgba(4,5,14,.72) 42%, rgba(4,5,14,.18) 100%),
    linear-gradient(to top,    rgba(4,5,14,.92) 0%, transparent 60%);
}
.itc-dash-hero-content {
  position: relative; z-index: 2;
  padding: clamp(20px, 4vw, 60px) clamp(20px, 7vw, 120px) clamp(28px, 4vw, 52px);
}
.itc-dash-eyebrow {
  font-size: .6rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: 8px; opacity: .9;
}
.itc-dash-title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 900; letter-spacing: -.04em; line-height: .88;
  color: #fff; text-transform: uppercase; margin: 0 0 10px;
}
.itc-dash-meta {
  font-size: clamp(.68rem, 1.1vw, .78rem);
  color: rgba(255,255,255,.38); margin-bottom: 14px;
}

/* ── TICKER ───────────────────────────────────────────────────── */
.itc-ticker {
  background: #04050e;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow: hidden; height: 36px;
  display: flex; align-items: center;
}
.itc-ticker-track {
  white-space: nowrap; padding: 0 20px;
  animation: itc-tick 36s linear infinite;
  font-size: .64rem; font-weight: 500; letter-spacing: .04em;
  color: rgba(255,255,255,.42);
}
.itc-ticker-track strong { color: rgba(255,255,255,.8); }
@keyframes itc-tick {
  from { transform: translateX(110vw); }
  to   { transform: translateX(-100%); }
}

/* ── CHAMP BAR ────────────────────────────────────────────────── */
.itc-champ-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  padding: 9px clamp(16px, 5vw, 80px);
  background: rgba(0,0,0,.28);
  font-size: .62rem; font-weight: 700; letter-spacing: .07em;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.itc-champ-bar::-webkit-scrollbar { display: none; }
.itc-champ-label   { color: rgba(255,255,255,.3); text-transform: uppercase; }
.itc-champ-tension { color: var(--hub-color); text-transform: uppercase; }
.itc-champ-leader  { color: #fff; }
.itc-champ-pts     { color: rgba(255,255,255,.38); margin-left: 2px; }
.itc-champ-sep     { color: rgba(255,255,255,.18); }
.itc-champ-gap     { color: rgba(255,255,255,.45); }
.itc-champ-gap em  { color: rgba(255,255,255,.25); font-style: normal; }
.itc-champ-link    { margin-left: auto; color: var(--hub-color); text-decoration: none; font-size: .58rem; white-space: nowrap; padding: 2px 6px; }
.itc-champ-link:hover { text-decoration: underline; }

/* ── SECTIONS WRAPPER ─────────────────────────────────────────── */
.itc-sections {
  padding: 20px clamp(12px, 4vw, 60px) 60px;
  max-width: 1400px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
}

/* ── LAYOUTS ──────────────────────────────────────────────────── */
.itc-dual {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.itc-grid-2 {
  display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start;
}
.itc-grid-2-side { display: flex; flex-direction: column; gap: 16px; }

/* ── CARD BASE ────────────────────────────────────────────────── */
.itc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px; overflow: hidden;
}
.itc-card-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.itc-card-title {
  font-size: .58rem; font-weight: 800; letter-spacing: .11em;
  text-transform: uppercase; color: var(--text-secondary);
}
.itc-card-more {
  font-size: .62rem; color: var(--red-hot);
  text-decoration: none; font-weight: 600; white-space: nowrap;
}
.itc-card-more:hover { text-decoration: underline; }

/* ── FIRE CARD ────────────────────────────────────────────────── */
.itc-fire {
  position: relative; border-radius: 16px; overflow: hidden;
  min-height: 300px; display: flex; align-items: flex-end;
  border: 1px solid rgba(255,255,255,.06);
}
.itc-fire-bg {
  position: absolute; inset: 0; z-index: 0;
  background: #0d1117 center / cover no-repeat;
  transform: scale(1.04);
  transition: transform 8s ease;
}
/* Portrait: foto atleta con faccia in alto al centro */
.itc-fire-bg--portrait {
  background-position: top center !important;
  background-size: cover !important;
}
/* Fallback: sfondo neutro scuro con watermark cognome */
.itc-fire-bg--neutral {
  background: #0a0c14;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 5%;
}
.itc-fire-watermark {
  font-size: clamp(6rem, 20vw, 18rem); font-weight: 900;
  letter-spacing: -.06em; line-height: 1;
  color: rgba(255,255,255,.04);
  text-transform: uppercase; white-space: nowrap;
  user-select: none; pointer-events: none;
}
.itc-fire:hover .itc-fire-bg { transform: scale(1.0); }
.itc-fire-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to right,  rgba(4,5,14,.97) 0%, rgba(4,5,14,.82) 50%, rgba(4,5,14,.22) 100%),
    linear-gradient(to top,    rgba(4,5,14,.92) 0%, transparent 55%);
}
.itc-fire-content {
  position: relative; z-index: 2; width: 100%;
  padding: clamp(22px, 4vw, 56px) clamp(20px, 6vw, 100px);
}
.itc-fire-eyebrow {
  font-size: .58rem; font-weight: 800; letter-spacing: .15em;
  color: var(--hub-color); text-transform: uppercase; margin-bottom: 6px;
}
.itc-fire-rank-ctx {
  font-size: .6rem; font-weight: 700; letter-spacing: .05em;
  color: rgba(255,255,255,.4); text-transform: uppercase; margin-bottom: 8px;
}
.itc-fire-rank-leader { color: #F59E0B; }
.itc-fire-name {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900; line-height: .88; letter-spacing: -.04em;
  color: #fff; margin: 0 0 4px; text-transform: uppercase;
}
.itc-fire-firstname {
  font-size: 52%; font-weight: 400;
  color: rgba(255,255,255,.6); letter-spacing: 0; text-transform: capitalize;
}
.itc-fire-team {
  font-size: .68rem; color: rgba(255,255,255,.36); margin-bottom: 12px;
}

/* ── BADGES ───────────────────────────────────────────────────── */
.itc-badges {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.itc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .56rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; border: 1px solid;
  white-space: nowrap;
}
.itc-badge-fire   { background: rgba(225,29,72,.15);  color:#E11D48; border-color:rgba(225,29,72,.3); }
.itc-badge-hot    { background: rgba(245,158,11,.12); color:#F59E0B; border-color:rgba(245,158,11,.3); }
.itc-badge-streak { background: rgba(16,185,129,.12); color:#10B981; border-color:rgba(16,185,129,.3); }
.itc-badge-leader { background: rgba(245,158,11,.15); color:#F59E0B; border-color:rgba(245,158,11,.3); }
.itc-badge-up     { background: rgba(34,197,94,.12);  color:#22c55e; border-color:rgba(34,197,94,.3); }

/* ── FIRE STATS ───────────────────────────────────────────────── */
.itc-fire-stats {
  display: flex; gap: 20px; margin-bottom: 14px; flex-wrap: wrap;
}
.itc-fire-stat { display: flex; flex-direction: column; gap: 2px; }
.itc-fire-val  {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 900; color: #fff; line-height: 1;
}
.itc-fire-lbl  {
  font-size: .52rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.3);
}

/* ── HOT SCORE BAR ────────────────────────────────────────────── */
.itc-hot-wrap {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.itc-hot-label {
  font-size: .52rem; font-weight: 700; letter-spacing: .1em;
  color: rgba(255,255,255,.3); text-transform: uppercase; width: 42px;
}
.itc-hot-track {
  flex: 1; height: 3px; background: rgba(255,255,255,.1);
  border-radius: 999px; overflow: hidden;
}
.itc-hot-fill {
  height: 100%; border-radius: 999px;
  transition: width 1.4s cubic-bezier(.22,.68,0,1.1) .4s;
}
.itc-hot-val {
  font-size: .62rem; font-weight: 800; width: 46px; text-align: right;
}

/* ── FIRE CTAs ────────────────────────────────────────────────── */
.itc-fire-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.itc-fire-cta-primary {
  padding: 9px 18px; border-radius: 8px;
  background: var(--hub-color); color: #fff;
  font-size: .7rem; font-weight: 700; text-decoration: none;
  transition: opacity .15s; display: inline-block;
}
.itc-fire-cta-primary:hover { opacity: .82; }
.itc-fire-cta-sec {
  padding: 9px 18px; border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.65); font-size: .7rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.itc-fire-cta-sec:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ── RANK CARD ────────────────────────────────────────────────── */
.itc-rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background .15s;
}
.itc-rank-row:last-child { border-bottom: none; }
.itc-rank-row:hover { background: var(--bg-elevated); }
.itc-rank-row--leader { background: rgba(245,158,11,.05); }
.itc-rank-pos {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .58rem; font-weight: 800;
  background: var(--bg-elevated); color: var(--text-secondary);
}
.itc-rank-pos-1 { background: #F59E0B; color: #000; }
.itc-rank-pos-2 { background: #9CA3AF; color: #fff; }
.itc-rank-pos-3 { background: #CD7F32; color: #fff; }
.itc-rank-info  { flex: 1; min-width: 0; }
.itc-rank-name  {
  font-size: .76rem; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.itc-rank-sub {
  font-size: .68rem; color: var(--text-muted); margin-top: 2px;
}
.itc-rank-sub a { color: inherit; text-decoration: none; }
.itc-rank-sub a:hover { color: var(--accent); }
.itc-rank-gap {
  font-size: .58rem; color: var(--text-muted); font-weight: 600; flex-shrink: 0;
}
.itc-rank-pts {
  font-size: .82rem; font-weight: 800; color: var(--text-primary); flex-shrink: 0;
}
.itc-rank-pts small {
  font-size: .52rem; color: var(--text-muted); font-weight: 500; margin-left: 1px;
}
.itc-rank-trend {
  font-size: .52rem; font-weight: 800; margin-left: 5px;
  padding: 1px 4px; border-radius: 3px; vertical-align: middle;
}
.itc-rank-trend.up { color: #10B981; background: rgba(16,185,129,.12); }
.itc-rank-trend.dn { color: #EF4444; background: rgba(239,68,68,.10); }

/* Last-5 dots */
.itc-last5 { display: flex; gap: 3px; }
.itc-dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.itc-dot-w { background: #F59E0B; }
.itc-dot-p { background: #10B981; }
.itc-dot-t { background: rgba(99,102,241,.45); }
.itc-dot-o { background: rgba(255,255,255,.1); }

/* ── MOVERS ───────────────────────────────────────────────────── */
.itc-mover {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background .15s;
}
.itc-mover:last-child { border-bottom: none; }
.itc-mover:hover { background: var(--bg-elevated); }
.itc-mover-icon {
  font-size: .7rem; font-weight: 900; flex-shrink: 0;
  width: 18px; text-align: center;
}
.itc-mover--up .itc-mover-icon { color: #10B981; }
.itc-mover--dn .itc-mover-icon { color: #EF4444; }
.itc-mover-info { flex: 1; min-width: 0; }
.itc-mover-name { font-size: .73rem; font-weight: 700; color: var(--text-primary); display: block; }
.itc-mover-detail { font-size: .58rem; color: var(--text-muted); display: block; }

/* ── Movers corposi — badge + pos-change ─────────────────────── */
.itc-mover-section-lbl {
  font-size: .58rem; font-weight: 800; letter-spacing: .06em;
  padding: 5px 16px 3px;
}
.itc-mover-section-up { color: #10B981; }
.itc-mover-section-dn { color: #EF4444; }

.itc-mover-badge {
  flex-shrink: 0;
  min-width: 34px; text-align: center;
  font-size: .65rem; font-weight: 900;
  border-radius: 6px; padding: 3px 5px;
}
.itc-mover-badge--up { background: rgba(16,185,129,.15); color: #10B981; }
.itc-mover-badge--dn { background: rgba(239,68,68,.12);  color: #EF4444; }

.itc-mover-pos-wrap {
  display: flex; align-items: center; gap: 3px;
  flex-shrink: 0;
  font-size: .65rem;
}
.itc-mover-prev-pos { color: var(--text-muted); font-weight: 600; }
.itc-mover-arrow    { color: var(--text-muted); font-size: .55rem; }
.itc-mover-now-pos  { font-weight: 800; }

/* ── VS CARD ──────────────────────────────────────────────────── */
.itc-vs-card {}
.itc-vs-ring {
  display: flex; align-items: center;
  padding: 14px 10px 8px;
}
.itc-vs-side {
  flex: 1; text-align: center; cursor: pointer;
  padding: 8px 6px; border-radius: 8px;
  transition: background .15s;
}
.itc-vs-side:hover { background: var(--bg-elevated); }
.itc-vs-wins {
  font-size: 1.5rem; font-weight: 900; color: var(--text-primary); line-height: 1;
}
.itc-vs-name {
  font-size: .72rem; font-weight: 700; color: var(--text-primary);
  line-height: 1.25; margin-top: 3px;
}
.itc-vs-name small { font-size: .62rem; color: var(--text-secondary); font-weight: 400; }
.itc-vs-team { font-size: .56rem; color: var(--text-muted); margin-top: 3px; }
.itc-vs-center {
  width: 52px; flex-shrink: 0; text-align: center; padding: 0 4px;
}
.itc-vs-vs {
  font-size: .78rem; font-weight: 900;
  color: var(--text-secondary); letter-spacing: .1em;
}
.itc-vs-bar-wrap {
  display: flex; height: 3px; border-radius: 999px; overflow: hidden; margin-top: 6px;
}
.itc-vs-bar-a { transition: width .9s cubic-bezier(.22,.68,0,1.1) .5s; }
.itc-vs-bar-b { background: rgba(255,255,255,.12); flex: 1; }
.itc-vs-encounters {
  font-size: .58rem; color: var(--text-muted); white-space: nowrap;
}
.itc-vs-recent-pts {
  font-size: .55rem; color: var(--text-muted); margin-top: 4px; font-weight: 600;
}
.itc-vs-bar-label {
  font-size: .48rem; color: var(--text-muted); letter-spacing: .08em;
  text-transform: uppercase; margin-top: 4px;
}
.itc-vs-note {
  text-align: center; font-size: .58rem; color: var(--text-muted);
  padding: 0 16px 8px; font-style: italic;
}
.itc-vs-footer {
  padding: 10px 16px; border-top: 1px solid var(--border-subtle); text-align: center;
}
.itc-vs-cta {
  font-size: .64rem; font-weight: 700; color: var(--red-hot);
  background: none; border: 1px solid rgba(255,107,0,.3);
  border-radius: 6px; padding: 6px 14px;
  cursor: pointer; transition: all .15s;
}
.itc-vs-cta:hover { background: rgba(255,107,0,.08); }

/* ── FEED ─────────────────────────────────────────────────────── */
.itc-feed-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background .15s;
}
.itc-feed-item--link { cursor: pointer; }
.itc-feed-item:last-child { border-bottom: none; }
.itc-feed-item--link:hover { background: var(--bg-elevated); }
.itc-feed-icon { font-size: .85rem; flex-shrink: 0; margin-top: 1px; }
.itc-feed-text {
  flex: 1; font-size: .72rem; color: var(--text-primary); line-height: 1.45;
}
.itc-feed-text strong { font-weight: 700; }
.itc-feed-text em     { font-style: italic; color: var(--text-secondary); }
.itc-feed-arrow { font-size: .62rem; color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }

/* ── CALENDAR ─────────────────────────────────────────────────── */
.itc-cal-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background .15s;
}
.itc-cal-row:last-child { border-bottom: none; }
.itc-cal-row:hover { background: var(--bg-elevated); }
.itc-cal-day {
  font-size: .58rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-muted);
  width: 72px; flex-shrink: 0; line-height: 1.3;
}
.itc-cal-day--near { color: var(--red-hot); }
.itc-cal-info { flex: 1; min-width: 0; }
.itc-cal-name { font-size: .73rem; font-weight: 600; color: var(--text-primary); }
.itc-cal-loc  { font-size: .58rem; color: var(--text-muted); margin-top: 2px; }
.itc-cal-badge {
  font-size: .48rem; font-weight: 800; padding: 1px 5px;
  border-radius: 3px; letter-spacing: .06em; vertical-align: middle;
  margin-left: 4px;
}
.itc-cal-badge.cr { background: #1D4ED8; color: #fff; }
.itc-cal-badge.ci { background: #E11D48; color: #fff; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .itc-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .itc-dual { grid-template-columns: 1fr; }
  .itc-sections { padding: 16px 12px 40px; gap: 12px; }
  .itc-dash-hero { min-height: 34vh; }
  .itc-fire { min-height: 240px; }
  .itc-fire-stats { gap: 14px; }
  .itc-rank-row { padding: 8px 12px; gap: 8px; }
  /* Su mobile nascondi il gap (−xxx) per fare spazio al nome */
  .itc-rank-gap { display: none; }
  /* Pts leggermente più piccolo per non mangiarsi la riga */
  .itc-rank-pts { font-size: .78rem; }
  .itc-mover    { padding: 8px 12px; }
  .itc-feed-item{ padding: 9px 12px; }
  .itc-cal-row  { padding: 9px 12px; }
  .itc-card-hdr { padding: 10px 12px 8px; }
}

/* Dark mode adjustments */
[data-theme="dark"] .itc-ticker { background: #02030a; }
[data-theme="dark"] .itc-champ-bar { background: rgba(0,0,0,.5); }

/* ── POPULAR / TRENDING CARD ───────────────────────────────────── */
.itc-popular-card { display: flex; flex-direction: column; }
.itc-popular-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 16px;
  cursor: pointer; transition: background .15s;
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,.06));
}
.itc-popular-row:last-child { border-bottom: none; }
.itc-popular-row:hover { background: rgba(255,255,255,.04); }
.itc-popular-rank {
  width: 22px; text-align: center;
  font-size: .65rem; font-weight: 800;
  color: var(--text-muted, rgba(255,255,255,.35));
  flex-shrink: 0;
}
.itc-popular-info { flex: 1; min-width: 0; }
.itc-popular-name {
  font-size: .78rem; font-weight: 600;
  color: var(--text-primary, #fff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.itc-popular-count {
  font-size: .65rem; font-weight: 700;
  color: var(--text-muted, rgba(255,255,255,.35));
  flex-shrink: 0;
}

/* ── TEAM SECTIONS ─────────────────────────────────────────────── */
/* Section divider with centered label */
.itc-section-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 4px 0 2px;
}
.itc-section-divider::before,
.itc-section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border-color, rgba(255,255,255,.1));
}
.itc-section-divider-label {
  font-size: .55rem; font-weight: 800; letter-spacing: .2em;
  color: var(--text-muted, rgba(255,255,255,.35));
  text-transform: uppercase; white-space: nowrap;
}

/* Team fire card — slightly shorter than athlete card */
.itc-team-fire { min-height: 220px; margin-bottom: 12px; }
.itc-team-fire .itc-fire-name { word-break: break-word; hyphens: auto; }

/* ── Ranking — avatar atleta + logo team (solo desktop) ────────── */
.rk-av-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0; margin-right: 10px;
  vertical-align: middle;
}
.rk-av-img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border-subtle); display: block;
}
.rk-av-placeholder {
  width: 34px; height: 34px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-elevated); color: var(--text-muted); flex-shrink: 0;
}
.rk-tl-wrap {
  display: inline-flex; align-items: center; vertical-align: middle; margin-right: 7px;
}
.rk-tl-img { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; display: block; }
.rk-tl-placeholder {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   GAMIFICATION SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* ── Watch Button ─────────────────────────────────────────────── */
.watch-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 6px; cursor: pointer;
  font-size: .8rem; font-weight: 600; border: 1.5px solid var(--border-subtle);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all .18s;
}
.watch-btn:hover { border-color: var(--accent); color: var(--accent); }
.watch-btn--active {
  background: rgba(245,158,11,.12); border-color: #F59E0B;
  color: #F59E0B;
}
.watch-btn span { font-size: 1rem; line-height: 1; }

/* ── Athlete Badge Strip ─────────────────────────────────────── */
.ath-badge-strip {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 10px 0 4px;
}
.ath-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700;
  border: 1px solid; letter-spacing: .03em;
}
.ath-badge--badge-fire, .ath-badge--badge-hot {
  background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #EF4444;
}
.ath-badge--badge-leader, .ath-badge--badge-dominant {
  background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); color: #F59E0B;
}
.ath-badge--badge-surge, .ath-badge--badge-up {
  background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.3); color: #818CF8;
}
.ath-badge--badge-streak, .ath-badge--badge-consistent {
  background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); color: #10B981;
}
.ath-badge--badge-rookie, .ath-badge--badge-comeback {
  background: rgba(20,184,166,.1); border-color: rgba(20,184,166,.3); color: #14B8A6;
}
.ath-badge--default {
  background: var(--bg-elevated); border-color: var(--border-subtle); color: var(--text-secondary);
}

/* ── Weekly Digest Card ──────────────────────────────────────── */
.itc-digest-card {}
.itc-digest-week {
  font-size: .65rem; color: var(--text-muted); font-weight: 400;
}
.itc-digest-list { padding: 4px 16px 12px; }
.itc-digest-item {
  padding: 7px 0;
  font-size: .78rem; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.4;
}
.itc-digest-item:last-child { border-bottom: none; }
.itc-digest-item strong { color: var(--text-primary); }

/* ── MVP Card ────────────────────────────────────────────────── */
.itc-mvp-card { cursor: pointer; }
.itc-mvp-card:hover { background: var(--bg-elevated); }
.itc-mvp-body {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px 16px;
}
.itc-mvp-crown { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }
.itc-mvp-info { flex: 1; min-width: 0; }
.itc-mvp-name {
  font-size: .9rem; font-weight: 800; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.itc-mvp-team {
  font-size: .7rem; color: var(--text-muted); margin-top: 2px;
}
.itc-mvp-stats {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.itc-mvp-stat {
  font-size: .68rem; font-weight: 600; padding: 2px 8px;
  border-radius: 12px; background: var(--bg-elevated); color: var(--text-secondary);
}
.itc-mvp-stat--win { background: rgba(245,158,11,.12); color: #F59E0B; }
.itc-mvp-stat--pod { background: rgba(156,163,175,.12); color: #9CA3AF; }
.itc-mvp-stat--pts { background: rgba(99,102,241,.1); color: #818CF8; }
.itc-mvp-stat--streak { background: rgba(239,68,68,.1); color: #EF4444; }

/* ── Upset Card ──────────────────────────────────────────────── */
.itc-upset-card { cursor: pointer; }
.itc-upset-card:hover { background: var(--bg-elevated); }
.itc-upset-body {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 8px; gap: 8px;
}
.itc-upset-side { flex: 1; min-width: 0; text-align: center; }
.itc-upset-side--beaten { opacity: .75; }
.itc-upset-cls {
  display: inline-block; font-size: .6rem; font-weight: 800;
  padding: 2px 7px; border-radius: 12px; margin-bottom: 4px; letter-spacing: .04em;
}
.itc-upset-cls--winner { background: rgba(16,185,129,.15); color: #10B981; }
.itc-upset-cls--beaten { background: rgba(107,114,128,.12); color: #6B7280; }
.itc-upset-name {
  font-size: .78rem; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.itc-upset-role { font-size: .62rem; color: var(--text-muted); margin-top: 2px; }
.itc-upset-vs {
  font-size: 1.4rem; font-weight: 900; color: #F59E0B;
  flex-shrink: 0; padding: 0 4px;
}
.itc-upset-race {
  font-size: .65rem; color: var(--text-muted); text-align: center;
  padding: 0 16px 12px;
}

/* ── Rookie Card ─────────────────────────────────────────────── */
.itc-rookie-card { cursor: pointer; }
.itc-rookie-card:hover { background: var(--bg-elevated); }
.itc-rookie-body {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px 16px;
}
.itc-rookie-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.itc-rookie-info { flex: 1; min-width: 0; }
.itc-rookie-name {
  font-size: .88rem; font-weight: 800; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.itc-rookie-team { font-size: .68rem; color: var(--text-muted); margin-top: 2px; }
.itc-rookie-pos { font-size: .75rem; color: #14B8A6; font-weight: 700; margin-top: 5px; }
.itc-rookie-stats {
  display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap;
}
.itc-rookie-stats span {
  font-size: .65rem; color: var(--text-muted); font-weight: 600;
}
.itc-rookie-stats span + span::before { content: '·'; margin-right: 8px; }

/* ── Watchlist Card ──────────────────────────────────────────── */
.itc-watchlist-empty {
  padding: 16px; font-size: .78rem; color: var(--text-muted); line-height: 1.5;
}
.itc-watchlist-empty strong { color: var(--text-secondary); }
.itc-watchlist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background .15s;
}
.itc-watchlist-row:last-child { border-bottom: none; }
.itc-watchlist-row:hover { background: var(--bg-elevated); }
.itc-watchlist-info { flex: 1; min-width: 0; }
.itc-watchlist-name {
  font-size: .8rem; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.itc-watchlist-sub { font-size: .68rem; color: var(--text-muted); margin-top: 2px; }
.itc-wl-streak {
  font-size: .65rem; font-weight: 700; color: #EF4444;
  background: rgba(239,68,68,.1); border-radius: 10px; padding: 1px 6px;
  margin-left: 5px;
}
.itc-wl-remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .75rem; padding: 4px 6px;
  border-radius: 4px; flex-shrink: 0;
  transition: color .15s, background .15s;
}
.itc-wl-remove:hover { color: #EF4444; background: rgba(239,68,68,.1); }

/* ══════════════════════════════════════════════════════════
   DASHBOARD PANELS  (all roles)
   ══════════════════════════════════════════════════════════ */
.dash-wrap {
  max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px;
}
/* ── HERO ── */
.dash-hero {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 28px 28px 22px;
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.dash-hero-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #f5c400 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900; color: #fff;
  flex-shrink: 0; font-family: var(--font-display);
}
.dash-hero-info { flex: 1; min-width: 0; }
.dash-hero-name {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 800;
  color: var(--text-primary); line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-hero-email { font-size: .82rem; color: var(--text-muted); margin-top: 3px; }
.dash-role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 20px;
  background: rgba(232,0,29,.12); color: var(--accent);
  border: 1px solid rgba(232,0,29,.25);
  margin-top: 6px;
}
.dash-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── BUTTONS ── */
.dash-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; padding: 9px 18px; border-radius: 7px;
  cursor: pointer; border: none; transition: opacity .15s, transform .1s;
  text-decoration: none;
}
.dash-btn:active { transform: scale(.97); }
.dash-btn--primary  { background: var(--accent); color: #fff; }
.dash-btn--outline  { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-primary); }
.dash-btn--accent   { background: linear-gradient(135deg,#f5c400,#e8a000); color: #000; }
.dash-btn--sm       { font-size: .75rem; padding: 6px 12px; }
.dash-btn--danger   { background: transparent; border: 1px solid rgba(239,68,68,.4); color: #EF4444; }

/* ── GRID ── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

/* ── CARDS ── */
.dash-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.dash-card--accent  { border-color: rgba(232,0,29,.3); }
.dash-card--wide    { grid-column: 1 / -1; }
.dash-card-title {
  font-family: var(--font-display); font-size: .72rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
  padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle);
}
.dash-card-title span { font-size: 1rem; margin-right: 5px; }

/* ── STAT ROW ── */
.dash-stats-row { display: flex; gap: 12px; flex-wrap: wrap; }
.dash-stat {
  flex: 1; min-width: 80px; background: var(--bg-base);
  border: 1px solid var(--border-subtle); border-radius: 8px;
  padding: 10px 14px; text-align: center;
}
.dash-stat-val {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 900;
  color: var(--text-primary); line-height: 1;
}
.dash-stat-lbl { font-size: .68rem; color: var(--text-muted); margin-top: 3px; letter-spacing: .04em; text-transform: uppercase; }

/* ── RESULT ROWS ── */
.dash-results-list { display: flex; flex-direction: column; gap: 6px; }
.dash-result-row {
  display: grid; grid-template-columns: 32px 1fr auto auto;
  align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--border-subtle);
  font-size: .84rem;
}
.dash-result-row:last-child { border-bottom: none; }
.dash-result-pos {
  font-family: var(--font-display); font-weight: 800; font-size: .9rem;
  color: var(--accent); text-align: center;
}
.dash-result-name { color: var(--text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-result-date { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.dash-result-pts  { font-size: .8rem; font-weight: 700; color: var(--text-secondary); text-align: right; }

/* ── CALENDAR ROWS ── */
.dash-cal-row {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--border-subtle); font-size: .84rem;
}
.dash-cal-row:last-child { border-bottom: none; }
.dash-cal-date {
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  color: var(--accent); min-width: 60px; text-align: center;
  background: rgba(232,0,29,.08); border-radius: 5px; padding: 3px 6px;
}
.dash-cal-name { flex: 1; color: var(--text-primary); font-weight: 500; }
.dash-cal-cat  { font-size: .7rem; color: var(--text-muted); }

/* ── QUICK ACTION GRID ── */
.dash-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.dash-quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--bg-base); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 14px 8px; cursor: pointer;
  transition: border-color .15s, background .15s; text-decoration: none;
  color: var(--text-primary); font-size: .8rem; font-weight: 600; text-align: center;
}
.dash-quick-btn:hover { border-color: var(--accent); background: rgba(232,0,29,.05); }
.dash-quick-btn .dqb-icon { font-size: 1.5rem; }

/* ── ATHLETE LIST (genitore / parente) ── */
.dash-athlete-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border-subtle);
}
.dash-athlete-item:last-child { border-bottom: none; }
.dash-athlete-pos {
  font-family: var(--font-display); font-weight: 900; font-size: 1.1rem;
  color: var(--accent); min-width: 30px; text-align: center;
}
.dash-athlete-info { flex: 1; }
.dash-athlete-name { font-weight: 700; font-size: .9rem; color: var(--text-primary); }
.dash-athlete-sub  { font-size: .74rem; color: var(--text-muted); margin-top: 2px; }
.dash-athlete-pts  { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--text-secondary); }

/* ── WATCHLIST CARD (appassionato) ── */
.dash-wl-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--border-subtle); font-size: .84rem;
}
.dash-wl-row:last-child { border-bottom: none; }
.dash-wl-name  { flex: 1; font-weight: 600; color: var(--text-primary); }
.dash-wl-team  { font-size: .72rem; color: var(--text-muted); }
.dash-wl-pos   { font-family: var(--font-display); font-weight: 800; font-size: .95rem; color: var(--accent); min-width: 28px; text-align: right; }

/* ── STATUS PILL ── */
.dash-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 20px;
}
.dash-status--ok      { background: rgba(34,197,94,.12); color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.dash-status--warn    { background: rgba(245,196,0,.12); color: #d4a900; border: 1px solid rgba(245,196,0,.3); }
.dash-status--err     { background: rgba(239,68,68,.12); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }

/* ── LINK FORM (compact inline version) ── */
.dash-link-form { display: flex; flex-direction: column; gap: 10px; }
.dash-link-form input {
  background: var(--bg-base); border: 1px solid var(--border-subtle);
  color: var(--text-primary); border-radius: 6px; padding: 8px 12px;
  font-size: .85rem; font-family: inherit;
}
.dash-link-form input:focus { outline: none; border-color: var(--accent); }

/* ── PAGE GALLERY (admin) ── */
.pg-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; }
.pg-card {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 0; overflow: hidden; cursor: default;
}
.pg-card-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 10px;
}
.pg-card-icon { font-size: 1.2rem; }
.pg-card-title { font-family: var(--font-display); font-weight: 800; font-size: .95rem; color: var(--text-primary); }
.pg-card-route { font-size: .7rem; color: var(--text-muted); font-family: monospace; margin-left: auto; }
.pg-card-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.pg-section-label {
  font-size: .67rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px; margin-bottom: 2px;
}
.pg-comp-row {
  display: flex; align-items: center; gap: 8px; font-size: .8rem;
  padding: 3px 0; color: var(--text-secondary);
}
.pg-comp-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0;
}
.pg-comp-dot--blue  { background: #3b82f6; }
.pg-comp-dot--green { background: #22c55e; }
.pg-comp-dot--gold  { background: #f5c400; }
.pg-comp-dot--gray  { background: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   DASHBOARD SKILL CARDS  (servizi gestibili)
   ══════════════════════════════════════════════════════════ */
.dash-card--skill { border-left: 3px solid var(--accent); }
.dash-skill-desc { font-size: .78rem; color: var(--text-muted); line-height: 1.5; }
.dash-skill-empty { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.dash-skill-more { font-size: .74rem; color: var(--text-muted); margin-top: 6px; }

/* ── Raccoglitore foto/video grid ── */
.dash-collect-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.dash-collect-item {
  position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  background: var(--bg-base); border: 1px solid var(--border-subtle);
}
.dash-collect-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dash-collect-ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 1.2rem; color: var(--text-muted);
}
.dash-collect-badge {
  position: absolute; top: 3px; left: 3px;
  background: rgba(0,0,0,.6); color: #fff; font-size: .6rem;
  padding: 1px 5px; border-radius: 10px;
}
.dash-collect-rm {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  line-height: 1; transition: background .15s;
}
.dash-collect-rm:hover { background: #ef4444; }

/* ── Collect button (used in galleries to add to collection) ── */
.collect-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border-subtle); background: var(--bg-elevated);
  color: var(--text-secondary); font-size: 1rem; cursor: pointer;
  transition: all .15s; line-height: 1;
}
.collect-btn:hover { border-color: var(--accent); color: var(--accent); }
.collect-btn--active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Toggle rows (notifiche) ── */
.dash-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border-subtle); cursor: pointer;
}
.dash-toggle-row:last-child { border-bottom: none; }
.dash-toggle-label { font-size: .85rem; font-weight: 600; color: var(--text-primary); }
.dash-toggle-desc  { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.dash-toggle {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px; border-radius: 22px; background: var(--border-subtle);
  position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s;
}
.dash-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.dash-toggle:checked { background: var(--accent); }
.dash-toggle:checked::after { transform: translateX(18px); }

/* ── Goals list (obiettivi) ── */
.dash-goals-list { display: flex; flex-direction: column; gap: 4px; }
.dash-goal-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--border-subtle);
}
.dash-goal-row:last-child { border-bottom: none; }
.dash-goal-check {
  width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0;
  border: 2px solid var(--border-subtle); background: transparent;
  color: var(--accent); font-size: .8rem; font-weight: 900; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
  transition: all .15s;
}
.dash-goal-check:hover { border-color: var(--accent); }
.dash-goal-row.done .dash-goal-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.dash-goal-text { flex: 1; font-size: .85rem; color: var(--text-primary); }
.dash-goal-row.done .dash-goal-text { text-decoration: line-through; color: var(--text-muted); }

/* ── Calendar "follow race" star button ── */
.cal-follow-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; padding: 0; line-height: 1;
  border: 1px solid var(--border-subtle); background: var(--bg-elevated);
  color: var(--text-muted); font-size: .9rem; cursor: pointer;
  transition: all .15s; flex-shrink: 0;
}
.cal-follow-btn:hover { border-color: var(--accent); color: var(--accent); }
.cal-follow-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .dash-wrap { padding: 16px 12px 40px; }
  .dash-hero { padding: 18px; gap: 14px; }
  .dash-hero-name { font-size: 1.1rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-stats-row { gap: 8px; }
  .dash-actions-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-collect-grid { grid-template-columns: repeat(4, 1fr); }
  .pg-gallery { grid-template-columns: 1fr; }
}

/* ── ALBO D'ORO (classifiche storiche) ───────────────────────────── */
.albo-doro-card {
  margin: 28px 0 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}
.albo-doro-head {
  padding: 18px 20px 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.albo-doro-head h2 {
  margin: 2px 0 4px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}
.albo-doro-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.albo-doro-list { display: flex; flex-direction: column; }
.albo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: background 0.12s;
}
.albo-row:last-child { border-bottom: none; }
.albo-row:hover { background: var(--bg-elevated); }
.albo-year {
  flex-shrink: 0;
  width: 64px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent, #e8001d);
}
.albo-year em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.albo-champ { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.albo-trophy { font-size: 1rem; }
.albo-name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}
.albo-sub { font-size: 0.82rem; color: var(--text-secondary); }
@media (max-width: 640px) {
  .albo-row { gap: 12px; padding: 11px 14px; align-items: flex-start; }
  .albo-year { width: 50px; font-size: 0.95rem; }
}
