/* FeedPilot's design tokens -- one file for every surface: the web app
   (app.css after this file), the admin panel, the site and the manual.
   Colours are named by their role, never by their hue, and every text
   colour is AA on every ground it is used on (tests/test_contrast.py
   reads this file and checks each pair named there, in light and dark).

   Light is the default; dark comes from the device, or from the page's own
   switch, which sets <html data-theme=light|dark> (kept in localStorage
   'fp-theme'). The brand violet is the logo's (#7C3AED). */

:root{
  /* grounds, from the page back to the raised */
  --bg:#f7f6f3;--surface:#ffffff;--surface-2:#f1efea;--surface-3:#e8e5de;
  /* text: ink for words, ink-2 for what explains them; ink-3 only for icons and lines, never words */
  --ink:#17161c;--ink-2:#5c5b66;--ink-3:#8b8a94;
  /* lines: a hairline between things, a field's edge (3:1, WCAG 1.4.11) */
  --line:#e5e2db;--line-strong:#8e8b85;
  /* the brand: a filled button, a link, a selected row */
  --accent:#7c3aed;--accent-hover:#6d28d9;--accent-ink:#ffffff;--accent-soft:#efe9fd;--accent-soft-2:#ddd6fe;--accent-soft-ink:#5b21b6;
  /* states, each a strong colour, a soft ground and the words on that ground */
  --ok:#1a7f45;--ok-soft:#e3f3e9;--ok-ink:#14663a;
  --warn:#a86b00;--warn-soft:#fff2d0;--warn-ink:#7f4f00;
  --bad:#c0392b;--bad-soft:#fbe7e4;--bad-ink:#a3271b;--on-bad:#ffffff;
  --info:#1d5bbf;--info-soft:#e6eefb;--info-ink:#1a4fa6;
  --focus:#7c3aed;
  /* elevation */
  --e1:0 1px 2px rgba(20,16,40,.05),0 1px 1px rgba(20,16,40,.03);
  --e2:0 1px 2px rgba(20,16,40,.05),0 8px 24px -12px rgba(20,16,40,.18);
  --e3:0 24px 60px -20px rgba(20,16,40,.35);
  --scrim:rgba(10,8,20,.42);
  color-scheme:light;

  /* type: one scale; Persian sets taller lines (see [lang=fa]) */
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-fa:"Vazirmatn",Tahoma,system-ui,sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,monospace;
  --fs-xs:.75rem;--fs-sm:.8125rem;--fs-md:.9375rem;--fs-lg:1.0625rem;--fs-xl:1.25rem;--fs-2xl:1.5rem;--fs-3xl:1.875rem;
  --lh:1.55;--lh-tight:1.25;--lh-fa:1.75;
  --w-regular:400;--w-medium:500;--w-strong:650;
  /* space: a 4px step */
  --s1:.25rem;--s2:.5rem;--s3:.75rem;--s4:1rem;--s5:1.25rem;--s6:1.5rem;--s7:2rem;--s8:3rem;
  /* shape */
  --r-xs:6px;--r-sm:10px;--r:14px;--r-lg:20px;--r-pill:999px;
  /* a finger's size: every control on a phone is at least this tall */
  --tap:44px;--field:2.75rem;
  /* motion: short, one curve; nothing moves for those who asked it not to */
  --dur-1:120ms;--dur-2:200ms;--dur-3:320ms;
  --ease:cubic-bezier(.2,.8,.2,1);--spring:cubic-bezier(.34,1.4,.64,1);

  /* the public site (core/site_ui.py): the brand's own violet as a ground that is the
     same in both themes (a card that stands on the brand), and the larger display sizes */
  --brand:#7c3aed;--brand-deep:#4c1d95;--on-brand:#ffffff;--on-brand-2:#ede9fe;
  --fs-4xl:2.375rem;--fs-5xl:3.25rem;--measure:46rem;--wrap:70rem;
  /* the hero's lights: three soft colours drifting behind the words, never under them at full strength */
  --glow-1:rgba(124,58,237,.20);--glow-2:rgba(236,72,153,.14);--glow-3:rgba(14,165,233,.14);

  /* the names the app was written with, kept as aliases */
  --muted:var(--ink-2);--line-2:var(--line-strong);
  --shadow:var(--e2);--shadow-lg:var(--e3);
  --radius:var(--r);--radius-sm:var(--r-sm);
}

