/* Aloud public pages. "Marker lamp" (design/DESIGN.md §2; spec §7.3).
   Black and white, the system font, and one colour: marker-lamp amber.
   Amber is a fill only (focus, buttons, tags), never text or a thin line on white. */
:root {
  --bg: #FFFFFF;
  --bg2: #F2F2F7;
  --ink: #000000;
  --ink2: #3A3A3C;
  --ink3: #636366;
  --line: #D1D1D6;
  --edge: #8E8E93;
  --amber: #FFB000;
  --on-amber: #000000;
  --red: #C4001A;
  --gutter: 40px;
  --max: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg2: #1C1C1E;
    --ink: #FFFFFF;
    --ink2: #D1D1D6;
    --ink3: #AEAEB2;
    --line: #38383A;
    --edge: #636366;
    --red: #FF6B6B;
  }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;          /* 17 px body, as in the app */
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Links: ink, underlined, never colour alone. */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

/* Focus: amber fill, black text, a solid ink bar under it (11.5:1 text). */
a:focus { outline: 3px solid transparent; }
a:focus-visible {
  outline: 3px solid transparent;
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: 0 -2px 0 var(--amber), 0 4px 0 var(--ink);
  text-decoration: none;
  border-radius: 2px;
}
main:focus { outline: none; }

/* Skip link: hidden until it gets keyboard focus. */
.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  padding: 10px 14px;
  z-index: 10;
}
.skip:focus, .skip:focus-visible { top: 8px; }

/* ---------- header ---------- */
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1.1875rem;           /* 19 px */
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
}
.brand:hover span { text-decoration: underline; text-underline-offset: 0.18em; }
.brand img {
  flex: none;
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line);
}

/* ---------- type ---------- */
main.wrap {
  padding-top: 32px;
  padding-bottom: 88px;
}
h1 {
  font-size: 3.25rem;             /* 52 px */
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0;
}
h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h3 { font-size: 1.1875rem; line-height: 1.3; margin: 1.6em 0 0.4em; }
/* Even line lengths: no lone last word in a heading or a button. */
h2, h3, .btn, .faq summary { text-wrap: balance; }
/* h1 keeps normal wrapping: balance broke "pre-trip" at its hyphen on phones. */
h1 { text-wrap: wrap; }
.prelaunch, .aid-line { text-wrap: pretty; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.45em; }

/* ---------- legal pages (Terms, Privacy, Support) ----------
   Phone: one column. Desktop: the title across the top; the in-page links in
   a sticky column on the left; the text in a reading column of about 40 em. */
