/* SecLens.ONE design tokens v1 (8 Oct 2026). Light theme on :root, dark theme on html.dark or [data-theme="dark"]. */
:root {
  color-scheme: light;

  /* Typography */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: 0.75rem;   --lh-xs: 1rem;      /* 12/16 */
  --text-sm: 0.875rem;  --lh-sm: 1.25rem;   /* 14/20 */
  --text-md: 1rem;      --lh-md: 1.5rem;    /* 16/24 */
  --text-lg: 1.25rem;   --lh-lg: 1.75rem;   /* 20/28 */
  --text-xl: 1.75rem;   --lh-xl: 2.25rem;   /* 28/36 */
  --text-2xl: 2.5rem;   --lh-2xl: 3rem;     /* 40/48 */
  --text-3xl: 3.5rem;   --lh-3xl: 4rem;     /* 56/64 */
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600;
  --tracking-tight: -0.01em; /* only for 40 and 56 px */

  /* Neutral ramp: zinc (channels for alpha use) */
  --zinc-50: 250 250 250;  --zinc-100: 244 244 245; --zinc-200: 228 228 231;
  --zinc-300: 212 212 216; --zinc-400: 161 161 170; --zinc-500: 113 113 122;
  --zinc-600: 82 82 91;    --zinc-700: 63 63 70;    --zinc-800: 39 39 42;
  --zinc-900: 24 24 27;    --zinc-950: 9 9 11;

  /* Semantic roles, light */
  --c-bg: 255 255 255;            /* #ffffff */
  --c-surface: var(--zinc-50);    /* #fafafa */
  --c-surface-2: var(--zinc-100); /* #f4f4f5 */
  --c-border: var(--zinc-200);    /* #e4e4e7 decorative dividers */
  --c-border-input: var(--zinc-500); /* #71717a, 4.83:1 on bg, for controls */
  --c-text: var(--zinc-900);      /* #18181b */
  --c-text-muted: var(--zinc-600);/* #52525b */

  --c-accent: 31 95 191;          /* #1f5fbf */
  --c-accent-hover: 24 74 150;    /* #184a96 */
  --c-accent-fg: 255 255 255;     /* text on accent */
  --c-accent-subtle: 237 243 252; /* #edf3fc */

  --c-poor: 180 35 24;     --c-poor-bg: 253 241 240;   /* #b42318 / #fdf1f0 */
  --c-fair: 150 90 0;      --c-fair-bg: 253 246 231;   /* #965a00 / #fdf6e7 */
  --c-good: 26 115 64;     --c-good-bg: 237 247 241;   /* #1a7340 / #edf7f1 */
  --c-excellent: 26 115 64; --c-excellent-fg: 255 255 255; /* solid badge */

  /* Spacing (4 px base) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem;  --space-8: 2rem;   --space-12: 3rem;   --space-16: 4rem; --space-24: 6rem;

  /* Radii: two values */
  --radius-sm: 4px;  /* badges, code chips, inputs inside rows */
  --radius-md: 8px;  /* buttons, inputs, cards, code blocks, dialogs */

  /* Shadows: two values */
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-2: 0 8px 24px rgb(0 0 0 / 0.12);

  /* Borders */
  --focus-offset: 2px;

  /* Motion */
  --dur-fast: 120ms; --dur-base: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Layout */
  --container: 72rem;  /* 1152 px */
  --content: 48rem;    /* 768 px, result view and forms */
  --measure: 68ch;     /* running text */

  /* Printable executive report palette */
  --print-good: 4 120 87;             /* #047857 */
  --print-fair: 180 83 9;             /* #b45309 */
  --print-slate: 71 85 105;           /* #475569 */
  --print-poor: 185 28 28;            /* #b91c1c */
  --print-mid: 14 116 144;            /* #0e7490 */
  --print-ink: 20 20 20;              /* #141414 */
  --print-navy: 15 23 42;             /* #0f172a */
  --print-meta: 100 116 139;          /* #64748b */
  --print-line: 226 232 240;          /* #e2e8f0 */
  --print-faint: 148 163 184;         /* #94a3b8 */
  --print-body: 51 65 85;             /* #334155 */
  --print-line-strong: 203 213 225;   /* #cbd5e1 */
  --print-list: 30 41 59;             /* #1e293b */
  --print-button-border: 197 205 214; /* #c5cdd6 */
}

html.dark, [data-theme="dark"] {
  color-scheme: dark;
  --c-bg: var(--zinc-950);        /* #09090b */
  --c-surface: var(--zinc-900);   /* #18181b */
  --c-surface-2: var(--zinc-800); /* #27272a */
  --c-border: var(--zinc-800);    /* #27272a */
  --c-border-input: var(--zinc-500); /* #71717a, 4.12:1 on bg */
  --c-text: var(--zinc-50);       /* #fafafa */
  --c-text-muted: var(--zinc-400);/* #a1a1aa */

  --c-accent: 121 174 242;        /* #79aef2 */
  --c-accent-hover: 163 200 247;  /* #a3c8f7 */
  --c-accent-fg: 9 9 11;          /* #09090b */
  --c-accent-subtle: 20 35 58;    /* #14233a */

  --c-poor: 242 139 130;   --c-poor-bg: 43 21 19;     /* #f28b82 / #2b1513 */
  --c-fair: 240 181 69;    --c-fair-bg: 42 32 11;     /* #f0b545 / #2a200b */
  --c-good: 92 201 138;    --c-good-bg: 16 40 27;     /* #5cc98a / #10281b */
  --c-excellent: 92 201 138; --c-excellent-fg: 9 9 11;

  --shadow-1: none;                                   /* dark: borders instead */
  --shadow-2: 0 8px 24px rgb(0 0 0 / 0.5);
}

/* Aliases: declared on every theme scope so they resolve against that scope */
:root, html.dark, [data-theme="dark"] {
  --c-pass: var(--c-good); --c-pass-bg: var(--c-good-bg);
  --c-warn: var(--c-fair); --c-warn-bg: var(--c-fair-bg);
  --c-fail: var(--c-poor); --c-fail-bg: var(--c-poor-bg);
  --border-1: 1px solid rgb(var(--c-border));
  --focus-ring: 2px solid rgb(var(--c-accent));
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; }
}
