/*
 * Canonical admin design tokens — Phase 4 (#520). Scoped under .spruce-admin.
 * Values locked in docs/admin-design-migration/design-contract.md.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin-italic-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("/fonts/roboto-mono-latin-variable.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

.spruce-admin {
  /* --- Color scales (design-contract.md §1.1) --- */
  --green-50: #f3f8ec;
  --green-100: #e3efd2;
  --green-200: #c7e0a7;
  --green-300: #a5cc78;
  --green-400: #80b34e;
  --green-500: #5d9732;
  --green-600: #4b7d27;
  --green-700: #3c6420;
  --green-800: #304f1c;
  --green-900: #263e18;

  --bark-50: #f8f6f4;
  --bark-100: #eee9e5;
  --bark-200: #dcd2ca;
  --bark-300: #c0b0a4;
  --bark-400: #a08a7b;
  --bark-500: #83695a;
  --bark-600: #665247;
  --bark-700: #4f3f37;
  --bark-800: #3d302a;
  --bark-900: #2d231f;
  --bark-950: #1f1815;

  --stone-0: #ffffff;
  --stone-50: #fafaf8;
  --stone-100: #f4f4f0;
  --stone-200: #e8e7e1;
  --stone-300: #d6d4cc;
  --stone-400: #aeaba1;
  --stone-500: #84817a;
  --stone-600: #64615b;
  --stone-700: #4b4842;
  --stone-800: #33312d;
  --stone-900: #211f1c;

  /* --- Semantic status (§1.1) --- */
  --success: #4b7d27;
  --success-bg: #e9f3dd;
  --warning: #a16207;
  --warning-bg: #fdf3d7;
  --danger: #c0392b;
  --danger-bg: #fbe9e6;
  --info: #2c6f9b;
  --info-bg: #e5f0f7;

  /* --- Semantic color aliases (§1.2) --- */
  --brand: var(--green-500);
  --brand-strong: var(--green-600);
  --brand-soft: var(--green-50);
  --accent: var(--bark-700);
  --text-heading: var(--stone-900);
  --text-body: var(--stone-700);
  --text-muted: var(--stone-500);
  --text-on-brand: #ffffff;
  --text-link: var(--green-600);
  /* Phase 4 D1 / §3.1: production page surface is white (Bruce 2026-07-22),
     not the snapshot cool-tint #f8faf6. */
  --surface-page: #ffffff;
  --surface-card: #ffffff;
  --surface-raised: #ffffff;
  --surface-sunken: var(--stone-100);
  --surface-sidebar: var(--bark-900);
  --surface-sidebar-bottom: var(--bark-950);
  --border-default: var(--stone-200);
  --border-strong: var(--stone-300);
  --border-focus: var(--green-500);

  /* --- Typography (§1.3) --- */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 22px;
  --text-3xl: 28px;
  --text-4xl: 36px;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --tracking-caps: 0.06em;

  /* --- Spacing (§1.4) --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* --- Radii (§1.5) --- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* --- Shadows (§1.6) --- */
  --shadow-sm: 0 1px 2px rgba(33, 31, 28, 0.06);
  --shadow-md: 0 2px 6px rgba(33, 31, 28, 0.08), 0 1px 2px rgba(33, 31, 28, 0.06);
  --shadow-lg: 0 8px 24px rgba(33, 31, 28, 0.14), 0 2px 6px rgba(33, 31, 28, 0.08);

  /* --- Focus ring (§1.7) --- */
  --focus-ring: 0 0 0 3px rgba(93, 151, 50, 0.3);

  /* --- Transitions (§1.8) --- */
  --transition-fast: 120ms ease;
  --transition-base: 180ms ease;
}
