/* easo-web — design system from the brand book (Pitch 1). Tokens: brand/easo/tokens.md;
   components: brand/easo/components.md. System fonts only, WCAG 2.2 AA, light + dark. */

:root {
  /* Colour — light */
  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-raised: #edf0f4;
  --ink: #12151b;
  --muted: #565d69;
  --brand: #0f4c91;
  --brand-strong: #0b3a72;
  --accent-proof: #0e6e77;
  --success: #1e7a3b;
  --warning: #8a5a00;
  --danger: #b42318;
  --border: #d6dce4;
  --border-strong: #7c848f;
  --badge-bg: #e9f1fa;
  --hero-wash: #e9f1fa;
  --focus: #1565d8;

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;

  /* Spacing — 4px rhythm */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem;
  /* The large steps are fluid. Their MAXIMUM is the value they always had, so wide viewports
     render byte-identically; only narrow ones tighten. Fixed 48/64/96 px gaps on a 667 px tall
     phone spent a quarter of the screen on emptiness and pushed the search filters out of view. */
  --space-7: clamp(1.75rem, 6vw, 3rem);
  --space-8: clamp(2.25rem, 8vw, 4rem);
  --space-9: clamp(3rem, 10vw, 6rem);
  --space-10: clamp(4rem, 13vw, 8rem);

  /* Radius */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-pill: 999px;

  /* Layout */
  --content: 75rem;   /* 1200 */
  --measure: 45rem;   /* 720  */
  --gutter: clamp(1rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e1116;
    --surface: #161a21;
    --surface-raised: #1e242d;
    --ink: #edeff3;
    --muted: #a6aebb;
    --brand: #6ea8f0;
    --brand-strong: #8fbef5;
    --accent-proof: #46c7bd;
    --success: #65d08c;
    --warning: #e7b24d;
    --danger: #f19289;
    --border: #2a313c;
    --border-strong: #6b7380;
    --badge-bg: #16233b;
    --hero-wash: #16233b;
  }
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); margin: 0 0 var(--space-4); text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.375rem); line-height: 1.14; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.75rem; line-height: 1.21; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.3125rem; line-height: 1.33; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 var(--space-4); max-width: var(--measure); }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
a:visited { color: var(--brand-strong); }

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

strong { font-weight: 600; }
/* German auto-hyphenation helps body copy but breaks display type at ugly points —
   keep it for text, switch it off for headings (they wrap at word boundaries instead). */
:lang(de) { hyphens: auto; }
:lang(de) h1, :lang(de) h2, :lang(de) h3 { hyphens: manual; }

