/* turbogrid.app. Colours and type are the app's tokens (AppColors and the
   bundled fonts in the app repo's lib/app/design/app_theme.dart). Dark only,
   as the app is. No JavaScript and no inline styles: the CSP in _headers
   allows this stylesheet and the fonts beside it, nothing else. */

@font-face {
  font-family: "Audiowide";
  src: url("/assets/fonts/Audiowide-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --void: #04010c;                     /* AppColors.voidBlack */
  --navy: #120a31;                     /* AppColors.navy */
  --panel: rgba(23, 10, 56, 0.8);      /* AppColors.panel */
  --line: rgba(255, 109, 177, 0.4);    /* AppColors.line */
  --text: #fff5ff;                     /* AppColors.text */
  --muted: #c7b2e5;                    /* AppColors.muted */
  --cyan: #57f3ff;                     /* AppColors.cyan: links */
  --pink: #ff4fd8;                     /* AppColors.pink */
  --violet: #8f67ff;                   /* AppColors.violet */
  --gold: #ffd56a;                     /* AppColors.gold: safety */
  --display: "Audiowide", "Space Grotesk", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--navy);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* voidBlack at the top easing into navy, which carries the rest of a long
   page. */
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--navy);
  background-image: linear-gradient(180deg, var(--void) 0, var(--void) 8rem, var(--navy) 44rem);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* One centred 720 px column with 16 px gutters. */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -4rem;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--cyan);
  color: var(--text);
}

.skip:focus {
  top: 12px;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

main a {
  text-decoration: underline;
  text-decoration-color: rgba(87, 243, 255, 0.45);
  text-underline-offset: 3px;
}

main a:hover {
  text-decoration-color: var(--cyan);
}

/* Header: the wordmark, and the thin neon rule under it (the only
   decoration; there is no icon yet). */
.site-header {
  padding: 28px 0 8px;
}

.wordmark {
  display: inline-block;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 8px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan));
  box-shadow: 0 0 10px rgba(255, 79, 216, 0.55);
}

.wordmark sup,
h1 sup {
  font-size: 0.45em;
  vertical-align: super;
  line-height: 0;
}

main {
  display: block;
  padding: 24px 0 48px;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 6.5vw, 2.25rem);
}

h2 {
  margin: 2.4rem 0 0.6rem;
  font-size: 1.3rem;
  scroll-margin-top: 16px;
}

h3 {
  margin: 1.6rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  scroll-margin-top: 16px;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.3rem;
}

li + li {
  margin-top: 0.4rem;
}

li > ul,
li > ol {
  margin: 0.4rem 0 0;
}

strong {
  font-weight: 600;
}

/* "Version 2026-11-16 · Effective …" under a page title. */
.meta {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.lead {
  font-size: 1.1rem;
}

.muted {
  color: var(--muted);
}

.panel {
  margin: 1.5rem 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.panel > :last-child {
  margin-bottom: 0;
}

.panel h2 {
  margin-top: 0;
}

/* Driving safety, in the gold the app's safety notice uses. */
.callout {
  margin: 1.5rem 0;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 213, 106, 0.08);
}

.callout > :last-child {
  margin-bottom: 0;
}

/* "On this page". */
.toc {
  margin: 1.5rem 0 0.5rem;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.toc-title {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.4rem;
}

.toc li + li {
  margin-top: 0.15rem;
}

@media (min-width: 600px) {
  .toc ol {
    columns: 2;
    column-gap: 2rem;
  }

  .toc li {
    break-inside: avoid;
  }
}

/* Tables scroll inside their wrapper, never the page. */
.table-wrap {
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.table-wrap:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

caption {
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: left;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody th,
tbody td {
  border-top: 1px solid rgba(255, 109, 177, 0.22);
}

tbody th {
  font-weight: 600;
}

/* The neon outline button (the app's NeonGlow shape: 18 px corners). */
.button {
  display: inline-block;
  margin: 0.25rem 0 1rem;
  padding: 10px 20px;
  border: 1.5px solid var(--cyan);
  border-radius: 18px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(87, 243, 255, 0.35), inset 0 0 10px rgba(87, 243, 255, 0.12);
}

main a.button {
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
  box-shadow: 0 0 18px rgba(87, 243, 255, 0.55), inset 0 0 12px rgba(87, 243, 255, 0.2);
}

/* Home page. */
.hero {
  padding: 2rem 0 0.5rem;
}

.hero h1 {
  display: inline-block;
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 11vw, 3.4rem);
  letter-spacing: 0.04em;
}

/* The home page has no header: its title is the wordmark, with the same
   neon rule. */
.hero h1::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan));
  box-shadow: 0 0 14px rgba(255, 79, 216, 0.55);
}

.tagline {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.badge {
  display: inline-block;
  margin: 0 0 0.25rem;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.95rem;
}

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li + li {
  margin-top: 0;
  border-top: 1px solid rgba(255, 109, 177, 0.22);
}

.link-list a {
  display: block;
  padding: 12px 0;
  text-decoration: none;
}

.link-list a:hover .link-title {
  text-decoration: underline;
}

.link-title {
  display: block;
  font-weight: 600;
}

.link-note {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer. */
.site-footer {
  padding: 20px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

.footer-links li {
  display: inline;
}

.footer-links li + li::before {
  content: "\00B7";
  margin: 0 0.5rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }

  a,
  .wordmark {
    color: #000;
  }

  .skip,
  .toc,
  .wordmark::after,
  .hero h1::after {
    display: none;
  }

  .panel,
  .table-wrap,
  .callout {
    background: none;
    border-color: #999;
  }
}
