/* phlov.dev — one stylesheet, no scripts, no web fonts.
   Tokens mirror docs/design-language-ios.md §3: warm paper by day, warm ember by night,
   one terracotta control that is the only saturated thing on the page. */

:root {
  color-scheme: light dark;

  --bg: #FBF7F2;
  --surface: #FFFFFF;
  --text: #241F19;
  --text-2: #5A5148;
  --text-3: #736A5F;
  --accent: #B8430D;
  --accent-fg: #FBF7F2;
  --accent-depth: #8C3209;
  --control: #EFE6DA;
  --control-stroke: #8E7C64;
  --success: #42702F;
  --divider: #E9DFD1;

  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-km: "Khmer Sangam MN", "Khmer MN", "Noto Sans Khmer", "Leelawadee UI", "Khmer UI",
    sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.75rem;
  --space-9: 4rem;
  --space-section: clamp(4rem, 2.5rem + 6vw, 8rem);

  --radius-s: 0.625rem;
  --radius-m: 1rem;
  --radius-l: 1.75rem;
  --radius-pill: 999px;

  --size-display: clamp(2.75rem, 1.4rem + 5.63vw, 5rem);
  --size-h2: clamp(1.75rem, 1.11rem + 2.56vw, 2.75rem);
  --size-prose-h2: clamp(1.5rem, 1.2rem + 1.25vw, 2rem);
  --size-beat: clamp(2rem, 1.475rem + 2.19vw, 2.875rem);
  --size-lead: clamp(1.3125rem, 1.15rem + 0.8vw, 1.75rem);
  --size-respell: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --size-h3: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --size-lede: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --size-body: clamp(1.0625rem, 1.03rem + 0.15vw, 1.125rem);
  --size-small: 0.9375rem;
  --size-meta: 0.875rem;

  --gutter: min(clamp(1.25rem, 0.5rem + 3.6vw, 3rem), 6.25vw);
  --measure: 34rem;
}

/* From 1024px every fluid size is pure rem, so enlarging text enlarges it in full. */
@media (min-width: 1024px) {
  :root {
    --size-display: 5rem;
    --size-h2: 2.75rem;
    --size-prose-h2: 2rem;
    --size-beat: 2.875rem;
    --size-lead: 1.75rem;
    --size-respell: 1.5rem;
    --size-h3: 1.375rem;
    --size-lede: 1.3125rem;
    --size-body: 1.125rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110E;
    --surface: #1F1A15;
    --text: #F5EFE7;
    --text-2: #B8AFA3;
    --text-3: #9A9084;
    --accent: #F2913A;
    --accent-fg: #14110E;
    --accent-depth: #C46F24;
    --control: #2F2820;
    --control-stroke: #857A6A;
    --success: #A3CE80;
    --divider: #383027;
  }
}

/* ---------- base ---------- */

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

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

body {
  container: page / inline-size;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
table {
  margin: 0;
}

:where(ul, ol)[class] {
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

/* The cap only bites below about 390px at enlarged text sizes: 87.5vw of line / 3.78em, the
   widest h1 word ("Support"). */
h1 {
  font-size: min(var(--size-display), 22.8vw);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--size-h2);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--size-h3);
  font-weight: 700;
  line-height: 1.25;
}

