/* Public site (homepage, Learn wiki, 404): the Absentz design system (docs/design-system), no JavaScript.
   Colour tokens and fonts are the app's (src/app/styles.css); test/site/css.test.ts keeps them equal. The fonts are
   the app's own files, copied to /site/fonts/ by buildSite: same origin, nothing from a third party (P14). */
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/site/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/site/fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/site/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/site/fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/site/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/site/fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  /* The one page container (S11): header, content and footer all use it, so their edges line up. */
  --page-max: 1440px;
  --page-pad: clamp(1rem, 4vw, 3rem);
  --prose-max: 75ch;
  /* Design tokens, light (docs/design-system/tokens.json), and the app's names for them. */
  --ground: #f6f1e7;
  --surface: #ffffff;
  --ink: #17293a;
  --ink-muted: #51606c;
  --line: #ddd5c6;
  --brand: #17696a;
  --on-brand: #ffffff;
  --brand-tint: #d8e9e5;
  --alert: #a8391b;
  --background: var(--ground);
  --foreground: var(--ink);
  --primary: var(--brand);
  --primary-foreground: var(--on-brand);
  --muted-foreground: var(--ink-muted);
  --border: var(--line);
  --destructive: var(--alert);
  --muted: var(--brand-tint);
  --font-sans: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-heading: "Fraunces Variable", Fraunces, Georgia, serif;
  /* The homepage's phone frame (ruling S15): an ink body, edge to edge. Dark swaps both below. */
  --device: var(--ink);
  --device-edge: var(--ink);
}

/* Dark tokens, from the design system. The names above follow, since they're declared on the same element. Dark applies
   when chosen, or when the device is dark and light wasn't chosen. Neither can reach print (screen / not print). */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #101c27;
    --surface: #1b2b39;
    --ink: #f1ebde;
    --ink-muted: #a5b1bb;
    --line: #2c3e4d;
    --brand: #6cc5bd;
    --on-brand: #0f1f2a;
    --brand-tint: #1f4247;
    --alert: #f39a7e;
    --device: var(--surface);
    --device-edge: var(--ink-muted);
  }
  :root:not([data-theme="light"]) .wordmark .logo-light { display: none; }
  :root:not([data-theme="light"]) .wordmark .logo-dark { display: block; }
}
@media not print {
  :root[data-theme="dark"] {
    --ground: #101c27;
    --surface: #1b2b39;
    --ink: #f1ebde;
    --ink-muted: #a5b1bb;
    --line: #2c3e4d;
    --brand: #6cc5bd;
    --on-brand: #0f1f2a;
    --brand-tint: #1f4247;
    --alert: #f39a7e;
    --device: var(--surface);
    --device-edge: var(--ink-muted);
  }
  :root[data-theme="dark"] .wordmark .logo-light { display: none; }
  :root[data-theme="dark"] .wordmark .logo-dark { display: block; }
}

* { box-sizing: border-box; }

/* body (17px) is the floor for anything a reader has to read. */
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 400 1.0625rem/1.625rem var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-underline-offset: 0.15em; }
/* The one focus ring: 2px solid brand, offset 2px. */
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 999px;
  font-weight: 700;
}
.skip:focus { top: 0.5rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.site-header nav { display: flex; gap: 0.25rem; }
.site-header a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  text-decoration: none;
  font: 700 0.9375rem/1.25rem var(--font-sans);
  border-radius: 999px;
}
.site-header .wordmark { padding-left: 0; }
.site-header .wordmark img { display: block; width: auto; height: 32px; border-radius: 0; }
.site-header .wordmark .logo-dark { display: none; }
.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--ink-muted);
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}
.theme-switch svg { display: none; width: 20px; height: 20px; }
.theme-switch:not([data-choice]) .icon-device,
.theme-switch[data-choice="device"] .icon-device,
.theme-switch[data-choice="light"] .icon-light,
.theme-switch[data-choice="dark"] .icon-dark { display: block; }
.theme-switch[hidden] { display: none; }
.theme-switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.site-header nav a:last-child { background: var(--primary); color: var(--primary-foreground); }
/* Phones: the logo, the theme switch and "Open the app" share one row (owner, 2026-12-01). Learn leaves the header
   below 520px; it stays one tap away in the homepage hero and the Learn pages' "All pages" menu. Below 430px the logo
   drops to 24px and the gaps tighten, so the row fits from 360px. */
@media (max-width: 519.98px) {
  .site-header .wordmark { padding-right: 0; }
  .site-header .nav-learn { display: none; }
}
@media (max-width: 429.98px) {
  .site-header { column-gap: 0.5rem; }
  .site-header .wordmark img { height: 24px; }
  .site-header nav a:last-child { padding-inline: 0.75rem; }
}

