/*
 * Design tokens, taken 1:1 from ultrafastsearch.com (:root of critical-bundle.min.css),
 * so the platform and the website share one visual language.
 * Light is the default theme; dark is derived from the website's hero colours.
 */
:root {
  /* brand */
  --color-primary: #4F46E5;
  --color-primary-dark: #4338CA;
  --color-primary-light: #6366F1;
  --color-secondary: #7C3AED;
  --color-gradient: linear-gradient(135deg, #4F46E5, #7C3AED);
  --color-gradient-hover: linear-gradient(135deg, #4338CA, #6D28D9);
  --color-primary-a10: rgba(79, 70, 229, 0.1);
  --color-primary-a20: rgba(79, 70, 229, 0.2);

  /* status */
  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-success-text: #047857;
  --color-danger: #EF4444;
  --color-danger-light: #FEE2E2;
  --color-danger-text: #B91C1C;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-warning-text: #B45309;
  --color-info: #3B82F6;
  --color-info-light: #DBEAFE;
  --color-info-text: #1D4ED8;

  /* surfaces */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-muted: #F1F5F9;
  --bg-purple-tint: #F5F3FF;
  --bg-sidebar: #FFFFFF;
  --bg-hero: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%);
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  /* text */
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-on-brand: #FFFFFF;
  --text-link: #4F46E5;

  /* type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --leading-tight: 1.2;
  --leading-normal: 1.5;

  /* shape */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.08);

  /* chart */
  --chart-bar: #6366F1;
  --chart-bar-muted: #C7D2FE;
  --chart-grid: #E2E8F0;
  /* A second series drawn OVER the bars (e.g. click rate %): deliberately not
     a shade of the bar colour, or the line reads as part of them. */
  --chart-line: #0F9D6B;

  color-scheme: light;
}

/* Dark: the website's hero palette (#0F172A / #1E293B / #312E81) as surfaces. */
:root[data-theme="dark"] {
  --color-primary: #818CF8;
  --color-primary-dark: #6366F1;
  --color-primary-light: #A5B4FC;
  --color-primary-a10: rgba(129, 140, 248, 0.12);
  --color-primary-a20: rgba(129, 140, 248, 0.22);

  --color-success-light: rgba(16, 185, 129, 0.15);
  --color-success-text: #6EE7B7;
  --color-danger-light: rgba(239, 68, 68, 0.15);
  --color-danger-text: #FCA5A5;
  --color-warning-light: rgba(245, 158, 11, 0.15);
  --color-warning-text: #FCD34D;
  --color-info-light: rgba(59, 130, 246, 0.15);
  --color-info-text: #93C5FD;

  --bg-page: #0B1120;
  --bg-surface: #111A2E;
  --bg-muted: #1E293B;
  --bg-purple-tint: rgba(124, 58, 237, 0.12);
  --bg-sidebar: #0F172A;
  --border: #1E293B;
  --border-strong: #334155;

  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-link: #A5B4FC;

  --shadow-sm: none;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);

  --chart-bar: #818CF8;
  --chart-bar-muted: #312E81;
  --chart-grid: #1E293B;
  --chart-line: #34D399;

  color-scheme: dark;
}

/*
 * "Electric" identity: three promises, three signals (see electric.css).
 *   FAST  amber  — speed only      EXACT teal — accuracy/success      FOUND violet — discovery
 */
:root {
  --grad-brand: linear-gradient(120deg, #4F46E5 0%, #7C3AED 55%, #A855F7 100%);
  --grad-brand-soft: linear-gradient(120deg, rgba(79, 70, 229, 0.10), rgba(124, 58, 237, 0.10));
  --night: #1E1B4B;
  --night-deep: #140F3D;
  --sig-fast: #F59E0B;  --sig-fast-soft: rgba(245, 158, 11, 0.14);  --sig-fast-ink: #B45309;
  --sig-exact: #14B8A6; --sig-exact-soft: rgba(20, 184, 166, 0.14); --sig-exact-ink: #0F766E;
  --sig-found: #7C3AED; --sig-found-soft: rgba(124, 58, 237, 0.12); --sig-found-ink: #6D28D9;
  --ease-fast: cubic-bezier(0.2, 0.8, 0.2, 1);
}
:root[data-theme="dark"] {
  --grad-brand-soft: linear-gradient(120deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.16));
  --sig-fast-ink: #FCD34D; --sig-exact-ink: #5EEAD4; --sig-found-ink: #C4B5FD;
}