strong {
  font-weight: 700;
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

[id] {
  scroll-margin-top: var(--space-6);
}

main:focus {
  outline: none;
}

.hero__grid > *,
.split > *,
.loop > *,
.loop-after > *,
.trio > *,
.modes > li > *,
.course > *,
.phrases-block > *,
.pair > *,
.path > li,
.path > li > span {
  min-width: 0;
}

.wrap {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  z-index: 10;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-300%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- shared pieces ---------- */

.lede {
  max-width: var(--measure);
  font-size: var(--size-lede);
  line-height: 1.5;
  color: var(--text-2);
}

.eyebrow {
  font-size: var(--size-small);
  font-weight: 600;
  color: var(--text-2);
}

/* The app's dashed rule under the driving-screen header, used as the one divider. */
.road {
  display: block;
  width: 9rem;
  max-width: 100%;
  height: 0.25rem;
  border-radius: 0.125rem;
  color: var(--accent);
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 0.625rem,
    transparent 0.625rem 1.125rem
  );
}

.status-pill {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-s);
  background: var(--control);
  color: var(--text-2);
  font-size: var(--size-small);
  font-weight: 600;
  line-height: 1.3;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: var(--space-3) var(--space-7);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 0 0 var(--accent-depth);
  transition: transform 100ms ease-out, box-shadow 100ms ease-out;
}

.button:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 0 var(--accent-depth);
}

.button:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--accent-depth);
}

.button:focus-visible {
  border-radius: var(--radius-pill);
  outline-offset: 4px;
}

.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

/* The contact address: an ordinary link that may wrap only when the line is narrower than
   the address itself. */
.contact-email {
  overflow-wrap: anywhere;
}

.km-respell {
  font-weight: 700;
  color: var(--text);
}

/* ---------- header ---------- */

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-6);
  padding-block: var(--space-5);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  min-height: 2.75rem;
  padding-block: var(--space-1);
  color: var(--text);
  font-size: 2.125rem;
  line-height: 1;
  text-decoration: none;
}

.wordmark__latin {
  font-weight: 900;
  letter-spacing: -0.016em;
}

/* Khmer Sangam MN carries its ink low in a tall line box (design doc §4); the cluster is
   lifted so its body sits on the Latin x-height band instead of hanging beneath it. */
.wordmark__khmer {
  position: relative;
  top: -0.16em;
  color: var(--accent);
  font-family: var(--font-km);
  font-size: 0.9em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  margin-inline: calc(var(--space-1) * -1);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--space-1);
  color: var(--text-2);
  font-size: 1rem;
  font-weight: 600;
  text-decoration-line: none;
}

.nav a:hover {
  color: var(--text);
  text-decoration-line: underline;
}

.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.16em;
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(1.5rem, 0.5rem + 4vw, 4.5rem) var(--space-section);
}

.hero__grid {
  display: grid;
  gap: var(--space-9) var(--space-8);
}

.hero__copy > * + * {
  margin-top: var(--space-6);
}

.hero__copy h1 {
  margin-top: var(--space-4);
  max-width: 12em;
}

.hero__copy .lede {
  margin-top: var(--space-7);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-7);
  margin-top: var(--space-7);
}

.hero__screen {
  width: 100%;
  max-width: 21rem;
  justify-self: center;
}

@container page (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
    align-items: start;
  }

  .hero__screen {
    max-width: none;
    margin-top: var(--space-7);
  }
}

@container page (min-width: 80rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 23.5rem;
    column-gap: var(--space-9);
  }
}

/* ---------- screenshots: real screens on a mat, never in a drawn bezel ---------- */

.screen {
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-radius: 2.25rem;
  background: var(--control);
}

.screen__frame {
  display: block;
  container-type: inline-size;
}

.screen__frame img {
  display: block;
  width: 100%;
  border: 1px solid var(--divider);
  border-radius: 2.5rem;
  border-radius: 12.5cqw;
  background: var(--bg);
}

