/* Foxo.pro design tokens · v0.1 · 9 November 2026
   Drop-in for the v3 console. Light on :root, dark under prefers-color-scheme
   and under [data-theme]. Every colour the console uses is one of these.
   Prefix: --fx-. Semantic red/amber/green are for STATE only, never brand.   */

:root {
  color-scheme: light;

  /* ── surfaces ─────────────────────────────────────────────── */
  --fx-ground:          #F3F4F7;   /* page */
  --fx-surface:         #FFFFFF;   /* cards, panels, table body */
  --fx-surface-raised:  #FFFFFF;   /* drawers, menus, toasts; lifted by --fx-shadow-2 */
  --fx-surface-sunken:  #EAECF1;   /* code, wells, disabled fills */

  /* ── ink ──────────────────────────────────────────────────── */
  --fx-ink:             #121418;   /* body, headings            18.4:1 on surface */
  --fx-muted:           #596170;   /* secondary text             6.2:1 on surface */
  --fx-faint:           #818996;   /* icons, large labels only   3.5:1 on surface, never body text */
  --fx-border:          #D9DCE3;   /* card edges, table rules */
  --fx-border-strong:   #8A92A0;   /* input and control edges   3.1:1 on surface (WCAG 1.4.11) */
  --fx-rule:            #E9EBEF;   /* hairline dividers inside a surface */

  /* ── action (the one accent) ──────────────────────────────── */
  --fx-action:          #2B49D8;   /* buttons, current nav item, focus   6.9:1 on surface */
  --fx-action-hover:    #2340C2;
  --fx-action-active:   #1B35A6;
  --fx-action-tint:     #E8ECFC;   /* selected row, current nav fill */
  --fx-on-action:       #FFFFFF;   /* text on action fills */
  --fx-link:            #2544CC;   /*                                    7.6:1 on surface */
  --fx-selection:       #DCE2FB;   /* ::selection and marked text */
  --fx-focus:           var(--fx-action);

  /* ── state (semantic triple; state only) ─────────────────── */
  --fx-red:             #B3261E;   /* text / stroke    6.5:1 on surface */
  --fx-red-tint:        #FCECEA;
  --fx-red-dot:         #D92D20;   /* non-text indicator  4.8:1 on surface */
  --fx-amber:           #A15C00;   /*                  5.2:1 on surface */
  --fx-amber-tint:      #FFF3DF;
  --fx-amber-dot:       #BF7A00;   /*                  3.5:1 on surface */
  --fx-green:           #137539;   /*                  5.8:1 on surface */
  --fx-green-tint:      #E5F5EB;
  --fx-green-dot:       #1A9C4E;   /*                  3.6:1 on surface */

  /* ── evidence marks P / S / U (source quality of a number) ── */
  --fx-ev-p-bg:         var(--fx-ink);     --fx-ev-p-fg: var(--fx-surface);   --fx-ev-p-border: var(--fx-ink);
  --fx-ev-s-bg:         transparent;       --fx-ev-s-fg: var(--fx-ink);      --fx-ev-s-border: var(--fx-ink);
  --fx-ev-u-bg:         transparent;       --fx-ev-u-fg: var(--fx-muted);    --fx-ev-u-border: var(--fx-muted);  /* dashed */

  /* ── tag families (BRD claim marks). fill = settled, outline = open, dashed = missing ── */
  --fx-tag-required-fg: var(--fx-action);  --fx-tag-required-bg: var(--fx-action-tint);  --fx-tag-required-border: transparent;
  --fx-tag-measured-fg: var(--fx-surface); --fx-tag-measured-bg: var(--fx-ink);          --fx-tag-measured-border: var(--fx-ink);
  --fx-tag-gap-fg:      var(--fx-ink);     --fx-tag-gap-bg:      transparent;            --fx-tag-gap-border: var(--fx-ink);     /* dashed */
  --fx-tag-market-fg:   var(--fx-muted);   --fx-tag-market-bg:   var(--fx-surface-sunken); --fx-tag-market-border: transparent;
  --fx-tag-assumption-fg: var(--fx-muted); --fx-tag-assumption-bg: transparent;          --fx-tag-assumption-border: var(--fx-muted); /* dotted */
  --fx-tag-decision-fg: var(--fx-action);  --fx-tag-decision-bg: transparent;            --fx-tag-decision-border: var(--fx-action);
  --fx-tag-decided-fg:  var(--fx-on-action); --fx-tag-decided-bg: var(--fx-action);      --fx-tag-decided-border: var(--fx-action);

  /* ── type ─────────────────────────────────────────────────── */
  /* Display: Schibsted Grotesk Bold, bundled (fonts/, SIL OFL) via foxo-fonts.css; OS fallbacks after it. Text: the OS UI face. */
  --fx-font-display: "Schibsted Grotesk", "Avenir Next", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --fx-font-text:    system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --fx-font-mono:    ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  /* modular scale, ratio 1.25 from 16, with two small steps below */
  --fx-fs-2xs: 11px;  --fx-fs-xs: 12.5px; --fx-fs-sm: 14px;  --fx-fs-md: 16px;
  --fx-fs-lg:  20px;  --fx-fs-xl: 25px;   --fx-fs-2xl: 31px; --fx-fs-3xl: 39px; --fx-fs-4xl: 49px; --fx-fs-5xl: 61px;
  --fx-lh-tight: 1.1; --fx-lh-snug: 1.25; --fx-lh-text: 1.5; --fx-lh-loose: 1.65;
  --fx-track-display: -0.025em; --fx-track-caps: 0.07em;
  --fx-weight-text: 400; --fx-weight-medium: 500; --fx-weight-semibold: 600; --fx-weight-display: 700;

  /* ── space (4-based) ──────────────────────────────────────── */
  --fx-sp-1: 4px;  --fx-sp-2: 8px;  --fx-sp-3: 12px; --fx-sp-4: 16px; --fx-sp-5: 20px;
  --fx-sp-6: 24px; --fx-sp-8: 32px; --fx-sp-10: 40px; --fx-sp-12: 48px; --fx-sp-16: 64px; --fx-sp-24: 96px;

  /* ── radius ───────────────────────────────────────────────── */
  --fx-r-xs: 3px; --fx-r-sm: 6px; --fx-r-md: 10px; --fx-r-lg: 14px; --fx-r-full: 999px;

  /* ── elevation ────────────────────────────────────────────── */
  --fx-shadow-0: none;
  --fx-shadow-1: 0 1px 2px rgba(18,20,24,.06);
  --fx-shadow-2: 0 1px 2px rgba(18,20,24,.05), 0 8px 24px rgba(18,20,24,.08);
  --fx-shadow-3: 0 2px 4px rgba(18,20,24,.06), 0 24px 64px rgba(18,20,24,.14);
  --fx-scrim:    rgba(18,20,24,.45);

  /* ── motion ───────────────────────────────────────────────── */
  --fx-dur-1: 80ms;  --fx-dur-2: 140ms; --fx-dur-3: 220ms; --fx-dur-4: 320ms;
  --fx-ease-standard: cubic-bezier(.2,.8,.2,1);
  --fx-ease-enter:    cubic-bezier(0,0,.2,1);
  --fx-ease-exit:     cubic-bezier(.4,0,1,1);

  /* ── layout ───────────────────────────────────────────────── */
  --fx-rail: 240px; --fx-drawer: 440px; --fx-drawer-wide: 680px; --fx-topbar: 48px;
  --fx-control-h: 32px; --fx-control-h-lg: 40px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fx-ground: #0E1013; --fx-surface: #15181D; --fx-surface-raised: #1C2027; --fx-surface-sunken: #0B0D10;
    --fx-ink: #ECEEF2; --fx-muted: #A9B0BC; --fx-faint: #767E8B; --fx-border: #2B3039; --fx-border-strong: #626B79; --fx-rule: #20252D;
    --fx-action: #93A3FF; --fx-action-hover: #A8B5FF; --fx-action-active: #7F91FF; --fx-action-tint: #1E2650;
    --fx-on-action: #0E1013; --fx-link: #A3B1FF; --fx-selection: #283166;
    --fx-red: #F39C92; --fx-red-tint: #3B1B18; --fx-red-dot: #F0756A;
    --fx-amber: #E9B45C; --fx-amber-tint: #3A2B11; --fx-amber-dot: #E8A633;
    --fx-green: #6ECD95; --fx-green-tint: #14301F; --fx-green-dot: #4FC27E;
    --fx-shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --fx-shadow-2: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.5);
    --fx-shadow-3: 0 2px 4px rgba(0,0,0,.5), 0 24px 64px rgba(0,0,0,.6);
    --fx-scrim: rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fx-ground: #0E1013; --fx-surface: #15181D; --fx-surface-raised: #1C2027; --fx-surface-sunken: #0B0D10;
  --fx-ink: #ECEEF2; --fx-muted: #A9B0BC; --fx-faint: #767E8B; --fx-border: #2B3039; --fx-border-strong: #626B79; --fx-rule: #20252D;
  --fx-action: #93A3FF; --fx-action-hover: #A8B5FF; --fx-action-active: #7F91FF; --fx-action-tint: #1E2650;
  --fx-on-action: #0E1013; --fx-link: #A3B1FF; --fx-selection: #283166;
  --fx-red: #F39C92; --fx-red-tint: #3B1B18; --fx-red-dot: #F0756A;
  --fx-amber: #E9B45C; --fx-amber-tint: #3A2B11; --fx-amber-dot: #E8A633;
  --fx-green: #6ECD95; --fx-green-tint: #14301F; --fx-green-dot: #4FC27E;
  --fx-shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --fx-shadow-2: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.5);
  --fx-shadow-3: 0 2px 4px rgba(0,0,0,.5), 0 24px 64px rgba(0,0,0,.6);
  --fx-scrim: rgba(0,0,0,.6);
}

@media (prefers-reduced-motion: reduce) {
  :root { --fx-dur-1: 0ms; --fx-dur-2: 0ms; --fx-dur-3: 0ms; --fx-dur-4: 0ms; }
}