.article { padding-block: 1rem; }

/* The shared page container: fluid, capped at --page-max, centred. Every wiki page, printables and 404 included, renders inside .wiki-layout. */
.site-header, .wiki-layout, .site-footer, .home {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* Readable line length: prose stops at 75ch. Tables, code blocks and images use the whole column. */
.article :is(p, ul, ol, h1, h2, h3, h4, blockquote, .draft-label, .safety, .footnotes),
.site-footer > *, .home h2, .home-lead, .home > section > p, .home-note { max-width: var(--prose-max); }

/* Wiki sidebar (from llms.txt): the details menu on phones, the aside from 960px, flowing with the page (no inner scrollbar). Flat, no motion. */
.wiki-layout .article { padding-inline: 0; }
/* A grid item defaults to min-width:auto and grows to its widest child; 0 lets the column shrink to its track.
   Auto side margins would also shrink-wrap it to its content, so the column fills its track instead. */
.wiki-layout > main { min-width: 0; margin: 0; }
/* Long unbroken strings (DOIs, fill-in blanks) wrap instead of widening the page. */
.article { overflow-wrap: break-word; }
/* A code block scrolls inside itself, never the page. */
.article pre { max-width: 100%; overflow-x: auto; padding: 0.75rem 1rem; background: var(--muted); border-radius: 8px; }
.wiki-sidebar { display: none; }
.wiki-menu { margin: 1rem 0 0; border: 1px solid var(--border); border-radius: 8px; background: var(--muted); }
.wiki-menu summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  font: 700 0.9375rem/1.25rem var(--font-sans);
  cursor: pointer;
}
.wiki-menu summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wiki-menu .wiki-nav { padding: 0 1rem 0.5rem; }
.wiki-nav .wiki-group { font: 700 0.9375rem/1.25rem var(--font-sans); margin: 1rem 0 0.25rem; color: var(--muted-foreground); }
.wiki-nav ul { list-style: none; margin: 0; padding: 0; }
.wiki-nav li { margin: 0; }
.wiki-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  font: 400 0.9375rem/1.25rem var(--font-sans);
}
.wiki-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--foreground); font-weight: 700; }
.wiki-nav a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 960px) {
  .wiki-layout { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 0 clamp(2rem, 3vw, 3rem); }
  .wiki-sidebar { display: block; align-self: start; padding-bottom: 1rem; }
  .wiki-menu { display: none; }
}

/* The design system's display family for headings: display for the page's opening line, title below it. */
h1, h2 { font-family: var(--font-heading); font-weight: 600; }
h1 { font-size: 2.25rem; line-height: 2.625rem; margin: 1.5rem 0 0.75rem; }
h2 { font-size: 1.5rem; line-height: 1.875rem; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.0625rem; line-height: 1.625rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
p, ul, ol { margin: 0.75rem 0; }
li { margin: 0.25rem 0; }
img { max-width: 100%; height: auto; border-radius: 8px; }

blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--border);
  background: var(--muted);
  border-radius: 0 8px 8px 0;
}
blockquote p { margin: 0.5rem 0; }

table { border-collapse: collapse; width: 100%; }
/* Narrow screens: a wide table scrolls inside itself. Print keeps the real table at full width. */
@media screen { table { display: block; overflow-x: auto; } }
th, td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }

/* "When to get help": the strongest block on the page, in ink, never the alert colour (a seizure is not an error). */
.safety {
  margin: 1.5rem 0;
  padding: 0.25rem 1rem 0.5rem;
  background: var(--surface);
  border: 2px solid var(--foreground);
  border-radius: 16px;
}
.safety h2 { margin-top: 0.75rem; }

/* Not yet reviewed: a quiet note, not an alarm. */
.draft-label {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--brand-tint);
  border: 1px solid var(--ink-muted);
  border-radius: 8px;
}

.footnotes { font-size: 0.9375rem; line-height: 1.375rem; color: var(--muted-foreground); }
.footnotes ol { padding-left: 1.5rem; }
.footnotes a { overflow-wrap: anywhere; }
.footnote-ref a { text-decoration: none; padding: 0 0.15em; }

.site-footer { margin-top: 2rem; padding-block: 1rem; border-top: 1px solid var(--border); color: var(--muted-foreground); }
.site-footer hr { display: none; }
.site-footer a { display: inline-flex; align-items: center; min-height: 48px; }

