/* GridStop editorial layer — motorsport press, not SaaS template */

:root {
  --ink: #0c0c0e;
  --paper: #ece8e1;
  --graphite: #161618;
  --rule: #2a2a2c;
  --muted: #8a8680;
  --red: #c8102e;
  --red-dark: #9a0c22;
  --ok: #3d7a4a;
  --warn: #b56a1a;
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 6px;
  --r-xl: 8px;
  --r-pill: 4px;
  --elev-1: none;
  --elev-2: none;
  --elev-3: none;
  --elev-4: none;
  --red-glow: transparent;
  --hero-gradient: #0c0c0e;
  --page-hero-gradient: #0c0c0e;
  --bg-primary: #ece8e1;
  --bg-secondary: #e4dfd6;
  --bg-card: #f7f4ee;
  --text-primary: #0c0c0e;
  --text-secondary: #3a3834;
  --text-muted: #5c5852;
  --border: #d4cfc6;
  --font-display: "Titillium Web", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-data: Inter, ui-sans-serif, system-ui, sans-serif;
}

.dark-mode {
  --red-ink: #ffb4b4;
  --bg-primary: #0c0c0e;
  --bg-secondary: #121214;
  --bg-card: #121214;
  --bg-card-hover: #1a1a1c;
  --text-primary: #ece8e1;
  --text-secondary: #c4bfb6;
  --text-muted: #8a8680;
  --border: #2a2a2c;
  --border-light: #222;
  --header-bg: #0c0c0e;
  --modal-bg: #121214;
  --input-bg: #161618;
  --tag-bg: transparent;
}

