/* Hallmark · genre: modern-minimal · macrostructure: Long Document (prose pages) + Task Form (form pages) + Workbench (landing) · theme: custom teal-195 dark-first (anchor hue 195, dark default + light) · nav: N9 edge-aligned minimal · footer: Ft2 inline single line · pre-emit critique: P4 H4 E4 S4 R4 V4 · contrast: pass (46–50) · tokens: locked */
/* phase 3: no new token · components added: Untrusted, CopyField, JumpLinks, Tag status variants · pre-emit critique: P4 H4 E4 S4 R5 V4 */
/* phase 4: no new token · no new class · components extended: Untrusted (self label), nav (conditional pending item) · pre-emit critique: P4 H4 E4 S4 R5 V4 */
/* phase 04.1: no new token · no new class · one attribute rule [hidden] · one page script (/notifications only) · pre-emit critique: P4 H4 E4 S4 R5 V4 */
/* phase 5: no new token · no new class · icons added: undo-2, ban · pre-emit critique: P4 H4 E4 S4 R5 V4 */
/* phase 6: no new token · no new colour · component added: ChoiceField (radio, checkbox) · Field variant: invite-code (Geist sans, tabular-nums; mono slots unchanged) · pre-emit critique: P4 H4 E4 S4 R5 V4 */
/* phase 7: tokens revised (D96) · theme by data-theme (D95) · classes added: see 07-UI-SPEC · landing page */

/* Tokens. Colour literals and font stacks live here and in the @font-face rules only.
   The base block is the dark theme (the default for everyone) and holds every non-colour token.
   The light theme is one data-theme value away (clair); « Comme l'appareil » (systeme) follows
   the device through prefers-color-scheme: light. The light values of the two blocks are the same. */
:root {
  color-scheme: dark;

  --color-paper: oklch(14% 0.006 195);
  --color-surface: oklch(17.5% 0.008 195);
  --color-raised: oklch(21% 0.009 195);
  --color-sunken: oklch(11% 0.005 195);
  --color-ink: oklch(96% 0.004 195);
  --color-muted: oklch(74% 0.010 195);
  --color-faint: oklch(64% 0.010 195);
  --color-rule: oklch(27% 0.008 195);
  --color-border: oklch(56% 0.012 195);
  --color-accent: oklch(78% 0.100 195);
  --color-accent-hover: oklch(84% 0.090 195);
  --color-accent-ink: oklch(16% 0.020 195);
  --color-danger: oklch(72% 0.150 27);
  --color-danger-hover: oklch(77% 0.130 27);
  --color-danger-ink: oklch(16% 0.020 27);
  --color-danger-surface: oklch(23% 0.050 27);
  --color-ok: oklch(78% 0.120 155);
  --color-warn: oklch(80% 0.110 80);
  --color-warn-surface: oklch(23% 0.040 85);
  --color-highlight: oklch(98% 0.004 195 / 0.06);
  --color-shadow: oklch(4% 0.004 195 / 0.7);

  --font-sans:
    "Geist", "Geist Fallback", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-mono:
    "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-display: clamp(2.5rem, 4vw + 1.25rem, 4.5rem);
  --lh-body: 1.5;
  --lh-label: 1.4;
  --lh-heading: 1.25;
  --lh-display: 1.15;
  --lh-hero: 1.05;
  --weight-regular: 400;
  --weight-bold: 700;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --w-page: 40rem;
  --w-form: 28rem;
  --w-site: 72rem;
  --measure: 65ch;
  --measure-lead: 46ch;
  --control-h: 3rem;
  --icon-size: 1.25rem;
  --logo-size: 1.5rem;
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.75rem;
  --radius-pill: 999px;
  --ring-w: 2px;
  --ring-offset: 2px;

  --shadow-edge: inset 0 1px 0 0 var(--color-highlight);
  --shadow-raised:
    inset 0 1px 0 0 var(--color-highlight), 0 24px 48px -24px var(--color-shadow);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 200ms;
  --dur-arrive: 400ms;
}

:root[data-theme="clair"] {
  color-scheme: light;

  --color-paper: oklch(97.5% 0.005 195);
  --color-surface: oklch(99.5% 0.002 195);
  --color-raised: oklch(99.5% 0.002 195);
  --color-sunken: oklch(94% 0.008 195);
  --color-ink: oklch(20% 0.012 195);
  --color-muted: oklch(44% 0.012 195);
  --color-faint: oklch(50% 0.012 195);
  --color-rule: oklch(89% 0.007 195);
  --color-border: oklch(58% 0.012 195);
  --color-accent: oklch(45% 0.077 195);
  --color-accent-hover: oklch(40% 0.069 195);
  --color-accent-ink: oklch(98% 0.010 195);
  --color-danger: oklch(47% 0.170 27);
  --color-danger-hover: oklch(42% 0.160 27);
  --color-danger-ink: oklch(98% 0.009 27);
  --color-danger-surface: oklch(95% 0.025 27);
  --color-ok: oklch(43% 0.100 155);
  --color-warn: oklch(44% 0.096 70);
  --color-warn-surface: oklch(95% 0.040 85);
  --color-highlight: oklch(99.5% 0.002 195 / 0);
  --color-shadow: oklch(30% 0.020 195 / 0.12);
}

