/* GENERATED from src/styles/tokens.css by scripts/gen-portal-tokens.mjs — do not edit. */
/*
 * Epsilon AI Global — Design tokens
 * SINGLE SOURCE OF TRUTH: epsilon-ai-global-MASTER-BRIEF.md §2.
 * Every color and font value below is taken verbatim from §2. Do not invent values.
 *
 * Brand colors (blue/orange) are theme-independent and stay constant in light & dark.
 * Only the neutral surface/text aliases flip between themes.
 */

:root {
  /* ---- Brand (confirmed, §2) ---- */
  --color-primary: #1a22ff; /* electric indigo, signature blue */
  --color-accent-academy: #f47a1f; /* Academy accent orange */

  /* ---- Blue tints (§2) ---- */
  --blue-500: #1a22ff;
  --blue-400: #3243ff;
  --blue-300: #6372ff;
  --blue-200: #8ea4ff;
  --blue-100: #c7d2ff;
  /* A pale, cyan-leaning "baby blue", off the indigo brand ramp on purpose: it is the tint for
     blue text on dark surfaces, where a soft near-white blue reads far more comfortably than the
     indigo blues. Fixed rather than derived from the primary, so legibility on dark never depends
     on a brand color set in /admin. Sits at 50% toward white — close to the practical limit:
     much paler and the cyan lean collapses and it stops reading as blue at all. */
  --blue-baby: #bfd9ea;

  /* ---- Neutrals (§2) ---- */
  --neutral-900: #0b1026;
  --neutral-800: #1a1f3d;
  --neutral-600: #384057;
  --neutral-200: #e6e9f2;
  --neutral-100: #f5f7fa;
  --neutral-0: #ffffff;

  /* ---- Semantic status (§2) ---- */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #06b6d4;
  --color-accent: #7c3aed;

  /* ---- Typography ---- */
  /* Clean, minimal, tech: a single Inter family for headings + body. */
  --font-body:
    "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-body);
  --font-arabic:
    "IBM Plex Sans Arabic", "Inter Variable", system-ui, sans-serif;

  /* Type scale (§2): H1 64 · H2 48 · H3 32 · H4 24 · Body 16/14 · Caption 12.
     --fs-h5 and --fs-body-lg are the in-between steps the components already ask for: a lead
     paragraph under a heading, and a card/section title below H4. They were referenced in 42
     components for months without ever being defined, so every one of those declarations was
     invalid and the text silently fell back to the inherited 16px. Defined here, in the one
     place sizes live, rather than re-typed as a literal at each call site. */
  --fs-h1: 4rem; /* 64 */
  --fs-h2: 3rem; /* 48 */
  --fs-h3: 2rem; /* 32 */
  --fs-h4: 1.5rem; /* 24 */
  --fs-h5: 1.25rem; /* 20 */
  --fs-body-lg: 1.125rem; /* 18 — lead paragraphs */
  --fs-body: 1rem; /* 16 */
  --fs-body-sm: 0.875rem; /* 14 */
  --fs-caption: 0.75rem; /* 12 */

  /* Font weights present in the kit (§2) */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.15;
  --lh-normal: 1.6;

  /* ---- Spacing — base 4px (§2) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* ---- Radii (§2) ---- */
  --radius-card: 12px;
  --radius-button: 8px;
  --radius-pill: 999px;
  /* Size aliases onto the same scale. Components reached for --radius-sm/md/lg (often with a
     literal fallback, sometimes without); the bare ones resolved to nothing and squared the
     corner off entirely. Aliases, not new values — md is the card radius, sm the button one. */
  --radius-sm: var(--radius-button); /* 8px */
  --radius-md: var(--radius-card); /* 12px */
  --radius-lg: 16px;

  /* ---- Opacity scale (overlays, tints, hairlines) ---- */
  --opacity-faint: 0.08;
  --opacity-soft: 0.14;
  --opacity-muted: 0.22;
  --opacity-medium: 0.35;
  --opacity-strong: 0.6;

  /* ---- Elevation ramp (xs → xl) ---- */
  --shadow-xs: 0 1px 1px rgba(11, 16, 38, 0.05);
  --shadow-sm: 0 1px 2px rgba(11, 16, 38, 0.08);
  --shadow-md: 0 4px 12px rgba(11, 16, 38, 0.12);
  --shadow-lg: 0 12px 32px rgba(11, 16, 38, 0.18);
  --shadow-xl: 0 24px 56px rgba(11, 16, 38, 0.22);

  /* Accent hover (darkened orange) — single source for the accent button idiom. */
  --color-accent-hover: color-mix(in srgb, var(--color-accent-academy) 86%, #000);

  /* Layout helpers */
  --container-max: 1200px;
  --header-height: 88px;
}

/* ============================================================
 * LIGHT THEME (default) — semantic aliases mapped onto §2 neutrals
 * ============================================================ */
:root,
:root[data-theme="light"] {
  color-scheme: light;

  --color-bg: var(--neutral-0);
  --color-surface: var(--neutral-100);
  --color-surface-2: var(--neutral-200);
  --color-border: var(--neutral-200);

  --color-text: var(--neutral-900);
  --color-text-muted: var(--neutral-600);
  --color-text-on-brand: var(--neutral-0);

  --color-header-bg: rgba(255, 255, 255, 0.9);
  --color-link: var(--color-primary);
  /* Brand blue used as TEXT. Split from --color-primary because the primary must stay constant
     across themes for brand surfaces, but as text on the dark background it lands at 2.43:1 —
     well under the 4.5:1 AA floor. The dark override keeps the same brand hue at 7.98:1. */
  --color-brand-text: var(--color-primary);
  --shadow-color: rgba(11, 16, 38, 0.12);
}

/* ============================================================
 * DARK THEME — surface/text flip to §2 dark neutrals; brand stays
 * ============================================================ */
:root[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: var(--neutral-900);
  --color-surface: var(--neutral-800);
  --color-surface-2: var(--neutral-600);
  --color-border: var(--neutral-600);

  --color-text: var(--neutral-100);
  --color-text-muted: var(--neutral-200);
  --color-text-on-brand: var(--neutral-0);

  --color-header-bg: rgba(11, 16, 38, 0.85);
  /* lighten the link on dark for contrast, still a §2 blue tint */
  --color-link: var(--blue-baby);
  --color-brand-text: var(--blue-baby);
  --shadow-color: rgba(0, 0, 0, 0.5);

  --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.7);
}