.doc-head {
  padding: 24px 0 32px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 40px;
}
.doc-head h1 { max-width: 14em; }
.meta {
  display: inline-block;
  margin: 20px 0 0;
  padding: 4px 12px;
  border-radius: 9px;
  background: var(--bg2);
  color: var(--ink2);
  font-size: 0.9375rem;           /* 15 px, the app's smallest text */
  font-weight: 600;
  line-height: 1.5;
}
.doc-intro, .doc-body { max-width: 42rem; }
.doc-intro { font-size: 1.1875rem; line-height: 1.55; color: var(--ink2); margin-bottom: 40px; }
.doc-intro > :last-child { margin-bottom: 0; }
.doc-body h2 {
  padding-top: 32px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.doc-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc-body > p, .doc-body > ul { color: var(--ink); }

/* In-page links (Support, Privacy): the page's own h2s, one per row, each
   at least 44 px tall. No chevrons. */
.doc-side { margin: 0 0 48px; }
.toc {
  list-style: none;
  margin: 0;
  padding: 6px 20px;
  border-radius: 16px;
  background: var(--bg2);
}
.toc li { margin: 0; }
.toc li + li { border-top: 1px solid var(--line); }
.toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

/* A paragraph that is one link (the refund link on Support): an outlined
   button on its own line (the app's outlined button: 2 px ink, radius 16). */
.link-line { margin: 4px 0 20px; }
.link-line a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.link-line a:hover { background: var(--bg2); }
.link-line a:focus-visible { border-color: var(--on-amber); border-radius: 16px; background: var(--amber); }

@media (min-width: 1000px) {
  .doc-head { padding-top: 40px; margin-bottom: 56px; }
  .has-toc main.wrap {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 42rem);
    grid-template-areas:
      "head head"
      "side intro"
      "side body";
    column-gap: 72px;
    align-items: start;
  }
  .has-toc .doc-head { grid-area: head; }
  .has-toc .doc-intro { grid-area: intro; }
  .has-toc .doc-body { grid-area: body; }
  .has-toc .doc-side {
    grid-area: side;
    align-self: stretch;
    margin: 0;
  }
  .has-toc .toc {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
  .has-toc .doc-intro { margin-bottom: 48px; }
}

/* ---------- home (/, /es/, /go/*) ----------
   The mock of record: a two-column hero with the real result, an open
   "where Aloud works" section (four facts on grey tiles), a full-width amber Talk band (amber means
   "listening", as in the app), the air brake check, a four-column price
   table, privacy, +/− questions, and one closing action. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  font-size: 1rem;
  font-weight: 600;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.home h2 {
  font-size: 2.625rem;            /* 42 px */
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 32px 0 64px;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink2);
}
.home h1 {
  font-size: 3.875rem;            /* 62 px */
  line-height: 1.02;
  max-width: 11em;
}
.lead {
  margin: 20px 0 28px;
  max-width: 30em;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink2);
}
/* Spanish: practice is in English. A grey note, as the app's notes are. */
.en-note {
  margin: -8px 0 24px;
  max-width: 32em;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg2);
  font-size: 1rem;
  line-height: 1.45;
}
.en-note strong { font-weight: 800; }
.action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 22px;
  border-radius: 16px;
  background: var(--amber);
  color: var(--on-amber);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}
/* The arrow follows the last word, glued by a no-break space (no lone arrow,
   no arrow floating beside a two-line label). */
.btn > span::after { content: "\00a0\00a0\2192"; font-weight: 700; }
.end .btn { text-align: center; }
.btn:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.btn:focus-visible {
  border-radius: 16px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--ink);
}
.badge { display: inline-flex; border-radius: 10px; }
.badge img { display: block; height: 56px; width: auto; }
.badge:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--ink); border-radius: 10px; }
.fine-approved {
  flex: 1 1 14em;
  margin: 0;
  max-width: 24em;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink2);
}
/* Before approval: the plain fact line directly under each action. */
.prelaunch {
  margin: 12px 0 0;
  max-width: 30em;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink2);
}
.end .prelaunch { margin: 14px auto 0; }
.act .prelaunch { margin: 14px 0 0; color: var(--on-amber); }
.fine {
  margin: 14px 0 0;
  max-width: 30em;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink3);
}
.hero-fig { margin: 0; width: 100%; max-width: 492px; justify-self: end; }
.hero-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.hero-fig figcaption {
  margin: 12px 4px 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink2);
}
/* Stands in for a missing product shot in a preview build. No words. */
.shot-box { background: var(--bg2); border-radius: 24px; }
.shot-box.hero-img { aspect-ratio: 1240 / 1440; border: 0; }
.shot-box.talk-img, .shot-box.air-img { aspect-ratio: 1320 / 2868; }

/* Where Aloud works (round 6): an open section, not a box. A heading and a
   short lead, then four facts, each on its own grey tile with a small ink
   icon in a round cut-out. Two by two on wide screens, stacked on phones.
   No outline, no rails, no check marks. */