:root[data-theme="systeme"] {
  color-scheme: light dark;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="systeme"] {
    color-scheme: light;

    --color-paper: oklch(97.5% 0.005 195);
    --color-surface: oklch(99.5% 0.002 195);
    --color-raised: oklch(99.5% 0.002 195);
    --color-sunken: oklch(94% 0.008 195);
    --color-ink: oklch(20% 0.012 195);
    --color-muted: oklch(44% 0.012 195);
    --color-faint: oklch(50% 0.012 195);
    --color-rule: oklch(89% 0.007 195);
    --color-border: oklch(58% 0.012 195);
    --color-accent: oklch(45% 0.077 195);
    --color-accent-hover: oklch(40% 0.069 195);
    --color-accent-ink: oklch(98% 0.010 195);
    --color-danger: oklch(47% 0.170 27);
    --color-danger-hover: oklch(42% 0.160 27);
    --color-danger-ink: oklch(98% 0.009 27);
    --color-danger-surface: oklch(95% 0.025 27);
    --color-ok: oklch(43% 0.100 155);
    --color-warn: oklch(44% 0.096 70);
    --color-warn-surface: oklch(95% 0.040 85);
    --color-highlight: oklch(99.5% 0.002 195 / 0);
    --color-shadow: oklch(30% 0.020 195 / 0.12);
  }
}

/* Self-hosted Geist 1.9.2 (SIL OFL 1.1, see /assets/fonts/OFL.txt). U+202F is absent from the
   font: never use it, use U+00A0. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-sans-1.9.2.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-regular-1.9.2.woff2") format("woff2");
}

/* Metric-matched fallback so the font swap causes no layout shift. */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial");
  size-adjust: 105.54%;
  ascent-override: 95.22%;
  descent-override: 27.95%;
  line-gap-override: 0%;
}

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

/* The hidden attribute wins over .btn and .alert, which set their own display (UI-SPEC D92). */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
}

h1,
h2,
h3 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-xl);
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: var(--text-lg);
  line-height: var(--lh-heading);
  text-wrap: balance;
}

h3 {
  font-size: var(--text-base);
  line-height: var(--lh-heading);
  letter-spacing: 0;
}

p {
  margin: 0;
  min-width: 0;
  max-width: var(--measure);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: var(--ring-w) solid var(--color-accent);
  outline-offset: var(--ring-offset);
}

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

.tabular {
  font-variant-numeric: tabular-nums;
}

.icon {
  flex: none;
  width: var(--icon-size);
  height: var(--icon-size);
}

/* Skip link: first focusable element, visible on focus only */
.skip-link {
  position: absolute;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  padding-inline: var(--space-4);
  background: var(--color-raised);
  color: var(--color-ink);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-edge);
  font-weight: var(--weight-bold);
  text-decoration: none;
}

.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  box-shadow: none;
}

/* Shell */
.wrap {
  width: 100%;
  max-width: calc(var(--w-page) + 2 * var(--space-8));
  margin-inline: auto;
  padding-inline-start: max(var(--space-4), env(safe-area-inset-left));
  padding-inline-end: max(var(--space-4), env(safe-area-inset-right));
}

/* A quiet header: small padding, a hairline, never sticky (D111) */
.site-header {
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-rule);
}

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

/* The mark and the name side by side: 16 px, 700 on every surface (D97), the mark from tokens (D98) */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  color: var(--color-ink);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
  line-height: var(--lh-heading);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wordmark span {
  min-width: 0;
}

.brand-mark {
  flex: none;
  width: var(--logo-size);
  height: var(--logo-size);
}

.brand-tile {
  fill: var(--color-accent);
}

.brand-ink {
  fill: var(--color-accent-ink);
}

.brand-stroke {
  fill: none;
  stroke: var(--color-accent-ink);
  stroke-width: 3;
  stroke-linecap: round;
}

/* Under 40 rem the items wrap under the logo onto as many 48 px rows as they need, so every item
   and the held-sends counter stay visible (review pass 2, fix 2; the hairline is hidden there).
   From 40 rem: one row that never wraps (review fix 3), beside the logo when it fits, scrolling
   sideways when even that row is too narrow, so the hairline never starts a row. */
.nav {
  flex: 0 1 auto;
  min-width: 0;
  /* The 8 px item padding hangs outside the column, so the first and last labels line up with
     the logo and the content edge. */
  margin-inline: calc(var(--space-2) * -1);
  overflow-x: visible;
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-2);
  row-gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li {
  display: flex;
  flex: none;
  align-items: center;
  column-gap: var(--space-2);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: var(--control-h);
  padding-inline: var(--space-2);
  border-bottom: 2px solid transparent;
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
}

