/* Xerovi design tokens: DRAFT v1, 2026-11-28, agent s5-design. NOT DEPLOYED.
   Source: the unreleased v3 theme (_snapshots/server-2026-11-28/themes/xerovi-v3/assets/v3.css and
   v3-sections.css). Values marked "CHANGED from v3" are proposals (DESIGN.md §Changes from v3, D-row in
   00-admin/DECISIONS.md). Everything else is the v3 value, renamed.

   Three layers. Use the lowest layer that does the job:
     1. Primitive  --xv-<family>-<step>   raw values. Never used directly in templates.
     2. Semantic   --xv-<role>            purpose, per tone. The only layer templates and patterns read,
                                          apart from component tokens.
     3. Component  --xv-<component>-<part>[-<state>]   one per component part that differs from the
                                          semantic default.

   Tones. A section chooses its tone explicitly: class="xv-tone-ink" (default, dark) or
   class="xv-tone-paper" (light). v3 chose the tone by position (main>section:nth-of-type(even)); that
   is retired (CHANGED from v3). Semantic and component tokens are declared on :root AND on both tone
   classes, because a custom property that references another one is resolved where it is declared:
   without the repeat, a component token on :root would keep the ink values inside a paper section.

   Contrast. Every text/background and UI pair is listed in the @pairs block at the end of this file and
   checked by 08-qa/S5/contrast.py (WCAG 2.2: 4.5:1 text, 3:1 large text and UI). Add a pair whenever
   you add a colour token. Result: 08-qa/S5/contrast-2026-11-28.txt. */