.screen figcaption {
  margin-top: var(--space-3);
  padding-inline: var(--space-2);
  color: var(--text-2);
  font-size: var(--size-meta);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

/* ---------- sections ---------- */

.section {
  padding-block: 0 var(--space-section);
}

.section-head {
  margin-bottom: var(--space-8);
}

.section-head .road {
  margin-bottom: var(--space-7);
}

.section-head h2 {
  max-width: 16em;
}

.section-head h2 + p {
  margin-top: var(--space-5);
}

.body {
  max-width: var(--measure);
  color: var(--text-2);
}

.body + .body {
  margin-top: var(--space-4);
}

.split {
  display: grid;
  gap: var(--space-8);
}

.split > .section-head {
  margin-bottom: 0;
}

@container page (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: clamp(2.75rem, 6vw, 6rem);
    align-items: start;
  }

  .split--media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Lead-in lists: a bold first sentence, then the plain one. Quiet rows, no cards. */
.points > li {
  padding-block: var(--space-5);
  border-top: 1px solid var(--divider);
  color: var(--text-2);
}

.points > li:last-child {
  border-bottom: 1px solid var(--divider);
}

.points strong {
  color: var(--text);
}

.points--lead strong {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--size-h3);
  line-height: 1.25;
}

/* ---------- the loop ---------- */

.loop {
  --stop: min(2.5rem, 12.5vw);
  display: grid;
  padding: min(clamp(1.25rem, 0.25rem + 4vw, 3.5rem), 6.25vw);
  border: 1px solid var(--divider);
  border-radius: 2rem;
  background: var(--surface);
}

/* Narrow: number and label share a row, the big line gets the full width, and the dashed
   road runs between beats. Wide: three columns with the road joining the numbers. */
.beat {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-3);
  align-items: center;
  padding-bottom: var(--space-7);
}

.beat + .beat {
  padding-top: var(--space-7);
}

.beat:last-child {
  padding-bottom: 0;
}

.beat + .beat::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.125rem;
  height: 0.25rem;
  color: var(--control-stroke);
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 0.625rem,
    transparent 0.625rem 1.125rem
  );
}

.beat__num {
  display: grid;
  place-items: center;
  width: var(--stop);
  height: var(--stop);
  border: 2px solid var(--control-stroke);
  border-radius: 50%;
  background: var(--control);
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1;
}

.beat--turn .beat__num {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
}

.beat__label {
  color: var(--text-2);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

/* Display text: the cap only bites on a narrow screen at enlarged text sizes, and is set so
   the longest token (suo-sdei, 4.01em) still fits the panel's 75vw. */
.beat__line {
  grid-column: 1 / -1;
  margin-top: var(--space-4);
  font-size: min(var(--size-beat), 18.4vw);
  line-height: 1.15;
  letter-spacing: 0;
}

.beat__line--prompt {
  color: var(--text-2);
  font-weight: 500;
}

.beat__line--turn {
  color: var(--accent);
  font-weight: 700;
}

.beat__line--km {
  color: var(--text);
  font-weight: 700;
}

.beat__text {
  grid-column: 1 / -1;
  margin-top: var(--space-4);
  max-width: 26rem;
  color: var(--text-2);
}

@container page (min-width: 56rem) {
  .loop {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--space-8);
  }

  .beat,
  .beat + .beat {
    display: block;
    padding: calc(var(--stop) + var(--space-5)) 0 0;
  }

  .beat::before,
  .beat + .beat::before {
    content: "";
    position: absolute;
    left: var(--stop);
    right: calc(var(--space-8) * -1);
    top: calc(var(--stop) / 2 - 0.125rem);
    height: 0.25rem;
    color: var(--control-stroke);
    background: repeating-linear-gradient(
      90deg,
      transparent 0 0.5rem,
      currentColor 0.5rem 1.125rem
    );
  }

  .beat:last-child::before {
    content: none;
  }

  .beat__num {
    position: absolute;
    left: 0;
    top: 0;
  }

  .beat__label {
    position: absolute;
    top: 0;
    left: var(--stop);
    display: flex;
    align-items: center;
    min-height: var(--stop);
    padding-inline: var(--space-3);
    background: var(--surface);
  }

  .beat__line {
    margin-top: var(--space-2);
  }
}

.loop-after {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-9);
}

.loop-after .screen {
  width: 100%;
  max-width: 19rem;
  justify-self: center;
}