.fit {
  container-type: inline-size;
  margin: 0 0 20px;
  padding: 8px 0 0;
}
.fit-head { max-width: 40em; margin: 0 0 24px; }
.home .fit h2 {
  font-size: 2.125rem;            /* 34 px */
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  text-wrap: balance;
}
.fit-intro {
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.45;
  color: var(--ink2);
}
.fit-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.fit-fact {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 20px 24px 22px 20px;
  border-radius: 20px;
  background: var(--bg2);
}
.fit-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
}
.fit-ico .ico { display: block; width: 24px; height: 24px; }
.fit-fact p {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding-top: 9px;
  font-size: 1.0625rem;
  line-height: 1.45;
  overflow-wrap: normal;
  text-wrap: pretty;
}
.fit-not {
  margin: 20px 0 0;
  max-width: 46em;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink2);
  text-wrap: pretty;
}
.fit-more { margin: 2px 0 -10px; }
.fit-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
/* Very narrow (200% text on a phone): the icon moves above the words, so the
   words keep the full tile width and no long word breaks. */
@container (max-width: 12em) {
  .fit-fact { flex-direction: column; gap: 8px; }
  .fit-fact p { padding-top: 0; }
}
/* Practice-aid line under the fit strip. */
.aid-line {
  margin: 0 0 88px;
  max-width: 40em;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink2);
}

/* Talk band: full width, amber in both modes, black text. */
.band { background: var(--amber); color: var(--on-amber); }
.band-in {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
}
.band-shot { order: -1; }
.home .band h2 {
  font-size: 3rem;                /* 48 px */
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--on-amber);
}
.band p {
  margin: 0;
  max-width: 26em;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--on-amber);
}
.talk-img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto;
  border: 2px solid var(--on-amber);
  border-radius: 40px;
}
.shot-box.talk-img { background: rgba(0, 0, 0, 0.08); }

/* Sections */
.sec { padding: 88px 0; border-top: 1px solid var(--line); }
.sec-air { border-top: 0; }
.sub {
  margin: 0;
  max-width: 34em;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink2);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: center;
}
.split-shot { order: -1; }
.air-img {
  display: block;
  width: 100%;
  max-width: 492px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.tag {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  border-radius: 9px;
  background: var(--amber);
  color: var(--on-amber);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Price band: full width, the grey surface (dark grey in dark mode), with
   the table on the page colour at full contrast. Privacy is a short block
   under the table, with no rule of its own. */
.price-band { background: var(--bg2); }
.price-sec { padding: 88px 0 0; }
.price-band .sub { color: var(--ink); }
.price-band .price { background: var(--bg); }
.priv-block { padding: 40px 0 88px; max-width: 40em; }
.home .priv-block h2 { font-size: 1.375rem; line-height: 1.25; letter-spacing: 0; margin: 0 0 6px; }
.priv-block .priv { margin: 0 0 4px; font-size: 1.0625rem; color: var(--ink); }
.price-band + .wrap .faq { border-top: 0; }

/* Price table: label | Free | 7 days | 30 days. 2 px ink outline, no
   black header bar; the only amber is the Free tag. */
.price-wrap { container-type: inline-size; margin-top: 32px; }
.price {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 16px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 1.0625rem;
  line-height: 1.35;
  hyphens: auto;
  table-layout: fixed;
}
.price th, .price td {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}
.price thead th { border-top: 0; font-weight: 700; }
.price .corner, .price th[scope="row"] { text-align: left; }
.price th[scope="row"] { font-weight: 600; }
.price .corner { width: 34%; }   /* the fixed layout takes column widths from this first row */
.price thead .tag { margin: 0; font-size: 0.9375rem; }
.price .row-price th, .price .row-price td { border-top-color: var(--ink); }
.price .row-price td {
  font-size: 1.75rem;             /* 28 px */
  font-weight: 800;
  letter-spacing: -0.01em;
}
.price .no { color: var(--ink2); }
.after { margin: 18px 0 0; font-size: 1.0625rem; font-weight: 700; }

/* Phone width: each row's label above its three values. */
@container (max-width: 34em) {
  .price, .price thead, .price tbody { display: block; }
  .price tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price .corner { display: none; }
  .price thead th { padding: 12px 6px; }
  .price th[scope="row"] {
    grid-column: 1 / -1;
    width: auto;
    padding: 12px 14px 2px;
  }
  .price td { border-top: 0; padding: 4px 6px 12px; }
  .price .row-price td { font-size: 1.375rem; }
  .price .row-price th { border-top-color: var(--ink); }
}
/* Very narrow (large text): one value per line, each with its column name. */
@container (max-width: 14em) {
  .price thead { display: none; }
  .price tr { grid-template-columns: minmax(0, 1fr); }
  .price tbody tr:first-child th { border-top: 0; }
  .price td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 14px 8px;
    text-align: right;
  }
  .price td::before { content: attr(data-col); font-size: 1rem; font-weight: 600; text-align: left; letter-spacing: 0; }
}

/* Privacy */
.priv {
  margin: 0 0 8px;
  max-width: 40em;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink2);
}
.link-row { margin: 0; }
.link-row a, .end-alt a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* Questions: +/− marker inside the padding, rows at least 60 px. */
.faq h2 { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 12px 0;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 1em;
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}
.faq details[open] > summary::after { content: "\2212"; }
.faq summary:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.faq summary:focus { outline: 3px solid transparent; }
.faq summary:focus-visible {
  /* The fill reaches 8 px past the text on each side; the negative margin
     keeps the text where it was. */
  margin-inline: -8px;
  padding-inline: 8px;
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: 0 4px 0 var(--ink);
}
.faq details p {
  margin: 0 0 24px;
  max-width: 40em;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink2);
}