.overline {
  display: inline-block;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; z-index: 20; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
/* For live regions and labels that must exist for assistive tech but not on screen. Clipped
   rather than `display:none` or `left:-9999px`, so screen readers still announce it. */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* --- ISO 9001 self-check (easo-web ADR-0031) ---------------------------------------------
   Without JS this whole block is a printable checklist; the buttons ship `hidden` and only
   selfcheck.js unhides them. Answer targets are sized well past the 24 px of SC 2.5.8 — this is
   a form people work through on a phone. */
.sc-chapter { font-size: 1.3125rem; margin: var(--space-7) 0 var(--space-4); }
.sc-chapter:first-child { margin-top: 0; }
.sc-group { display: grid; gap: var(--space-4); }

/* Card per the brand book: surface, --border, radius lg, elev-1 at rest — the same recipe
   `.trust li` already uses. No invented accent bars: elevation is "low-opacity, cool — never
   coloured or glowing", and --accent-proof is reserved for the signature/released state. */
.sc-q {
  margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: var(--space-5);
  box-shadow: 0 1px 3px rgba(18, 21, 27, 0.05);
}
/* A <legend> sits ON the fieldset border by default, which reads as a mistake in a card layout.
   `float` + full width turns it into a normal block inside the card and leaves the border whole —
   the long-standing way to do this without giving up the fieldset/legend semantics that name the
   radio group for assistive tech. */
.sc-q > legend {
  float: left; width: 100%;
  padding: 0; margin: 0;
  font-weight: 600; line-height: 1.35;
}
/* A float does not push block boxes down — only their line boxes. Without this the next box
   overlaps the legend by ~10 px; the text still looked right, which is exactly what makes it the
   kind of thing that breaks later, the first time something there gets a background. */
.sc-q > legend + * { clear: both; padding-top: var(--space-3); }
.sc-clause {
  display: inline-block; margin-right: 0.5rem; padding: 0.1rem 0.5rem;
  background: var(--badge-bg); color: var(--brand); border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.sc-criteria-label {
  margin: var(--space-3) 0 0.3rem; font-size: 0.85rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.sc-criteria { margin: 0 0 var(--space-4); padding-left: 1.15rem; color: var(--muted); }
.sc-criteria li { margin-bottom: 0.35rem; max-width: var(--measure); }

.sc-answers { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sc-opt {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.85rem; min-height: 44px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--page); cursor: pointer; font-size: 0.95rem;
}
.sc-opt:hover { border-color: var(--brand); }
.sc-opt:has(input:checked) { border-color: var(--brand); background: var(--badge-bg); font-weight: 600; }
/* The ring belongs on the pill, not on the 14 px radio inside it. */
.sc-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.sc-opt input { accent-color: var(--brand); width: 1.05rem; height: 1.05rem; margin: 0; }

.sc-more { margin: var(--space-4) 0 0; font-size: 0.95rem; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-6); }
.sc-reset { font-weight: 500; }

.sc-result:empty { display: none; }
.sc-result {
  margin-top: var(--space-6); padding: var(--space-5);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: 0 1px 3px rgba(18, 21, 27, 0.05);
}
.sc-result > h2 { margin-top: 0; }
.sc-count { font-weight: 600; }
.sc-gap-chapter { font-size: 1.0625rem; margin: var(--space-5) 0 var(--space-3); color: var(--muted); }
.sc-gaps { margin: 0; padding-left: 1.2rem; }
.sc-gap { margin-bottom: var(--space-5); }
.sc-evidence-label {
  margin: var(--space-3) 0 0.3rem; font-size: 0.85rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.sc-notes { margin-top: var(--space-6); }
.sc-notes p { margin-bottom: var(--space-3); max-width: none; }
.sc-copy-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: var(--space-6) 0 0; }
/* "Change answers" is navigation, not an export — set apart from the two actions that produce
   something to take away. */
.sc-edit { margin-inline-start: auto; }
/* Once the row wraps, the buttons are already on separate lines — keeping the auto margin would
   leave this one hanging right on its own while the others sit left. */
@media (max-width: 34rem) { .sc-edit { margin-inline-start: 0; } }
.sc-copy-hint { display: block; flex-basis: 100%; margin-top: var(--space-2); }
.sc-copy-text {
  display: block; width: 100%; margin-top: var(--space-3); padding: var(--space-3);
  font: inherit; font-size: 0.9rem; font-family: var(--font-mono);
  color: var(--ink); background: var(--page);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); resize: vertical;
}
.sc-gap-head { margin: 0 0 0.3rem; font-weight: 600; }
.sc-gap-state {
  display: inline-block; margin-right: 0.5rem; padding: 0.05rem 0.5rem;
  border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--surface-raised); color: var(--muted);
}
.sc-gap--no .sc-gap-state { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.sc-gap--partly .sc-gap-state { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.sc-gap-criteria { margin: 0; padding-left: 1.15rem; color: var(--muted); font-size: 0.95rem; }
.sc-note { margin: var(--space-4) 0 0; color: var(--muted); font-size: 0.95rem; }
.sc-none, .sc-empty { margin: 0; }

@media print {
  .sc-actions, .sc-result, .sc-more { display: none; }
  .sc-q { break-inside: avoid; border-color: #999; }
}

/* --- Layout --- */
.container { width: 100%; max-width: var(--content); margin-inline: auto; padding-inline: var(--gutter); }
.site-main { padding-block: var(--space-7) var(--space-8); }
.site-main section + section { margin-top: var(--space-8); }
/* The header is sticky, so an anchor jump would park its target underneath it. Any section that
   carries an id is a jump target — keep its heading clear of the bar. */
.site-main section[id] { scroll-margin-top: 6rem; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1rem 1.5rem; padding-block: 0.8rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-lockup { height: 2.25rem; width: auto; display: block; flex: none; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }

/* Hamburger nav (mobile), inline (desktop) */
.nav-menu { position: relative; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); cursor: pointer; list-style: none;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before { position: absolute; left: 0; top: -6px; }
.nav-toggle-icon::after { position: absolute; left: 0; top: 6px; }
.nav-menu[open] .nav-toggle-icon { background: transparent; }
.nav-menu[open] .nav-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
.nav-menu[open] .nav-toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }
.nav-menu > .site-nav { display: none; }
.nav-menu[open] > .site-nav {
  display: flex; flex-direction: column; gap: 0.25rem;
  position: absolute; right: 0; top: calc(100% + 0.6rem); min-width: 210px; padding: 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(18, 21, 27, 0.14); z-index: 20;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.nav-menu[open] > .site-nav a { padding: 0.5rem 0.6rem; border-radius: var(--radius-sm); }
.site-nav a:hover { color: var(--brand); }
.nav-menu[open] > .site-nav a:hover { background: var(--surface-raised); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* Primary CTA in the nav — filled brand pill (stands out from the plain nav links) */
.site-nav a.nav-cta,
.nav-menu[open] > .site-nav a.nav-cta {
  color: var(--page); background: var(--brand); font-weight: 600; text-decoration: none;
  padding: 0.4rem 0.95rem; border-radius: var(--radius-pill);
}
.site-nav a.nav-cta:hover,
.nav-menu[open] > .site-nav a.nav-cta:hover { color: var(--page); background: var(--brand-strong); }
.site-nav a.nav-cta[aria-current="page"] { color: var(--page); text-decoration: none; }

/* Language pill */
.lang-pill { position: relative; }
.lang-pill > summary {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.7rem;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface);
  color: var(--ink); font-size: 0.9rem; cursor: pointer; list-style: none;
}
.lang-pill > summary::-webkit-details-marker { display: none; }
.lang-globe, .lang-chevron { flex: none; }
.lang-chevron { transition: transform 0.15s ease; }
.lang-pill[open] .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 0.4rem); margin: 0; padding: 0.35rem;
  min-width: 160px; list-style: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(18, 21, 27, 0.14); z-index: 20;
}
.lang-pill[open] > .lang-menu { display: block; }
.lang-menu a { display: block; padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.lang-menu a:hover { background: var(--surface-raised); color: var(--ink); }
.lang-menu a[aria-current="true"] { color: var(--ink); font-weight: 600; }

@media (max-width: 60.99rem) {
  .header-actions .lang-pill { order: -1; }
}
@media (min-width: 61rem) {
  .header-actions { gap: 1.75rem; }
  /* Precise alignment: nav CTA pill + language pill share the exact 36px logo height */
  .site-nav a.nav-cta { display: inline-flex; align-items: center; height: 2.25rem; padding-block: 0; }
  .lang-pill > summary { height: 2.25rem; padding-block: 0; }
  .nav-toggle { display: none; }
  .nav-menu::details-content { content-visibility: visible; contain-intrinsic-size: auto none; }
  .nav-menu > .site-nav, .nav-menu[open] > .site-nav {
    display: flex; flex-direction: row; align-items: center; gap: 1.5rem; position: static; min-width: 0;
    padding: 0; background: none; border: none; box-shadow: none;
  }
  .nav-menu[open] > .site-nav a { padding: 0; }
  .nav-menu[open] > .site-nav a:hover { background: none; }
}

/* --- Buttons --- */
.cta {
  display: inline-block; background: var(--brand); color: var(--page); text-decoration: none;
  /* `font`, `border` and `cursor` are needed because .cta sits on <button> as well as <a>. A
     button that is not told otherwise falls back to the UA's ~13 px system font, a default border
     and an arrow cursor — so the same class rendered at two different sizes. */
  font: inherit; font-weight: 500; border: 0; cursor: pointer;
  padding: 0.7rem 1.4rem; border-radius: var(--radius-md);
}
.cta:link, .cta:visited { color: var(--page); }
.cta:hover { background: var(--brand-strong); color: var(--page); }
.cta svg { vertical-align: -0.2em; margin-right: 0.5em; }

/* Download page — button row + "coming soon" (disabled) state */
.dl-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0 1rem; }
.cta-soon { background: var(--surface); color: var(--muted); border: 1px solid var(--border-strong); cursor: default; }
.cta-soon:hover { background: var(--surface); color: var(--muted); }
/* Secondary rank from the brand book (surface fill, --border-strong outline, INK label) — the
   stylesheet only ever had primary and the disabled-looking "coming soon" variant, so live
   secondary controls were being dressed as disabled ones. The :link/:visited pair is required:
   `.cta:link` sets a near-white label, which on an <a class="cta"> landed at 1.07:1. */
.cta-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); }
.cta-secondary:link, .cta-secondary:visited { color: var(--ink); }
.cta-secondary:hover { background: var(--surface-raised); color: var(--ink); }
.dl-platform { color: var(--muted); font-size: 0.95rem; }
.hero-note { color: var(--muted); font-size: 0.95rem; margin-left: 0.5rem; }

