:root {
  --bg: #f4f7fb; --panel: #ffffff; --fg: #1d2530; --muted: #5a6573; --line: #dde4ee;
  --c0: #2f6fd0; --c1: #d9772b; --chart-muted: #aab3bf; --grid: #e6ebf2; --axis: #c3ccd8;
  /* Precedent brand: stripe/glow colours, plus text-safe versions for links and labels */
  --brand-blue: #31a8f7; --brand-pink: #f4279d; --brand-green: #2fd12f;
  --accent: #0a72b8; --accent-2: #c2127a; --accent-3: #1a7f1a;
  --glow1: rgba(49, 168, 247, .18); --glow2: rgba(244, 39, 157, .10); --glow3: rgba(47, 209, 47, .10);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .07);
  --shadow-hi: 0 2px 4px rgba(16, 24, 40, .06), 0 14px 32px rgba(16, 24, 40, .12);
  --crit: #c8382f; --ok: #2c7a4b; --bad: #b23b2f; --warn: #a86a12;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --l0: #2a78d6; --l1: #eb6834; --l2: #1baf7a; --l3: #eda100; --l4: #e87ba4; --l5: #6250d6;
  --div-neg: #e5662c; --div-mid: #b9b7b0; --div-pos: #2a78d6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1918; --panel: #262523; --fg: #ecebe7; --muted: #a29f98; --line: #34322f;
    --c0: #6ea2f0; --c1: #f0a05f; --chart-muted: #6c6963; --grid: #2c2b28; --axis: #45433f;
    --crit: #f06a5f; --ok: #6cc28f; --bad: #f08a7f; --warn: #e3ac55; color-scheme: dark;
    --l0: #3987e5; --l1: #d95926; --l2: #199e70; --l3: #c98500; --l4: #d55181; --l5: #9085e9;
    --div-neg: #e5662c; --div-mid: #6f6d68; --div-pos: #4c95ec;
    --accent: #4fb6f9; --accent-2: #f472b6; --accent-3: #5fe05f;
    --glow1: rgba(49, 168, 247, .12); --glow2: rgba(244, 39, 157, .07); --glow3: rgba(47, 209, 47, .05);
    --shadow: none; --shadow-hi: 0 8px 24px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --accent: #4fb6f9; --accent-2: #f472b6; --accent-3: #5fe05f;
  --glow1: rgba(49, 168, 247, .12); --glow2: rgba(244, 39, 157, .07); --glow3: rgba(47, 209, 47, .05);
  --shadow: none; --shadow-hi: 0 8px 24px rgba(0, 0, 0, .35);
  --bg: #1a1918; --panel: #262523; --fg: #ecebe7; --muted: #a29f98; --line: #34322f;
  --c0: #6ea2f0; --c1: #f0a05f; --chart-muted: #6c6963; --grid: #2c2b28; --axis: #45433f;
  --crit: #f06a5f; --ok: #6cc28f; --bad: #f08a7f; --warn: #e3ac55; color-scheme: dark;
  --l0: #3987e5; --l1: #d95926; --l2: #199e70; --l3: #c98500; --l4: #d55181; --l5: #9085e9;
  --div-neg: #e5662c; --div-mid: #6f6d68; --div-pos: #4c95ec;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--sans); }
select { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.gs-layout { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1340px; margin: 0 auto; }
.gs { display: grid; gap: 40px; max-width: 1120px; width: 100%; margin: 0 auto; padding: 28px 16px 64px; grid-template-columns: minmax(0, 1fr); min-width: 0; }
html { scroll-behavior: smooth; }
.gs [id] { scroll-margin-top: calc(var(--stick, 80px) + 12px); }
.gs-nav { font-size: 14px; }
.gs-nav a { color: var(--muted); text-decoration: none; display: block; padding: 4px 10px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; }
.gs-nav a:hover { color: var(--fg); background: var(--panel); }
.gs-nav a[aria-current=true] { color: var(--fg); border-left-color: var(--c0); background: var(--panel); font-weight: 600; }
.gs-nav-head { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 4px; }
@media (min-width: 1100px) {
  .gs-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 8px; padding-left: 16px; }
  .gs-nav { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 24px 0 24px; }
}
@media (max-width: 1099.98px) {
  .gs-nav { position: sticky; top: 0; z-index: 7; background: var(--bg); border-bottom: 1px solid var(--line); display: flex; gap: 2px; overflow-x: auto; white-space: nowrap; padding: 6px 12px; scrollbar-width: none; }
  .gs-nav::-webkit-scrollbar { display: none; }
  .gs-nav-group { display: contents; }
  .gs-nav-head { display: none; }
  .gs-nav a { display: inline-block; border-left: 0; border-radius: 999px; padding: 5px 12px; font-size: 13px; }
  .gs-nav a[aria-current=true] { background: var(--panel); border: 0; }
  .gs-controls { position: static; }
}
.gs > * { min-width: 0; }
/* one page title everywhere (Ben 2026-11-17): the blue-to-pink gradient the home and club pages had, not the old serif on the app pages */
.gs h1 { font-weight: 600; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; max-width: 100%; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; margin: 0; text-wrap: balance; }
.gs h2 { font-size: 1.25rem; font-weight: 600; margin: 0; text-wrap: balance; }
.gs h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.gs p { margin: 0; }
.gs-sub { color: var(--muted); }
.gs-aka { color: var(--muted); font-size: 14px; font-style: italic; margin: 4px 0 0; }
.gs-lede { font-size: 17px; line-height: 1.45; max-width: 62ch; }
.gs-pts-key { font-size: 13px; color: var(--muted); max-width: 70ch; margin: 6px 0 0; }
.gs-lede b, .gs-pts-lede b { font-weight: 600; font-variant-numeric: tabular-nums; }
/* the header (menu, title, intro) sits in the same centred column on every page, however wide the page below it is (Ben 2026-11-17) */
.gs-head { display: grid; gap: 8px; width: 100%; max-width: 1088px; margin-inline: auto; }
/* results page: the header is its own block above the section sidebar and the charts */
.gs.gs-hd { padding-bottom: 0; }
.gs-hd + .gs-layout .gs { padding-top: 40px; }
.gs-controls { position: sticky; top: 0; z-index: 6; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 0; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.gs-ctl { display: grid; gap: 4px; min-width: 0; flex: 1 1 200px; max-width: 320px; }
.gs-ctl-sm { flex: 0 1 140px; }
.gs-ctl select { width: 100%; min-width: 0; }
.gs-label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.gs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.gs-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.gs-big { font-family: var(--serif); font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gs-note { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gs-good { color: var(--ok); }
.gs-bad { color: var(--bad); }
.gs-sec, .gs-part { display: grid; gap: 10px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.gs-sec > p { color: var(--muted); max-width: 72ch; }
.gs-part { gap: 40px; border-top: 1px solid var(--line); padding-top: 20px; }
.gs-eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gs-chart { position: relative; min-height: 260px; min-width: 0; }
.gs-chart svg { display: block; overflow: visible; }
.gs .tick text, .gs .gs-axlabel { fill: var(--muted); font-size: 12px; font-family: var(--sans); }
.gs .domain { stroke: var(--axis); }
.gs .tick line { stroke: var(--grid); }
.gs .gs-endlabel { fill: var(--fg); font-size: 12px; font-family: var(--sans); }
.gs-tip { position: absolute; pointer-events: none; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0,0,0,.15); border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.45; white-space: nowrap; z-index: 5; font-variant-numeric: tabular-nums; }
.gs-tip strong { font-weight: 600; }
.gs-tip span { color: var(--muted); }
.gs-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); margin: 0; padding: 0; list-style: none; }
.gs-legend li { display: flex; align-items: center; gap: 6px; }
.gs-sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.c0 { background: var(--c0); color: var(--c0); }
.c1 { background: var(--c1); color: var(--c1); }
.gs-sw-ring { background: transparent !important; border: 2px solid currentColor; width: 8px; height: 8px; }
.gs-sw-line { width: 16px; height: 2px; border-radius: 1px; }
.gs-sw-dash { width: 16px; height: 0; border-top: 2px dashed var(--chart-muted); border-radius: 0; }
.gs-muted-sw { background: var(--chart-muted); color: var(--chart-muted); }
.gs-crit-sw { background: var(--crit); }
.gs-seg { display: inline-flex; justify-self: start; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gs-seg button { font: inherit; font-size: 13px; background: transparent; color: var(--muted); border: 0; padding: 6px 12px; cursor: pointer; }
.gs-seg button + button { border-left: 1px solid var(--line); }
.gs-laysel { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; justify-self: start; }
.gs-laysel[hidden] { display: none; }
.gs-laysel select { max-width: 100%; }
.gs-seg button[aria-pressed=true] { background: var(--panel); color: var(--fg); font-weight: 600; }
button:focus-visible, tr:focus-visible, select:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.gs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gs-chip { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 8px; padding: 6px 12px; cursor: pointer; display: grid; gap: 2px; text-align: left; font-variant-numeric: tabular-nums; }
.gs-chip small { color: var(--muted); font-size: inherit; }
.gs-chip[aria-pressed=true] { background: var(--panel); border-color: var(--fg); }
.gs-cond { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.gs-cond-wet { border-color: var(--warn); color: var(--warn); }
.gs-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.gs-grid2 > * { min-width: 0; }
.gs-tablewrap { overflow-x: auto; position: relative; }
.gs table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.gs th, .gs td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.gs th { color: var(--muted); font-weight: 600; }
.gs th:first-child, .gs td:first-child { text-align: left; }
.gs tr.gs-me td { font-weight: 600; background: var(--panel); }
.gs tr.gs-rival td { background: var(--panel); }
.gs tr.gs-pick { cursor: pointer; }
.gs tr.gs-pick:hover td { background: var(--panel); }
.gs td .gs-sw { margin-right: 6px; vertical-align: -1px; }
.gs details summary { cursor: pointer; color: var(--muted); }
.gs details p { max-width: 72ch; color: var(--muted); margin-top: 10px; }
.gs-grid td { text-align: center; padding: 4px 6px; min-width: 34px; }
.gs-grid th { text-align: center; }
.gs-grid td:first-child, .gs-grid th:first-child { text-align: left; }
.gs-grid td.gs-drop { color: var(--muted); text-decoration: line-through; }
.gs-grid td.gs-absent { color: var(--muted); }
.gs-standings th:nth-child(2), .gs-standings td:nth-child(2) { text-align: left; }
/* phones: the driver cell wraps (plate and telemetry badge drop under the name) so Behind and Rounds stay on screen */
@media (max-width: 560px) {
  .gs-standings td:nth-child(2) { white-space: normal; line-height: 1.6; }
  .gs-standings th, .gs-standings td { padding: 6px 3px; }
  .gs-standings th:first-child, .gs-standings td:first-child { padding-left: 0; }
  .gs-standings td:last-child { white-space: normal; min-width: 3.2em; }
  .gs-standings .gs-name-link { white-space: nowrap; }
  .gs-standings th.gs-sortable button { padding: 6px 3px; }
  .gs-standings th.gs-sortable:not([aria-sort]) button::after { width: 0; }
}
.gs-pts-lede { max-width: 72ch; }
.gs-badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: 2px; margin-left: 6px; font-weight: 400; }
.gs-fail { color: var(--muted); font-size: 13px; padding: 12px 0; }
.gs-chart[data-h=short] { min-height: 120px; }
.gs-chart[data-h=mid] { min-height: 240px; }
.gs-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
/* a solid pill in the colours of the mode it switches to, so it stands out on either background (Ben 2026-11-17) */
.gs-theme { font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; color: #fff; background: #1b2333; border: 1px solid #1b2333; border-radius: 999px; padding: 7px 15px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.25); white-space: nowrap; }
:root[data-theme="dark"] .gs-theme { color: #1a1a1a; background: #ffd54a; border-color: #ffd54a; }
.gs-theme:hover { filter: brightness(1.12); }
.gs-theme:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gs-theme svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gs-theme .i-sun { display: none; }
.gs-theme.is-dark .i-sun { display: inline; }
.gs-theme.is-dark .i-moon { display: none; }
[hidden] { display: none !important; }
.gs-part-head { display: grid; gap: 2px; }
.gs-part-head p { color: var(--muted); }
.gs-part > .gs-part-head .gs-eyebrow { font-size: 13px; color: var(--fg); font-weight: 600; }
.gs-chart-auto { min-height: 80px; }
.gs th.gs-sortable { cursor: pointer; user-select: none; padding: 0; }
.gs th.gs-sortable button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 6px 8px; cursor: pointer; text-align: inherit; }
.gs th.gs-sortable button:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; }
.gs th.gs-sortable:hover { color: var(--fg); }
.gs th[aria-sort] { color: var(--fg); }
.gs th.gs-sortable button::after { content: ""; display: inline-block; width: 1em; text-align: center; }
.gs th[aria-sort=ascending] button::after { content: "▲"; font-size: 9px; }
.gs th[aria-sort=descending] button::after { content: "▼"; font-size: 9px; }
.gs-profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.gs-profile { border: 1px solid var(--grid, var(--axis)); border-radius: 8px; padding: 12px 14px; }
.gs-profile h3 { margin: 0 0 6px; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.gs-profile-sum { margin: 0 0 8px; }
.gs-profile table { width: 100%; }
.gs-profile td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.gs-profile tr.gs-strong td:last-child { color: #2e9e4f; font-weight: 600; }
.gs-profile tr.gs-weak td:last-child { color: #d84a3c; font-weight: 600; }
.gs-part-head .gs-seg { margin-top: 10px; }
.gs-sw-fg { background: var(--fg); color: var(--fg); }

/* lap logger page */
.gs-lg { max-width: 1240px; gap: 28px; }
.gs-back { color: inherit; }
.gs-lede a, .gs-back:hover { color: var(--fg); }
.gs-msg { margin: 4px 0 0; padding: 8px 12px; border-left: 3px solid var(--ok); background: var(--panel); border-radius: 0 8px 8px 0; font-size: 14px; }
.gs-msg-bad { border-left-color: var(--bad); }
.gs-lg-controls { position: static; }
.gs-sw-l0 { background: var(--l0); } .gs-sw-l1 { background: var(--l1); } .gs-sw-l2 { background: var(--l2); }
.gs-sw-l3 { background: var(--l3); } .gs-sw-l4 { background: var(--l4); } .gs-sw-l5 { background: var(--l5); }
.gs-tip .gs-sw { margin-right: 4px; vertical-align: -1px; }
.gs-fold { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; min-width: 0; }
.gs-fold > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.gs-fold > summary::-webkit-details-marker { display: none; }
.gs-fold > summary h2 { margin: 0; display: inline; }
.gs-fold > summary h2::before { content: "▸ "; color: var(--muted); font-size: .8em; }
.gs-fold[open] > summary h2::before { content: "▾ "; }
.gs-fold > p { color: var(--muted); max-width: 80ch; margin: 0; }
.gs-fold h3 { margin: 14px 0 0; font-size: 15px; }
.gs-lg-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.gs-check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; padding-bottom: 8px; }
.gs-zoom button { min-width: 38px; }
.gs-lg-map { min-height: 320px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; touch-action: none; background: var(--panel); }
.gs-lg-map svg { overflow: hidden; cursor: grab; }
.gs-lg-replay { display: flex; gap: 12px; align-items: center; }
.gs-lg-replay input { flex: 1; min-width: 0; }
.gs-play { display: inline-flex; min-width: 92px; justify-content: center; }
.gs-lg-picked { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gs-lg-pick { display: flex; align-items: center; gap: 8px; font-size: 14px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.gs-lg-pick strong { font-weight: 600; }
.gs-icon { font: inherit; background: transparent; border: 1px solid var(--line); color: var(--fg); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; line-height: 1; }
.gs-icon[aria-pressed=true] { color: var(--warn); border-color: var(--warn); }
.gs-lg-filter { display: flex; gap: 10px; align-items: center; }
.gs-lg-filter select { max-width: 260px; }
.gs-lg-sessions { display: grid; gap: 14px; }
.gs-lg-sess { display: grid; gap: 6px; border-left: 2px solid var(--line); padding-left: 12px; }
.gs-lg-sess-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.gs-chip-sm { padding: 4px 9px; display: inline-flex; align-items: center; gap: 6px; }
.gs-chip-slow { color: var(--muted); }
.gs .gs-lg-ribbon { fill: none; stroke: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.gs .gs-lg-lapline { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.gs .gs-lg-faint { stroke-width: 1.25; opacity: .75; }
.gs .gs-lg-casing { fill: none; stroke: var(--bg); stroke-width: 7; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.gs .gs-lg-seg { stroke-width: 4; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.gs .gs-lg-sf { stroke: var(--fg); stroke-width: 3; }
.gs .gs-lg-sf.is-red { stroke: #e10600; stroke-width: 7; }
.gs .gs-lg-mark { stroke: var(--bg); stroke-width: 2; pointer-events: none; }
.gs .gs-lg-ghost { stroke: var(--bg); stroke-width: 2; }
.gs .gs-lg-zero { stroke: var(--fg); stroke-width: 1; }
.gs .gs-lg-lane { stroke: var(--grid); stroke-width: 1; }
.gs .gs-lg-cornerline { stroke: var(--axis); stroke-dasharray: 2 3; }
.gs .gs-lg-rule { stroke: var(--fg); stroke-width: 1; pointer-events: none; }
.gs .gs-note-svg { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.gs .gs-corner-label { fill: var(--fg); font-size: 11px; font-family: var(--sans); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; pointer-events: none; }
.gs td.gs-lg-best { color: var(--ok); font-weight: 600; }
.gs tr.gs-lg-total td { color: var(--muted); font-style: italic; }
.gs-lg-form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.gs-lg-form input[type=text], .gs-lg-form input:not([type]) , .gs-lg-form input[list] { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; width: 100%; }
.gs-lg-form input[type=file] { font-size: 14px; color: var(--muted); }
.gs-btn { font: inherit; font-size: 14px; background: var(--fg); color: var(--bg); border: 1px solid var(--fg); border-radius: 8px; padding: 7px 16px; cursor: pointer; }
.gs-btn:disabled { opacity: .5; cursor: wait; }
.gs-btn-quiet { background: transparent; color: var(--fg); border-color: var(--line); padding: 4px 10px; font-size: 13px; }
.gs-btn-danger { background: transparent; color: var(--bad); border-color: var(--bad); padding: 4px 10px; font-size: 13px; }
.gs-lg-status, .gs-lg-mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.gs-lg-mine li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gs-bad { color: var(--bad); }
.gs-lg-leaders td:first-child { font-weight: 600; }
.gs-logger-badge { font-size: 11px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--accent-2) 55%, transparent); border-radius: 5px; padding: 0 5px; margin-left: 6px; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 10%, transparent); text-decoration: none; }
a.gs-logger-badge:hover { background: color-mix(in srgb, var(--accent-2) 20%, transparent); border-color: var(--accent-2); }   /* pink, like the Telemetry card (Ben, 2026-11-13) */
.gs-logger-badge:hover { color: var(--fg); border-color: var(--fg); }
@media (max-width: 640px) { .gs-lg-replay { flex-wrap: wrap; } .gs-lg-pick span { flex-basis: 100%; order: 5; } }
.gs-linkbtn { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.gs-lg-steps { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 4px; max-width: 80ch; }
.gs-lg-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
a.gs-btn { text-decoration: none; display: inline-block; }
.gs-lg-sources { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.gs-src { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; line-height: 1.5; padding: 0 6px; border-radius: 5px; border: 1px solid var(--fg); color: var(--fg); vertical-align: 1px; white-space: nowrap; }
.gs-src-gpx { border-style: dashed; }
.gs-src-sh { background: var(--fg); color: var(--bg); }
.gs-lg-upload { background: var(--panel); border-radius: 12px; padding: 18px 18px 14px; }
.gs-lg-upload .gs-lg-form { align-items: stretch; }
.gs-lg-upload .gs-ctl { max-width: 320px; }
.gs-drop { flex: 1 1 280px; display: block; border: 2px dashed var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; font-size: 14px; background: var(--bg); }
.gs-drop small { color: var(--muted); }
.gs-drop.is-over, .gs-drop:hover { border-color: var(--fg); }
.gs-drop input[type=file] { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); max-width: 100%; }
#up-go { align-self: end; }
.gs-dup { color: var(--warn); }
.gs-lg-minebox summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.gs-lg-minebox[open] summary { margin-bottom: 8px; }
.gs-lg-timing { display: grid; gap: 6px; }
.gs-lg-timing h3 { font-size: 14px; font-weight: 600; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.gs tr.gs-lg-slowrow td { color: var(--muted); }
.gs-lg-who td:first-child, .gs-lg-who th:first-child { text-align: left; }
.gs-lg-who td:nth-child(4) { white-space: normal; text-align: left; }
.gs-lg-sess-head { display: grid; gap: 2px; }
.gs-lg-sess-head .gs-note .gs-src { margin-right: 4px; }
.gs-callout { display: grid; gap: 2px; margin-top: 8px; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--fg); border-radius: 0 10px 10px 0; background: var(--panel); color: var(--fg); text-decoration: none; max-width: 72ch; }
.gs-callout:hover { border-color: var(--fg); }
.gs-callout strong { font-size: 15px; }
.gs-callout strong::after { content: " →"; }
/* lap logger: tabbed layout */
.gs-skip { position: absolute; left: -9999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 20; }
.gs-skip:focus { left: 8px; }
.gs-lg :focus-visible { outline: 3px solid var(--l0); outline-offset: 2px; border-radius: 4px; }
.gs-lg .gs-lede { max-width: 60ch; }
.gs-back { color: var(--muted); text-decoration: none; font-size: 14px; }
.gs-back:hover { color: var(--fg); text-decoration: underline; }
.gs-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.gs-tabs [role=tab] { font: inherit; font-size: 16px; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 16px 9px; cursor: pointer; white-space: nowrap; }
.gs-tabs [role=tab]:hover { color: var(--fg); }
.gs-tabs [role=tab][aria-selected=true] { color: var(--fg); border-bottom-color: var(--fg); }
.gs-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.gs-view h2 { margin: 0; }
.gs-view-head { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: end; }
.gs-view-head .gs-sub { margin: 4px 0 0; }
.gs-lg-filters, .gs-lg-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.gs-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gs-lg-list { font-size: 15px; }
.gs-lg-list td, .gs-lg-list th { text-align: left; vertical-align: middle; }
.gs-lg-list td:nth-child(5), .gs-lg-list td:nth-child(6), .gs-lg-list th:nth-child(5), .gs-lg-list th:nth-child(6) { text-align: right; font-variant-numeric: tabular-nums; }
.gs-lg-list td:last-child { text-align: right; }
.gs-lg-list small { display: block; color: var(--muted); font-size: 13px; }
.gs-sess-name { font-weight: 600; }
.gs-kind { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); margin-right: 2px; }
.gs-kind-race { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.gs-empty { color: var(--muted); text-align: center !important; padding: 24px !important; }
.gs-h-sm { font-size: 16px; margin: 0; }
.gs-lg-picks { display: grid; gap: 10px; justify-items: start; background: var(--panel); border-radius: 12px; padding: 14px 16px; }
.gs-lg-picks .gs-lg-picked { justify-self: stretch; }
.gs-lg-picker { justify-self: stretch; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.gs-subtabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-subtabs [role=tab] { font: inherit; font-size: 14px; background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.gs-subtabs [role=tab][aria-selected=true] { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 600; }
.gs-sub-panel { display: grid; gap: 12px; min-width: 0; }
.gs-sub-panel h3 { margin: 10px 0 0; font-size: 15px; }
.gs-ctl-wide { flex: 2 1 320px; max-width: none; }
.gs-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px; }
.gs-drop input[type=file] { margin: 0; color: var(--fg); font-size: 14px; }
.gs-drop span { color: var(--muted); font-size: 14px; }
.gs-lg-form { background: var(--panel); border-radius: 12px; padding: 16px; }
.gs-lg-more summary { cursor: pointer; color: var(--muted); }
.gs-lg-more ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; max-width: 75ch; }
.gs-lg-steps { max-width: 75ch; font-size: 15px; }
.gs-lg .gs-ctl-sm { flex: 0 1 220px; }
.gs-h-md { font-size: 18px; margin: 8px 0 0; }
.gs-lg-days { display: grid; gap: 22px; }
.gs-lg-day { display: grid; gap: 10px; }
.gs-lg-day h4 { margin: 0; font-size: 16px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.gs-lg-heat-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: 4px; }
.gs-lg-heat { font-size: 15px; }
.gs-lg-heat td, .gs-lg-heat th { text-align: left; }
.gs-lg-heat td:nth-child(4), .gs-lg-heat td:nth-child(5), .gs-lg-heat th:nth-child(4), .gs-lg-heat th:nth-child(5) { text-align: right; font-variant-numeric: tabular-nums; }
.gs-lg-heat td:last-child { text-align: right; }
.gs-lg-heat tr.gs-lg-srcrow th { padding-top: 0; font-weight: 400; font-size: 12px; }
.gs-lg-heat tr.gs-has-log td { background: var(--panel); font-weight: 600; }
.gs-muted { color: var(--muted); }
.gs-chip .gs-chip-log { color: var(--fg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* landing page */
.gs-home { max-width: 1120px; }
.gs-home .gs-lede { max-width: 56ch; }
.gs-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 700px) { .gs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gs-card { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--fg); text-decoration: none; min-height: 230px; }
.gs-card:hover { border-color: var(--fg); }
.gs-card:focus-visible { outline: 3px solid var(--l0); outline-offset: 3px; }
.gs-card h2 { margin: 0; font-size: 20px; }
.gs-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.gs-card-icon { width: 28px; height: 28px; fill: none; stroke: var(--fg); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gs-card-stat { font-size: 13px; color: var(--fg); font-variant-numeric: tabular-nums; }
.gs-card-stat:empty { display: none; }
.gs-card-go { font-weight: 600; font-size: 15px; }
.gs-card-go::after { content: " →"; }
.gs-home-foot { margin-top: 8px; }
.gs-back-inline { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* upload attribution */
.gs-opt { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }
.gs-lg-status li.gs-ok strong { font-weight: 600; }
.gs-lg-status li.gs-ask { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--warn); border-radius: 8px; }
.gs-ask-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* site menu (all pages) + related links under each header */
.gs-site { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.gs-site a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.gs-site a:hover { color: var(--fg); }
.gs-site a[aria-current="page"] { color: var(--fg); font-weight: 600; border-bottom-color: var(--c0); }
.gs-top:has(.gs-site) { align-items: flex-start; }
.gs-related { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.gs-related a { color: var(--fg); }
.gs-profile-links { font-size: 13px; margin: 0 0 8px; color: var(--muted); }
.gs-profile-links a, .gs-name-link { color: inherit; }
.gs-name-link:hover { text-decoration: underline; }
.gs-lg-xlink { font-size: 13px; color: inherit; }
.gs-lg-heat td a.gs-lg-xlink { font-size: inherit; text-decoration: none; }
.gs-lg-heat td a.gs-lg-xlink:hover { text-decoration: underline; }

/* landing page regions */
.gs-regions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.gs-region { display: grid; text-align: left; gap: 2px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: inherit; cursor: pointer; min-width: 150px; }
.gs-region span { font-size: 12px; color: var(--muted); }
.gs-region[aria-checked="true"] { border-color: var(--c0); box-shadow: inset 0 0 0 1px var(--c0); }
.gs-region:disabled { cursor: default; opacity: .6; }
.gs-region:focus-visible { outline: 2px solid var(--c0); outline-offset: 2px; }

/* logger sessions: track → event → who */
.gs-lg-tracks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.gs-lg-track { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.gs-lg-track > .gs-note { margin: -4px 0 4px; }
.gs-lg-event { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; min-width: 0; }
.gs-lg-event > summary { cursor: pointer; padding: 10px 0 10px 1.4em; list-style: none; position: relative; }
.gs-lg-event > summary::-webkit-details-marker { display: none; }
.gs-lg-event > summary::before { content: "▸"; color: var(--accent); position: absolute; left: 0; top: 10px; width: 1em; text-align: center; transition: transform .15s; }
.gs-lg-event[open] > summary::before { transform: rotate(90deg); }
.gs-lg-event[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.gs-lg-event-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 0 12px; }
.gs-lg-list tr.is-sel td { background: color-mix(in srgb, var(--c0) 10%, transparent); }
.gs-lg-list input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--c0); }
.gs-lg-selbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--c0); border-radius: 10px; background: var(--panel); }
.gs-lg-selbar span { flex: 1 1 260px; font-size: 14px; }

/* driver bio + find */
.gs-bio { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.gs-bio:empty { display: none; }
.gs-bio-name { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gs-bio-sub, .gs-bio-classes { margin: 0; color: var(--muted); font-size: 14px; }
.gs-bio-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 8px 0; }
.gs-bio-stats div { display: grid; gap: 2px; }
.gs-bio-stats dt { font-size: 12px; color: var(--muted); }
.gs-bio-stats dd { margin: 0; font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.gs-profile-bio { font-size: 13px; margin: 0 0 4px; color: var(--muted); }
.gs-home-find { display: grid; gap: 4px; margin-top: 16px; max-width: 420px; }
.gs-home-find input, .gs-ctl-find input, .gs-lg-filters input[type="search"] { font: inherit; font-size: 15px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); box-sizing: border-box; width: 100%; }


/* ===== Precedent colours + a livelier light mode ===== */
body { background: radial-gradient(900px 420px at 92% -120px, var(--glow1), transparent 70%),
                    radial-gradient(700px 320px at -5% -80px, var(--glow2), transparent 70%),
                    radial-gradient(600px 300px at 55% -160px, var(--glow3), transparent 70%), var(--bg);
       background-repeat: no-repeat; }
body::before { content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, var(--brand-blue) 0 33.3%, var(--brand-pink) 33.3% 66.6%, var(--brand-green) 66.6%); }
a { color: var(--accent); }
:focus-visible { outline-color: var(--accent); }
.gs-eyebrow { color: var(--accent-2); font-weight: 600; }
.gs-label { color: var(--muted); }
.gs-site a[aria-current="page"] { border-bottom: 3px solid; border-image: linear-gradient(90deg, var(--brand-blue), var(--brand-pink)) 1; }
.gs-site a:hover { color: var(--accent); }
.gs-related a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gs-nav a[aria-current=true] { border-left-color: var(--brand-pink); }
.gs-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.gs-btn:hover:not(:disabled) { filter: brightness(1.08); }
.gs-btn-quiet { background: var(--panel); color: var(--fg); border-color: var(--line); }
.gs-btn-quiet:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); filter: none; }
.gs-btn-danger { background: transparent; color: var(--bad); border-color: var(--bad); }
/* surfaces: white cards with soft shadows in light mode, a brand-coloured top edge in rotation */
.gs-tile, .gs-card, .gs-bio, .gs-profile, .gs-lg-event, .gs-region, .gs-lg-selbar { box-shadow: var(--shadow); background: var(--panel); }
.gs-tile { border-top: 3px solid var(--brand-blue); }
.gs-tile:nth-child(3n+2) { border-top-color: var(--brand-pink); }
.gs-tile:nth-child(3n) { border-top-color: var(--brand-green); }
.gs-card { position: relative; overflow: hidden; border-top: 4px solid var(--brand-blue); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.gs-card:nth-of-type(2) { border-top-color: var(--brand-pink); }
.gs-card:nth-of-type(3) { border-top-color: var(--brand-green); }
.gs-card:nth-of-type(4) { border-top-color: #eab308; }
.gs-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hi); border-color: var(--line); }
.gs-card .gs-card-icon { width: 44px; height: 44px; padding: 9px; border-radius: 12px; stroke: var(--accent); background: color-mix(in srgb, var(--brand-blue) 14%, transparent); }
.gs-card:nth-of-type(2) .gs-card-icon { stroke: var(--accent-2); background: color-mix(in srgb, var(--brand-pink) 12%, transparent); }
.gs-card:nth-of-type(3) .gs-card-icon { stroke: var(--accent-3); background: color-mix(in srgb, var(--brand-green) 14%, transparent); }
.gs-card:nth-of-type(4) .gs-card-icon { stroke: #a16207; background: color-mix(in srgb, #eab308 16%, transparent); }
.gs-card-go { color: var(--accent); }
.gs-card:nth-of-type(2) .gs-card-go { color: var(--accent-2); }
.gs-card:nth-of-type(3) .gs-card-go { color: var(--accent-3); }
.gs-card:nth-of-type(4) .gs-card-go { color: #a16207; }
:root[data-theme="dark"] .gs-card:nth-of-type(4) .gs-card-icon, :root[data-theme="dark"] .gs-card:nth-of-type(4) .gs-card-go { stroke: #facc15; color: #facc15; }
.gs-bio { border-color: transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box,
  linear-gradient(120deg, var(--brand-blue), var(--brand-pink) 55%, var(--brand-green)) border-box; border: 2px solid transparent; }
.gs-bio-stats dd { color: var(--accent); }
.gs-bio-stats div:nth-child(3n+2) dd { color: var(--accent-2); }
.gs-bio-stats div:nth-child(3n) dd { color: var(--accent-3); }
.gs-region[aria-checked="true"] { border-color: var(--brand-blue); box-shadow: inset 0 0 0 1px var(--brand-blue), var(--shadow); }
.gs-region[aria-checked="true"] strong { color: var(--accent); }
.gs-tabs [aria-selected="true"], .gs-subtabs [aria-selected="true"] { border-bottom-color: var(--brand-pink) !important; }
.gs-controls, .gs-lg-selbar { backdrop-filter: saturate(1.2); }
.gs-lg-selbar { border-color: var(--brand-blue); }

/* footer credit (as Did It Run? had) */
.gs-madeby-wrap { display: flex; justify-content: center; padding: 8px 16px 36px; }
.madeby { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 14px; }
.madeby:hover { color: var(--fg); }
.madeby img { height: 22px; width: auto; display: block; }
.madeby .logo-d { display: none; }
:root[data-theme="dark"] .madeby .logo-l { display: none; }
:root[data-theme="dark"] .madeby .logo-d { display: block; }

/* search dropdown (as on Did It Run?) */
.kt-search { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); }
.kt-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 25%, transparent); }
.kt-search input, .gs-home-find .kt-search input, .gs-ctl-find .kt-search input, .gs-lg-filters .kt-search input { border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 15px; width: 100%; padding: 8px 0; box-shadow: none; }
.kt-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 4px; max-height: 340px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-hi); }
.kt-list li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--fg); }
.kt-list li[aria-selected="true"] { background: color-mix(in srgb, var(--brand-blue) 16%, transparent); }
.kt-list .kt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-list .kt-name small { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }
.kt-list .kt-n { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kt-list .kt-none { color: var(--muted); cursor: default; }
.gs-part-head .gs-eyebrow, .gs .gs-part-head .gs-eyebrow { color: var(--accent-2); }
select { background: var(--panel); }
.kt-list { right: auto; width: max(100%, min(380px, 92vw)); }

/* tidy control panel: an even grid on a white panel; long menus (compare with, race day, search) get two columns */
/* flex rather than a fixed grid, so every row fills the panel whichever menus a page has (Ben, 2026-11-13: after the
   Driver menu went, the points and head-to-head rows ended with empty space) */
.gs-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.gs-controls .gs-ctl { max-width: none; min-width: 0; flex: 1 1 175px; }
.gs-controls .gs-ctl-break { flex: 0 0 100%; height: 0; }   /* the menus start a new row under the search boxes */
.gs-controls .gs-ctl[hidden] { display: none; }
.gs-controls .gs-ctl-2, .gs-controls .gs-ctl-find { flex: 2 1 350px; }
.gs-controls select { width: 100%; text-overflow: ellipsis; }

/* logger: a session's three fastest laps in three shades of green (darkest = fastest) */
:root { --top1: #157a24; --top2: #3fa34d; --top3: #8fd18f; --top1-bg: #d6f2d9; --top2-bg: #e4f6e6; --top3-bg: #f1fbf1; --top-ink: #0f5a1a; }
:root[data-theme="dark"] { --top1: #4ade60; --top2: #2f9e44; --top3: #1f6b2e; --top1-bg: #17401f; --top2-bg: #133419; --top3-bg: #0f2814; --top-ink: #b9f5c3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --top1: #4ade60; --top2: #2f9e44; --top3: #1f6b2e; --top1-bg: #17401f; --top2-bg: #133419; --top3-bg: #0f2814; --top-ink: #b9f5c3; } }
.gs-chip.gs-top1 { background: var(--top1-bg); border-color: var(--top1); box-shadow: inset 4px 0 0 var(--top1); color: var(--top-ink); font-weight: 600; }
.gs-chip.gs-top2 { background: var(--top2-bg); border-color: var(--top2); box-shadow: inset 4px 0 0 var(--top2); color: var(--top-ink); }
.gs-chip.gs-top3 { background: var(--top3-bg); border-color: var(--top3); box-shadow: inset 4px 0 0 var(--top3); color: var(--top-ink); }
.gs-chip.gs-top1[aria-pressed=true], .gs-chip.gs-top2[aria-pressed=true], .gs-chip.gs-top3[aria-pressed=true] { outline: 2px solid var(--fg); outline-offset: 1px; }
.gs-lg-pick.gs-top1, .gs-lg-pick.gs-top2, .gs-lg-pick.gs-top3 { border-radius: 8px; padding: 3px 8px; margin-left: -8px; }
.gs-lg-pick.gs-top1 { background: var(--top1-bg); box-shadow: inset 4px 0 0 var(--top1); }
.gs-lg-pick.gs-top2 { background: var(--top2-bg); box-shadow: inset 4px 0 0 var(--top2); }
.gs-lg-pick.gs-top3 { background: var(--top3-bg); box-shadow: inset 4px 0 0 var(--top3); }
.gs-rank { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 6px; color: #fff; vertical-align: 1px; }
.gs-top1 .gs-rank { background: var(--top1); } .gs-top2 .gs-rank { background: var(--top2); } .gs-top3 .gs-rank { background: var(--top3); color: var(--top-ink); }
:root[data-theme="dark"] .gs-top1 .gs-rank { color: #08240e; }

/* club day heat list: heats with neither chosen driver are greyed out */
.gs-chip.gs-chip-none { opacity: .55; background: transparent; border-style: dashed; }
.gs-chip.gs-chip-none[aria-pressed=true] { opacity: .85; }
.gs-chip .gs-chip-absent { color: var(--muted); font-style: italic; }

/* find a driver: stands out from the plain selects */
.gs-home-find .kt-search, .gs-ctl-find .kt-search { border: 2px solid color-mix(in srgb, var(--brand-blue) 55%, var(--line)); background: color-mix(in srgb, var(--brand-blue) 7%, var(--panel)); color: var(--accent); min-height: 44px; }
.gs-home-find .kt-search svg, .gs-ctl-find .kt-search svg { width: 18px; height: 18px; flex: none; }
.gs-home-find .kt-search input::placeholder, .gs-ctl-find .kt-search input::placeholder { color: var(--muted); opacity: 1; }
.gs-home-find .kt-search:focus-within, .gs-ctl-find .kt-search:focus-within { border-color: var(--accent); background: var(--panel); }
.gs-home-find > .gs-label, .gs-ctl-find > .gs-label { font-weight: 700; color: var(--fg); }
.gs-home-find { max-width: 480px; }
.gs-regions-note { margin: 8px 0 0; max-width: 72ch; }

/* logger: shared-kart (enduro) stint, e.g. "Holly's stint, laps 27–52" */
/* enduro stint tag ("Nikolas laps 1–25"): neutral, so it reads as a label, not a warning (Ben 2026-11-12: pink looked like an error) or a button */
.gs-stint { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, var(--bg)); color: var(--fg); border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); white-space: nowrap; cursor: help; }
.gs-stint-unknown { background: var(--panel); color: var(--muted); border-style: dashed; }
.gs-legs { display: grid; gap: 8px; margin: 10px 0 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); max-width: 560px; }
.gs-legs-q { margin: 0; font-weight: 600; }
.gs-legs-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; font-size: 14px; }
.gs-legs-row select { min-width: 200px; }
.gs-legs .gs-btn { justify-self: start; }
.gs-legs-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.gs-legs-line .gs-stint { font-size: 11px; }
.gs-up-sum { font-weight: 600; list-style: none; margin-bottom: 4px; }

/* lap picker filters (race day, class, driver) */
.gs-lg-pickfilters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; margin: 8px 0 12px; }
.gs-lg-pickfilters select { width: 100%; }

/* phones: control boxes as pull-up sheets (sheet.js) */
.gs-sheet-bar, .gs-sheet-head, .gs-sheet-scrim { display: none; }
@media (max-width: 700px) {
  .gs-sheet { position: fixed; left: 0; right: 0; top: 0; bottom: auto; z-index: 41; margin: 0; max-height: 82vh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--panel); border: 1px solid var(--line); border-radius: 0 0 18px 18px; border-top: 0; padding: env(safe-area-inset-top) 16px 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18); transform: translateY(-105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .gs-sheet.gs-sheet-init { transition: none; }
  .gs-sheet.is-open { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
  .gs-sheet .gs-lg-picks { border: 0; box-shadow: none; padding: 0; background: none; }
  .gs-sheet .gs-lg-picks > .gs-h-sm { display: none; }   /* the sheet's own title says it */
  .gs-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; grid-column: 1 / -1; flex: 1 0 100%; position: sticky; top: 0; z-index: 2;
    background: var(--panel); padding: 12px 0 8px; margin-bottom: 2px; touch-action: none; }
  .gs-sheet-head .gs-sheet-grip { display: none; }
  .gs-sheet-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
  .gs-sheet::after { content: ""; display: block; flex: 1 0 100%; grid-column: 1 / -1; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 14px auto 0; }
  .gs-sheet-bar { display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; top: 0; z-index: 40; width: 100%;
    font: inherit; font-size: 14px; color: var(--fg); background: var(--panel); border: 0; border-bottom: 1px solid var(--line); border-radius: 0 0 16px 16px;
    padding: calc(10px + env(safe-area-inset-top)) 16px 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); cursor: pointer; text-align: left; touch-action: none; }
  .gs-sheet-bar[hidden] { display: none; }
  .gs-sheet-bar .gs-sheet-grip { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); }
  .gs-sheet-what { flex: 1; min-width: 0; display: grid; gap: 1px; }
  .gs-sheet-l1, .gs-sheet-l2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gs-sheet-l1 { font-weight: 600; }
  .gs-sheet-l2 { font-size: 13px; color: var(--accent); font-weight: 600; }
  .gs-sheet-l2[hidden] { display: none; }
  .gs-sheet-go { flex: none; color: var(--accent); font-weight: 600; }
  .gs-sheet-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .35); }
  html.gs-sheet-lock, html.gs-sheet-lock body { overflow: hidden; }
  /* --gs-bar-h = the bar's height (sheet.js); things stuck to the top of the screen sit below it */
  body { padding-top: var(--gs-bar-h, 0px); }
  .gs-nav, .gs-lg-selbar { top: var(--gs-bar-h, 0px) !important; }
}
/* back to top (sheet.js) */
.gs-totop { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 39; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--fg); background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); opacity: .92; }
.gs-totop:hover { opacity: 1; }
.gs-totop[hidden] { display: none; }
/* logger: floating Compare button, centred above everything incl. the phone sheet (Ben 2026-11-13) */
.gs-lg-gocmp { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 42;
  padding: 10px 20px; border-radius: 999px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); white-space: nowrap; }
