/* Static pages built by frontend/seo/build-pages.mjs: calendar, series, events, racers. Same look as /site/index.html. */
:root {
  --black: #080808; --panel: #121212; --panel-2: #1A1A1A; --line: #262626;
  --ink: #F3F1EC; --ink-2: #A6A6A6; --ink-3: #6E6E6E;
  --red: #E3122C; --orange: #FF6B1A; --yellow: #FFB000;
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px); --max: 1320px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--black); }
body { margin: 0; background: var(--black); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.tn { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* header: same rules as public/site/index.html */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: rgba(8,8,8,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.site-head .logo { height: 34px; width: auto; display: block; }
.site-head nav { display: flex; gap: 26px; font-weight: 700; font-size: 15px; }
.site-head nav a { text-decoration: none; color: var(--ink-2); padding: 20px 0 18px; border-bottom: 3px solid transparent; }
.site-head nav a:hover { color: var(--ink); }
.site-head nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.head-q { margin-left: auto; }
.head-q input { width: 220px; font: 500 15px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px; }
.head-q input::placeholder { color: var(--ink-3); }
@media (max-width: 1200px) {
  .site-head nav { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); padding-right: 28px; }
  .site-head .wrap { flex-wrap: wrap; height: auto; row-gap: 0; padding-top: 12px; }
  .site-head nav { order: 3; width: 100%; gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .site-head nav a { padding: 10px 0 9px; white-space: nowrap; }
}
@media (max-width: 560px) {
  .site-head nav { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; padding-right: 0; gap: 0 16px; font-size: 14px; }
  .site-head nav a { padding: 7px 0 6px; }
  .head-q input { width: 140px; }
}

/* type */
h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 { font-stretch: 125%; font-weight: 900; font-size: clamp(34px, 5.4vw, 72px); letter-spacing: -0.03em; line-height: .95; }
h2 { font-stretch: 112%; font-weight: 800; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.02em; margin-bottom: 14px; }
h3 { font-stretch: 100%; font-weight: 800; font-size: 19px; margin-bottom: 6px; }
p { margin: 0 0 14px; max-width: 46em; }
.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 40em; margin-top: 18px; }
.crumb { font-size: 14px; color: var(--ink-3); padding-top: 28px; margin-bottom: 18px; }
.crumb a { color: var(--ink-2); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.page-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.section { padding-block: clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.link { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 1px; }
.link:hover { border-color: var(--orange); }
.prose a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 3px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 8px 48px; }

/* facts row */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 28px 0 0; }
.facts div { padding: 14px 14px 12px 0; }
.facts small { display: block; color: var(--ink-2); font-size: 13px; }
.facts b { font-stretch: 112%; font-weight: 800; font-size: clamp(17px, 1.8vw, 22px); }

/* independent-source note */
.note { border: 1px solid var(--line); border-left: 4px solid var(--orange); background: var(--panel); border-radius: 4px; padding: 14px 18px; font-size: 15px; color: var(--ink-2); max-width: 52em; margin-top: 24px; }
.note b { color: var(--ink); }

/* status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--font); font-stretch: 112%; border-radius: 3px; padding: 3px 8px 2px; white-space: nowrap; border: 1px solid var(--line); color: var(--ink); }
.chip::before { content: ''; width: 7px; height: 7px; background: var(--ink-3); }
.chip.ok::before { background: var(--yellow); }
.chip.off::before { background: var(--red); }

/* calendar rows and event cards */
.cal { display: grid; gap: 12px; margin-top: 8px; }
.cal-row { display: grid; grid-template-columns: 148px 84px minmax(0, 1fr) auto; gap: 6px 22px; align-items: start; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.cal-row .thumb { display: block; width: 148px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.cal-row .mo { font-stretch: 125%; font-weight: 900; font-size: 30px; line-height: 1; color: var(--orange); letter-spacing: -0.02em; }
.cal-row .mo small { display: block; font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: 0; margin-top: 4px; }
.cal-row h3 a { text-decoration: none; }
.cal-row h3 a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.cal-row .when { font-weight: 700; font-size: 17px; margin: 4px 0 2px; }
.cal-row .where, .cal-row .pat { color: var(--ink-2); font-size: 15px; margin: 0; }
.cal-row .acts { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; font-size: 14px; }
.cal-row .acts a { white-space: nowrap; }
.btn { display: inline-block; font: 800 15px var(--font); font-stretch: 112%; color: var(--ink); background: var(--red); border-radius: 4px; padding: 10px 16px; text-decoration: none; }
.btn:hover { background: #C80F26; }
.btn.ghost { background: none; border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink-3); }
.ev-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.ev-card { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 4px; padding: 20px 22px; }
.ev-card .ev-img { display: block; width: calc(100% + 44px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: -20px -22px 18px; }
.ev-card .when { font-stretch: 112%; font-weight: 900; font-size: clamp(22px, 2.4vw, 30px); margin: 10px 0 6px; line-height: 1.1; }
.ev-card p { color: var(--ink-2); font-size: 15px; }
.ev-card .src { font-size: 13px; color: var(--ink-3); }
.ev-card .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; font-size: 15px; }

/* tables */
.tw { overflow-x: auto; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th { text-align: left; font: 700 12px var(--font); font-stretch: 112%; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px 9px 0; border-bottom: 1px solid #1B1B1B; vertical-align: top; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; text-decoration-color: var(--red); }
tr.w td:first-child { box-shadow: inset 3px 0 0 var(--orange); padding-left: 8px; }
.pos { font-weight: 800; font-variant-numeric: tabular-nums; }
.p1 { color: var(--yellow); }
.p3 { color: var(--orange); }
.cls { margin-top: 30px; }
.cls h3 { display: flex; gap: 12px; align-items: baseline; }
.cls h3 small { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.key { font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.key i { display: inline-block; width: 3px; height: 12px; background: var(--orange); vertical-align: -1px; margin-right: 6px; }

/* event index */
.idx { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px 40px; }
.idx ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.idx li a { display: inline-block; text-decoration: none; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; }
.idx li a:hover { border-color: var(--ink-3); }

/* pager between years */
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; font-size: 15px; }

footer { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--ink-3); font-size: 14px; margin-top: 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
footer nav a { color: var(--ink-2); text-decoration: none; }
footer nav a:hover { color: var(--ink); }

@media (max-width: 720px) {
  .cal-row { grid-template-columns: 64px minmax(0, 1fr); padding: 16px; }
  .cal-row .thumb { grid-column: 1 / -1; width: calc(100% + 32px); max-width: none; aspect-ratio: 16 / 9; margin: -16px -16px 8px; border-radius: 3px 3px 0 0; }
  .cal-row .mo { font-size: 24px; }
  .cal-row .acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
  table { font-size: 14px; }
  .hide-sm { display: none; }
}

/* ROAD CLOSED nav link (temporary accent) */
.site-head nav a.rc-nav { color: var(--ink); }
.site-head nav a.rc-nav::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 7px 0 1px; vertical-align: 2px; background: var(--red); transform: rotate(45deg); }