/* ======================================================================= LAYER 1: PRIMITIVES */
:root {
  /* --- colour: ink (dark neutrals, faint green cast) --- */
  --xv-ink-950: #0a0d0c;   /* page ground, ink tone */
  --xv-ink-900: #111614;   /* card on ink; menus, cookie banner */
  --xv-ink-850: #18201d;   /* second surface on ink; hover row */
  --xv-ink-800: #26302c;   /* hairline on ink (decorative only, 1.4:1) */
  --xv-ink-700: #3a4440;   /* diagram off-state (decorative) */

  /* --- colour: stone (mid greys) --- */
  --xv-stone-100: #c4cbc7; /* soft text on ink (hero lead) */
  --xv-stone-200: #a6aea9; /* muted text on ink */
  --xv-stone-500: #747d78; /* CHANGED from v3 (new): control borders and disabled text, both tones */
  --xv-stone-600: #5c625f; /* captions on paper; replaces v3 #6b716d (4.03:1 on bone-200) */
  --xv-stone-700: #4f5652; /* muted text on paper */
  --xv-stone-800: #464846; /* soft text on paper (v3: color-mix(ink 74%/82%, transparent)) */

  /* --- colour: bone (light neutrals) --- */
  --xv-white:    #ffffff;  /* document "paper" inside product illustrations */
  --xv-bone-50:  #fbfaf6;  /* card on paper */
  --xv-bone-100: #f2f1ec;  /* page ground, paper tone; text on ink */
  --xv-bone-150: #f1f0eb;  /* spreadsheet cells in illustrations */
  --xv-bone-200: #e9e7e0;  /* second surface on paper; product stage */
  --xv-bone-250: #dcd9d0;  /* hairline on white paper (illustrations) */
  --xv-bone-300: #d6d3ca;  /* hairline on paper (decorative only, 1.3:1) */
  --xv-bone-400: #c9c6bd;  /* window-chrome dots (decorative) */

  /* --- colour: green (brand) --- */
  --xv-green-50:  #d9f7e8; /* linked-evidence chip fill */
  --xv-green-300: #5dffbb; /* brand fill, hover */
  --xv-green-400: #00ff97; /* Xerovi green: brand fill, accent on ink. Never text on paper (1.2:1) */
  --xv-green-600: #00a862; /* linked-evidence chip border (illustration) */
  --xv-green-700: #007649; /* CHANGED from v3 #007a4b: accent on paper. 4.37:1 on bone-200 failed AA */
  --xv-green-800: #0a5b38; /* text on green-50 */
  --xv-teal-400:  #19e8d2; /* logo gradient start (logo files only; not a UI colour) */

  /* --- colour: red (errors) --- */
  --xv-red-300: #ff8f86;   /* error on ink */
  --xv-red-700: #b3261e;   /* error on paper */

  /* --- colour: alpha --- */
  --xv-green-a10: rgba(0, 255, 151, .10);   /* tonal fill on ink */
  --xv-green-a18: rgba(0, 255, 151, .18);   /* tonal fill on ink, hover */
  --xv-green-a22: rgba(0, 255, 151, .22);   /* input focus halo on ink */
  --xv-ink-a06:   rgba(10, 13, 12, .06);    /* tonal fill on paper */
  --xv-ink-a11:   rgba(10, 13, 12, .11);    /* tonal fill on paper, hover */
  --xv-ink-a40:   rgba(10, 13, 12, .40);    /* dialog backdrop */
  --xv-ink-a94:   rgba(10, 13, 12, .94);    /* solid header */
  --xv-bone-a08:  rgba(242, 241, 236, .08); /* tonal fill inside the cookie banner */
  --xv-bone-a14:  rgba(242, 241, 236, .14); /* same, hover */
  --xv-bone-a30:  rgba(242, 241, 236, .30); /* junction wires (decorative) */
  --xv-green-700-a22: rgba(0, 118, 73, .22); /* input focus halo on paper */

  /* --- type --- */
  --xv-font-sans: "Chivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --xv-weight-regular: 400;  /* display and headings */
  --xv-weight-medium: 500;   /* UI text, card titles, strong */
  --xv-weight-semibold: 600; /* the wordmark only */

  /* Fluid sizes: one clamp per step, rem bounds so text-size settings scale them.
     CHANGED from v3: v3 used a different clamp per breakpoint; these lines pass through the v3 values
     at 375 px and 1440 px. */
  --xv-size-word:     clamp(4.5rem, 19.5vw, 20rem);                   /* 72–320px, footer word (decorative) */
  --xv-size-display:  clamp(2.625rem, 1.87rem + 4.02vw, 6.875rem);    /* 42–110px, home H1 */
  --xv-size-h1:       clamp(2.375rem, 1.584rem + 4.24vw, 6.5rem);     /* 38–104px, inner-page H1 */
  --xv-size-h1-article: clamp(2.375rem, 1.73rem + 3.28vw, 5.25rem);   /* 38–84px, article H1 */
  --xv-size-h2-section: clamp(2.25rem, 1.55rem + 2.98vw, 4.875rem);   /* 36–78px, section heading */
  --xv-size-h2:       clamp(2rem, 1.49rem + 2.64vw, 4.25rem);         /* 32–68px, other H2 */
  --xv-size-h2-article: clamp(1.875rem, 3vw, 2.875rem);               /* 30–46px */
  --xv-size-h3-display: clamp(1.625rem, 2.5vw, 2.625rem);             /* 26–42px, case title, process stage */
  --xv-size-h3-row:   clamp(1.375rem, 2vw, 1.875rem);                 /* 22–30px, function rows, FAQ question */
  --xv-size-h3:       clamp(1.25rem, 1.55vw, 1.5625rem);              /* 20–25px, card title */
  --xv-size-menu-row: 1.5rem;     /* 24px, mobile menu rows */
  --xv-size-lead:     clamp(1.125rem, 1.4vw, 1.375rem);               /* 18–22px */
  --xv-size-body-long: 1.125rem;  /* 18px, article body */
  --xv-size-h4:       1.125rem;   /* 18px */
  --xv-size-body:     clamp(1rem, .95rem + .2vw, 1.0625rem);          /* 16–17px */
  --xv-size-ui:       .9375rem;   /* 15px: buttons, nav, text links */
  --xv-size-small:    .875rem;    /* 14px: breadcrumbs, filters, header CTA, numbers */
  --xv-size-label:    .8125rem;   /* 13px: eyebrow, captions. Floor for any real text (CHANGED: v3 had 12px) */
  --xv-size-diagram:  .6875rem;   /* 11px: SVG diagram labels, aria-hidden only */

  --xv-leading-word: .78;
  --xv-leading-display: .94;
  --xv-leading-heading: 1;      /* v3 .97/.98/1/1.02 */
  --xv-leading-heading-diacritic: 1.04; /* CHANGED (new): H1/H2 on :lang(et), :lang(fi) */
  --xv-leading-title: 1.08;
  --xv-leading-ui: 1.2;         /* v3 1.2/1.22 */
  --xv-leading-label: 1.3;
  --xv-leading-lead: 1.58;
  --xv-leading-body: 1.62;
  --xv-leading-long: 1.72;

  --xv-tracking-word: -.055em;
  --xv-tracking-display: -.05em;  /* v3 -.05/-.048/-.045 */
  --xv-tracking-h2: -.04em;       /* v3 -.04/-.038 */
  --xv-tracking-h3: -.03em;       /* v3 -.032/-.03/-.025/-.022 */
  --xv-tracking-title: -.018em;   /* v3 -.02/-.018 */
  --xv-tracking-snug: -.01em;     /* v3 -.01/-.005 */
  --xv-tracking-number: .02em;
  --xv-tracking-caps: .09em;
  --xv-tracking-wordmark: .16em;

  /* --- space: 4px base --- */
  --xv-space-1: 4px;
  --xv-space-2: 8px;
  --xv-space-3: 12px;
  --xv-space-4: 16px;
  --xv-space-5: 20px;
  --xv-space-6: 24px;
  --xv-space-7: 28px;
  --xv-space-8: 32px;
  --xv-space-10: 40px;
  --xv-space-12: 48px;
  --xv-space-14: 56px;
  --xv-space-18: 72px;
  --xv-space-22: 88px;
  --xv-space-26: 104px;
  /* fluid, from v3 */
  --xv-space-gutter: clamp(16px, 4vw, 56px);
  --xv-space-section: clamp(88px, 11vh, 148px);
  --xv-space-heading: clamp(40px, 5vw, 72px);     /* section heading to content */
  --xv-space-card: clamp(26px, 2.4vw, 36px);      /* card padding */
  --xv-space-card-sm: clamp(22px, 2vw, 30px);
  --xv-space-row: clamp(28px, 3vw, 44px);         /* case-list row padding */
  --xv-space-hero-end: clamp(48px, 9vh, 104px);   /* hero bottom padding */

  /* --- layout --- */
  --xv-wrap-max: 1320px;
  --xv-wrap: min(var(--xv-wrap-max), calc(100% - 2 * var(--xv-space-gutter)));
  --xv-measure: 62ch;          /* lead and body line length */
  --xv-measure-long: 68ch;     /* article */
  --xv-header-height: 76px;

  /* --- radius --- */
  --xv-radius-xs: 2px;     /* bars, underline caps */
  --xv-radius-focus: 6px;  /* focus outline */
  --xv-radius-sm: 8px;
  --xv-radius-md: 12px;    /* inputs, icon chips, menu rows, inner images (v3 12/14/16 -> 12 or 14) */
  --xv-radius-base: 14px;
  --xv-radius-lg: 22px;    /* cards, panels, dialogs (v3 20/22) */
  --xv-radius-pill: 999px; /* buttons, chips, filters */

  /* --- elevation (shadows are state or overlay, never decoration at rest) --- */
  --xv-shadow-overlay: 0 30px 80px -20px rgba(0, 0, 0, .7);        /* menus, dialogs, floating preview */
  --xv-shadow-raise-ink: 0 24px 60px -30px rgba(0, 0, 0, .9);      /* card hover on ink */
  --xv-shadow-raise-paper: 0 24px 48px -30px rgba(10, 13, 12, .35);/* card hover on paper */
  --xv-shadow-stack: 0 -18px 40px -30px rgba(10, 13, 12, .35);     /* process cards stacking */
  --xv-shadow-screen: 0 30px 80px -40px rgba(0, 0, 0, .8);         /* product screenshot frame */
  --xv-shadow-paper: 0 18px 40px -26px rgba(10, 13, 12, .4);       /* document inside an illustration */

  /* --- motion --- */
  --xv-ease-out: cubic-bezier(.22, 1, .36, 1);
  --xv-ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --xv-duration-press: 80ms;   /* :active scale */
  --xv-duration-fast: 200ms;   /* colour and border changes */
  --xv-duration-base: 300ms;   /* small movement: arrows, lifts (v3 .25/.3/.35) */
  --xv-duration-slow: 550ms;   /* row fills, menu open (v3 .4/.45/.55/.6) */
  --xv-duration-reveal: 900ms; /* image zoom, one-shot reveals (v3 .7/.9) */
  --xv-duration-draw: 1400ms;  /* hero mark draw-in, once (v3 1.1/1.4) */
  --xv-duration-loop: 3200ms;  /* card diagram cycle */

  /* --- targets and layers --- */
  --xv-target-min: 24px;       /* WCAG 2.2 SC 2.5.8 */
  --xv-target-touch: 44px;     /* (pointer: coarse) */
  --xv-z-float: 60;
  --xv-z-header: 100;
  --xv-z-cookie: 200;
  --xv-z-skip: 300;
}