@container page (min-width: 56rem) {
  .loop-after {
    grid-template-columns: 19rem minmax(0, 1fr);
    column-gap: clamp(2.75rem, 6vw, 6rem);
    align-items: center;
  }

  .loop-after .points {
    max-width: 38rem;
  }
}

/* ---------- set-apart note (calm; there is no red) ---------- */

.aside-note {
  margin-top: var(--space-7);
  padding: min(var(--space-6), 7.5vw);
  border-radius: var(--radius-l);
  background: var(--control);
  color: var(--text);
}

.aside-note strong {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--size-h3);
  line-height: 1.25;
}

.aside-note a {
  color: var(--text);
}

/* ---------- three statements ---------- */

.trio {
  display: grid;
  gap: var(--space-7) var(--space-8);
  margin-top: var(--space-8);
}

.trio > li {
  padding-top: var(--space-5);
  border-top: 2px solid var(--text);
  color: var(--text-2);
}

.trio strong {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text);
  font-size: var(--size-lead);
  font-weight: 800;
  line-height: 1.15;
}

@container page (min-width: 48rem) {
  .trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- the two modes, drawn as the app's pill toggles ---------- */

.modes > li {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid var(--divider);
  color: var(--text-2);
}

.modes > li:last-child {
  border-bottom: 1px solid var(--divider);
}

.pill {
  justify-self: start;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-s);
  background: var(--control);
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

@container page (min-width: 30rem) {
  .modes > li {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: center;
    column-gap: var(--space-5);
  }
}

/* ---------- cards ---------- */

.pair {
  display: grid;
  gap: var(--space-5);
  align-items: start;
  width: 100%;
  max-width: 19rem;
  justify-self: center;
}

.pair .screen {
  padding: var(--space-4);
}

.pair__caption {
  grid-column: 1 / -1;
  color: var(--text-3);
  font-size: var(--size-meta);
  font-weight: 500;
  text-align: center;
}

@container page (min-width: 40rem) {
  .pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 36rem;
  }

  .pair .screen:first-child {
    margin-top: var(--space-9);
  }
}

/* ---------- the course: the path ---------- */

.course {
  display: grid;
  gap: var(--space-8);
}

.course .screen {
  width: 100%;
  max-width: 19rem;
  justify-self: center;
}

@container page (min-width: 56rem) {
  .course {
    grid-template-columns: minmax(0, 1fr) 19rem;
    column-gap: clamp(2.75rem, 6vw, 6rem);
    align-items: start;
  }
}

.path {
  --stop: min(2.75rem, 13.75vw);
  --sway: min(1rem, 5vw);
  --line: 0.375rem;
  display: grid;
  column-gap: var(--space-7);
}

@container page (min-width: 36rem) {
  .path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(9, auto);
    grid-auto-flow: column;
  }

  .path > li:nth-child(9)::before {
    content: none;
  }
}