/* Newsletter form (native, first-party) */
.nl-form { max-width: 30rem; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-field { margin-bottom: 0.9rem; }
.nl-field label { display: block; font-weight: 500; margin-bottom: 0.3rem; }
.nl-field input {
  width: 100%; padding: 0.6rem 0.7rem; font: inherit;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
}
.nl-field input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.nl-consent { color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 1.1rem; }
.nl-form button.cta { border: none; cursor: pointer; }

/* --- Hero (banner) --- */
/* Contextual back-link on the git explainer — hidden until nav.js reveals it (see there). */
.back-ref {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--brand);
}
.back-ref[hidden] { display: none; }
.back-ref:hover { text-decoration: underline; }
.back-ref-arrow { flex: none; }

.hero { padding: var(--space-7) 0 var(--space-5); }
/* `.site-main` already pads the top of the page. A hero opening it added the same token again,
   so every page carried the value twice — 96 px of nothing above the first word. */
.site-main > .hero:first-child,
.site-main > .back-ref + .hero,
.site-main > .breadcrumb + .hero { padding-top: 0; }

/* Knowledge-hub search (Pagefind UI, self-hosted). Themed to the site tokens, so it follows
   light/dark automatically. See ADR-0004. */
.hub-search {
  margin-block: var(--space-6) var(--space-8); max-width: var(--measure);
  --pagefind-ui-scale: 0.9;
  --pagefind-ui-primary: var(--brand);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--surface);
  --pagefind-ui-border: var(--border);
  --pagefind-ui-tag: var(--badge-bg);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: var(--radius-md);
  --pagefind-ui-font: inherit;
}
.hub-search-note { color: var(--muted); font-size: 0.95rem; margin: 0.85rem 0 0; }
/* Category label prefixed to every search result excerpt (see partials/search.njk).
   Scoped to .hub-search on purpose: pagefind-ui.css ships `.pagefind-ui--reset *:where(…)
   { all: unset }` at the same specificity but loads later, so a bare `.search-cat` would
   lose the cascade. */
