/* ==========================================================================
   HuisPing design tokens - the single source for the whole site.
   Loaded from base.html for EVERY page, immediately after app.css so these
   values win over app.css's retired cream/terracotta :root block.

   This block used to live in landing.css, which base.html loads only on the
   homepage. That is why the signed-in pages (zoekprofielen, nieuw profiel,
   instellingen) still rendered with the retired palette and type stack while the homepage
   and the shared header rendered on #ffffff in system-ui: same markup, same
   plain.css rules, different tokens underneath. Owner, 2026-08-09: "make sure
   that every page from now on uses the updated styling".

   Authority: docs/planning/2026-08-07-redesign-direction.md and the approved
   mockups in docs/design/2026-08-07-redesign-mockups/ (index.html for the
   homepage, app-shell.html for the signed-in pages - both built on these exact
   tokens). Change a value here and it changes everywhere, which is the point.
   ========================================================================== */

:root {
  /* Colour · direction §2.3: the complete palette. Nothing else is a colour. */
  --brand: #256f56;
  --brand-deep: #1b5642;
  --brand-wash: #e9f2ee;
  --graphite: #14181b;
  --graphite-2: #1f262a;
  --ink: #16191c;
  --ink-soft: #4a5157;
  /* Muted text carries the small labels and meta lines. #6e777d measured 4.21:1 on
     --paper-2 and 4.0:1 on --brand-wash, under the 4.5:1 WCAG 2.2 AA asks of small text;
     this value gives 5.7:1 on white, 5.25:1 on --paper-2 and 4.98:1 on --brand-wash. */
  --ink-muted: #5f686e;
  --paper: #ffffff;
  --paper-2: #f4f6f7; /* cool gray (B>G>R), replaces every cream */
  --line: #e3e8ea;
  --line-strong: #c9d2d6;
  --danger: #a33a32; /* functional only; never in a marketing section */

  /* Values carried on graphite, measured against #14181B. */
  --on-dark: #ffffff;
  --on-dark-soft: rgba(255, 255, 255, 0.72);
  --on-dark-muted: rgba(255, 255, 255, 0.58);
  --on-dark-line: rgba(255, 255, 255, 0.12);
  /* A green that reads on graphite: --brand on #14181B is 2.96:1, this is 6.56:1 (5.63:1
     on --graphite-2). Use it for green numerals and marks on a dark ground, never --brand. */
  --brand-on-dark: #4aae8a;

  /* Values carried on the brand green (#256F56). White at 0.72 alpha measured 3.99:1 there;
     0.88 gives 5.09:1. */
  --on-brand: #ffffff;
  --on-brand-soft: rgba(255, 255, 255, 0.88);

  /* The big step numerals ("01", "02") on a white ground: 3.54:1, the 3:1 large text asks. */
  --brand-numeral: #5c9380;

  --tp-green: #00b67a; /* permitted ONLY inside the Trustpilot lockup */

  /* Legacy app.css tokens, retired onto the new palette so nothing on this page
     can render the old cream/terracotta system. */
  --card: #ffffff;
  --brand-2: #1b5642;
  --brand-soft: #e9f2ee;
  --accent: #256f56;
  --accent-soft: #e9f2ee;
  --shadow: none;

  /* Type · §2.2: zero webfonts; `system-ui` leads (the named bug of the
     previous attempt was an Arial fallback for every non-Windows visitor). */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas,
    "Liberation Mono", monospace;

  /* Exactly two display sizes. 56px is the ceiling for the whole system. */
  --t-display: clamp(30px, 6vw, 56px);
  --t-section: clamp(26px, 3.4vw, 38px);

  --t-20: 20px;
  --t-17: 17px;
  --t-15: 15px;
  --t-13: 13px;
  --t-11: 11px;

  /* Spacing · 4px base, §2.4 */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --pad-block: clamp(72px, 9vw, 128px);
  --pad-inline: clamp(20px, 5vw, 64px);
  --measure: 1160px;

  --r-s: 8px;
  --r-m: 14px;
  --r-full: 999px;

  --shadow-desk: 0 24px 64px -32px rgba(20, 24, 27, 0.35); /* the only shadow */

  --nav-h: 64px;

  /* Motion · §2.6: one curve, one arrival duration. */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-arrive: 420ms;
  --t-hover: 120ms;

  /* Text selection · one explicit pair for the whole site (it used to be two rules in two
     stylesheets that merged into white text on a near-white highlight on the home page).
     A ::selection rule resolves these on the element whose text is selected, so a surface
     only redeclares the two values below. Text on the highlight needs 4.5:1; every pair here
     is measured, and tests/e2e/text-selection.spec.js recomputes them on the real pages.
       light ground: white on --brand            6.02:1
       dark or green ground: --graphite on wash  15.64:1 (and the highlight is 5.2:1 or more
                                                 against the ground, so it shows) */
  --selection-bg-base: var(--brand);
  --selection-ink-base: var(--on-brand);
  --selection-bg: var(--selection-bg-base);
  --selection-ink: var(--selection-ink-base);

  /* app.css sets the retired type stack and its OpenType features on :root. */
  font-family: var(--sans);
  font-feature-settings: normal;
}

/* The retired dark theme keeps its own pair (bright green, near-black text: 10.84:1). */
body[data-theme="dark"] {
  --selection-bg-base: #3ee089;
  --selection-ink-base: #0f1410;
  --selection-bg: #3ee089;
  --selection-ink: #0f1410;
}

/* Surfaces that carry light text on graphite or on the brand green. Selecting there gives a
   light highlight with graphite text: --brand on graphite is only 2.96:1, and on the green
   band the old highlight was the band itself. Descendants inherit the pair. */
.lp-section--dark,
.lp .desk,
.lp-footer,
.site-footer-min,
.lp .cta-band,
.btn-primary,
.lp .hero-cta,
.billing-banner .btn,
.match-filters-count,
.pilot-proof,
.pilot-checkpoint,
.pilot-final,
.pilot-button--primary,
.pilot-button--light,
.pilot-hero--market-feed .pilot-hero-artifact,
.pilot-hero--comparison-proof .pilot-hero-artifact,
.pilot-hero--arrival-photo,
.pilot-plan-compare__accent,
.guide-table thead th,
.guide-calculator__result,
.guide-checklist,
.market-proof,
.market-preview {
  --selection-bg: var(--brand-wash);
  --selection-ink: var(--graphite);
}

/* A light element inside one of those surfaces puts the default back (the white home cards
   on the landing desk included: they sit on the dark desk but are paper themselves). */
.pilot-final .pilot-button,
.lp .cta-band .btn-invert,
.lp .desk .ping,
.pilot-listings .ping {
  --selection-bg: var(--selection-bg-base);
  --selection-ink: var(--selection-ink-base);
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-ink);
  text-shadow: none;
}