/* From 40 rem the nav scrolls, so it clips: the ring is drawn inside each item. */
.nav a:focus-visible,
.nav .btn--link:focus-visible {
  outline-offset: calc(var(--ring-w) * -1);
}

.nav a[aria-current="page"] {
  border-bottom-color: var(--color-accent);
  color: var(--color-ink);
  font-weight: var(--weight-bold);
}

/* The one pill of the nav (D111): a 48 px target, a 40 px pill drawn behind the text */
.nav .nav-cta {
  position: relative;
  isolation: isolate;
  min-height: var(--control-h);
  padding-inline: var(--space-4);
  border-bottom: 0;
  border-radius: var(--radius-pill);
  color: var(--color-ink);
  font-weight: var(--weight-bold);
}

.nav .nav-cta::before {
  content: "";
  position: absolute;
  inset: var(--space-1) 0;
  z-index: -1;
  background: var(--color-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.nav .nav-cta:focus-visible {
  outline-offset: calc(var(--space-1) * -1);
}

/* The hairline before « Se déconnecter », from 40 rem */
.nav-sep {
  display: none;
}

main {
  padding-block: var(--space-12) var(--space-16);
}

main:focus {
  outline: none;
}

.site-footer {
  border-top: 1px solid var(--color-rule);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.site-footer .wrap {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-6) var(--space-8);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-6);
  min-width: 0;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
}

/* Theme form of the footer (D95, D114): a label above a pill group, three submit buttons, no script.
   Each option is a 48 px hit box with a 40 px visual pill drawn behind its text. */
.theme-switch {
  display: grid;
  justify-items: start;
  min-width: 0;
  margin-block-start: var(--space-3);
}

.theme-switch-label {
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.theme-switch > div {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  max-width: 100%;
  padding: var(--space-1);
  background: var(--color-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.theme-option {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: var(--control-h);
  padding: 0 var(--space-3);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  line-height: var(--lh-label);
  cursor: pointer;
  outline: var(--ring-w) solid transparent;
  outline-offset: calc(var(--ring-w) * -1);
  transition: transform var(--dur-micro) var(--ease-out);
}

.theme-option::before {
  content: "";
  position: absolute;
  inset: var(--space-1);
  z-index: -1;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
}

.theme-option[aria-pressed="true"] {
  color: var(--color-ink);
  font-weight: var(--weight-bold);
}

.theme-option[aria-pressed="true"]::before {
  background: var(--color-surface);
  border-color: var(--color-border);
}

.theme-option:focus-visible {
  outline-color: var(--color-accent);
}

.theme-option:active {
  transform: scale(0.97);
}

/* Long document: continuous prose, sections spaced by --space-8 */
.prose {
  display: grid;
  gap: var(--space-8);
  min-width: 0;
}

.prose > header,
.prose > section {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.prose > header {
  gap: var(--space-6);
}

/* Card: a surface with a hairline and a lit top edge (D99: 12 px), never nested in another card.
   The hairline is --color-rule: the control border token is for controls and the Untrusted box (D100). */
.card {
  min-width: 0;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-edge);
}

.card > * + * {
  margin-block-start: var(--space-3);
}

.card blockquote {
  margin: 0;
  max-width: var(--measure);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  line-height: var(--lh-label);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

/* Buttons: a 48px pill (D99), one border width in every state, ring as outline (it follows the pill) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--control-h);
  padding-inline: var(--space-6);
  /* A label that wraps keeps air above and below inside the pill (review pass 3). */
  padding-block: var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-weight: var(--weight-bold);
  line-height: var(--lh-label);
  text-align: center;
  text-decoration: none;
  /* A long label wraps inside the button instead of widening the page (reflow at 320 px, plan 04.1-07). */
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  cursor: pointer;
  outline: var(--ring-w) solid transparent;
  outline-offset: var(--ring-offset);
  transition: transform var(--dur-micro) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible,
.input:focus-visible {
  outline-color: var(--color-accent);
}

.btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn--secondary {
  background: var(--color-raised);
  border-color: var(--color-border);
  color: var(--color-ink);
}

.btn--danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--color-danger-ink);
}

.btn--danger-outline {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* A link-style button starts on the left like every other line of its column (review 2026-12-02). */
.btn--link {
  justify-self: start;
  justify-content: flex-start;
  width: auto;
  padding-inline: 0;
  text-align: start;
  color: var(--color-accent);
  font-weight: var(--weight-regular);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"],
.input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Defined for a later progressive enhancement; phase 2 never emits it. */
.btn[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
  pointer-events: none;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Fields: label above, 16px input (no iOS zoom), helper slot that never moves the page */
.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.field label {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--lh-label);
}

.input {
  width: 100%;
  min-width: 0;
  min-height: var(--control-h);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  outline: var(--ring-w) solid transparent;
  outline-offset: var(--ring-offset);
}

.input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.input--code {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  line-height: var(--lh-display);
  letter-spacing: 0.35em;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.input--code:focus {
  border-color: var(--color-accent);
}

/* The backup code of an invitation: regular Geist at the Heading size, never the mono slot */
.input--invite-code {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  line-height: var(--lh-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.input--invite-code:focus {
  border-color: var(--color-accent);
}

.field-message {
  display: flex;
  gap: var(--space-1);
  align-items: flex-start;
  min-height: 1lh;
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.field-message--error {
  color: var(--color-danger);
}

.field-message .icon {
  margin-block-start: 0.1em;
}

/* ChoiceField: a radio group (fieldset) or one checkbox row. The native control sits on the first
   text line through first-baseline alignment: no margin on it, no offset, no computed value. */
.choices {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choices legend {
  margin-block-end: var(--space-2);
  padding: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--lh-label);
}

.choice {
  display: flex;
  align-items: first baseline;
  gap: var(--space-2);
  min-width: 0;
  min-height: var(--control-h);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
  outline: var(--ring-w) solid transparent;
  outline-offset: var(--ring-offset);
}

.choice:has(input:focus-visible) {
  outline-color: var(--color-accent);
}

.choice:has(input[aria-invalid="true"]) {
  border-color: var(--color-danger);
}

.choice input {
  flex: none;
  width: var(--icon-size);
  height: var(--icon-size);
  accent-color: var(--color-ink);
}

.choice-text {
  min-width: 0;
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.choice-text span {
  display: block;
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

/* Alerts: a 12 px surface, a 1px hairline, icon and lead word; never a coloured side stripe. The
   control border token is not for alerts (D100): info and success sit on the surface, warn and error
   keep their semantic fills and borders. */
.alert {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-ink);
}

.alert > .icon {
  margin-block-start: 0.125rem;
}

.alert-body {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.alert-lead {
  font-weight: var(--weight-bold);
}

.alert-text p {
  max-width: none;
}

.alert--info {
  background: var(--color-surface);
}

.alert--success {
  border-color: var(--color-ok);
}

.alert--success > .icon {
  color: var(--color-ok);
}

.alert--warn {
  border-color: var(--color-warn);
  background: var(--color-warn-surface);
}

.alert--warn > .icon {
  color: var(--color-warn);
}

.alert--error {
  border-color: var(--color-danger);
  background: var(--color-danger-surface);
}

.alert--error > .icon {
  color: var(--color-danger);
}

/* Facts: who, where it goes */
.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  margin: 0;
}

/* The reset above would cancel the 12 px of « .card > * + * » (same specificity, later in the file). */
.card > * + .facts {
  margin-block-start: var(--space-3);
}

.facts > div {
  min-width: 0;
}

.facts dt {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.facts dd {
  margin: 0;
  min-width: 0;
  font-weight: var(--weight-bold);
  overflow-wrap: anywhere;
}

/* Figures: counters in Display size with tabular digits (probe status page) */
.facts--figures dd {
  font-size: var(--text-xl);
  line-height: var(--lh-display);
  font-variant-numeric: tabular-nums;
}

/* Figure: the compact send counter of /messages, 20px so it informs without out-weighing the list */
.facts--figure dd {
  font-size: var(--text-lg);
  line-height: var(--lh-heading);
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border: 1px solid transparent;
  background: var(--color-raised);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--lh-label);
  overflow-wrap: anywhere;
}

/* Text written by another person: a flat sunken box with a 1px border token, so the boundary
   survives forced colours and grayscale. Body size, weight 400, ink colour (UI-SPEC D13, D17). */
.untrusted {
  min-width: 0;
  overflow: hidden;
  background: var(--color-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

/* The inline badge does not clip (an inline-block whose overflow is not visible takes its bottom
   margin edge as its baseline and floats above the text): only the block frame clips. */
.untrusted--inline {
  display: inline-block;
  overflow: visible;
  vertical-align: baseline;
  max-width: 100%;
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

/* Message reading box (plan 03-08): the text of a message written by another person. Our fixed
   words are 14px bold; the sender's name and every part are body size, weight 400, ink. */
/* The strip sits on --color-raised above a hairline, so the box is two-toned (D100). It spans the
   whole inner width (no 65ch paragraph cap) and draws no corner of its own: the frame clips it. */
/* The icon hangs: every line of the text starts after the icon and its gap (review pass 2), so a
   wrapped second line never runs under the icon. */
.untrusted-label {
  max-width: none;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  padding-inline-start: calc(var(--space-4) + var(--icon-size) + var(--space-2));
  text-indent: calc((var(--icon-size) + var(--space-2)) * -1);
  background: var(--color-raised);
  border-bottom: 1px solid var(--color-rule);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--lh-label);
  overflow-wrap: anywhere;
}

.untrusted-label .icon {
  display: inline-block;
  margin-inline-end: var(--space-2);
  vertical-align: -0.25em;
}

.untrusted-who {
  min-width: 0;
  color: var(--color-ink);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  overflow-wrap: anywhere;
}

.untrusted-parts {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-4);
}

.untrusted-part {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.untrusted-heading {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--lh-label);
}

.untrusted-text {
  min-width: 0;
  max-width: var(--measure);
  margin: 0;
  color: var(--color-ink);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* An invisible character made visible: our own text, so bold is allowed here */
.marker {
  padding: 0 var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--lh-label);
  white-space: nowrap;
}

/* The text to copy: Geist like every control, never mono. Read-only, focusable, scrolls inside */
.copyfield {
  display: block;
  width: 100%;
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  resize: vertical;
  outline: var(--ring-w) solid transparent;
  outline-offset: var(--ring-offset);
}

.copyfield:focus-visible {
  outline-color: var(--color-accent);
}

/* In-page anchors of the reading page: 48px targets, wrapping */
.jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-3);
  min-width: 0;
}

.jump p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.jump a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.jump a:focus-visible {
  outline: var(--ring-w) solid var(--color-accent);
  outline-offset: var(--ring-offset);
}

/* Fingerprints agree: icon, sentence and colour */
.match {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  color: var(--color-ok);
  font-weight: var(--weight-bold);
}

/* Phase 3 pages (contacts, invitation link): one column of sections, 32px apart */
.flow-page {
  display: grid;
  gap: var(--space-8);
  max-width: var(--w-page);
  min-width: 0;
}

.flow-page--narrow {
  max-width: var(--w-form);
}

.flow-section {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

/* Two equal buttons: stacked on mobile, side by side from 40rem */
.actions--pair > form {
  min-width: 0;
}

/* Status tags: text and icon take the colour, the border stays a token */
.tag--attention {
  border-color: var(--color-border);
  color: var(--color-warn);
}

.tag--ok {
  border-color: var(--color-border);
  color: var(--color-ok);
}

.tag--neutral {
  border-color: var(--color-border);
  color: var(--color-muted);
}

/* Connected Claudes: rows, not a table. The action sits below the text, to its right from 40rem */
.devices {
  display: grid;
  gap: var(--space-6);
  min-width: 0;
}

.devices-head {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.account-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  min-width: 0;
}

.account-line form {
  margin: 0;
}

.rows {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}

.row > .row-action {
  margin-block-start: 0;
}

.row-main {
  display: grid;
  justify-items: start;
  gap: var(--space-2);
  min-width: 0;
}

.row-title {
  font-size: var(--text-base);
  line-height: var(--lh-heading);
  overflow-wrap: anywhere;
}

.row-meta {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.row-action {
  min-width: 0;
}

/* A date of a list row never splits; the words before it and « · N caractères » after it wrap
   around it (review pass 2). */
.row-meta time {
  white-space: nowrap;
}

/* In a list row the declared-name badge takes its own line under its label, at every width, so
   the label never breaks before « vérifié ». */
.row-meta .untrusted--inline {
  display: block;
  width: fit-content;
  margin-block-start: var(--space-1);
}

.empty {
  display: grid;
  gap: var(--space-4);
  max-width: var(--w-form);
  min-width: 0;
}

/* Isometric line figures (07-06): the empty-tray glyph of the empty states and the landing pillars.
   Faces are painted with the page colour so that nearer shapes hide farther ones; the hop arc of
   FigFiable carries fill none in its markup and wins over the inherited face fill. */
.fig {
  display: block;
  width: 100%;
  max-width: 15rem;
  height: auto;
  fill: var(--color-paper);
  stroke-width: 1.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.fig path {
  vector-effect: non-scaling-stroke;
}

.fig-line {
  stroke: var(--color-muted);
}

.fig-faint {
  fill: none;
  stroke: var(--color-faint);
  stroke-dasharray: 2 3;
}

.fig-accent {
  stroke: var(--color-accent);
}

.empty-figure {
  display: block;
  width: 6rem;
  height: 4rem;
  max-width: none;
  margin-bottom: var(--space-4);
}

/* The ghost sheet of the empty tray sits on the tray top: an unfilled tray lets its dashed outline
   show instead of being painted over by the tray faces. */
.empty-figure .fig-line {
  fill: none;
}

/* Status pages: headline, one or two sentences, one action */
.status {
  display: grid;
  gap: var(--space-6);
  max-width: var(--w-form);
  min-width: 0;
}

/* Form pages (sign-in, name): one narrow column, left edge shared with the wordmark */
.form-page {
  display: grid;
  gap: var(--space-6);
  max-width: var(--w-form);
  min-width: 0;
}

.form-page form {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  margin: 0;
}

/* « ou » between the e-mail form and the Google link: a rule on each side of the word */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--color-border);
}

.caption {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

/* Consent page: the account is the heaviest block under the title */
.consent {
  max-width: var(--w-page);
}

.consent form {
  display: grid;
  gap: var(--space-6);
  min-width: 0;
  margin: 0;
}

.account-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--lh-heading);
  overflow-wrap: anywhere;
}

/* The two halves of an address (EmailAddress): each wraps inside only when wider than the line. */
.addr-part {
  display: inline-block;
  max-width: 100%;
  hyphens: none;
}

.account-email {
  min-width: 0;
  overflow-wrap: anywhere;
}

.consent .card form {
  display: block;
}

.scope-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-inline-start: var(--space-6);
}

.scope-list li {
  overflow-wrap: anywhere;
}

.consequences {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.verify {
  font-weight: var(--weight-bold);
}

/* Install guide: ordered steps, the number is text in the DOM */
.install {
  display: grid;
  gap: var(--space-6);
  min-width: 0;
}

.install-head {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.steps {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: var(--space-4);
  min-width: 0;
}

.step-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.step--done .step-marker {
  color: var(--color-ok);
  border-color: var(--color-ok);
}

.step-main {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  padding-block-start: 0.25rem;
}

.step-main .actions {
  align-items: flex-start;
}

/* Selectable text blocks: wrap, never scroll sideways */
.cmd-block {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.cmd-label {
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--lh-label);
}

.cmd {
  display: block;
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-sunken);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--lh-body);
  -webkit-user-select: all;
  user-select: all;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cmd-hint {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

/* Screenshot slot: only rendered when the file exists */
.shot {
  margin: 0;
  min-width: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--color-sunken);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
}

.shot figcaption {
  margin-block-start: var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

/* Native disclosure, bordered like a card */
.details {
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-edge);
}

.details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--control-h);
  padding-block: var(--space-3);
  padding-inline: var(--space-4);
  font-weight: var(--weight-bold);
  cursor: pointer;
  list-style: none;
}

.details summary::-webkit-details-marker {
  display: none;
}

.details summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.details summary .icon {
  transition: transform var(--dur-micro) var(--ease-out);
}

.details[open] summary .icon {
  transform: rotate(180deg);
}

.details-body {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-4);
  padding-block-start: var(--space-1);
}

/* Sign-out is a real button in a POST form, drawn like the other navigation items */
.nav form {
  display: inline-flex;
  margin: 0;
}

.nav .btn--link {
  min-width: 0;
  padding-inline: var(--space-2);
  /* Same box as the links (2 px bottom border, none on top), so the labels share one baseline. */
  border-width: 0 0 2px;
  color: var(--color-muted);
  text-decoration: none;
}

@media (min-width: 40rem) {
  .wrap {
    padding-inline-start: max(var(--space-8), env(safe-area-inset-left));
    padding-inline-end: max(var(--space-8), env(safe-area-inset-right));
  }

  .nav {
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .nav ul {
    flex-wrap: nowrap;
  }

  .nav-sep {
    display: block;
    flex: none;
    width: 1px;
    height: var(--space-6);
    background: var(--color-rule);
  }

  .card {
    padding: var(--space-6);
  }

  .untrusted-parts {
    padding: var(--space-6);
  }

  .untrusted-label {
    padding-inline: var(--space-6);
    padding-inline-start: calc(var(--space-6) + var(--icon-size) + var(--space-2));
  }

  .btn {
    width: auto;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .actions--pair > * {
    flex: 1 1 0;
    min-width: 0;
  }

  .actions--pair .btn {
    width: 100%;
    padding-inline: var(--space-4);
  }

  .facts > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: var(--space-4);
  }

  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--space-6);
  }
}

/* Landing (plan 07-07, UI-SPEC « Landing shell »): the quiet header, the hero, the sections' rhythm.
   Tokens only; no sticky or fixed element; the one accent fill of the page is the hero button (D106). */
.site-header--landing .wrap {
  flex-wrap: nowrap;
}

/* The nav sits on the right at every width; below 48 rem only the pill stays (the links are repeated
   in the hero, the security section and the footer, so nothing is unreachable). */
.site-header--landing .nav {
  flex: 0 1 auto;
  /* The pill ends on the content edge, not 8 px past it (review pass 3). */
  margin-inline-end: 0;
}

.site-header--landing .nav li:not(:last-child) {
  display: none;
}

.wrap--wide {
  max-width: calc(var(--w-site) + 2 * var(--space-4));
}

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

.landing h2 {
  max-width: 24ch;
  font-size: var(--text-xl);
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Landing sections: 64 px apart on mobile, 96 from 40 rem, 128 from 64 rem. */
.section {
  min-width: 0;
  margin-block-start: var(--space-16);
}

/* The mock follows the hero at 64 px whatever the width (CTA row to frame). */
.hero + .section {
  margin-block-start: var(--space-16);
}

.section-head {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  margin-block-end: var(--space-8);
}

.hero {
  min-width: 0;
  padding-top: var(--space-16);
}

.hero-title {
  min-width: 0;
  max-width: 22ch;
  font-size: var(--text-display);
  line-height: var(--lh-hero);
  letter-spacing: -0.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero-lead {
  max-width: var(--measure-lead);
  margin-block-start: var(--space-6);
  color: var(--color-muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-block-start: var(--space-8);
}

.hero-note {
  margin-block-start: var(--space-4);
  color: var(--color-faint);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

/* The product in situation (plan 07-07, D103): a framed figure holding two panels. Léa's chat is
   generic on purpose (no Claude colour, typeface, logo or avatar); Paul's side is the real HopBrief
   card and the real Untrusted box, which no rule of this block touches (B16). */
.demo {
  min-width: 0;
  margin: 0;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.demo-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  min-width: 0;
}

.demo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
}

/* Stacked, the second panel is set off by a hairline above it; side by side (64 rem) by one beside it. */
.demo-panel + .demo-panel {
  padding-block-start: var(--space-6);
  border-top: 1px solid var(--color-rule);
}

.demo-caption {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.demo figcaption {
  margin-block-start: var(--space-6);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
}

.demo .btn {
  cursor: default;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.chat-msg {
  min-width: 0;
  color: var(--color-ink);
  font-size: var(--text-sm);
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.chat-msg--user {
  align-self: flex-end;
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-raised);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
}

/* What the connector reports in the conversation: a quiet pill, the mark at 16 px. */
.chat-tool {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  max-width: 100%;
  min-width: 0;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-label);
  overflow-wrap: anywhere;
}

.chat-tool .brand-mark {
  width: 1rem;
  height: 1rem;
}

/* Paul's three steps fade and rise once on load, one after the other (D105). */
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(var(--space-2));
  }
}

.demo-step {
  min-width: 0;
  animation: arrive var(--dur-arrive) var(--ease-out) both;
}

.demo-step:nth-of-type(1) {
  animation-delay: 300ms;
}

.demo-step:nth-of-type(2) {
  animation-delay: 700ms;
}

.demo-step:nth-of-type(3) {
  animation-delay: 1100ms;
}

/* The three pillars (plan 07-08, D104): figure-led columns, no box and no fill. One column on a
   phone, two from 40 rem, three from 64 rem with a hairline before the second and the third. */
.pillars .section-head + div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-16);
  min-width: 0;
}

.pillar {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  min-width: 0;
}

/* Stacked on a phone the figures stay small (review: three 15 rem figures took ~1000 px). */
.pillar .fig {
  max-width: 10rem;
  margin-block-end: var(--space-3);
}

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

/* The three steps, titled by their verb: the number sits in a hairline circle, in the text. */
.how-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-content: start;
  column-gap: var(--space-4);
  row-gap: var(--space-2);
  min-width: 0;
}

.how-num {
  display: inline-flex;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-rule);
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-bold);
  line-height: 1;
}

/* The title's first line is centred on the 2 rem number; the text follows the end of the title at
   the step's 8 px row gap, whatever the number of title lines. */
.how-step h3 {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  padding-block-start: calc((2rem - 1lh) / 2);
  text-wrap: balance;
}

.how-step p {
  grid-column: 2;
  grid-row: 2;
}

/* The link that closes a section is a paragraph under the list, with a 48 px hit box. */
.how-steps + p,
.trust-list + p {
  margin-block-start: var(--space-8);
}

.how-steps + p a,
.trust-list + p a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
}

/* The five protections: a check in the ok colour, then the sentence in ink. */
.trust {
  min-width: 0;
}

.trust .section-head p {
  max-width: var(--measure-lead);
  color: var(--color-muted);
}

.trust-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 0;
}

