/* ============================================
   GRIDSTOP — STYLES v2.2
   Design tokens · fluid type · a11y · grain · choreographed motion
   ============================================ */

:root {
  --red: #e10600;
  --red-dark: #bf0500;
  --red-bright: #ff2a25;
  --red-glow: rgba(225, 6, 0, 0.25);
  --green: #16a34a;
  --amber: #d97706;
  --blue: #2563eb;
  --gold: #ffce4d;

  --bg-primary: #f6f7fb;
  --bg-secondary: #ececf4;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8ff;
  --text-primary: #08080f;
  --text-secondary: #3a3a52;
  --text-muted: #62627c;
  --border: rgba(8, 8, 40, 0.10);
  --border-light: rgba(8, 8, 40, 0.05);
  --shadow: rgba(8, 8, 40, 0.08);
  --shadow-lg: rgba(8, 8, 40, 0.16);
  --shadow-xl: rgba(8, 8, 40, 0.28);
  --overlay: rgba(247, 247, 255, 0.97);
  --header-bg: rgba(247, 247, 255, 0.85);
  --hero-gradient: linear-gradient(160deg, #06060f 0%, #0f0f22 35%, #0a0a1c 65%, #100010 100%);
  --page-hero-gradient: linear-gradient(160deg, #06060f 0%, #0f0020 100%);
  --table-stripe: rgba(8, 8, 40, 0.025);
  --tag-bg: rgba(8, 8, 40, 0.06);
  --modal-bg: #ffffff;
  --input-bg: rgba(8, 8, 40, 0.04);
  --input-border: rgba(8, 8, 40, 0.14);
  --skeleton-base: rgba(8, 8, 40, 0.05);
  --skeleton-shine: rgba(8, 8, 40, 0.10);

  /* ─── Spacing scale (4pt rhythm) ─── */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px;

  /* ─── Radius scale ─── */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;

  /* ─── Elevation scale ─── */
  --elev-1: 0 1px 2px var(--shadow), 0 1px 3px var(--shadow);
  --elev-2: 0 4px 14px var(--shadow);
  --elev-3: 0 12px 36px var(--shadow-lg);
  --elev-4: 0 24px 64px var(--shadow-xl);

  /* ─── Motion tokens ─── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.16s;
  --dur-mid: 0.24s;
  --dur-slow: 0.4s;

  /* ─── Z-index scale ─── */
  --z-header: 1000;
  --z-fab: 1500;
  --z-search: 2000;
  --z-modal: 3000;
  --z-toast: 3500;
}

.dark-mode {
  --bg-primary: #06060f;
  --bg-secondary: #0b0b18;
  --bg-card: #10101f;
  --bg-card-hover: #16162c;
  --text-primary: #f1f1fa;
  --text-secondary: #a3a3c4;
  --text-muted: #7a7a99;
  --border: rgba(255, 255, 255, 0.09);
  --border-light: rgba(255, 255, 255, 0.04);
  --shadow: rgba(0, 0, 0, 0.45);
  --shadow-lg: rgba(0, 0, 0, 0.65);
  --shadow-xl: rgba(0, 0, 0, 0.85);
  --overlay: rgba(6, 6, 15, 0.97);
  --header-bg: rgba(6, 6, 15, 0.82);
  --table-stripe: rgba(255, 255, 255, 0.022);
  --tag-bg: rgba(255, 255, 255, 0.06);
  --modal-bg: #10101f;
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.12);
  --skeleton-base: rgba(255, 255, 255, 0.04);
  --skeleton-shine: rgba(255, 255, 255, 0.09);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: dark light; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
table { width: 100%; border-collapse: collapse; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: 'Titillium Web', sans-serif; font-weight: 700; line-height: 1.1; letter-spacing: -0.005em; }
input, select, textarea { font-family: 'Inter', sans-serif; font-size: 0.95rem; color: var(--text-primary); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
::selection { background: var(--red); color: #fff; }
/* Tabular figures for all numeric/data surfaces — prevents jitter & aligns columns */
.standings-table, .results-table, .stat-value, .stat-sub, .countdown-mini,
.calendar-countdown, .calendar-date, .calendar-round, .td-pts, .driver-card-number,
.history-score, .podium-score, .podium-rank, .profile-stat strong, .team-stat strong,
.driver-stat strong, .pred-detail-value, .countdown-unit b {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--red); color: #fff;
  padding: 10px 20px; font-weight: 700; z-index: 9999;
  border-radius: 0 0 8px 8px;
  font-family: 'Titillium Web', sans-serif; font-size: 0.9rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: top 0.2s;
}
.skip-link:focus, .skip-link:focus-visible {
  position: fixed;
  top: 0;
  left: 16px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
button:focus-visible, a:focus-visible { border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff;
  font-family: 'Titillium Web', sans-serif; font-weight: 700;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 12px 32px; border-radius: 8px;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(225, 6, 0, 0.35);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 28px rgba(225,6,0,0.5); }
.btn-primary:active { transform: scale(0.98); box-shadow: 0 2px 12px rgba(225,6,0,0.3); }
.btn-primary.btn-lg { padding: 14px 40px; font-size: 1.05rem; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--text-primary);
  font-family: 'Titillium Web', sans-serif; font-weight: 600;
  font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 22px; border-radius: 8px; border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: rgba(225,6,0,0.3); transform: translateY(-1px); }
.btn-link { background: none; border: none; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; transition: color 0.2s; padding: 8px 0; }
.btn-link:hover { color: var(--red); }
.btn-auth {
  font-family: 'Titillium Web', sans-serif; font-weight: 700;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 9px 20px; border-radius: 8px;
  background: var(--red); color: #fff;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(225,6,0,0.3);
}
.btn-auth:hover { background: var(--red-dark); box-shadow: 0 4px 20px rgba(225,6,0,0.45); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; }
.header-top { background: var(--red); color: #fff; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; }
.header-top-inner { display: flex; align-items: center; height: 34px; overflow: hidden; }
.ticker-label {
  background: #000; color: var(--red);
  padding: 2px 12px; font-family: 'Titillium Web', sans-serif;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  flex-shrink: 0; margin-right: 12px; text-transform: uppercase;
}
.ticker-wrapper { overflow: hidden; flex: 1; position: relative; }
.ticker-content { display: flex; gap: 60px; white-space: nowrap; animation: ticker 30s linear infinite; }
.ticker-content span { display: inline-block; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

.main-nav {
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px var(--shadow);
}
.nav-inner { display: flex; align-items: center; height: 64px; gap: 24px; }
.logo {
  display: flex; align-items: baseline; gap: 2px;
  font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.6rem;
  letter-spacing: -0.02em; white-space: nowrap;
}
.logo-grid { color: var(--text-primary); }
.logo-stop { color: var(--red); }
.logo-f1 {
  font-size: 0.75rem; font-weight: 700;
  background: var(--red); color: #fff;
  padding: 2px 6px; border-radius: 4px; margin-left: 4px;
  vertical-align: super; box-shadow: 0 2px 8px rgba(225,6,0,0.4);
}
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-links > li { flex-shrink: 0; }
.nav-links a {
  font-family: 'Titillium Web', sans-serif; font-size: 0.9rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 8px 12px; border-radius: 6px;
  transition: all 0.2s; color: var(--text-secondary); position: relative;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-secondary); }
.nav-links a.active { color: var(--red); background: rgba(225,6,0,0.08); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px; background: var(--red); border-radius: 1px;
}
.nav-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.install-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 14px; border-radius: 10px;
  font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--red); border: 1px solid rgba(225,6,0,0.35); background: rgba(225,6,0,0.06);
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.install-btn:hover { background: rgba(225,6,0,0.12); transform: translateY(-1px); }
@media (max-width: 640px) { .install-btn span { display: none; } .install-btn { padding: 0; width: 44px; justify-content: center; } }
.search-toggle, .theme-toggle {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s; color: var(--text-secondary);
}
.search-toggle:hover, .theme-toggle:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* ─── LANGUAGE PICKER ─── */
.lang-picker { position: relative; }
.lang-btn {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; transition: background 0.2s;
  color: var(--text-secondary);
}
.lang-btn:hover { background: var(--bg-secondary); }
.lang-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 32px var(--shadow-lg);
  min-width: 160px; z-index: 200; overflow: hidden;
  padding: 4px 0;
}
.lang-dropdown.active { display: block; }
.lang-item {
  padding: 9px 16px; font-size: 0.875rem; cursor: pointer;
  color: var(--text-secondary); transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.lang-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.lang-item.lang-active { color: var(--red); font-weight: 600; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .nav-actions { margin-left: 0; margin-right: auto; }
[dir="rtl"] .nav-inner { flex-direction: row-reverse; }

.dark-mode .icon-moon { display: none; }
.dark-mode .icon-sun { display: block; }
.icon-sun { display: none; }
.icon-moon { display: block; }
.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; align-items: center; justify-content: center;
}
.mobile-menu-btn span { width: 22px; height: 2px; background: var(--text-primary); transition: all 0.3s; border-radius: 2px; }
.mobile-menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* User Dropdown */
.user-dropdown { position: relative; }
.user-avatar-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 10px; transition: background 0.2s; }
.user-avatar-btn:hover { background: var(--bg-secondary); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(225,6,0,0.4);
}
.user-name-short { font-size: 0.85rem; font-weight: 500; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--modal-bg); border: 1px solid var(--border);
  border-radius: 14px; min-width: 200px;
  box-shadow: 0 20px 60px var(--shadow-xl);
  padding: 6px; z-index: 100;
}
.dropdown-menu.active { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px; font-size: 0.9rem;
  transition: background 0.15s; width: 100%;
  color: var(--text-primary); text-align: left;
}
.dropdown-item:hover { background: var(--bg-secondary); }
.dropdown-item svg { flex-shrink: 0; color: var(--text-muted); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.logout-btn { color: var(--red); }
.logout-btn svg { color: var(--red); }

/* Search Overlay */
.search-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--overlay); z-index: 2000;
  display: none; flex-direction: column;
  padding-top: 120px; backdrop-filter: blur(24px);
}
.search-overlay.active { display: flex; }
.search-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 14px; padding: 16px 20px;
  box-shadow: 0 8px 40px var(--shadow-lg);
}
.search-bar:focus-within { border-color: var(--red); box-shadow: 0 8px 40px var(--shadow-lg), 0 0 0 4px var(--red-glow); }
.search-bar svg { flex-shrink: 0; color: var(--text-muted); }
.search-bar input { flex: 1; border: none; background: none; font-size: 1.1rem; color: var(--text-primary); outline: none; }
.search-bar input::placeholder { color: var(--text-muted); }
.search-close { font-size: 1.5rem; color: var(--text-muted); padding: 4px; }
.search-close:hover { color: var(--text-primary); }
.search-results { margin-top: 20px; max-height: 60vh; overflow-y: auto; }
.search-result-item { padding: 14px 16px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.search-result-item:hover { background: var(--bg-secondary); }
.search-result-item h4 { font-size: 1rem; margin-bottom: 4px; }
.search-result-item p { font-size: 0.85rem; color: var(--text-secondary); }
.search-result-item .search-result-tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--red); letter-spacing: 0.06em; }

