/* BauHunt brand -> semantic roles -> Tailwind/shadcn. Do not paste a preset over this map. */
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));

:root {
  /* Native controls and first paint follow the OS even without JavaScript.
     A saved explicit choice narrows this on <html> before body rendering. */
  color-scheme: light dark;
  /* One content width (D-CONTENT-WIDTH-20261110). Header, footer and every
     page-level block use --page-container; never a literal page width. */
  --page-width: 1080px;
  --page-gutter: 24px;
  --page-container: min(var(--page-width), calc(100% - 2 * var(--page-gutter)));
  --brand-paper-50: #fafbf8;
  --brand-paper-100: #f5f6f1;
  --brand-ivory: #fffefb;
  --brand-white: #ffffff;
  --brand-pine-950: #102d2a;
  --brand-pine-900: #173d39;
  --brand-pine-600: #526b60;
  --brand-pine-200: #dce1d7;
  --brand-lime-400: #c8f43d;
  --brand-lime-300: #d7ff64;
  --brand-teal-700: #08766e;
  --brand-teal-800: #075f58;
  --background: light-dark(var(--brand-paper-100), #101c1a);
  --foreground: light-dark(var(--brand-pine-950), #e6eee8);
  --card: light-dark(var(--brand-ivory), #192925);
  --card-foreground: var(--foreground);
  --popover: light-dark(var(--brand-white), #21352e);
  --popover-foreground: var(--foreground);
  --primary: var(--brand-lime-400);
  --primary-foreground: var(--brand-pine-950);
  --primary-hover: var(--brand-lime-300);
  --secondary: light-dark(#e9eee5, #25372f);
  --secondary-foreground: var(--foreground);
  --muted: light-dark(#eef1eb, #1e302a);
  --muted-foreground: light-dark(var(--brand-pine-600), #a9bdb2);
  --accent: light-dark(#e8f2eb, #203d33);
  --accent-foreground: var(--foreground);
  --link: light-dark(var(--brand-teal-700), #85d8c7);
  --link-hover: light-dark(var(--brand-teal-800), #b0ebda);
  --border: light-dark(var(--brand-pine-200), #3c5448);
  --input: light-dark(#82968b, #6f897b);
  --ring: light-dark(var(--brand-teal-700), #c8f43d);
  --destructive: light-dark(#a32d31, #ffb4aa);
  --destructive-foreground: light-dark(#ffffff, #381713);
  --destructive-surface: light-dark(#fff0ef, #3c2523);
  --warning: light-dark(#794910, #efcc8d);
  --warning-surface: light-dark(#fff5db, #352f22);
  --success: light-dark(#225a3d, #aedb9f);
  --success-surface: light-dark(#eaf4eb, #263b2b);
  --inverse: var(--brand-pine-950);
  --inverse-foreground: var(--brand-ivory);
  --surface-raised: light-dark(#ffffff, #21352e);
  --surface-soft: light-dark(#f5f6f1, #15231f);
  --on-action: var(--brand-pine-950);
  --radius: 0.625rem;
  /* Compatibility aliases for the custom product layouts. */
  --ink: var(--foreground);
  --muted-text: var(--muted-foreground);
  --paper: var(--background);
  --white: var(--card);
  --teal: var(--link);
  --teal-dark: var(--link-hover);
  --lime: var(--primary);
  --line: var(--border);
}

/* Keep explicit schemes in CSS as well as the pre-paint initializer. CSS
   compilation can lower light-dark() into scheme-dependent custom properties. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* A surface that is light in every colour scheme (the /request chat, owner 17.11.2026). The two-scheme tokens are
   computed on :root, so a nested color-scheme alone does not change them: this scope restates each one with its light
   value, and the aliases that point at them. tests/design-system.test.mjs keeps the list complete. */
[data-color-scheme="light"] {
  color-scheme: light;
  --background: var(--brand-paper-100);
  --foreground: var(--brand-pine-950);
  --card: var(--brand-ivory);
  --popover: var(--brand-white);
  --secondary: #e9eee5;
  --muted: #eef1eb;
  --muted-foreground: var(--brand-pine-600);
  --accent: #e8f2eb;
  --link: var(--brand-teal-700);
  --link-hover: var(--brand-teal-800);
  --border: var(--brand-pine-200);
  --input: #82968b;
  --ring: var(--brand-teal-700);
  --destructive: #a32d31;
  --destructive-foreground: #ffffff;
  --destructive-surface: #fff0ef;
  --warning: #794910;
  --warning-surface: #fff5db;
  --success: #225a3d;
  --success-surface: #eaf4eb;
  --surface-raised: #ffffff;
  --surface-soft: #f5f6f1;
  --card-foreground: var(--foreground);
  --popover-foreground: var(--foreground);
  --primary: var(--brand-lime-400);
  --primary-foreground: var(--brand-pine-950);
  --primary-hover: var(--brand-lime-300);
  --secondary-foreground: var(--foreground);
  --accent-foreground: var(--foreground);
  --inverse: var(--brand-pine-950);
  --inverse-foreground: var(--brand-ivory);
  --on-action: var(--brand-pine-950);
  --ink: var(--foreground);
  --muted-text: var(--muted-foreground);
  --paper: var(--background);
  --white: var(--card);
  --teal: var(--link);
  --teal-dark: var(--link-hover);
  --lime: var(--primary);
  --line: var(--border);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-link: var(--link);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
}