.trust-list .icon {
  margin-block-start: var(--space-1);
  color: var(--color-ok);
}

.trust-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The questions (plan 07-08): the disclosures of the app, one per question, in a column of at most
   48 rem. The question is an h3 inside the summary, at body size, next to its chevron. */
.faq .section-head + div {
  display: grid;
  gap: var(--space-3);
  max-width: 48rem;
  min-width: 0;
}

.faq summary {
  padding-block: var(--space-3);
}

.faq summary h3 {
  min-width: 0;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
}

/* A hyphenated word that must not break at its hyphen (review fix 8): Geist has no U+2011. */
.nobr {
  white-space: nowrap;
}

/* The closing call: a hairline above, the heading and one secondary pill. */
.closing {
  display: grid;
  justify-items: start;
  gap: var(--space-6);
  padding-block-start: var(--space-12);
  border-top: 1px solid var(--color-rule);
}

/* The legal notice (P57): the prose rhythm of long documents, one reading measure, two heading
   sizes (28 and 20 px) on a 16 px body; no landing rule applies to it. */
.legal .wrap {
  display: grid;
  gap: var(--space-8);
}

.legal section {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  max-width: var(--measure);
}

.legal h1 {
  max-width: var(--measure);
  font-size: var(--text-xl);
}

.legal h2 {
  font-size: var(--text-lg);
}

