/* tokens.css: the design tokens shared by the website, the app and the legal pages.
   TO CHANGE THE LOOK: edit section 1 only. Everything else is worked out from it.
   - --t-brand is stamped from brand.json ("primaryColor") by scripts/apply-brand.mjs.
     Pick a colour dark enough for white text on it (contrast 4.5:1 or more).
   - Light and dark themes are both defined (light-dark()); set data-theme="light"|"dark" on <html> to force one.
   - Fonts: Inter (text) and Source Serif 4 (headings), both SIL Open Font Licence, served from fonts/ on this
     site, so nothing is fetched from another site.
   - THE LOOK: editorial and photo-led. Square corners, hairline rules, almost no shadow, colour used sparingly.
     No illustrations, no pills, no soft cards. See DESIGN.md in the project folder. */
@font-face{font-family:"Inter";src:url("fonts/inter-var.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Source Serif 4";src:url("fonts/source-serif-4-var.woff2") format("woff2");font-weight:200 900;font-style:normal;font-display:swap}
:root{
  color-scheme:light dark;

  /* ---------- 1. Brand: the only colours you need to change ---------- */
  --t-brand:#3B5BA9;   /* primary: bluebonnet blue. Buttons, links, the raised nav item */
  --t-accent-base:#BF5700;       /* accent: burnt orange. One highlight per screen */
  --t-delight-base:#D99A1E;      /* delight only: stars, sparkles, tiny highlights */
  --t-ink-base:#14181F;          /* text colour in the light theme (near black) */
  --t-night-base:#0E1116;        /* page background in the dark theme (neutral near black) */
  --t-paper-base:#FBFAF7;        /* page background in the light theme (off-white, barely warm) */
  /* Contrast, worked out (WCAG ratio): ink on paper 15.1, --t-ink-2 7.4, --t-ink-3 5.5 (5.0 on --t-surface-2);
     white on --t-primary 6.45; white on --t-accent 5.5, --t-accent text on paper 5.2.
     Dark: ink 15.4, --t-ink-2 9.8, --t-ink-3 6.6; --t-on-primary on --t-primary 6.95; --t-on-accent on --t-accent 6.4.
     If you change a colour above, re-check these (4.5 or more for text and buttons). */

  /* ---------- 2. Semantic colours (worked out from section 1) ---------- */
  --t-bg:light-dark(var(--t-paper-base),var(--t-night-base));
  --t-surface:light-dark(#FFFFFF,color-mix(in oklab,var(--t-night-base) 92%,white));
  --t-surface-2:light-dark(#F3F1EC,color-mix(in oklab,var(--t-night-base) 86%,white));   /* alternate bands, inputs */
  --t-surface-brand:light-dark(color-mix(in oklab,var(--t-brand) 8%,white),color-mix(in oklab,var(--t-brand) 16%,var(--t-night-base)));
  --t-ink:light-dark(var(--t-ink-base),#EEF1F6);
  --t-ink-2:light-dark(color-mix(in oklab,var(--t-ink-base) 75%,white),#B9C3D2);
  --t-ink-3:light-dark(color-mix(in oklab,var(--t-ink-base) 66%,white),#94A0B2);
  --t-line:light-dark(#E4E1DA,color-mix(in oklab,var(--t-night-base) 78%,white));
  --t-line-strong:light-dark(#C9C5BC,color-mix(in oklab,var(--t-night-base) 66%,white));
  --t-primary:light-dark(var(--t-brand),color-mix(in oklab,var(--t-brand) 55%,white));
  --t-primary-hover:light-dark(color-mix(in oklab,var(--t-brand) 82%,black),color-mix(in oklab,var(--t-brand) 42%,white));
  --t-primary-soft:light-dark(color-mix(in oklab,var(--t-brand) 10%,white),color-mix(in oklab,var(--t-brand) 24%,var(--t-night-base)));
  --t-on-primary:light-dark(#FFFFFF,var(--t-night-base));
  --t-accent:light-dark(color-mix(in oklab,var(--t-accent-base) 92%,black),color-mix(in oklab,var(--t-accent-base) 70%,white));
  --t-on-accent:light-dark(#FFFFFF,var(--t-night-base));
  --t-accent-soft:light-dark(color-mix(in oklab,var(--t-accent-base) 10%,white),color-mix(in oklab,var(--t-accent-base) 22%,var(--t-night-base)));
  --t-delight:light-dark(var(--t-delight-base),color-mix(in oklab,var(--t-delight-base) 70%,white));
  --t-focus:light-dark(var(--t-brand),color-mix(in oklab,var(--t-brand) 45%,white));
  --t-ok:light-dark(#15803D,#6EE7A0);
  --t-warn:light-dark(#B45309,#FBBF5C);
  --t-bad:light-dark(#B91C1C,#FCA5A5);
  /* the site footer is dark in both themes (in the dark theme, a step lighter than the page) */
  --t-footer-bg:light-dark(var(--t-ink-base),color-mix(in oklab,var(--t-night-base) 94%,white));
  --t-footer-ink:#EEF1F6;
  --t-footer-ink-2:#A9B3C1;
  --t-footer-line:rgba(238,241,246,.16);

  /* ---------- 3. Hues: RETIRED for decoration ----------
     Kept only so older markup still has a value. Do not use them for fills, tints, option cards or celebrations
     (DESIGN.md): selected states use --t-ink or --t-primary, and colour stays to blue and orange. */
  --t-red:light-dark(#C8323F,#F48A95);     --t-red-soft:light-dark(#FDE9EB,#3B1A1F);
  --t-gold:light-dark(#C98A10,#F2C55C);    --t-gold-soft:light-dark(#FCF3DC,#382C12);
  --t-orange:light-dark(#D9622A,#F7A26A);  --t-orange-soft:light-dark(#FDEBDD,#3A2314);
  --t-pink:light-dark(#CE4680,#F58FB6);    --t-pink-soft:light-dark(#FCE6EF,#3A1929);
  --t-purple:light-dark(#6B4FB0,#B9A0F0);  --t-purple-soft:light-dark(#EEE9FA,#261E3D);
  --t-blue:light-dark(#2471B0,#7CC4F2);    --t-blue-soft:light-dark(#E3F0FA,#142A3A);
  --t-green:light-dark(#1E8A66,#74D8B1);   --t-green-soft:light-dark(#DFF4EB,#12302A);
  --t-on-hue:light-dark(#FFFFFF,var(--t-night-base));
  --t-paper:light-dark(#F3F1EC,#171B22);   /* quiet tinted panel */

  /* ---------- 4. Type ---------- */
  --t-font:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --t-font-display:"Source Serif 4","Iowan Old Style","Palatino Linotype",Georgia,serif;   /* editorial headings; self-hosted in fonts/ */
  --t-text-xs:12px; --t-text-sm:14px; --t-text-md:16px; --t-text-lg:18px;
  --t-text-xl:22px; --t-text-2xl:28px; --t-text-3xl:36px; --t-text-4xl:48px;
  --t-weight-regular:400; --t-weight-medium:500; --t-weight-semibold:600; --t-weight-bold:700;
  --t-leading-tight:1.12; --t-leading-snug:1.3; --t-leading-body:1.6;
  --t-tracking-tight:-0.015em;

  /* ---------- 5. Space (4px grid) ---------- */
  --t-space-1:4px; --t-space-2:8px; --t-space-3:12px; --t-space-4:16px;
  --t-space-5:24px; --t-space-6:32px; --t-space-7:48px; --t-space-8:64px; --t-space-9:96px;

  /* ---------- 6. Shape and depth ---------- */
  /* Deliberately tight: square, editorial corners. --t-radius-pill is kept as a name but is NOT a pill any more. */
  --t-radius-sm:2px; --t-radius-md:3px; --t-radius-lg:4px; --t-radius-xl:6px; --t-radius-pill:3px;
  --t-radius-modal:6px;
  --t-rule:1px solid var(--t-line);
  --t-shadow-sm:none;
  --t-shadow-md:0 1px 2px rgba(16,24,32,.06);
  --t-shadow-lg:0 12px 32px -16px rgba(16,24,32,.22);
  --t-shadow-modal:0 24px 64px -16px rgba(8,12,16,.45);

  /* ---------- 7. Motion ---------- */
  --t-ease:cubic-bezier(.2,.7,.2,1);
  --t-ease-bounce:cubic-bezier(.2,.7,.2,1);
  --t-dur-fast:150ms; --t-dur:250ms; --t-dur-slow:450ms;

  /* ---------- 8. Layout ---------- */
  --t-content-max:1120px;
  --t-tap:44px;
}
:root[data-theme=light]{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark}
@media (prefers-reduced-motion:reduce){:root{--t-dur-fast:0ms;--t-dur:0ms;--t-dur-slow:0ms}}
