@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

* {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

:root {
  /* ── Core palette ─────────────────────────────── */
  --blue: #3b82f6;
  --indigo: #6366f1;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --yellow-light: #fde68a;
  --green: #22c55e;
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --black: #000;
  --white: #fff;
  --gray: #6b7280;
  --gray-light: #9ca3af;
  --gray-dark: #374151;

  /* ── Brand / Theme tokens ─────────────────────── */
  --primary: #7c3aed;
  --primary-2: #4f46e5;
  --primary-soft: #efe7fd;
  --primary-strong: #442082;
  --secondary: #a78bfa;
  --highlight: #06b6d4;
  --text-color: #1f2937;
  --text-color-light: #6b7280;
  --text-color-dark: #111827;
  --text-muted: #9ca3af;
  --link: #6366f1;
  --nav-color: #e0e7ff;
  --nav-color-hover: #ffffff;
  --bg-color: #f9fafb;
  --bg-color-distinct: #ede9fe;
  --bg-footer: #111827;
  --bg-footer-foot: #030712;

  --bg-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);

  /* Navigation chrome (header + sidenav) background. Defaults to the brand
     gradient, but decoupled from it so a theme whose --primary is light (e.g.
     black_white's white buttons) can still have DARK chrome. */
  --chrome-bg: var(--bg-gradient);
  /* Flat (non-gradient) chrome — used when the theme editor's Background
     toggle is set to Flat. Solid brand colour for most themes; a dark solid
     where --primary is light. */
  --chrome-flat: var(--primary);
  /* Overlays/text ON chrome (hover/active fill, hairline borders, muted labels).
     Default white-based — correct for brand/dark chrome. A theme with LIGHT chrome
     (e.g. cloud_light, Cloudflare-style) flips these to black-based so hover, borders
     and muted text are visible on a light sidenav/header. */
  --chrome-overlay: rgba(255,255,255,0.10);
  --chrome-border: rgba(255,255,255,0.08);
  --chrome-text-muted: rgba(255,255,255,0.55);

  /* Public sticky header. Defaults to a theme-aware frosted --surface bar (light
     on light themes, dark on dark). Switchable per-theme via the theme editor's
     Header-style toggle (Frosted Light / Branded / Solid Dark / Frosted Dark),
     which repoints these four tokens — keep header bg/text/border driven only by
     these so a switch never leaves unreadable text on the bar. */
  --public-header-bg: color-mix(in srgb, var(--surface) 90%, transparent);
  --public-header-text: var(--text-color);
  --public-header-text-strong: var(--text-color-dark);
  --public-header-border: var(--border);

  /* ── Semantic surfaces / borders (theme-controlled) ── */
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f3f4f6;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  /* ── On-colour foregrounds (text that sits on a filled surface) ── */
  --on-primary: #ffffff;
  --on-secondary: var(--text-color-dark);
  --on-success: #ffffff;
  --on-danger: #ffffff;
  --on-warning: #7c2d12;
  --on-info: #ffffff;
  --on-highlight: #ffffff;
  --on-dark: #ffffff;

  /* ── Status colours (platform standard) ───────── */
  --info: #818cf8;
  --warning: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --light: var(--surface-3);
  --dark: #1e1b4b;
  --limegreen: #22c55e;
  --lightyellow: var(--warning-bg);

  /* ── Status tint pairs (soft bg + readable text) ── */
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --danger-bg: #fee2e2;
  --danger-text: #b91c1c;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --info-bg: #eff6ff;
  --info-text: #1d4ed8;
  --info-accent: #2563eb;

  /* ── Breakpoints ──────────────────────────────── */
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;

  /* ── Typography ───────────────────────────────── */
  --font-family-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;

  /* ── Elevation / Shadows ─────────────────────── */
  --shadow-xs:  0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm:  0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl:  0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

  /* ── Focus ring (brand-tinted — derived from theme colours) ── */
  --ring-color: color-mix(in srgb, var(--primary) 14%, transparent);
  --ring-color-danger: color-mix(in srgb, var(--danger) 14%, transparent);

  /* ── Border radius ────────────────────────────── */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* ── Transitions ──────────────────────────────── */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base typography ─────────────────────────────── */
body {
  font-family: var(--font-family-sans-serif);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-color-dark);
  letter-spacing: -0.01em;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary);
}

p {
  margin-bottom: 0.75rem;
  line-height: 1.65;
}
