/* Stencil Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
/* /Stencil Fonts */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Inter:wght@400..600&family=DM+Serif+Display&family=Space+Grotesk:wght@400..600&family=DM+Sans:opsz,wght@9..40,400..600&family=Bricolage+Grotesque:opsz,wght@12..96,500..700&display=swap");

/* Warm stone: taupe canvas #ABA398 (lightened from the reference #878077 so text stays readable), cream cards #E5E2D9, stone, lilac and terracotta tiles, warm near-black text and nav.
   The sidebar accent is sage #C1CCA4 (same as the success pill) with black text on it; the mauve tile is brown-grey #827970.
   Primary (maroon #552828) and button colours are kept as they were.
   Dark set: warm near-black canvas, warm brown cards, the same light tiles. */

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: #ffffff;
  --foreground: #1E1C1A;
  --card: #E5E2D9;
  --card-foreground: #1E1C1A;
  --popover: #E8E6E2;
  --popover-foreground: #1E1C1A;
  --primary: #552828;
  --primary-foreground: #FFFFFF;
  --secondary: #D6CEBC;
  --secondary-foreground: #2E2A26;
  --muted: #CEC5B2;
  --muted-foreground: #3D3732;
  --accent: #D5B7C6;
  --accent-foreground: #2A1616;
  --destructive: oklch(0.5 0.18 27);
  --destructive-foreground: oklch(0.985 0.008 85);
  --border: #C4BCAC;
  --input: #7A7369;
  --ring: #C47452;
  --success: oklch(0.46 0.07 150);
  --warning: oklch(0.5 0.11 70);
  --chart-1: #A99DCC;
  --chart-2: #C2702E;
  --chart-3: #9C9A8C;
  --chart-4: #5E4A45;
  --chart-5: #D6CEBC;
  --sidebar: #1E1C1A;
  --sidebar-foreground: #FFFFFF;
  --sidebar-primary: #C1CCA4;
  --sidebar-primary-foreground: #1E1C1A;
  --sidebar-accent: #2E2A26;
  --sidebar-accent-foreground: #FFFFFF;
  --sidebar-border: #2E2A26;
  --sidebar-ring: #C47452;

  /* ── pastel tiles (fills only; text on them is --tile-foreground) ── */
  --tile-mint: #C4C2B2;
  --tile-peach: #E6B48C;
  --tile-lilac: #C9BFE0;
  --tile-sky: #E8E6E2;
  --tile-mauve: #827970;
  --tile-olive: #9EA577;
  --tile-foreground: #1E1C1A;
  --tile-foreground-secondary: #3A342E;
  --tile-track: color-mix(in srgb, #000000 12%, transparent);
  --tile-inset: #F3EFE9;

  /* ── buttons (main pill buttons; adjustable per mode) ─────────── */
  --button: #141116;
  --button-foreground: #FFFFFF;
  --button-hover: #2B262C;

  /* ── status labels: fill, text and dot per tone ───────────────── */
  --status-neutral: #CEC5B2;
  --status-neutral-foreground: #3D3732;
  --status-neutral-dot: #8C857B;
  --status-info: #DCD5EC;
  --status-info-foreground: #2E2747;
  --status-info-dot: #7D70A8;
  --status-warning: #F0CDAE;
  --status-warning-foreground: #5A2E12;
  --status-warning-dot: #C2702E;
  --status-danger: #E3CFC9;
  --status-danger-foreground: #552828;
  --status-danger-dot: #552828;
  --status-success: #C1CCA4;
  --status-success-foreground: #2C3A1E;
  --status-success-dot: #6B7F4A;

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: #A0978B;
  --surface-hover:   color-mix(in srgb, var(--foreground) 6%,  var(--card));
  --surface-active:  color-mix(in srgb, var(--foreground) 10%, var(--card));
  --surface-elevated: #E8E6E2;

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: #D3CDBF;
  --border-muted: #C4BCAC;
  --border-strong: #8C857B;

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: #2E2A26;

  /* ── primary depth (hover/tint states for brand colour) ─────── */
  --primary-hover: #431F1F;
  --primary-muted: color-mix(in srgb, var(--primary) 15%, var(--card));
  --primary-soft:  color-mix(in srgb, var(--primary) 8%,  var(--card));
  --primary-tint:  color-mix(in srgb, var(--primary) 6%,  var(--card));

  /* ── highlight: the theme's second brand colour, a fill only (never text) ── */
  --highlight: #D5B7C6;
  --highlight-foreground: #2A1616;

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: oklch(0.62 0.12 45 / 0.35);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.5 0.18 27);
  --error-foreground: oklch(0.985 0.008 85);

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

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: 'PPNeueBit', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'Andale Mono', ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 400;
  --line-height-display: 1.1;
  --tracking-display: -0.02em;
  --font-weight-body: 400;
  --line-height-body: 1.6;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows (kept faint: the look is flat) ──────────────────── */
  --shadow-sm: 0 1px 2px oklch(0.3 0.02 350 / 0.04);
  --shadow-md: 0 6px 18px oklch(0.3 0.02 350 / 0.06);
  --shadow-lg: 0 18px 40px oklch(0.3 0.02 350 / 0.1);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --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.2rem;
}