/* ---------- Modals ---------- */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 3000;
  align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(8px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--modal-bg); border-radius: 20px;
  width: 100%; max-width: 440px; padding: 36px; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  max-height: 90vh; overflow-y: auto;
}
.modal-article { max-width: 720px; padding: 48px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--text-muted); background: var(--bg-secondary);
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text-primary); background: var(--border); transform: rotate(90deg); }
.modal-tabs { display: flex; gap: 4px; margin-bottom: 28px; }
.modal-tab {
  flex: 1; padding: 10px; border-radius: 8px;
  font-family: 'Titillium Web', sans-serif; font-weight: 700;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bg-secondary); color: var(--text-muted); transition: all 0.2s;
}
.modal-tab.active { background: var(--red); color: #fff; box-shadow: 0 4px 16px rgba(225,6,0,0.35); }

/* Auth Forms */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.form-group input {
  padding: 13px 16px; border-radius: 10px;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.form-error { font-size: 0.85rem; color: var(--red); min-height: 20px; }
.form-success { font-size: 0.85rem; color: var(--green); min-height: 20px; }
.form-info { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 8px; }

/* Article Detail */
.article-detail-tag { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.article-detail-title { font-size: 2rem; margin-bottom: 16px; line-height: 1.15; }
.article-detail-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.article-detail-body { font-size: 1rem; line-height: 1.85; color: var(--text-secondary); }
.article-detail-body p { margin-bottom: 18px; }
.article-detail-source { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.article-detail-source a { color: var(--red); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(225,6,0,0.20), transparent 55%),
    radial-gradient(80% 80% at 0% 110%, rgba(37,99,235,0.12), transparent 50%),
    var(--hero-gradient);
  padding: 56px 0 64px; color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -55deg, transparent 0, transparent 60px,
    rgba(225,6,0,0.018) 60px, rgba(225,6,0,0.018) 61px
  );
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 30%, var(--red) 70%, transparent 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.hero-main {
  display: flex; flex-direction: column; justify-content: center;
  padding: 36px; border-radius: 20px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: background 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden; cursor: pointer;
}
.hero-main::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, rgba(225,6,0,0.3) 60%, transparent 100%);
}
.hero-main:hover { background: rgba(255,255,255,0.09); box-shadow: 0 12px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12); }
.hero-badge {
  display: inline-block; width: fit-content;
  background: var(--red); color: #fff;
  font-family: 'Titillium Web', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.14em;
  padding: 4px 14px; border-radius: 4px; margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(225,6,0,0.5);
}
.hero-main h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem); margin-bottom: 14px; line-height: 1.04; letter-spacing: -0.015em; font-weight: 900; }
.hero-main p { color: rgba(255,255,255,0.72); margin-bottom: 20px; font-size: 1.05rem; line-height: 1.65; }
.hero-main .article-meta { margin-bottom: 20px; }
.article-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.hero .article-meta { color: rgba(255,255,255,0.45); }
.source { font-style: italic; }
.read-more {
  font-family: 'Titillium Web', sans-serif; font-weight: 700;
  color: var(--red); font-size: 1rem; transition: color 0.2s, letter-spacing 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.read-more:hover { color: #ff2a25; letter-spacing: 0.02em; }
.hero-side { display: flex; flex-direction: column; gap: 12px; }
.hero-card {
  flex: 1; padding: 20px 24px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(12px);
  transition: background 0.2s, transform 0.2s; cursor: pointer;
  position: relative; overflow: hidden;
}
.hero-card::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); opacity: 0; transition: opacity 0.2s;
}
.hero-card:hover { background: rgba(255,255,255,0.09); transform: translateX(4px); }
.hero-card:hover::after { opacity: 1; }
.hero-card-tag { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--red); }
.hero-card h2 { font-size: 1.05rem; margin-top: 8px; line-height: 1.3; }
.hero-card .article-meta { margin-top: 10px; }

/* ---------- Stats Bar ---------- */
.stats-bar { background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item {
  display: flex; flex-direction: column; gap: 3px;
  text-align: center; padding: 22px 16px;
  border-right: 1px solid var(--border); position: relative;
}
.stat-item:last-child { border-right: none; }
.stat-item::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--red); transition: width 0.3s;
}
.stat-item:hover::after { width: 60%; }
.stat-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.stat-value { font-family: 'Titillium Web', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.stat-sub { font-size: 0.8rem; color: var(--text-secondary); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-secondary); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.section-header h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.85rem); position: relative; padding-left: 16px; }
.section-header h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 70%; background: var(--red); border-radius: 2px;
}
.see-all {
  font-family: 'Titillium Web', sans-serif; font-size: 0.85rem;
  font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 4px; transition: gap 0.2s;
}
.see-all:hover { gap: 8px; }

/* ---------- News Grid ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.2s; cursor: pointer;
}
.news-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px var(--shadow-lg); border-color: rgba(225,6,0,0.2); }
.news-card-image {
  height: 200px;
  background: linear-gradient(135deg, #0d0d22 0%, #1a1a3a 50%, #0f0f28 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.news-card-image::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent 0, transparent 24px,
    rgba(255,255,255,0.015) 24px, rgba(255,255,255,0.015) 25px
  );
}
.news-card-image::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to top, rgba(225,6,0,0.18), transparent);
}
.news-card-image .card-tag {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: var(--red); color: #fff;
  font-family: 'Titillium Web', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.1em;
  padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(225,6,0,0.5);
}
.card-graphic {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.2; transition: opacity 0.3s; pointer-events: none;
}
.news-card:hover .card-graphic { opacity: 0.32; }
.news-card-body { padding: 20px; }
.news-card-body h3 { font-size: 1.1rem; margin-bottom: 10px; line-height: 1.3; transition: color 0.2s; }
.news-card:hover .news-card-body h3 { color: var(--red); }
.news-card-body p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-body .article-meta { font-size: 0.78rem; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; color: var(--text-muted); }
.article-meta .dot { opacity: 0.45; font-size: 0.7rem; }
.article-meta .read-time { color: var(--text-muted); }

/* Featured card — editorial horizontal layout */
.news-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.6fr 1fr; }
.news-card.featured .news-card-image { height: 100%; min-height: 300px; }
.news-card.featured .news-card-body { padding: 36px 40px; display: flex; flex-direction: column; justify-content: center; }
.news-card.featured .news-card-body h3 { font-size: 1.55rem; margin-bottom: 14px; }
.news-card.featured .news-card-body p { -webkit-line-clamp: 5; font-size: 0.925rem; }