html, body { overflow-x: clip; }
[hidden] { display: none !important; }
.header-top:not(:has(.breaking-ticker:not([hidden]))) { display: none; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  letter-spacing: 0;
  font-size: 17px;
  line-height: 1.55;
}
h1, h2, h3, h4,
.logo, .btn-primary, .btn-secondary, .btn-auth, .see-all, .read-more,
.nav-links a, .stat-value, .calendar-round, .ticker-label,
.hero-badge, .card-tag, .page-hero h1 {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: -0.015em;
}
.ticker-label, .hero-badge, .card-tag, .status-badge, .rumor-badge,
.calendar-sprint-badge {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
input, select, textarea { font-family: var(--font-body); }

.container { max-width: 1180px; padding: 0 18px; }

/* Buttons: media, not pills */
.btn-primary,
.btn-auth {
  border-radius: 2px;
  box-shadow: none;
  padding: 8px 16px;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}
.btn-primary::after { display: none; }
.btn-primary:hover,
.btn-auth:hover {
  transform: none;
  box-shadow: none;
  background: var(--red-dark);
}
.btn-secondary {
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}
.btn-register {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: none;
}

.main-nav {
  backdrop-filter: none;
  box-shadow: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}
.nav-inner { height: 56px; }
.logo { font-size: 1.45rem; letter-spacing: 0.08em; font-weight: 800; }
.nav-more-btn,
.nav-more-menu a {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.nav-links a {
  border-radius: 0;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: none;
  padding: 18px 10px;
}
.nav-links a.active { background: transparent; }
.nav-links a.active::after {
  left: 10px; right: 10px; width: auto; transform: none; bottom: 0; height: 2px;
}
.search-toggle, .theme-toggle, .lang-btn, .install-btn {
  border-radius: 2px;
}
.user-avatar { border-radius: 2px; box-shadow: none; }
.dropdown-menu, .lang-dropdown {
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}

.header-top { background: var(--red); }
.ticker-label {
  background: #000;
  border-radius: 0;
  letter-spacing: 0.18em;
}

/* Hero: photo + type, no glass cards */
.hero {
  background: #0c0c0e;
  padding: 0;
  overflow: hidden;
}
.hero::before, .hero::after { display: none; }
.hero .container { max-width: 1180px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.9fr);
  gap: 0;
  min-height: min(72vh, 640px);
  border-bottom: 1px solid var(--border);
}
.hero-main {
  margin: 0;
  padding: 48px 36px 40px;
  border-radius: 0;
  background-color: #0c0c0e;
  background-size: cover;
  background-position: center 30%;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  justify-content: flex-end;
  min-height: 420px;
}
.hero-main.has-photo {
  background-color: #111;
}
.hero-main.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,12,14,.92) 0%, rgba(12,12,14,.35) 45%, rgba(12,12,14,.15) 100%);
  pointer-events: none;
}
.hero-main > * { position: relative; z-index: 1; }
.hero-main::before { display: none; }
.hero-main:hover { background-color: #0c0c0e; box-shadow: none; transform: none; }
.hero-badge {
  background: transparent;
  color: #ffb4b4;
  border: 0;
  box-shadow: none;
  padding: 0;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  margin-bottom: 12px;
}
.hero-main h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  line-height: 1.12;
  max-width: 22ch;
}
.hero-main p { max-width: 46ch; color: #c4bfb6; }
.read-more {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.hero-side {
  border-left: 1px solid var(--border);
  gap: 0;
  background: #121214;
}
.hero-grid > * { min-width: 0; }
.hero-card {
  flex: none;
  min-width: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 20px 22px;
  overflow: visible;
}
.hero-card::after { display: none; }
.hero-card:hover { background: #1a1a1c; transform: none; }
.hero-card-tag,
.hero .read-more { color: #ffb4b4; }
.hero-card h2 {
  font-size: 1.15rem;
  text-transform: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: normal;
  overflow-wrap: break-word;
}
.hero .article-meta { color: #8a8680; }

/* Timing board — always dark, always light type (theme-independent) */
.stats-bar {
  background: #0c0c0e;
  color: #ece8e1;
  border-bottom: 1px solid #2a2a2c;
  border-top: 3px solid var(--red);
}
.stats-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.9fr;
}
.stat-item {
  text-align: left;
  padding: 16px 18px;
  border-right: 1px solid #2a2a2c;
  gap: 2px;
  color: #ece8e1;
}
.stat-item:last-child { border-right: 0; }
.stats-bar .stat-label {
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #8a8680;
}
.stats-bar .stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #ece8e1;
  line-height: 1.15;
}
.stats-bar .stat-sub { color: #8a8680; }
.stats-bar .countdown-mini { color: #ffb4b4; }
.season-progress { display: none; }

.section { padding: 36px 0 40px; }
.section-alt { background: var(--bg-secondary); }
.section-header { margin-bottom: 18px; align-items: baseline; }
.section-header h2 {
  padding-left: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  text-transform: none;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.section-header h2::before { display: none; }
.see-all {
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #7a1024;
}
.see-all:hover { gap: 4px; }

/* News: lead + briefs, not 3 equal cards */
#liveNewsHome.news-grid,
.news-masthead {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px 40px;
  align-items: start;
}
.news-lead {
  display: block;
  color: inherit;
}
.news-lead .news-card-image {
  height: min(42vw, 380px);
  border-radius: 2px;
  background-size: cover;
  background-position: center;
}
.news-lead h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  text-transform: none;
  letter-spacing: -0.015em;
  margin-top: 12px;
  line-height: 1.2;
  font-weight: 700;
}
.news-briefs { display: flex; flex-direction: column; }
.news-brief {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
}
.news-brief:first-child { padding-top: 0; }
.news-brief-img {
  height: 64px;
  background-size: cover;
  background-position: center;
  background: #1a1a1c;
}
.news-brief h3 {
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.25;
  font-family: var(--font-body);
}
.news-brief .article-meta { margin-top: 6px; }

.news-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}
.news-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
.news-card-image {
  height: 160px;
  border-radius: 2px;
  background: #1a1a1c;
  background-size: cover;
  background-position: center;
}
.news-card-image::before,
.news-card-image::after { display: none; }
.news-card-body { padding: 12px 0 20px; }
#liveNewsPage.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

/* Tables: timing sheet */
.standings-table, .results-table {
  border: 1px solid var(--border);
  background: transparent;
}
.standings-table th, .results-table th {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
  background: transparent;
  border-bottom: 1px solid var(--red);
}
.standings-preview {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
}
.standings-col { background: transparent; border: 0; padding: 0; }

.home-desk {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}
.home-desk .standings-preview {
  grid-template-columns: 1fr;
  gap: 28px;
}

.page-hero {
  background: #0c0c0e;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
}
.page-hero::before, .page-hero::after { display: none; }
.page-hero h1 {
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 700;
}

.driver-card, .team-card, .calendar-item, .analysis-card, .social-card {
  border-radius: 2px;
  box-shadow: none;
}
.calendar-item.next {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.fade-in { opacity: 1 !important; transform: none !important; transition: none !important; }

.site-footer {
  border-top: 1px solid var(--border);
  background: #0c0c0e;
  color: #c4bfb6;
}
.site-footer .footer-col p,
.site-footer .footer-col ul a,
.site-footer .footer-bottom p { color: #c4bfb6; }
.site-footer .footer-col h2 { color: #8a8680; }
.site-footer .footer-col ul a:hover { color: #ffb4b4; }
.cookie-banner {
  background: var(--bg-card);
  border-top: 2px solid var(--red);
  color: var(--text);
  max-height: 42vh;
  overflow: auto;
}
body.has-cookie-banner { scroll-padding-bottom: 42vh; }

@media (max-width: 900px) {
  .hero-grid, #liveNewsHome.news-grid, .news-masthead,
  .standings-preview, .home-desk, #liveNewsPage.news-grid {
    grid-template-columns: 1fr;
  }
  .hero-side { border-left: 0; border-top: 1px solid var(--border); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-item { border-bottom: 1px solid var(--border); }
  .news-brief { grid-template-columns: 72px 1fr; }
  .hero-main { min-height: 320px; padding: 28px 18px; }
  .hero-main h1 { font-size: 2.1rem; max-width: none; }
}

.page-article .container,
.page-about .container {
  max-width: 740px;
}
.page-article h1,
.page-about h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
}
.page-article .article-detail-body,
.page-about .container p {
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 62ch;
}
.page-article .article-detail-body p + p,
.page-about .container p + p { margin-top: 1em; }
.page-article h2 { margin: 1.6em 0 0.4em; font-size: 1.25rem; }

.edition-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  margin: 8px 0 28px;
  border-top: 3px solid var(--red);
}
.edition-rail a {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.edition-rail a strong { display: block; font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -0.02em; }
.edition-kicker, .wire-kicker {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--red);
  margin: 18px 0 8px;
}
.wire-block {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.tech-card {
  border-radius: 0;
  box-shadow: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transform: none;
}
.tech-card:hover { transform: none; box-shadow: none; }
.tech-card h2 { font-size: 1.35rem; margin: 6px 0 8px; }

@media (max-width: 900px) {
  .edition-rail { grid-template-columns: 1fr; }
}

.dark-mode .ticker-label,
.dark-mode .nav-links a.active,
.dark-mode .hero-badge,
.dark-mode .hero-card-tag,
.dark-mode .read-more,
.dark-mode .see-all,
.dark-mode .edition-kicker,
.dark-mode .wire-kicker,
.dark-mode .tech-tag,
.dark-mode .countdown-mini,
.dark-mode .form-error,
.dark-mode .article-detail-tag,
.dark-mode .article-detail-source a,
.dark-mode .fz-kicker,
.dark-mode .calendar-resultlink,
.dark-mode .pred-deadline.closed,
.dark-mode .logout-btn,
.dark-mode .lang-item.lang-active,
.dark-mode .install-btn,
.dark-mode .search-result-tag,
.dark-mode .btn-danger,
.dark-mode .td-pts,
.dark-mode .lastgp-rpts,
.dark-mode .scoring-grid strong,
.dark-mode .footer-col ul a:hover,
.dark-mode .nav-more.open .nav-more-btn,
.dark-mode .nav-more-menu a:hover,
.dark-mode .calendar-sprint-badge {
  color: var(--red-ink);
}
.page-legal h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; margin-bottom: 12px; }
.page-legal h2 { margin: 1.4em 0 0.4em; font-size: 1.2rem; }
.page-legal p, .page-legal li { max-width: 62ch; line-height: 1.6; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.nav-auth-mobile { display: none; }
.nav-auth-link {
  background: none;
  color: inherit;
  width: 100%;
  text-align: left;
  min-height: 44px;
  padding: 12px 14px;
  font: inherit;
}
@media (max-width: 768px) {
  .nav-actions .btn-auth { display: none !important; }
  .nav-links.active .nav-auth-mobile { display: block; }
}

@media (max-width: 430px) {
  .stats-grid { grid-template-columns: 1fr; }
  .section { padding: 24px 0; }
  .news-brief { grid-template-columns: 1fr; }
  .news-brief-img { display: none; }
}
