@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/schibsted-grotesk.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #0b0b0f;
  --surface: #141418;
  --rule: #393941;
  --text: #f6f5ed;
  --muted: #b3b3bd;
  --lime: #d4ff3a;
  background: var(--ink);
  color: var(--text);
  font: 16px 'Schibsted Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button {
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 8px 12px;
  background: var(--ink);
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled { cursor: default; opacity: .65; }
:is(a, button):focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.race-mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 max(4%, calc((100% - 880px) / 2));
  border-bottom: 1px solid var(--rule);
  font-size: .87rem;
}
.race-mast strong { letter-spacing: .12em; }
.race-main { width: min(92%, 880px); margin: 26px auto 36px; }
.race-title, .race-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.race-title p { margin-bottom: 5px; color: var(--muted); }
.race-title h1 { font-size: clamp(2.2rem, 7vw, 4.4rem); line-height: 1; letter-spacing: -.065em; }
.race-title button { min-width: 58px; }
.race-intro { max-width: 54ch; margin: 14px 0 18px; line-height: 1.45; }
.race-panel, .race-results {
  max-width: 600px;
  padding: clamp(12px, 3vw, 19px);
  border: 1px solid var(--rule);
  background: var(--surface);
}
.race-panel { display: grid; gap: 13px; }
.race-primary { justify-self: start; background: var(--lime); color: var(--ink); font-weight: 750; }
.race-panel > p, .race-results > p { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.race-stats { display: flex; gap: 27px; font-variant-numeric: tabular-nums; }
.race-stats dt { color: var(--muted); font-size: .76rem; }
.race-stats dd { font-weight: 750; font-size: 1.12rem; }
.race-feedback { min-height: 1.4em; }
.race-panel .dm-machine .dm-mirror { min-height: 0; }
#race-retry { justify-self: start; }
.race-results { margin-top: 16px; }
.race-results h2 { font-size: 1.25rem; }
.race-results-heading button { font-size: .82rem; }
.race-results > p { margin-top: 8px; }
.race-results table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .78rem; }
.race-results :is(th, td) { padding: 7px 3px; border-bottom: 1px solid var(--rule); text-align: right; font-variant-numeric: tabular-nums; }
.race-results :is(th, td):nth-child(2) { text-align: left; }
.race-results th { color: var(--muted); }
dialog { width: min(90vw, 450px); border: 1px solid var(--rule); padding: 19px; background: var(--surface); color: var(--text); }
dialog::backdrop { background: #09090bd9; }
dialog p { margin-top: 10px; line-height: 1.45; }
dialog button { margin-top: 15px; }
.race-split-example { display: block; width: 155px; margin: 12px auto 0; color: var(--lime); }