/* ======================================================================= LAYER 2: SEMANTIC */
/* Ink tone (default) */
:root, .xv-tone-ink {
  --xv-bg: var(--xv-ink-950);
  --xv-surface: var(--xv-ink-900);
  --xv-surface-2: var(--xv-ink-850);
  --xv-text: var(--xv-bone-100);
  --xv-text-soft: var(--xv-stone-100);
  --xv-text-muted: var(--xv-stone-200);
  --xv-text-caption: var(--xv-stone-200);
  --xv-line: var(--xv-ink-800);              /* decorative dividers and card edges */
  --xv-border-control: var(--xv-stone-500);  /* CHANGED (new): input/select/checkbox edges, >= 3:1 */
  --xv-accent: var(--xv-green-400);          /* icons, numbers, link underline, active marks */
  --xv-fill: var(--xv-green-400);            /* primary action */
  --xv-on-fill: var(--xv-ink-950);
  --xv-fill-hover: var(--xv-green-300);      /* CHANGED: v3 kept the same colour on hover */
  --xv-tonal: var(--xv-green-a10);
  --xv-tonal-hover: var(--xv-green-a18);
  --xv-focus: var(--xv-green-400);
  --xv-focus-halo: var(--xv-green-a22);
  --xv-error: var(--xv-red-300);
  --xv-success: var(--xv-green-400);
  --xv-disabled-text: var(--xv-stone-500);
  --xv-disabled-bg: var(--xv-ink-850);
  --xv-selection-bg: var(--xv-green-400);
  --xv-selection-text: var(--xv-ink-950);
  --xv-shadow-raise: var(--xv-shadow-raise-ink);
  color-scheme: dark;
}

/* Paper tone */
.xv-tone-paper {
  --xv-bg: var(--xv-bone-100);
  --xv-surface: var(--xv-bone-50);
  --xv-surface-2: var(--xv-bone-200);
  --xv-text: var(--xv-ink-950);
  --xv-text-soft: var(--xv-stone-800);
  --xv-text-muted: var(--xv-stone-700);
  --xv-text-caption: var(--xv-stone-600);
  --xv-line: var(--xv-bone-300);
  --xv-border-control: var(--xv-stone-500);
  --xv-accent: var(--xv-green-700);
  --xv-fill: var(--xv-ink-950);
  --xv-on-fill: var(--xv-bone-100);
  --xv-fill-hover: var(--xv-ink-850);
  --xv-tonal: var(--xv-ink-a06);
  --xv-tonal-hover: var(--xv-ink-a11);
  --xv-focus: var(--xv-green-700);
  --xv-focus-halo: var(--xv-green-700-a22);
  --xv-error: var(--xv-red-700);
  --xv-success: var(--xv-green-700);
  --xv-disabled-text: var(--xv-stone-500);
  --xv-disabled-bg: var(--xv-bone-200);
  --xv-selection-bg: var(--xv-ink-950);
  --xv-selection-text: var(--xv-bone-100);
  --xv-shadow-raise: var(--xv-shadow-raise-paper);
  color-scheme: light;
}