/* Landing page (the homepage, from content/learn/_home.yml). Mobile first, tokens only, flat, nothing moves: cards are
   radius-md (16px) surfaces, buttons radius-full pills, tap targets 48px. Cards stack on phones, 3 to a row from 960px.
   Icons (src/site/icons.ts) are decorative and drawn in ink: brand stays the colour of actions. */
.home { padding-bottom: 1rem; }
.home > section { margin-top: 2.5rem; }
.home > section:first-child { margin-top: 0; }
.home h2 { margin: 0 0 1rem; }
.home-icon { display: block; flex: none; width: 1.5rem; height: 1.5rem; }

/* Hero (spec §8.1): the text, then the screenshot with the log screen peeking out from behind it. --shot is the front
   screenshot's width; the peek is a little smaller, lower and to the right, and the front one's ground-coloured
   outline parts the two without a shadow. */
.home-hero { --shot: 11.5rem; display: grid; gap: 1.5rem; padding-top: 1.25rem; }
.home-hero h1 { margin: 0 0 0.75rem; font-size: 2.5rem; line-height: 2.875rem; text-wrap: balance; }
.home-lead { margin: 0 0 1.25rem; }
.home-actions { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; }
.home-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font: 700 0.9375rem/1.25rem var(--font-sans);
  text-align: center;
  text-decoration: none;
}
.home-button-primary { background: var(--primary); color: var(--primary-foreground); }
.home-button-secondary { background: var(--surface); color: var(--foreground); border: 1px solid var(--ink-muted); }

/* Screenshots sit in a phone-shaped frame that is sized before they load (width/height and aspect-ratio match the
   attributes in home.ts); a tall screenshot is cropped from the top. */
.home-shot {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
/* Ruling S15: each hero screenshot is the screen of a plain phone drawn in CSS: a rounded body with an even bezel and
   a camera dot centred at the top of the screen. No brand's device, flat (no shadow, gradient or glare), still. The
   body is --device: ink in light; in dark, where ink is cream, the surface with an ink-muted edge. The screen keeps
   the screenshot's own shape, so its space is reserved before it loads. */
.home-hero-media { --bezel: clamp(0.5rem, calc(var(--shot) * 0.03), 0.75rem); display: grid; justify-self: center; width: calc(var(--shot) * 1.3 + var(--bezel) * 2); }
.device {
  --screen: var(--shot);
  --screen-r: clamp(1.25rem, calc(var(--screen) * 0.1), 2rem);
  grid-area: 1 / 1;
  align-self: start;
  position: relative;
  /* Its own stacking context, so the peek's camera stays behind the front phone. */
  isolation: isolate;
  width: calc(var(--screen) + var(--bezel) * 2);
  padding: calc(var(--bezel) - 1px);
  background: var(--device);
  border: 1px solid var(--device-edge);
  border-radius: calc(var(--screen-r) + var(--bezel));
}
.device-front { justify-self: start; outline: 0.5rem solid var(--ground); }
.device-peek { --screen: calc(var(--shot) * 0.86); justify-self: end; margin-top: calc(var(--shot) * 0.16); }
.device .home-shot { aspect-ratio: 390 / 844; border: 0; border-radius: var(--screen-r); }
/* A punch-hole camera in the screenshot's empty top margin, above the app's own header. */
.device-camera {
  position: absolute;
  z-index: 1;
  top: calc(var(--bezel) + var(--screen) * 0.012);
  left: 50%;
  width: max(6px, calc(var(--screen) * 0.03));
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--device);
  transform: translateX(-50%);
}

