/* RallySideKick website. Colours are the app's, which were measured from the logo. */
:root {
  /* surfaces */
  --bg: #090909;
  --bg-2: #0e0e0e;          /* alternate section band */
  --panel: #141414;
  --panel-2: #1b1b1b;
  --line: #2a2a2a;
  --line-soft: #1e1e1e;
  /* text */
  --text: #f5f5f5;
  --text-2: #d2d2d2;        /* body copy on dark */
  --muted: #a3a3a3;
  /* brand */
  --red: #f0140f;           /* the logo's red: headings and accents */
  --red-btn: #d9120e;       /* a shade darker so white button text passes 4.5:1 */
  --red-dark: #b80f0b;
  --red-ink: #ff5a55;       /* red that reads as small text and icons on dark */
  --yellow: #f7c90a;
  --orange: #f68908;
  --link: #5aa2ff;
  --ok: #3ecf5a;
  /* telemetry channels: the app's own colours, so a driver recognises the strip under a video */
  --ch-throttle: #1fae1f;
  --ch-brake: #d81f1a;
  --ch-clutch: #f7c90a;
  --ch-speed: #3d8bf2;
  --ch-grid: #26262a;
  /* shape and rhythm */
  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1160px;
  --section: clamp(64px, 9vw, 112px);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:hover { color: #8fc0ff; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.wrap.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); font-weight: 700; text-decoration: none;
  padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--bg); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9, 9, 9, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 22px; align-items: center; }
.nav a {
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 2px;
  transition: color 160ms var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--yellow); }
.nav a.nav-cta {
  background: var(--red-btn); color: #fff; padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 700;
  transition: background 160ms var(--ease);
}
.nav a.nav-cta:hover { background: var(--red-dark); color: #fff; }
.nav a.nav-cta[aria-current="page"] { color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--yellow); }
@media (max-width: 560px) {
  .site-header .wrap { min-height: 58px; gap: 10px; padding: 0 14px; }
  .brand img { height: 34px; }
  .nav { gap: 2px 10px; }
  .nav a { font-size: 14px; }
  .nav a.nav-cta { padding: 8px 10px; }
  /* One row on a phone: Contact stays in the footer of every page. */
  .nav a[href="/contact"] { display: none; }
}