.path > li {
  position: relative;
  box-sizing: content-box;
  display: flex;
  align-items: center;
  min-height: var(--stop);
  padding: 0 0 var(--space-5) calc(var(--stop) + var(--sway) + min(var(--space-4), 5vw));
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

/* The soft line between stops: a diagonal band drawn corner to corner, so it meets the
   next stop whatever the row height. */
.path > li::before {
  content: "";
  position: absolute;
  left: calc(var(--stop) / 2 - var(--line) / 2);
  top: calc(var(--stop) / 2);
  width: calc(var(--sway) + var(--line));
  height: 100%;
  color: var(--divider);
  background: linear-gradient(
    to top right,
    transparent calc(50% - var(--line) / 2),
    currentColor calc(50% - var(--line) / 2) calc(50% + var(--line) / 2),
    transparent calc(50% + var(--line) / 2)
  );
}

.path > li:nth-child(even)::before {
  background: linear-gradient(
    to top left,
    transparent calc(50% - var(--line) / 2),
    currentColor calc(50% - var(--line) / 2) calc(50% + var(--line) / 2),
    transparent calc(50% + var(--line) / 2)
  );
}

.path > li:last-child::before {
  content: none;
}

.path__num {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: var(--stop);
  height: var(--stop);
  border: 2px solid var(--control-stroke);
  border-radius: 50%;
  background: var(--control);
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1;
}

.path > li:nth-child(even) > .path__num {
  left: var(--sway);
}

.phrases-block {
  display: grid;
  gap: var(--space-7) var(--space-8);
  margin-top: var(--space-9);
}

.phrases-block h3 {
  font-size: var(--size-lead);
  font-weight: 800;
  line-height: 1.15;
}

.phrases-block .note {
  max-width: 30rem;
  color: var(--text-2);
}

@container page (min-width: 56rem) {
  .phrases-block {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: clamp(2.75rem, 6vw, 6rem);
    align-items: start;
  }

  .phrases-block h3 {
    grid-column: 1 / -1;
  }
}

/* Term and description pairs (the phrase list, "Your choices"): stacked on a narrow
   screen, two columns when there is room, a hairline between pairs. */
.pairs > div {
  padding-block: var(--space-3);
  border-top: 1px solid var(--divider);
}

.pairs > div:last-child {
  border-bottom: 1px solid var(--divider);
}

.pairs dt,
.pairs dd {
  margin: 0;
}

.pairs dd {
  margin-top: var(--space-1);
}

@container page (min-width: 36rem) {
  .pairs > div {
    display: grid;
    grid-template-columns: minmax(0, 19fr) minmax(0, 31fr);
    column-gap: var(--space-5);
    align-items: baseline;
  }

  .pairs dd {
    margin-top: 0;
  }
}

.phrases dt {
  color: var(--text-2);
  font-weight: 500;
}

.phrases dd {
  font-size: var(--size-respell);
  line-height: 1.25;
}

@container page (min-width: 36rem) {
  .phrases > div {
    grid-template-columns: minmax(0, 23fr) minmax(0, 27fr);
  }
}

/* ---------- availability ---------- */

.panel {
  padding: min(clamp(1.5rem, 0.75rem + 3vw, 3.5rem), 7.5vw);
  border: 1px solid var(--divider);
  border-radius: 2rem;
  background: var(--surface);
}

.panel > * + * {
  margin-top: var(--space-5);
}

.panel .road {
  margin-bottom: var(--space-7);
}

.panel .links {
  margin-top: var(--space-7);
  color: var(--text-2);
}

.links > li + li {
  margin-top: var(--space-2);
}

/* ---------- footer ---------- */

.site-footer {
  padding-block: var(--space-8) var(--space-9);
  border-top: 1px solid var(--divider);
  color: var(--text-2);
  font-size: var(--size-small);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-5);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
}

.site-footer p {
  max-width: 44rem;
}

.small-print {
  color: var(--text-3);
  font-size: var(--size-meta);
}

/* ---------- long-form pages (support, privacy) ---------- */

.page-head {
  padding-block: clamp(1.5rem, 0.5rem + 4vw, 4.5rem) var(--space-8);
}

.page-head .road {
  margin-bottom: var(--space-7);
}

.page-head h1 + .lede {
  margin-top: var(--space-6);
}

.page-head .meta {
  max-width: 68ch;
  margin-top: var(--space-4);
  color: var(--text-2);
  font-size: var(--size-small);
  font-weight: 500;
}

.page-head .meta + .lede {
  margin-top: var(--space-5);
}

.prose {
  max-width: 68ch;
  padding-bottom: var(--space-section);
}

.prose > * + * {
  margin-top: var(--space-4);
}

.prose h2 {
  margin-top: var(--space-9);
  padding-top: var(--space-6);
  border-top: 1px solid var(--divider);
  font-size: var(--size-prose-h2);
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: var(--space-7);
}

.prose h2 + h3 {
  margin-top: var(--space-5);
}

