/* =========================================================================
   Oli Design System — Color & Type tokens
   Source: Oli Foundation.fig · Inter + Geist · Lucide icons
   ========================================================================= */

/* ---- Fonts (Google Fonts fallback substitutes — flagged in README) ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Geist:wght@100;200;300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

:root {
  /* ===== Neutral (zinc-ish, warm gray) ===== */
  --neutral-50:  #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #747373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #181718;
  --neutral-950: #0a0a0a;

  /* ===== Primary (teal) — source: rgb(16,100,100) = #106464 @ 700 ===== */
  --primary-50:  #f2fbfb;
  --primary-100: #d7f6f6;
  --primary-200: #b0ecec;
  --primary-300: #7bdcdc;
  --primary-400: #3fc6c6;
  --primary-500: #1fa8a8;
  --primary-600: #158787;
  --primary-700: #106464;   /* brand primary */
  --primary-800: #0f4f4f;
  --primary-900: #0d3f3f;
  --primary-950: #061818;

  /* ===== Blue ===== */
  --blue-50:  #f1f2fb;
  --blue-100: #dde5f5;
  --blue-200: #b8cdee;
  --blue-300: #8bb0e3;
  --blue-400: #5eb1ef;
  --blue-500: #0588f0;   /* rgb(5,136,240) */
  --blue-600: #0d74ce;   /* rgb(13,116,206) */
  --blue-700: #1b5bb0;
  --blue-800: #173f88;
  --blue-900: #113264;   /* rgb(17,50,100) */
  --blue-950: #0c2142;   /* rgb(12,33,66) */

  /* ===== Green ===== */
  --green-50:  #f0f8f2;
  --green-100: #dcf1e0;
  --green-200: #b4e3bd;
  --green-300: #7fcf91;
  --green-400: #4ab36a;
  --green-500: #2b9a4a;
  --green-600: #1f7a3a;
  --green-700: #1a5f2f;
  --green-800: #164b28;
  --green-900: #0f3a1f;
  --green-950: #062e17;   /* rgb(6,46,23) */

  /* ===== Red ===== */
  --red-50:  #feeef0;
  --red-100: #fcd7db;
  --red-200: #f9b1b8;
  --red-300: #f58790;
  --red-400: #f87072;   /* rgb(248,112,114) */
  --red-500: #dc2628;   /* rgb(220,38,40) */
  --red-600: #b81e20;
  --red-700: #931a1c;
  --red-800: #6e1517;
  --red-900: #4a0f11;
  --red-950: #460a0b;   /* rgb(70,10,11) */

  /* ===== Yellow ===== */
  --yellow-50:  #fef7e6;
  --yellow-100: #fdebb8;
  --yellow-200: #fbd87a;
  --yellow-300: #f7bf3e;
  --yellow-400: #eaa213;
  --yellow-500: #c48309;
  --yellow-600: #9b6608;
  --yellow-700: #784e09;
  --yellow-800: #5a3b08;
  --yellow-900: #432b08;
  --yellow-950: #432007;

  /* ===== Accent / alt ===== */
  --cyan-500: #25e4e4;     /* rgb(37,228,228) — rare accent */
  --purple-500: #9747ff;   /* rgb(151,71,255) — rare accent */

  /* ===== Shadow bases ===== */
  --shadow-rgb: 0, 0, 0;
  --shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.10);
  --shadow-md: 0 2px 4px -1px rgba(0,0,0,0.10), 0 4px 6px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -4px rgba(0,0,0,0.06);
  --shadow-ring: 0 0 0 3px rgba(16,100,100,0.18);
  --shadow-inset: inset 0 1px 2px 0 rgba(0,0,0,0.06);

  /* ===== Radius scale ===== */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;     /* inputs */
  --radius-lg: 10px;    /* buttons */
  --radius-xl: 12px;    /* container group */
  --radius-2xl: 14px;   /* cards */
  --radius-3xl: 18px;   /* section frames */
  --radius-full: 9999px;

  /* ===== Spacing (4px base) ===== */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;

  /* ===== Semantic (Light mode) — shadcn-compatible ===== */
  --background: #ffffff;
  --foreground: var(--neutral-950);
  --card: #ffffff;
  --card-foreground: var(--neutral-950);
  --popover: #ffffff;
  --popover-foreground: var(--neutral-950);
  --primary: var(--primary-700);
  --primary-foreground: var(--neutral-50);
  --secondary: var(--neutral-100);
  --secondary-foreground: var(--neutral-950);
  --muted: var(--neutral-100);
  --muted-foreground: var(--neutral-500);
  --accent: var(--neutral-100);
  --accent-foreground: var(--neutral-900);
  --destructive: var(--red-500);
  --destructive-foreground: var(--neutral-50);
  --border: #e5e3e4;       /* rgb(229,227,228) */
  --input: #e5e3e4;
  --ring: var(--neutral-500);

  /* ===== Base type ===== */
  --font-sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Type scale (matches Figma Typography frame) */
  --text-xs: 12px;     --lh-xs: 16px;
  --text-sm: 14px;     --lh-sm: 20px;
  --text-base: 16px;   --lh-base: 24px;
  --text-lg: 18px;     --lh-lg: 28px;
  --text-xl: 20px;     --lh-xl: 28px;
  --text-2xl: 24px;    --lh-2xl: 32px;
  --text-3xl: 30px;    --lh-3xl: 36px;
  --text-4xl: 36px;    --lh-4xl: 40px;
  --text-5xl: 48px;    --lh-5xl: 48px;
  --text-6xl: 60px;    --lh-6xl: 60px;
  --text-7xl: 72px;    --lh-7xl: 72px;

  --tracking-tight: -0.4px;
  --tracking-normal: 0;
  --tracking-wide: 0.4px;
  --tracking-wider: 0.8px;
  --tracking-widest: 1.6px;
}

