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

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.975 0.022 85);
  --foreground: oklch(0.25 0.035 45);
  --card: oklch(0.992 0.01 85);
  --card-foreground: oklch(0.25 0.035 45);
  --popover: oklch(0.992 0.01 85);
  --popover-foreground: oklch(0.25 0.035 45);
  --primary: oklch(0.55 0.19 30);
  --primary-foreground: oklch(0.99 0.01 85);
  --secondary: oklch(0.93 0.04 55);
  --secondary-foreground: oklch(0.28 0.05 40);
  --muted: oklch(0.945 0.025 80);
  --muted-foreground: oklch(0.47 0.035 50);
  --accent: oklch(0.93 0.1 95);
  --accent-foreground: oklch(0.28 0.05 70);
  --destructive: oklch(0.5 0.21 22);
  --destructive-foreground: oklch(0.99 0.01 85);
  --border: oklch(0.88 0.035 70);
  --input: oklch(0.85 0.04 70);
  --ring: oklch(0.55 0.19 30);
  --success: oklch(0.56 0.13 150);
  --warning: oklch(0.78 0.15 80);
  --chart-1: oklch(0.55 0.19 30);
  --chart-2: oklch(0.84 0.14 92);
  --chart-3: oklch(0.6 0.11 175);
  --chart-4: oklch(0.72 0.13 55);
  --chart-5: oklch(0.45 0.09 330);
  --sidebar: oklch(0.96 0.028 82);
  --sidebar-foreground: oklch(0.25 0.035 45);
  --sidebar-primary: oklch(0.55 0.19 30);
  --sidebar-primary-foreground: oklch(0.99 0.01 85);
  --sidebar-accent: oklch(0.93 0.1 95);
  --sidebar-accent-foreground: oklch(0.28 0.05 70);
  --sidebar-border: oklch(0.88 0.035 70);
  --sidebar-ring: oklch(0.55 0.19 30);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.955 0.03 82);
  --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.996 0.006 85);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.94 0.025 78);
  --border-muted: oklch(0.91 0.03 74);
  --border-strong: oklch(0.76 0.05 62);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.38 0.04 48);

  /* ── 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) 16%, var(--background));
  --primary-soft:  color-mix(in srgb, var(--primary) 9%,  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.55 0.19 30 / 0.4);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.5 0.21 22);
  --error-foreground: oklch(0.99 0.01 85);

  /* ── radius ───────────────────────────────────────────────────── */
  --radius: 1rem;
  --radius-none: 0rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: Fredoka, "DM Sans", ui-rounded, system-ui, sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 600;
  --line-height-display: 1.15;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.6;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 2px 0 oklch(0.45 0.08 45 / 0.1);
  --shadow-md: 0 4px 0 oklch(0.45 0.08 45 / 0.12), 0 8px 20px oklch(0.45 0.08 45 / 0.08);
  --shadow-lg: 0 6px 0 oklch(0.45 0.08 45 / 0.12), 0 18px 40px oklch(0.45 0.08 45 / 0.14);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 220ms;
  --duration-slow: 360ms;
  --ease-standard: cubic-bezier(0.34, 1.3, 0.64, 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.2 0.025 50);
  --foreground: oklch(0.96 0.02 85);
  --card: oklch(0.25 0.03 50);
  --card-foreground: oklch(0.96 0.02 85);
  --popover: oklch(0.25 0.03 50);
  --popover-foreground: oklch(0.96 0.02 85);
  --primary: oklch(0.74 0.15 32);
  --primary-foreground: oklch(0.2 0.04 35);
  --secondary: oklch(0.31 0.035 50);
  --secondary-foreground: oklch(0.96 0.02 85);
  --muted: oklch(0.29 0.03 50);
  --muted-foreground: oklch(0.78 0.03 75);
  --accent: oklch(0.36 0.06 90);
  --accent-foreground: oklch(0.96 0.05 95);
  --destructive: oklch(0.7 0.19 22);
  --destructive-foreground: oklch(0.18 0.03 30);
  --border: oklch(0.36 0.035 55);
  --input: oklch(0.4 0.04 55);
  --ring: oklch(0.74 0.15 32);
  --success: oklch(0.74 0.14 150);
  --warning: oklch(0.85 0.14 85);
  --chart-1: oklch(0.74 0.15 32);
  --chart-2: oklch(0.87 0.13 92);
  --chart-3: oklch(0.72 0.11 175);
  --chart-4: oklch(0.78 0.12 55);
  --chart-5: oklch(0.7 0.1 330);
  --sidebar: oklch(0.23 0.028 50);
  --sidebar-foreground: oklch(0.96 0.02 85);
  --sidebar-primary: oklch(0.74 0.15 32);
  --sidebar-primary-foreground: oklch(0.2 0.04 35);
  --sidebar-accent: oklch(0.36 0.06 90);
  --sidebar-accent-foreground: oklch(0.96 0.05 95);
  --sidebar-border: oklch(0.36 0.035 55);
  --sidebar-ring: oklch(0.74 0.15 32);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.23 0.028 50);
  --surface-hover:   color-mix(in srgb, var(--foreground) 8%,  var(--background));
  --surface-active:  color-mix(in srgb, var(--foreground) 13%, var(--background));
  --surface-elevated: oklch(0.29 0.032 50);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.28 0.03 52);
  --border-muted: oklch(0.32 0.032 54);
  --border-strong: oklch(0.48 0.045 58);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.86 0.025 80);

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-hover: color-mix(in srgb, var(--primary) 88%, var(--foreground));
  --primary-muted: color-mix(in srgb, var(--primary) 22%, var(--background));
  --primary-soft:  color-mix(in srgb, var(--primary) 13%, var(--background));
  --primary-tint:  color-mix(in srgb, var(--primary) 8%, var(--background));

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.74 0.15 32 / 0.5);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.72 0.18 22);
  --error-foreground: oklch(0.18 0.03 30);

  /* ── radius ───────────────────────────────────────────────────── */
  --radius: 1rem;
  --radius-none: 0rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-mono: ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 600;
  --line-height-display: 1.15;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.6;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 2px 0 oklch(0.1 0.02 45 / 0.4);
  --shadow-md: 0 4px 0 oklch(0.1 0.02 45 / 0.45), 0 8px 20px oklch(0.1 0.02 45 / 0.3);
  --shadow-lg: 0 6px 0 oklch(0.1 0.02 45 / 0.45), 0 18px 40px oklch(0.1 0.02 45 / 0.4);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 220ms;
  --duration-slow: 360ms;
  --ease-standard: cubic-bezier(0.34, 1.3, 0.64, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);

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