/* ============================================================================
   warm-trades — 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 every admin behaves and reads identically.

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

   Lineage — every value below is derived from templates/warm-trades/styles.css:
     --paper       #f1ecdf   -> --adm-bg
     --cream       #fffaf0   -> --adm-surface
     --paper-deep  #e3dac8   -> --adm-surface-alt
     --line        rgba(23,51,45,.24) -> --adm-border (flattened over paper,
                                        warmed back toward --paper-deep)
     --ink         #17332d   -> --adm-text
     --ink-soft    #456159   -> --adm-text-muted
     --accent      #c9623f   -> --adm-brand (via --adm-tpl-accent)
     --radius-sm   0.75rem   -> --adm-radius

   Deliberately NOT mapped: --accent-soft (#eab875 gold) and --forest (#173c33).
   The marketing page uses them as decorative brand hues, but the standard
   reserves non-brand colour for state meaning (ok / warn / danger / info). If
   the gold were bound to a token it would read as a status somewhere in the
   admin, so both hues are left to shared/admin.css's semantic ramp instead.
   ========================================================================== */

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

[data-adm-app] {
  /* Brand — chrome only: rail mark, active indicator, primary button.
     White on the clay accent measures 3.96:1, clearing the 3:1 floor that
     applies to UI surfaces and large text. */
  --adm-brand: var(--adm-tpl-accent, #c9623f);
  --adm-brand-ink: #ffffff;

  /* Surfaces — the marketing page's warm paper stack, unchanged. */
  --adm-bg: #f1ecdf;
  --adm-surface: #fffaf0;
  --adm-surface-alt: #e3dac8;
  --adm-border: #d4c8b1;

  /* Text — the same forest ink the marketing page sets on paper. */
  --adm-text: #17332d;
  --adm-text-muted: #456159;

  /* Shape + type. The marketing family is sans-only: its editorial voice comes
     from scale and weight, not a second family, so display reuses the stack
     rather than inventing a serif this template never had. */
  --adm-radius: 12px;
  --adm-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --adm-font-display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

[data-theme='dark'] [data-adm-app] {
  /* Lift the clay accent for a dark rail. White on the lifted hue would fall to
     about 2.2:1, so the brand ink flips to a deep forest instead: 7.47:1. */
  --adm-brand: color-mix(in srgb, var(--adm-tpl-accent, #c9623f) 62%, #ffffff);
  --adm-brand-ink: #10231e;

  /* Night reading of the forest end of the palette, not the clay end. */
  --adm-bg: #0f201c;
  --adm-surface: #152a25;
  --adm-surface-alt: #1b332c;
  --adm-border: #2a4640;

  --adm-text: #eef3ee;
  --adm-text-muted: #a4b8b1;
}