.hub-search .search-cat {
  display: inline-block; margin-right: 0.5rem; padding: 0.1rem 0.55rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--brand); background: var(--badge-bg);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: var(--radius-pill); vertical-align: 0.1em;
}
/* Lifted above the title by the observer in partials/search.njk: the result inner is a
   flex column, so the pill becomes an eyebrow above the heading. */
.hub-search .pagefind-ui__result-inner > .search-cat { margin: 0 0 0.4rem; }

/* Knowledge clause pages (rendered from the exported easo ADR-0022 nodes). */
/* The breadcrumb belongs to the header chrome, not to the article: it sits close under the nav
   bar, and the gap below it separates "navigation" from "content". The back link is the other
   way round — reading convenience, so it hugs the heading it takes you back from. */
/* Not `:first-child` — the BreadcrumbList <script> is the first child of <main>. */
.site-main:has(> .breadcrumb) { padding-top: var(--space-4); }
.site-main > .breadcrumb { margin-bottom: var(--space-6); }
.site-main > .back-ref { margin-bottom: var(--space-2); }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: var(--space-4); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span[aria-hidden] { margin: 0 0.3rem; }
.clause-easo {
  background: var(--hero-wash); border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px); padding: var(--space-5) var(--space-6);
}
.clause-easo > h2 { margin-top: 0; }
.hero .lead { font-size: 1.125rem; line-height: 1.61; color: var(--muted); margin: 0; max-width: 46ch; }

