/* Design tokens for this site. Every colour the site uses is defined here, once per theme.
   Themes: daylight (default), night, and contrast (used when the system asks for more contrast).
   Palette (2026-11-25, from the ui-ux-pro-max catalogue, "E-commerce", product-aligned): primary #059669, cream page
   #FFFEF2 (surface #FBF9E6, a derived cream); daylight green #2F6B4F (owner, 2026-11-25; was #4A5D52, which read grey) with cream tints, foreground #064E3B, muted foreground #475569, border #A7F3D0, destructive #DC2626, accent #EA580C.
   The catalogue has no dark mode and no alert colours: the night theme and the alert and warning tints are derived from
   these values and checked with the same rules (see private/design-system/aydam/MASTER.md, Colour).
   Checked by tools/static-site/check_design.py: every theme must meet WCAG AA (4.5:1) for text and controls,
   and 3:1 for borders and focus rings (WCAG 1.4.11). */

:root {
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 4px;
  --text-scale: 1;
  --line-height: 1.6;
  --letter-spacing: normal;
  --space: 1.25rem;
  --max-width: 1080px;
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  /* The home hero follows the theme: its overlay is the page background and its text is the page text
     (day: cream and deep green; night: deep green and cream). --hero-scrim stays deep green for text on the gold accent. */
  --hero-overlay: var(--background);
  --hero-text: var(--text-primary);
  --hero-scrim: #004741;
}

:root, [data-theme="daylight"] {
  color-scheme: light;
  --background: #F0EDE4;
  --surface: #E6E1D3;
  --text-primary: #004741;
  --text-secondary: #3F5C58;
  --link-primary: #004741;
  --border-subtle: color-mix(in srgb, var(--text-primary) 30%, var(--background));
  --border: color-mix(in srgb, var(--text-primary) 70%, var(--background));
  --button-primary: #004741;
  --text-on-color: #F0EDE4;
  --focus: #004741;
  --display: #004741;
  --accent: #E3B65B;
  --error: #DC2626;
  /* Status alerts: a tinted box with dark text. The info and success tints are catalogue colours; the error and warning tints are derived. */
  --alert-info-bg: #E8F1F3; --alert-info-text: #064E3B; --alert-info-border: #475569;
  --alert-success-bg: #A7F3D0; --alert-success-text: #064E3B; --alert-success-border: #059669;
  --alert-error-bg: #FEE2E2; --alert-error-text: #7F1D1D; --alert-error-border: #DC2626;
  --alert-warning-bg: #FED7AA; --alert-warning-text: #9A3412; --alert-warning-border: #EA580C;
  /* Side-menu tints: a hover and the current page. Night darkens the surface instead of lightening it, so cream text keeps 4.5:1. */
  /* Daylight tints are cream, not green: a hover (soft) and a selected or filled control (strong: chips, the current
     menu item, an open dropdown). */
  --tint-soft: #E9E5D6;
  --tint-strong: #DFD9C6;
  --nav-tint-hover: var(--tint-soft);
  --nav-tint-current: var(--tint-strong);
  /* Tags and counters (permission labels, counts, the ok chip): the green with cream text in every theme (owner, 2026-11-25). */
  --tag-bg: #004741; --tag-text: #F0EDE4; --tag-border: #004741;
  /* Placeholder text in fields: readable (4.5:1 on the field), lighter than typed text. */
  --placeholder: #5F6B78;
  /* Trend direction: up is green, down is red (text and chart lines; 4.5:1 on the card). */
  --trend-up: #047857; --trend-down: #B91C1C;
}

[data-theme="night"] {
  color-scheme: dark;
  /* Night is daylight flipped (owner, 2026-11-25): the #4A5D52 green is the page and cream is the text and buttons. */
  --background: #004741;
  --surface: #0B5A52;
  --text-primary: #F0EDE4;
  --text-secondary: #CFE0DB;
  --link-primary: #F0EDE4;
  /* Borders are cream in night (owner, 2026-11-25), not a mix with the page. */
  --border-subtle: #2A6A62;
  --border: #5E8C84;
  --button-primary: #F0EDE4;
  --text-on-color: #004741;
  --focus: #E3B65B;
  --display: #F0EDE4;
  --accent: #E3B65B;
  --error: #FFD5D5;
  --alert-info-bg: #0F3D4F; --alert-info-text: #D6F0FA; --alert-info-border: #475569;
  --alert-success-bg: #0E4A35; --alert-success-text: #D1FAE5; --alert-success-border: #059669;
  --alert-error-bg: #5A1E1E; --alert-error-text: #FEE2E2; --alert-error-border: #DC2626;
  --alert-warning-bg: #4A2A12; --alert-warning-text: #FED7AA; --alert-warning-border: #EA580C;
  /* The selected menu item is darker than the page, so it shows against it (cream text stays readable). */
  --nav-tint-hover: color-mix(in srgb, #000000 12%, var(--background));
  --nav-tint-current: color-mix(in srgb, #000000 26%, var(--background));
  --tint-soft: color-mix(in srgb, var(--background) 30%, var(--surface));
  --tint-strong: color-mix(in srgb, var(--background) 55%, var(--surface));
  /* The same green as the page, so a cream outline sets the tag apart. */
  --tag-bg: #4A5D52; --tag-text: #FFFEF2; --tag-border: var(--border);
  --placeholder: #E6E0BE;
  --trend-up: #BBF7D0; --trend-down: #FFD5D5;
}

[data-theme="contrast"] {
  color-scheme: light;
  --background: #ffffff;
  --surface: #ffffff;
  --text-primary: #000000;
  --text-secondary: #000000;
  --link-primary: #000000;
  --border-subtle: #000000;
  --border: #000000;
  --button-primary: #000000;
  --text-on-color: #ffffff;
  --focus: #000000;
  --display: #000000;
  --error: #000000;
  --alert-info-bg: #ffffff; --alert-info-text: #000000; --alert-info-border: #000000;
  --alert-success-bg: #ffffff; --alert-success-text: #000000; --alert-success-border: #000000;
  --alert-error-bg: #ffffff; --alert-error-text: #000000; --alert-error-border: #000000;
  --alert-warning-bg: #ffffff; --alert-warning-text: #000000; --alert-warning-border: #000000;
  --nav-tint-hover: color-mix(in srgb, #000000 8%, transparent);
  --nav-tint-current: color-mix(in srgb, #000000 16%, transparent);
  --tint-soft: color-mix(in srgb, #000000 8%, transparent);
  --tint-strong: color-mix(in srgb, #000000 16%, transparent);
  --tag-bg: #000000; --tag-text: #ffffff; --tag-border: #000000;
  --placeholder: #000000;
  --trend-up: #000000; --trend-down: #000000;
}