/* ======================================================================= LAYER 3: COMPONENT */
:root, .xv-tone-ink, .xv-tone-paper {
  /* focus (all interactive components) */
  --xv-focus-ring-color: var(--xv-focus);
  --xv-focus-ring-width: 2px;
  --xv-focus-ring-offset: 4px;

  /* buttons */
  --xv-button-height: 48px;
  --xv-button-height-sm: 42px;             /* header CTA */
  --xv-button-padding: 13px 22px 13px 24px;
  --xv-button-radius: var(--xv-radius-pill);
  --xv-button-primary-bg: var(--xv-fill);
  --xv-button-primary-text: var(--xv-on-fill);
  --xv-button-primary-bg-hover: var(--xv-fill-hover);
  --xv-button-secondary-bg: var(--xv-tonal);
  --xv-button-secondary-text: var(--xv-text);
  --xv-button-secondary-bg-hover: var(--xv-tonal-hover);
  --xv-button-brand-bg: var(--xv-green-400);  /* the hero CTA keeps Xerovi green in both tones */
  --xv-button-brand-text: var(--xv-ink-950);
  --xv-button-brand-bg-hover: var(--xv-green-300);
  --xv-button-disabled-bg: var(--xv-disabled-bg);
  --xv-button-disabled-text: var(--xv-disabled-text);

  /* links */
  --xv-link-text: var(--xv-text);
  --xv-link-icon: var(--xv-accent);
  --xv-link-underline: var(--xv-accent);
  --xv-link-underline-thickness: 2px;
  --xv-link-underline-offset: 4px;

  /* cards (offer panel, insight, sector, application) */
  --xv-card-bg: var(--xv-surface);
  --xv-card-border: var(--xv-line);
  --xv-card-radius: var(--xv-radius-lg);
  --xv-card-padding: var(--xv-space-card);
  --xv-card-title-text: var(--xv-text);
  --xv-card-body-text: var(--xv-text-soft);
  --xv-card-index-bg: var(--xv-tonal);
  --xv-card-index-text: var(--xv-text);
  --xv-card-diagram-bg: var(--xv-surface-2);

  /* proof strip (verified proof only, D9) */
  --xv-proof-bg: var(--xv-bg);
  --xv-proof-value-text: var(--xv-text);
  --xv-proof-label-text: var(--xv-text-muted);
  --xv-proof-divider: var(--xv-line);
  --xv-proof-status-bg: var(--xv-tonal);
  --xv-proof-status-text: var(--xv-text);

  /* case card (editorial list row) */
  --xv-case-number-text: var(--xv-text-muted);
  --xv-case-number-text-hover: var(--xv-text);
  --xv-case-eyebrow-text: var(--xv-text-muted);
  --xv-case-title-text: var(--xv-text);
  --xv-case-summary-text: var(--xv-text-muted);
  --xv-case-divider: var(--xv-line);
  --xv-case-image-radius: var(--xv-radius-md);

  /* product card ("Built by Xerovi") */
  --xv-product-bg: var(--xv-surface);
  --xv-product-stage-bg: var(--xv-bone-200);    /* the stage is always light */
  --xv-product-window-title-text: var(--xv-stone-600);
  --xv-product-caption-text: var(--xv-stone-600);
  --xv-product-badge-bg: var(--xv-ink-950);
  --xv-product-badge-text: var(--xv-bone-100);
  --xv-product-evidence-bg: var(--xv-green-50);
  --xv-product-evidence-text: var(--xv-green-800);
  --xv-product-evidence-border: var(--xv-green-600);
  --xv-product-paper-bg: var(--xv-white);
  --xv-product-paper-text: var(--xv-ink-950);
  --xv-product-paper-muted: var(--xv-stone-700);

  /* FAQ / disclosure */
  --xv-faq-divider: var(--xv-line);
  --xv-faq-question-text: var(--xv-text);
  --xv-faq-answer-text: var(--xv-text-muted);
  --xv-faq-icon-bg: var(--xv-tonal);
  --xv-faq-icon-bg-hover: var(--xv-tonal-hover);
  --xv-faq-icon-text: var(--xv-text);
  --xv-faq-icon-bg-open: var(--xv-fill);
  --xv-faq-icon-text-open: var(--xv-on-fill);

  /* enquiry form */
  --xv-form-bg: var(--xv-surface);
  --xv-form-border: var(--xv-line);
  --xv-field-bg: var(--xv-bg);
  --xv-field-text: var(--xv-text);
  --xv-field-border: var(--xv-border-control);
  --xv-field-border-hover: var(--xv-text-muted);
  --xv-field-border-focus: var(--xv-focus);
  --xv-field-placeholder: var(--xv-text-muted);
  --xv-field-label: var(--xv-text);
  --xv-field-help: var(--xv-text-muted);
  --xv-field-error: var(--xv-error);
  --xv-field-border-error: var(--xv-error);
  --xv-field-disabled-bg: var(--xv-disabled-bg);
  --xv-field-disabled-text: var(--xv-disabled-text);
  --xv-field-height: 50px;
  --xv-field-radius: var(--xv-radius-md);
  --xv-form-status-success: var(--xv-success);

  /* breadcrumbs */
  --xv-breadcrumb-text: var(--xv-text-muted);
  --xv-breadcrumb-text-hover: var(--xv-text);
  --xv-breadcrumb-current: var(--xv-text);

  /* filters and tabs */
  --xv-chip-border: var(--xv-border-control);
  --xv-chip-text: var(--xv-text);
  --xv-chip-bg-hover: var(--xv-tonal);
  --xv-chip-bg-selected: var(--xv-fill);
  --xv-chip-text-selected: var(--xv-on-fill);

  /* tables */
  --xv-table-head-bg: var(--xv-surface-2);
  --xv-table-head-text: var(--xv-text);
  --xv-table-border: var(--xv-line);
}

