/* After changing this file, bump ?v= in the <link> tag of every page in site/ so browsers fetch the new version. */
:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --fg: #15151e;
  --muted: #5f6368;
  --line: #dcdcd7;
  --accent: #e10600;
  --banner-bg: #fff4d6;
  --banner-fg: #5c4400;
  --alive: #137333;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15151e;
    --fg: #f2f2f2;
    --muted: #9aa0a6;
    --line: #34343f;
    --banner-bg: #3a3014;
    --banner-fg: #f5dc8f;
    --alive: #6fcf8a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }

.banner {
  margin: 1rem auto 0;
  width: 100%;
  max-width: 56rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  background: var(--banner-bg);
  color: var(--banner-fg);
  font-size: 0.9rem;
}

header {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.site-name {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}
nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a[aria-current="page"] { color: var(--fg); border-bottom: 2px solid var(--accent); }

main {
  flex: 1;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 0;
}
h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  letter-spacing: -0.02em;
}
h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin-top: 0.75rem;
  background: var(--accent);
}
.summary { color: var(--muted); margin: 1rem 0 1.5rem; }
.summary:has(+ .updated:not([hidden])) { margin-bottom: 0.25rem; }
.updated { color: var(--muted); font-size: 0.8rem; margin: 0 0 1.5rem; }
[hidden] { display: none !important; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.alive { color: var(--alive); font-weight: 600; }
tr.out td { color: var(--muted); }
td .driver, td .sub { display: block; }
.sub { font-size: 0.8rem; color: var(--muted); }
td.status { white-space: normal; }
td.status > span { display: block; }

/* Full names and race names on wide screens, short ones on narrow screens. */
.narrow-only { display: none; }
@media (max-width: 600px) {
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  th, td { padding: 0.5rem 0.4rem; }
}

.legend {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1rem;
}
.legend dt { font-weight: 600; color: var(--fg); }
.legend dt.alive { color: var(--alive); }
.legend dd { margin: 0; }
@media (max-width: 600px) {
  .legend { grid-template-columns: 1fr; gap: 0.15rem; }
  .legend dd { margin-bottom: 0.6rem; }
}
.error { color: var(--accent); }

footer {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 0;
  font-size: 0.75rem;
  color: var(--muted);
}
footer p { margin: 0.5rem 0; }
