@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=IBM+Plex+Mono:wght@300;400;500;600;700&display=swap');

/* IvyOra Display, self-hosted from the builder's own files: Thin, Light, Regular
   and Bold, each with its italic except Bold (no bold-italic file was supplied,
   so italic falls back to Regular's italic face for 600-900 too). */
@font-face {
  font-family: 'IvyOra Display';
  src: url('/assets/fonts/IvyOra-Display-Thin.woff2') format('woff2');
  font-weight: 100 299;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'IvyOra Display';
  src: url('/assets/fonts/IvyOra-Display-Light.woff2') format('woff2');
  font-weight: 300 399;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'IvyOra Display';
  src: url('/assets/fonts/IvyOra-Display-Regular.woff2') format('woff2');
  font-weight: 400 599;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'IvyOra Display';
  src: url('/assets/fonts/IvyOra-Display-Bold.woff2') format('woff2');
  font-weight: 600 900;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'IvyOra Display';
  src: url('/assets/fonts/IvyOra-Display-Thin-Italic.woff2') format('woff2');
  font-weight: 100 299;
  font-style: italic;
  font-display: block;
}
@font-face {
  font-family: 'IvyOra Display';
  src: url('/assets/fonts/IvyOra-Display-Light-Italic.woff2') format('woff2');
  font-weight: 300 399;
  font-style: italic;
  font-display: block;
}
@font-face {
  font-family: 'IvyOra Display';
  src: url('/assets/fonts/IvyOra-Display-Italic.woff2') format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: block;
}

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.956 0.002 90);
  --foreground: oklch(0.2 0.006 100);
  --card: oklch(0.995 0.001 90);
  --card-foreground: oklch(0.2 0.006 100);
  --popover: oklch(0.995 0.001 90);
  --popover-foreground: oklch(0.2 0.006 100);
  --primary: oklch(0.42 0.065 158);
  --primary-foreground: oklch(0.985 0.004 100);
  --secondary: oklch(0.925 0.006 110);
  --secondary-foreground: oklch(0.26 0.01 120);
  --muted: oklch(0.925 0.005 100);
  --muted-foreground: oklch(0.5 0.012 110);
  --accent: oklch(0.925 0.008 130);
  --accent-foreground: oklch(0.26 0.01 120);
  --destructive: oklch(0.5 0.17 28);
  --destructive-foreground: oklch(0.985 0.004 100);
  --border: oklch(0.87 0.006 100);
  --input: oklch(0.85 0.007 100);
  --ring: oklch(0.52 0.06 158);
  --success: oklch(0.5 0.11 150);
  --warning: oklch(0.6 0.13 70);
  --chart-1: oklch(0.42 0.065 158);
  --chart-2: oklch(0.6 0.08 160);
  --chart-3: oklch(0.55 0.09 60);
  --chart-4: oklch(0.45 0.06 250);
  --chart-5: oklch(0.65 0.04 110);
  --sidebar: oklch(0.935 0.004 100);
  --sidebar-foreground: oklch(0.2 0.006 100);
  --sidebar-primary: oklch(0.42 0.065 158);
  --sidebar-primary-foreground: oklch(0.985 0.004 100);
  --sidebar-accent: oklch(0.9 0.008 130);
  --sidebar-accent-foreground: oklch(0.26 0.01 120);
  --sidebar-border: oklch(0.87 0.006 100);
  --sidebar-ring: oklch(0.52 0.06 158);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.935 0.004 100);
  --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(0.995 0.001 90);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.92 0.004 100);
  --border-muted: oklch(0.9 0.005 100);
  --border-strong: oklch(0.76 0.01 110);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.38 0.01 110);

  /* ── 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.52 0.06 158 / 0.35);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.5 0.17 28);
  --error-foreground: oklch(0.985 0.004 100);

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

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: 'IvyOra Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 400;
  --line-height-display: 1.15;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.55;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 1px rgba(23, 23, 20, 0.04);
  --shadow-md: 0 2px 8px rgba(23, 23, 20, 0.06);
  --shadow-lg: 0 8px 24px rgba(23, 23, 20, 0.1);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 90ms;
  --duration-normal: 160ms;
  --duration-slow: 240ms;
  --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.19 0.006 110);
  --foreground: oklch(0.94 0.004 100);
  --card: oklch(0.23 0.007 110);
  --card-foreground: oklch(0.94 0.004 100);
  --popover: oklch(0.23 0.007 110);
  --popover-foreground: oklch(0.94 0.004 100);
  --primary: oklch(0.72 0.07 158);
  --primary-foreground: oklch(0.17 0.01 130);
  --secondary: oklch(0.28 0.008 110);
  --secondary-foreground: oklch(0.94 0.004 100);
  --muted: oklch(0.28 0.008 110);
  --muted-foreground: oklch(0.68 0.01 110);
  --accent: oklch(0.29 0.012 130);
  --accent-foreground: oklch(0.94 0.004 100);
  --destructive: oklch(0.68 0.16 25);
  --destructive-foreground: oklch(0.985 0.004 100);
  --border: oklch(1 0 0 / 11%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.72 0.07 158);
  --success: oklch(0.72 0.11 150);
  --warning: oklch(0.78 0.12 75);
  --chart-1: oklch(0.72 0.07 158);
  --chart-2: oklch(0.6 0.08 160);
  --chart-3: oklch(0.72 0.1 60);
  --chart-4: oklch(0.65 0.07 250);
  --chart-5: oklch(0.72 0.04 110);
  --sidebar: oklch(0.165 0.006 110);
  --sidebar-foreground: oklch(0.94 0.004 100);
  --sidebar-primary: oklch(0.72 0.07 158);
  --sidebar-primary-foreground: oklch(0.17 0.01 130);
  --sidebar-accent: oklch(0.27 0.01 130);
  --sidebar-accent-foreground: oklch(0.94 0.004 100);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.72 0.07 158);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.215 0.006 110);
  --surface-elevated: oklch(0.27 0.008 110);

  /* ── 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.76 0.008 110);

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

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.72 0.07 158 / 0.45);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.68 0.16 25);
  --error-foreground: oklch(0.985 0.004 100);
}

/* Stencil Tweaks */
:root:not(.dark) {
  --foreground: #171714;
  --border: #dddbd8;
  --card: #ffffff;
  --primary: #4e5147;
  --muted-foreground: #615c55;
  --ring: #744925;
  --primary-hover: #30322c;
}
:root {
  --radius: 3px;
  --font-weight-display: 600;
}
/* /Stencil Tweaks */