/* ---- buttons ---- */
.btn {
  display: inline-block; border: 1px solid transparent; cursor: pointer;
  background: var(--red-btn); color: #fff;
  font: inherit; font-weight: 700; text-decoration: none;
  padding: 12px 22px; border-radius: var(--radius-sm);
  transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.lg { padding: 14px 26px; }
.btn.ghost { background: transparent; border-color: #3a3a3a; color: var(--text); }
.btn.ghost:hover { border-color: var(--muted); background: var(--panel); }
.btn[aria-disabled="true"], .btn:disabled {
  background: var(--panel-2); color: var(--muted); border: 1px dashed #444; cursor: not-allowed;
}

/* ---- type ---- */
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 14px;
}
h1 {
  font-size: clamp(38px, 5.6vw, 66px); line-height: 1.04; margin: 0 0 20px; letter-spacing: -0.025em;
  font-style: italic; font-weight: 800; text-wrap: balance;
}
h1 em { color: var(--red); font-style: inherit; }
h2 {
  font-size: clamp(28px, 3.8vw, 44px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -0.02em;
  font-style: italic; font-weight: 800; text-wrap: balance;
}
h3 { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--text-2); max-width: 34em; margin: 0 0 28px; }
.section-lede { color: var(--muted); font-size: 18px; max-width: 40em; margin: 0; }

/* ---- hero ----
   Wider than the rest of the page, with the tour video as the main thing in it. */
.wrap.wide { max-width: 1720px; padding-left: clamp(20px, 4.5vw, 72px); padding-right: clamp(20px, 4.5vw, 72px); }
.hero {
  position: relative; overflow: hidden; padding: 56px 0 0;
  background:
    radial-gradient(1200px 520px at 78% -6%, rgba(240, 20, 15, 0.28), transparent 70%),
    radial-gradient(640px 320px at 0% 0%, rgba(247, 201, 10, 0.06), transparent 70%);
}
/* Faint hazard stripes behind the video, fading out towards the words. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 26px);
  -webkit-mask-image: radial-gradient(70% 90% at 80% 30%, #000, transparent 75%);
  mask-image: radial-gradient(70% 90% at 80% 30%, #000, transparent 75%);
}
.hero > * { position: relative; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1040px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(40px, 4vw, 72px); }
  .hero { padding-top: 80px; }
  .hero h1 { font-size: clamp(44px, 4.6vw, 78px); }
}
.hero-grid > *, .feature > * { min-width: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.shot {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow);
}
.shot img { width: 100%; }
/* The tour video: fills its frame at 16:9, with no gap under it. */
.shot video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #090909; }

/* The tour video's frame: a band of the brand's red, orange and yellow runs round its edge,
   the same colours glow behind it, and on a wide screen it sits turned a little towards the
   words until the pointer or the keyboard reaches it. */
@property --lap { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes lap { to { --lap: 360deg; } }
.hero-media { position: relative; perspective: 1800px; }
.hero-media::before {
  content: ""; position: absolute; inset: 6% 4% -4%; pointer-events: none; border-radius: 40px;
  background: conic-gradient(from var(--lap), var(--red), var(--orange), var(--yellow), transparent 45%, var(--red));
  filter: blur(56px); opacity: 0.5;
  animation: lap 9s linear infinite;
}
.hero-media .shot {
  position: relative; border: 0; padding: 3px; border-radius: 18px;
  background: conic-gradient(from var(--lap), var(--red), var(--orange), var(--yellow), #2a2a2a 38%, #2a2a2a 62%, var(--red));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
  animation: lap 9s linear infinite;
  transition: transform 600ms var(--ease);
}
.hero-media .shot video { border-radius: 15px; }
@media (min-width: 1040px) and (hover: hover) {
  .hero-media .shot { transform: rotateY(-9deg) rotateX(3deg) translateZ(0); transform-origin: 30% 50%; }
  .hero-media:hover .shot, .hero-media:focus-within .shot { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media::before, .hero-media .shot { animation: none; }
  .hero-media .shot { transform: none; transition: none; }
}

.stats {
  list-style: none; margin: 56px 0 0; padding: 28px 0 40px;
  display: grid; gap: 20px 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--line);
}
.stats li { display: grid; gap: 2px; }
.stats b { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; font-style: italic; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }

/* ---- the games it works with, in one line under the hero ---- */
.strip { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 22px 0; }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.strip-label { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.strip li { font-weight: 700; font-size: 15px; letter-spacing: 0.04em; color: var(--text-2); }

/* ---- sections ---- */
section { padding: var(--section) 0; }
section.band { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { max-width: 46em; margin: 0 0 44px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .section-lede { margin-left: auto; margin-right: auto; }

/* One feature shown full width: its words in a row above a picture nothing is cut from. */
.showcase-text { display: grid; gap: 8px 48px; margin-bottom: 26px; }
.showcase-text h3 { font-size: clamp(22px, 2.2vw, 26px); }
.showcase-text p { color: var(--text-2); margin: 0; }
.showcase-text ul { margin: 0; padding-left: 20px; color: var(--text-2); }
.showcase-text li { margin-bottom: 6px; }
.showcase-text li::marker { color: var(--red-ink); }
@media (min-width: 960px) {
  .showcase-text { grid-template-columns: 6fr 5fr; }
  .showcase-text h3 { grid-column: 1 / -1; }
}

/* ---- the spoken debrief: what it does on the left, what it says on the right. The quote is
        the app's own words from a real run, set large because it is the thing being sold. ---- */
.heard { display: grid; gap: 32px; align-items: center; margin-top: clamp(56px, 7vw, 88px); }
@media (min-width: 960px) { .heard { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 5vw, 72px); } }
.heard-text h3 { font-size: clamp(22px, 2.2vw, 26px); }
.heard-text > p { color: var(--text-2); margin: 0 0 22px; max-width: 34em; }
.heard-text dl { margin: 0; display: grid; gap: 14px 28px; }
@media (min-width: 560px) { .heard-text dl { grid-template-columns: 1fr 1fr; } }
.heard-text dt { font-weight: 700; margin-bottom: 2px; }
.heard-text dd { margin: 0; color: var(--text-2); font-size: 16px; }
.heard-quote {
  margin: 0; padding: clamp(22px, 3vw, 34px); border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.heard-quote figcaption {
  display: flex; align-items: center; gap: 8px; color: var(--yellow);
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 16px;
}
.heard-quote blockquote { margin: 0; display: grid; gap: 14px; }
.heard-quote blockquote p { margin: 0; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.5; color: var(--text); text-wrap: pretty; }
.heard-quote blockquote .next { padding-top: 14px; border-top: 1px solid var(--line); }
.heard-quote blockquote .next b { color: var(--red-ink); }
.heard-source { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

/* ---- the app's screens, one at a time. The choice is a group of radio buttons, so it
        needs no script: each screen shows while its button is the one chosen. ---- */
.topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.topics > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.topics > label {
  cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text-2);
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.topics > label:hover { border-color: var(--muted); color: var(--text); }
.topics > input:checked + label { background: var(--text); border-color: var(--text); color: var(--bg); }
.topics > input:focus-visible + label { outline: 2px solid var(--yellow); outline-offset: 3px; }
.topic { display: none; flex: 0 0 100%; margin-top: 34px; }
#topic-coaching:checked ~ .topic[data-topic="coaching"],
#topic-solo:checked ~ .topic[data-topic="solo"],
#topic-setup:checked ~ .topic[data-topic="setup"],
#topic-best:checked ~ .topic[data-topic="best"],
#topic-telemetry:checked ~ .topic[data-topic="telemetry"],
#topic-profile:checked ~ .topic[data-topic="profile"] { display: block; animation: topic-in 240ms var(--ease); }
@keyframes topic-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- cards ---- */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (min-width: 900px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
}
.card:hover { border-color: #3d3d3d; transform: translateY(-2px); }
.card p { color: var(--text-2); margin: 0; font-size: 16px; }
.card .icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; margin-bottom: 16px;
  background: rgba(240, 20, 15, 0.12); color: var(--red-ink);
}
.card .tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; margin-bottom: 12px;
}
.tag.live { background: rgba(62, 207, 90, 0.14); color: var(--ok); }
.tag.soon { background: rgba(246, 137, 8, 0.14); color: var(--orange); }

/* ---- steps: numbered, joined by a line on wide screens ---- */
.steps { counter-reset: step; display: grid; gap: 28px 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; margin: 0; list-style: none; }
.steps li { position: relative; counter-increment: step; padding-top: 58px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--red); color: var(--text); font-weight: 800; font-style: italic; font-size: 18px;
}
.steps p { margin: 0; color: var(--text-2); font-size: 16px; }
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li:not(:last-child)::after {
    content: ""; position: absolute; top: 20px; left: 54px; right: -12px; height: 2px;
    background: linear-gradient(90deg, var(--line), var(--line-soft));
  }
}

/* ---- questions ---- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; font-weight: 700; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform 200ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq summary:hover { color: #fff; }
.faq details p { margin: 0; padding: 0 4px 22px; color: var(--text-2); max-width: 44em; }

/* ---- the closing invitation ---- */
.closing { padding-top: 0; }
.cta-band {
  text-align: center; padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border: 1px solid var(--line); border-radius: 22px;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(240, 20, 15, 0.26), transparent 70%),
    var(--panel);
}
.cta-band h2 { max-width: 18em; margin-left: auto; margin-right: auto; }
.cta-band p { color: var(--text-2); max-width: 36em; margin: 0 auto 26px; }
.cta-band .cta { justify-content: center; }
.cta-band .reqs { color: var(--muted); font-size: 14px; margin: 20px auto 0; }
.reqs { color: var(--muted); font-size: 15px; margin-top: 18px; }

/* ---- text pages ---- */
.page { padding: 56px 0 88px; min-height: 62vh; }
.prose { max-width: 46em; }
.prose h1 { font-size: clamp(30px, 4.4vw, 42px); }
.prose h2 { font-size: 24px; margin-top: 40px; font-style: normal; }
.prose p, .prose li { color: var(--text-2); }
.prose .updated { color: var(--muted); font-size: 15px; }
.notice {
  border: 1px solid var(--line); border-left: 4px solid var(--yellow); background: var(--panel);
  border-radius: 8px; padding: 14px 18px; margin: 20px 0;
}

/* ---- contact form ---- */
form.contact { max-width: 34em; display: grid; gap: 18px; margin-top: 28px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid #3a3a3a; border-radius: 8px; padding: 11px 13px;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--yellow); outline-offset: 1px; border-color: transparent; }
.field .hint { color: var(--muted); font-size: 14px; margin-top: 5px; }
/* The trap field: real visitors never see it, form-filling bots do. */
.field.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.human-check { min-height: 65px; color: var(--muted); font-size: 14px; }
.form-status { min-height: 1.6em; margin: 0; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.error { color: #ff6b66; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 40px; color: var(--muted); font-size: 15px; }
.footer-grid { display: grid; gap: 36px 32px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 2.2fr 1fr 1fr 1fr; } }
.footer-brand img { height: 52px; width: auto; }
.footer-brand p { margin: 14px 0 0; max-width: 26em; }
.site-footer nav { display: grid; gap: 4px; align-content: start; justify-items: start; }
.site-footer nav h2 {
  font-size: 13px; font-style: normal; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); margin: 0 0 8px;
}
.site-footer nav a { color: var(--text-2); text-decoration: none; padding: 4px 0; transition: color 160ms var(--ease); }
.site-footer nav a:hover { color: var(--yellow); }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
.footer-legal p { margin: 0 0 8px; max-width: 70em; }
/* The spelling switch (FS-015): small and muted, the current choice in the footer's brighter text and not a link. */
.spelling-switch a { color: var(--text-2); text-underline-offset: 3px; transition: color 160ms var(--ease); }
.spelling-switch a:hover { color: var(--yellow); }
.spelling-switch a[aria-current="true"] { color: var(--text); font-weight: 700; text-decoration: none; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .card:hover { transform: none; }
}

/* ---- beta form choices ---- */
.optional { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 4px; }
fieldset.choices { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px 10px; margin: 0; display: grid; gap: 8px; }
fieldset.choices legend { font-weight: 600; padding: 0 6px; }
fieldset.choices > label, label.consent { display: flex; gap: 10px; align-items: center; cursor: pointer; }
label.consent { align-items: flex-start; color: #d6d6d6; }
fieldset.choices input[type="checkbox"], fieldset.choices input[type="radio"], label.consent input {
  width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--red);
}
label.consent input { margin-top: 4px; }
fieldset.choices .field { margin-top: 4px; }

/* ---- accounts, leaderboards and runs (pages written by the Worker) ---- */
.nav-account { display: inline-flex; align-items: center; gap: 8px; }
.nav-account img { width: 24px; height: 24px; border-radius: 50%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.r { text-align: right; }
.spacer { flex: 1; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.page h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; }
.page h2 { font-size: 22px; font-style: normal; margin: 0 0 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.panel > :last-child { margin-bottom: 0; }

.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 8px; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 4px 0 0; }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--line); }
.tag-role {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-style: normal;
  padding: 2px 9px; border-radius: 999px; background: rgba(247, 201, 10, 0.14); color: var(--yellow); vertical-align: middle;
}
.bio { color: #d6d6d6; max-width: 46em; white-space: pre-line; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.r { text-align: right; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.me td { background: rgba(240, 20, 15, 0.08); }
.table .driver { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.table .driver:hover { color: var(--yellow); }
.table .driver img, .driver img { width: 28px; height: 28px; border-radius: 50%; }
.board td:first-child { color: var(--muted); width: 3em; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.filters a {
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
}
.filters a:hover { border-color: var(--muted); }
.filters a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 18px 0; }
.facts > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.facts span { display: block; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
/* A run's page stacks its parts closely: the home page's section padding is not for them. */
.run-video { margin: 18px 0; padding: 0; }
.run-video video { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 10px; border: 1px solid var(--line); }
.run-video p { margin: 6px 2px 0; }
.row-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.run-trace { margin: 36px 0 22px; padding: 0; }
.trace-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 10px; }
.trace-head h2 { margin: 0; }
.trace-head #trace-readout { flex: 1; min-width: 200px; font-variant-numeric: tabular-nums; }
.seg-units { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-units button { background: transparent; color: var(--muted); border: 0; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.seg-units button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); font-weight: 700; }
/* What the graphs show (FE-020): the hint on the left, and on the right, above the graphs it
   describes, the stretch shown and the way back to the whole stage. The row is as tall from the
   start as it gets (the button, or the hint on two lines once the stretch takes its share), so
   the graphs do not move under the pointer when a stretch is shown. */
.trace-view { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; min-height: 42px; margin: 0 2px 8px; }
.trace-view:focus { outline: none; }
.trace-view p { margin: 0; }
.trace-hint { flex: 1 1 280px; min-width: 0; }
.trace-view .trace-showing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; }
/* The line keeps its place in the page while empty (it is read out when it changes), so its
   space from the buttons is its own: with nothing to say it takes none. */
.trace-showing [data-showing-text]:not(:empty) { margin-right: 12px; }
/* Zoom in, Zoom out and the way back (FE-021): one group, so they wrap together under the line. */
.trace-zoom { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.trace-view[hidden], .trace-view [hidden] { display: none; }
/* On a touch screen each is a full touch target, and the row is that tall from the start. A
   little tighter, so the three stay on one line on a phone 360 pixels wide. */
@media (any-pointer: coarse) {
  .trace-view { min-height: 44px; }
  .trace-view .trace-showing { row-gap: 4px; }
  .trace-zoom { gap: 6px; }
  .trace-view .trace-zoom .btn { min-width: 44px; min-height: 44px; padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 760px) { .trace-view .trace-showing { margin-left: 0; } }
.trace-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.trace-grid figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.trace-grid canvas { display: block; width: 100%; height: 300px; }
.trace-grid figcaption { margin-top: 8px; }
/* ---- the section bar above the speed graph (FS-035, public/sections.js) ----------------------
   The stage's whole distance cut into the run's sections, on the graph's own axis: it starts and
   ends where the plot does (44 px in, 10 px short, as run.js draws it). Each section is a button. */
.secbar { position: relative; height: 22px; margin: 0 10px 8px 44px; }
.secbar[hidden], .secbar-note[hidden], .secbar-shade[hidden] { display: none; }
.secbar-cell {
  position: absolute; top: 0; height: 100%; min-width: 0; padding: 0; margin: 0;
  display: flex; align-items: center; border: 0; background: none; color: var(--text-2);
  font: inherit; font-size: 12px; line-height: 1; cursor: pointer;
}
/* What a section looks like: a thin cell, however tall the button under the finger is. */
.secbar-face {
  flex: 1; min-width: 0; height: 22px; padding: 0 5px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #3a3a3a; background: var(--panel-2); white-space: nowrap; overflow: hidden;
}
.secbar-cell + .secbar-cell .secbar-face { border-left-width: 0; }
.secbar-cell:first-of-type .secbar-face { border-radius: 5px 0 0 5px; }
.secbar-cell:last-of-type .secbar-face { border-radius: 0 5px 5px 0; }
.secbar-cell:hover .secbar-face { background: #262626; color: var(--text); }
.secbar-n { font-weight: 600; }
.secbar-t { color: var(--muted); font-variant-numeric: tabular-nums; }
/* Chosen: a bar along its foot and a heavier label, so it is not told by its color alone. */
.secbar-cell[aria-pressed="true"] .secbar-face { background: #262626; color: var(--text); box-shadow: inset 0 -3px 0 var(--text); }
.secbar-cell[aria-pressed="true"] .secbar-n { font-weight: 800; }
.secbar-cell:focus-visible { z-index: 2; outline-offset: 1px; }
/* What the graphs show, laid over the bar: an outline that takes no clicks. */
.secbar-shade {
  position: absolute; top: 50%; height: 26px; margin-top: -13px; z-index: 1; pointer-events: none;
  border: 1.5px solid var(--text); border-radius: 4px; background: rgba(245, 245, 245, 0.09);
}
/* Under a bar of the app's own sections: whose they are, always there to read. */
.trace-grid .secbar-note { margin: -2px 10px 8px 44px; }
/* On a touch screen each section is a full touch target; the bar still looks thin. */
@media (any-pointer: coarse) { .secbar { height: 44px; margin-bottom: 0; } .trace-grid .secbar-note { margin-top: -8px; } }
@media (max-width: 760px) { .trace-grid { grid-template-columns: 1fr; } .trace-grid canvas { height: 240px; } }
.trace-grid[hidden], #trace-readout[hidden] { display: none; }
/* Wheel slip (FS-012): under the speed graph, on the same axis, the map beside the two of them. */
.trace-grid:has(> .slip-fig:not([hidden])) > figure:first-child { grid-row: span 2; display: flex; flex-direction: column; }
.trace-grid:has(> .slip-fig:not([hidden])) > figure:first-child canvas { flex: 1; height: auto; min-height: 300px; }
.trace-grid .slip-fig canvas { height: 190px; }
.slip-fig figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; }
.slip-readout { color: var(--text); font-variant-numeric: tabular-nums; }
.slip-note { margin: 6px 0 0; }
.slip-message { margin: 0; color: var(--text); }
.slip-fig[hidden], .slip-fig [hidden] { display: none; }
@media (max-width: 760px) {
  .trace-grid:has(> .slip-fig:not([hidden])) > figure:first-child { grid-row: auto; }
  .trace-grid:has(> .slip-fig:not([hidden])) > figure:first-child canvas { flex: none; height: 240px; min-height: 0; }
}
/* One finger scrubs across and scrolls the page up and down; the browser's own pinch zoom stays. */
.scrubs { cursor: crosshair; touch-action: pan-y pinch-zoom; }
/* The two graphs take the pinch themselves (FE-021), so only there the browser's zoom is stopped. */
.zooms { touch-action: pan-y; }

/* ---- the strip under the stage video (public/strip.js) -------------------------------------
   The app's strip, so a driver recognises it: what the car was doing at the moment on screen.
   The video and the strip are one instrument, joined in one frame at the same width. */
.player { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; container-type: inline-size; }
.run-video .player video { border: 0; border-radius: 0; }
.tstrip-solo { container-type: inline-size; }
.tstrip-solo .tstrip { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.tstrip {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center;
  padding: 8px 12px; background: var(--panel-2); border-top: 1px solid var(--line);
}
/* Laid out while its data loads, so the page under it does not jump; nothing in it shows yet. */
[data-strip-part][aria-busy="true"] > * { visibility: hidden; }
.tstrip[hidden], .tstrip-controls[hidden], .tstrip-hint[hidden], .tstrip [hidden] { display: none; }

.tstrip-graph { min-width: 0; }
/* A fixed height: before its first drawing a canvas is 2:1, which would be a tall empty block. */
.tstrip-graph canvas { display: block; width: 100%; height: 76px; }

.tstrip-pedals { display: flex; gap: 8px; align-items: flex-end; }
.ped { display: grid; justify-items: center; gap: 3px; }
.ped-n { font-size: 11px; line-height: 1.25; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 22px; text-align: center; }
.ped-track { width: 13px; height: 52px; border-radius: 3px; background: #262626; display: flex; align-items: flex-end; overflow: hidden; }
/* Full height and scaled down: scaleY is composited, where a changing height lays the page out again. */
.ped-fill { width: 100%; height: 100%; border-radius: 3px; transform: scaleY(0); transform-origin: bottom; }
.ped-clutch .ped-fill { background: var(--ch-clutch); }
.ped-brake .ped-fill { background: var(--ch-brake); }
.ped-throttle .ped-fill { background: var(--ch-throttle); }
.ped-k { font-size: 10px; line-height: 1.25; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
/* A sequential gearbox never touches the clutch; an always-empty bar would raise a question. */
.ped.off { opacity: 0.32; }

.tstrip-dials { display: flex; gap: 14px; align-items: center; }
.dial { display: grid; justify-items: center; gap: 1px; min-width: 56px; }
.dial-k { font-size: 10px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.dial-v { font-size: 27px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dial-v small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.tstrip-wheel { display: grid; justify-items: center; gap: 2px; }
/* No transition: the wheel turns frame by frame with the telemetry, and easing it would make it
   lag behind the video it is there to explain. */
.tstrip-wheel img { width: 66px; height: 66px; }

.tstrip-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.tstrip-controls .btn { min-width: 84px; text-align: center; }
.tstrip-sound { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.tstrip-sound svg { width: 17px; height: 17px; flex: none; }
.tstrip-sound .icon-muted, .tstrip-sound.is-muted .icon-on { display: none; }
.tstrip-sound.is-muted .icon-muted { display: inline; }
.tstrip-controls select {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: var(--panel-2);
  border: 1px solid #3a3a3a; border-radius: var(--radius-sm); padding: 6px 8px; cursor: pointer;
}
.tstrip-controls select:hover { border-color: var(--muted); }
.tstrip-hint { flex: 1; min-width: 200px; }
p.tstrip-hint { margin: 0 2px 14px; }

/* Under a narrow video the graph takes its own line and the readouts spread across the one under
   it, as in the app. Sized by the player, not the window. */
@container (max-width: 620px) {
  .tstrip { grid-template-columns: auto auto auto; justify-content: space-between; row-gap: 8px; }
  .tstrip-graph { grid-column: 1 / -1; }
}
/* A phone: the same row, a little tighter, so all of it fits from 360 px up. */
@container (max-width: 420px) {
  .tstrip { column-gap: 8px; padding: 8px 10px; }
  .tstrip-dials { gap: 8px; }
  .dial { min-width: 44px; }
  .dial-v { font-size: 23px; }
  .tstrip-wheel img { width: 54px; height: 54px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.danger:not(.ghost), .btn.ghost.danger:hover { background: #8f1310; color: #fff; }
.btn.ghost.danger { color: #ff8a86; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
form.inline select { font: inherit; font-size: 14px; color: var(--text); background: var(--panel-2); border: 1px solid #3a3a3a; border-radius: 6px; padding: 5px 8px; }
.row-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.code-box {
  display: inline-block; font: 700 30px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.12em;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 22px; margin: 4px 0 8px;
}
.danger-zone { border-color: #5a1a18; }
.danger-zone form { display: grid; gap: 14px; justify-items: start; }
.follow-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.follow-list .driver { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }

/* ---- leaderboard lookup ---- */
.lookup { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 20px 0 24px; align-items: end; }
.lookup label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lookup select { font: inherit; font-size: 15px; text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--text); background: var(--panel); border: 1px solid #3a3a3a; border-radius: 8px; padding: 10px 12px; }
.lookup select:disabled { opacity: 0.5; }
.board-title { font-style: normal; }
.board-title .muted { font-size: 15px; font-weight: 400; margin-left: 6px; }

/* ---- leaderboards, before they open: a made-up board under an invitation ---- */
.soon-board { position: relative; margin-top: 8px; min-height: 560px; }
.soon-blur { filter: blur(5px); opacity: 0.95; pointer-events: none; user-select: none; max-height: 760px; overflow: hidden; }
.soon-dot { width: 28px; height: 28px; border-radius: 50%; background: #3a3a3a; display: inline-block; }
.soon-card { position: absolute; inset: 0; display: grid; place-items: start center; padding: 48px 16px 0;
  background: linear-gradient(180deg, rgba(9, 9, 9, 0), rgba(9, 9, 9, 0.25) 70%, #090909); }
.soon-card .panel { max-width: 560px; padding: 30px 32px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8); border-color: #3a3a3a; }
.soon-card h2 { margin: 6px 0 10px; }
.soon-card ul { margin: 14px 0 22px; padding-left: 20px; color: #d6d6d6; }
.soon-card li { margin: 6px 0; }
.soon-card .cta { margin: 0; }
.soon-card .soon-note { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

/* ---- choosing how to sign in ---- */
.provider-list { display: grid; gap: 10px; max-width: 22em; margin: 22px 0; }
.btn.provider { text-align: center; background: var(--panel-2); border-color: #3a3a3a; color: var(--text); }
.btn.provider:hover { background: #262626; border-color: var(--muted); }
.btn.provider.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.provider.discord:hover { background: #4752c4; }

/* ---- the admin area (src/admin.js) ---- */
.admin-head h1 { margin: 0 0 18px; }
.admin h2 { margin-top: 28px; }
.admin .panel h2 { margin-top: 0; }
.admin .panel h2.gap { margin-top: 28px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.admin-nav a {
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 10px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.admin-nav a:hover { color: var(--text); }
.admin-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--red); }
.facts.stats b { display: block; font-size: 28px; line-height: 1.2; font-style: italic; font-weight: 800; }
.admin-cols { display: grid; gap: 0 20px; align-items: start; }
@media (min-width: 900px) { .admin-cols { grid-template-columns: 1fr 1fr; } }
/* A short row of figures keeps the width of the longer rows' boxes instead of stretching. */
.facts.fill { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
/* Its note belongs to the figures above it, so it sits right under them. */
.facts.stats.fill { padding-bottom: 0; margin-bottom: 10px; }
.facts.fill + p { margin: 0 0 4px; }
/* Downloads (BE-006): thirty days of rows, so tighter than the other tables; zeros recede. */
.table.compact th, .table.compact td { padding: 6px 10px; }
.table td.zero { color: var(--muted); }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 4px; white-space: nowrap;
}
.badge.staff { background: rgba(247, 201, 10, 0.14); color: var(--yellow); }
.badge.coach { background: rgba(90, 162, 255, 0.16); color: var(--link); }
.badge.wait { background: rgba(246, 137, 8, 0.16); color: var(--orange); margin-left: 0; }
.badge.bad { background: rgba(240, 20, 15, 0.16); color: var(--red-ink); margin-left: 0; }
.admin-form { display: grid; gap: 16px; }
.admin-form > label { display: grid; gap: 6px; font-weight: 600; }
.admin-form > label.consent { display: flex; font-weight: 400; }
.admin-form .hint { color: var(--muted); font-size: 14px; font-weight: 400; }
.admin-form select, .admin-form input[type="text"], .admin-form textarea, .admin-filter input, .admin-runs .actions input {
  font: inherit; font-weight: 400; color: var(--text); background: var(--panel-2);
  border: 1px solid #3a3a3a; border-radius: 8px; padding: 10px 12px; width: 100%;
}
.admin-form select:disabled, .admin-form textarea:disabled { opacity: 0.55; }
.admin-form textarea { resize: vertical; }
.admin-filter input { text-transform: none; letter-spacing: normal; font-size: 15px; background: var(--panel); }
.admin-filter .btn { align-self: end; }
.admin-runs .actions { white-space: nowrap; }
.admin-runs .actions form { margin: 2px 0 2px 6px; }
.admin-runs .actions input { width: 130px; font-size: 14px; padding: 5px 8px; }
.admin-runs tr.held td { background: rgba(240, 20, 15, 0.05); }
/* Driver survey (FS-008): one bar per answer, its share of the installs that answered the question.
   The bar is an SVG with a width attribute, since the pages allow no inline styles. */
.survey-q > p.small { margin: -4px 0 10px; }
.survey-table td { padding-top: 8px; padding-bottom: 8px; }
.survey-table { table-layout: fixed; }
.survey-table th:first-child { width: 34%; }
.survey-table th:nth-child(2) { width: 38%; }
.survey-table td:first-child { overflow-wrap: anywhere; }
.survey-table td.bar-cell { padding-left: 4px; padding-right: 4px; }
.survey-table .bar { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; }
.survey-table .bar-track { fill: var(--line-soft); }
.survey-table .bar-fill { fill: var(--red); }
.survey-others { margin: 0; padding-left: 18px; }
.survey-others li { margin: 4px 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .survey-table th:first-child { width: 40%; } .survey-table th:nth-child(2) { width: 24%; } }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 20px; }
.nowrap { white-space: nowrap; }

/* Staging only: the strip the Worker adds to the top of every page (src/staging.js). */
.staging-bar { background: #f5b301; color: #111; font-size: 13px; font-weight: 700; text-align: center; padding: 6px 16px; letter-spacing: .02em; }
.staging-bar a { color: inherit; text-decoration: underline; }

/* ---- Join the beta (/beta) ----
   One column at reading width. The download is the one primary action; the steps after it
   are numbered down the left, joined by a thin line. */
.beta .wrap > * { max-width: 760px; }
.beta-intro { padding-bottom: 8px; }
.beta-intro h1 { font-size: clamp(38px, 5.6vw, 60px); margin-bottom: 18px; }
.beta-intro .lede { margin-bottom: 12px; }
.beta-sub { color: var(--muted); margin: 0 0 30px; }
.download { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.download-btn { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; }
.download-btn svg { flex: none; }
.download-meta { display: flex; flex-direction: column; gap: 2px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.download-meta [data-release] { color: var(--text-2); }
.download-meta [hidden] { display: none; }
/* Only a phone or tablet sees this: a touch screen with no mouse. */
.phone-note { display: none; margin: 18px 0 0; color: var(--text-2); font-size: 16px; }
@media (hover: none) and (pointer: coarse) { .phone-note { display: block; } }

.journey { counter-reset: journey; list-style: none; margin: clamp(48px, 7vw, 72px) 0 0; padding: 0; }
.journey > li {
  counter-increment: journey; position: relative;
  padding: 0 0 clamp(40px, 5vw, 56px) 64px;
}
.journey > li::before {
  content: counter(journey); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--red); color: var(--text);
  font-weight: 800; font-style: italic; font-size: 18px;
}
.journey > li:not(:last-child)::after {
  content: ""; position: absolute; left: 20px; top: 50px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--line), var(--line-soft));
}
.journey h2, .good-to-know h2 { font-size: 26px; font-style: normal; line-height: 1.25; margin: 6px 0 14px; }
.journey p, .journey li, .good-to-know li { color: var(--text-2); }
.journey p { margin: 0 0 14px; }
.journey ul, .good-to-know ul { margin: 0 0 14px; padding-left: 1.2em; }
.journey ul li, .good-to-know li { margin-bottom: 6px; }
.journey ul li::marker, .good-to-know li::marker { color: var(--red-ink); }
.journey b { color: var(--text); font-weight: 650; }
.journey .btn { margin-top: 6px; }
.install-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 12px; }
.install-steps li::marker { color: var(--muted); font-weight: 700; }
.games { columns: 2; column-gap: 24px; }
@media (max-width: 480px) {
  .journey > li { padding-left: 54px; }
  .journey > li::before { width: 36px; height: 36px; font-size: 16px; }
  .journey > li:not(:last-child)::after { left: 17px; top: 44px; }
  .games { columns: 1; }
}
.good-to-know { border-top: 1px solid var(--line); padding-top: 32px; }

/* ---- Learn: the Knowledge base on the web (FS-014) ----
   One reading column of about 68 characters, with "On this page" beside it on wide screens and
   folded above the text on phones. The articles and their figures come from the app's export
   (public/learn-data); the figure classes are the app's, coloured here from the site's palette. */
.learn {
  --fig-you: var(--ch-speed);
  --fig-ref: var(--orange);
  --fig-ink: var(--text);
  --fig-ink-2: #b5b5b8;
  --fig-grid: var(--ch-grid);
  --fig-axis: #3a3a40;
  --fig-surface: var(--panel);
  --fig-surface-2: var(--panel-2);
  --fig-surface-3: #242427;
  --measure: 68ch;
}
.nav a[href="/learn"] { white-space: nowrap; }
@media (max-width: 560px) { .nav a[href="/learn"] { display: none; } }

.crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.crumbs li + li::before { content: "/"; color: var(--muted); padding: 0 10px; font-weight: 400; }
.crumbs a { color: var(--yellow); text-decoration: none; }
.crumbs a:hover { color: #ffe066; text-decoration: underline; text-underline-offset: 3px; }

.learn-layout { display: grid; gap: 40px; }
@media (min-width: 1100px) {
  .learn.has-toc .learn-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 56px; }
  .toc-inline { display: none; }
}
@media (max-width: 1099.98px) { .toc-side { display: none; } }
.learn-article { min-width: 0; max-width: calc(var(--measure) + 120px); }

.learn-head { margin-bottom: 28px; }
.learn .learn-head h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.06; margin: 0 0 14px; max-width: 18em; }
.learn-summary { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--text-2); margin: 0 0 14px; max-width: var(--measure); }
.learn-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; color: var(--muted); font-size: 15px; }
.learn-meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--red); vertical-align: middle; margin-right: 18px; }

/* The text itself: regular weight, never italic, 17 px (16 px on a phone), 1.65 line height. */
.learn-body { max-width: var(--measure); font-size: 17px; line-height: 1.65; color: var(--text-2); overflow-wrap: break-word; }
@media (max-width: 560px) { .learn-body { font-size: 16px; } }
.learn-body > :first-child { margin-top: 0; }
.learn-body p { margin: 0 0 1.1em; }
.learn-body h2 { font-size: clamp(24px, 2.6vw, 30px); font-style: italic; color: var(--text); margin: 2.2em 0 0.6em; scroll-margin-top: 16px; }
.learn-body h3 { font-size: 20px; color: var(--text); margin: 1.8em 0 0.5em; scroll-margin-top: 16px; }
.learn-body h4 { font-size: 17px; color: var(--text); margin: 1.5em 0 0.4em; }
.learn-body strong { color: var(--text); font-weight: 650; }
.learn-body ul, .learn-body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.learn-body li { margin-bottom: 0.45em; padding-left: 0.2em; }
.learn-body li::marker { color: var(--red-ink); }
.learn-body ol > li::marker { color: var(--muted); font-weight: 700; }
.learn-body a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.learn-body a.term { color: inherit; text-decoration: underline dotted var(--muted); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.learn-body a.term:hover { color: var(--text); text-decoration-color: var(--yellow); }
.learn-body code { background: var(--panel-2); border-radius: 4px; padding: 1px 6px; font-size: 0.88em; }

/* A section heading's own address, shown on hover and on keyboard focus. */
.learn-body .anchor { margin-left: 0.4em; color: var(--muted); text-decoration: none; font-style: normal; font-weight: 400; opacity: 0; transition: opacity 160ms var(--ease); }
.learn-body h2:hover .anchor, .learn-body h3:hover .anchor, .learn-body h4:hover .anchor, .learn-body .anchor:focus-visible { opacity: 1; }
@media (hover: none) { .learn-body .anchor { opacity: 0.6; } }

/* Tables and formula blocks scroll in their own box; the page never scrolls sideways. */
.learn-body table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15px; line-height: 1.5; }
.learn-body th { text-align: left; font-size: 13px; letter-spacing: 0.04em; color: var(--text); font-weight: 700; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.learn-body td { padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.learn-body .formula {
  margin: 0 0 1.4em; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font: 15px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre; overflow-x: auto; tab-size: 4;
}

/* Figures may run a little wider than the text on a wide screen; on a phone they shrink. */
.learn-body .kb-fig { margin: 1.6em 0 1.8em; padding: 18px 20px 14px; background: var(--fig-surface); border: 1px solid var(--line); border-radius: var(--radius); }
@media (min-width: 1100px) { .learn-body .kb-fig, .learn-body .formula { margin-left: -24px; margin-right: -24px; } }
@media (max-width: 560px) { .learn-body .kb-fig { padding: 12px 10px 10px; } }
.kb-fig svg { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; overflow: visible; }
.kb-fig figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--fig-ink-2); }
.kb-fig figcaption b { color: var(--text); font-weight: 650; }
.kb-fig-missing { display: grid; place-items: center; min-height: 96px; border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; }
.kb-fig svg text { fill: var(--fig-ink); font-size: 13px; font-family: "Segoe UI", system-ui, sans-serif; }
.kb-fig svg text.fig-small { fill: var(--fig-ink-2); font-size: 12px; }
.kb-fig svg text.fig-strong { font-weight: 600; }
.kb-fig svg .fig-you { fill: none; stroke: var(--fig-you); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kb-fig svg .fig-ref { fill: none; stroke: var(--fig-ref); stroke-width: 2; stroke-dasharray: 7 5; stroke-linecap: round; }
.kb-fig svg .fig-third { fill: none; stroke: var(--fig-ink-2); stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.kb-fig svg .fig-head-you { fill: var(--fig-you); stroke: none; }
.kb-fig svg .fig-head-ref { fill: var(--fig-ref); stroke: none; }
.kb-fig svg .fig-marker-you { fill: var(--fig-you); stroke: var(--fig-surface); stroke-width: 2; }
.kb-fig svg .fig-grid { fill: none; stroke: var(--fig-grid); stroke-width: 1; }
.kb-fig svg .fig-axis { fill: none; stroke: var(--fig-axis); stroke-width: 1.5; }
.kb-fig svg .fig-road { fill: none; stroke: var(--fig-axis); stroke-width: 2; stroke-linecap: round; }
.kb-fig svg .fig-dim { fill: none; stroke: var(--fig-ink-2); stroke-width: 1; }
.kb-fig svg .fig-leader { fill: none; stroke: var(--fig-ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.kb-fig svg .fig-body { fill: var(--fig-surface-2); stroke: var(--fig-axis); stroke-width: 1.5; stroke-linejoin: round; }
.kb-fig svg .fig-body-3 { fill: var(--fig-surface-3); stroke: var(--fig-axis); stroke-width: 1.5; stroke-linejoin: round; }
.kb-fig svg .fig-ink { fill: var(--fig-ink); stroke: none; }
.kb-fig svg .fig-cg { fill: var(--fig-surface-2); stroke: var(--fig-ink); stroke-width: 1.5; }
.kb-fig svg .fig-point { fill: var(--fig-ink); stroke: var(--fig-surface); stroke-width: 2; }

/* On this page: beside the text and in view while reading on a wide screen. */
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; color: var(--text-2); text-decoration: none; font-size: 15px; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc-side { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 128px); overflow-y: auto; border-left: 1px solid var(--line); padding-left: 20px; }
.toc-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yellow); }
.toc-side a { padding: 6px 0; }
.toc-inline { margin: 0 0 28px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); max-width: var(--measure); }
.toc-inline summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-weight: 700; color: var(--text); }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform 160ms var(--ease); }
.toc-inline[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.toc-inline ol { padding: 0 16px 10px; border-top: 1px solid var(--line); }
.toc-inline a { padding: 11px 0; min-height: 44px; display: flex; align-items: center; }
.toc-inline li + li a { border-top: 1px solid var(--line-soft); }

/* The Glossary's A to Z row. */
.az ol { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-width: var(--measure); }
.az a, .az span { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: var(--radius-sm); font-weight: 800; font-style: italic; font-size: 18px; }
.az a { background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.az a:hover { border-color: var(--yellow); color: var(--yellow); }
.az span { color: #4a4a4a; }
.learn-body.glossary h2 { font-size: 34px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.learn-body.glossary p[id] { scroll-margin-top: 16px; padding: 8px 12px; margin: 0 -12px 0.6em; border-radius: var(--radius-sm); }
.learn-body.glossary p[id]:target { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--yellow); }

/* The end of an article: its own See links, then previous and next, then the way to the app. */
.learn-end { margin-top: 48px; max-width: var(--measure); display: grid; gap: 32px; }
.learn-end h2 { font-size: 22px; font-style: normal; margin: 0 0 12px; }
.learn-related ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.learn-related li { border-bottom: 1px solid var(--line); }
.learn-related a { display: flex; align-items: center; min-height: 48px; padding: 8px 0; color: var(--text); font-weight: 600; text-decoration: none; }
.learn-related a:hover { color: var(--yellow); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); text-decoration: none; min-height: 44px; }
.pager a:hover { border-color: var(--muted); }
.pager-next { text-align: right; justify-items: end; }
.pager-dir { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pager-title { color: var(--text); font-weight: 650; line-height: 1.35; }
.chev { flex: none; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-next { text-align: left; justify-items: start; } }
.learn-app { padding: 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.learn-app p { color: var(--text-2); margin: 0 0 16px; }
.learn-app p:last-child { margin: 0; }

/* The contents page: subjects as sections, their articles as rows a thumb can tap. */
.learn-intro { max-width: 52em; margin-bottom: 40px; }
.learn-intro h1 { margin-bottom: 16px; }
.learn-count { color: var(--muted); margin: 0 0 20px; }
.learn-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.learn-cats a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: 15px; }
.learn-cats a:hover { border-color: var(--yellow); color: var(--text); }
.learn-cat { margin: 0 0 44px; scroll-margin-top: 16px; }
.learn-cat h2 { font-size: clamp(24px, 2.8vw, 32px); margin: 0 0 8px; }
.learn-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.learn-list li { border-bottom: 1px solid var(--line); }
.learn-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; padding: 14px 4px; min-height: 44px; text-decoration: none; }
.learn-list a:hover .learn-list-title { color: var(--yellow); }
.learn-list-title { color: var(--text); font-weight: 650; font-size: 18px; line-height: 1.35; }
.learn-list-summary { grid-column: 1; color: var(--text-2); font-size: 16px; line-height: 1.5; max-width: 60em; }
.learn-list-time { grid-column: 2; grid-row: 1; color: var(--muted); font-size: 14px; white-space: nowrap; align-self: baseline; }
@media (max-width: 560px) {
  .learn-list a { grid-template-columns: 1fr; }
  .learn-list-time { grid-column: 1; grid-row: auto; }
}
.learn-contents > .learn-app { max-width: 52em; }

/* Find an article by typing (FE-012): only shown once its script has loaded the index. */
.learn-search { max-width: 52em; margin: 0 0 36px; }
.learn-search label { display: block; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.learn-search-box { position: relative; }
.learn-search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.learn-search input {
  width: 100%; min-height: 52px; padding: 12px 16px 12px 48px;
  background: var(--panel); color: var(--text); border: 1px solid #3a3a3a; border-radius: var(--radius-sm);
  font: inherit; font-size: 17px; caret-color: var(--yellow);
}
.learn-search input::placeholder { color: #8c8c8c; }
.learn-search input:hover { border-color: var(--muted); }
.learn-search input:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-color: var(--yellow); }
.learn-search input::-webkit-search-cancel-button { filter: invert(0.7); cursor: pointer; }
.learn-search-help { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.learn-search-status { margin: 12px 0 0; color: var(--text-2); font-size: 15px; min-height: 1.5em; }
.learn-search-status:empty { display: none; }
.learn-search-none { margin: 12px 0 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--text-2); }
.learn-search-none[hidden], .learn-terms[hidden], .learn-cat[hidden], .learn-list li[hidden] { display: none; }
/* ---- Release emails (BE-007) ----
   On /beta: a small, quiet box after everything about getting the app, one field and one button.
   It is only in the page once sending is set up (src/beta.js). */
.release-signup {
  margin-top: 40px; padding: 22px 24px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
}
.release-signup h2 { font-size: 20px; font-style: normal; line-height: 1.3; margin: 0 0 4px; }
.release-signup > p { margin: 0 0 16px; font-size: 15px; }
.release-signup form { display: grid; gap: 10px; }
.signup-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.signup-row .field { flex: 1 1 260px; min-width: 0; }
.signup-row .field label { font-size: 14px; color: var(--text-2); }
.signup-row .form-actions { margin: 0; }
.signup-row .btn { padding-top: 11px; padding-bottom: 11px; }
.release-signup .form-status { min-height: 0; font-size: 15px; }
.release-signup .form-status:empty { display: none; }
.release-signup .human-check { min-height: 0; }

/* The account page's switch: a real button that posts, so it works without scripts. */
.switch-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 14px 0 6px; }
.switch-form .field { flex: 1 1 260px; min-width: 0; max-width: 26em; }
.switch {
  display: inline-flex; align-items: center; gap: 12px; padding: 6px 4px; border: 0; background: none;
  font: inherit; font-weight: 600; color: var(--text); cursor: pointer;
}
.switch-track {
  position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px;
  background: #2e2e2e; border: 1px solid #4a4a4a; transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted); transition: transform 160ms var(--ease), background 160ms var(--ease);
}
.switch[aria-checked="true"] .switch-track { background: var(--red-btn); border-color: var(--red-btn); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(18px); background: #fff; }
.switch:hover .switch-track { border-color: var(--muted); }
.switch:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-knob { transition: none; } }

/* Answers to the confirmation and unsubscribe links. */
.email-answer { padding-top: 24px; padding-bottom: 48px; }

/* The admin area's Release emails section. */
.notice.bad { border-left-color: var(--red); }
.release-form label { font-weight: 600; }
.release-form textarea { min-height: 280px; line-height: 1.55; }
.release-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.release-actions .send-all { margin-left: auto; }
.release-form .hint { margin: 0; }
.email-preview { border-color: #3a3a3a; }
.email-head { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.email-head dt { color: var(--muted); }
.email-head dd { margin: 0; overflow-wrap: anywhere; }
.email-body { max-width: 38em; color: var(--text-2); overflow-wrap: anywhere; }
.email-body p { margin: 0 0 14px; }
.email-foot { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.confirm-send { max-width: 640px; border-color: var(--red-dark); }
.send-state { font-weight: 600; }
@media (max-width: 520px) { .release-actions .send-all { margin-left: 0; } }

/* ---- Reports (FS-001) ----
   The Report link is quiet: small, muted, at the foot of a run or driver page, away from the time
   and the video. The form is short and calm; the admin pages follow Members and Runs. */
.report-link { margin: 28px 0 0; font-size: 14px; text-align: right; }
.report-link a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.report-link a:hover { color: var(--text-2); }
.report-page { padding-top: 8px; padding-bottom: 48px; }
.report-page h1 { margin-bottom: 8px; }
.report-form { display: grid; gap: 20px; margin-top: 24px; max-width: 34em; }
.report-reasons { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px 12px; margin: 0; display: grid; gap: 10px; }
.report-reasons legend { font-weight: 600; padding: 0 6px; }
.report-reasons[aria-invalid="true"] { border-color: var(--red-ink); }
.report-reason { display: flex; gap: 10px; align-items: center; cursor: pointer; color: var(--text-2); }
.report-reason input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); flex: none; }
.field-error { margin: 2px 0 0; color: #ff8a86; font-weight: 600; font-size: 15px; }
.report-form .form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.report-form button:disabled { opacity: 0.6; cursor: progress; }
.report-thanks { font-size: 20px; color: var(--text); }
.report-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 18px; }
.report-facts dt { color: var(--muted); }
.report-facts dd { margin: 0; overflow-wrap: anywhere; }
.report-details { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); max-width: 46em; }
.resolve-outcomes { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.resolve-outcomes legend { font-weight: 600; margin-bottom: 6px; padding: 0; }

/* ---- A page for each supported game (/games, /games/<game>, FE-011) ----
   One reading column, like /beta: the setup steps use the same numbered journey, the questions
   the home page's folding rows. Sections are separated by space and a hairline, not boxes. */
.game { max-width: 780px; }
.game .crumbs span[aria-current] { color: var(--muted); }
.game-head { margin-bottom: 8px; }
.game-head h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 18px; }
.game-head .lede { margin-bottom: 14px; }
.game-head p:not(.lede) { color: var(--text-2); margin: 0 0 14px; max-width: 40em; }
.game > section, .game > nav { margin-top: clamp(48px, 7vw, 72px); }
.game > section:not(.game-download) { padding: 0; }
.game h2 { font-size: clamp(26px, 3.2vw, 34px); margin: 0 0 18px; }
.game code { font: 0.92em/1 Consolas, "Cascadia Mono", monospace; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; overflow-wrap: anywhere; }
.game b { color: var(--text); font-weight: 650; }

.game-steps { margin-top: 28px; }
.game-steps > li { padding-bottom: clamp(28px, 4vw, 40px); }
.game-steps h3 { font-size: 21px; line-height: 1.3; margin: 7px 0 8px; }
.game-steps p:last-child { margin-bottom: 0; }

.game-data-grid { display: grid; gap: 28px 40px; }
@media (min-width: 760px) { .game-data-grid { grid-template-columns: 1fr 1fr; } }
.game-data h3 { font-size: 15px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.game-data ul.sent { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; color: var(--text-2); }
.game-data ul.sent li::marker { color: var(--ok); }
.not-sent { margin: 0; display: grid; gap: 4px; }
.not-sent dt { color: var(--text); font-weight: 700; }
.not-sent dt:not(:first-child) { margin-top: 14px; }
.not-sent dd { margin: 0; color: var(--text-2); }

.game-status p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 0; color: var(--text-2); }
.game-status .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }

.game-download { padding: clamp(24px, 4vw, 36px); border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.game-download h2 { margin-bottom: 10px; }
.game-download p { color: var(--text-2); margin: 0 0 20px; }
.game-download p:last-child { margin: 0; }

.game-learn ul, .game-others ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.game-learn li a, .game-others a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: 15px;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.game-learn li a:hover, .game-others a:hover { border-color: var(--yellow); color: var(--text); }
.game-others h2, .game-learn h2 { font-size: 22px; font-style: normal; margin-bottom: 14px; }
.game-learn p { color: var(--text-2); margin: 0 0 16px; max-width: 40em; }
.game-independent { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }

/* /games: one row per game, the whole row is the link. */
.game-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.game-list a {
  display: grid; gap: 4px; padding: 22px 40px 22px 4px; position: relative;
  border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
}
.game-list a::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-top: 2px solid var(--red-ink); border-right: 2px solid var(--red-ink); transform: rotate(45deg);
  transition: transform 160ms var(--ease);
}
.game-list a:hover::after { transform: translateX(4px) rotate(45deg); }
.game-list-name { font-size: 22px; font-weight: 800; font-style: italic; color: var(--text); }
.game-list a:hover .game-list-name { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 5px; }
.game-list-line { color: var(--text-2); }
.game-ask p { color: var(--text-2); margin: 0; }

/* The home page's Supported games cards name their pages. */
.card h3 a { color: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.card h3 a:hover { color: #fff; }

/* ---- Setup help map (/learn/setup-help) ----
   Every problem the app's Setup help asks about, with the changes that answer it, written by
   src/setup-help.js from the app's export. It sits in the Learn section and keeps its type:
   a problem on the left, its changes on the right, one column on a phone. */
.sh-intro { max-width: 52em; margin-bottom: 40px; }
.sh-intro h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.06; margin: 0 0 14px; max-width: 16em; }
.sh h2 { font-size: clamp(24px, 2.8vw, 32px); }
@media (max-width: 560px) {
  .sh-intro .learn-meta { display: grid; gap: 2px; }
  .sh-intro .learn-meta span + span::before { content: none; }
}

.sh-index { margin: 0 0 48px; }
.sh-index h2 { margin: 0 0 18px; }
.sh-index-grid { display: grid; gap: 28px 40px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.sh-index-area { margin: 0 0 6px; font-weight: 700; }
.sh-index-area a { color: var(--text); text-decoration: none; }
.sh-index-area a:hover { color: var(--yellow); }
.sh-index ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sh-index li { border-bottom: 1px solid var(--line-soft); }
.sh-index li a { display: flex; align-items: center; min-height: 44px; padding: 6px 0; color: var(--text-2); text-decoration: none; font-size: 16px; line-height: 1.35; transition: color 160ms var(--ease); }
.sh-index li a:hover { color: var(--yellow); }

.sh-read { margin: 0 0 56px; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.sh-read h2 { font-size: 22px; font-style: normal; margin: 0 0 18px; }
.sh-key { display: grid; gap: 18px 40px; margin: 0 0 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .sh-key { grid-template-columns: 1fr 1fr; } }
.sh-key dt { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; margin: 0 0 2px; }
.sh-key dd { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.55; max-width: 36em; }
.sh-note { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.6; max-width: 68ch; }
.sh-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.sh-dot.first { background: var(--red); }
.sh-dot.fine { border: 2px solid var(--muted); }

.sh-area { margin: 0 0 64px; padding: 0; }
.sh-area > h2 { margin: 0 0 2px; }
.sh-area-count { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.sh-q { display: grid; gap: 16px; padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 0; }
.sh-q:last-child { padding-bottom: 0; }
.sh-q h3 { font-size: 21px; line-height: 1.3; margin: 0 0 6px; color: var(--text); text-wrap: balance; }
.sh-q:target h3 { color: var(--yellow); }
.sh-drive { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.sh-drive a { color: var(--text-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sh-drive a:hover { color: var(--yellow); }
@media (min-width: 900px) {
  .sh-q { grid-template-columns: minmax(0, 5fr) minmax(0, 9fr); gap: 0 48px; }
  .sh-q-head { position: sticky; top: 92px; align-self: start; }
}
.sh-group { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sh-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.sh-list:last-child { margin-bottom: 0; }
.sh-list li { position: relative; padding-left: 24px; }
.sh-list li::before { content: ""; position: absolute; left: 1px; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.sh-list.fine li::before { background: none; border: 2px solid var(--muted); }
.sh-change { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--text); font-size: 17px; line-height: 1.4; }
.sh-name { font-weight: 650; }
.sh-name a { color: inherit; text-decoration: underline dotted var(--muted); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.sh-name a:hover { color: var(--text); text-decoration-color: var(--yellow); }
.sh-name b { color: var(--yellow); font-weight: 700; }
.sh-steps { color: var(--muted); font-size: 14px; white-space: nowrap; }
.sh-tag { font-size: 13px; line-height: 1.5; padding: 1px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); }
.sh-why { margin: 3px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.55; max-width: 62ch; }
.sh > .learn-app { max-width: 52em; }
.sh > .learn-app h2 { font-size: 22px; font-style: normal; margin: 0 0 12px; }

/* ---- a driver page's profile stats (FS-027) ----
   Driving sits right under the page's top block: a row of tiles (the small yellow label over a
   heavy figure), wrapping to two columns on a phone, then the lines and By game side by side on
   wide screens. It is not a panel, so its tiles are never cards inside a card. */
.driving { margin: 28px 0 8px; padding: 0; }
.driving-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.driving-head h2 { margin: 0; }
.seg-units[hidden] { display: none; }
.facts.drive { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0 18px; }
@media (min-width: 620px) { .facts.drive { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .facts.drive { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.facts.drive > div > span { color: var(--yellow); }
.facts.drive b { display: block; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; font-style: italic; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* A distance inside a figure is the figure, not another label. */
.facts.drive b span { display: inline; font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; margin: 0; }
.drive-more { display: grid; gap: 18px 36px; }
@media (min-width: 900px) { .drive-more.with-games { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; } }
.drive-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px 28px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.drive-lines li { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.drive-k { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.drive-v { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.drive-n { color: var(--muted); font-size: 14px; }
.drive-games h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.drive-note { margin: 18px 0 0; }
.drive-who { margin: 6px 0 0; color: var(--text-2); }
.drive-invite { margin: 10px 0 0; font-size: 14px; }
.drive-invite a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.drive-invite a:hover { color: var(--text-2); }
/* Results (FS-029): Driving's tiles for the headline figures, then the placings, each row one link. */
.results { margin: 28px 0 8px; padding: 0; }
.results h2 { margin: 0 0 4px; }
.results-intro { margin: 0; }
.results .facts.drive { margin: 12px 0 14px; }
@media (min-width: 620px) { .results .facts.drive { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.placings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.placings a {
  display: grid; grid-template-columns: minmax(7em, auto) minmax(0, 2fr) minmax(0, 1.5fr) auto; gap: 4px 16px; align-items: baseline;
  padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--text-2); text-decoration: none;
}
.placings a:hover, .placings a:focus-visible { background: var(--panel); color: var(--text); }
.placings .pl-place { color: var(--text); font-weight: 800; font-style: italic; }
.placings .pl-stage, .placings .pl-car { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.placings .pl-time { color: var(--link); text-align: right; }
@media (max-width: 619px) { .placings a { grid-template-columns: 1fr auto; } .placings .pl-stage, .placings .pl-car { grid-column: 1 / -1; } .placings .pl-time { grid-row: 1; grid-column: 2; } }
.driving-off h2 { margin-bottom: 8px; }
.stats-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 14px 0 12px; }
.stats-form fieldset.choices { min-width: 220px; }

/* ---- a driver page's Progress (FS-030) ----
   Under Driving, in the same quiet build: each game's four measures as rows, the figure on the left and
   the app's verdict in words on the right. Green and red only repeat what the words say. */
.progress-stats { margin: 28px 0 8px; padding: 0; }
.progress-stats h2 { margin: 0 0 4px; }
.pg-intro { margin: 0 0 6px; }
.pg-game { margin: 16px 0 0; }
.pg-game h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.pg-game h3 .muted { font-weight: 400; margin-left: 6px; }
.pg-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pg-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.pg-what { color: var(--text); font-variant-numeric: tabular-nums; }
.pg-verdict { font-size: 14px; font-weight: 700; }
.pg-better .pg-verdict { color: var(--ok); }
.pg-worse .pg-verdict { color: var(--red-ink); }
.pg-steady .pg-verdict, .pg-too-little .pg-verdict { color: var(--muted); font-weight: 600; }
.pg-bests { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; color: var(--text-2); }
.pg-bests b { color: var(--text); font-variant-numeric: tabular-nums; }