/* ---------- News List ---------- */
.news-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 40px; }
.news-list-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s;
}
.news-list-item:hover { transform: translateX(6px); box-shadow: 0 6px 28px var(--shadow); border-color: rgba(225,6,0,0.2); }
.news-list-image {
  background: linear-gradient(135deg, #0d0d22 0%, #1a1a3a 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 140px; position: relative; overflow: hidden;
}
.news-list-image::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent 0, transparent 20px,
    rgba(255,255,255,0.015) 20px, rgba(255,255,255,0.015) 21px
  );
}
.news-list-image::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(to top, rgba(225,6,0,0.18), transparent);
}
.news-list-item:hover .card-graphic { opacity: 0.32; }
.news-list-image .card-tag {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--red); color: #fff;
  font-family: 'Titillium Web', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 3px; text-transform: uppercase;
}
.news-list-body { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; }
.news-list-body h3 { font-size: 1.15rem; margin-bottom: 8px; line-height: 1.3; transition: color 0.2s; }
.news-list-item:hover .news-list-body h3 { color: var(--red); }
.news-list-body p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.6; }

/* ---------- Filter Bar ---------- */
.filter-bar { display: flex; gap: 8px; padding: 24px 0; flex-wrap: wrap; }
.filter-btn {
  font-family: 'Titillium Web', sans-serif; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 9px 20px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all 0.2s; color: var(--text-secondary);
}
.filter-btn:hover { border-color: rgba(225,6,0,0.4); color: var(--red); background: rgba(225,6,0,0.06); }
.filter-btn.active { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 4px 16px rgba(225,6,0,0.35); }