/* Trust strip (§8.2): four short facts between two rules, 2 by 2 on phones, one row from 960px. */
.home-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  margin: 1.5rem 0 0;
  padding: 0.75rem 0;
  list-style: none;
  border-block: 1px solid var(--line);
  font: 700 0.9375rem/1.25rem var(--font-sans);
}
.home-trust li { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.home-trust .home-icon { box-sizing: content-box; padding: 0.375rem; border-radius: 999px; background: var(--surface); color: var(--ink); }

.home-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.home-card { --card-pad: 1rem; margin: 0; padding: var(--card-pad); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.home-card h3 { margin: 0 0 0.5rem; }
.home-card p { margin: 0; }
.home-note { margin: 1rem 0 0; color: var(--muted-foreground); }

/* Feature cards (§8.3): the icon in a ground-coloured disc, beside the title on phones and above it from 960px. */
.home-feature { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 0.75rem; }
.home-feature p { grid-column: 1 / -1; margin-top: 0.5rem; }
.home-feature h3 { margin: 0; }
.home-icon-badge { display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; background: var(--ground); color: var(--ink); }

/* How it works (§8.4): one row per step. Phones stack the text over its screenshot; from 960px the two sit side by
   side and every other row puts the screenshot first. The screenshot rises from the foot of a surface panel, in the
   top of a phone (ruling S16). --step-shot is the screenshot's width. */
.home-steps { display: grid; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.home-step { display: grid; gap: 1rem; margin: 0; }
.home-step-text h3 { margin: 0 0 0.5rem; }
.home-step-text p { margin: 0; }
.home-step-n { font: 600 1.5rem/1.875rem var(--font-heading); color: var(--muted-foreground); margin-right: 0.25rem; }
.home-step-media {
  --step-shot: 12rem;
  --bezel: clamp(0.5rem, calc(var(--step-shot) * 0.03), 0.75rem);
  display: flex;
  justify-content: center;
  padding: 1rem 1rem 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
/* Ruling S16: the hero's phone, cut off flat by the panel's foot (no bottom bezel or radius), as if it continues
   below. Same colours, bezel and camera as the hero's; the screenshot keeps its crop. */
.device--partial {
  --screen: var(--step-shot);
  max-width: 100%;
  padding-bottom: 0;
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.device--partial .home-shot { aspect-ratio: 390 / 480; border-radius: var(--screen-r) var(--screen-r) 0 0; }

/* Learn (§8.5, ruling S13): the same groups in two layouts, one shown per width, like the wiki's sidebar and its phone
   menu. Phones get a tap-to-open list (.learn-accordion); from 600px, cards with 3 pages each and the rest behind a
   no-script "All N pages". Nothing in the section scrolls sideways.
   The card's "All N pages" sits at its top right, like a "see all" beside a heading, so a closed card is no taller
   than its 3 links; opened, the rest of the pages follow the first 3. */
.home-learn { display: none; }
.learn-card { position: relative; }
.learn-card h3 { margin-bottom: 0.25rem; }
.learn-card:has(.learn-more) h3 { padding-right: 8rem; }
.learn-card ul { list-style: none; margin: 0; padding: 0; }
.learn-card li { margin: 0; }
.learn-more summary, .learn-card a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  margin: 0 -0.75rem;
  border-radius: 8px;
  text-decoration: none;
}
/* Centred on the title's line (26px tall), its words ending at the card's padding. */
.learn-more summary { position: absolute; top: calc(var(--card-pad) - 11px); right: calc(var(--card-pad) - 0.75rem); margin: 0; gap: 0.5rem; list-style: none; font-weight: 700; color: var(--ink); cursor: pointer; }
.learn-more summary::-webkit-details-marker, .learn-accordion summary::-webkit-details-marker { display: none; }
/* A chevron drawn with two borders: down when closed, up when open. It turns at once; nothing animates. */
.learn-more summary::after, .learn-accordion summary::after { content: ""; flex: none; width: 0.45rem; height: 0.45rem; margin-top: -0.25rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.learn-more[open] summary::after, .learn-accordion details[open] > summary::after { margin-top: 0.25rem; transform: rotate(-135deg); }
.learn-more summary:focus-visible, .learn-accordion summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* The phones' list: one surface card, a row per group with its title and page count, closed until tapped; open, it
   lists every page in the group. */
.learn-accordion { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.learn-accordion details + details { border-top: 1px solid var(--line); }
.learn-accordion summary { display: flex; align-items: center; gap: 0.75rem; min-height: 56px; padding: 0.5rem 1rem; list-style: none; cursor: pointer; border-radius: 16px; }
.learn-acc-title { flex: 1; font-weight: 700; }
.learn-acc-count { font: 400 0.9375rem/1.25rem var(--font-sans); color: var(--muted-foreground); }
.learn-accordion ul { list-style: none; margin: 0; padding: 0 0 0.5rem; }
.learn-accordion li { margin: 0; }
.learn-accordion a { display: flex; align-items: center; min-height: 48px; padding: 0.5rem 1rem; text-decoration: none; }

.home-qa { display: flex; flex-direction: column; }
.home-more { display: inline-flex; align-items: center; align-self: flex-start; min-height: 48px; margin-top: auto; padding-top: 0.5rem; font-weight: 700; }

/* Closing band (§8.6): home.md's "Ready when you are", centred on a surface card, before the review note. */
.home-ready { display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.home .home-ready h2 { margin: 0 0 0.5rem; font-size: 2rem; line-height: 2.5rem; }
.home .home-ready > p { margin: 0 0 1.5rem; }
.home .home-ready > .home-actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; margin: 0; }
.home-arrow { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0 1rem; font-weight: 700; }
.home-arrow .home-icon { width: 1.25rem; height: 1.25rem; }
.home .draft-label { margin: 2rem 0 0; }

@media (min-width: 600px) {
  .home > section { margin-top: 3rem; }
  .home-actions { flex-direction: row; flex-wrap: wrap; }
  .home-learn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learn-accordion { display: none; }
  .home-step-media { --step-shot: 14rem; }
  .device--partial .home-shot { aspect-ratio: 390 / 560; }
}
@media (min-width: 960px) {
  /* The text takes what the screenshot leaves, so the two sit side by side with only the column gap between them. */
  .home-hero { --shot: clamp(15rem, 25vw, 23rem); grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(2rem, 4vw, 4rem); padding-top: 1.5rem; }
  .home-hero h1 { font-size: clamp(2.75rem, 0.5rem + 4.4vw, 4.75rem); line-height: 1.08; margin-bottom: 1.25rem; }
  .home-lead { font-size: 1.25rem; line-height: 1.875rem; margin-bottom: 2rem; }
  .home-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 3rem; padding: 1.25rem 0; }
  .home-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-card { --card-pad: 1.5rem; }
  .home-feature { display: block; }
  .home-feature .home-icon-badge { margin-bottom: 1rem; }
  .home-steps { gap: 3rem; }
  .home-step { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
  .home-step-flip .home-step-media { order: -1; }
  .home-step-text { max-width: 32rem; }
  .home-step-text h3 { font: 600 1.75rem/2.25rem var(--font-heading); margin-bottom: 0.75rem; }
  .home-step-n { display: block; font-size: 2.5rem; line-height: 3rem; margin-bottom: 0.25rem; }
  .home-step-media { --step-shot: 20rem; padding: 2.5rem 2.5rem 0; }
  .home-ready { padding: 3rem 2rem; }
  .home .home-ready h2 { font-size: 2.5rem; line-height: 3rem; }
}

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

@media print {
  /* Paper always uses the light theme's tokens, even when printed from a dark-mode phone (P18; replaces P6's
     black on white), and its ink is the ink token, never pure black. */
  :root {
    --ground: #f6f1e7;
    --surface: #ffffff;
    --ink: #17293a;
    --ink-muted: #51606c;
    --line: #ddd5c6;
    --brand: #17696a;
    --on-brand: #ffffff;
    --brand-tint: #d8e9e5;
    --alert: #a8391b;
    --background: var(--surface);
    --primary: var(--ink);
    --muted-foreground: var(--ink);
    --border: var(--ink-muted);
  }
  .site-header nav { display: none; }
  .wiki-sidebar, .wiki-menu { display: none; }
  .wiki-layout { display: block; }
  .site-header, .wiki-layout, .site-footer, .home { padding-inline: 1rem; }
  .theme-switch, .logo-dark { display: none; }
  .logo-light { display: block; }
  .skip { display: none; }
  body { background: var(--surface); color: var(--ink); font-size: 10pt; line-height: 1.35; }
  a { color: var(--ink); }
  .site-footer { color: var(--ink); border-top: 1px solid var(--ink-muted); }
  .site-footer a { min-height: 0; }
  .footnotes { color: var(--ink); }
  .safety, .draft-label { border-color: var(--ink); break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  /* P8: printables print compactly: one A4 page where the content allows, never more than two. */
  .footnote-backref { display: none; }
  .safety, table, tr { break-inside: avoid; }
  .footnotes { font-size: 8pt; line-height: 1.25; column-count: 2; column-gap: 8mm; }
  .footnotes ol { margin: 0; padding-left: 1.25rem; }
  .footnotes li { break-inside: avoid; }
  .footnotes p { margin: 0; }
  h1 { font-size: 20pt; margin: 0 0 0.4rem; }
  h2 { font-size: 13pt; margin: 0.8rem 0 0.3rem; }
  p, ul, ol { margin-top: 0.3rem; margin-bottom: 0.3rem; }
  th, td { padding: 0.25rem 0.5rem; }
  .safety { margin: 0.6rem 0; padding: 0.1rem 0.75rem 0.3rem; }
  .safety h2 { margin-top: 0.4rem; }
  .draft-label { margin: 0.5rem 0; padding: 0.4rem 0.75rem; font-size: 9pt; }
  .draft-label p { margin: 0; }
  blockquote { margin: 0.5rem 0; padding: 0.25rem 0.75rem; }
  .site-header { padding-block: 0; min-height: 0; }
  .site-footer { margin-top: 0.75rem; font-size: 8pt; line-height: 1.3; }
  .site-footer p { margin: 0.2rem 0; }
}

@page { size: A4; margin: 10mm }
