@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..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.952 0.014 74.4);
  --foreground: oklch(0.242 0.026 30.9);
  --card: oklch(0.98 0.008 75);
  --card-foreground: oklch(0.242 0.026 30.9);
  --popover: oklch(0.98 0.008 75);
  --popover-foreground: oklch(0.242 0.026 30.9);
  --primary: oklch(0.516 0.199 25.6);
  --primary-foreground: oklch(0.97 0.01 74);
  --secondary: oklch(0.849 0.057 230.4);
  --secondary-foreground: oklch(0.242 0.026 30.9);
  --muted: oklch(0.93 0.012 74);
  --muted-foreground: oklch(0.46 0.02 50);
  --accent: oklch(0.93 0.02 74);
  --accent-foreground: oklch(0.28 0.03 40);
  --destructive: oklch(0.516 0.199 25.6);
  --destructive-foreground: oklch(0.97 0.01 74);
  --border: oklch(0.86 0.025 60);
  --input: oklch(0.86 0.025 60);
  --ring: oklch(0.516 0.199 25.6);
  --success: oklch(0.5 0.08 150);
  --warning: oklch(0.75 0.13 85);
  /* Pie-chart slices only: the five Every Day Demand brand colours, in the
     guide's own order (Yellow, Light Blue, Lilac, Red, Cream) — always drawn
     against the brand's Chocolate backdrop (see .brand-chocolate), never the
     app's own cream surfaces, or the light tones wash out against them. */
  --chart-1: oklch(0.856 0.135 93.9);
  --chart-2: oklch(0.849 0.057 230.4);
  --chart-3: oklch(0.801 0.096 321.1);
  --chart-4: oklch(0.516 0.199 25.6);
  --chart-5: oklch(0.952 0.014 74.4);
  --sidebar: oklch(0.96 0.012 74);
  --sidebar-foreground: oklch(0.242 0.026 30.9);
  --sidebar-primary: oklch(0.516 0.199 25.6);
  --sidebar-primary-foreground: oklch(0.97 0.01 74);
  --sidebar-accent: oklch(0.91 0.02 70);
  --sidebar-accent-foreground: oklch(0.242 0.026 30.9);
  --sidebar-border: oklch(0.85 0.025 60);
  --sidebar-ring: oklch(0.516 0.199 25.6);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.94 0.016 74);
  --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.99 0.006 75);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.93 0.014 74);
  --border-muted: oklch(0.9 0.018 70);
  --border-strong: oklch(0.74 0.04 55);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.38 0.03 40);

  /* ── 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.516 0.199 25.6 / 0.35);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.516 0.199 25.6);
  --error-foreground: oklch(0.97 0.01 74);

  /* ── radius ───────────────────────────────────────────────────── */
  --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, Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-weight-display: 500;
  --line-height-display: 1.1;
  --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(60, 35, 15, 0.06);
  --shadow-md: 0 4px 14px rgba(60, 35, 15, 0.1);
  --shadow-lg: 0 14px 36px rgba(60, 35, 15, 0.14);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 320ms;
  --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.242 0.026 30.9);
  --foreground: oklch(0.95 0.012 74);
  --card: oklch(0.29 0.028 32);
  --card-foreground: oklch(0.95 0.012 74);
  --popover: oklch(0.29 0.028 32);
  --popover-foreground: oklch(0.95 0.012 74);
  --primary: oklch(0.856 0.135 93.9);
  --primary-foreground: oklch(0.22 0.025 30);
  --secondary: oklch(0.32 0.028 35);
  --secondary-foreground: oklch(0.95 0.012 74);
  --muted: oklch(0.3 0.024 35);
  --muted-foreground: oklch(0.78 0.02 70);
  --accent: oklch(0.33 0.03 40);
  --accent-foreground: oklch(0.95 0.012 74);
  --destructive: oklch(0.6 0.18 25);
  --destructive-foreground: oklch(0.95 0.012 74);
  --border: oklch(0.95 0.012 74 / 12%);
  --input: oklch(0.95 0.012 74 / 16%);
  --ring: oklch(0.856 0.135 93.9);
  --success: oklch(0.74 0.09 150);
  --warning: oklch(0.8 0.12 85);
  /* Same fixed brand slice colours in dark mode — the pie's own Chocolate
     backdrop doesn't change with the app's theme. */
  --chart-1: oklch(0.856 0.135 93.9);
  --chart-2: oklch(0.849 0.057 230.4);
  --chart-3: oklch(0.801 0.096 321.1);
  --chart-4: oklch(0.516 0.199 25.6);
  --chart-5: oklch(0.952 0.014 74.4);
  --sidebar: oklch(0.2 0.024 30);
  --sidebar-foreground: oklch(0.95 0.012 74);
  --sidebar-primary: oklch(0.856 0.135 93.9);
  --sidebar-primary-foreground: oklch(0.22 0.025 30);
  --sidebar-accent: oklch(0.28 0.03 35);
  --sidebar-accent-foreground: oklch(0.95 0.012 74);
  --sidebar-border: oklch(0.95 0.012 74 / 10%);
  --sidebar-ring: oklch(0.856 0.135 93.9);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.21 0.024 30);
  --surface-elevated: oklch(0.31 0.028 33);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.95 0.012 74 / 6%);
  --border-muted: oklch(0.95 0.012 74 / 9%);
  --border-strong: oklch(0.95 0.012 74 / 24%);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.82 0.02 70);

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

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.856 0.135 93.9 / 0.45);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.6 0.18 25);
  --error-foreground: oklch(0.95 0.012 74);
}