/* Fixed-tone components: always ink, whatever section they sit over. */
:root, .xv-tone-ink, .xv-tone-paper {
  /* header and services mega menu */
  --xv-header-bg-solid: var(--xv-ink-a94);
  --xv-header-text: var(--xv-bone-100);
  --xv-header-border: var(--xv-ink-800);
  --xv-header-current-mark: var(--xv-green-400);
  --xv-menu-bg: var(--xv-ink-900);
  --xv-menu-border: var(--xv-ink-800);
  --xv-menu-row-bg-hover: var(--xv-ink-850);
  --xv-menu-heading-text: var(--xv-green-400);   /* pillar names */
  --xv-menu-title-text: var(--xv-bone-100);
  --xv-menu-desc-text: var(--xv-stone-200);       /* CHANGED: v3 #9aa39e, merged into stone-200 */
  --xv-menu-tile-bg: var(--xv-green-a10);         /* "Not sure? Book a call" tile */
  --xv-menu-tile-text: var(--xv-bone-100);
  --xv-mobile-menu-bg: var(--xv-ink-950);
  --xv-mobile-menu-text: var(--xv-bone-100);
  --xv-mobile-menu-divider: var(--xv-ink-800);
  --xv-skip-bg: var(--xv-green-400);
  --xv-skip-text: var(--xv-ink-950);

  /* language switcher (header and footer; for /et/ and /fi/) */
  --xv-lang-text: var(--xv-stone-200);
  --xv-lang-text-hover: var(--xv-bone-100);
  --xv-lang-current-text: var(--xv-bone-100);
  --xv-lang-current-mark: var(--xv-green-400);

  /* hero */
  --xv-hero-bg: var(--xv-ink-950);
  --xv-hero-text: var(--xv-bone-100);
  --xv-hero-lead: var(--xv-stone-100);
  --xv-hero-scrim: linear-gradient(90deg, rgba(10, 13, 12, .7) 0%, rgba(10, 13, 12, .2) 46%, rgba(10, 13, 12, 0) 70%);
  --xv-hero-chip-bg: var(--xv-ink-900);
  --xv-hero-chip-text: var(--xv-bone-100);
  --xv-hero-chip-text-pending: var(--xv-stone-200);
  --xv-hero-wire: var(--xv-bone-a30);

  /* cookie banner and dialog */
  --xv-cookie-bg: var(--xv-ink-900);
  --xv-cookie-border: var(--xv-ink-800);
  --xv-cookie-text: var(--xv-bone-100);
  --xv-cookie-muted: var(--xv-stone-200);
  --xv-cookie-backdrop: var(--xv-ink-a40);
  /* CHANGED from v3 and live: "Allow analytics" and "Essential only" get the same style (equal weight) */
  --xv-cookie-choice-bg: var(--xv-bone-a08);
  --xv-cookie-choice-bg-hover: var(--xv-bone-a14);
  --xv-cookie-choice-text: var(--xv-bone-100);
  --xv-cookie-choice-border: var(--xv-stone-500);

  /* footer */
  --xv-footer-bg: var(--xv-ink-950);
  --xv-footer-border: var(--xv-ink-800);
  --xv-footer-text: var(--xv-bone-100);
  --xv-footer-muted: var(--xv-stone-200);
  --xv-footer-icon: var(--xv-green-400);
  --xv-footer-control-text: var(--xv-stone-200);      /* Pause motion, Cookie preferences */
  --xv-footer-control-text-hover: var(--xv-bone-100);
}

/* Long words and diacritics (Estonian, Finnish). CHANGED (new); see DESIGN.md Typography. */
:lang(et) :is(h1, h2), :lang(fi) :is(h1, h2) { line-height: var(--xv-leading-heading-diacritic); }