/* dark, by the device's choice unless the page's switch said light */
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --bg:#0f0f14;--surface:#17171e;--surface-2:#1f1f28;--surface-3:#292934;
  --ink:#ecebf3;--ink-2:#a9a8b6;--ink-3:#73727f;
  --line:#2a2a35;--line-strong:#6f6e7c;
  --accent:#a78bfa;--accent-hover:#b9a2fb;--accent-ink:#14101f;--accent-soft:#2a2340;--accent-soft-2:#3a2f5e;--accent-soft-ink:#c9bafd;
  --ok:#4ade80;--ok-soft:#14301f;--ok-ink:#7ee6a4;
  --warn:#fbbf24;--warn-soft:#3a2d10;--warn-ink:#fcd06a;
  --bad:#f87171;--bad-soft:#3a1a1a;--bad-ink:#fca5a5;--on-bad:#1a0b0b;
  --info:#7cb1ff;--info-soft:#16253d;--info-ink:#a8c9ff;
  --focus:#c4b5fd;
  --glow-1:rgba(167,139,250,.26);--glow-2:rgba(244,114,182,.16);--glow-3:rgba(56,189,248,.16);
  --e1:0 1px 2px rgba(0,0,0,.4);--e2:0 1px 2px rgba(0,0,0,.4),0 8px 24px -12px rgba(0,0,0,.6);--e3:0 24px 60px -20px rgba(0,0,0,.8);
  --scrim:rgba(0,0,0,.55);
  color-scheme:dark;
}}
/* dark, by the page's switch -- the same values as above */
:root[data-theme=dark]{
  --bg:#0f0f14;--surface:#17171e;--surface-2:#1f1f28;--surface-3:#292934;
  --ink:#ecebf3;--ink-2:#a9a8b6;--ink-3:#73727f;
  --line:#2a2a35;--line-strong:#6f6e7c;
  --accent:#a78bfa;--accent-hover:#b9a2fb;--accent-ink:#14101f;--accent-soft:#2a2340;--accent-soft-2:#3a2f5e;--accent-soft-ink:#c9bafd;
  --ok:#4ade80;--ok-soft:#14301f;--ok-ink:#7ee6a4;
  --warn:#fbbf24;--warn-soft:#3a2d10;--warn-ink:#fcd06a;
  --bad:#f87171;--bad-soft:#3a1a1a;--bad-ink:#fca5a5;--on-bad:#1a0b0b;
  --info:#7cb1ff;--info-soft:#16253d;--info-ink:#a8c9ff;
  --focus:#c4b5fd;
  --glow-1:rgba(167,139,250,.26);--glow-2:rgba(244,114,182,.16);--glow-3:rgba(56,189,248,.16);
  --e1:0 1px 2px rgba(0,0,0,.4);--e2:0 1px 2px rgba(0,0,0,.4),0 8px 24px -12px rgba(0,0,0,.6);--e3:0 24px 60px -20px rgba(0,0,0,.8);
  --scrim:rgba(0,0,0,.55);
  color-scheme:dark;
}

/* The pairs tests/test_contrast.py checks, text on ground, in both themes:
   contrast: ink/bg ink/surface ink/surface-2 ink/surface-3
   contrast: ink-2/bg ink-2/surface ink-2/surface-2
   contrast: accent/bg accent/surface accent-ink/accent accent-ink/accent-hover accent-soft-ink/accent-soft
   contrast: ok-ink/ok-soft warn-ink/warn-soft bad-ink/bad-soft info-ink/info-soft bad/surface ok/surface on-bad/bad
   ui: line-strong/surface line-strong/bg focus/surface focus/bg ink-3/surface
   contrast: on-brand/brand on-brand/brand-deep on-brand-2/brand-deep */