/* Closing action */
.end { padding: 96px 0; border-top: 1px solid var(--line); text-align: center; }
.home .end h2 { max-width: 18em; margin: 0 auto 28px; }
.end .action { justify-content: center; }
.end-alt { margin: 16px 0 0; }

@media (max-width: 760px) {
  .site-nav .nav-wide { display: none; }
  .site-nav { column-gap: 16px; }
  .home h2 { font-size: 1.9375rem; }      /* 31 px */
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 4px 0 24px; }
  .eyebrow { margin-bottom: 10px; }
  .fine { margin-top: 12px; }
  .home h1 { font-size: 2.5rem; }          /* 40 px */
  .lead { margin: 16px 0 22px; font-size: 1.125rem; }
  .en-note { margin: -6px 0 20px; font-size: 0.9375rem; padding: 10px 14px; }
  .hero-fig { justify-self: start; }
  .hero-img, .shot-box.hero-img { border-radius: 18px; }
  .hero-fig figcaption { margin-top: 10px; }
  .fit { padding: 0; margin-bottom: 14px; }
  .aid-line { margin: 0 0 56px; font-size: 0.9375rem; }
  /* Phones: the facts stack; the icon sits bare beside the words (no
     cut-out), so each tile stays short and the section ends on the second
     screen (spec §5.1.4: the "not" line ends by 1,688 px at 390 x 844). */
  .fit-head { margin-bottom: 10px; }
  .home .fit h2 { font-size: 1.375rem; line-height: 1.15; margin-bottom: 4px; }
  .fit-intro { font-size: 0.9375rem; line-height: 1.4; }
  .fit-facts { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fit-fact { gap: 10px; padding: 9px 14px 9px 12px; border-radius: 14px; }
  .fit-ico { width: 24px; height: 21px; background: none; border-radius: 0; }
  .fit-fact p { padding-top: 0; font-size: 0.9375rem; line-height: 1.4; }
  /* Spanish runs about 25% longer; this keeps the fit strip on the second screen (spec §5.1.4). */
  .page-home-es h1 { font-size: 2.125rem; }
  .page-home-es .lead { font-size: 1.0625rem; }
  /* Spanish runs longer; tighter spacing keeps the end of the "not" line
     within 1,688 px at 390 x 844 (spec §5.1.4, chunk 4 item 12). */
  .page-home-es .hero { gap: 14px; padding-bottom: 14px; }
  .page-home-es .eyebrow { margin-bottom: 6px; }
  .page-home-es .lead { margin: 12px 0 16px; }
  .page-home-es .en-note { margin: -4px 0 14px; padding: 8px 12px; }
  .page-home-es .prelaunch { margin-top: 8px; }
  .page-home-es .fine { margin-top: 8px; }
  .page-home-es .hero-fig figcaption { margin-top: 8px; }
  .fit-not { margin-top: 10px; font-size: 0.9375rem; line-height: 1.45; }
  .band-in { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 56px; padding-bottom: 56px; }
  .band-shot, .split-shot { order: 0; }
  .home .band h2 { font-size: 2.125rem; }
  .band p { font-size: 1.125rem; }
  .talk-img { max-width: 280px; border-radius: 34px; }
  .sec { padding: 64px 0; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .air-img { max-width: none; border-radius: 18px; }
  .price-sec { padding-top: 64px; }
  .priv-block { padding: 32px 0 64px; }
  .sub { font-size: 1.0625rem; }
  .priv { font-size: 1.0625rem; }
  .faq summary { font-size: 1.0625rem; }
  .end { padding: 64px 0; }
}

/* ---------- practice page (/steering-axle/) ----------
   A printed-homework feel: a heavy rule under the title, the source on a grey
   card, the "how to practice" box in the fit strip's 3 px ink outline, each
   check numbered large with one sentence per line on a thin reading rail, the
   citation as a grey tag, and one amber action block at the end. */
.prac { padding-top: 24px; padding-bottom: 88px; }
.prac-head {
  padding: 24px 0 36px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 40px;
}
.prac h1 {
  font-size: 3.625rem;            /* 58 px */
  line-height: 1.02;
  max-width: 12em;
}
.prac .lead { margin: 20px 0 24px; max-width: 32em; }
.source {
  max-width: 42rem;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--bg2);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.src { margin: 0; color: var(--ink); font-weight: 600; }
.src-note { margin: 4px 0 0; color: var(--ink2); }
.print-only { display: none; }
.print-brand { display: none; }
.print-only .url { white-space: nowrap; }

.howto {
  container-type: inline-size;
  margin: 0 0 40px;
  padding: 20px 24px;
  border: 3px solid var(--ink);
  border-radius: 18px;
}
.prac .howto h2 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 8px; }
.howto p { margin: 0; font-size: 1.0625rem; line-height: 1.55; }

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: check;
}
.check {
  counter-increment: check;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  column-gap: 8px;
  margin: 0;
  padding: 32px 0 36px;
  border-top: 1px solid var(--line);
}
.check:first-child { border-top: 3px solid var(--ink); }
.check::before {
  content: counter(check, decimal-leading-zero);
  grid-row: 1 / span 3;
  font-size: 2.25rem;             /* 36 px */
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.check > * { grid-column: 2; }
.prac .check-h {
  font-size: 1.75rem;             /* 28 px */
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 2px 0 16px;
}
.say { max-width: 40em; }
/* Each sentence starts with an empty tick box (drawn, not a character), so
   a printed sheet can be ticked point by point. Hanging indent. */
.say p {
  position: relative;
  margin: 0;
  padding: 6px 0 6px 1.75em;
  font-size: 1.125rem;            /* 18 px */
  line-height: 1.5;
}
.say p::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(6px + 0.75em - 0.4375em);
  width: 0.875em;
  height: 0.875em;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}