/* ---------- Standings Tables ---------- */
.standings-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.standings-table { font-size: 0.9rem; }
.standings-table th {
  font-family: 'Titillium Web', sans-serif; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); padding: 12px 14px;
  text-align: left; border-bottom: 2px solid var(--border);
}
.standings-table td { padding: 11px 14px; border-bottom: 1px solid var(--border-light); }
.standings-table tr:nth-child(even) { background: var(--table-stripe); }
.standings-table tr:hover { background: rgba(225,6,0,0.04); }
.standings-table td:first-child { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.1rem; width: 44px; color: var(--text-muted); }
.standings-table.full { font-size: 0.95rem; }
.standings-table.full td { padding: 13px 18px; }
.td-pts { font-family: 'Titillium Web', sans-serif; font-weight: 700; color: var(--red); font-size: 1rem; }
.td-gap { font-family: 'Titillium Web', sans-serif; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Team-colour accent + podium medals on standings rows */
.standings-table tbody tr { position: relative; }
.standings-table tbody tr td:first-child { box-shadow: inset 3px 0 0 var(--tc, transparent); }
.standings-table td.pos { color: var(--text-secondary); }
.standings-table td.pos-1 { color: #FFD700; }
.standings-table td.pos-2 { color: #C0C0C0; }
.standings-table td.pos-3 { color: #CD7F32; }
.standings-table.full td.pos-1,
.standings-table.full td.pos-2,
.standings-table.full td.pos-3 {
  position: relative;
}
.standings-table.full td.pos-1::after,
.standings-table.full td.pos-2::after,
.standings-table.full td.pos-3::after {
  content: ''; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.55;
}

/* ---------- Results ---------- */
.result-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.result-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 24px 28px; border-bottom: 1px solid var(--border);
  background: linear-gradient(to right, rgba(225,6,0,0.05), transparent);
}
.result-header h2 { font-size: 1.4rem; }
.result-circuit { font-size: 0.85rem; color: var(--text-secondary); margin-top: 2px; }
.result-round { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--tag-bg); color: var(--text-secondary); padding: 5px 12px; border-radius: 6px; }
.results-table th { font-family: 'Titillium Web', sans-serif; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 12px 18px; text-align: left; border-bottom: 2px solid var(--border); }
.results-table td { padding: 11px 18px; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
.results-table tr:nth-child(even) { background: var(--table-stripe); }
.results-table tr:hover { background: rgba(225,6,0,0.03); }
.result-source { padding: 12px 28px; border-top: 1px solid var(--border); }
.result-source .source { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Rumors ---------- */
.rumors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rumor-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; border-left: 4px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.rumor-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow); }
.rumor-card.confirmed { border-left-color: var(--green); }
.rumor-card.rumor { border-left-color: var(--amber); }
.rumor-badge { font-family: 'Titillium Web', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 12px; }
.rumor-badge.confirmed { background: rgba(22,163,74,0.12); color: var(--green); }
.rumor-badge.rumor { background: rgba(217,119,6,0.12); color: var(--amber); }
.rumor-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.rumor-card p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.6; }
.rumor-card .source { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- Social ---------- */
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.social-grid.single { grid-template-columns: minmax(280px, 460px); justify-content: center; }

/* ── Last Grand Prix recap (home, live data) ── */
.lastgp-card {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden;
}
.lastgp-main { padding: 28px 30px; }
.lastgp-head { margin-bottom: 22px; }
.lastgp-head h3 { font-size: 1.5rem; margin: 8px 0 2px; }
.lastgp-circuit { font-size: 0.85rem; color: var(--text-secondary); }
.lastgp-podium { display: flex; flex-direction: column; gap: 10px; }
.lastgp-pos {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px 12px 14px; border-radius: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-left: 4px solid var(--tc); position: relative;
  transition: transform var(--dur-fast) var(--ease-out);
}
.lastgp-pos:hover { transform: translateX(4px); }
.lastgp-medal {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Titillium Web', sans-serif; font-weight: 900; font-size: 1rem; color: #06060f;
}
.lastgp-pos.p1 .lastgp-medal { background: #FFD700; }
.lastgp-pos.p2 .lastgp-medal { background: #C0C0C0; }
.lastgp-pos.p3 .lastgp-medal { background: #CD7F32; color: #fff; }
.lastgp-driver { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lastgp-driver strong { font-size: 1.02rem; font-weight: 600; }
.lastgp-driver span { font-size: 0.78rem; color: var(--text-muted); }
.lastgp-time { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.92rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lastgp-extra { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.lastgp-tag { flex: 1; min-width: 130px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.lastgp-tag span { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.lastgp-tag strong { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1rem; }
.lastgp-rest {
  border-left: 1px solid var(--border); padding: 24px 24px;
  display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(180deg, rgba(225,6,0,0.03), transparent);
}
.lastgp-rest li {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px;
  padding: 8px 6px; border-bottom: 1px solid var(--border-light); font-size: 0.88rem;
}
.lastgp-rest li:last-child { border-bottom: none; }
.lastgp-rpos { font-family: 'Titillium Web', sans-serif; font-weight: 700; color: var(--text-muted); text-align: center; }
.lastgp-rname { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lastgp-rpts { font-family: 'Titillium Web', sans-serif; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
@media (max-width: 768px) {
  .lastgp-card { grid-template-columns: 1fr; }
  .lastgp-rest { border-left: none; border-top: 1px solid var(--border); }
}
.social-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-card);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; font-weight: 500; font-size: 0.95rem;
}
.social-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px var(--shadow); }
.social-card.instagram:hover { border-color: #E4405F; color: #E4405F; }
.social-card.tiktok:hover { border-color: #00f2ea; color: #00f2ea; }
.social-card.twitter:hover { border-color: rgba(255,255,255,0.3); }

/* ---------- Page Hero ---------- */
.page-hero { background: var(--page-hero-gradient); padding: 56px 0; color: #fff; position: relative; overflow: hidden; }
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -55deg, transparent 0, transparent 60px,
    rgba(255,255,255,0.012) 60px, rgba(255,255,255,0.012) 61px
  );
}
.page-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 30%, var(--red) 70%, transparent 100%);
}
.page-hero h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3rem); margin-bottom: 10px; position: relative; letter-spacing: -0.015em; font-weight: 900; }
.page-hero p { color: rgba(255,255,255,0.66); font-size: clamp(0.98rem, 0.9rem + 0.4vw, 1.1rem); position: relative; max-width: 60ch; }

/* ---------- Predictions ---------- */
.pred-login-prompt { padding: 80px 0; }
.empty-state { text-align: center; padding: 48px; }
.empty-icon { display: flex; justify-content: center; margin-bottom: 20px; color: var(--text-muted); }
.empty-state h2, .empty-state h3 { font-size: 1.6rem; margin-bottom: 10px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; font-size: 0.95rem; }

.pred-section { padding: 24px 0 48px; }
.pred-race-selector {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; margin-bottom: 24px; text-align: center;
  background-image: linear-gradient(to right, rgba(225,6,0,0.04), transparent, rgba(225,6,0,0.04));
}
.pred-race-selector h2 { font-size: 1.8rem; margin-bottom: 6px; }
.pred-race-selector p { color: var(--text-secondary); font-size: 0.95rem; }
.pred-deadline { margin-top: 14px; font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber); }
.pred-deadline.open { color: var(--green); }
.pred-countdown { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* Demo-profile tag on the predictions leaderboard (honesty marker) */
.demo-tag {
  display: inline-block; vertical-align: middle; margin-left: 7px;
  font-family: 'Titillium Web', sans-serif; font-weight: 700;
  font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); background: var(--tag-bg);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 6px;
}
.podium-name .demo-tag { margin-left: 5px; }
.lb-demo-note {
  margin-top: 16px; font-size: 0.8rem; color: var(--text-muted);
  line-height: 1.5; padding-left: 12px; border-left: 2px solid var(--border);
}
.pred-deadline.closed { color: var(--red); }

.pred-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.pred-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.pred-field label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px; }
.pred-pts { color: var(--red); font-weight: 700; }
.pred-field select {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  border: 1.5px solid var(--input-border); background: var(--input-bg);
  outline: none; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.pred-field select:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }

.pred-scoring-info { background: var(--bg-secondary); border-radius: 12px; padding: 18px 22px; margin-bottom: 24px; border: 1px solid var(--border); }
.pred-scoring-info h4 { font-size: 0.9rem; margin-bottom: 12px; color: var(--text-secondary); }
.scoring-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; font-size: 0.875rem; color: var(--text-secondary); }
.scoring-grid strong { color: var(--red); }
.scoring-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }

.pred-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pred-status { font-size: 0.875rem; color: var(--green); font-weight: 600; }
.pred-current { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; margin-top: 20px; }
.pred-current h3 { font-size: 1.2rem; margin-bottom: 16px; }
.pred-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pred-detail-item { background: var(--bg-secondary); border-radius: 10px; padding: 14px; }
.pred-detail-item .pred-detail-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.pred-detail-item .pred-detail-value { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.05rem; }

/* Leaderboard */
.leaderboard-tabs { display: flex; gap: 8px; margin-bottom: 28px; }
.lb-tab { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 9px 18px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); transition: all 0.2s; }
.lb-tab:hover { border-color: rgba(225,6,0,0.4); color: var(--red); }
.lb-tab.active { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 4px 16px rgba(225,6,0,0.35); }

.leaderboard-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 36px; }
.podium-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; text-align: center;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.podium-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px var(--shadow-lg); }
.podium-card.gold { border-top: 4px solid #FFD700; }
.podium-card.silver { border-top: 4px solid #C0C0C0; }
.podium-card.bronze { border-top: 4px solid #CD7F32; }
.podium-card.gold::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top, rgba(255,215,0,0.06), transparent 70%); }
.podium-rank { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 3rem; opacity: 0.1; position: absolute; top: 8px; right: 16px; line-height: 1; }
.podium-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.3rem;
  margin: 0 auto 12px; box-shadow: 0 4px 16px rgba(225,6,0,0.4);
}
.podium-card.gold .podium-avatar { background: #FFD700; color: #000; box-shadow: 0 4px 16px rgba(255,215,0,0.4); }
.podium-card.silver .podium-avatar { background: #C0C0C0; color: #000; box-shadow: 0 4px 16px rgba(192,192,192,0.35); }
.podium-card.bronze .podium-avatar { background: #CD7F32; color: #fff; box-shadow: 0 4px 16px rgba(205,127,50,0.35); }
.podium-name { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.15rem; }
.podium-score { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.6rem; color: var(--red); margin-top: 6px; }
.podium-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Prediction History */
.history-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin-bottom: 16px; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.history-header h4 { font-size: 1.1rem; }
.history-score { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.4rem; color: var(--red); }
.history-score span { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }

/* ---------- Profile Page ---------- */
.profile-grid { display: flex; flex-direction: column; gap: 20px; padding: 40px 0; }
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.profile-card h3 { font-size: 1.2rem; margin-bottom: 20px; }
.profile-header { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.9rem; flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(225,6,0,0.4);
}
.profile-info h2 { font-size: 1.7rem; margin-bottom: 4px; }
.profile-email { font-size: 0.875rem; color: var(--text-muted); display: block; }
.profile-since { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 2px; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.profile-stat { text-align: center; padding: 20px 16px; border-radius: 12px; background: var(--bg-secondary); border: 1px solid var(--border); }
.profile-stat strong { display: block; font-family: 'Titillium Web', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--red); }
.profile-stat span { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; display: block; }
.rank-evolution { min-height: 80px; }

/* ---------- Drivers Grid ---------- */
.drivers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 40px 0; }
.driver-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out; cursor: pointer;
}
.driver-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px var(--shadow-lg); }
.driver-card-header { height: 110px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.driver-card-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,0.4), transparent); }
.driver-card-number { font-size: 4.5rem; font-family: 'Titillium Web', sans-serif; font-weight: 700; color: rgba(255,255,255,0.18); position: relative; z-index: 2; }
/* Driver photo (free Wikimedia thumbnail) — covers the team-colour header, number stays on top */
.driver-card-header { height: 200px; }
.driver-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 18%;
  z-index: 0; opacity: 0.97;
}
.driver-card-header.has-photo::after {
  height: 55%; background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  z-index: 1;
}
.driver-card-header.has-photo .driver-card-number {
  position: absolute; right: 12px; bottom: 6px; font-size: 2.4rem;
  color: rgba(255,255,255,0.85); text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.driver-card-header.has-photo::before { z-index: 1; }
/* ── Driver detail modal ── */
.driver-detail-head {
  display: flex; align-items: flex-end; gap: 20px;
  margin: -48px -48px 24px; padding: 28px 32px 22px;
  border-bottom: 4px solid var(--tc); position: relative; overflow: hidden;
  min-height: 150px;
}
.driver-detail-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 70%); pointer-events: none; }
.driver-detail-photo { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; object-position: center 18%; border: 2px solid rgba(255,255,255,0.25); flex-shrink: 0; position: relative; z-index: 1; box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
.driver-detail-num { width: 120px; height: 120px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-family: 'Titillium Web', sans-serif; font-weight: 900; font-size: 3rem; color: #fff; background: rgba(255,255,255,0.12); flex-shrink: 0; position: relative; z-index: 1; }
.driver-detail-id { position: relative; z-index: 1; color: #fff; }
.driver-detail-pos { font-family: 'Titillium Web', sans-serif; font-weight: 900; font-size: 0.95rem; color: var(--tc); letter-spacing: 0.05em; }
.driver-detail-id h1 { font-size: 1.9rem; line-height: 1.05; margin: 2px 0 6px; color: #fff; }
.driver-detail-team { font-size: 0.9rem; color: rgba(255,255,255,0.8); }
.driver-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
.driver-detail-stats > div { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 16px 10px; text-align: center; }
.driver-detail-stats strong { display: block; font-family: 'Titillium Web', sans-serif; font-weight: 900; font-size: 1.7rem; color: var(--red); }
.driver-detail-stats span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.driver-detail-results h3 { font-size: 1.1rem; margin-bottom: 12px; }
.dd-results { display: flex; flex-direction: column; gap: 2px; }
.dd-results li { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--border-light); font-size: 0.92rem; }
.dd-results li:last-child { border-bottom: none; }
.dd-r-pos { font-family: 'Titillium Web', sans-serif; font-weight: 700; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.dd-r-pos.podium { color: var(--text-primary); }
.dd-medal { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dd-medal.m1 { background: #FFD700; } .dd-medal.m2 { background: #C0C0C0; } .dd-medal.m3 { background: #CD7F32; }
.dd-r-name { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-r-extra { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.dd-r-extra b { color: var(--red); font-family: 'Titillium Web', sans-serif; }
.driver-detail-bio { font-size: 0.92rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 22px; max-width: 60ch; }

/* team detail */
.team-detail-drivers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.team-detail-driver { display: flex; align-items: center; gap: 12px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color var(--dur-fast), transform var(--dur-fast); }
.team-detail-driver:hover { border-color: var(--tc); transform: translateY(-2px); }
.team-detail-driver img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; object-position: center 18%; flex-shrink: 0; }
.team-detail-driver .tdd-num { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: 'Titillium Web', sans-serif; font-weight: 900; background: var(--tc); color: #fff; flex-shrink: 0; }
.team-detail-driver strong { display: block; font-size: 0.98rem; }
.team-detail-driver span { font-size: 0.78rem; color: var(--text-muted); }
.tdd-res { display: flex; gap: 14px; }
@media (max-width: 480px) { .team-detail-drivers { grid-template-columns: 1fr; } }

.dd-actual { color: var(--green); font-weight: 600; font-size: 0.85em; }
.pred-detail-item.is-ok { border-left: 3px solid var(--green); }
.pred-detail-item.is-ko { border-left: 3px solid var(--border); }
.dd-credit { font-size: 0.72rem; color: var(--text-muted); margin-top: 18px; text-align: right; }
.dd-credit a { color: var(--text-secondary); text-decoration: underline; }
@media (max-width: 480px) {
  .driver-detail-head { margin: -28px -28px 20px; padding: 20px 22px 18px; flex-direction: column; align-items: flex-start; }
  .driver-detail-stats { grid-template-columns: repeat(2, 1fr); }
}

.photo-credit { font-size: 0.75rem; color: var(--text-muted); padding: 0 0 36px; text-align: center; }
.photo-credit a { color: var(--text-secondary); text-decoration: underline; }
.driver-card-body { padding: 18px; }
.driver-card-body h2 { font-size: 1.15rem; margin-bottom: 4px; }
.driver-card-body .driver-team { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 14px; }
.driver-stats { display: flex; gap: 20px; }
.driver-stat { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--text-muted); }
.driver-stat strong { font-family: 'Titillium Web', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

/* ---------- Teams Grid ---------- */
.teams-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 40px 0; }
.team-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform 0.25s ease-out, box-shadow 0.25s ease-out; }
.team-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px var(--shadow-lg); }
.team-card-header { padding: 24px 28px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.team-card-header h2 { font-size: 1.4rem; margin: 0; }
.team-badge { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 6px; }
.team-card-body { padding: 24px 28px; }
.team-drivers { display: flex; gap: 24px; margin-bottom: 18px; }
.team-driver-info { flex: 1; }
.team-driver-info span { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.team-driver-info p { font-weight: 600; font-size: 1rem; margin-top: 2px; }
.team-stats-row { display: flex; gap: 28px; }
.team-stat { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--text-muted); }
.team-stat strong { font-family: 'Titillium Web', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--red); }

/* ---------- Calendar Grid ---------- */
.calendar-grid { display: flex; flex-direction: column; gap: 10px; padding: 40px 0; }
.calendar-item {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 20px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 24px; align-items: center;
  transition: transform 0.2s ease-out, border-color 0.2s;
}
.calendar-item:hover { transform: translateX(5px); border-color: rgba(225,6,0,0.2); }
.calendar-item.past { opacity: 0.55; }
.calendar-item.has-results { opacity: 0.82; }
.calendar-item.has-results:hover { opacity: 1; border-color: rgba(225,6,0,0.35); }
.calendar-winner { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; font-weight: 600; }
.calendar-resultlink { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--red); margin-top: 6px; }
.calendar-item.next {
  border-color: var(--red);
  box-shadow: 0 0 28px var(--red-glow), inset 0 0 24px rgba(225,6,0,0.03);
  background: linear-gradient(to right, rgba(225,6,0,0.07), var(--bg-card));
}
.calendar-round { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 1.6rem; text-align: center; color: var(--text-muted); line-height: 1; }
.calendar-item.next .calendar-round { color: var(--red); }
.calendar-info h2, .calendar-info h3 { font-size: 1.05rem; margin: 0; }
.calendar-info .calendar-circuit { font-size: 0.875rem; color: var(--text-secondary); margin-top: 2px; }
.calendar-date { text-align: right; font-family: 'Titillium Web', sans-serif; font-weight: 600; font-size: 1rem; color: var(--text-secondary); }
.calendar-item.next .calendar-date { color: var(--red); font-weight: 700; }
.calendar-weather { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- Analysis Grid ---------- */
.analysis-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding-bottom: 48px; }
.analysis-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.2s;
  cursor: pointer; position: relative; overflow: hidden;
}
.analysis-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--red); transform: scaleY(0); transform-origin: bottom; transition: transform 0.25s ease-out;
}
.analysis-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px var(--shadow-lg); border-color: rgba(225,6,0,0.15); }
.analysis-card:hover::before { transform: scaleY(1); }
.analysis-tag { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.analysis-card h3 { font-size: 1.25rem; margin-bottom: 10px; transition: color 0.2s; }
.analysis-card:hover h3 { color: var(--red); }
.analysis-card p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.65; }

