:root {
  color-scheme: dark;
  --ink: #f7f7f8; --muted: #bdc0c9; --ground: #101114; --panel: #191b21;
  --line: #383a43; --red: #fa2042;
  font-family: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); }
a { color: inherit; text-underline-offset: 5px; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ff748a; outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 900; letter-spacing: -.04em; }
h1 { font-style: italic; }
img { display: block; max-width: 100%; }
.shell { width: min(100% - 48px, 1376px); margin-inline: auto; }
.skip { position: absolute; top: -90px; left: 16px; background: #fff; color: #101114; padding: 12px; z-index: 3; }
.skip:focus { top: 10px; }
.site-header { background: #111216; border-bottom: 2px solid #bd1631; }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { display: block; width: clamp(155px, 18vw, 216px); height: auto; }
nav { display: flex; align-items: center; gap: clamp(8px, 2.5vw, 30px); }
nav a { padding: 22px 3px 19px; border-bottom: 3px solid transparent; text-decoration: none; font-weight: 700; white-space: nowrap; }
nav a:hover, nav a[aria-current] { border-color: var(--red); }
.hero { background: #0c0d10; position: relative; isolation: isolate; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0 0 0 25%; background: linear-gradient(90deg, #0c0d10 0%, transparent 37%), url("assets/hero.webp") center right / cover no-repeat; }
.hero-inner { padding: clamp(48px, 6.3vw, 94px) 0; }
.hero h1 { position: relative; padding-left: 19px; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .84; width: max-content; text-shadow: 0 3px 18px #000; }
.hero h1::before { content: ""; position: absolute; inset: 2px auto 0 0; width: 6px; background: var(--red); transform: skewX(-11deg); }
.hero p { margin: 21px 0; font-size: clamp(1.08rem, 2vw, 1.55rem); font-weight: 700; text-shadow: 0 1px 8px #000; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 17px; border: 1px solid transparent; border-radius: 7px; font-weight: 750; text-decoration: none; }
.button.primary { background: #c81935; color: #fff; }
.button.primary:hover { background: #ed2342; }
.button.secondary { background: #15161bd9; border-color: #777a86; }
.button.secondary:hover, .filters button:hover { border-color: #f3f3f8; }
.posters { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); justify-content: center; gap: clamp(16px, 5vw, 52px); padding-block: 34px 44px; }
.posters h2 { margin-bottom: 11px; padding: 8px 12px; background: linear-gradient(115deg, #a90c23, #cc0c27); border-radius: 5px; text-align: center; font-size: clamp(1.04rem, 2vw, 1.42rem); text-transform: uppercase; font-style: italic; }
.poster { padding: 0; background: #0c0d0e; border: 1px solid #777783; display: block; width: 100%; overflow: hidden; border-radius: 8px; }
.poster:hover { border-color: var(--red); }
.poster img { width: 100%; height: auto; }
.home-results { border-top: 1px solid var(--line); padding: 25px 0 42px; background: #131419; }
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.section-head h2, .address-panel h2 { font-size: 1.8rem; text-transform: uppercase; font-style: italic; }
.section-head a, .text-button { color: #fff; font-weight: 650; }
.race-grid { display: grid; gap: 19px; }
.race-grid-home { grid-template-columns: repeat(auto-fit, minmax(min(205px, 100%), 1fr)); }
.race-grid-full { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 23px; max-width: 1190px; }
.race-card { display: grid; align-content: start; gap: 7px; padding: 6px 6px 11px; background: #181a20; border: 1px solid #393b45; border-radius: 9px; text-decoration: none; overflow: hidden; }
.race-card span { padding-inline: 8px; color: #dddfe5; font-size: .875rem; }
.subpage { min-height: calc(100vh - 134px); padding-block: 50px 70px; }
.page-heading { padding: 0 0 20px 18px; border-left: 5px solid var(--red); margin-bottom: 28px; }
.kicker { color: #d5d7df; font-weight: 700; letter-spacing: .035em; margin-bottom: 8px; }
.page-heading h1 { font-size: clamp(2.4rem, 7vw, 5rem); line-height: .98; text-transform: uppercase; }
.page-heading em { color: #ff4260; }
.section-intro, .note { color: var(--muted); line-height: 1.55; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(230px, .8fr); align-items: start; gap: clamp(22px, 5vw, 72px); max-width: 1130px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filters button { border: 1px solid var(--line); border-radius: 6px; padding: 8px 13px; background: var(--panel); min-height: 43px; font-weight: 700; }
.filters button[aria-pressed="true"] { border-color: #fa5670; background: #601829; }
.schedule { padding: 0; margin: 0; display: grid; gap: 6px; list-style: none; }
.schedule li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 8px 12px; border-radius: 5px; background: var(--panel); }
.schedule time { text-transform: capitalize; }
.schedule strong { display: inline-block; width: 36px; font-size: 1.22rem; }
.category { padding: 4px 8px; border-left: 3px solid currentColor; font-size: .875rem; font-weight: 700; }
.boxstock { color: #8ac2ff; background: #192946; }
.gtlm { color: #ff8ba0; background: #431a24; }
.modificado { color: #ffc478; background: #3b291c; }
.text-button { display: block; padding: 10px; margin: 6px auto 0; background: transparent; border: none; text-decoration: underline; text-underline-offset: 5px; }
.location-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 24px; max-width: 1220px; }
.map-panel, .address-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.map-panel { min-height: 390px; }
.map-panel iframe { display: block; border: 0; width: 100%; height: 100%; min-height: inherit; }
.address-panel { padding: 26px; }
.address-panel address, .address-panel p { margin: 18px 0; font-style: normal; line-height: 1.55; }
.address-panel p { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); background: #111216; }
.footer-inner { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px; }
.footer-inner span { font-weight: 750; }
dialog { width: min(680px, 100% - 24px); max-height: 94vh; border: 1px solid var(--line); padding: 12px; border-radius: 10px; background: #18191e; color: var(--ink); }
dialog::backdrop { background: #000c; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
dialog img { max-height: 78vh; object-fit: contain; width: 100%; }
@media (max-width: 720px) {
  .shell { width: min(100% - 30px, 1376px); }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 12px; }
  nav { width: 100%; gap: 0; justify-content: space-between; }
  nav a { padding: 12px 1px 9px; font-size: clamp(.82rem, 3.7vw, 1rem); }
  .hero::before { inset: 0; background: linear-gradient(90deg, #0a0b0eea, #0a0b0e49), url("assets/hero.webp") 60% center / cover no-repeat; }
  .calendar-layout, .location-layout { grid-template-columns: 1fr; }
  .calendar-poster { width: min(320px, 100%); margin-inline: auto; }
  .race-grid-home, .race-grid-full { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .map-panel { min-height: 320px; }
  .subpage { padding-top: 30px; }
}
@media (max-width: 420px) {
  .race-grid-home, .race-grid-full { grid-template-columns: 1fr; }
  .race-card { width: 100%; }
}
.race-poster { display: grid; gap: 7px; text-decoration: none; }
a.race-poster:hover span, .extra-result:hover { color: #ff8ba0; }
.race-card:has(a.race-poster:hover) { border-color: var(--red); }
.extra-result { padding: 3px 8px 0; color: #d8dbe6; font-size: .875rem; }
.archive-link { margin-top: 4px; }
.upcoming-race {
  display: flex;
  align-items: center;
  gap: clamp(15px, 3vw, 28px);
  max-width: 1190px;
  margin-bottom: 25px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: linear-gradient(110deg, #22151c, #191b21 64%);
}
.upcoming-poster { width: clamp(74px, 16vw, 110px); flex: 0 0 auto; }
.upcoming-race .kicker { margin-bottom: 3px; }
.upcoming-race h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
.upcoming-race p { margin-top: 4px; }
.registration-status { color: var(--muted); }
.upcoming-race .button { margin-top: 11px; }
.archive-art {
  position: relative;
  display: grid;
  align-content: end;
  isolation: isolate;
  min-width: 0;
  aspect-ratio: 2.36;
  overflow: hidden;
  border: 1px solid #94949d;
  border-bottom-color: #e53b51;
  border-radius: 9px;
  padding: 8px 12px;
  background: #121317;
  font-style: italic;
  text-transform: uppercase;
}
.archive-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.archive-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #06070b 0%, #06070bc7 27%, #06070b00 72%); }
.archive-art strong { font-size: clamp(.93rem, 1.55vw, 1.2rem); line-height: 1.15; }
.archive-art time { font-size: clamp(.8rem, 1.1vw, 1rem); }
.club-history {
  padding-block: clamp(34px, 5vw, 66px);
  border-top: 1px solid var(--line);
  background: linear-gradient(145deg, #1c151b, var(--ground) 60%);
  scroll-margin-top: 16px;
}
.history-intro {
  max-width: 67ch;
  color: var(--muted);
  line-height: 1.6;
}
.history-timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr));
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
}
.history-timeline li {
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--red);
  border-radius: 7px;
  background: var(--panel);
}
.history-period { color: #ff91a3; font-weight: 750; }
.history-timeline h3 { margin: 6px 0 9px; font-size: 1.13rem; }
.history-timeline h3 + p { color: var(--muted); line-height: 1.55; }
.footer-inner { flex-wrap: wrap; }

.championship {
  max-width: 1190px;
  margin: 32px 0 36px;
}
.championship h2, .race-archive-title { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.championship-categories {
  display: flex;
  gap: 8px;
  border: 0;
  margin: 14px 0;
  padding: 0;
}
.visually-hidden, .championship-categories input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.championship-categories span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-weight: 700;
  cursor: pointer;
}
.championship-categories input:checked + span {
  border-color: var(--red);
  background: #5e1729;
}
.championship-categories input:focus-visible + span { outline: 2px solid #ff91a3; outline-offset: 3px; }
.championship-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.championship table {
  width: 100%;
  border-spacing: 0;
  font-size: .91rem;
  font-variant-numeric: tabular-nums;
}
.championship caption {
  padding: 13px 14px;
  background: #22151c;
  text-align: left;
  font-weight: 750;
}
.championship th, .championship td {
  padding: 9px 10px;
  text-align: center;
  white-space: nowrap;
  border-top: 1px solid var(--line);
}
.championship th a { display: inline-block; padding-block: 2px; }
.championship thead { background: #272a33; }
.championship tbody tr:nth-child(even) { background: #1b1e24; }
.championship .standing-driver { min-width: 8rem; text-align: left; white-space: normal; }
.championship .standing-total { color: #ff9cab; font-weight: 800; background: #361a24; }
.championship small, .standing-empty, .championship-note { color: var(--muted); }
.championship-note { margin-top: 11px; line-height: 1.55; font-size: .9rem; }
.race-archive-title { margin-bottom: 8px; }

.map-placeholder {
  min-height: inherit;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  padding: clamp(18px, 4vw, 34px);
}
.map-placeholder p { margin: 0; max-width: 50ch; }
.cookie-policy > p, .cookie-policy > ul { max-width: 75ch; line-height: 1.6; }
.cookie-policy li + li { margin-top: 8px; }

.club-contact {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.club-contact h3 { margin: 0; }
.club-contact p { margin: 8px 0 12px; }
.club-contact .button { max-width: 100%; overflow-wrap: anywhere; }

.legal-details {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
  gap: 12px 16px;
  max-width: 680px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.legal-details dt { font-weight: 700; }
.legal-details dd { margin: 0; overflow-wrap: anywhere; }

.club-partners {
  padding-block: 30px 34px;
  border-top: 1px solid var(--line);
  background: #000;
  scroll-margin-top: 16px;
}
.club-partners .section-head { margin-bottom: 14px; }
.partner-logos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.partner-logos li {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 8px 12px;
}
.partner-logos img { height: auto; }
.partner-ihobbies img { width: min(100%, 156px); }
.partner-tlqsd img { width: min(100%, 148px); }
.partner-marka img { width: min(100%, 190px); }
.partner-everlaps img { width: min(100%, 170px); }
.partner-shark img { width: min(100%, 88px); }

@media (max-width: 720px) {
  .partner-logos { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .partner-logos li { grid-column: span 2; min-height: 84px; padding-inline: 8px; }
  .partner-logos li:nth-child(n+4) { grid-column: span 3; }
  .partner-shark img { width: min(100%, 74px); }
}