.say p:first-child::before { top: calc(2px + 0.75em - 0.4375em); }
.say p:first-child { padding-top: 2px; }
.say p:last-child { padding-bottom: 2px; }
.cite {
  justify-self: start;
  margin: 16px 0 0;
  padding: 4px 12px;
  border-radius: 9px;
  background: var(--bg2);
  color: var(--ink2);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}

/* One action block at the end: amber in both modes, black text. */
.act {
  margin: 24px 0 0;
  padding: 32px 32px 36px;
  border-radius: 24px;
  background: var(--amber);
  color: var(--on-amber);
}
.prac .act h2 {
  font-size: 2.125rem;            /* 34 px */
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  max-width: 16em;
  color: var(--on-amber);
}
.act p { color: var(--on-amber); max-width: 36em; }
.act-body { margin: 0 0 18px; font-size: 1.1875rem; line-height: 1.5; }
.act-fit {
  margin: 0 0 18px;
  padding: 12px 0;
  border-top: 2px solid var(--on-amber);
  border-bottom: 2px solid var(--on-amber);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.45;
}
.act-price { margin: 0 0 24px; font-size: 1rem; line-height: 1.5; }
.btn-ink { background: #000; color: #FFF; }
.btn-ink:focus-visible { background: #000; color: #FFF; box-shadow: 0 0 0 3px var(--amber), 0 0 0 6px #000; }
.act .badge:focus-visible { box-shadow: 0 0 0 3px var(--amber), 0 0 0 6px #000; }
.aid {
  margin: 28px 0 0;
  max-width: 40em;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink2);
}

@media (min-width: 1000px) {
  .prac-head { padding-top: 40px; margin-bottom: 56px; }
  .prac-body {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    column-gap: 72px;
    align-items: start;
  }
  .howto { position: sticky; top: 24px; margin: 0; }
  /* The title's rule already sits above the first check here. */
  .check:first-child { border-top: 0; padding-top: 4px; }
}
@media (max-width: 760px) {
  .prac { padding-top: 8px; padding-bottom: 64px; }
  .prac-head { padding: 12px 0 28px; margin-bottom: 28px; }
  .prac h1 { font-size: 2.5rem; }  /* 40 px */
  .prac .lead { margin: 16px 0 20px; font-size: 1.125rem; }
  .source { padding: 12px 14px; }
  .howto { padding: 16px 18px; margin-bottom: 28px; }
  .check { grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 4px; padding: 26px 0 30px; }
  .check::before { font-size: 1.625rem; }
  .prac .check-h { font-size: 1.4375rem; margin-bottom: 12px; }  /* 23 px */
  .say p { font-size: 1.0625rem; }
  .act { padding: 24px 20px 28px; border-radius: 20px; }
  .prac .act h2 { font-size: 1.75rem; }
  .act-body { font-size: 1.0625rem; }
}
/* Very narrow (large text): the number sits above the check. */
@container (max-width: 14em) { .howto h2 { overflow-wrap: anywhere; } }
@media (max-width: 380px) {
  .check { grid-template-columns: minmax(0, 1fr); }
  .check::before { grid-row: auto; margin-bottom: 8px; }
  .check > * { grid-column: 1; }
}

/* The four parts of the air brake check (A1): one sub-block per part, a small
   CSS number, the part's name, then its sentences with tick boxes. */
.steps { counter-reset: step; }
.step {
  counter-increment: step;
  margin: 0;
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
}
.step:first-child { padding-top: 4px; border-top: 0; }
.prac .step-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 1.25rem;             /* 20 px */
  line-height: 1.25;
}
.prac .step-h::before {
  content: counter(step);
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.6em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translateY(-0.1em);
}

/* Links to the previous and next section and to the hub (arrows are CSS). */
.sec-nav { margin: 40px 0 0; padding-top: 20px; border-top: 3px solid var(--ink); }
.sec-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 24px;
}
.sec-nav li { margin: 0; }
.sec-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}
.sec-prev a::before { content: "\2190"; flex: none; }
.sec-next { grid-column: 2; }
.sec-next a { justify-content: flex-end; text-align: right; }
.sec-next a::after { content: "\2192"; flex: none; }
.sec-hub { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .sec-nav ul { grid-template-columns: minmax(0, 1fr); }
  .sec-next { grid-column: 1; }
  .sec-next a { justify-content: flex-start; text-align: left; }
}

