/*
 * Syfft design tokens: the single source for colour, type, space, radius, shadow and focus.
 * Loaded first by every surface: the marketing site (/marketing/tokens.css), the setup chat
 * (/v2/), the dashboard and the legal pages. Components use these variables, never literals.
 *
 * Breakpoints (media queries can't read variables): mobile-first min-width 600, 760, 1000, 1400.
 * Text contrast on --page: --ink 16:1, --muted 5.6:1, --subtle 4.6:1 (smallest text allowed).
 * --control (3.2:1) is for checkbox/switch/input borders; --faint is decorative only.
 */
:root {
  /* Light only (owner decision, 2026-10-01): the OS dark setting doesn't change Syfft. */
  color-scheme: light;

  /* Colour */
  --page: #f9fafc;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --ink: #20232a;
  --ink-2: #3a3f4a;
  --muted: #5f6573;
  --subtle: #6b7282;
  --faint: #a3aab6;
  --line: #e9ebf1;
  --line-strong: #dce1ed;
  --control: #858e9e;
  --hover: #f4f6fb;
  --blue: #2d5bea;
  --blue-hover: #2449c9;
  --blue-soft: #eaf0ff;
  --on-blue: #ffffff;
  --focus: #3b6cf6;
  --danger: #b8322f;
  --danger-soft: #fdeceb;
  --warn: #8a5000;
  --warn-soft: #fff3dc;
  --ok: #1b7a50;
  --ok-soft: #e5f5ec;
  /* The one dark band on the site (home "Knowing when to step back") and dark mockups. */
  --night: #11141b;
  --night-surface: #1a1e27;
  --night-ink: #eceef3;
  --night-muted: #a4abb8;
  --night-line: #2a2f3a;

  /* Label tones: --tone-<id> is text/dot, --tone-<id>-bg the chip fill. */
  --tone-newsletters: #454a54;
  --tone-newsletters-bg: #eeeff1;
  --tone-promotions: #4a4653;
  --tone-promotions-bg: #efeef1;
  --tone-pitches: #4f4b47;
  --tone-pitches-bg: #f0eeec;
  --tone-automated_updates: #226377;
  --tone-automated_updates-bg: #e7f4f8;
  --tone-receipts: #175082;
  --tone-receipts-bg: #e5f0fa;
  --tone-invoices: #866013;
  --tone-invoices-bg: #fbf4e4;
  --tone-leads: #824c17;
  --tone-leads-bg: #faf0e5;
  --tone-deadline: #913108;
  --tone-deadline-bg: #fdeae2;
  --tone-travel: #26733b;
  --tone-travel-bg: #e8f7ec;
  --tone-waiting_reply: #7f6c0a;
  --tone-waiting_reply-bg: #fdf8e3;
  --tone-needs_reply: #954304;
  --tone-needs_reply-bg: #fdeee2;
  --tone-todo: #8c4a12;
  --tone-todo-bg: #fbefe5;
  --tone-heads_up: #227766;
  --tone-heads_up-bg: #e7f8f5;
  --tone-meetings: #1f7a50;
  --tone-meetings-bg: #e7f9f0;
  --tone-documents: #8a550f;
  --tone-documents-bg: #fcf1e3;
  --tone-security: #1b357e;
  --tone-security-bg: #e6ebfa;
  --tone-phishing: #861713;
  --tone-phishing-bg: #fbe5e4;
  --tone-spam: #6b2e42;
  --tone-spam-bg: #f6eaee;
  --tone-scam: #7e1b28;
  --tone-scam-bg: #fae6e8;
  --tone-neutral: #5d6472;
  --tone-neutral-bg: #f1f2f5;

  /* Type. Weights: 400, 500, 600, 700 only (system fonts have nothing in between). */
  --font:
    -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fs-display: clamp(44px, 6.5vw, 80px);
  --fs-h1: clamp(40px, 5.8vw, 68px);
  --fs-h2: clamp(32px, 4.2vw, 52px);
  --fs-h3: clamp(19px, 1.6vw, 22px);
  --fs-lead: clamp(17px, 1.4vw, 19px);
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-meta: 13px;
  --fs-eyebrow: 11px;
  --lh-tight: 1.06;
  --lh-heading: 1.15;
  --lh-body: 1.6;
  --track-display: -0.045em;
  --track-heading: -0.035em;
  --track-eyebrow: 0.16em;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --section-y: clamp(72px, 9vw, 120px);
  --content-width: 1440px;
  --page-gutter: clamp(20px, 3.3vw, 64px);
  --measure: 62ch;

  /* Shape */
  --radius-xs: 6px;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 17px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px #1b22330d;
  --shadow-2: 0 8px 24px -12px #1b223326, 0 2px 6px #1b22330a;
  --shadow-window: 0 35px 70px -35px #36436845, 0 8px 25px #414b680d;

  /* Focus and motion */
  --focus-ring: 0 0 0 3px var(--page), 0 0 0 5px var(--focus);
  --focus-offset: 3px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --site-nav-height: 64px;
}
@media (min-width: 1000px) {
  :root {
    --site-nav-height: 78px;
  }
}