.gs-lg-gocmp[hidden] { display: none; }
.gs-chip-more { background: transparent; border-style: dashed; color: var(--muted, inherit); }
.gs-lg-picmore { margin-top: 10px; }
@media (max-width: 700px) { body:has(.gs-sheet.is-open) .gs-lg-gocmp { z-index: 42; } }
.gs-ask-other { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gs-ask-other input { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--fg); min-width: 0; width: 14em; max-width: 100%; }
.gs-odds { display: inline-grid; grid-template-columns: auto 1fr; grid-template-areas: "pc name" "pc sub"; column-gap: 10px; align-items: center; text-align: left; padding: 8px 12px; border-width: 1px; border-style: solid; }
.gs-odds .gs-odds-pc { grid-area: pc; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.gs-odds .gs-odds-name { grid-area: name; font-weight: 600; }
.gs-odds .gs-odds-sub { grid-area: sub; font-size: 12px; opacity: .8; }
.gs-odds:not(:has(.gs-odds-pc)) { grid-template-areas: "name" "sub"; grid-template-columns: 1fr; }
.gs-odds-hi { background: color-mix(in srgb, var(--accent-3) 16%, var(--panel)); border-color: var(--accent-3); color: var(--fg); }
.gs-odds-mid { background: color-mix(in srgb, #d98a00 14%, var(--panel)); border-color: #d98a00; color: var(--fg); }
.gs-odds-lo { background: var(--panel); border-color: var(--line); color: var(--fg); }

/* upload tab (2026-11-11 tidy) */
.gs-up-head { max-width: 75ch; }
.gs-up-head h2 { margin-bottom: 4px; }
.gs-up-head .gs-sub { margin: 0; font-size: 15px; line-height: 1.5; }
.gs-up-card { display: grid; gap: 16px; margin: 14px 0 18px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.gs-up-card .gs-drop { display: grid; justify-items: center; gap: 4px; padding: 22px 16px; text-align: center; border: 2px dashed var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); cursor: pointer; }
.gs-up-card .gs-drop:hover, .gs-up-card .gs-drop.is-over, .gs-up-card .gs-drop:focus-within { border-color: var(--accent); color: var(--fg); }
.gs-up-card .gs-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.gs-drop-main { font-size: 16px; color: var(--fg); }
.gs-drop-main strong { color: var(--accent); }
.gs-drop-sub { font-size: 13px; }
.gs-up-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px 20px; align-items: start; }
.gs-up-opts .gs-check { display: flex; gap: 10px; align-items: flex-start; padding: 0; font-size: 14px; cursor: pointer; }
.gs-up-opts .gs-check input { margin: 3px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.gs-up-opts .gs-check span { display: grid; gap: 2px; }
.gs-up-opts .gs-check small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.gs-up-opts .gs-ctl { max-width: none; min-width: 0; }
#up-driver:disabled { opacity: .5; cursor: not-allowed; }
#up-driver-ctl:has(#up-driver:disabled) .gs-label { opacity: .6; }
.gs-up-actions { display: flex; justify-content: flex-end; }
.gs-up-actions .gs-btn { min-width: 160px; padding: 9px 18px; font-size: 15px; }
.gs-up-actions .gs-btn:disabled { opacity: .45; cursor: default; }
.gs-up-results, .gs-up-mine { margin: 0 0 20px; }
.gs-up-results h3, .gs-up-mine h3 { margin: 0 0 8px; }
.gs-up-mine .gs-note { margin: 0 0 10px; }
.gs-up-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; font-size: 14px; }
.gs-up-list > li { padding: 10px 14px; border-top: 1px solid var(--line); }
.gs-up-list > li:first-child { border-top: 0; }
.gs-up-list > li.gs-up-sum { font-weight: 600; background: var(--bg); }
.gs-up-list > li.gs-up-empty { color: var(--muted); }
.gs-up-row { display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 10px; row-gap: 4px; align-items: baseline; }
.gs-up-row::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); transform: translateY(-1px); grid-row: 1 / span 2; align-self: start; margin-top: 5px; }
.gs-up-row > :not(.gs-up-name):not(.gs-up-msg)::before { content: none; }
.gs-up-row > * { grid-column: 2; min-width: 0; }
.gs-up-name { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.gs-up-name:empty { display: none; }
.gs-up-msg { line-height: 1.45; overflow-wrap: anywhere; }
.gs-up-row.is-ready::before { background: var(--muted); }
.gs-up-row.is-busy::before { background: var(--accent); animation: gs-pulse 1s ease-in-out infinite alternate; }
.gs-up-row.is-ok::before { background: var(--ok); }
.gs-up-row.is-skip::before { background: var(--warn); }
.gs-up-row.is-skip .gs-up-msg { color: var(--muted); }
.gs-up-row.is-bad::before { background: var(--bad); }
.gs-up-row.is-bad .gs-up-msg { color: var(--bad); }
.gs-up-row > .gs-up-view { justify-self: start; }
.gs-up-row.is-ask { background: color-mix(in srgb, var(--warn) 7%, var(--panel)); }
.gs-up-row.is-ask::before { background: var(--warn); }
.gs-up-row .gs-ask-row { margin-top: 4px; }
@keyframes gs-pulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gs-up-row.is-busy::before { animation: none; } }
.gs-up-mine-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.gs-up-mine-row::before { content: none; }
.gs-up-mine-row > * { grid-column: auto; }
.gs-up-mine-row > .gs-legs, .gs-up-mine-row > form { grid-column: 1 / -1; }
.gs-up-what { display: grid; gap: 2px; min-width: 0; }
.gs-up-what .gs-sub { font-size: 13px; overflow-wrap: anywhere; }
.gs-up-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) {
  .gs-up-mine-row { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .gs-up-acts { justify-content: flex-start; }
  .gs-up-actions .gs-btn { width: 100%; }
}
/* upload progress, fixed to the bottom of the window (logger.js drawProgress) */
.gs-up-prog { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); padding: 0 16px calc(10px + env(safe-area-inset-bottom)); font-size: 14px; }
.gs-up-prog[hidden] { display: none; }
.gs-up-prog-track { height: 5px; margin: 0 -16px 8px; background: var(--line); }
.gs-up-prog-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.gs-up-prog.is-done .gs-up-prog-fill { background: var(--ok); }
.gs-up-prog-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto; }
.gs-up-prog-txt { flex: 1 1 240px; min-width: 0; font-variant-numeric: tabular-nums; }
.gs-up-prog-btns { display: flex; gap: 6px; }
.gs-up-prog-now { max-width: 1100px; margin: 2px auto 0; font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-up-prog-now:empty { display: none; }
body.gs-has-prog { padding-bottom: 84px; }
body.gs-has-prog .gs-totop { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .gs-up-prog-fill { transition: none; } }
/* kart number as a yellow number plate */
.gs-plate { display: inline-block; min-width: 1.9em; padding: 0 .38em; border: 1.5px solid #1a1a1a; border-radius: 4px; background: #ffd400; color: #111;
  font-weight: 800; font-size: .82em; line-height: 1.45; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .02em; vertical-align: .08em; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.gs-plate-l { background: #fff; }   /* numbers ending in L */
.gs-plate-m { background: #9ee34a; }   /* numbers ending in M */
.kt-plate { margin-left: auto; flex: none; font-size: 12px; }
/* "Which period?" after finding a driver (app.js askPeriod, home.js) */
.gs-period { flex: 1 0 100%; grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 2px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.gs-period-q { font-weight: 600; font-size: 14px; margin-right: 4px; }
.gs-period .gs-chip { display: inline-flex; gap: 6px; align-items: baseline; background: var(--panel); }
.gs-period .gs-chip[aria-pressed=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.gs-period-x { margin-left: auto; }
.gs-period-row { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gs-period-h { flex: 0 0 52px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.gs-period-row + .gs-period-row { padding-top: 6px; border-top: 1px solid var(--line); }
.gs-period:focus { outline: none; }
.gs-period-row .gs-period-h { flex-basis: 100%; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--fg); }
.gs-period .gs-chip-go { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.gs-period .gs-chip-go small { color: var(--muted); font-weight: 400; }
.gs-period .gs-chip-go:hover { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.gs-chip-arrow { margin-left: 2px; }
.gs-period-note { flex: 1 0 100%; color: var(--muted); font-size: 12px; }
.kt-plates { margin-left: auto; flex: none; display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 45%; font-size: 12px; }
.gs-plate-more { font: inherit; font-size: 12px; color: var(--accent); background: none; border: 0; padding: 0 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; vertical-align: .1em; }
.gs-plates-once { opacity: .7; }
/* driver's classes under the header (app.js drawClassChips) */
.gs-class-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 4px; }
.gs-class-chips[hidden] { display: none; }
.gs-class-chips-lab { font-size: 13px; color: var(--muted); margin-right: 2px; }
.gs-class-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); }
.gs-class-chip small { font-size: 12px; }
.gs-class-chip[aria-pressed=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.gs-class-chip .gs-plate { font-size: 11px; }
/* logger Sessions list: a card per day per venue, split by class (logger.js drawList, Ben 2026-11-11) */
#view-sessions .gs-lg-filters .gs-ctl { flex: 1 1 200px; min-width: 0; }
#view-sessions .gs-lg-filters select { width: 100%; }
.gs-lg-active { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.gs-btn-sm { font-size: 13px; padding: 3px 10px; }
.gs-lg-tracks { gap: 12px; }
.gs-lg-day { padding: 0; overflow: hidden; }
.gs-lg-day > summary { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px 12px 34px; }
.gs-lg-day > summary::before { top: 14px; left: 12px; }
.gs-lg-day[open] > summary { margin-bottom: 0; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.gs-lg-cal { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); line-height: 1; }
.gs-lg-cal b { font-size: 21px; }
.gs-lg-cal small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: -10px; }
.gs-lg-day-txt { display: grid; gap: 3px; min-width: 0; }
.gs-lg-day-txt strong { font-size: 16px; }
.gs-lg-day-sub { font-size: 13px; color: var(--muted); }
.gs-lg-day-pills { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 2px 0; }
.gs-lg-pill { font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); white-space: nowrap; }
.gs-lg-pill-prac { border-color: var(--line); background: transparent; color: var(--muted); }
.gs-lg-class { padding: 10px 14px 6px; border-top: 1px solid var(--line); min-width: 0; }
.gs-lg-class-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 4px; }
.gs-lg-class-head h4 { margin: 0; font-size: 15px; }
.gs-lg-class-acts { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; }
.gs-lg-more-days { justify-self: center; }
@media (max-width: 700px) {
  .gs-lg-day > summary { gap: 10px; padding: 10px 10px 10px 28px; }
  .gs-lg-day > summary::before { left: 8px; }
  .gs-lg-cal { width: 44px; height: 44px; }
  .gs-lg-class { padding: 8px 10px 4px; }
  .gs-lg-class-acts { margin-left: 0; }
}
@media (max-width: 700px) {   /* phones: each session row stacks as a small card */
  .gs-lg-class .gs-tablewrap { overflow: visible; }
  .gs-lg-class .gs-lg-list, .gs-lg-class .gs-lg-list tbody { display: block; width: 100%; }
  .gs-lg-class .gs-lg-list thead { display: none; }
  .gs-lg-class .gs-lg-list tr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 8px; row-gap: 0; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .gs-lg-class .gs-lg-list tr:last-child { border-bottom: 0; }
  .gs-lg-class .gs-lg-list td { padding: 0; border: 0; text-align: left !important; font-size: 14px; min-width: 0; }
  .gs-lg-class .gs-lg-list td:nth-child(1) { grid-row: 1 / span 3; }
  .gs-lg-class .gs-lg-list td:nth-child(2) { grid-column: 2; grid-row: 1; font-weight: 600; }
  .gs-lg-class .gs-lg-list td:nth-child(8) { grid-column: 2 / span 2; grid-row: 4; margin-top: 6px; white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; }
  .gs-lg-class .gs-lg-list td:nth-child(8) .gs-btn + .gs-btn { margin-left: 0; }
  .gs-lg-class .gs-lg-list td:nth-child(3) { grid-column: 2; grid-row: 2; color: var(--muted); }
  .gs-lg-class .gs-lg-list td:nth-child(4) { grid-column: 2; grid-row: 3; }
  .gs-lg-class .gs-lg-list td:nth-child(4):empty { display: none; }
  .gs-lg-class .gs-lg-list td:nth-child(6) { grid-column: 2; grid-row: 3; justify-self: end; color: var(--muted); }
  .gs-lg-class .gs-lg-list .gs-lg-ph { display: inline; }
  .gs-lg-class .gs-lg-list td:nth-child(5), .gs-lg-class .gs-lg-list td:nth-child(7) { display: none; }
}
.gs-heat-map { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 4px 0 10px; }
.gs-heat-map-btn { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; }
/* whole-heat replay (logger.js drawHeatRoad) */
.gs-lg-replay-title { margin: 0 0 6px; }
.gs-lg-replay-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; justify-content: flex-start; margin-bottom: 8px; }
.gs-lg-replay-head:not(:has(> :not([hidden]))) { display: none; }
#road { margin-top: 10px; }
.gs-lg-lane-lap { fill: color-mix(in srgb, var(--muted) 18%, transparent); }
.gs-lg-ghost-label { font-size: 12px; font-weight: 700; fill: var(--fg); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; pointer-events: none; }
.gs-lg-hdot { stroke: #222; stroke-width: 1.5px; stroke-dasharray: 2.5 2; fill-opacity: .9; }
.gs-lg-hdot.is-real { stroke: #fff; stroke-width: 3px; fill-opacity: 1; stroke-dasharray: none; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.gs-lg-hdot.is-done { opacity: .55; }
.gs-lg-ghost-label { font-weight: 500; font-size: 11px; }
.gs-lg-ghost-label.is-real { font-weight: 800; font-size: 12.5px; }
.gs-lg-board { font-size: 14px; }
.gs-lg-board tr.gs-lg-classrow th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); padding-top: 10px; border-bottom: 1px solid var(--line); }
.gs-lg-board td:nth-child(1), .gs-lg-board td:nth-child(3), .gs-lg-board td:nth-child(4), .gs-lg-board td:nth-child(5) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-lg-board tr.is-real td { font-weight: 600; }
.gs-lg-dotkey { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.gs-lg-dotkey::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px dashed #222; background: var(--dot, var(--panel)); }
.gs-lg-dotkey.is-real { color: var(--fg); font-weight: 700; }
.gs-lg-dotkey.is-real::before { border: 2px solid #fff; background: var(--dot); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.gs-lg-board th, .gs-lg-board td { text-align: left; }
.gs-lg-replay { margin: 10px 0; }
/* race progress: one block per lap (width = lap time), filled in the kart's colour as it goes */
.gs-lg-board td:nth-child(4) { width: 34%; min-width: 140px; }
.gs-rp-lapbar { display: flex; gap: 2px; height: 12px; }
/* enduro legs: one block per driver under the lap bar, with a tick where each took over; the one driving now in bold */
.gs-rp-legs { display: flex; margin-top: 2px; font-size: 11px; line-height: 1.2; color: var(--muted); }
.gs-rp-legs span { min-width: 0; padding-left: 4px; border-left: 2px solid var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-rp-legs span.is-now { color: var(--fg); font-weight: 600; }
.gs-rp-lapbar span { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--dot) calc(var(--f, 0) * 100%), color-mix(in srgb, var(--muted) 22%, transparent) 0); }
.gs-lg-replay-link { margin: 0 0 10px; }
.gs-lg-replay-link:has(> [hidden]) { display: none; }
/* race replay page (replay.js) */
.gs-rp-links { margin: 6px 0 0; font-size: 15px; }
/* "Raced in this event? Upload your GPS trace" under the heat's links: a soft button whose sentence wraps on phones */
.gs-rp-cta { margin: 10px 0 0; }
.gs-rp-cta[hidden] { display: none; }
.gs-rp-cta .gs-btn.gs-btn-soft { font-weight: 400; font-size: 14px; padding: 7px 14px; line-height: 1.35; white-space: normal; text-align: left; max-width: 100%; }
.gs-rp-bar { display: flex; gap: 12px; align-items: center; margin: 4px 0 10px; }
.gs-rp-bar input[type=range] { flex: 1; }
/* red flags and VSKs marked under the slider (replay.js marks()) */
.gs-rp-track { flex: 1; position: relative; display: flex; align-items: center; }
.gs-rp-track input[type=range] { width: 100%; }
.gs-rp-marks { position: absolute; left: 8px; right: 8px; bottom: -5px; height: 4px; pointer-events: none; }
.gs-rp-marks span { position: absolute; top: 0; bottom: 0; min-width: 3px; border-radius: 2px; }
.gs-rp-marks .is-red { background: #e10600; }
.gs-rp-marks .is-vsk { background: #ffd400; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.gs-rp-time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 4.5em; text-align: right; }
.gs-rp-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin-bottom: 10px; }
.gs-rp-map { margin-bottom: 12px; }
.gs-rp-map { position: relative; }
/* Virtual Safety Kart (VSK): flashes red and yellow ahead of the leader (replay.js); about 1 flash a second, well under 3 Hz */
.gs-rp-vtag rect { fill: #111; stroke: #ffd400; stroke-width: 1.5px; }
.gs-rp-vtag text { fill: #ffd400; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.gs-rp-vdot { fill: #e10600; stroke: #111; stroke-width: 2.5px; animation: gs-vsc-flash .9s steps(1, end) infinite; filter: drop-shadow(0 0 3px rgba(0,0,0,.6)); }
@keyframes gs-vsc-flash { 0% { fill: #e10600; } 50% { fill: #ffd400; } }
@media (prefers-reduced-motion: reduce) { .gs-rp-vdot { animation: none; fill: #ffd400; stroke: #e10600; stroke-width: 4px; } }
/* race control notices along the bottom of the replay map */
.gs-rp-notes { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.gs-rp-notes[hidden] { display: none; }
.gs-rp-notes p { margin: 0; max-width: 100%; padding: 4px 9px; border-radius: 6px; background: rgba(17,17,17,.78); color: #fff; font-size: 13px; line-height: 1.35; border-left: 4px solid transparent; }
.gs-rp-notes p.is-new { border-left-color: #ffd400; font-weight: 600; }
.gs-rp-notes p.is-red { background: #e10600; color: #fff; font-weight: 700; border-left-color: #fff; }
.gs-rp-notes button { pointer-events: auto; margin-left: 10px; padding: 2px 8px; border: 1px solid #fff; border-radius: 5px; background: rgba(0,0,0,.25); color: inherit; font: inherit; cursor: pointer; }
.gs-rp-notes p.is-vsc { background: #ffd400; color: #111; font-weight: 700; border-left-color: #e10600; }
.gs-rp-notes .gs-rule { pointer-events: auto; }
/* rule codes in race control notices: meaning on hover or tap (rules.js) */
.gs-rule { position: relative; text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; border-radius: 2px; }
.gs-rule:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gs-rule:hover::after, .gs-rule:focus::after {
  content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 20;
  width: max-content; max-width: min(300px, 80vw); padding: 6px 9px; border-radius: 6px;
  background: #111; color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.4; white-space: normal;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); pointer-events: none;
}
.gs-rp-notes .at { margin-right: 8px; opacity: .75; font-variant-numeric: tabular-nums; font-weight: 400; }
.gs-lg-hdot.is-out { opacity: .45; }
.gs-rp-tag.is-dnf { opacity: .7; }
.gs-rp-tag { pointer-events: none; }
.gs-rp-tag rect { stroke: rgba(0,0,0,.55); stroke-width: 1px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.gs-rp-tag text { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gs-rp-tag.is-real text { font-weight: 800; }
.gs-rp-tag.is-over { opacity: .35; }
.gs-rp-tag { transition: opacity .15s; }
.gs-lg-board tr.is-out td { color: var(--muted); }

/* "Find a club day" search above the one-club-day part (2026-11-12) */
.gs-day-find { display: grid; gap: 4px; width: min(100%, 380px); }
/* club day header (Ben 2026-11-13): one card with the event, its date, the day search and the day's facts */
.gs-day-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 16px; margin: 0 0 18px; }
.gs-day-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 24px; }
.gs-day-id { min-width: 0; flex: 1 1 280px; }
.gs-day-id h2 { margin: 4px 0 2px; }
.gs-day-date { margin: 0; color: var(--muted); }
.gs-day-facts { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gs-day-facts li { font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-variant-numeric: tabular-nums; }
.gs-heat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.gs-heat-grid .gs-chip { align-content: start; gap: 3px; padding: 9px 12px; min-width: 0; }
.gs-chip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gs-chip-head strong { font-weight: 600; }
.gs-chip-time { color: var(--muted); }
.gs-chip-res, .gs-heat-grid .gs-chip > small:not(.gs-chip-absent) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-day-note { font-size: 13px; color: var(--muted); max-width: 80ch; margin: 2px 0 10px; }
.gs-day-find .kt-search { border: 2px solid color-mix(in srgb, var(--brand-blue) 55%, var(--line)); background: color-mix(in srgb, var(--brand-blue) 7%, var(--panel)); color: var(--accent); min-height: 44px; }
.gs-day-find .kt-search:focus-within { border-color: var(--accent); background: var(--panel); }
.gs-day-find .kt-search input { border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 16px; width: 100%; padding: 8px 0; box-shadow: none; }
.gs-day-find .kt-search input::placeholder { color: var(--muted); opacity: 1; }

/* tap a row or chart line to make that driver the compare driver (2026-11-12) */
.gs tbody tr[tabindex] { cursor: pointer; }
.gs tbody tr[tabindex]:hover td { background: color-mix(in srgb, var(--brand-blue) 7%, transparent); }
.gs tbody tr[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gs-tap-hint { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.gs-toast { position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 12px); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 14px; box-shadow: 0 6px 20px rgb(0 0 0 / .25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); text-align: center; }
.gs-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .gs-toast { transition: none; } }

/* driver card: same name in other regions (2026-11-12) */
.gs-bio-away { margin: 0; font-size: 14px; color: var(--muted); }
.gs-bio-away a { font-weight: 600; }

/* heat result: team / unnamed entries (2026-11-12) */
.gs-entry-tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: 1px; }
/* a middle-weight button: tinted, accent border and text, between .gs-btn (solid) and .gs-btn-quiet (plain).
   Ben 2026-11-12: the Sessions "Laps" buttons should stand out more; "Add or change laps" between plain and solid */
.gs-btn.gs-btn-soft { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  font-weight: 600; padding: 4px 12px; font-size: 13px; }
.gs-btn.gs-btn-soft:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 20%, var(--bg)); border-color: var(--accent); filter: none; }
.gs-btn.gs-btn-soft:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gs-btn.gs-lg-addlaps { font-size: 14px; padding: 6px 14px; display: inline-flex; align-items: center; gap: 7px; }
.gs-btn.gs-lg-addlaps::after { content: "▾"; font-size: 11px; transition: transform .15s ease; }
.gs-btn.gs-lg-addlaps[aria-expanded=true]::after { transform: rotate(180deg); }
/* "Test site" flag: deploy.sh adds the element on the racing.precedent.nz test deploy only */
.gs-test-flag { position: fixed; left: 8px; bottom: 8px; z-index: 9999; pointer-events: none; padding: 3px 9px; border-radius: 999px; background: #b45309; color: #fff; font: 600 12px/1.4 var(--sans, system-ui, sans-serif); letter-spacing: .02em; box-shadow: 0 1px 4px rgba(0,0,0,.3); opacity: .92; }
/* replay pits (Ben 2026-11-12): the lane off the track, a "P" where karts stop, pit laps in the race progress bar */
.gs .gs-rp-pitlane { fill: none; stroke: #fff; stroke-width: 2.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; opacity: .9; }
.gs-rp-pit circle { fill: #1d4ed8; stroke: #fff; stroke-width: 2; }
.gs-rp-pit text { fill: #fff; font: 700 10px var(--sans); pointer-events: none; }
.gs-rp-pit .gs-rp-pit-label { fill: #fff; font-size: 11px; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 3px; text-anchor: end; }
.gs-rp-lapbar span.is-pit { outline: 1.5px solid var(--fg); outline-offset: 0; }
.gs-rp-pittable { width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.gs .gs-rp-pittable th, .gs .gs-rp-pittable td { border-bottom: 0; padding: 4px 8px; vertical-align: top; }
.gs .gs-rp-pittable .num { text-align: right; }
.gs .gs-rp-pittable .gs-rp-pitkart { text-align: left; white-space: normal; width: 45%; }
.gs .gs-rp-pittable tbody th.gs-rp-pitkart { color: var(--fg); font-weight: 600; }
.gs .gs-rp-pittable tr.is-first > * { border-top: 1px solid var(--line); padding-top: 8px; }
.gs .gs-rp-pittable tbody tr:first-child > * { border-top: 0; }
.gs .gs-rp-pittable thead th { border-bottom: 1px solid var(--line); }
.gs-rp-pitname { margin-right: 6px; }
.gs-rp-pitcount { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.gs-rp-pitlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.gs-rp-pitlist li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.gs-rp-pitlist li strong { font-weight: 600; min-width: 16em; }
.gs .gs-rp-pitlane.gs-rp-paddock { stroke-width: 1.5; stroke-dasharray: 2 4; opacity: .7; }

/* replay page on desktop: full window width, running order beside the map (Ben 2026-11-13) */
@media (min-width: 1100px) { .gs.gs-rp-page { max-width: none; padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1280px) {
  .gs-rp-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(600px, 0.85fr); gap: 20px; align-items: start; margin-bottom: 12px; }
  .gs-rp-stage .gs-rp-map { position: sticky; top: 12px; margin-bottom: 0; }
}
.gs-rp-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
/* running order fits its column without a sideways scroll (Ben 2026-11-13): team names wrap, long races get thinner lap blocks */
.gs .gs-lg-board td:nth-child(2) { white-space: normal; min-width: 11em; }
.gs-rp-stage .gs-lg-board td:nth-child(4) { width: auto; }
.gs-lg-board td:nth-child(4) { min-width: 110px; }
.gs-rp-lapbar.is-long { gap: 1px; }
.gs-rp-lapbar.is-long span { min-width: 0; border-radius: 1px; }
.gs-rp-lapbar.is-vlong { gap: 0; border-radius: 2px; overflow: hidden; }
.gs-rp-lapbar.is-vlong span { border-radius: 0; }
.gs-rp-lapbar.is-vlong span.is-pit { outline-offset: -1.5px; }

/* home: championship points club list (opens from the points card) */
.gs-card-pick { --pc: var(--brand-blue); --pc-t: var(--accent); grid-column: 1 / -1; border: 1px solid var(--line); border-top: 3px solid var(--pc); border-radius: 14px; padding: 14px 12px; background: var(--panel); box-shadow: var(--shadow); }
.gs-card-pick[hidden] { display: none; }
.gs-card-pick-h { margin: 0 0 10px; font-size: 16px; }
.gs-card-pick-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.gs-card-pick-list a { display: grid; grid-template-columns: 1fr auto; gap: 0 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--fg); text-decoration: none; }
.gs-card-pick-list a:hover, .gs-card-pick-list a:focus-visible { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 8%, var(--panel)); }
.gs-card-pick-list strong { grid-column: 1; }
.gs-card-pick-list span:not(.gs-chip-arrow) { grid-column: 1; font-size: 12px; color: var(--muted); }
.gs-card-pick-list .gs-chip-arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--pc-t); }
#pick-h2h { --pc: var(--brand-green); --pc-t: var(--accent-3); }
#pick-points { --pc: #eab308; --pc-t: #a16207; }
.gs-cards { grid-auto-flow: row dense; }   /* an open club list spans the row under its card; later cards fill in */

/* logger sessions list: Lap telemetry + Watch race buttons */
.gs-lg-open { white-space: nowrap; }
.gs-lg-open .gs-btn + .gs-btn { margin-left: 6px; }
.gs-lg-watch { text-decoration: none; display: inline-block; }

/* wider screens: the menu box stays at the top of the page; a one-line bar (app.js setupDeskBar) takes over once it's
   scrolled away, and "Change" floats the box down under the bar */
.gs-cbar, .gs-cbar-scrim, .gs-cbar-done { display: none; }
.gs-cbar-spot { position: absolute; width: 1px; height: 1px; pointer-events: none; }   /* out of the flow: no grid gap */
@media (min-width: 701px) {
  .gs-controls { position: static; }
  .gs-cbar:not([hidden]) { display: flex; align-items: center; gap: 12px; position: fixed; top: 0; left: 0; right: 0; z-index: 40; padding: 8px max(16px, calc((100vw - 1240px) / 2)); background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); font-size: 14px; }
  .gs-cbar-what { flex: 1; min-width: 0; display: flex; gap: 6px 14px; align-items: baseline; }
  .gs-cbar-l1, .gs-cbar-l2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .gs-cbar-l1 { font-weight: 600; flex: 0 1 auto; }
  .gs-cbar-l2 { color: var(--accent); font-weight: 600; font-size: 13px; flex: 0 1 auto; }
  .gs-cbar-l2[hidden] { display: none; }
  .gs-cbar-go { flex: none; padding: 5px 12px; }
  .gs-controls.is-drop { position: fixed; z-index: 41; top: var(--gs-cbar-h, 48px); left: 50%; transform: translateX(-50%); width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - var(--gs-cbar-h, 48px) - 24px); overflow-y: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); }
  .gs-controls.is-drop .gs-cbar-done { display: inline-flex; flex: none; margin-left: auto; align-self: end; }
  .gs-cbar-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .25); }
  .gs-nav { top: var(--gs-cbar-h, 0px); }
}
@media (min-width: 701px) and (max-width: 1099.98px) { .gs-nav { top: var(--gs-cbar-h, 0px) !important; } }

.gs-card-pick-back { margin: 0 0 6px -6px; padding: 4px 6px; font-size: 13px; }
.gs-card-pick > .gs-note { margin: 10px 0 0; }
.gs-card-pick-list.gs-card-pick-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

/* search boxes say what they search (Ben, 2026-11-13) */
.gs-find-scope { font-weight: 400; color: var(--muted); font-size: 12px; }
/* .gs-ctl-break (in the page) starts the row of menus under the search boxes */

/* race telemetry: "vs Rival ▾" under the title + first-visit notice (Ben, 2026-11-13) */
.gs-vs:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.gs-vs-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 15px; font-weight: 600; color: var(--fg); background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 999px; padding: 5px 12px 5px 6px; cursor: pointer; box-shadow: var(--shadow); }
.gs-vs-chip:hover, .gs-vs-chip:focus-visible { border-color: var(--accent); }
.gs-vs-v { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 7px; }
.gs-vs-caret { color: var(--accent); }
.gs-vs-why { color: var(--muted); font-size: 13px; }
.gs-vs-notice { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); font-size: 14px; transition: opacity .35s ease; }
.gs-vs-notice > span { flex: 1 1 auto; min-width: 0; }
.gs-vs-notice > button { flex: none; }
.gs-vs-notice.is-gone { opacity: 0; }
/* phones: the menu box never shows in the page before it becomes the pull-down sheet (no flash on load) */
@media (max-width: 700px) { .gs-controls:not(.gs-sheet) { display: none; } }

/* driver card: this club's numbers big, every club's small under each (Ben, 2026-11-13) */
.gs-bio-cap { margin: 10px 0 2px; font-size: 13px; color: var(--muted); }
.gs-bio-cap b { color: var(--fg); }
.gs-bio-all-key { color: var(--fg); font-weight: 600; }
.gs-bio-all { color: var(--muted); }
.gs-bio-all { display: block; font-size: 12px; margin-top: 2px; }
.gs-bio-all[hidden] { display: none; }

/* results: the chosen heat's finishing order under the heat buttons (Ben, 2026-11-13) */
.gs-heat-sum { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.gs-heat-sum:empty { display: none; }
.gs-heat-sum-head { margin: 0 0 6px; font-size: 14px; }
.gs-heat-sum-note { margin: 0 0 8px; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.gs-heat-sum-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 2px 16px; font-size: 14px; }
.gs-heat-sum-list li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; align-items: baseline; gap: 6px; padding: 3px 4px; border-radius: 6px; }
.gs-heat-sum-pos { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.gs-heat-sum-best { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.gs-heat-sum-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
button.gs-heat-sum-name { font: inherit; color: var(--fg); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
button.gs-heat-sum-name:hover { text-decoration-color: var(--accent); color: var(--accent); }
.gs-heat-sum-list li.is-me { background: color-mix(in srgb, var(--c0) 14%, transparent); font-weight: 600; }
.gs-heat-sum-list li.is-rival { background: color-mix(in srgb, var(--c1) 14%, transparent); font-weight: 600; }
.gs-heat-sum-more { display: inline-block; margin-top: 8px; font-size: 13px; }
/* "Embed this table" panel on the points page (2026-11-13) */
.gs-embed { margin-top: 22px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--panel); }
.gs-embed > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.gs-embed[open] > summary { margin-bottom: 8px; }
.gs-embed-opts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 10px 0 12px; }
.gs-embed-opts fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 3px; align-content: start; }
.gs-embed-opts legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 3px; }
.gs-embed-opts label { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.gs-embed-code { display: block; width: 100%; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); resize: vertical; margin-top: 4px; }
.gs-embed-actions { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.gs-embed-copied { font-size: 14px; color: var(--ok); }
.gs-embed-small { font-size: 13px; color: var(--muted); }
.gs-embed h4 { margin: 14px 0 6px; font-size: 14px; }
.gs-embed-preview { display: block; width: 100%; height: 360px; border: 1px dashed var(--line); border-radius: 8px; background: var(--bg); }

/* unknown ?club= (app.js): only the header and the club list */
.gs-noclub > :not(.gs-head):not(.gs-nav-wrap), body:has(.gs-noclub) .gs-related { display: none !important; }

/* no driver chosen (app.js drawPick): only the header, the menus and the list of drivers */
.gs-pick-list { display: none; }
body.gs-picking .gs-pick-list { display: block; margin: 8px 0 32px; }
body.gs-picking .gs-layout { grid-template-columns: minmax(0, 1fr) !important; padding-left: 0 !important; }
body.gs-picking .gs-nav, body.gs-picking .gs-vs, body.gs-picking .gs-ctl-vs, body.gs-picking .gs-ctl-2,
body.gs-picking .gs > :not(.gs-head):not(.gs-controls):not(.gs-pick-list) { display: none !important; }
.gs-pick-list h2 { font-size: 1.1rem; margin: 0 0 14px; }
.gs-pick-track { display: block; margin: 0 0 22px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--accent-2) 50%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent-2) 8%, var(--panel)); color: var(--fg); text-decoration: none; font-size: 15px; }
.gs-pick-search { display: none; }
@media (max-width: 700px) {
  .gs-pick-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 22px; padding: 11px 14px; font: inherit; font-size: 16px; text-align: left; cursor: text;
    color: var(--muted); background: color-mix(in srgb, var(--brand-blue) 7%, var(--panel)); border: 2px solid color-mix(in srgb, var(--brand-blue) 55%, var(--line)); border-radius: 10px; }
  .gs-pick-search svg { color: var(--accent); flex: none; }
  /* phones (Ben 2026-11-13): small gap under the intro, a clear gap between the bikes button and the search
     (so the search doesn't read as part of it) */
  body.gs-picking .gs-pick-list { margin-top: -30px; }
  .gs-pick-track { margin-bottom: 26px; }
  .gs-pick-search { margin-bottom: 26px; }
}
.gs-pick-track strong { color: var(--accent-2); margin-right: 4px; }
.gs-pick-track:hover { border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, var(--panel)); }
.gs-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 28px; align-items: start; }
.gs-pick-grid h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.gs-pick-grid ul { list-style: none; padding: 0; margin: 0; }
.gs-pick-grid li { padding: 3px 0; line-height: 1.5; }
.gs-pick-list .gs-pick-name { font-weight: 400; color: var(--fg); text-decoration: none; }
.gs-pick-list .gs-pick-name:hover { text-decoration: underline; }
body.gs-picking .gs-ctl:not(.gs-ctl-find):not(.gs-ctl-club):not(:has(#sel-track)) { display: none !important; }
body.gs-picking .gs-ctl-break { display: none; }

/* head to head: "Compare X with" + close matches (app.js drawMatch) */
.gs-match { margin: 6px 0 4px; }
.gs-match-q { margin: 0 0 8px; font-weight: 600; }
.gs-match-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.gs-match-opt { font: inherit; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 10px; padding: 9px 12px; display: grid; gap: 3px; align-content: start; }
.gs-match-opt:hover { border-color: var(--accent); }
.gs-match-opt[aria-pressed=true] { border: 2px solid var(--c1); padding: 8px 11px; background: color-mix(in srgb, var(--c1) 8%, var(--panel)); }
.gs-match-name { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.gs-match-opt small { color: var(--muted); font-size: 13px; }
.gs-match-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; max-width: 75ch; }
/* "Someone else" search inside the compare step */
.gs-match-find { border: 2px solid color-mix(in srgb, var(--brand-blue) 55%, var(--line)); background: color-mix(in srgb, var(--brand-blue) 7%, var(--panel)); color: var(--accent); min-height: 44px; align-self: stretch; }
.gs-match-find input { border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 16px; width: 100%; padding: 8px 0; box-shadow: none; }
.gs-match-find svg { flex: none; }
@media (max-width: 700px) { .gs-match-find { grid-column: 1 / -1; } }

/* Static pages for search engines (pipeline/pages.py: /drivers/, /clubs/, /tracks/; 2026-11-14) */
.sp { gap: 28px; }
.sp-crumbs { font-size: 14px; color: var(--muted); }
.sp-crumbs a { color: var(--accent); }
.sp-jump { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; }
.sp-jump a, .sp a { color: var(--accent); }
.sp-sec { display: grid; gap: 10px; min-width: 0; }
.sp-sec h2 { margin: 8px 0 0; font-size: 20px; }
.sp-sec h3 { margin: 10px 0 0; font-size: 15px; }
.sp-sec h3 .gs-muted { font-weight: 400; font-size: 13px; }
.sp-sec > p { margin: 0; }
.sp .sp-table td { white-space: normal; }
.sp-small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sp .sp-table th:not(.num), .sp .sp-table td:not(.num) { text-align: left; }
.sp-list { margin: 0; padding-left: 20px; line-height: 1.7; }
.sp-cols { margin: 0; padding: 0; list-style: none; columns: 14em auto; column-gap: 24px; line-height: 1.8; }
.sp-az { display: flex; flex-wrap: wrap; gap: 6px; font-size: 16px; }
.sp-az a { display: inline-block; min-width: 2.2em; padding: 6px 4px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-decoration: none; }
.sp-browse { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; font-size: 14px; }
.sp-browse a { color: var(--accent); }
.gs-madeby-wrap { flex-direction: column; align-items: center; }

/* Phone key of the laps being compared (logger Compare tab); the full list is in the pull-down sheet there */
.gs-lg-key { display: none; }
@media (max-width: 700px) {
  .gs-lg-key:not([hidden]) { display: block; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  .gs-lg-key ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
  .gs-lg-key li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: 14px; }
  .gs-lg-key li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gs-lg-key li strong { font-variant-numeric: tabular-nums; }
}

/* phone-only text inside table cells (logger session rows) */
.gs-lg-ph { display: none; }

/* Phone "Change filters" button (sheet.js choices): what's chosen, on the page; tap = open the pull-down */
.gs-choose { display: none; }
@media (max-width: 700px) {
  .gs-choose:not([hidden]) { display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 12px; min-height: 48px; padding: 7px 8px 7px 12px; text-align: left;
    border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg); font: inherit; cursor: pointer; }
  .gs-choose-what { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--muted);
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .gs-choose-go { flex: none; padding: 7px 11px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
  .gs-choose:active { transform: translateY(1px); }
}

/* logger's own lap table under a session in the lap picker (only when its line isn't the timing line) */
.gs-lg-own { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--accent-3); background: color-mix(in srgb, var(--accent-3) 6%, transparent); border-radius: 0 8px 8px 0; }
.gs-lg-own .gs-note { margin: 0 0 4px; }
.gs-lg-own-times { margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.6; }
/* race control announcements on a heat (Speedhive session announcements) */
.gs-rc { border-left: 3px solid var(--warn); background: var(--panel); border-radius: 6px; padding: 8px 12px; margin: 4px 0 10px; }
.gs-rc-head { margin: 0 0 4px; font-weight: 600; font-size: 13px; color: var(--warn); }
.gs-rc ul { margin: 0; padding: 0; list-style: none; }
.gs-rc li { margin: 2px 0; overflow-wrap: anywhere; }
.gs-rc-at { color: var(--muted); font-variant-numeric: tabular-nums; }
.gs-entry-tag.gs-note-tag { border-color: var(--warn); color: var(--warn); }
.sp-rc { border-left: 3px solid var(--warn); padding: 4px 10px; margin: 6px 0; }
button.gs-note-tag { font: inherit; font-size: 11px; font-weight: 600; background: none; cursor: pointer; min-height: 24px; }
button.gs-note-tag:hover, button.gs-note-tag[aria-expanded="true"] { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.gs-note-row td { white-space: normal; border-left: 3px solid var(--warn); color: var(--fg); font-size: 13px; }
.gs-rp-vsc { border-left: 3px solid var(--warn); padding: 4px 10px; margin: 6px 0 10px; }
.gs-gaps-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
/* home: latest meetings (2026-11-16) */
.gs-latest { margin: 0 0 16px; }
.gs-latest .gs-card-pick-list strong { overflow-wrap: anywhere; }
/* privacy + report pages */
.gs-prose main { display: grid; gap: 14px; max-width: 70ch; }
.gs-prose .sp-sec p, .gs-prose .sp-sec li { line-height: 1.55; }
.gs-prose .sp-sec ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.gs-prose a { color: var(--accent); }
.gs-report { display: grid; gap: 6px; max-width: 520px; }
.gs-report .gs-label { font-size: 14px; font-weight: 700; color: var(--fg); margin-top: 8px; }
.gs-report .gs-label small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.gs-report input, .gs-report textarea { font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); width: 100%; box-sizing: border-box; }
.gs-report textarea { resize: vertical; min-height: 110px; }
.gs-report input:focus-visible, .gs-report textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gs-report-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.gs-report-go .gs-note.is-bad { color: var(--bad); }
/* home: recently viewed drivers (2026-11-16) */
.gs-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
.gs-recent[hidden] { display: none; }
.gs-recent .gs-label { flex: 1 0 100%; font-weight: 700; color: var(--fg); }
.gs-recent a.gs-chip { text-decoration: none; border-color: var(--accent); color: var(--accent); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.gs-recent a.gs-chip:hover { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.gs-recent-clear { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
/* the site menu looks the same on the static, privacy and report pages (their page-wide link colour was winning) */
.sp .gs-site a, .gs-prose .gs-site a { color: var(--muted); }
.sp .gs-site a:hover, .gs-prose .gs-site a:hover { color: var(--accent); }
/* Static pages restyled (2026-11-16, Ben: "boring"): gradient title, key-figure tiles, button links, sections as panels */
.sp .gs-lede { max-width: 68ch; }
.sp-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.sp-tiles .gs-tile { padding: 12px 14px; }
.sp-tiles .gs-big { font-size: 1.7rem; }
.sp .sp-jump { font-size: 0; gap: 8px; margin: 0; }
.sp .sp-jump a { font-size: 14px; font-weight: 600; text-decoration: none; padding: 7px 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 999px; background: var(--panel); }
.sp .sp-jump a:hover { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border-color: var(--accent); }
.sp .sp-sec { padding: 16px 16px 18px; border: 1px solid var(--line); border-top: 3px solid var(--brand-blue); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.sp .sp-sec:nth-of-type(3n+2) { border-top-color: var(--brand-pink); }
.sp .sp-sec:nth-of-type(3n) { border-top-color: var(--brand-green); }
.sp .sp-sec h2 { margin: 0; }
.sp .sp-sec h3 { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 16px; }
.sp .sp-sec h2 + h3, .sp .sp-sec p + h3 { border-top: 0; padding-top: 0; }
.sp .sp-table { font-size: 14px; }
.sp .sp-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.sp .sp-table td { padding-top: 7px; padding-bottom: 7px; }
.sp .sp-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--brand-blue) 4%, transparent); }
.sp .sp-table tbody tr:hover td { background: color-mix(in srgb, var(--brand-blue) 10%, transparent); }
.sp .sp-table a { text-decoration: none; font-weight: 600; }
.sp .sp-table a:hover { text-decoration: underline; }
.sp .sp-sec > .sp-list, .sp .sp-cols { list-style: none; padding: 0; margin: 0; columns: auto; display: flex; flex-wrap: wrap; gap: 6px; line-height: 1.3; }
.sp .sp-sec > .sp-list a, .sp .sp-cols a { display: inline-block; padding: 5px 11px; font-size: 14px; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.sp .sp-sec > .sp-list a:hover, .sp .sp-cols a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.sp .sp-rc { margin-top: 4px; padding: 8px 12px; border-left: 3px solid var(--brand-pink); background: color-mix(in srgb, var(--brand-pink) 5%, transparent); border-radius: 0 8px 8px 0; }
.sp .sp-az a { font-weight: 600; }
.sp .sp-az a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
@media (max-width: 700px) { .sp .sp-sec { padding: 12px 10px 14px; border-radius: 12px; } }
.sp .sp-day td.num, .sp .sp-day th.num { text-align: center; }
.sp .sp-day td:last-child, .sp .sp-day th:last-child { text-align: right; }
.sp-heats { margin-top: 4px; }
.sp-heats > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); padding: 6px 0; width: fit-content; }
.sp-heats[open] > summary { margin-bottom: 4px; }
.sp .sp-replays { align-items: center; }
.sp .sp-replays span { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.sp .sp-replays a { padding: 5px 12px; font-size: 13px; border-color: color-mix(in srgb, var(--brand-pink) 50%, var(--line)); color: var(--accent-2); }
.sp .sp-replays a:hover { background: color-mix(in srgb, var(--brand-pink) 8%, var(--panel)); border-color: var(--brand-pink); }
.sp .sp-table .gs-plate, .sp .sp-table .gs-entry-tag, .sp .sp-table .gs-logger-badge { margin-left: 4px; }
.sp .sp-table a.gs-logger-badge { font-weight: 600; }
/* the telemetry tag keeps its own pink on the static pages (their link colour was winning) */
.sp a.gs-logger-badge { color: var(--accent-2); text-decoration: none; }
.sp a.gs-logger-badge:hover { color: var(--fg); }
.sp .sp-find { margin-top: 0; }

/* a heat page (replay.html filled by pages.py): the result under the replay */
.sp-heat { margin-top: 20px; }
.sp-heat .sp-sec { max-width: 760px; }
#theme-label::after { content: " mode"; }
@media (max-width: 520px) { #theme-label::after { content: ""; } }