/* Checklist hub (/pre-trip-checklist/): the eight sections in file order. */
.hub-head { margin-bottom: 0; }
.hub-head .lead { margin-bottom: 0; }
.hub-list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  counter-reset: hub;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.hub-item {
  counter-increment: hub;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  column-gap: 8px;
  margin: 0;
  padding: 24px 0 26px;
  border-top: 1px solid var(--line);
}
.hub-item:first-child { border-top: 0; }
.hub-item::before {
  content: counter(hub, decimal-leading-zero);
  grid-row: 1 / span 3;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.hub-item > * { grid-column: 2; }
.prac .hub-item h2 { margin: 0 0 6px; font-size: 1.625rem; line-height: 1.15; letter-spacing: -0.01em; }
.hub-item h2 a { display: inline-flex; align-items: center; min-height: 44px; }
.hub-lead { margin: 0 0 10px; max-width: 40em; font-size: 1.0625rem; line-height: 1.5; }
.hub-count {
  justify-self: start;
  margin: 0;
  padding: 4px 12px;
  border-radius: 9px;
  background: var(--bg2);
  color: var(--ink2);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}
@media (min-width: 1000px) {
  .hub-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; }
  .hub-item:nth-child(2) { border-top: 0; }
}
@media (max-width: 760px) {
  .hub-item { grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 4px; padding: 20px 0 22px; }
  .hub-item::before { font-size: 1.625rem; }
  .prac .hub-item h2 { font-size: 1.375rem; }
  .prac .step-h { font-size: 1.125rem; }
}
@media (max-width: 380px) {
  .hub-item { grid-template-columns: minmax(0, 1fr); }
  .hub-item::before { grid-row: auto; margin-bottom: 8px; }
  .hub-item > * { grid-column: 1; }
}

