/* StintIQ design system — tokens from the brand guide, single source of truth.
   Dark is the default theme: pit walls, garages, night stints. Daylight follows
   the viewer's system setting. */
:root{
  color-scheme: dark;
  --ground:#0D1013; --surface:#161B21; --surface-2:#1F262E; --line:#2C343E;
  --ink:#E9EDF1; --ink-muted:#8F9AA6;
  --apex:#FF6B2C; --apex-soft:#3A1A0C; --on-apex:#0D1013;
  --timing-purple:#B57BFF; --timing-green:#3DDC84; --timing-yellow:#FFD23F;
  --critical:#FF5468;

  --display:"Archivo","Arial Black",system-ui,sans-serif;
  --sans:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,"SF Mono",Menlo,monospace;

  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s6:24px; --s8:32px;
  --r0:0px; --r-sm:2px; --r-md:4px;

  /* One column width for the whole app. The header and the session bar line
     their contents up with it, so nothing sits a hundred pixels left of the
     thing it belongs to. */
  --page: 1500px;
}
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    color-scheme: light;
    --ground:#F2F4F6; --surface:#FFFFFF; --surface-2:#E7EBEF; --line:#D3D9DF;
    --ink:#0D1013; --ink-muted:#56616C;
    --apex:#B83808; --apex-soft:#FFE6D9; --on-apex:#FFFFFF;
    --timing-purple:#7A2FD6; --timing-green:#0E7537; --timing-yellow:#8A6100;
    --critical:#B81C31;
  }
}
:root[data-theme="light"]{
  color-scheme: light;
  --ground:#F2F4F6; --surface:#FFFFFF; --surface-2:#E7EBEF; --line:#D3D9DF;
  --ink:#0D1013; --ink-muted:#56616C;
  --apex:#B83808; --apex-soft:#FFE6D9; --on-apex:#FFFFFF;
  --timing-purple:#7A2FD6; --timing-green:#0E7537; --timing-yellow:#8A6100;
  --critical:#B81C31;
}

*{box-sizing:border-box}
body{margin:0;background:var(--ground);color:var(--ink);
     font:400 14px/20px var(--sans);-webkit-font-smoothing:antialiased}
a{color:inherit}

/* Display is Archivo expanded, for screen titles and the one big call only.
   Never for body text. */
.display{font-family:var(--display);font-variation-settings:"wdth" 125;
  font-weight:800;letter-spacing:-.02em;line-height:1.08;text-transform:none}
h1.display{font-size:clamp(28px,5vw,32px);letter-spacing:-.01em;font-weight:700;margin:0}
.heading{font:600 18px/24px var(--sans);margin:0}
.label{font:600 11px/16px var(--sans);letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-muted)}
/* Every lap time, delta, fuel figure and tyre count, so columns line up. */
.data{font-family:var(--mono);font-variant-numeric:tabular-nums}
.data-lg{font:500 28px/32px var(--mono);font-variant-numeric:tabular-nums}

/* Near-square. Hardware, not toys. No shadows anywhere: surfaces separate with
   a surface step and a hairline. */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);
  padding:var(--s4)}
.btn{font:600 14px var(--sans);background:var(--apex);color:var(--on-apex);border:0;
  border-radius:var(--r-sm);padding:9px 16px;cursor:pointer}
.btn.quiet{background:var(--surface-2);color:var(--ink);border:1px solid var(--line)}
.btn:focus-visible,a:focus-visible,select:focus-visible,button:focus-visible{
  outline:2px solid var(--apex);outline-offset:2px}
select,input[type=text]{background:var(--surface-2);border:1px solid var(--line);
  color:var(--ink);border-radius:var(--r-sm);padding:7px 9px;font:400 14px var(--sans)}
.wrap{max-width:1180px;margin:0 auto;padding:var(--s6) var(--s4) 64px}
.masthead{display:flex;flex-wrap:wrap;gap:var(--s3);align-items:flex-end;
  justify-content:space-between;border-bottom:1px solid var(--line);
  padding-bottom:var(--s3);margin-bottom:var(--s6)}
/* Wordmark as type: the logo files are not in the system's asset group yet. */
.wordmark{font-family:var(--display);font-variation-settings:"wdth" 125;font-weight:800;
  font-size:15px;letter-spacing:.01em}
.wordmark i{font-style:normal;color:var(--apex)}

/* A stray wide table should push itself about, not the page: with the page
   scrolled sideways the header and the session bar scroll with it and come
   out cut off at the right. clip rather than hidden, so the sticky header
   still sticks. */
html{overflow-x: clip}

/* A model's answer, wherever it is shown. Every surface rendered these with
   textContent, so an answer arrived with its asterisks showing and a table
   came out as a column of pipes. The prompt now asks for prose and short
   lists; aitext.js renders what is left, and this is how it looks. */
.ai p, .msg p { margin: 0 0 8px; }
.ai p:last-child, .msg p:last-child { margin-bottom: 0; }
.ai ul, .msg ul { margin: 0 0 8px; padding-left: 18px; }
.ai li, .msg li { margin: 2px 0; }
.ai b, .msg b { color: var(--ink); }
.ai code, .msg code { font: 500 12px var(--mono); color: var(--ink); }
/* a table the model sent in spite of being asked not to: cells, not pipes */
.airow { display: flex; gap: 10px; flex-wrap: wrap; padding: 3px 0;
  border-bottom: 1px solid var(--line); font-size: 12.5px; }
.airow:last-child { border-bottom: 0; }
.airow span:first-child { min-width: 9em; color: var(--ink); font-weight: 600; }

/* "About these figures": the explanation behind a figure - how it was
   measured, what it is held to, why something is not compared - folded
   under one line, so a page leads with its figures and the reasons are a
   tap away rather than gone (Ben, 18 Nov 2026: "the amount of text is simply
   too much"). The rules themselves still act on the figures; this is only
   their wording. */
details.about { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
details.about > summary { display: inline-flex; gap: 5px; align-items: baseline; list-style: none;
  cursor: pointer; font: 600 11.5px var(--sans); color: var(--ink-muted); }
details.about > summary::-webkit-details-marker { display: none; }
details.about > summary::after { content: "\25B8"; font-size: 10px; }
details.about[open] > summary::after { content: "\25BE"; }
details.about > summary:hover { color: var(--ink); }
details.about > .ab { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--line); max-width: 80ch; }
details.about > .ab p { margin: 0 0 6px; }
details.about > .ab p:last-child { margin-bottom: 0; }