/* ---------- Page visibility ---------- */
.page { display: none; }
.page.active { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 56px 0 28px; position: relative; }
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 30%, var(--red) 70%, transparent 100%);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer-logo { margin-bottom: 14px; font-family: 'Titillium Web', sans-serif; font-size: 1.4rem; font-weight: 700; }
.footer-col p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }
.footer-col h2 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 16px; color: var(--text-muted); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.9rem; color: var(--text-secondary); transition: color 0.2s, padding-left 0.2s; }
.footer-col ul a:hover { color: var(--red); padding-left: 4px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }
.disclaimer { font-size: 0.72rem !important; margin-top: 6px; }

/* ---------- Notification ---------- */
.notification { position: fixed; bottom: 28px; right: 28px; z-index: 3000; transform: translateY(140px); transition: transform 0.45s cubic-bezier(0.16,1,0.3,1); }
.notification.active { transform: translateY(0); }
.notification-content {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--red);
  border-radius: 14px; padding: 16px 20px;
  box-shadow: 0 12px 50px var(--shadow-xl), 0 0 0 1px rgba(225,6,0,0.1);
  max-width: 380px;
}
.notification-icon { font-size: 1.2rem; }
.notification-text { font-size: 0.875rem; flex: 1; }
.notification-close { font-size: 1.2rem; color: var(--text-muted); padding: 4px; transition: color 0.2s; }
.notification-close:hover { color: var(--text-primary); }