/* Long joined words ("In-Vehicle/Engine", "(spring/parking)") may break at
   200% text on a phone rather than push the page sideways. */
.hub-item h2, .hub-item h2 a, .prac .step-h, .prac .check-h, .sec-nav a { overflow-wrap: anywhere; }
.hub-item h2 a { max-width: 100%; }

/* Takedown notice (spec §5.4b). */
.notice { padding: 24px 0 8px; max-width: 40rem; }
.notice h1 { font-size: 3rem; }
.notice-body { margin: 20px 0 24px; font-size: 1.25rem; line-height: 1.45; color: var(--ink2); }
@media (max-width: 760px) { .notice h1 { font-size: 2.25rem; } }

/* ---------- 404 ---------- */
.page-404 main.wrap { padding-top: 56px; }
.page-404 h1 { font-size: 4rem; }
.nf-line { margin: 20px 0 32px; font-size: 1.25rem; color: var(--ink2); }
.page-list {
  list-style: none;
  max-width: 28rem;
  margin: 0;
  padding: 0;
  border-top: 3px solid var(--ink);
}
.page-list li { margin: 0; border-bottom: 1px solid var(--line); }
.page-list a {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 12px 0;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.page-list a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink3);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.site-footer .wrap {
  padding-top: 24px;
  padding-bottom: 40px;
}
.site-footer a { color: var(--ink2); }
.site-footer a:focus-visible { color: var(--on-amber); }
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}
.footer-links li { margin: 0; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-links a[aria-current="page"] { color: var(--ink); font-weight: 700; }
/* Must come after the rule above: in dark mode --ink is white, and white on amber is 1.83:1. */
.footer-links a[aria-current="page"]:focus-visible { color: var(--on-amber); }
.footer-note { margin: 0 0 8px; max-width: 48em; }
.footer-contact {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 12px;
}
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  main.wrap { padding-top: 16px; padding-bottom: 64px; }
  h1 { font-size: 2.375rem; }    /* 38 px */
  .page-404 h1 { font-size: 2.75rem; }
  h2 { font-size: 1.375rem; }
  .doc-head { padding: 16px 0 24px; margin-bottom: 28px; }
  .doc-intro { font-size: 1.0625rem; }
  .doc-side { margin-bottom: 40px; }
  .toc { padding: 4px 16px; }
  .doc-body h2 { padding-top: 28px; margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  a:focus-visible { outline: 3px solid CanvasText; }
  .toc, .meta { border: 1px solid CanvasText; }
}

/* ---------- print (the practice page as homework, spec §5.3) ----------
   Black on white whatever the screen mode. Hides the header, the action
   block, badges, and the footer links; keeps the Texas source line, every
   citation, and prints the page address from the print-only line. */
@media print {
  :root {
    --bg: #FFFFFF; --bg2: #FFFFFF; --ink: #000000; --ink2: #000000; --ink3: #333333; --line: #999999;
    color-scheme: light;
  }
  @page { margin: 14mm 14mm 16mm; }
  body { font-size: 11pt; line-height: 1.4; background: #FFF; color: #000; }
  .skip, .site-header, .act, .badge, .site-footer nav, .footer-contact { display: none !important; }
  .print-only { display: block; margin: 6px 0 0; font-weight: 600; }
  .print-brand { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14pt; font-weight: 800; line-height: 1.2; }
  .print-brand img { display: block; width: 24px; height: 24px; border-radius: 6px; }
  .wrap { max-width: none; padding-left: 0; padding-right: 0; }
  main.prac { padding: 0; }
  .prac-head { padding: 0 0 10px; margin-bottom: 12px; border-bottom-width: 2px; }
  .prac h1 { font-size: 22pt; max-width: none; }
  .prac .lead { margin: 6px 0 8px; font-size: 11pt; }
  .eyebrow { margin-bottom: 4px; font-size: 10pt; }
  .source { padding: 0; border-radius: 0; font-size: 10pt; }
  .prac-body { display: block; }
  .howto { position: static; margin: 0 0 10px; padding: 8px 12px; border-width: 1.5pt; border-radius: 8px; break-inside: avoid; }
  .prac .howto h2 { font-size: 12pt; margin-bottom: 2px; }
  .howto p { font-size: 10.5pt; }
  .check { grid-template-columns: 2.4em minmax(0, 1fr); padding: 8px 0 10px; break-inside: avoid; }
  .check:first-child { border-top: 2px solid #000; padding-top: 8px; }
  .check::before { font-size: 16pt; }
  .prac .check-h { font-size: 13pt; margin: 0 0 4px; }
  .say p { padding: 1px 0 1px 1.75em; font-size: 10.5pt; line-height: 1.35; }
  .say p::before, .say p:first-child::before { top: calc(1px + 0.675em - 0.4375em); border: 1.5pt solid #000; }
  .cite { margin-top: 5px; padding: 0; font-size: 9.5pt; border-radius: 0; }
  .aid { margin-top: 10px; font-size: 9.5pt; }
  .sec-nav { display: none !important; }
  .step { padding: 4px 0 6px; break-inside: avoid; }
  .prac .step-h { font-size: 11.5pt; margin: 0 0 3px; }
  .prac .step-h::before { border-width: 1.5pt; }
  .hub-item { padding: 6px 0 8px; break-inside: avoid; }
  .hub-item::before { font-size: 16pt; }
  .prac .hub-item h2 { font-size: 13pt; margin: 0 0 2px; }
  .hub-item h2 a { min-height: 0; }
  .hub-lead { font-size: 10.5pt; margin: 0 0 2px; }
  .hub-count { padding: 0; font-size: 9.5pt; border-radius: 0; }
  .hub-list { display: block; margin-bottom: 10px; }
  .site-footer { border-top: 0; font-size: 9pt; }
  .site-footer .wrap { padding: 4px 0 0; }
  a { text-decoration: none; }
}