.hero--banner {
  background: var(--hero-wash); border-radius: 16px; padding: clamp(1.75rem, 4vw, 3.25rem);
  display: grid; gap: var(--space-6); margin: var(--space-6) 0 var(--space-8);
}
.hero-content h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.5rem); line-height: 1.06; letter-spacing: -0.03em; hyphens: manual; }
.hero-content .lead { margin-bottom: var(--space-5); }
.hero-media { display: flex; justify-content: center; align-items: center; }
.hero-media svg { width: 100%; height: auto; max-width: 520px; }

/* Lifecycle diagram: gentle looping build-in (Draft -> Review -> Released, then the check).
   Static for reduced-motion / no-JS. Connectors + check draw via pathLength=1. */
@media (prefers-reduced-motion: no-preference) {
  .hero-diagram .hm-conn,
  .hero-diagram .hm-check { stroke-dasharray: 1; }
  .hero-diagram .hm-node-1 { animation: hm-n1 8s ease-in-out infinite; }
  .hero-diagram .hm-node-2 { animation: hm-n2 8s ease-in-out infinite; }
  .hero-diagram .hm-node-3 { animation: hm-n3 8s ease-in-out infinite; }
  .hero-diagram .hm-conn-1 { animation: hm-c1 8s ease-in-out infinite; }
  .hero-diagram .hm-conn-2 { animation: hm-c2 8s ease-in-out infinite; }
  .hero-diagram .hm-check  { animation: hm-ck 8s ease-in-out infinite; }
  .hero-diagram .hm-arrow-1 { animation: hm-a1 8s ease-in-out infinite; }
  .hero-diagram .hm-arrow-2 { animation: hm-a2 8s ease-in-out infinite; }
  .hero-diagram .hm-confetti { animation: hm-cf 8s ease-out infinite; }
}
.hero-diagram .hm-arrow { fill: var(--muted); }
.hero-diagram .hm-confetti { transform-box: fill-box; transform-origin: center; opacity: 0; }
@keyframes hm-n1 { 0%,3%{opacity:0} 9%,88%{opacity:1} 95%,100%{opacity:0} }
@keyframes hm-n2 { 0%,17%{opacity:0} 23%,88%{opacity:1} 95%,100%{opacity:0} }
@keyframes hm-n3 { 0%,31%{opacity:0} 37%,88%{opacity:1} 95%,100%{opacity:0} }
@keyframes hm-c1 { 0%,9%{stroke-dashoffset:1;opacity:0} 12%,88%{stroke-dashoffset:0;opacity:1} 95%{opacity:0} 100%{stroke-dashoffset:1;opacity:0} }
@keyframes hm-c2 { 0%,23%{stroke-dashoffset:1;opacity:0} 26%,88%{stroke-dashoffset:0;opacity:1} 95%{opacity:0} 100%{stroke-dashoffset:1;opacity:0} }
@keyframes hm-ck { 0%,37%{stroke-dashoffset:1;opacity:0} 40%,88%{stroke-dashoffset:0;opacity:1} 95%{opacity:0} 100%{stroke-dashoffset:1;opacity:0} }
@keyframes hm-a1 { 0%,15%{opacity:0} 20%,88%{opacity:1} 95%,100%{opacity:0} }
@keyframes hm-a2 { 0%,29%{opacity:0} 34%,88%{opacity:1} 95%,100%{opacity:0} }
@keyframes hm-cf {
  0%,42%   { opacity: 0; transform: translate(0, 0) scale(0.3); }
  46%      { opacity: 1; transform: translate(0, 0) scale(1); }
  60%,100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.85) rotate(var(--rot, 0)); }
}
@media (min-width: 52rem) {
  .hero--banner { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: var(--space-8); }
}