/* ===== Dark mode ===== */
.dark, [data-theme="dark"] {
  --background: var(--neutral-950);
  --foreground: var(--neutral-50);
  --card: var(--neutral-900);
  --card-foreground: var(--neutral-50);
  --popover: var(--neutral-800);
  --popover-foreground: var(--neutral-50);
  --primary: var(--primary-400);
  --primary-foreground: var(--neutral-900);
  --secondary: var(--neutral-800);
  --secondary-foreground: var(--neutral-50);
  --muted: var(--neutral-800);
  --muted-foreground: var(--neutral-400);
  --accent: var(--neutral-700);
  --accent-foreground: var(--neutral-50);
  --destructive: var(--red-400);
  --destructive-foreground: var(--neutral-50);
  --border: var(--neutral-700);
  --input: var(--neutral-900);
  --ring: var(--neutral-500);
}

/* ===== Semantic type helpers ===== */
.display-lg { font-family: var(--font-sans); font-weight: 700; font-size: var(--text-7xl); line-height: var(--lh-7xl); letter-spacing: var(--tracking-tight); }
.display    { font-family: var(--font-sans); font-weight: 700; font-size: var(--text-6xl); line-height: var(--lh-6xl); letter-spacing: var(--tracking-tight); }
.h1 { font-family: var(--font-sans); font-weight: 700; font-size: var(--text-5xl); line-height: var(--lh-5xl); letter-spacing: var(--tracking-tight); }
.h2 { font-family: var(--font-sans); font-weight: 700; font-size: var(--text-4xl); line-height: var(--lh-4xl); letter-spacing: -0.2px; }
.h3 { font-family: var(--font-sans); font-weight: 600; font-size: var(--text-3xl); line-height: var(--lh-3xl); }
.h4 { font-family: var(--font-sans); font-weight: 600; font-size: var(--text-2xl); line-height: var(--lh-2xl); }
.h5 { font-family: var(--font-sans); font-weight: 600; font-size: var(--text-xl);  line-height: var(--lh-xl); }
.body-lg { font-family: var(--font-body); font-size: var(--text-lg); line-height: var(--lh-lg); }
.body    { font-family: var(--font-body); font-size: var(--text-base); line-height: var(--lh-base); }
.body-sm { font-family: var(--font-body); font-size: var(--text-sm); line-height: var(--lh-sm); }
.caption { font-family: var(--font-body); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--muted-foreground); }
.code    { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--lh-sm); }
.label   { font-family: var(--font-body); font-weight: 500; font-size: var(--text-sm); line-height: var(--lh-sm); }

/* ===== Primitive resets for preview cards ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font-body); color: var(--foreground); background: var(--background); -webkit-font-smoothing: antialiased; }
