/* ===============================================================
   VENDORED COPY - canonical source: genesis-brain repo,
   design-tokens/tokens.css, synced from commit fb1bae0 (2026-09-03).
   Do not hand-edit this file directly; edit the source in
   genesis-brain and re-sync (see genesis-brain/design-tokens/README.md).
   =============================================================== */
/* ===============================================================
   Genesis Design Tokens - SHARED, canonical source of truth
   Source commit: genesis-brain-portal app/globals.css (lines 11-205,
   207-307 of the version live as of 2026-09-03, commit range around
   the P1 palette-freeze work). Do NOT hand-edit a token value here
   without also updating genesis-brain-portal/app/globals.css and
   re-syncing every consumer's vendored copy (see README.md in this
   directory for the sync procedure and the list of consumers).

   This file intentionally carries ONLY the palette-frozen core token
   set every Genesis app can use: surfaces, text, accent, semantic
   colors, the six-stop categorical ramp, shadows, radii, spacing,
   and font-family variables. It deliberately does NOT include:
     - the --nav-ai-N / --nav-platform-N per-section sidebar rails
       (Brain Portal's own ~30-section identity system, palette-
       frozen to Brain Portal specifically - see globals.css's own
       comment. A consumer with only a handful of nav groups should
       pick stops off --cat-1..6 instead, not import this system.)
     - the P0 compatibility shim aliases (--card-bg, --border-color,
       --text-primary, etc.) - legacy-only, Brain-Portal-specific
     - --external-accent / --external-accent-light - Brain Portal's
       customer-facing sign-in identity, not a shared concept
   =============================================================== */

:root {
  /* Surfaces */
  --bg-app:        #F0EEE6;
  --bg-surface:    #FFFFFF;
  --bg-surface-2:  #FAF9F4;
  --bg-sunken:     #E7E4DA;
  --border:        #DBD7CB;
  --border-strong: #C8C3B3;

  /* Text */
  --text:           #1F1E1B;
  --text-secondary: #6E6B62;
  --text-muted:     #9A968C;

  /* Accent - coral */
  --accent:       #CC785C;
  --accent-hover: #B5634A;
  --accent-soft:  #F4E7E0;
  --accent-text:  #A8492B;

  /* Semantic */
  --success: #3C8B5F;
  --warning: #B07A2E;
  --danger:  #C0492F;
  --info:    #3E6EA0;
  --focus:   rgba(204,120,92,.35);

  --success-soft: #DCFCE7;
  --warning-soft: #F3E7CE;
  --danger-soft:  #FBE2DC;
  --info-soft:    #EEF2FF;

  /* Categorical ramp - six stops + softs. Use for anything that
     distinguishes *kind*, not *state*. Palette-frozen. */
  --cat-1: #0D9488;  /* teal */
  --cat-1-soft: #CCFBF1;
  --cat-2: #7C3AED;  /* violet */
  --cat-2-soft: #EDE9FE;
  --cat-3: #2563EB;  /* blue */
  --cat-3-soft: #DBEAFE;
  --cat-4: #D97706;  /* amber */
  --cat-4-soft: #FEF3C7;
  --cat-5: #0891B2;  /* cyan */
  --cat-5-soft: #CFFAFE;
  --cat-6: #DB2777;  /* rose */
  --cat-6-soft: #FCE7F3;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(31,30,27,.05);
  --shadow-md: 0 2px 10px rgba(31,30,27,.07);
  --shadow-lg: 0 12px 38px rgba(31,30,27,.12);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Spacing - 4px base scale, naming = px-4 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Typography - populated by next/font in apps that use it (Brain
     Portal); apps loading the fonts via a <link> tag (cdn-portal)
     just get the literal family name as the fallback. */
  --font-display: var(--font-newsreader, 'Newsreader'), Georgia, serif;
  --font-ui:      var(--font-hanken, 'Hanken Grotesk'), system-ui, sans-serif;
  --font-mono:    var(--font-jetbrains, 'JetBrains Mono'), ui-monospace, monospace;

  /* Legacy brand token kept in the shared set because more than one
     consumer references it directly (Brain Portal's .btn-brain,
     sidebar avatar chip). */
  --brain-teal: #0D9488;
  --brain-teal-light: #14B8A6;
}

[data-theme="dark"] {
  --bg-app:        #262523;
  --bg-surface:    #302F2C;
  --bg-surface-2:  #35332F;
  --bg-sunken:     #1E1D1B;
  --border:        #3D3B36;
  --border-strong: #504D46;

  --text:           #F3F1EA;
  --text-secondary: #ABA79C;
  --text-muted:     #7C7970;

  --accent:       #CE805E;
  --accent-hover: #DD9374;
  --accent-soft:  #3A2C24;
  --accent-text:  #E2A487;

  --success: #5FAE80;
  --warning: #C99A52;
  --danger:  #D9745B;
  --info:    #4A85B8;
  --focus:   rgba(206,128,94,.45);

  --success-soft: #17301F;
  --warning-soft: #33290F;
  --danger-soft:  #33201A;
  --info-soft:    #1E2A3A;

  --cat-1: #2DD4BF; --cat-1-soft: #113B36;
  --cat-2: #A78BFA; --cat-2-soft: #2C2350;
  --cat-3: #60A5FA; --cat-3-soft: #1D2F4D;
  --cat-4: #FBBF24; --cat-4-soft: #3A2A10;
  --cat-5: #22D3EE; --cat-5-soft: #113640;
  --cat-6: #F472B6; --cat-6-soft: #3B1830;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 2px 12px rgba(0,0,0,.35);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.5);
}