/* --- Cards / trust grid --- */
.trust ul {
  list-style: none; margin: var(--space-6) 0; padding: 0; display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.trust li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem; box-shadow: 0 1px 3px rgba(18, 21, 27, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.trust li:hover { border-color: var(--border-strong); box-shadow: 0 4px 12px rgba(18, 21, 27, 0.08); }
/* Scoped to the card, so a .trust section may also carry a real section heading of its own
   (the pricing page does) without it shrinking to card size. */
.trust li h2, .trust li h3 { font-size: 1.3125rem; line-height: 1.33; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.4rem; }
.trust li p { font-size: 1rem; color: var(--muted); margin: 0; max-width: none; }

/* --- Release history --- */
.rel + .rel { margin-top: var(--space-7); padding-top: var(--space-7); border-top: 1px solid var(--border); }
.rel h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.75rem; margin-bottom: var(--space-3); }
.rel-date { font-size: 1rem; font-weight: 400; color: var(--muted); }
.rel-security {
  font-size: 0.8125rem; font-weight: 600; color: var(--brand);
  background: var(--badge-bg); border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  border-radius: var(--radius-pill); padding: 0.15rem 0.7rem;
}

/* --- Numbered lists that read as items, not bullets --- */
.cost-list {
  list-style: none; margin: var(--space-6) 0; padding: 0;
  counter-reset: cost; display: grid; gap: var(--space-5);
}
.cost-list > li {
  counter-increment: cost;
  display: grid; grid-template-columns: 1.75rem 1fr; column-gap: var(--space-3);
}
/* The number spans both rows so heading and body keep one shared left edge. */
.cost-list > li::before {
  content: counter(cost) "."; grid-column: 1; grid-row: 1 / span 2;
  color: var(--brand); font-weight: 600; font-size: 1.125rem; line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.cost-list h3 { grid-column: 2; font-size: 1.125rem; line-height: 1.45; font-weight: 600; margin: 0 0 var(--space-2); }
.cost-list p { grid-column: 2; margin: 0; }

/* --- Pricing plans --- */
.plans {
  list-style: none; margin: var(--space-6) 0; padding: 0; display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-5) 1.4rem; box-shadow: 0 1px 3px rgba(18, 21, 27, 0.05);
  /* Column + `margin-top: auto` on the closing note: the two cards carry different amounts of
     text, and the notes would otherwise sit at two different heights. */
  display: flex; flex-direction: column;
}
.plan h3 { font-size: 1.3125rem; line-height: 1.33; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 var(--space-3); }
.plan p { max-width: none; }
.plan-price { margin: 0 0 0.15rem; }
.plan-price strong { font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.plan-unit { color: var(--muted); font-size: 0.95rem; }
.plan-alt { color: var(--muted); font-size: 0.95rem; margin: 0 0 var(--space-4); }
.plan-lead { font-weight: 600; margin: 0 0 var(--space-2); }
.plan-limit {
  margin: auto 0 0; padding-top: var(--space-4); border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.95rem;
}

/* Cards in a row read as one block only if their lines start at the same height. A two-line
   heading otherwise pushes everything below it down, and the eye has to re-find the baseline in
   every card. `subgrid` lets each card share the list's rows instead of stacking its own, so
   heading, price and body line up no matter how long a translation turns out — the alternative,
   a fixed heading height, breaks on the first longer word. Cards keep their own row-gap: they
   would otherwise inherit the gap BETWEEN cards as the gap between their own lines.
   Browsers without subgrid keep the flex layout above: correct, merely not aligned. */
@supports (grid-template-rows: subgrid) {
  .trust ul { grid-template-rows: auto auto; }
  .trust li { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  /* heading · price · secondary line · lead · body · footnote */
  .plans { grid-template-rows: auto auto auto auto 1fr auto; }
  .plan { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
  /* The flex fallback needs `margin-top: auto` to push the footnote down; in the shared grid the
     row already sits at the bottom, and keeping the auto margin would drop the shorter footnote
     — and its divider line — below the other one. */
  .plan-limit { margin-top: 0; }
}

/* --- Badge --- */
.badge {
  display: inline-block; font-size: 0.8125rem; font-weight: 600; color: var(--brand);
  background: var(--badge-bg); border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  border-radius: var(--radius-pill); padding: 0.25rem 0.9rem; margin: 0 0 1.25rem;
}

.lead { font-size: 1.125rem; line-height: 1.61; color: var(--muted); }

/* --- Notify CTA --- */
.notify { border-top: 1px solid var(--border); margin-top: var(--space-8); padding-top: var(--space-7); }
.notify-pending { color: var(--muted); }

/* --- Legal --- */
.legal { padding: var(--space-6) 0 var(--space-4); }
.legal h1 { margin-bottom: var(--space-5); }
.legal h2 { font-size: 1.3125rem; margin: var(--space-6) 0 var(--space-2); }
.legal p { margin: 0 0 var(--space-3); }

/* --- FAQ --- */
.faq-item { border-top: 1px solid var(--border); padding: var(--space-5) 0; max-width: var(--measure); }
.faq-item:last-of-type { border-bottom: 1px solid var(--border); }
.faq-item h2, .faq-item h3 { font-size: 1.3125rem; line-height: 1.33; margin: 0 0 0.5rem; }
.faq-item p { margin: 0; color: var(--muted); }

/* --- Manual (Handbuch): screenshot figures, demo note, chapter nav --- */
.shot { margin: var(--space-6) 0; }
.shot > a { display: block; border-radius: var(--radius-md); }
.shot > a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 0.35rem; max-width: var(--measure); }
.demo-note {
  font-size: 0.9375rem; color: var(--muted); border-left: 3px solid var(--border);
  padding-left: var(--space-3); margin-top: var(--space-5); max-width: var(--measure);
}
.chapters h2 { hyphens: auto; }
.chapter-link { display: block; color: inherit; text-decoration: none; }
.chapter-link:visited { color: inherit; }
.chapter-link:hover h2 { text-decoration: underline; }
.chapter-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--radius-sm); }
.chapter-nav {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3) var(--space-5);
  flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: var(--space-8); padding-top: var(--space-5);
}
.chapter-nav p { margin: 0; max-width: none; }
.chapter-nav-prev { flex: 1 1 0; text-align: left; }
.chapter-nav-hub { flex: 0 0 auto; text-align: center; }
.chapter-nav-next { flex: 1 1 0; text-align: right; }
.chapter-nav a { text-decoration: none; }
.chapter-nav a:hover { text-decoration: underline; }

