@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.992 0.002 250);
  --foreground: oklch(0.21 0.015 260);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.21 0.015 260);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.21 0.015 260);
  --primary: oklch(0.47 0.15 255);
  --primary-foreground: oklch(0.99 0.005 250);
  --secondary: oklch(0.955 0.005 250);
  --secondary-foreground: oklch(0.25 0.015 260);
  --muted: oklch(0.96 0.004 250);
  --muted-foreground: oklch(0.47 0.015 260);
  --accent: oklch(0.955 0.006 250);
  --accent-foreground: oklch(0.25 0.015 260);
  --destructive: oklch(0.55 0.21 27);
  --destructive-foreground: oklch(0.99 0.005 250);
  --border: oklch(0.90 0.006 250);
  --input: oklch(0.88 0.006 250);
  --ring: oklch(0.47 0.15 255);
  --success: oklch(0.52 0.14 150);
  --warning: oklch(0.62 0.15 70);
  --chart-1: oklch(0.47 0.15 255);
  --chart-2: oklch(0.65 0.11 250);
  --chart-3: oklch(0.52 0.14 150);
  --chart-4: oklch(0.62 0.15 70);
  --chart-5: oklch(0.55 0.02 260);
  --sidebar: oklch(0.975 0.004 250);
  --sidebar-foreground: oklch(0.21 0.015 260);
  --sidebar-primary: oklch(0.47 0.15 255);
  --sidebar-primary-foreground: oklch(0.99 0.005 250);
  --sidebar-accent: oklch(0.93 0.008 250);
  --sidebar-accent-foreground: oklch(0.21 0.015 260);
  --sidebar-border: oklch(0.90 0.006 250);
  --sidebar-ring: oklch(0.47 0.15 255);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.965 0.004 250);
  --surface-hover:   color-mix(in srgb, var(--foreground) 5%,  var(--background));
  --surface-active:  color-mix(in srgb, var(--foreground) 9%, var(--background));
  --surface-elevated: oklch(1 0 0);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.95 0.004 250);
  --border-muted: oklch(0.93 0.005 250);
  --border-strong: oklch(0.78 0.01 250);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.38 0.015 260);

  /* ── primary depth (hover/tint states for brand colour) ─────── */
  --primary-hover: color-mix(in srgb, var(--primary) 88%, var(--foreground));
  --primary-muted: color-mix(in srgb, var(--primary) 14%, var(--background));
  --primary-soft:  color-mix(in srgb, var(--primary) 8%,  var(--background));
  --primary-tint:  color-mix(in srgb, var(--primary) 5%,  var(--background));

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: oklch(0.47 0.15 255 / 0.35);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.55 0.21 27);
  --error-foreground: oklch(0.99 0.005 250);

  /* ── radius ───────────────────────────────────────────────────── */
  --radius: 0.375rem;
  --radius-none: 0rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.625rem;
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: "Instrument Sans", "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 600;
  --line-height-display: 1.15;
  --tracking-display: -0.015em;
  --font-weight-body: 400;
  --line-height-body: 1.55;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, 0.05);
  --shadow-md: 0 4px 12px rgba(20, 24, 40, 0.07);
  --shadow-lg: 0 12px 32px rgba(20, 24, 40, 0.10);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 100ms;
  --duration-normal: 180ms;
  --duration-slow: 280ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);

  /* ── spacing ──────────────────────────────────────────────────── */
  --spacing-base: 0.25rem;
}

.dark {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.17 0.01 260);
  --foreground: oklch(0.95 0.005 250);
  --card: oklch(0.21 0.01 260);
  --card-foreground: oklch(0.95 0.005 250);
  --popover: oklch(0.21 0.01 260);
  --popover-foreground: oklch(0.95 0.005 250);
  --primary: oklch(0.72 0.13 250);
  --primary-foreground: oklch(0.15 0.02 260);
  --secondary: oklch(0.27 0.01 260);
  --secondary-foreground: oklch(0.95 0.005 250);
  --muted: oklch(0.26 0.01 260);
  --muted-foreground: oklch(0.73 0.01 260);
  --accent: oklch(0.27 0.01 260);
  --accent-foreground: oklch(0.95 0.005 250);
  --destructive: oklch(0.68 0.19 25);
  --destructive-foreground: oklch(0.15 0.02 260);
  --border: oklch(1 0 0 / 11%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.72 0.13 250);
  --success: oklch(0.72 0.14 150);
  --warning: oklch(0.78 0.14 75);
  --chart-1: oklch(0.72 0.13 250);
  --chart-2: oklch(0.58 0.12 255);
  --chart-3: oklch(0.72 0.14 150);
  --chart-4: oklch(0.78 0.14 75);
  --chart-5: oklch(0.65 0.02 260);
  --sidebar: oklch(0.15 0.01 260);
  --sidebar-foreground: oklch(0.95 0.005 250);
  --sidebar-primary: oklch(0.72 0.13 250);
  --sidebar-primary-foreground: oklch(0.15 0.02 260);
  --sidebar-accent: oklch(0.24 0.01 260);
  --sidebar-accent-foreground: oklch(0.95 0.005 250);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.72 0.13 250);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.20 0.01 260);
  --surface-elevated: oklch(0.26 0.01 260);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(1 0 0 / 6%);
  --border-muted: oklch(1 0 0 / 8%);
  --border-strong: oklch(1 0 0 / 22%);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.80 0.008 260);

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-tint: color-mix(in srgb, var(--primary) 8%, var(--background));

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.72 0.13 250 / 0.45);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.68 0.19 25);
  --error-foreground: oklch(0.15 0.02 260);
}