/* ---------- Team Colors ---------- */
.driver-card-header.red-bull    { background: linear-gradient(135deg, #111c36 0%, #1f4a9a 100%); }
.driver-card-header.ferrari     { background: linear-gradient(135deg, #6b0000 0%, #e8002d 100%); }
.driver-card-header.mclaren     { background: linear-gradient(135deg, #4d2600 0%, #ff8000 100%); }
.driver-card-header.mercedes    { background: linear-gradient(135deg, #082e26 0%, #1ac8a8 100%); }
.driver-card-header.aston-martin{ background: linear-gradient(135deg, #07281e 0%, #1a7a58 100%); }
.driver-card-header.alpine      { background: linear-gradient(135deg, #4a1838 0%, #ff6aaa 100%); }
.driver-card-header.williams    { background: linear-gradient(135deg, #0e2540 0%, #4aaede 100%); }
.driver-card-header.rb          { background: linear-gradient(135deg, #1a2050 0%, #5278e8 100%); }
.driver-card-header.audi        { background: linear-gradient(135deg, #0a0a0a 0%, #3a3a3a 100%); }
.driver-card-header.haas        { background: linear-gradient(135deg, #282828 0%, #9ca0a3 100%); }
.driver-card-header.cadillac    { background: linear-gradient(135deg, #05101e 0%, #1a3c72 100%); }
.team-card-header.red-bull      { border-left: 4px solid #3671C6; }
.team-card-header.ferrari       { border-left: 4px solid #E8002D; }
.team-card-header.mclaren       { border-left: 4px solid #FF8000; }
.team-card-header.mercedes      { border-left: 4px solid #27F4D2; }
.team-card-header.aston-martin  { border-left: 4px solid #229971; }
.team-card-header.alpine        { border-left: 4px solid #FF87BC; }
.team-card-header.williams      { border-left: 4px solid #64C4FF; }
.team-card-header.rb            { border-left: 4px solid #6692FF; }
.team-card-header.audi          { border-left: 4px solid #b0b0b0; }
.team-card-header.haas          { border-left: 4px solid #B6BABD; }
.team-card-header.cadillac      { border-left: 4px solid #2a5fc0; }

/* Calendar sprint badge */
.calendar-sprint-badge {
  display: inline-block;
  font-family: 'Titillium Web', sans-serif; font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(225,6,0,0.12); color: #7a1024;
  border: 1px solid rgba(225,6,0,0.3);
  padding: 2px 7px; border-radius: 3px; margin-left: 8px;
  vertical-align: middle;
}

/* ---------- Category Colors ---------- */
.news-card[data-category="reglement"] .card-tag,
.news-list-item[data-category="reglement"] .card-tag { background: #2563eb; box-shadow: 0 2px 10px rgba(37,99,235,0.5); }
.news-card[data-category="transferts"] .card-tag,
.news-list-item[data-category="transferts"] .card-tag { background: #d97706; box-shadow: 0 2px 10px rgba(217,119,6,0.5); }
.news-card[data-category="technique"] .card-tag,
.news-list-item[data-category="technique"] .card-tag { background: #0891b2; box-shadow: 0 2px 10px rgba(8,145,178,0.5); }

.news-card[data-category="reglement"] .news-card-image,
.news-list-item[data-category="reglement"] .news-list-image {
  background: linear-gradient(135deg, #050a1e 0%, #0d1f4a 55%, #060f2c 100%);
}
.news-card[data-category="reglement"] .news-card-image::after,
.news-list-item[data-category="reglement"] .news-list-image::after {
  background: linear-gradient(to top, rgba(37,99,235,0.3), transparent);
}
.news-card[data-category="transferts"] .news-card-image,
.news-list-item[data-category="transferts"] .news-list-image {
  background: linear-gradient(135deg, #140800 0%, #3a1c00 55%, #1a0c00 100%);
}
.news-card[data-category="transferts"] .news-card-image::after,
.news-list-item[data-category="transferts"] .news-list-image::after {
  background: linear-gradient(to top, rgba(217,119,6,0.3), transparent);
}
.news-card[data-category="technique"] .news-card-image,
.news-list-item[data-category="technique"] .news-list-image {
  background: linear-gradient(135deg, #001212 0%, #002c2c 55%, #001a1a 100%);
}
.news-card[data-category="technique"] .news-card-image::after,
.news-list-item[data-category="technique"] .news-list-image::after {
  background: linear-gradient(to top, rgba(8,145,178,0.3), transparent);
}

/* ---------- Driver Card Enhancements ---------- */
.driver-card-header::before {
  content: ''; position: absolute; top: 0; right: -8px;
  width: 45%; height: 100%;
  background: rgba(255,255,255,0.05);
  transform: skewX(-14deg); pointer-events: none;
}
.driver-flag { font-size: 0.85rem; vertical-align: middle; margin-left: 2px; }
.driver-nat { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.04em; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .standings-preview { grid-template-columns: 1fr; gap: 24px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .drivers-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .leaderboard-podium { grid-template-columns: 1fr 1fr 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--header-bg); flex-direction: column; padding: 12px 20px;
    border-bottom: 1px solid var(--border); backdrop-filter: blur(24px);
  }
  .nav-links.active { display: flex; }
  .mobile-menu-btn { display: flex; }
  .user-name-short { display: none; }
  .hero-main h1 { font-size: 1.9rem; }
  .hero-side { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat-item:nth-child(2n) { border-right: none; }
  .stats-grid .stat-item:nth-child(1),
  .stats-grid .stat-item:nth-child(2) { border-bottom: 1px solid var(--border); }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { display: block; grid-column: 1; }
  .news-card.featured .news-card-image { height: 200px; min-height: 200px; }
  .news-card.featured .news-card-body { padding: 20px; }
  .news-list-item { grid-template-columns: 1fr; }
  .news-list-image { min-height: 120px; }
  .rumors-grid { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: 1fr; }
  .drivers-grid { grid-template-columns: repeat(2, 1fr); }
  .teams-grid { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .calendar-item { grid-template-columns: 50px 1fr; }
  .calendar-date { grid-column: 2; text-align: left; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 2.2rem; }
  .leaderboard-podium { grid-template-columns: 1fr; }
  .pred-form-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 28px; margin: 10px; }
  .modal-article { padding: 28px; }
  .section { padding: 40px 0; }
  /* Tables scrollables sur mobile */
  .standings-table.full,
  .results-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Section header compacte */
  .section-header { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  .hero-main { padding: 24px; }
  .hero-main h1 { font-size: 1.5rem; }
  .drivers-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .page-hero h1 { font-size: 1.8rem; }
}

/* ---------- Animations ---------- */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ---------- Countdown ---------- */
.countdown-mini {
  font-family: 'Titillium Web', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.05em;
  margin-top: 4px;
  line-height: 1;
}

.calendar-countdown {
  font-family: 'Titillium Web', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ============================================
   v2.1 POLISH LAYER
   ============================================ */

/* ── Header micro-polish: progress hairline under nav on scroll ── */
.main-nav { transition: box-shadow var(--dur-mid) var(--ease-out), background var(--dur-mid); }
body.is-scrolled .main-nav { box-shadow: 0 6px 30px var(--shadow-lg); }

/* ── Logo: subtle speed accent ── */
.logo { transition: transform var(--dur-fast) var(--ease-out); }
.logo:hover { transform: translateX(1px); }
.logo:active { transform: scale(0.97); }

/* ── Stat value fluid + lively ── */
.stat-value { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.55rem); }
.stat-item { transition: background var(--dur-fast); }
.stat-item:hover { background: var(--bg-card); }

/* ── Countdown: structured units ── */
.countdown-mini { display: inline-flex; gap: 6px; align-items: baseline; }
.countdown-unit { display: inline-flex; align-items: baseline; gap: 1px; }
.countdown-unit b { font-size: 1rem; font-weight: 700; }
.countdown-unit i { font-style: normal; font-size: 0.62rem; opacity: 0.7; font-weight: 600; }
.countdown-live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green); font-weight: 700;
}
.countdown-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 0 rgba(22,163,74,0.6);
  animation: livePulse 1.6s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.55); }
  100% { box-shadow: 0 0 0 9px rgba(22,163,74,0); }
}

/* ── Season progress bar ── */
.season-progress {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 8px 16px; padding: 14px 0 0;
}
.season-progress-label {
  grid-column: 1 / -1;
  font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: baseline;
}
.season-progress-label .spct { color: var(--red); }
.season-progress-track {
  grid-column: 1 / -1;
  height: 6px; border-radius: var(--r-pill);
  background: var(--bg-secondary); overflow: hidden;
  border: 1px solid var(--border-light);
}
.season-progress-fill {
  height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--red-dark), var(--red), var(--red-bright));
  box-shadow: 0 0 12px var(--red-glow);
  width: 0; transition: width 1.1s var(--ease-out);
}

/* ── Card press feedback (scale on tap) ── */
.news-card, .news-list-item, .driver-card, .team-card,
.analysis-card, .hero-card, .calendar-item, .podium-card, .rumor-card, .social-card {
  will-change: transform;
}
.news-card:active, .driver-card:active, .team-card:active,
.analysis-card:active, .podium-card:active { transform: translateY(-2px) scale(0.992); }
.hero-main:active { transform: scale(0.995); }

/* ── Skeleton loaders ── */
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skel-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.skel-card .skel-img { height: 200px; }
.skel-card .skel-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.skel-line { height: 12px; border-radius: 6px; }
.skel-line.w-40 { width: 40%; } .skel-line.w-70 { width: 70%; }
.skel-line.w-90 { width: 90%; } .skel-line.title { height: 18px; width: 85%; }
.skeleton,
.skel-img, .skel-line {
  background: linear-gradient(100deg, var(--skeleton-base) 30%, var(--skeleton-shine) 50%, var(--skeleton-base) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (max-width: 1024px) { .skeleton-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .skeleton-grid { grid-template-columns: 1fr; } }

/* ── Back-to-top FAB ── */
.back-to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: var(--z-fab);
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff;
  box-shadow: 0 8px 28px rgba(225,6,0,0.45);
  opacity: 0; transform: translateY(16px) scale(0.8); pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-spring), background var(--dur-fast);
}
.back-to-top.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { background: var(--red-dark); transform: translateY(-2px) scale(1.05); }
.back-to-top:active { transform: scale(0.92); }
[dir="rtl"] .back-to-top { right: auto; left: 26px; }
@media (max-width: 768px) { .back-to-top { bottom: 18px; right: 18px; width: 44px; height: 44px; } }

/* ── Leaderboard: sub-selector + "me" highlight ── */
.lb-controls { margin: -8px 0 22px; }
.lb-controls:empty { margin: 0; }
.lb-select {
  padding: 10px 38px 10px 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--input-border); background: var(--input-bg);
  font-family: 'Titillium Web', sans-serif; font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.02em; cursor: pointer; min-width: 240px; max-width: 100%;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.lb-select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.standings-table tr.is-me { background: rgba(225,6,0,0.07) !important; }
.standings-table tr.is-me td { font-weight: 600; }
.standings-table tr.is-me td:first-child { color: var(--red); }
.you-tag {
  font-family: 'Titillium Web', sans-serif; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--red); color: #fff; padding: 1px 6px;
  border-radius: 4px; margin-left: 8px; vertical-align: middle;
}
.lb-empty { padding: 32px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* ── Mobile nav: animated slide-in ── */
@media (max-width: 768px) {
  .nav-links {
    transform: translateY(-8px); opacity: 0;
    transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out);
    gap: 4px; box-shadow: 0 18px 40px var(--shadow-lg);
    background: var(--bg-primary);
    backdrop-filter: blur(24px) saturate(180%);
    padding-bottom: 16px;
  }
  .nav-links.active { transform: translateY(0); opacity: 1; }
  .nav-links a { padding: 12px 14px; min-height: 44px; display: flex; align-items: center; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { border-left: 3px solid var(--red); padding-left: 11px; }
}

/* ── Refined focus ring for keyboard users ── */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.news-card:focus-visible, .driver-card:focus-visible, .team-card:focus-visible,
.analysis-card:focus-visible, .hero-card:focus-visible, .calendar-item:focus-visible,
.hero-main:focus-visible { outline-offset: 4px; }

/* ── Article modal readability ── */
.article-detail-body { max-width: 68ch; }
.article-detail-img {
  width: 100%; max-height: 360px; object-fit: cover;
  border-radius: 14px; margin: 4px 0 22px; display: block;
  background: var(--bg-secondary);
}
.article-detail-tag .live-dot { background: var(--red); }

/* ── LIVE F1 NEWS FEED ── */
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: livePulseW 1.8s ease-out infinite;
}
.section-header .live-dot { background: var(--red); box-shadow: 0 0 0 0 var(--red-glow); }
@keyframes livePulseW {
  0% { box-shadow: 0 0 0 0 rgba(225,6,0,0.55); }
  100% { box-shadow: 0 0 0 8px rgba(225,6,0,0); }
}
.live-heading { display: inline-flex; align-items: center; gap: 10px; }
.live-updated { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

.news-card.live .news-card-image { background-size: cover; background-position: center; }
.news-card.live .news-card-image::after {
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%);
}
.news-card.live .card-tag.live {
  display: inline-flex; align-items: center;
  background: rgba(6,6,15,0.82); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.18);
}
.news-card.live .ext-icon {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,6,15,0.7); color: #fff; backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}
.news-card.live:hover .ext-icon { opacity: 1; transform: translateY(0); }
.news-card.live .news-card-body h3 {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.live-status {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 0.9rem; padding: 28px 0;
}
.live-status .x-spinner { width: 18px; height: 18px; }
.live-sources-note {
  margin-top: 18px; font-size: 0.78rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.live-sources-note b { color: var(--text-secondary); font-weight: 600; }
.live-news-section.is-empty { display: none; }

/* ════════ NAV "PLUS" DROPDOWN ════════ */
.nav-more { position: relative; }
.nav-more-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Titillium Web', sans-serif; font-size: 0.9rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 8px 12px; border-radius: 6px; color: var(--text-secondary);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-more-btn:hover { color: var(--text-primary); background: var(--bg-secondary); }
.nav-more-btn svg { transition: transform var(--dur-fast); }
.nav-more.open .nav-more-btn { color: var(--red); background: rgba(225,6,0,0.08); }
.nav-more.open .nav-more-btn svg { transform: rotate(180deg); }
.nav-more-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 16px 40px var(--shadow-lg);
  min-width: 200px; padding: 6px; z-index: 200;
}
.nav-more.open .nav-more-menu { display: block; animation: ddIn var(--dur-fast) var(--ease-out); }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.nav-more-menu a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-family: 'Titillium Web', sans-serif; font-weight: 600; font-size: 0.9rem;
  color: var(--text-secondary); transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-more-menu a:hover { background: var(--bg-secondary); color: var(--red); }
@media (max-width: 768px) {
  .nav-more-menu { position: static; display: block; box-shadow: none; border: none; background: none; min-width: 0; padding: 0; margin-left: 12px; }
  .nav-more-btn { display: none; }
}

/* ════════ TECHNIQUE 2026 ════════ */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding: 40px 0 56px; }
.tech-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 24px 22px; cursor: pointer; overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur-fast);
}
.tech-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out); }
.tech-card:hover { transform: translateY(-5px); box-shadow: 0 18px 48px var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.tech-card:hover::before { transform: scaleX(1); }
.tech-tag { display: inline-block; font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px; }
.tech-card h3 { font-size: 1.25rem; margin-bottom: 10px; line-height: 1.2; }
.tech-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }
.tech-more { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.82rem; color: var(--accent); }

/* ════════ HISTOIRE ════════ */
.champions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding: 8px 0 56px; }
.champion-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-top: 3px solid var(--accent); border-radius: 14px; padding: 24px; cursor: pointer; overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur);
}
.champion-card:hover { transform: translateY(-5px); box-shadow: 0 16px 44px var(--shadow-lg); }
.champion-titles { position: absolute; top: 14px; right: 18px; font-family: 'Titillium Web', sans-serif; font-weight: 900; font-size: 2.4rem; color: var(--accent); line-height: 1; opacity: 0.9; }
.champion-titles span { font-size: 0.9rem; vertical-align: super; }
.champion-card h2, .champion-card h3 { font-size: 1.2rem; margin-bottom: 4px; padding-right: 50px; }
.champion-era { font-family: 'Titillium Web', sans-serif; font-weight: 600; font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.04em; margin-bottom: 12px; }
.champion-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

.timeline { position: relative; padding: 16px 0 56px 0; margin-left: 8px; }
.timeline::before { content: ''; position: absolute; left: 78px; top: 0; bottom: 56px; width: 2px; background: var(--border); }
.timeline-item { position: relative; display: grid; grid-template-columns: 78px 1fr; gap: 24px; padding: 12px 0; cursor: pointer; align-items: start; }
.timeline-year { font-family: 'Titillium Web', sans-serif; font-weight: 900; font-size: 1.15rem; color: var(--accent); text-align: right; padding-top: 14px; }
.timeline-item::before { content: ''; position: absolute; left: 72px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-primary); z-index: 1; transition: transform var(--dur-fast); }
.timeline-item:hover::before { transform: scale(1.3); }
.timeline-body { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast); }
.timeline-item:hover .timeline-body { transform: translateX(5px); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.timeline-body h2, .timeline-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.timeline-body p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55; }

/* ════════ GUIDE SPECTATEUR ════════ */
.guide-tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 8px 0 16px; }
.guide-tip { display: flex; gap: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast); }
.guide-tip:hover { transform: translateY(-3px); box-shadow: 0 10px 30px var(--shadow); }
.guide-tip-icon { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.guide-tip h3 { font-size: 1.05rem; margin-bottom: 6px; }
.guide-tip p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.55; }
.guide-circuits { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding: 8px 0 56px; }
.guide-circuit { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 14px; padding: 22px; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast); }
.guide-circuit:hover { transform: translateY(-4px); box-shadow: 0 14px 38px var(--shadow-lg); }
.guide-circuit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.guide-flag { font-size: 1.5rem; }
.guide-circuit-head h3 { font-size: 1.2rem; }
.guide-corner { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.82rem; color: var(--text-primary); margin-bottom: 10px; }
.guide-circuit p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* ════════ FAN ZONE ════════ */
.fanzone-top { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 40px 0 8px; }
.fz-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 26px; }
.fz-head { margin-bottom: 18px; }
.fz-kicker { display: inline-block; font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--red); margin-bottom: 6px; }
.fz-head h2, .fz-head h3 { font-size: 1.25rem; line-height: 1.2; margin: 0; }
.fz-poll-options { display: flex; flex-direction: column; gap: 9px; }
.fz-vote-btn { text-align: left; padding: 13px 16px; border-radius: 10px; border: 1.5px solid var(--input-border); background: var(--input-bg); font-weight: 500; transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast); }
.fz-vote-btn:hover { border-color: var(--red); background: rgba(225,6,0,0.06); transform: translateX(3px); }
.fz-bar { position: relative; padding: 11px 16px; border-radius: 10px; background: var(--bg-secondary); border: 1px solid var(--border); overflow: hidden; display: flex; align-items: center; }
.fz-bar.mine { border-color: var(--red); }
.fz-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(225,6,0,0.16); transition: width 0.6s var(--ease-out); }
.fz-bar.mine .fz-bar-fill { background: rgba(225,6,0,0.28); }
.fz-bar-label { position: relative; font-size: 0.9rem; font-weight: 500; }
.fz-bar-pct { position: relative; margin-left: auto; font-family: 'Titillium Web', sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.fz-poll-foot { margin-top: 14px; font-size: 0.8rem; color: var(--text-muted); }
.fz-quiz-intro { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 18px; }
.fz-quiz-options { display: flex; flex-direction: column; gap: 9px; }
.fz-quiz-opt { text-align: left; padding: 13px 16px; border-radius: 10px; border: 1.5px solid var(--input-border); background: var(--input-bg); font-weight: 500; transition: all var(--dur-fast); }
.fz-quiz-opt:hover:not(:disabled) { border-color: var(--red); transform: translateX(3px); }
.fz-quiz-opt.correct { border-color: var(--green); background: rgba(22,163,74,0.14); color: var(--green); font-weight: 600; }
.fz-quiz-opt.wrong { border-color: var(--red); background: rgba(225,6,0,0.12); color: var(--red); }
.fz-quiz-score { font-family: 'Titillium Web', sans-serif; font-weight: 900; font-size: 3.4rem; color: var(--red); line-height: 1; margin: 6px 0; }
.fz-quiz-score span { font-size: 1.3rem; color: var(--text-muted); margin-left: 6px; }
.fz-quiz-msg { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 18px; }
.fz-wall-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.fz-wall-form input { flex: 1; min-width: 140px; padding: 12px 16px; border-radius: 10px; border: 1.5px solid var(--input-border); background: var(--input-bg); outline: none; transition: border-color var(--dur-fast); }
.fz-wall-form input:focus { border-color: var(--red); }
.fz-wall-form #fzMsg { flex: 2 1 260px; }
.fz-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding-bottom: 56px; }
.fz-msg { display: flex; gap: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.fz-msg-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--red); color: #fff; font-family: 'Titillium Web', sans-serif; font-weight: 900; }
.fz-msg-body strong { font-size: 0.92rem; }
.fz-msg-body p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; margin-top: 3px; word-break: break-word; }
@media (max-width: 768px) { .fanzone-top { grid-template-columns: 1fr; } .timeline::before { left: 58px; } .timeline-item { grid-template-columns: 58px 1fr; gap: 14px; } .timeline-item::before { left: 52px; } }

/* ── Skeleton loaders (live feed) ── */
.news-card.skeleton { cursor: default; pointer-events: none; }
.news-card.skeleton .news-card-image { height: 200px; }
.sk-line { height: 13px; border-radius: 6px; margin-bottom: 10px; }
.sk-line.sk-sm { height: 10px; margin-top: 16px; }
.sk-shimmer {
  position: relative; overflow: hidden;
  background: var(--bg-secondary);
}
.sk-shimmer::after {
  content: ''; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: skShimmer 1.4s ease-in-out infinite;
}
@keyframes skShimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .sk-shimmer::after { animation: none; } }

/* ============================================
   v2.2 — Texture, brand-tinted depth & choreographed motion
   ============================================ */

/* Subtle film grain across the whole page — breaks digital flatness.
   Sits above content but below header/modals so UI chrome stays crisp. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 60;
  pointer-events: none; opacity: 0.028; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
body.dark-mode::after { opacity: 0.05; }

/* Brand-tinted elevation: hovered cards lift with a faint F1-red glow
   instead of a flat black shadow. */
.news-card:hover,
.driver-card:hover,
.analysis-card:hover,
.team-card:hover,
.podium-card:hover {
  box-shadow: 0 22px 52px var(--shadow-lg), 0 6px 22px rgba(225, 6, 0, 0.16);
}
.news-card.live:hover { border-color: rgba(225, 6, 0, 0.32); }

/* Live-feed cards: gentle image push-in on hover for a tactile feel */
.news-card.live .news-card-image { transition: transform var(--dur-mid) var(--ease-out); }
.news-card.live:hover .news-card-image { transform: scale(1.04); }

/* Choreographed entry — grid children cascade in instead of popping
   together. Pairs with the existing .fade-in IntersectionObserver. */
.news-grid > .fade-in,
.drivers-grid > .fade-in,
.analysis-grid > .fade-in,
.teams-grid > .fade-in { transition-delay: 0ms; }
.news-grid > .fade-in:nth-child(2),
.drivers-grid > .fade-in:nth-child(2),
.analysis-grid > .fade-in:nth-child(2),
.teams-grid > .fade-in:nth-child(2) { transition-delay: 55ms; }
.news-grid > .fade-in:nth-child(3),
.drivers-grid > .fade-in:nth-child(3),
.analysis-grid > .fade-in:nth-child(3),
.teams-grid > .fade-in:nth-child(3) { transition-delay: 110ms; }
.news-grid > .fade-in:nth-child(4),
.drivers-grid > .fade-in:nth-child(4),
.analysis-grid > .fade-in:nth-child(4),
.teams-grid > .fade-in:nth-child(4) { transition-delay: 165ms; }
.news-grid > .fade-in:nth-child(5),
.drivers-grid > .fade-in:nth-child(5),
.analysis-grid > .fade-in:nth-child(5),
.teams-grid > .fade-in:nth-child(5) { transition-delay: 220ms; }
.news-grid > .fade-in:nth-child(6),
.drivers-grid > .fade-in:nth-child(6),
.analysis-grid > .fade-in:nth-child(6),
.teams-grid > .fade-in:nth-child(6) { transition-delay: 275ms; }
.news-grid > .fade-in:nth-child(n+7),
.drivers-grid > .fade-in:nth-child(n+7),
.analysis-grid > .fade-in:nth-child(n+7),
.teams-grid > .fade-in:nth-child(n+7) { transition-delay: 320ms; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
.gs-state { padding: 28px 18px; border: 1px solid var(--border); border-radius: 14px; text-align: center; color: var(--text-secondary); margin: 16px 0; }
.gs-error { border-color: rgba(225,6,0,.35); }
.gs-hint { font-size: .85rem; color: var(--text-muted); margin-top: 8px; }
.gs-skel { padding: 12px 0; }
.gs-skel-line { height: 14px; background: var(--skeleton-base); border-radius: 8px; margin: 10px 0; }
[data-datasource] { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .75rem; color: var(--text-muted); margin: 12px 0 4px; }
.ds-ok { color: #0e5c2c; }
.dark-mode .ds-ok { color: #8fd4a8; }
.ds-stale { color: #d97706; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); }
.status-confirmed, .status-official { background: rgba(22,163,74,.12); }
.status-rumor { background: rgba(217,119,6,.12); }
.status-unconfirmed { background: rgba(255,255,255,.06); }
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000; background: var(--bg-card); border-top: 1px solid var(--border); padding: 16px; color: var(--text); }
.cookie-inner { max-width: 960px; margin: 0 auto; }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.cookie-choice {
  min-height: 44px; width: 100%; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 4px;
}
.cookie-customise, .cookie-links { display: block; margin-top: 10px; background: none; border: 0; color: var(--text-muted); text-decoration: underline; cursor: pointer; font-size: 0.9rem; min-height: 44px; }
.cookie-custom { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cookie-note { font-size: 0.85rem; color: var(--text-muted); }
#legalContent h1 { font-size: 1.8rem; margin-bottom: 16px; }
#legalContent h2 { font-size: 1.15rem; margin: 24px 0 8px; }
#legalContent p, #legalContent li { line-height: 1.55; margin-bottom: 10px; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.privacy-rectify { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.btn-danger { min-height: 44px; background: transparent; border: 1px solid var(--red); color: var(--red); cursor: pointer; padding: 8px 14px; }
.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 80; }
body.nav-open { overflow: hidden; }
.btn-register { background: transparent; border: 1px solid var(--border); }
.breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: 16px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.rumor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
@media (max-width: 768px) {
  .standings-table.full th:nth-child(3), .standings-table.full td:nth-child(3),
  .standings-table.full th:nth-child(5), .standings-table.full td:nth-child(5),
  .standings-table.full th:nth-child(6), .standings-table.full td:nth-child(6) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav-actions .btn-register { display: none; }
}