/* @pairs: every pair checked by 08-qa/S5/contrast.py.
   Columns: tone | foreground | background[@base] | kind | label
   tone: ink or paper (the tone class the pair is resolved in).
   background@base: an alpha background is composited over base (default: --xv-bg of the tone).
   kind: text 4.5:1 | large 3:1 (>= 24px, or >= 18.66px bold) | ui 3:1 (component edges, icons,
   focus rings, state marks) | inactive 3:1 (disabled: WCAG exempts it; we hold it to 3:1 anyway) |
   decor (reported, not gated: aria-hidden art).
@pair ink   | --xv-text | --xv-bg | text | body and headings on ink
@pair ink   | --xv-text-soft | --xv-bg | text | lead text on ink
@pair ink   | --xv-text-muted | --xv-bg | text | muted text on ink
@pair ink   | --xv-text-muted | --xv-surface-2 | text | muted text on second surface (worst ink case)
@pair ink   | --xv-text-caption | --xv-surface | text | caption on card
@pair ink   | --xv-accent | --xv-bg | text | accent text (numbers, th) on ink
@pair ink   | --xv-accent | --xv-surface-2 | text | accent on second surface
@pair ink   | --xv-error | --xv-surface | text | error message in form card
@pair ink   | --xv-error | --xv-bg | text | error message on page
@pair ink   | --xv-success | --xv-surface | text | success status in form card
@pair ink   | --xv-selection-text | --xv-selection-bg | text | text selection
@pair ink   | --xv-focus-ring-color | --xv-bg | ui | focus ring on page
@pair ink   | --xv-focus-ring-color | --xv-surface-2 | ui | focus ring on second surface
@pair ink   | --xv-border-control | --xv-surface | ui | field edge against form card
@pair ink   | --xv-border-control | --xv-bg | ui | field edge against field fill
@pair ink   | --xv-disabled-text | --xv-disabled-bg | inactive | disabled control text
@pair ink   | --xv-button-primary-text | --xv-button-primary-bg | text | primary button
@pair ink   | --xv-button-primary-text | --xv-button-primary-bg-hover | text | primary button hover
@pair ink   | --xv-button-secondary-text | --xv-button-secondary-bg | text | secondary button
@pair ink   | --xv-button-secondary-text | --xv-button-secondary-bg-hover | text | secondary button hover
@pair ink   | --xv-button-secondary-text | --xv-button-secondary-bg@--xv-surface | text | secondary button on card
@pair ink   | --xv-button-brand-text | --xv-button-brand-bg | text | brand (hero) button
@pair ink   | --xv-button-brand-text | --xv-button-brand-bg-hover | text | brand button hover
@pair ink   | --xv-button-disabled-text | --xv-button-disabled-bg | inactive | disabled button
@pair ink   | --xv-button-primary-bg | --xv-bg | ui | primary button edge on page
@pair ink   | --xv-link-text | --xv-bg | text | text link
@pair ink   | --xv-link-icon | --xv-bg | ui | text-link arrow
@pair ink   | --xv-link-underline | --xv-bg | ui | inline link underline
@pair ink   | --xv-card-title-text | --xv-card-bg | text | card title
@pair ink   | --xv-card-body-text | --xv-card-bg | text | card body
@pair ink   | --xv-card-index-text | --xv-card-index-bg@--xv-card-bg | text | card number chip
@pair ink   | --xv-accent | --xv-card-diagram-bg | ui | diagram key strokes
@pair ink   | --xv-proof-value-text | --xv-proof-bg | text | proof value
@pair ink   | --xv-proof-label-text | --xv-proof-bg | text | proof label
@pair ink   | --xv-proof-status-text | --xv-proof-status-bg | text | proof status chip
@pair ink   | --xv-case-number-text | --xv-bg | text | case number
@pair ink   | --xv-case-number-text-hover | --xv-bg | text | case number hover
@pair ink   | --xv-case-eyebrow-text | --xv-bg | text | case eyebrow
@pair ink   | --xv-case-title-text | --xv-bg | text | case title
@pair ink   | --xv-case-summary-text | --xv-bg | text | case summary
@pair ink   | --xv-faq-question-text | --xv-bg | text | FAQ question
@pair ink   | --xv-faq-answer-text | --xv-bg | text | FAQ answer
@pair ink   | --xv-faq-icon-text | --xv-faq-icon-bg | ui | FAQ plus icon
@pair ink   | --xv-faq-icon-text | --xv-faq-icon-bg-hover | ui | FAQ plus icon hover
@pair ink   | --xv-faq-icon-text-open | --xv-faq-icon-bg-open | ui | FAQ icon open
@pair ink   | --xv-faq-icon-bg-open | --xv-bg | ui | FAQ open state mark on page
@pair ink   | --xv-field-text | --xv-field-bg | text | field value
@pair ink   | --xv-field-placeholder | --xv-field-bg | text | placeholder
@pair ink   | --xv-field-label | --xv-form-bg | text | field label
@pair ink   | --xv-field-help | --xv-form-bg | text | field help
@pair ink   | --xv-field-error | --xv-form-bg | text | field error message
@pair ink   | --xv-field-border | --xv-form-bg | ui | field edge
@pair ink   | --xv-field-border-hover | --xv-form-bg | ui | field edge hover
@pair ink   | --xv-field-border-focus | --xv-form-bg | ui | field edge focus
@pair ink   | --xv-field-border-error | --xv-form-bg | ui | field edge error
@pair ink   | --xv-field-disabled-text | --xv-field-disabled-bg | inactive | disabled field
@pair ink   | --xv-form-status-success | --xv-form-bg | text | form success status
@pair ink   | --xv-breadcrumb-text | --xv-bg | text | breadcrumb link
@pair ink   | --xv-breadcrumb-text-hover | --xv-bg | text | breadcrumb hover
@pair ink   | --xv-breadcrumb-current | --xv-bg | text | breadcrumb current
@pair ink   | --xv-chip-text | --xv-bg | text | filter chip
@pair ink   | --xv-chip-text | --xv-chip-bg-hover | text | filter chip hover
@pair ink   | --xv-chip-text-selected | --xv-chip-bg-selected | text | filter chip selected
@pair ink   | --xv-chip-border | --xv-bg | ui | filter chip edge
@pair ink   | --xv-chip-bg-selected | --xv-bg | ui | selected chip vs page
@pair ink   | --xv-table-head-text | --xv-table-head-bg | text | table header
@pair ink   | --xv-header-text | --xv-header-bg-solid@--xv-bone-100 | text | header nav, solid bar over a paper band
@pair ink   | --xv-header-text | --xv-hero-bg | text | header nav, transparent bar over hero
@pair ink   | --xv-header-current-mark | --xv-hero-bg | ui | current-page bar
@pair ink   | --xv-menu-heading-text | --xv-menu-bg | text | mega menu pillar heading
@pair ink   | --xv-menu-title-text | --xv-menu-row-bg-hover | text | mega menu row hover
@pair ink   | --xv-menu-desc-text | --xv-menu-bg | text | mega menu description
@pair ink   | --xv-menu-desc-text | --xv-menu-row-bg-hover | text | mega menu description hover
@pair ink   | --xv-menu-tile-text | --xv-menu-tile-bg@--xv-menu-bg | text | "Not sure?" tile
@pair ink   | --xv-mobile-menu-text | --xv-mobile-menu-bg | text | mobile menu row
@pair ink   | --xv-skip-text | --xv-skip-bg | text | skip link
@pair ink   | --xv-lang-text | --xv-hero-bg | text | language switcher
@pair ink   | --xv-lang-text-hover | --xv-hero-bg | text | language switcher hover
@pair ink   | --xv-lang-current-text | --xv-hero-bg | text | language switcher current
@pair ink   | --xv-lang-current-mark | --xv-hero-bg | ui | language current mark
@pair ink   | --xv-lang-text | --xv-menu-bg | text | language switcher in mobile menu card
@pair ink   | --xv-hero-text | --xv-hero-bg | large | hero H1
@pair ink   | --xv-hero-lead | --xv-hero-bg | text | hero lead
@pair ink   | --xv-hero-chip-text | --xv-hero-chip-bg | decor | junction chip label
@pair ink   | --xv-hero-chip-text-pending | --xv-hero-chip-bg | decor | junction chip pending
@pair ink   | --xv-hero-wire | --xv-hero-bg | decor | junction wire
@pair ink   | --xv-ink-700 | --xv-hero-chip-bg | decor | junction off-state dot
@pair ink   | --xv-cookie-text | --xv-cookie-bg | text | cookie text
@pair ink   | --xv-cookie-muted | --xv-cookie-bg | text | cookie small print
@pair ink   | --xv-cookie-choice-text | --xv-cookie-choice-bg@--xv-cookie-bg | text | cookie choice button (both choices)
@pair ink   | --xv-cookie-choice-text | --xv-cookie-choice-bg-hover@--xv-cookie-bg | text | cookie choice hover
@pair ink   | --xv-cookie-choice-border | --xv-cookie-bg | ui | cookie choice button edge
@pair ink   | --xv-cookie-border | --xv-bone-100 | decor | cookie edge over a paper band (edge comes from the dark fill)
@pair ink   | --xv-cookie-bg | --xv-bone-100 | ui | cookie banner against a paper band
@pair ink   | --xv-footer-text | --xv-footer-bg | text | footer links
@pair ink   | --xv-footer-muted | --xv-footer-bg | text | footer small print
@pair ink   | --xv-footer-icon | --xv-footer-bg | ui | footer link arrows
@pair ink   | --xv-footer-control-text | --xv-footer-bg | text | Pause motion, Cookie preferences
@pair ink   | --xv-footer-control-text-hover | --xv-footer-bg | text | footer controls hover
@pair paper | --xv-text | --xv-bg | text | body and headings on paper
@pair paper | --xv-text-soft | --xv-bg | text | soft text on paper
@pair paper | --xv-text-soft | --xv-surface | text | soft text on card
@pair paper | --xv-text-muted | --xv-bg | text | muted text on paper
@pair paper | --xv-text-muted | --xv-surface-2 | text | muted on second surface (worst paper case)
@pair paper | --xv-text-caption | --xv-surface-2 | text | caption on second surface
@pair paper | --xv-accent | --xv-bg | text | accent text on paper
@pair paper | --xv-accent | --xv-surface | text | accent on card
@pair paper | --xv-accent | --xv-surface-2 | text | accent on second surface (failed in v3: 4.37)
@pair paper | --xv-error | --xv-bg | text | error on paper
@pair paper | --xv-error | --xv-surface | text | error in form card
@pair paper | --xv-error | --xv-surface-2 | text | error on second surface
@pair paper | --xv-success | --xv-surface | text | success in form card
@pair paper | --xv-selection-text | --xv-selection-bg | text | text selection
@pair paper | --xv-focus-ring-color | --xv-bg | ui | focus ring on paper
@pair paper | --xv-focus-ring-color | --xv-surface-2 | ui | focus ring on second surface
@pair paper | --xv-border-control | --xv-surface | ui | field edge against form card
@pair paper | --xv-border-control | --xv-bg | ui | field edge against field fill
@pair paper | --xv-border-control | --xv-surface-2 | ui | control edge on second surface
@pair paper | --xv-disabled-text | --xv-disabled-bg | inactive | disabled control
@pair paper | --xv-button-primary-text | --xv-button-primary-bg | text | primary button (ink fill)
@pair paper | --xv-button-primary-text | --xv-button-primary-bg-hover | text | primary button hover
@pair paper | --xv-button-secondary-text | --xv-button-secondary-bg | text | secondary button
@pair paper | --xv-button-secondary-text | --xv-button-secondary-bg-hover | text | secondary button hover
@pair paper | --xv-button-brand-text | --xv-button-brand-bg | text | brand button on paper
@pair paper | --xv-button-disabled-text | --xv-button-disabled-bg | inactive | disabled button
@pair paper | --xv-button-primary-bg | --xv-bg | ui | primary button edge on paper
@pair paper | --xv-link-text | --xv-bg | text | text link
@pair paper | --xv-link-icon | --xv-bg | ui | text-link arrow
@pair paper | --xv-link-underline | --xv-bg | ui | inline link underline
@pair paper | --xv-card-title-text | --xv-card-bg | text | card title
@pair paper | --xv-card-body-text | --xv-card-bg | text | card body
@pair paper | --xv-card-index-text | --xv-card-index-bg@--xv-card-bg | text | card number chip
@pair paper | --xv-accent | --xv-card-diagram-bg | ui | diagram key strokes
@pair paper | --xv-proof-value-text | --xv-proof-bg | text | proof value
@pair paper | --xv-proof-label-text | --xv-proof-bg | text | proof label
@pair paper | --xv-proof-status-text | --xv-proof-status-bg | text | proof status chip
@pair paper | --xv-case-number-text | --xv-bg | text | case number
@pair paper | --xv-case-eyebrow-text | --xv-bg | text | case eyebrow
@pair paper | --xv-case-title-text | --xv-bg | text | case title
@pair paper | --xv-case-summary-text | --xv-bg | text | case summary
@pair paper | --xv-product-window-title-text | --xv-product-stage-bg | text | product window title (failed in v3: 4.03)
@pair paper | --xv-product-caption-text | --xv-product-stage-bg | text | product caption
@pair paper | --xv-product-badge-text | --xv-product-badge-bg | text | screenshot link badge
@pair paper | --xv-product-evidence-text | --xv-product-evidence-bg | text | linked-evidence chip
@pair paper | --xv-product-evidence-border | --xv-product-paper-bg | decor | linked-evidence chip edge (illustration)
@pair paper | --xv-product-paper-text | --xv-product-paper-bg | text | document text in illustration
@pair paper | --xv-product-paper-muted | --xv-product-paper-bg | text | document muted text
@pair paper | --xv-product-paper-text | --xv-bone-150 | text | spreadsheet cell
@pair paper | --xv-bone-400 | --xv-product-stage-bg | decor | window-chrome dots
@pair ink   | --xv-product-window-title-text | --xv-product-stage-bg | text | product window title, card on ink
@pair ink   | --xv-product-caption-text | --xv-product-stage-bg | text | product caption, card on ink
@pair ink   | --xv-product-stage-bg | --xv-product-bg | decor | light stage inside ink card
@pair paper | --xv-faq-question-text | --xv-bg | text | FAQ question
@pair paper | --xv-faq-answer-text | --xv-bg | text | FAQ answer
@pair paper | --xv-faq-icon-text | --xv-faq-icon-bg | ui | FAQ plus icon
@pair paper | --xv-faq-icon-text | --xv-faq-icon-bg-hover | ui | FAQ icon hover
@pair paper | --xv-faq-icon-text-open | --xv-faq-icon-bg-open | ui | FAQ icon open
@pair paper | --xv-faq-icon-bg-open | --xv-bg | ui | FAQ open state mark on page
@pair paper | --xv-field-text | --xv-field-bg | text | field value
@pair paper | --xv-field-placeholder | --xv-field-bg | text | placeholder
@pair paper | --xv-field-label | --xv-form-bg | text | field label
@pair paper | --xv-field-help | --xv-form-bg | text | field help
@pair paper | --xv-field-error | --xv-form-bg | text | field error message
@pair paper | --xv-field-border | --xv-form-bg | ui | field edge
@pair paper | --xv-field-border-hover | --xv-form-bg | ui | field edge hover
@pair paper | --xv-field-border-focus | --xv-form-bg | ui | field edge focus
@pair paper | --xv-field-border-error | --xv-form-bg | ui | field edge error
@pair paper | --xv-field-disabled-text | --xv-field-disabled-bg | inactive | disabled field
@pair paper | --xv-form-status-success | --xv-form-bg | text | form success status
@pair paper | --xv-breadcrumb-text | --xv-bg | text | breadcrumb on paper (pages without a hero)
@pair paper | --xv-breadcrumb-current | --xv-bg | text | breadcrumb current
@pair paper | --xv-chip-text | --xv-bg | text | filter chip
@pair paper | --xv-chip-text | --xv-chip-bg-hover | text | filter chip hover
@pair paper | --xv-chip-text-selected | --xv-chip-bg-selected | text | filter chip selected
@pair paper | --xv-chip-border | --xv-bg | ui | filter chip edge
@pair paper | --xv-chip-bg-selected | --xv-bg | ui | selected chip vs page
@pair paper | --xv-table-head-text | --xv-table-head-bg | text | table header
@pair paper | --xv-table-head-text | --xv-bg | text | table cell

   Decorative tokens: hairlines that only group content. No component relies on them to be seen
   (WCAG 1.4.11 needs 3:1 only for the visual information required to identify a control or state).
   A control edge must use --xv-border-control instead.
@decor --xv-line | semantic hairline, 1.3-1.4:1 by design
@decor --xv-card-border | card edge; the card's text and link identify it
@decor --xv-case-divider | rule between case rows
@decor --xv-faq-divider | rule between questions; the question text and icon identify the control
@decor --xv-proof-divider | rule between proof items
@decor --xv-table-border | table rules
@decor --xv-form-border | edge of the form card (the fields carry --xv-field-border)
@decor --xv-header-border | rule under the solid header
@decor --xv-menu-border | edge of the mega menu panel (the panel fill and shadow separate it)
@decor --xv-mobile-menu-divider | rules between mobile menu rows
@decor --xv-footer-border | rule above the footer
@decor --xv-focus-halo | soft halo added to a field's focus edge; the 3:1 edge is --xv-field-border-focus
@decor --xv-cookie-backdrop | dims the page behind the preferences dialog
*/