/* Dark: same names, new values. Off unless a page opts in with <html data-theme="dark">;
   Syfft is light-only for now (owner decision, 2026-10-01). */
:root[data-theme='dark'] {
  --page: #0f1115;
  --surface: #171a21;
  --surface-2: #1d212a;
  --ink: #eceef3;
  --ink-2: #d3d7df;
  --muted: #a4abb8;
  --subtle: #8b93a1;
  --faint: #4a505c;
  --line: #262a33;
  --line-strong: #323744;
  --control: #6b7383;
  --hover: #1d212a;
  --blue: #6f8fff;
  --blue-hover: #8ea7ff;
  --blue-soft: #1d2745;
  --on-blue: #0b0d12;
  --focus: #7c9bff;
  --danger: #ff8a82;
  --danger-soft: #3a1c1c;
  --warn: #f0b458;
  --warn-soft: #33260f;
  --ok: #6fd3a0;
  --ok-soft: #14301f;
  --night: #0b0d11;
  --night-surface: #151820;
  --night-line: #262a33;

  --tone-newsletters: #b6bac3;
  --tone-newsletters-bg: #202327;
  --tone-promotions: #bbb7c2;
  --tone-promotions-bg: #232127;
  --tone-pitches: #c1bcb7;
  --tone-pitches-bg: #262321;
  --tone-automated_updates: #98d0e1;
  --tone-automated_updates-bg: #102e37;
  --tone-receipts: #8ec0eb;
  --tone-receipts-bg: #102537;
  --tone-invoices: #eecd8b;
  --tone-invoices-bg: #372a10;
  --tone-leads: #ebbd8e;
  --tone-leads-bg: #372410;
  --tone-deadline: #f5a684;
  --tone-deadline-bg: #371c10;
  --tone-travel: #9cdead;
  --tone-travel-bg: #12361b;
  --tone-waiting_reply: #f5e284;
  --tone-waiting_reply-bg: #373110;
  --tone-needs_reply: #f5b584;
  --tone-needs_reply-bg: #372110;
  --tone-todo: #efbb92;
  --tone-todo-bg: #352112;
  --tone-heads_up: #98e1d3;
  --tone-heads_up-bg: #10372f;
  --tone-meetings: #95e4bf;
  --tone-meetings-bg: #103725;
  --tone-documents: #f2c488;
  --tone-documents-bg: #372610;
  --tone-security: #92a9e8;
  --tone-security-bg: #101b37;
  --tone-phishing: #ee8e8b;
  --tone-phishing-bg: #371110;
  --tone-spam: #d7a2b4;
  --tone-spam-bg: #32151f;
  --tone-scam: #e8929d;
  --tone-scam-bg: #371015;
  --tone-neutral: #b0b6c2;
  --tone-neutral-bg: #232833;

  --shadow-1: 0 1px 2px #00000066;
  --shadow-2: 0 8px 24px -12px #000000b3, 0 2px 6px #00000059;
  --shadow-window: 0 35px 70px -35px #000000cc, 0 8px 25px #00000066;
}
