/* SystemBlueprint design tokens — the single source of truth for the visual language.
   Colour system: neutral slate for structure, one blue accent for action and emphasis.
   Text contrast meets WCAG AA (4.5:1) on body text in both themes.
   Checkpoint of the previous slate scheme: tokens.slate.checkpoint.css */


/* Geist (Vercel, Google Fonts) is the primary typeface. The font request is in index.html
   <head> (not @import here) so it downloads in parallel. The system stack below is the fallback. */

:root {
  /* Type — Geist primary, system fallback */
  --font-display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "SFMono-Regular", monospace;

  /* Smaller, tighter, sharper scale (Apple-like) */
  --step--1: clamp(0.76rem, 0.74rem + 0.1vw, 0.8rem);
  --step-0: clamp(0.9rem, 0.87rem + 0.14vw, 0.95rem);
  --step-1: clamp(1.05rem, 0.98rem + 0.3vw, 1.18rem);
  --step-2: clamp(1.3rem, 1.12rem + 0.7vw, 1.6rem);
  --step-3: clamp(1.65rem, 1.35rem + 1.3vw, 2.2rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.6vw, 3.4rem);

  /* Weights — restrained, professional (regular body, selective emphasis) */
  --fw-body: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 650;

  /* Space */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4.5rem;

  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --maxw: 100%;          /* app shell spans the full viewport */
  --shell-pad: clamp(1.25rem, 3vw, 3rem);
  --readw: 70ch;         /* comfortable measure for prose only */
  --sidebar-w: 280px;
  --outline-w: 240px;
  --outline-tab: 40px;   /* thin strip holding the "On this page" toggle */
  --topbar-h: 54px;      /* slimmer top menu */

  --transition: 200ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================== DARK THEME (deep navy ink, blue accent) ===================== */
:root, [data-theme="dark"] {
  --bg: #0b1220;                 /* deep navy canvas */
  --bg-tint: #0f1729;
  --bg-elev: #111a2e;            /* panels and cards */
  --bg-elev-2: #16213a;
  --bg-elev-3: #1c2842;          /* hover and nested surfaces */
  --line: #24314d;
  --line-soft: #1b2640;
  --text: #cbd5e1;               /* body text (slate-300) */
  --text-strong: #f8fafc;        /* headings */
  --muted: #94a3b8;              /* secondary text (slate-400) */
  --muted-2: #64748b;            /* captions and labels */

  --accent: #60a5fa;             /* blue-400: links, active states, focus */
  --accent-2: #3b82f6;           /* blue-500: pressed and gradient middle */
  --accent-3: #93c5fd;           /* blue-300: gradient end, highlights */
  --accent-ink: #0b1220;         /* text on accent fills */
  --accent-soft: rgba(96, 165, 250, 0.14);
  --label-bg: #1e40af;           /* blue-800: TL;DR and Interview lens labels on navy */
  --label-ink: #ffffff;

  --warn: #fbbf24;
  --danger: #f87171;
  --ok: #4ade80;

  --code-bg: #070d1a;

  --grad-brand: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 100%);
  --grad-text: linear-gradient(120deg, var(--text-strong) 0%, var(--accent) 100%);
  --grad-surface: linear-gradient(180deg, var(--bg-elev-2) 0%, var(--bg-elev) 70%);

  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.4);
  --shadow: 0 10px 28px -12px rgba(2, 6, 23, 0.7);
  --shadow-lg: 0 24px 56px -20px rgba(2, 6, 23, 0.8);
  --glow: 0 0 48px -18px rgba(96, 165, 250, 0.35);
  --ring: 0 0 0 3px rgba(96, 165, 250, 0.35);

  color-scheme: dark;
}

/* ===================== LIGHT THEME (cool slate neutrals, blue accent) ===================== */
[data-theme="light"] {
  --bg: #f5f7fa;                 /* cool canvas */
  --bg-tint: #eef2f6;
  --bg-elev: #ffffff;            /* white panels and cards */
  --bg-elev-2: #ffffff;
  --bg-elev-3: #f1f5f9;          /* hover and nested surfaces */
  --line: #e2e8f0;               /* slate-200 borders */
  --line-soft: #edf2f7;
  --text: #334155;               /* slate-700 body text */
  --text-strong: #0f172a;        /* slate-900 headings */
  --muted: #64748b;              /* slate-500 secondary text */
  --muted-2: #718096;            /* captions and labels */

  --accent: #1e40af;             /* blue-800: links and actions */
  --accent-2: #1e3a8a;           /* blue-900: hover and pressed */
  --accent-3: #3b82f6;           /* blue-500: gradient end, highlights */
  --accent-ink: #ffffff;         /* text on accent fills */
  --accent-soft: #eff6ff;        /* blue-50: active nav and chips */
  --label-bg: #1e3a8a;           /* blue-900: TL;DR and Interview lens labels */
  --label-ink: #ffffff;

  --warn: #b45309;               /* amber-700, 5.0:1 on white */
  --danger: #b91c1c;             /* red-700 */
  --ok: #15803d;                 /* green-700 */

  --code-bg: #0f172a;            /* slate-900 code panels */

  --grad-brand: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 100%);
  --grad-text: linear-gradient(120deg, var(--text-strong) 0%, var(--accent-2) 100%);
  --grad-surface: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.12), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 44px -16px rgba(15, 23, 42, 0.18);
  --glow: none;
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.25);

  color-scheme: light;
}

/* Phones and small tablets: the desktop scale is too small there (body was ~14px).
   Body text becomes 16px, with the other steps scaled to match. */
@media (max-width: 720px) {
  :root {
    --step--1: 0.9rem;
    --step-0: 1rem;
    --step-1: 1.125rem;
    --step-2: 1.35rem;
    --step-3: 1.7rem;
    --step-4: 2.1rem;
  }
}
