:root {
  --fg: #000;
  --bg: #fff;
  --muted: #6b6b6b;
  --rule: #e8e8e8;
  --measure: 46rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
          "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
header, main, footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); font-weight: 400; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* type */
.title {
  font-size: clamp(3.25rem, 14vw, 7rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .86;
  margin: clamp(3.5rem, 12vw, 8rem) 0 1rem -.04em;
}
h2 {
  font-size: 1.625rem;
  font-weight: 750;
  letter-spacing: -.025em;
  margin: 4.5rem 0 1.25rem;
}
.meta { color: var(--muted); margin: 0; }
.intro { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; margin: 0 0 .5rem; }
.race-title {
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  margin: 3rem 0 .75rem;
}
h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 2.5rem 0 .5rem;
}
h3 .muted { font-size: .9375rem; margin-left: .35rem; }
.home {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}

/* standing */
.bigpos {
  font-size: clamp(6rem, 28vw, 11rem);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: .78;
  margin: 0 0 1.25rem -.06em;
}
.lead { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.lead .sub { font-size: 1rem; margin-top: .15rem; }

/* week grid */
.season { margin: 2.25rem 0 1rem; }
.weeks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: .3rem;
  max-width: 30rem;
}
.weeks li {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.weeks .raced    { background: var(--fg); color: var(--bg); }
.weeks .skipped  { background: var(--rule); }
.weeks .open,
.weeks .upcoming { box-shadow: inset 0 0 0 1px var(--rule); }
.weeks .now      { outline: 2px solid var(--fg); outline-offset: 2px; }
.weeklabel { color: var(--muted); font-size: .8125rem; margin: .6rem 0 0; }

/* tables */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th {
  text-align: left;
  font-weight: 400;
  font-size: .8125rem;
  color: var(--muted);
  padding: 0 1rem .4rem 0;
}
td {
  padding: .7rem 1rem .7rem 0;
  border-top: 1px solid var(--rule);
  vertical-align: top;
}
th:last-child, td:last-child { padding-right: 0; }
.n { text-align: right; white-space: nowrap; }
.ir { width: 5.5rem; }
.pts { width: 4.5rem; }
td.pts { color: var(--muted); }
td.pts.counts { color: var(--fg); font-weight: 700; }
.legend { color: var(--muted); font-size: .8125rem; margin: .75rem 0 0; }
.inc { width: 3rem; }
.sub { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; }
.note { display: block; font-size: .9375rem; margin-top: .3rem; }
table.best td a { font-weight: 600; text-decoration: none; }
table.best td a:hover { text-decoration: underline; }
tr.week th {
  color: var(--fg);
  font-size: 1rem;
  font-weight: 700;
  padding: 1.75rem 0 .5rem;
}
tr.week th .muted { margin-left: .5rem; font-weight: 400; }
tbody tr.week:first-child th { padding-top: .5rem; }
.pos { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; width: 4.5rem; white-space: nowrap; }
.pos .sub { font-size: .8125rem; letter-spacing: 0; }
/* class position colours */
.pos.p1    { color: #b38b00; }  /* gold */
.pos.p2    { color: #8a9bb3; }  /* silver */
.pos.p3    { color: #a05a24; }  /* bronze */
.pos.top5  { color: #000; }
.pos.top10 { color: #555; }
.pos.rest  { color: #b8b8b8; }

/* season numbers */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 2rem 0 2.5rem;
}
.facts dt { color: var(--muted); font-size: .8125rem; }
.facts dd { margin: 0; font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.series + .series { margin-top: 7rem; }

/* race page */
tr.us td { font-weight: 700; }
table.results { font-size: .9375rem; min-width: 38rem; }
table.results .car { color: var(--muted); white-space: nowrap; }
tr.us .car { color: var(--fg); }
.ours { margin: 3rem 0 1rem; }
.facts dd .sub { font-size: .8125rem; font-weight: 400; letter-spacing: 0; margin-top: .1rem; }
.notes { margin-top: 2.5rem; font-size: 1.125rem; }
.official { margin-top: 2.5rem; }

footer { margin-top: 6rem; padding-bottom: 3rem; font-size: .875rem; color: var(--muted); }
footer a { margin-left: .75rem; }

@media (max-width: 34rem) {
  h2 { margin-top: 3.5rem; }
  .weeks { gap: .2rem; }
  .weeks li { font-size: .6875rem; }
}