/* --- Footer (fixed dark, both modes) --- */
.site-footer { background: #0c1e38; color: #a7b2c4; margin-top: var(--space-9); font-size: 0.95rem; }
.site-footer a, .site-footer a:visited { color: #a7b2c4; text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.footer-inner {
  display: grid; gap: var(--space-6) var(--space-7); grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  align-items: start; padding-block: var(--space-7) var(--space-6);
}
.footer-brand { max-width: 22rem; }
.footer-logo-link { display: inline-block; line-height: 0; }
.footer-logo { height: 44px; width: auto; display: block; }
.footer-tagline { margin: 1.1rem 0 0; color: #a7b2c4; line-height: 1.55; max-width: none; }
.footer-product { margin: 0.75rem 0 0; color: #8595ad; }
.footer-product a:hover { color: #fff; }
.footer-heading {
  margin: 0.35rem 0 1rem; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #eef2f7;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.footer-social { display: flex; gap: 0.85rem; }
.footer-social a { display: inline-flex; color: #a7b2c4; }
.footer-social a:hover { color: #ffffff; }
.footer-bar { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-bar-inner {
  padding-block: 1.1rem; font-size: 0.875rem; color: #8595ad;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap;
}
.footer-copy { margin: 0; max-width: none; }
@media (max-width: 52rem) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 30rem) {
  .footer-inner { grid-template-columns: 1fr; }
}
/* WCAG 1.4.10 Reflow: at the 320 px reference width the lockup, the language pill and the menu
   button together overflowed by 20 px, so the whole page scrolled sideways. The lockup is
   `flex: none`, so it was the one item that could not give — shrink it here instead. Also hits
   anyone zoomed to 400 %, which is the point of the criterion. */
@media (max-width: 22.5rem) {
  .brand-lockup { height: 1.85rem; }
  .header-inner { gap: 0.75rem; }
  .header-actions { gap: 0.5rem; }
}
