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

:root {
  /* ── shadcn base tokens — warm cream paper, evergreen, cranberry, gold ── */
  --background: oklch(0.972 0.014 85);
  --foreground: oklch(0.22 0.03 155);
  --card: oklch(0.99 0.008 88);
  --card-foreground: oklch(0.22 0.03 155);
  --popover: oklch(0.99 0.008 88);
  --popover-foreground: oklch(0.22 0.03 155);
  --primary: oklch(0.36 0.075 155);
  --primary-foreground: oklch(0.975 0.014 85);
  --secondary: oklch(0.92 0.022 82);
  --secondary-foreground: oklch(0.26 0.03 155);
  --muted: oklch(0.935 0.018 85);
  --muted-foreground: oklch(0.44 0.03 70);
  --accent: oklch(0.925 0.025 82);
  --accent-foreground: oklch(0.26 0.03 155);
  --destructive: oklch(0.48 0.17 22);
  --destructive-foreground: oklch(0.975 0.014 85);
  --border: oklch(0.86 0.025 80);
  --input: oklch(0.86 0.025 80);
  --ring: oklch(0.6 0.1 80);
  --success: oklch(0.5 0.1 150);
  --warning: oklch(0.72 0.13 78);
  --chart-1: oklch(0.36 0.075 155);
  --chart-2: oklch(0.48 0.17 22);
  --chart-3: oklch(0.72 0.13 78);
  --chart-4: oklch(0.55 0.06 60);
  --chart-5: oklch(0.62 0.07 150);
  --sidebar: oklch(0.25 0.04 155);
  --sidebar-foreground: oklch(0.95 0.015 85);
  --sidebar-primary: oklch(0.78 0.12 82);
  --sidebar-primary-foreground: oklch(0.22 0.03 155);
  --sidebar-accent: oklch(0.31 0.04 155);
  --sidebar-accent-foreground: oklch(0.97 0.014 85);
  --sidebar-border: oklch(0.34 0.04 155);
  --sidebar-ring: oklch(0.78 0.12 82);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.945 0.018 84);
  --surface-hover:   color-mix(in srgb, var(--foreground) 6%,  var(--background));
  --surface-active:  color-mix(in srgb, var(--foreground) 10%, var(--background));
  --surface-elevated: oklch(0.995 0.006 88);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.93 0.016 84);
  --border-muted: oklch(0.9 0.02 82);
  --border-strong: oklch(0.74 0.04 78);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.36 0.03 120);

  /* ── 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) 15%, 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.6 0.1 80 / 0.45);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.48 0.17 22);
  --error-foreground: oklch(0.975 0.014 85);

  /* ── radius — soft, card-stock corners ────────────────────────── */
  --radius: 0.375rem;
  --radius-none: 0rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 500;
  --line-height-display: 1.08;
  --tracking-display: -0.015em;
  --font-weight-body: 400;
  --line-height-body: 1.55;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows — warm, candlelit ────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0.3 0.04 70 / 0.08);
  --shadow-md: 0 4px 14px oklch(0.3 0.04 70 / 0.12);
  --shadow-lg: 0 14px 36px oklch(0.3 0.04 70 / 0.18);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 220ms;
  --duration-slow: 360ms;
  --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 — deep evergreen night, gold primary ──── */
  --background: oklch(0.19 0.03 155);
  --foreground: oklch(0.955 0.014 85);
  --card: oklch(0.235 0.035 155);
  --card-foreground: oklch(0.955 0.014 85);
  --popover: oklch(0.235 0.035 155);
  --popover-foreground: oklch(0.955 0.014 85);
  --primary: oklch(0.8 0.12 82);
  --primary-foreground: oklch(0.2 0.03 155);
  --secondary: oklch(0.29 0.035 155);
  --secondary-foreground: oklch(0.955 0.014 85);
  --muted: oklch(0.28 0.03 155);
  --muted-foreground: oklch(0.78 0.03 85);
  --accent: oklch(0.3 0.035 155);
  --accent-foreground: oklch(0.955 0.014 85);
  --destructive: oklch(0.66 0.17 22);
  --destructive-foreground: oklch(0.975 0.014 85);
  --border: oklch(1 0 0 / 12%);
  --input: oklch(1 0 0 / 16%);
  --ring: oklch(0.8 0.12 82);
  --success: oklch(0.72 0.12 150);
  --warning: oklch(0.82 0.13 80);
  --chart-1: oklch(0.8 0.12 82);
  --chart-2: oklch(0.68 0.17 22);
  --chart-3: oklch(0.72 0.12 150);
  --chart-4: oklch(0.7 0.06 60);
  --chart-5: oklch(0.6 0.07 150);
  --sidebar: oklch(0.165 0.028 155);
  --sidebar-foreground: oklch(0.955 0.014 85);
  --sidebar-primary: oklch(0.8 0.12 82);
  --sidebar-primary-foreground: oklch(0.2 0.03 155);
  --sidebar-accent: oklch(0.24 0.035 155);
  --sidebar-accent-foreground: oklch(0.975 0.014 85);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.8 0.12 82);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.215 0.03 155);
  --surface-elevated: oklch(0.275 0.035 155);

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

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.84 0.02 85);

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

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.8 0.12 82 / 0.5);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.7 0.17 22);
  --error-foreground: oklch(0.2 0.03 155);
}