/* The landing footer: the logo and sentence, the three links, then the theme form, 16 px apart. */
.site-footer .wrap--wide {
  gap: var(--space-4);
  justify-items: start;
}

/* Ft2 row 1 (D108): the logo and the sentence on one line, the sentence under the logo when the
   line is too narrow. */
.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  min-width: 0;
}

@media (min-width: 40rem) {
  .wrap--wide {
    max-width: calc(var(--w-site) + 2 * var(--space-8));
  }

  .section {
    margin-block-start: var(--space-24);
  }

  .hero {
    padding-top: var(--space-24);
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .demo {
    padding: var(--space-6);
  }

  .pillar .fig {
    max-width: 15rem;
  }

  .pillars .section-head + div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-8);
    row-gap: var(--space-12);
  }

  .closing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 48rem) {
  .site-header--landing .nav li:not(:last-child) {
    display: flex;
  }
}

@media (min-width: 64rem) {
  .wrap--wide {
    max-width: calc(var(--w-site) + 2 * var(--space-12));
    padding-inline-start: max(var(--space-12), env(safe-area-inset-left));
    padding-inline-end: max(var(--space-12), env(safe-area-inset-right));
  }

  .section {
    margin-block-start: var(--space-32);
  }

  .section-head {
    margin-block-end: var(--space-12);
  }

  .demo {
    padding: var(--space-8);
  }

  /* Léa's short thread takes the narrower column and sits in the middle of the height Paul's three
     steps give the stage, her caption staying at the top (review pass 2, fix 3). */
  .demo-stage {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--space-6);
  }

  .demo-panel:first-child {
    grid-template-rows: auto 1fr;
  }

  .demo-panel:first-child .chat {
    align-self: center;
  }

  .demo-panel + .demo-panel {
    padding-block-start: 0;
    padding-inline-start: var(--space-6);
    border-top: 0;
    border-inline-start: 1px solid var(--color-rule);
  }

  .pillars .section-head + div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8);
  }

  .pillar + .pillar {
    padding-inline: var(--space-8);
    border-inline-start: 1px solid var(--color-rule);
  }

  .how-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8);
  }

  .trust {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--space-12);
    align-items: start;
  }

  .trust .section-head {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-block-end: 0;
  }

  .trust-list {
    grid-column: 2;
    grid-row: 1;
  }

  .trust-list + p {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Motion: colour changes only, hover devices only */
@media (hover: hover) and (pointer: fine) {
  a {
    transition:
      color var(--dur-micro) var(--ease-out),
      border-color var(--dur-micro) var(--ease-out);
  }

  a:hover {
    text-decoration-thickness: 2px;
  }

  .nav a:hover {
    color: var(--color-ink);
  }

  .nav .btn--link:hover {
    color: var(--color-ink);
  }

  .nav .nav-cta::before {
    transition: border-color var(--dur-micro) var(--ease-out);
  }

  .nav .nav-cta:hover::before {
    border-color: var(--color-muted);
  }

  .btn {
    transition:
      background-color var(--dur-micro) var(--ease-out),
      border-color var(--dur-micro) var(--ease-out),
      color var(--dur-micro) var(--ease-out),
      transform var(--dur-micro) var(--ease-out);
  }

  .theme-option {
    transition:
      color var(--dur-micro) var(--ease-out),
      transform var(--dur-micro) var(--ease-out);
  }

  .theme-option:hover {
    color: var(--color-ink);
  }

  .btn--primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
  }

  /* The fill is already --color-raised (light: the same value as --color-surface, so the border
     darkens to show the hover; dark: the lit top edge shows). Hover fills never use the sunken token,
     which belongs to the Untrusted box (D100). */
  .btn--secondary:hover {
    border-color: var(--color-muted);
    box-shadow: var(--shadow-edge);
  }

  .btn--danger:hover {
    background: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
  }

  .btn--danger-outline:hover {
    background: var(--color-danger-surface);
  }

  .btn--link:hover {
    text-decoration-thickness: 2px;
  }

  .input {
    transition:
      background-color var(--dur-micro) var(--ease-out),
      border-color var(--dur-micro) var(--ease-out);
  }

  .input:hover:not(:disabled) {
    background: var(--color-raised);
  }

  .copyfield {
    transition:
      background-color var(--dur-micro) var(--ease-out),
      border-color var(--dur-micro) var(--ease-out);
  }

  .copyfield:hover {
    background: var(--color-raised);
  }

  .choice {
    transition:
      background-color var(--dur-micro) var(--ease-out),
      border-color var(--dur-micro) var(--ease-out);
  }

  .choice:hover {
    background: var(--color-raised);
  }

  .jump a:hover {
    text-decoration-thickness: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-step {
    animation: none;
  }

  .btn:active,
  .theme-option:active {
    transform: none;
  }

  .details summary .icon {
    transition-duration: 0ms;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  .card,
  .skip-link,
  .alert,
  .tag,
  .cmd,
  .details,
  .step-marker,
  .how-num,
  .theme-switch > div {
    border: 1px solid CanvasText;
  }

  .btn,
  .input,
  .copyfield,
  .choice {
    border: 1px solid ButtonText;
  }

  .untrusted,
  .marker {
    border: 1px solid CanvasText;
  }

  :focus-visible,
  .btn:focus-visible,
  .input:focus-visible,
  .copyfield:focus-visible {
    outline-color: Highlight;
  }

  .nav a[aria-current="page"] {
    border-bottom-color: Highlight;
  }
}
