/* ============================================================
   usershaped design tokens — "brass on grey" — SETTLED 2026-07-13
   Source of truth with THEME.md. v1 ("patina/paper") lives in git
   history (initial commit e0597ac).

   Decision record (short — full trail in THEME.md):
   - v1 patina rejected: teal ≈ OpenAI, warm paper ≈ Anthropic.
   - v2 ember rejected: warm rust on buttons reads Anthropic.
   - Brass picked 2026-07-13. Steel (#3a6489) reserved as the info
     family; moss (#56691f) reserved in the success family.
   - Warning is amber-orange (#96540c / #e29b4f) so it can never be
     confused with the brass primary.
   - Brass buttons take DARK labels in both modes — gold never
     carries white text (contrast).

   Standing rules:
   - Light is default. Dark only via [data-theme="dark"] (.dark
     aliased) — never from OS preference.
   - Light: white page, grey cards (#f6f6f4). Dark: charcoal ground
     (#1b1b1a), grey cards (#242322) lifted by soft shadow — content
     never sits on black. Recessed fields go toward white in light,
     toward the ground in dark.
   - Dark dashboard grammar: mono labels, hero values in brass,
     gains green / costs red, gauges + line charts.
   - shadcn/ui names; components on Base UI primitives.
   - No colored left-border accent stripes.
   - Type: Barlow + Martian Mono, self-hosted woff2 in brand/fonts/
     (Bahnschrift / Cascadia Mono are the fallback stacks).
     Banned: Inter, Space Grotesk, Poppins, Montserrat, DM Sans and
     the rest of the AI-default cluster.
   All text pairs WCAG-verified 2026-07-13 (table in THEME.md).
   ============================================================ */

:root {
  /* ---- primitives: neutral greys ---- */
  --grey-0: #ffffff;   --grey-50: #fbfbfa;  --grey-100: #f6f6f4;
  --grey-150: #efefec; --grey-200: #e3e2de; --grey-300: #d6d5d0;
  --grey-400: #a5a39d; --grey-500: #706e67; --grey-600: #55534e;
  --grey-900: #1f1e1b;
  --coal-950: #151514; --coal-900: #1b1b1a; --coal-870: #201f1e;
  --coal-850: #242322; --coal-800: #2b2a29; --coal-750: #31302e;
  --coal-700: #383735; --coal-600: #46443f; --coal-300: #a3a29d;
  --coal-200: #c9c8c4; --coal-50: #f4f4f3;
  /* dark text is near-white NEUTRAL — the earlier bone tint (#eceae6)
     read as cream against the reference; corrected 2026-07-13 */

  /* ---- primitives: brass (primary) ---- */
  --brass-200: #ddbc55; --brass-400: #e3b93d; --brass-500: #d9b23f;
  --brass-600: #a87c06; --brass-700: #7a5e06;

  /* ---- primitives: reserved + functional hues ---- */
  --steel-700: #3a6489; --steel-300: #8fb4d6;  /* runner-up → info, charts */
  --moss-700: #56691f;  --moss-300: #a9bc72;   /* reserved → success, charts */
  --ok-600: #38722a;   --ok-300: #86be6e;
  --warn-600: #96540c; --warn-300: #e29b4f;    /* amber-orange, apart from brass */
  --err-600: #b02e24;  --err-500: #c4402f;  --err-300: #e4695a;
  --info-600: #47617f; --info-300: #9ab2cf;

  /* ---- semantic (shadcn/ui): LIGHT defaults ---- */
  --background: var(--grey-0);        --foreground: var(--grey-900);
  --card: var(--grey-100);            --card-foreground: var(--grey-900);
  --popover: var(--grey-50);          --popover-foreground: var(--grey-900);
  --primary: var(--brass-400);        --primary-foreground: var(--grey-900);
  --secondary: var(--grey-150);       --secondary-foreground: var(--grey-900);
  --muted: var(--grey-150);           --muted-foreground: var(--grey-500);
  --accent: #eaeae6;                  --accent-foreground: var(--grey-900);
  --destructive: var(--err-600);      --destructive-foreground: #ffffff;
  --border: var(--grey-200);          --input: var(--grey-300);
  --ring: var(--brass-600);           --link: var(--brass-700);
  --primary-tint: rgba(227, 185, 61, 0.16);
  --well: var(--grey-0);              /* recessed fields: toward white in light */
  --text-2: var(--grey-600);
  --success: var(--ok-600);   --success-tint: rgba(56, 114, 42, 0.10);
  --warning: var(--warn-600); --warning-tint: rgba(150, 84, 12, 0.11);
  --danger-tint: rgba(176, 46, 36, 0.09);
  --info: var(--info-600);    --info-tint: rgba(71, 97, 127, 0.10);
  --chart-1: #d9702a; --chart-2: #6e89a8; --chart-3: #8a9464;
  --chart-4: #3aa188; --chart-5: #c4553e;
  --overlay: rgba(31, 30, 27, 0.42);
  --card-shadow: none;

  /* ---- type / shape / motion ---- */
  --font-display: "Barlow", Bahnschrift, "Segoe UI", system-ui, sans-serif;
  --font-body: "Barlow", Bahnschrift, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Martian Mono", "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --fs-display: 61px; --fs-h1: 49px; --fs-h2: 34px; --fs-h3: 25px; --fs-h4: 20px;
  --fs-body-lg: 19px; --fs-body: 17px; --fs-small: 14.5px; --fs-caption: 12.5px;
  --radius: 0.625rem;   /* 10px — shadcn default */
  --radius-lg: 14px;
  --content-max: 1080px;
  --dur-fast: 150ms; --dur-base: 250ms;
  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);

  color-scheme: light;
}

/* Dark — explicit opt-in only. */
[data-theme="dark"], .dark {
  --background: var(--coal-900);      --foreground: var(--coal-50);
  --card: var(--coal-850);            --card-foreground: var(--coal-50);
  --popover: var(--coal-800);         --popover-foreground: var(--coal-50);
  --primary: var(--brass-500);        --primary-foreground: var(--coal-900);
  --secondary: var(--coal-800);       --secondary-foreground: var(--coal-50);
  --muted: var(--coal-870);           --muted-foreground: var(--coal-300);
  --accent: var(--coal-750);          --accent-foreground: var(--coal-50);
  --destructive: var(--err-500);      --destructive-foreground: #ffffff;
  --border: var(--coal-700);          --input: var(--coal-600);
  --ring: var(--brass-500);           --link: var(--brass-200);
  --primary-tint: rgba(217, 178, 63, 0.12);
  --well: var(--coal-900);            /* recessed fields: toward the ground in dark */
  --text-2: var(--coal-200);
  --success: var(--ok-300);   --success-tint: rgba(134, 190, 110, 0.10);
  --warning: var(--warn-300); --warning-tint: rgba(226, 155, 79, 0.11);
  --danger-tint: rgba(228, 105, 90, 0.10);
  --info: var(--info-300);    --info-tint: rgba(154, 178, 207, 0.10);
  --chart-1: #e68a44; --chart-2: #8fa6c4; --chart-3: #a3ae7e;
  --chart-4: #52b89e; --chart-5: #d96a54;
  --overlay: rgba(21, 21, 20, 0.55);
  --card-shadow: 0 12px 32px rgba(0, 0, 0, 0.30);
  color-scheme: dark;
}
