/* Verbatim copy of _CLAUDE_CODE/BRAND_BUNDLE/_contract/tokens.css (copied 2026-09-24).
   Do not edit here; edit the contract and re-copy. */

/* ============================================================================
   RRFlows token contract. Canonical shape for ALL NEW work.
   Authored 2026-08-04. Binds new products only; existing products are frozen
   legacy (see _contract/README.md for which product uses which convention).

   This file is the contract. Prose describing it is a summary, not the source.
   A brand bundle overrides the VALUES in the :root / theme blocks and keeps
   every SLOT NAME identical. Never rename a slot per client.

   Theme rule, added because a controlled A/B test on 2026-08-04 found that a
   hardcoded dark palette caused 3/3 agent builds to ship dark-only where 3/3
   control builds shipped both. Light is the default; dark arrives via the OS
   preference AND an explicit [data-theme] attribute so a UI toggle can win.
   ========================================================================= */

:root {
  /* --- Surfaces ------------------------------------------------------- */
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-surface-raised: #ffffff;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --color-border-focus: #2563eb;

  /* --- Text ----------------------------------------------------------- */
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-subtle: #64748b;

  /* --- Accent --------------------------------------------------------- */
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-active: #1e40af;
  --color-accent-tint: #eff6ff;
  --color-accent-foreground: #ffffff;

  /* --- Status --------------------------------------------------------- */
  --color-success: #047857;
  --color-success-bg: #ecfdf5;
  --color-warning: #b45309;
  --color-warning-bg: #fffbeb;
  --color-danger: #b91c1c;
  --color-danger-bg: #fef2f2;
  --color-info: #0369a1;
  --color-info-bg: #f0f9ff;

  /* --- Charts. Categorical series; see the built-in dataviz skill for
         when to use sequential vs diverging instead. -------------------- */
  --color-chart-1: #2563eb;
  --color-chart-2: #0d9488;
  --color-chart-3: #b45309;
  --color-chart-4: #7c3aed;
  --color-chart-5: #be123c;
  --color-chart-6: #4d7c0f;
  --color-chart-grid: #e2e8f0;
  --color-chart-axis: #94a3b8;

  /* --- Spacing. T-shirt keying is the contract. Numeric keying
         (--space-1..40) is legacy on the RRFlows marketing site. -------- */
  --space-2xs: 0.125rem;  /*  2px */
  --space-xs:  0.25rem;   /*  4px */
  --space-sm:  0.5rem;    /*  8px */
  --space-md:  1rem;      /* 16px */
  --space-lg:  1.5rem;    /* 24px */
  --space-xl:  2rem;      /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */

  /* --- Type ----------------------------------------------------------- */
  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Roboto Mono', monospace;
  --font-size-xs:  0.75rem;
  --font-size-sm:  0.875rem;
  --font-size-md:  1rem;
  --font-size-lg:  1.25rem;
  --font-size-xl:  1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --line-height-tight: 1.15;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* --- Shape and depth ------------------------------------------------ */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow-md: 0 4px 12px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 12px 32px rgb(15 23 42 / 0.12);

  /* --- Motion. Every consumer must honour prefers-reduced-motion. ------ */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark theme: OS preference, unless an explicit light toggle overrides. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-bg: #0b1120;
    --color-surface: #131a2a;
    --color-surface-raised: #1b2437;
    --color-border: #26314a;
    --color-border-strong: #38455f;
    --color-border-focus: #60a5fa;

    --color-text: #f1f5f9;
    --color-text-muted: #a9b4c6;
    --color-text-subtle: #8794aa;

    --color-accent: #60a5fa;
    --color-accent-hover: #93c5fd;
    --color-accent-active: #bfdbfe;
    --color-accent-tint: #172554;
    --color-accent-foreground: #0b1120;

    --color-success: #34d399;
    --color-success-bg: #042f22;
    --color-warning: #fbbf24;
    --color-warning-bg: #3a2a06;
    --color-danger: #f87171;
    --color-danger-bg: #3d1114;
    --color-info: #7dd3fc;
    --color-info-bg: #082f49;

    --color-chart-1: #60a5fa;
    --color-chart-2: #2dd4bf;
    --color-chart-3: #fbbf24;
    --color-chart-4: #c4b5fd;
    --color-chart-5: #fb7185;
    --color-chart-6: #a3e635;
    --color-chart-grid: #26314a;
    --color-chart-axis: #64748b;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 12px rgb(0 0 0 / 0.45);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.55);
  }
}

/* Explicit dark toggle wins over an OS light preference. */
:root[data-theme='dark'] {
  --color-bg: #0b1120;
  --color-surface: #131a2a;
  --color-surface-raised: #1b2437;
  --color-border: #26314a;
  --color-border-strong: #38455f;
  --color-border-focus: #60a5fa;

  --color-text: #f1f5f9;
  --color-text-muted: #a9b4c6;
  --color-text-subtle: #8794aa;

  --color-accent: #60a5fa;
  --color-accent-hover: #93c5fd;
  --color-accent-active: #bfdbfe;
  --color-accent-tint: #172554;
  --color-accent-foreground: #0b1120;

  --color-success: #34d399;
  --color-success-bg: #042f22;
  --color-warning: #fbbf24;
  --color-warning-bg: #3a2a06;
  --color-danger: #f87171;
  --color-danger-bg: #3d1114;
  --color-info: #7dd3fc;
  --color-info-bg: #082f49;

  --color-chart-1: #60a5fa;
  --color-chart-2: #2dd4bf;
  --color-chart-3: #fbbf24;
  --color-chart-4: #c4b5fd;
  --color-chart-5: #fb7185;
  --color-chart-6: #a3e635;
  --color-chart-grid: #26314a;
  --color-chart-axis: #64748b;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.55);
}