.dark {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: #171513;
  --foreground: #F3EFE9;
  --card: #2A2622;
  --card-foreground: #F3EFE9;
  --popover: #2A2622;
  --popover-foreground: #F3EFE9;
  --primary: #9EA577;
  --primary-foreground: #1F1014;
  --secondary: #332E29;
  --secondary-foreground: #F3EFE9;
  --muted: #332E29;
  --muted-foreground: #B5ADA2;
  --accent: #D5B7C6;
  --accent-foreground: #2A1616;
  --destructive: oklch(0.7 0.17 25);
  --destructive-foreground: #000000;
  --border: #3A352F;
  --input: #807769;
  --ring: #C47452;
  --success: oklch(0.78 0.08 150);
  --warning: oklch(0.82 0.11 78);
  --chart-1: #C9BFE0;
  --chart-2: #D9853B;
  --chart-3: #9C9A8C;
  --chart-4: #D6CEBC;
  --chart-5: #E6B48C;
  --sidebar: #0F0E0C;
  --sidebar-foreground: #FFFFFF;
  --sidebar-primary: #C1CCA4;
  --sidebar-primary-foreground: #1E1C1A;
  --sidebar-accent: #26221E;
  --sidebar-accent-foreground: #FFFFFF;
  --sidebar-border: #26221E;
  --sidebar-ring: #C47452;

  /* ── tiles: same pastel fills as light mode, same dark text on them ── */
  --tile-mint: #C4C2B2;
  --tile-peach: #E6B48C;
  --tile-lilac: #C9BFE0;
  --tile-sky: #E8E6E2;
  --tile-mauve: #827970;
  --tile-olive: #9EA577;
  --tile-foreground: #1E1C1A;
  --tile-foreground-secondary: #3A342E;
  --tile-track: color-mix(in srgb, #000000 12%, transparent);
  --tile-inset: #F3EFE9;

  /* ── buttons ──────────────────────────────────────────────────── */
  --button: #D5B7C6;
  --button-foreground: #1F1014;
  --button-hover: #E3CCD7;

  /* ── status labels ────────────────────────────────────────────── */
  --status-neutral: #332E29;
  --status-neutral-foreground: #DCD5CA;
  --status-neutral-dot: #9C9A8C;
  --status-info: #2E2A3A;
  --status-info-foreground: #D9D2EC;
  --status-info-dot: #A99DCC;
  --status-warning: #3A2618;
  --status-warning-foreground: #F0CDAE;
  --status-warning-dot: #D9853B;
  --status-danger: #3A2826;
  --status-danger-foreground: #EBD3CC;
  --status-danger-dot: #C9A49A;
  --status-success: #C1CCA4;
  --status-success-foreground: #2C3A1E;
  --status-success-dot: #6B7F4A;

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: #1F1C19;
  --surface-hover:   color-mix(in srgb, var(--foreground) 7%,  var(--card));
  --surface-active:  color-mix(in srgb, var(--foreground) 11%, var(--card));
  --surface-elevated: #2F2B26;

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: #2A2622;
  --border-muted: #332E29;
  --border-strong: #6E665C;

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: #DCD5CA;

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-hover: #CDB3C0;
  --primary-muted: color-mix(in srgb, var(--primary) 20%, var(--background));
  --primary-soft:  color-mix(in srgb, var(--primary) 12%, var(--background));
  --primary-tint:  color-mix(in srgb, var(--primary) 8%, var(--background));

  /* ── highlight ────────────────────────────────────────────────── */
  --highlight: #D5B7C6;
  --highlight-foreground: #1F1014;

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.66 0.11 45 / 0.45);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.74 0.15 25);
  --error-foreground: #000000;

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

  /* ── typography ───────────────────────────────────────────────── */
  --font-mono: 'Andale Mono', ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 400;
  --line-height-display: 1.1;
  --tracking-display: -0.02em;
  --font-weight-body: 450;
  --line-height-body: 1.65;
  --tracking-body: 0.01em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 18px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 18px 40px oklch(0 0 0 / 0.5);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --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.2rem;
}

/* Stencil Tweaks */
@font-face {
  font-family: 'PPNeueBit';
  src: url('/assets/fonts/PPNeueBit-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* /Stencil Tweaks */