/* ============================================================
   GP Oggi — design system
   Font display: Oswald (titoli, numeri) — Inter (testo)
   Tema chiaro "da rivista": fondo carta, card bianche, rosso come accento
   ============================================================ */

:root {
  --bg: #f5f4f0;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #efede7;
  --border: #e2dfd6;
  --border-soft: #eceae3;

  --text: #16161b;
  --text-secondary: #55555f;
  --text-muted: #8b8a92;

  --accent: #e8352f;
  --accent-hover: #c8241f;
  --accent-soft: rgba(232, 53, 47, 0.08);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(22, 22, 27, 0.05), 0 6px 18px rgba(22, 22, 27, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(22, 22, 27, 0.06), 0 14px 34px rgba(22, 22, 27, 0.12);

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1200px;

  --mappa-bg: #f1efe9; /* i tracciati sono linee scure su fondo trasparente: servono su fondo chiaro anche nel tema scuro */
  --header-bg: rgba(255, 255, 255, 0.92);
  --row-hover: #faf9f6;
  color-scheme: light;
}

/* Tema scuro: segue il sistema, a meno che l'utente abbia scelto con il pulsante in alto a destra */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111115; --bg-elevated: #1a1a20; --bg-elevated-2: #25252c;
    --border: #2f2f38; --border-soft: #26262d;
    --text: #f2f1ee; --text-secondary: #b6b5bd; --text-muted: #8f8e97;
    --accent: #f0453f; --accent-hover: #ff5c56; --accent-soft: rgba(240, 69, 63, 0.14);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 14px 34px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(17, 17, 21, 0.92); --row-hover: #20202a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111115; --bg-elevated: #1a1a20; --bg-elevated-2: #25252c;
  --border: #2f2f38; --border-soft: #26262d;
  --text: #f2f1ee; --text-secondary: #b6b5bd; --text-muted: #8f8e97;
  --accent: #f0453f; --accent-hover: #ff5c56; --accent-soft: rgba(240, 69, 63, 0.14);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 14px 34px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(17, 17, 21, 0.92); --row-hover: #20202a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.accent { color: var(--accent); }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.brand .dot { color: var(--accent); }
.brand-logo { width: auto; height: 54px; transition: transform 0.2s ease; }
.brand:hover .brand-logo { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-logo { transform: none; } }

.nav-links {
  display: flex;
  gap: 26px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-links a { position: relative; color: var(--text-secondary); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Footer ---------- */

.site-footer { margin-top: 80px; padding: 40px 0 28px; background: #16161b; color: #b9b8c0; font-size: 13px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: var(--container);
  margin: 0 auto 24px;
  padding: 0 28px;
}
.footer-col h3 { font-size: 13px; color: #fff; margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 28px 0;
  border-top: 1px solid #2c2c34;
  text-align: center;
  color: #8b8a92;
}

/* ---------- Hero home (foto) ---------- */

.hero-foto {
  position: relative;
  margin: 28px 0 8px;
  min-height: 420px;
  border-radius: 22px;
  overflow: hidden;
  background: #16161b;
  color: #fff;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-card);
}
.hero-foto::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 58%;
  background: var(--foto) center 18% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
}
.hero-foto-testo { position: relative; z-index: 1; padding: 40px 44px; max-width: 640px; }
.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.hero-foto h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.05; margin-bottom: 12px; }
.hero-foto p { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 16px; }
.hero-foto p a { text-decoration: underline; }
.hero-countdown { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-countdown div {
  min-width: 70px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  text-align: center;
}
.hero-countdown b { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1.1; }
.hero-countdown span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.75); }
.hero-credito { z-index: 1; position: absolute; right: 14px; bottom: 10px; max-width: 60%; text-align: right; font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.hero-credito a { text-decoration: underline; }

/* ---------- Hero pagine interne ---------- */

.hero { padding: 40px 0 16px; text-align: center; }
.hero h1 { font-size: clamp(30px, 4.5vw, 48px); line-height: 1.1; margin-bottom: 8px; }

/* ---------- Statistiche ---------- */

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 24px 0 0; }
.stat-strip.six { grid-template-columns: repeat(3, 1fr); }
.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
}
.stat-number { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ---------- Layout home ---------- */

.home-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; margin: 24px 0; align-items: start; }
.home-aside { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 36px 0 16px;
}
.section-title::before { content: ""; flex: none; width: 5px; height: 22px; border-radius: 3px; background: var(--accent); }
.section-title .count { color: var(--text-muted); font-weight: 400; }

/* ---------- Widget laterali ---------- */