.prose h4 {
  margin-top: var(--space-6);
  font-size: 1em;
  font-weight: 700;
}

.prose p,
.prose li,
.prose dd {
  color: var(--text-2);
}

.prose strong,
.prose dt {
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: min(1.25em, 6vw);
}

.prose li + li {
  margin-top: var(--space-2);
}

.prose li::marker {
  color: var(--text-3);
}

.table-scroll {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--size-small);
  text-align: left;
}

.prose th,
.prose td {
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  border-top: 1px solid var(--divider);
  vertical-align: top;
  color: var(--text-2);
}

.prose thead th {
  border-top: 0;
  border-bottom: 2px solid var(--text);
  color: var(--text);
  font-weight: 700;
}

.prose tbody th {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  font-weight: 500;
}

.prose code,
.page-head code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.page-head h1 {
  max-width: 12em;
}

.page-head .lede {
  max-width: 60ch;
}

/* "On this page" */
.toc {
  max-width: 68ch;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--divider);
}

.toc__label {
  margin: 0;
  color: var(--text-2);
  font-size: var(--size-small);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  margin-top: var(--space-1);
  padding: 0;
  list-style: none;
}

.toc li + li {
  margin-top: 0;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

.toc--column ul {
  display: block;
  columns: 2 14rem;
  column-gap: var(--space-7);
}

.toc--column a {
  min-height: 2.25rem;
}

/* FAQ: plain headings and paragraphs, so find-in-page and printing just work. */
.prose h3[id] {
  scroll-margin-top: var(--space-5);
}

.choices dt {
  font-weight: 600;
}

.choices dt a {
  font-weight: inherit;
}

/* ---------- 404 ---------- */

.lost {
  padding-block: clamp(3rem, 1rem + 10vw, 8rem) var(--space-section);
}

.lost .road {
  margin-bottom: var(--space-7);
}

.lost p {
  margin-top: var(--space-6);
  color: var(--text-2);
  font-size: var(--size-lede);
}

.lost .nav {
  margin-top: var(--space-4);
}

.lost .nav a {
  color: var(--accent);
  font-size: var(--size-lede);
  text-decoration-line: underline;
}

/* ---------- more contrast: dividers and rings become real boundaries ---------- */

@media (prefers-contrast: more) {
  :root {
    --divider: #8E7C64;
    --control-stroke: #5A5148;
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --divider: #857A6A;
    --control-stroke: #B8AFA3;
  }
}

/* ---------- motion ---------- */

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

/* ---------- print: black on white, no chrome ---------- */

@media print {
  :root {
    color-scheme: light;
    --bg: #fff;
    --surface: #fff;
    --text: #000;
    --text-2: #000;
    --text-3: #000;
    --accent: #000;
    --accent-fg: #fff;
    --control: #fff;
    --control-stroke: #000;
    --divider: #999;
  }

  body {
    font-size: 11pt;
    line-height: 1.45;
  }

  .skip-link,
  .site-header nav,
  .site-footer nav,
  .site-footer .status-pill,
  .road,
  .screen,
  .pair,
  .actions {
    display: none !important;
  }

  .wrap {
    max-width: none;
    padding-inline: 0;
  }

  .page-head,
  .hero,
  .lost {
    padding-block: 0 1rem;
  }

  h1 {
    font-size: 24pt;
  }

  .prose {
    max-width: none;
    padding-bottom: 1rem;
  }

  .prose h2 {
    margin-top: 1.5rem;
    font-size: 15pt;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  h3 {
    font-size: 12.5pt;
  }

  .lede {
    font-size: 12pt;
  }

  p,
  li,
  tr,
  dd {
    break-inside: avoid;
  }

  a {
    color: #000;
  }

  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-weight: 400;
    overflow-wrap: anywhere;
  }

  .toc {
    display: none;
  }

  .site-footer {
    padding-block: 1rem 0;
  }
}
