/* ============================================================================
   builder-heritage — admin theme.

   This file is the ONLY thing a template personalises. It sets the documented
   token contract from docs/ADMIN-STANDARD.md and nothing else: no layout, no
   component rules, no state colour. Everything structural lives in
   shared/admin.css so all admins behave and read identically.

   The raw brand hue arrives as --adm-tpl-accent, set inline on <body> from the
   template manifest's #a95f39 field, so `--set accent=#xxxxxx` flows through
   to the admin as well as the marketing page.

   Palette harvested from templates/builder-heritage/styles.css:
     ink #1c2520 · cream #f3eee3 · white #fffdf7 · slate #4b5852 · accent #a95f39
   Type: Georgia serif display over a system sans, matching the marketing page.
   ========================================================================== */

/* ---------- Light (default) ------------------------------------------------ */

[data-adm-app] {
  /* Brand — chrome only: rail mark, active indicator, primary button.
     Contrast check: #ffffff on the default terracotta #a95f39 is ~4.8:1, which
     clears the >=3:1 bar for UI text comfortably, so white ink is correct here
     (unlike pet-service, whose lighter accent forced a house ink instead). */
  --adm-brand: var(--adm-tpl-accent, #a95f39);
  --adm-brand-ink: #ffffff;

  /* Surfaces — the marketing page's cream/white paper stack. */
  --adm-bg: #f3eee3;
  --adm-surface: #fffdf7;
  --adm-surface-alt: #eae3d4;
  --adm-border: #ddd3c0;

  /* Text — the house ink, with slate as the muted tone. */
  --adm-text: #1c2520;
  --adm-text-muted: #4b5852;

  /* Shape — the marketing family is deliberately square (zero-radius buttons,
     a boxed monogram, a blueprint grid). A hairline 2px is kept rather than a
     literal 0 so dense admin controls, checkboxes and focus rings still read as
     intentional rather than clipped. */
  --adm-radius: 2px;
  --adm-radius-sm: 1px;

  /* Type — same stacks as styles.css: Georgia display over system sans. */
  --adm-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --adm-font-display: Georgia, 'Times New Roman', serif;
}

/* ---------- Dark ----------------------------------------------------------- */

[data-theme='dark'] [data-adm-app] {
  /* Lift the terracotta so it stays legible on a dark rail, and swap to the
     house ink on top of it: white on the lightened hue would drop under 3:1,
     while #1c2520 on the lifted brand sits near 6.9:1. */
  --adm-brand: color-mix(in srgb, var(--adm-tpl-accent, #a95f39) 62%, #ffffff);
  --adm-brand-ink: #1c2520;

  /* A cooled-down version of the same green-black ink used on the light side. */
  --adm-bg: #141a16;
  --adm-surface: #1b221d;
  --adm-surface-alt: #222a24;
  --adm-border: #333d35;

  --adm-text: #eef0e9;
  --adm-text-muted: #9aa79c;
}