.evento-widget {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.evento-widget-titolo {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 8px;
}
.evento-widget-mini { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.evento-widget-mini:last-of-type { border-bottom: none; }
.evento-widget-mini img { width: 56px; height: 42px; object-fit: contain; flex: none; background: var(--mappa-bg); border-radius: 6px; padding: 3px; }
.evento-widget-mini-nome { font-weight: 600; font-size: 14px; line-height: 1.3; }
.evento-widget-mini-data { font-size: 12px; color: var(--text-secondary); }
.evento-widget-tutti {
  display: block;
  margin-top: 12px;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.evento-widget-tutti:hover { background: var(--accent-hover); }

.mini-classifica { list-style: none; margin: 0; padding: 0; }
.mini-classifica li a { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.mini-classifica li:last-child a { border-bottom: none; }
.mini-classifica .pos { width: 18px; font-family: var(--font-display); font-weight: 700; color: var(--text-muted); }
.mini-classifica .pt { margin-left: auto; font-family: var(--font-display); font-weight: 600; }
.mini-classifica img, .mini-classifica .vuota { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--bg-elevated-2); flex: none; }

/* ---------- Filtri ---------- */

.filter-bar { margin: 0 0 20px; }
.search-input { position: relative; margin-bottom: 12px; }
.search-input input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
}
.search-input input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
#search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: flex; }

.category-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block;
  padding: 7px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.pill:hover { border-color: var(--text); }
.pill.active { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Card pilota ---------- */

.driver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }

.driver-card {
  position: relative;
  display: block;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.driver-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.driver-card-image {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--team, #888) 0%, #16161b 140%);
  overflow: hidden;
}
.driver-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transition: transform 0.3s; }
.driver-card:hover .driver-card-image img { transform: scale(1.04); }
.driver-number { font-family: var(--font-display); font-weight: 700; line-height: 1; }
.driver-card-image .driver-number {
  position: absolute;
  right: 10px;
  bottom: 6px;
  font-size: 46px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.driver-card-image .driver-number.solo { inset: 0; display: flex; align-items: center; justify-content: center; font-size: 72px; }
.pos-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.driver-card-info { padding: 12px 14px 14px; border-top: 4px solid var(--team, var(--border)); }
.driver-card .name { font-family: var(--font-display); font-size: 16px; font-weight: 600; text-transform: uppercase; line-height: 1.2; }
.driver-card .team { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.driver-card .numero { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.driver-card .numero b { color: var(--text); font-family: var(--font-display); font-size: 15px; }

/* ---------- Card gara ---------- */

.gare-section { margin-bottom: 36px; }
.gare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.event-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.event-map { height: 150px; display: flex; align-items: center; justify-content: center; background: var(--mappa-bg); padding: 14px; }
.event-map img { max-height: 100%; object-fit: contain; }
.event-map .senza-mappa { font-family: var(--font-display); font-size: 15px; color: var(--text-muted); text-transform: uppercase; }
.event-body { padding: 14px 16px 16px; }
.event-date { font-family: var(--font-display); font-size: 13px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.event-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; text-transform: uppercase; line-height: 1.2; margin: 4px 0; }
.event-location { font-size: 13px; color: var(--text-secondary); }
.event-status {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  color: var(--accent);
}
.event-status.passato { background: var(--bg-elevated-2); color: var(--text-secondary); }
.event-card.passata .event-map img { opacity: 0.55; }

/* ---------- Dettaglio gara ---------- */

.gara-testata {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  margin: 28px 0 24px;
  padding: 28px 32px;
  background: var(--bg-elevated);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}
.gara-testata h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.05; margin: 8px 0; }
.gara-testata .mappa { max-height: 230px; margin: 0 auto; background: var(--mappa-bg); border-radius: 10px; padding: 10px; }
.credito { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.credito a { text-decoration: underline; }

/* ---------- Dettaglio pilota ---------- */

.pilota-testata {
  display: grid;
  grid-template-columns: 340px 1fr;
  margin: 28px 0 8px;
  background: var(--bg-elevated);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.pilota-foto { position: relative; background: linear-gradient(160deg, var(--team, #888), #16161b 140%); min-height: 400px; }
.pilota-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.pilota-foto .driver-number { position: absolute; right: 16px; bottom: 10px; font-size: 80px; color: #fff; text-shadow: 0 3px 14px rgba(0, 0, 0, 0.5); }
.pilota-dati { padding: 32px; border-top: 6px solid var(--team, var(--accent)); }
.pilota-dati h1 { font-size: clamp(32px, 4.5vw, 54px); line-height: 1.05; margin: 6px 0; }

/* ---------- Tabelle ---------- */

.table-wrap { overflow-x: auto; background: var(--bg-elevated); border-radius: var(--radius); box-shadow: var(--shadow-card); }
table.results { width: 100%; border-collapse: collapse; font-size: 14px; }
table.results th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.results td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
table.results tr:last-child td { border-bottom: none; }
table.results tbody tr:hover { background: var(--row-hover); }
table.results a:hover { color: var(--accent); }
.cella-pilota { display: flex; align-items: center; gap: 10px; }
.foto-mini { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--bg-elevated-2); flex: none; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
tr.podio td:first-child { font-family: var(--font-display); font-weight: 700; color: var(--accent); }

.two-col { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; }

/* ---------- Confronto ---------- */

.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
select.sel {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}
.compare-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare-col { background: var(--bg-elevated); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.compare-foto { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(160deg, var(--team, #888), #16161b 140%); overflow: hidden; }
.compare-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.compare-corpo { padding: 18px 20px; border-top: 5px solid var(--team, var(--border)); }
.compare-col h2 { font-size: 22px; margin-bottom: 8px; }
.compare-col h2 a:hover { color: var(--accent); }
.compare-vuoto { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.compare-stat { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.compare-stat:last-child { border-bottom: none; }
.compare-stat-label { font-size: 13px; color: var(--text-secondary); }
.compare-stat-value { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.compare-stat-value.meglio { color: var(--accent); }

/* ---------- Pagine di testo ---------- */

.prosa { max-width: 760px; margin: 36px auto; padding: 32px 36px; background: var(--bg-elevated); border-radius: 22px; box-shadow: var(--shadow-card); line-height: 1.75; }
.prosa h1 { font-size: 34px; margin-bottom: 18px; }
.prosa h2 { font-size: 19px; margin: 26px 0 10px; }
.prosa a { color: var(--accent); text-decoration: underline; }
.crediti-lista { font-size: 13px; line-height: 1.6; padding-left: 18px; }
.crediti-lista li { margin-bottom: 6px; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-aside { position: static; }
  .brand-logo { height: 46px; }
  .pilota-testata { grid-template-columns: 1fr; }
  .pilota-foto { min-height: 360px; }
  .gara-testata { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding: 0 16px; }
  .stat-strip, .stat-strip.six { grid-template-columns: repeat(2, 1fr); }
  .driver-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .driver-card-image .driver-number { font-size: 34px; }
  .hero-foto { min-height: 470px; border-radius: 16px; margin-top: 16px; }
  .hero-foto::after { left: 0; width: auto; background-position: 70% 20%; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 92%); mask-image: linear-gradient(180deg, #000 30%, transparent 92%); }
  .hero-foto-testo { padding: 24px 20px 38px; }
  .hero-countdown div { min-width: 58px; padding: 8px; }
  .hero-countdown b { font-size: 22px; }
  .compare-layout, .picker, .two-col { grid-template-columns: 1fr; }
  .gara-testata, .pilota-dati, .prosa { padding: 22px 20px; }
}

@media (max-width: 600px) {
  .nav { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 6px; }
  .brand { font-size: 19px; }
  .brand-logo { height: 40px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 8px; font-size: 12px; }
}
.two-col > div { min-width: 0; }

/* ---------- Tema: pulsante e logo ---------- */

.nav-destra { display: flex; align-items: center; gap: 22px; }
.tema-btn {
  width: 38px; height: 38px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--bg-elevated); color: var(--text);
  cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.tema-btn:hover { border-color: var(--text); }
.tema-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tema-btn .sole { display: none; }
:root[data-theme="dark"] .tema-btn .luna { display: none; }
:root[data-theme="dark"] .tema-btn .sole { display: block; }
.brand-logo.scuro { display: none; }
:root[data-theme="dark"] .brand-logo.chiaro { display: none; }
:root[data-theme="dark"] .brand-logo.scuro { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tema-btn .luna { display: none; }
  :root:not([data-theme="light"]) .tema-btn .sole { display: block; }
  :root:not([data-theme="light"]) .brand-logo.chiaro { display: none; }
  :root:not([data-theme="light"]) .brand-logo.scuro { display: block; }
}

/* ---------- Stemma scuderia (monogramma nel colore del team, non è un logo ufficiale) ---------- */

.stemma {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 22px; padding: 0 6px; margin-right: 8px; vertical-align: middle;
  border-radius: 5px 5px 11px 11px;
  background: var(--team, #8b8a92);
  color: var(--stemma-testo, #fff);
  font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.cella-team { display: flex; align-items: center; }
.cella-team .stemma { flex: none; }

/* ---------- Home ---------- */

.home-sezioni { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.ultima-gara {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden;
}
.ultima-gara-testa { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.ultima-gara-testa h3 { font-size: 22px; }
.ultima-gara-testa .muted { font-size: 13px; }
.podio-home { display: grid; grid-template-columns: repeat(3, 1fr); }
.podio-home a { display: block; position: relative; padding: 16px; text-align: center; border-right: 1px solid var(--border-soft); border-top: 4px solid var(--team, var(--border)); }
.podio-home a:last-child { border-right: none; }
.podio-home a:hover { background: var(--row-hover); }
.podio-home .posto { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1; }
.podio-home img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; margin: 10px auto 8px; background: var(--bg-elevated-2); }
.podio-home .vuota { display: block; width: 72px; height: 72px; border-radius: 50%; margin: 10px auto 8px; background: var(--bg-elevated-2); }
.podio-home strong { display: block; font-size: 14px; line-height: 1.3; }
.podio-home .tempo { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.vai-piloti { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; font-weight: 600; }
.vai-piloti span { color: var(--text-secondary); font-weight: 400; font-size: 13px; }
.vai-piloti b { color: var(--accent); white-space: nowrap; }
@media (max-width: 600px) {
  .podio-home a { padding: 12px 6px; }
  .podio-home img, .podio-home .vuota { width: 56px; height: 56px; }
  .ultima-gara-testa { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav-destra { width: 100%; justify-content: space-between; gap: 8px; }
  .nav-destra .nav-links { width: auto; flex: 1; }
}

/* ---------- Notizie ---------- */

.report-lista { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.report-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px; min-width: 0; }
.report-card.in-evidenza { margin-bottom: 16px; border-left: 5px solid var(--accent); }
.report-card h3 { font-size: 20px; line-height: 1.2; margin: 6px 0 12px; }
.report-card h3 a:hover { color: var(--accent); }
.report-card p { margin: 0 0 10px; font-size: 14px; color: var(--text-secondary); }
.report-data { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.report-card > a.accent { font-weight: 600; font-size: 13px; }
@media (max-width: 768px) { .report-lista { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .nav-links { overflow-x: auto; scrollbar-width: none; } .nav-links a { flex: none; } }
@media (max-width: 600px) {
  .nav-destra { display: contents; }
  .nav .tema-btn { order: 2; }
  .nav .nav-links { order: 3; width: 100%; flex: none; overflow-x: visible; justify-content: space-between; font-size: 12px; gap: 4px; }
}

.rassegna { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.rassegna-voce { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; min-width: 0; }
.rassegna-voce h3 { font-size: 18px; line-height: 1.25; margin: 4px 0 8px; text-transform: none; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.rassegna-voce h3 a:hover { color: var(--accent); }
.rassegna-voce p { margin: 0 0 8px; font-size: 14px; color: var(--text-secondary); }
.rassegna-voce > a.accent { font-weight: 600; font-size: 13px; }

/* ---------- Barra conto alla rovescia F1 + MotoGP ---------- */
.cd-barra { background: var(--bg-elevated-2); border-bottom: 1px solid var(--border); font-size: 13px; }
.cd-griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; padding-top: 8px; padding-bottom: 8px; }
.cd-voce { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cd-sigla { flex: none; font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 4px; }
.cd-sigla.moto { background: var(--text); color: var(--bg); }
.cd-testo { min-width: 0; line-height: 1.35; color: var(--text-secondary); }
.cd-testo b { color: var(--text); }
.cd-tempo { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd-tempo.live { color: var(--accent); }
@media (max-width: 768px) { .cd-griglia { grid-template-columns: 1fr; } .cd-barra { font-size: 12px; } }

/* ---------- Giochi ---------- */
.gioco-scelta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gioco-card { text-align: left; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 24px; cursor: pointer; color: var(--text); font: inherit; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, box-shadow .15s; }
.gioco-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.gioco-card:focus-visible, .quiz-opz:focus-visible, .quiz-avanti:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gioco-card b { font-family: var(--font-display); font-size: 24px; text-transform: uppercase; }
.gioco-card span { color: var(--text-secondary); font-size: 14px; }
.gioco-card .rec { color: var(--accent); font-weight: 600; }
.partita { max-width: 640px; margin: 0 auto; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 24px; }
.quiz-testa { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.quiz-titolo { font-size: 22px; margin: 12px 0 16px; }
.quiz-img { display: flex; align-items: center; justify-content: center; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.mappa-quiz { background: var(--mappa-bg); height: 260px; padding: 14px; } .mappa-quiz img { max-height: 100%; object-fit: contain; }
.foto-quiz { background: var(--bg-elevated-2); } .foto-quiz img { max-height: 340px; object-fit: contain; }
.quiz-opzioni { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opz { font: inherit; font-weight: 600; font-size: 15px; padding: 14px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; text-align: center; }
.quiz-opz:hover:not(:disabled) { border-color: var(--text); }
.quiz-opz.giusta { background: rgba(31, 143, 95, .18); border-color: #1f8f5f; }
.quiz-opz.sbagliata { background: var(--accent-soft); border-color: var(--accent); }
.quiz-esito { min-height: 48px; margin-top: 14px; font-size: 15px; }
.quiz-avanti { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 10px; border: none; background: var(--accent); color: #fff; cursor: pointer; margin-left: 10px; }
.quiz-avanti.secondario { background: transparent; color: var(--text); border: 1px solid var(--border); }
.quiz-fine { text-align: center; padding: 16px 0; } .quiz-punteggio { font-family: var(--font-display); font-weight: 700; font-size: 96px; color: var(--accent); line-height: 1; } .quiz-punteggio span { font-size: 36px; color: var(--text-muted); }
.quiz-azioni { display: flex; gap: 10px; justify-content: center; margin-top: 16px; } .quiz-azioni .quiz-avanti { margin: 0; }
@media (max-width: 600px) { .gioco-scelta, .quiz-opzioni { grid-template-columns: 1fr; } .partita { padding: 18px; } }

/* ---------- Archivio ---------- */
.filtri-archivio { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -4px 0 20px; }
.filtri-archivio .sel { width: auto; min-width: 220px; }
.link-storici { margin-left: auto; font-weight: 600; color: var(--accent); }
.campione { background: var(--bg-elevated); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px 24px; margin-bottom: 24px; }
.campione h1 { font-size: 36px; margin: 8px 0; }
.team-lungo { white-space: normal; min-width: 160px; font-size: 13px; color: var(--text-secondary); }
.link-archivio { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 20px; background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; font-weight: 600; }
.link-archivio span { font-weight: 400; color: var(--text-secondary); font-size: 13px; display: block; }
.link-archivio b { color: var(--accent); white-space: nowrap; }

/* ---------- Calendario .ics ---------- */
.cal-lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cal-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cal-card h3 { font-size: 22px; } .cal-card p { margin: 0 0 8px; font-size: 14px; }
.cal-azioni { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.cal-azioni .quiz-avanti { margin: 0; text-decoration: none; display: inline-block; }
.cal-card .cd-sigla { margin-bottom: 4px; }
@media (max-width: 768px) { .cal-lista { grid-template-columns: 1fr; } }

.link-nome:hover { color: var(--accent); text-decoration: underline; }

/* ---------- MotoGP ---------- */
.moto-prossimo { background: var(--bg-elevated); border: 1px solid var(--border); border-left: 5px solid var(--text); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px 24px; }
.moto-prossimo h2 { font-size: 34px; margin: 8px 0 4px; }
.moto-sessioni { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.moto-sess { background: var(--bg-elevated-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.moto-sess b { font-size: 14px; } .moto-sess span { color: var(--text-secondary); }
.moto-home { margin: 16px 0 0; background: var(--bg-elevated); border: 1px solid var(--border); border-left: 5px solid var(--text); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 20px; }
.moto-home[hidden] { display: none; }
.moto-home-testa { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; font-size: 13px; }
.moto-home-corpo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.moto-home-gp { font-family: var(--font-display); font-weight: 600; font-size: 26px; text-transform: uppercase; line-height: 1.1; }
.moto-home-gara { margin-top: 8px; font-size: 14px; color: var(--text-secondary); } .moto-home-gara b { color: var(--text); }
@media (max-width: 768px) { .moto-home-corpo { grid-template-columns: 1fr; gap: 10px; } .moto-prossimo { padding: 16px; } .moto-prossimo h2 { font-size: 28px; } }
@media (max-width: 600px) {
  .nav .nav-links { overflow-x: auto; justify-content: flex-start; gap: 16px; scrollbar-width: none; padding-bottom: 2px; }
  .nav .nav-links a { flex: none; }
}

.quiz-pilota { text-align: center; } .quiz-pilota b { display: block; font-family: var(--font-display); font-size: 34px; text-transform: uppercase; line-height: 1.1; } .quiz-pilota span { color: var(--text-secondary); font-size: 15px; }
.gioco-scelta { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Agenda (calendario a mesi) ---------- */
.agenda-barra { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.agenda-nav { display: flex; align-items: center; gap: 8px; }
.agenda-nav h2 { font-size: 26px; min-width: 190px; text-align: center; }
.agenda-btn { font: inherit; font-size: 22px; line-height: 1; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); cursor: pointer; }
.agenda-btn.testo { width: auto; padding: 0 16px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.agenda-btn:hover { border-color: var(--text); } .agenda-btn:focus-visible, .ag-giorno:focus-visible, .chip-serie:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.agenda-filtri { display: flex; gap: 8px; }
.chip-serie { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-muted); cursor: pointer; }
.chip-serie.attivo.f1 { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-serie.attivo.moto { background: var(--text); border-color: var(--text); color: var(--bg); }
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ag-griglia { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ag-sett { text-align: center; font-family: var(--font-display); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: 4px 0; }
.ag-giorno { font: inherit; text-align: left; color: var(--text); background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: 10px; min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; overflow: hidden; }
.ag-giorno.vuoto { background: transparent; border: none; cursor: default; }
.ag-giorno.con-eventi { border-color: var(--border); box-shadow: var(--shadow-card); }
.ag-giorno.oggi .ag-num { background: var(--accent); color: #fff; }
.ag-giorno.scelto { outline: 2px solid var(--text); outline-offset: -1px; }
.ag-giorno:hover:not(.vuoto) { border-color: var(--text); }
.ag-num { font-weight: 600; font-size: 13px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.ag-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ag-chip { font-size: 11px; line-height: 1.25; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ag-chip.f1 { background: var(--accent-soft); color: var(--accent); }
.ag-chip.moto { background: var(--bg-elevated-2); color: var(--text); }
.ag-punti { display: none; gap: 4px; }
.ag-punto { width: 7px; height: 7px; border-radius: 50%; display: inline-block; } .ag-punto.f1 { background: var(--accent); } .ag-punto.moto { background: var(--text); }
.agenda-dettaglio { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; }
.agenda-dettaglio h3 { font-size: 20px; text-transform: uppercase; }
.ag-wk { background: var(--bg-elevated); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px; }
.ag-wk.moto { border-left-color: var(--text); }
.ag-wk-testa { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; } .ag-wk-testa h3 { font-size: 18px; }
.ag-wk-giorno { padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 14px; } .ag-wk-giorno > b { text-transform: capitalize; font-size: 13px; color: var(--text-secondary); }
.ag-wk-giorno.evid > b { color: var(--accent); }
.ag-sessione { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; } .ag-sessione span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.ag-wk-azioni { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-weight: 600; font-size: 13px; } .ag-wk-azioni .quiz-avanti { margin: 0; }
.cal-scarica { margin-top: 36px; }
@media (max-width: 900px) {
  .agenda-layout { grid-template-columns: 1fr; } .agenda-dettaglio { position: static; }
  .ag-giorno { min-height: 54px; align-items: center; padding: 4px 2px; } .ag-chips { display: none; } .ag-punti { display: flex; }
  .agenda-nav h2 { font-size: 20px; min-width: 150px; }
}

.ag-giorno.wk-f1 { background: linear-gradient(180deg, var(--accent-soft), var(--bg-elevated) 70%); }
.ag-giorno.wk-moto { background: linear-gradient(180deg, var(--bg-elevated-2), var(--bg-elevated) 70%); }
.ag-giorno.wk-f1.wk-moto { background: linear-gradient(135deg, var(--accent-soft), var(--bg-elevated-2)); }
.ag-chip b { font-variant-numeric: tabular-nums; }

.quiz-opz.grande { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px; } .quiz-opz.grande b { font-size: 17px; } .quiz-opz.grande span { font-size: 12px; color: var(--text-secondary); font-weight: 400; } .quiz-opz.grande em { font-style: normal; font-weight: 700; color: var(--accent); margin-top: 4px; }
.pron-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; } .pron-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 600px) { .pron-form { grid-template-columns: 1fr; } }
.partita { max-width: 720px; }

/* pagina piloti: serie e modalità */
.serie-pills .pill, .modo-pills .pill { font-weight: 600; }
.modo-pills { margin-top: 2px; }
.driver-card.senza-link { cursor: default; }
.driver-card-image .driver-number.solo { color: var(--text-muted); }

/* classifiche: scelta del campionato a pulsanti */
.serie-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 14px; }
.serie-gruppo { display: flex; align-items: center; gap: 8px; }
.serie-gruppo > .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.serie-barra .link-storici { margin-left: auto; }

/* home: prossimo GP e ultime gare affiancati */
.pross-griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pross-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card, var(--bg)); text-decoration: none; color: inherit; min-width: 0; }
.pross-card:hover { border-color: var(--text); }
.pross-gp { font-family: var(--font-display); font-size: 20px; text-transform: uppercase; line-height: 1.15; }
.pross-circ, .pross-sess { font-size: 12px; }
.pross-timer { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-top: 4px; color: var(--accent, #e8352f); }
.pross-timer.live { color: #1a9d4b; }
.ultime-gare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ultime-gare .ultima-gara { min-width: 0; }
@media (max-width: 640px) { .pross-griglia { gap: 8px; } .pross-card { padding: 10px 12px; } .pross-gp { font-size: 16px; } .pross-timer { font-size: 14px; } .ultime-gare { grid-template-columns: 1fr; } }
.driver-card.nofoto .driver-card-image { aspect-ratio: 16 / 7; }
.driver-card.nofoto .driver-card-image .driver-number.solo { font-size: 44px; }
.modo-pills, .serie-pills { margin-bottom: 8px; }

/* pagina pilota di moto: foto in testata */
.pm-testa { display: flex; align-items: center; gap: 18px; }
.pm-foto { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: none; border: 3px solid var(--border); }
@media (max-width: 640px) { .pm-foto { width: 84px; height: 84px; } }

/* ---------- Traduttore Google dentro la pagina: niente barra, niente evidenziazioni ---------- */
body > .skiptranslate, iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }
html.tradotto body { top: 0 !important; position: static !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font { background: none !important; box-shadow: none !important; }
.lingua { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); flex-shrink: 0; }
.lingua select { background: var(--card, var(--bg)); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: 500 12.5px Inter, sans-serif; cursor: pointer; max-width: 118px; }
/* Giochi in evidenza nel menu, in carattere pixel */
.nav-links a.nav-giochi { font-family: "Press Start 2P", monospace; font-size: 10px; letter-spacing: 0; text-transform: uppercase; background: #e8352f; color: #fff; padding: 9px 12px; border-radius: 6px; box-shadow: 0 3px 0 #9d1f1a; line-height: 1; align-self: center; }
.nav-links a.nav-giochi:hover { transform: translateY(1px); box-shadow: 0 2px 0 #9d1f1a; color: #fff; }
.nav-links a.nav-giochi.active { background: #16161b; box-shadow: 0 3px 0 #000; }
.nav-links a.nav-giochi::after { display: none; }
@media (max-width: 640px) { .nav-links a.nav-giochi { order: -1; margin-right: 4px; } }

/* pronostico in home */
.prono-griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prono-col { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.prono-testa { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; }
.prono-testa .muted { font-size: 12px; width: 100%; }
.prono-riga { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.prono-pos { font-family: var(--font-display); font-weight: 700; font-size: 20px; width: 18px; color: var(--accent, #e8352f); }
.prono-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prono-info .muted { font-size: 11.5px; line-height: 1.3; }
.prono-barra { height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 3px; }
.prono-barra i { display: block; height: 100%; background: var(--accent, #e8352f); }
.prono-ind { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.prono-riga.primo .prono-info strong { font-size: 16px; }
.prono-nota { font-size: 12px; margin: 8px 0 0; }
@media (max-width: 640px) { .prono-griglia { grid-template-columns: 1fr; } }

/* mappe dei circuiti MotoGP */
.mappa-circuito { background: #f5f4f0; border-radius: 10px; padding: 10px; margin: 0 0 14px; text-align: center; }
.mappa-circuito img { max-height: 260px; max-width: 100%; }
.mappa-circuito .credito { margin: 6px 0 0; font-size: 11px; color: #666; }
.mappa-mini { height: 64px; width: auto; background: #f5f4f0; border-radius: 6px; padding: 4px; margin: 2px 0 6px; }
.pross-card .cd-sigla { align-self: flex-start; }

/* home: prossimo GP in grande, con le foto dei leader del campionato */
.hero2 { display: grid; grid-template-columns: 1fr 1fr; margin-top: 22px; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .22); }
.hero2-lato { position: relative; min-height: 440px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 26px 28px 22px; color: #fff; text-decoration: none; background: linear-gradient(180deg, rgba(12, 12, 16, .0) 0%, rgba(12, 12, 16, .25) 30%, rgba(12, 12, 16, .88) 68%, rgba(12, 12, 16, .96) 100%), var(--foto, none) center 12% / cover, #17171c; }
.hero2-lato.moto { background: linear-gradient(180deg, rgba(12, 12, 16, .0) 0%, rgba(12, 12, 16, .25) 30%, rgba(12, 12, 16, .88) 68%, rgba(12, 12, 16, .96) 100%), var(--foto, none) center 12% / cover, #101014; border-left: 3px solid #e8352f; }
.hero2-lato .cd-sigla { position: absolute; top: 18px; left: 22px; }
.hero2-kicker { font-family: var(--font-display); letter-spacing: .12em; text-transform: uppercase; font-size: 13px; color: rgba(255, 255, 255, .78); }
.hero2-lato .pross-gp { font-size: clamp(30px, 4vw, 52px); line-height: 1; letter-spacing: .01em; text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.hero2-lato .pross-circ, .hero2-lato .pross-sess { color: rgba(255, 255, 255, .85); font-size: 14px; }
.hero2-lato .pross-timer { font-size: clamp(26px, 3.4vw, 40px); margin-top: 6px; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
.hero2-lato .pross-timer.live { color: #4ade80; }
.hero2-fav { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.hero2-fav b { color: #fff; }
.hero2-credito { margin-top: 8px; font-size: 10.5px; color: rgba(255, 255, 255, .55); }
.hero2-credito a { color: inherit; text-decoration: underline; }
.hero2-lato:hover .pross-gp { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 700px) { .hero2 { grid-template-columns: 1fr; } .hero2-lato { min-height: 300px; padding: 20px; } .hero2-lato.moto { border-left: 0; border-top: 3px solid #e8352f; } }

/* voto del pronostico */
.vota { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.vota-apri { width: 100%; padding: 11px 14px; border: 0; border-radius: 10px; background: #e8352f; color: #fff; font: 700 14px var(--font-display, Oswald, sans-serif); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.vota-apri:hover { background: #cf2a24; }
.vota-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 330px; overflow-y: auto; }
.vota-pilota { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--card, var(--bg)); color: inherit; text-align: left; cursor: pointer; font: inherit; }
.vota-pilota b { display: block; font-size: 12.5px; line-height: 1.15; }
.vota-pilota small { display: block; font-size: 10.5px; color: var(--text-muted); line-height: 1.2; }
.vota-pilota:hover { border-color: var(--text); }
.vota-pilota.scelto { border-color: #e8352f; box-shadow: inset 0 0 0 1px #e8352f; }
.vota-riga { display: grid; grid-template-columns: 1fr 70px 38px; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 6px; }
.vota-riga b { text-align: right; }

/* testata scura solo nel tema scuro: nel tema chiaro resta chiara, coerente col resto della pagina */
:root[data-theme="dark"] .cd-barra { background: #0c0c10; border-bottom: 1px solid #23232b; color: #e6e5ea; }
:root[data-theme="dark"] .cd-barra .cd-testo { color: #b9b8c0; }
:root[data-theme="dark"] .cd-barra .cd-testo b { color: #fff; }
:root[data-theme="dark"] .cd-barra .cd-sigla.moto { background: #fff; color: #111115; }
:root[data-theme="dark"] .site-header { background: #141418; border-bottom: 3px solid var(--accent); backdrop-filter: none; }
:root[data-theme="dark"] .site-header .brand, :root[data-theme="dark"] .site-header .nav-links a { color: #f2f1ee; }
:root[data-theme="dark"] .site-header .nav-links a:not(.nav-giochi):hover, :root[data-theme="dark"] .site-header .nav-links a.active { color: #fff; }
:root[data-theme="dark"] .site-header .nav-links a { opacity: .82; }
:root[data-theme="dark"] .site-header .nav-links a.active, :root[data-theme="dark"] .site-header .nav-links a:hover { opacity: 1; }
:root[data-theme="dark"] .site-header .brand-logo.chiaro { display: none !important; }
:root[data-theme="dark"] .site-header .brand-logo.scuro { display: block !important; }
:root[data-theme="dark"] .site-header .tema-btn { background: #1f1f26; border-color: #34343d; color: #f2f1ee; }
:root[data-theme="dark"] .site-header .lingua { color: #b9b8c0; }
:root[data-theme="dark"] .site-header .lingua select { background: #1f1f26; color: #f2f1ee; border-color: #34343d; }
:root[data-theme="dark"] .site-header .nav-links a.nav-giochi.active { background: #fff; color: #111115; box-shadow: 0 3px 0 #9c9ca6; }

/* calendario: prossimi eventi, commento e link ai risultati */
.pe-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pe-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--card, var(--bg)); border-top: 4px solid #e8352f; }
.pe-card.moto { border-top-color: #111115; }
.pe-card h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 22px; line-height: 1.1; margin: 0; }
.pe-card p { margin: 0; font-size: 13px; }
.pe-testa { display: flex; justify-content: space-between; align-items: center; }
.pe-giorni { font-family: var(--font-display); font-weight: 600; color: var(--accent, #e8352f); font-size: 14px; }
.pe-mappa { background: #f5f4f0; border-radius: 10px; padding: 8px; text-align: center; }
.pe-mappa img { height: 110px; width: auto; max-width: 100%; object-fit: contain; }
.pe-data { margin-top: auto !important; padding-top: 4px; }
.pe-card .quiz-avanti { text-align: center; text-decoration: none; margin-top: 6px; }
.ag-commento { margin-top: 12px; padding: 10px 12px; border-left: 3px solid #e8352f; background: rgba(232, 53, 47, .06); border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.45; }
.ag-commento b { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; margin-bottom: 4px; }
.ag-commento p { margin: 0; }
a.ag-risultati { display: inline-block; text-decoration: none; text-align: center; }

/* pagine dedicate: una sola serie */
.hero2.uno { grid-template-columns: 1fr; }
.hero2.uno .hero2-lato { min-height: 400px; }
.prono-griglia.uno { grid-template-columns: 1fr; max-width: 640px; }

/* telefono: F1 e MotoGP ben separate, ognuna col suo colore */
.prono-col[data-serie="f1"], .ultima-gara.serie-f1 { border-top: 5px solid #e8352f; }
.prono-col[data-serie="motogp"], .ultima-gara.serie-moto { border-top: 5px solid #111115; }
:root[data-theme="dark"] .prono-col[data-serie="motogp"], :root[data-theme="dark"] .ultima-gara.serie-moto { border-top-color: #f2f1ee; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prono-col[data-serie="motogp"], :root:not([data-theme="light"]) .ultima-gara.serie-moto { border-top-color: #f2f1ee; } }
@media (max-width: 700px) {
  .hero2 { gap: 14px; box-shadow: none; border-radius: 0; overflow: visible; }
  .hero2-lato { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 26px rgba(0, 0, 0, .28); border-left: 0 !important; border-top: 0 !important; min-height: 280px; }
  .hero2-lato.f1 { border-bottom: 5px solid #e8352f; }
  .hero2-lato.moto { border-bottom: 5px solid #fff; }
  .hero2.uno { gap: 0; }
  .prono-griglia { gap: 22px; }
  .ultime-gare { gap: 22px; }
  .prono-col, .ultima-gara { border-radius: 14px; }
  .ultima-gara { border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .home-sezioni section + section { margin-top: 8px; }
}
@media (max-width: 700px) {
  .hero2-lato { justify-content: flex-start; padding-top: 18px; }
  .hero2-lato .cd-sigla { position: static; align-self: flex-start; font-size: 13px; padding: 4px 10px; margin-bottom: 120px; }
  .hero2-lato .hero2-fav { margin-top: 4px; }
}

/* dopo il podio: rimando alla pagina della gara */
.guarda-gara { display: block; margin: 12px 0 0; padding: 12px 16px; border-radius: 10px; background: #e8352f; color: #fff; text-align: center; text-decoration: none; font: 700 14px var(--font-display, Oswald, sans-serif); letter-spacing: .06em; text-transform: uppercase; }
.guarda-gara:hover { background: #cf2a24; }
.ultima-gara .guarda-gara { margin: 0; border-radius: 0 0 14px 14px; }

/* cronaca giro per giro */
.cronaca { list-style: none; margin: 10px 0 0; padding: 0; border-left: 3px solid var(--border); }
.cronaca li { display: flex; gap: 14px; padding: 9px 0 9px 16px; position: relative; border-bottom: 1px solid var(--border-soft, var(--border)); font-size: 14.5px; line-height: 1.4; }
.cronaca li::before { content: ""; position: absolute; left: -8px; top: 15px; width: 13px; height: 13px; border-radius: 50%; background: var(--border); border: 3px solid var(--bg); }
.cron-giro { flex: none; width: 74px; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 14px; color: var(--accent, #e8352f); }
.cron-giro small { color: var(--text-muted); font-weight: 500; }
.cronaca li.cron-ritiro::before { background: #e8352f; }
.cronaca li.cron-safety::before { background: #f5b800; }
.cronaca li.cron-incidente::before, .cronaca li.cron-penalita::before { background: #f07c1a; }
.cronaca li.cron-comando::before, .cronaca li.cron-giro::before { background: #2f9e44; }
.cronaca li.cron-arrivo::before, .cronaca li.cron-via::before { background: var(--text); }
.cronaca li.cron-ritiro .cron-testo { font-weight: 600; }
.cron-filtri { margin: 8px 0 4px; }

.foto-mini.ini { display: inline-flex; align-items: center; justify-content: center; background: var(--border); color: var(--text-secondary); font: 700 11px var(--font-display, Oswald, sans-serif); letter-spacing: .02em; }

/* gare: la prossima ben distinta da quelle già disputate */
.gare-sottotitolo { display: flex; align-items: center; gap: 12px; margin: 26px 0 12px; font-family: var(--font-display); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); }
.gare-sottotitolo::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.gare-sottotitolo.prossima { margin-top: 6px; color: #fff; }
.gare-sottotitolo.prossima::before { content: "Prossima gara"; display: none; }
.gare-sottotitolo.prossima { color: var(--accent, #e8352f); }
.event-card.prossima { border: 2px solid #e8352f; box-shadow: 0 8px 28px rgba(232, 53, 47, .22); }
.event-card.passata { opacity: .94; }
.event-card.passata .event-name { font-size: 0.95em; }

td .su { color: #2f9e44; font-weight: 700; font-size: 12px; }
td .giu { color: #e8352f; font-weight: 700; font-size: 12px; }

/* sezioni ben separate: ogni blocco è un pannello a sé, con titolo e spazio intorno */
.blocco { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 18px; padding: 22px 20px; margin: 0 0 32px; box-shadow: var(--shadow-card); }
.blocco > .section-title:first-child, .blocco > h3.section-title:first-child { margin-top: 0; }
.blocco .section-title { font-size: 24px; margin-bottom: 14px; }
.blocco .prono-col { background: transparent; box-shadow: none; }
.blocco .ultima-gara { box-shadow: none; }
.hero2 { margin-bottom: 34px; }
.home-sezioni { display: flex; flex-direction: column; }
.home-aside .evento-widget { margin-bottom: 26px; }
@media (max-width: 700px) {
  .blocco { padding: 18px 14px; border-radius: 16px; margin-bottom: 28px; }
  .blocco .section-title { font-size: 22px; }
  .hero2 { margin-bottom: 30px; }
  .home-sezioni section + section { margin-top: 0; }
}

/* freccia per tornare indietro */
.indietro-barra { position: relative; z-index: 40; padding: 10px 0 0; background: transparent; pointer-events: none; }
.indietro-barra .container { display: flex; }
.indietro { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 999px; background: var(--bg-elevated); border: 1px solid var(--border); box-shadow: var(--shadow-card); color: var(--text); font: 600 14px var(--font-body, Inter, sans-serif); text-decoration: none; }
.indietro span { font-size: 18px; line-height: 1; color: var(--accent); }
.indietro small { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.indietro:hover { border-color: var(--text); }

/* programma del weekend: compatto ma ben visibile */
.programma { margin: 4px 0 22px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elevated); }
.programma-testa { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.programma-testa span { color: var(--text-muted); letter-spacing: 0; text-transform: none; font-family: var(--font-body); }
.programma-giorno { display: grid; grid-template-columns: 78px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border-soft, var(--border)); align-items: baseline; }
.programma-giorno > b { font-size: 12.5px; text-transform: capitalize; color: var(--text-secondary); }
.programma-sessioni { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.programma-sess { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--bg-elevated-2, var(--border)); color: var(--text); white-space: nowrap; }
.programma-sess b { font-variant-numeric: tabular-nums; margin-left: 3px; }
.programma-sess.gara { background: #e8352f; color: #fff; font-weight: 600; }
.programma-sess.finita { opacity: .55; }
.cron-testo strong { font-weight: 700; color: var(--text); }
.cron-testo { color: var(--text-secondary); }

/* Calendario: pulsante per saltare ai file da scaricare e schede dei circuiti ben separate nel tema chiaro */
.cal-vai-scarica { display: inline-block; margin: -4px 0 16px; text-decoration: none; }
.cal-scarica { scroll-margin-top: 90px; }
.pe-griglia { gap: 22px; }
:root[data-theme="light"] .pe-card, :root[data-theme="light"] .ag-wk { border: 1.5px solid #c4c1b8; box-shadow: 0 3px 10px rgba(21, 21, 26, .10); }
:root[data-theme="light"] .pe-card.f1 { border-top: 5px solid #e8352f; }
:root[data-theme="light"] .pe-card.moto { border-top: 5px solid #111115; }
:root[data-theme="light"] .pe-mappa { background: #eceae3; }

/* Calendario: scelta delle sessioni e del fuso orario */
.agenda-opzioni { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 4px 0 18px; }
.agenda-tipi { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-tipo { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--border); background: transparent; color: var(--muted, #6b6a72); cursor: pointer; }
.chip-tipo.attivo { background: var(--text); color: var(--bg); border-color: var(--text); }
.agenda-fuso { font-size: 13px; color: var(--muted, #6b6a72); display: flex; align-items: center; gap: 8px; }
.agenda-fuso select { font: inherit; font-size: 13px; padding: 7px 10px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card, var(--bg)); color: var(--text); max-width: 100%; }

/* Pagine Consigli e Social */
.cons-titolo { font-family: var(--font-display); text-transform: uppercase; font-size: 24px; margin: 36px 0 14px; }
.cons-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.cons-card { border: 1.5px solid var(--border); border-radius: 14px; padding: 18px; background: var(--card, var(--bg)); border-top: 5px solid #e8352f; display: flex; flex-direction: column; }
.cons-card.moto { border-top-color: #111115; }
:root[data-theme="light"] .cons-card { border-color: #c4c1b8; box-shadow: 0 3px 10px rgba(21, 21, 26, .10); }
.cons-sotto { font-family: var(--font-display); text-transform: uppercase; font-size: 15px; margin: 14px 0 8px; letter-spacing: .03em; }
.cons-sess, .cons-fav { display: flex; flex-direction: column; gap: 1px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.cons-sess:first-of-type, .cons-fav:first-of-type { border-top: 0; }
.cons-sess small, .cons-fav small { color: var(--muted, #6b6a72); font-size: 12px; }
.cons-sess span::first-letter { text-transform: uppercase; }
.cons-come { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cons-come article { border: 1.5px solid var(--border); border-radius: 14px; padding: 16px; font-size: 14px; }
.cons-come p { margin: 10px 0 0; }
.cons-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; position: relative; }
.cons-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.cons-form select, .cons-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card, var(--bg)); color: var(--text); }
.cons-dm { margin-top: 18px; }
.cons-dm-bottoni { display: flex; flex-wrap: wrap; gap: 10px; }
.cons-dm-bottoni .quiz-avanti { text-decoration: none; text-align: center; }
.soc-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 18px; }
.soc-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--card, var(--bg)); text-decoration: none; color: inherit; border-top: 5px solid #e8352f; }
:root[data-theme="light"] .soc-card { border-color: #c4c1b8; box-shadow: 0 3px 10px rgba(21, 21, 26, .10); }
.soc-card:nth-child(2) { border-top-color: #111115; }
.soc-nome { font-family: var(--font-display); text-transform: uppercase; font-size: 24px; }
.soc-utente { font-weight: 600; }
.soc-cta { color: var(--accent, #e8352f); font-weight: 600; margin-top: 8px; }

.cons-form[hidden] { display: none; }

/* Telefono: la testata resta fissa in alto e sotto le schede una sbarretta mostra che si scorre per vederne altre */
.nav-scrollbar { display: none; }
@media (max-width: 600px) {
  .site-header { position: sticky; top: 0; z-index: 60; }
  .nav .nav-scrollbar { display: block; order: 4; width: 100%; height: 4px; border-radius: 4px; background: rgba(120, 118, 128, .28); position: relative; overflow: hidden; margin-top: 2px; }
  .nav-scrollbar i { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; border-radius: 4px; background: var(--accent, #e8352f); transition: left .08s linear; }
  .nav-scrollbar.tutto { opacity: 0; }
}

/* Calendario: scelta delle sessioni da scaricare, separata dall'agenda */
.agenda-etichetta { font-size: 13px; color: var(--muted, #6b6a72); font-weight: 600; }
.scarica-scelta { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 16px 14px; margin: 0 0 18px; }
.scarica-scelta legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.scarica-tipi { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.scarica-tipo { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.scarica-tipo input { width: 18px; height: 18px; accent-color: var(--accent, #e8352f); }
.ag-includi { display: block; font-size: 12px; margin-top: 6px; }

/* Pronostico del podio in rosso, punti e classifica */
.gioco-card[data-gioco="pronostico"] { background: #e8352f; color: #fff; border-color: #b9211c; box-shadow: 0 3px 0 #9d1f1a; }
.gioco-card[data-gioco="pronostico"] span, .gioco-card[data-gioco="pronostico"] small, .gioco-card[data-gioco="pronostico"] b { color: #fff; }
.pron-testa { background: #e8352f; color: #fff; border-radius: 10px; padding: 10px 14px; }
.pron-testa b { color: #fff; }
.pron-rosso { background: #e8352f; color: #fff; }
.pron-nome { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; margin: 14px 0; max-width: 320px; }
.pron-nome input, .pron-scegli select { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card, var(--bg)); color: var(--text); }
.pron-punti { border-left: 4px solid #e8352f; padding: 8px 14px; margin: 16px 0; font-size: 14px; }
.pron-punti ul { margin: 6px 0; padding-left: 18px; }
.pron-scegli { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; margin: 8px 0 12px; max-width: 360px; }
.results tr.pron-io td { background: rgba(232, 53, 47, .12); }

/* Telefono: testata sempre fissa in alto (position: fixed); la barra del conto alla rovescia scorre sotto di lei */
@media (max-width: 600px) {
  html { scroll-padding-top: var(--hh, 100px); }
  body { padding-top: var(--hh, 100px); }
  .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 60; }
  .cal-scarica { scroll-margin-top: 0; }
}

/* Telefono: le schede del menu scorrono solo in orizzontale (prima si muovevano anche in verticale di qualche pixel) */
@media (max-width: 600px) {
  .nav .nav-links { overflow-x: auto; overflow-y: hidden; touch-action: pan-x; overscroll-behavior: contain; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
}

/* Computer: con dieci schede la testata non va a capo (nome, schede, lingua e tema su una sola riga) */
.brand, .brand span, .nav-links a { white-space: nowrap; }
@media (min-width: 981px) {
  .site-header .nav.container { max-width: 1500px; }
  .nav-links { gap: 18px; font-size: 13px; }
  .nav-destra { gap: 14px; }
}
@media (min-width: 981px) and (max-width: 1280px) {
  .site-header .nav.container { padding: 0 16px; }
  .nav-links { gap: 11px; font-size: 12px; letter-spacing: .02em; }
  .nav-destra { gap: 8px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand-logo { height: 46px; }
  .nav-links a.nav-giochi { padding: 8px 9px; font-size: 9px; }
}

/* Telefoni stretti (320-400 px): nome, lingua e tema restano sulla stessa riga */
@media (max-width: 400px) {
  .nav { padding: 8px 12px; gap: 4px; }
  .brand { font-size: 16px; gap: 6px; }
  .brand-logo { height: 34px; }
  .nav .lingua { gap: 4px; }
  .nav .lingua select { width: 96px; font-size: 12px; padding: 5px 4px; }
  .nav .lingua svg { display: none; }
  .nav .tema-btn { width: 34px; height: 34px; }
}

/* Calendario: finestra "quali sessioni vuoi?" prima del download */
.dlg-sessioni { border: 2px solid #e8352f; border-radius: 16px; padding: 22px; max-width: min(92vw, 420px); background: var(--bg, #fff); color: var(--text, #111); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.dlg-sessioni::backdrop { background: rgba(10, 10, 12, .6); }
.dlg-sessioni h3 { margin: 0 0 6px; font-family: var(--font-display); text-transform: uppercase; font-size: 22px; }
.dlg-lista { display: flex; flex-direction: column; gap: 12px; margin: 0 0 18px; }
.dlg-lista .scarica-tipo { font-size: 16px; }
.dlg-azioni { display: flex; gap: 10px; justify-content: flex-end; }
.dlg-azioni button { margin: 0; }
.dlg-azioni button:disabled { opacity: .45; cursor: not-allowed; }

/* Computer: il menu (Home, Formula 1...) parte subito dopo il nome; lingua e tema restano a destra */
@media (min-width: 981px) {
  .site-header .nav { justify-content: flex-start; gap: 36px; }
  .site-header .nav-destra { flex: 1; min-width: 0; justify-content: flex-start; }
  .site-header .nav-links { margin-right: auto; }
}
@media (min-width: 981px) and (max-width: 1280px) { .site-header .nav { gap: 18px; } }
@media (min-width: 981px) and (max-width: 1110px) {
  .site-header .nav { gap: 12px; }
  .brand { font-size: 17px; }
  .nav-links { gap: 8px; font-size: 11.5px; letter-spacing: .01em; }
  .nav-links a.nav-giochi { padding: 7px 7px; }
  .nav .lingua svg { display: none; }
  .nav .lingua select { max-width: 98px; padding: 5px 4px; font-size: 12px; }
}

/* MotoGP in blu: la sigla di ogni evento e i bordi si leggono meglio del nero */
:root { --moto-blu: #1f5fd1; }
.cd-sigla.moto, :root[data-theme="dark"] .cd-barra .cd-sigla.moto { background: var(--moto-blu); color: #fff; }
.pe-card.moto, :root[data-theme="light"] .pe-card.moto, .cons-card.moto, .soc-card:nth-child(2) { border-top-color: var(--moto-blu); }
:root[data-theme="light"] .pe-card.moto { border-top: 5px solid var(--moto-blu); }
.prono-col[data-serie="motogp"], .ultima-gara.serie-moto { border-top-color: var(--moto-blu); }
.moto-prossimo { border-left-color: var(--moto-blu); }
.ag-chip.moto { background: rgba(31, 95, 209, .13); color: var(--moto-blu); }
:root[data-theme="dark"] .ag-chip.moto { background: rgba(80, 140, 255, .18); color: #8fb6ff; }
.chip-serie.moto.attivo { background: var(--moto-blu); border-color: var(--moto-blu); color: #fff; }

/* Computer e tablet: la foto sta nella parte alta della scheda e il testo sotto, cosi' la scritta non copre il viso del pilota */
@media (min-width: 701px) {
  .hero2-lato, .hero2-lato.f1, .hero2-lato.moto { min-height: 640px; background: #101014; overflow: hidden; }
  .hero2.uno .hero2-lato { min-height: 600px; }
  .hero2-lato::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 58%; background: var(--foto, none) center 16% / cover; }
  .hero2-lato::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 16, 20, 0) 0%, rgba(16, 16, 20, 0) 36%, rgba(16, 16, 20, .88) 58%, rgba(16, 16, 20, .98) 78%); }
  .hero2-lato > * { z-index: 1; }
}

/* Tablet (601-980 px): nome, lingua e tema sopra, le dieci schede su una riga a parte che scorre di lato con la sbarretta */
@media (min-width: 601px) and (max-width: 980px) {
  .site-header .nav { height: auto; flex-wrap: wrap; padding: 10px 20px; gap: 6px; justify-content: flex-start; }
  .site-header .nav-destra { display: contents; }
  .site-header .nav .lingua { margin-left: auto; }
  .site-header .nav .tema-btn { order: 2; }
  .site-header .nav .nav-links { order: 3; width: 100%; flex: none; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; gap: 20px; padding-bottom: 8px; margin-right: 0; font-size: 13px; scrollbar-width: none; }
  .site-header .nav .nav-links a { flex: none; }
  .nav .nav-scrollbar { display: block; order: 4; width: 100%; height: 4px; border-radius: 4px; background: rgba(120, 118, 128, .28); position: relative; overflow: hidden; margin-top: 2px; }
}

/* Telefono: tolto lo spazio bianco sotto le schede del menu (la testata e' piu' bassa) */
@media (max-width: 600px) {
  .site-header .nav { padding-bottom: 5px; gap: 4px; }
  .nav .nav-links { padding-bottom: 6px; }
  .nav-links a.active::after { bottom: -3px; }
  .nav .nav-scrollbar { margin-top: 0; height: 3px; }
}

/* Nome del sito nella testata: "GP" nel colore del testo e "OGGI" in rosso, come MMA Oggi */
.brand-nome { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.brand-oggi { color: var(--accent, #e8352f); }
