/*
  PhotoDove — web palette. Single source of truth for the site's colours.

  Loaded by: index.html, privacy.html, terms.html.

  Two places deliberately MIRROR these values instead of loading this file —
  keep all three in step when a colour changes:
    • web/d/index.html          inlined, because the /d deep-link page runs a
                                strict CSP (style-src 'unsafe-inline' only, so
                                no external stylesheet can load).
    • mobile/lib/theme/theme.dart   the app's PaletteColors (day / night).
  See PALETTE.md for the canonical var → app-role table.

  Appearance: Auto follows the OS; the [data-theme] override lets the toggle
  pin Light or Dark (persisted in localStorage, paired with the no-flash
  script in each page's <head>).
*/
:root {
  --surface: #F2EEE7; --card: #FBF9F5; --ink: #372C22;
  --soft: rgba(55, 44, 34, 0.74);
  --dawn: #A85C28; --dawn-ink: #8F4A1D;
  --hair: rgba(168, 92, 40, 0.28);
  --mist: #F9E8D4; /* hero wash — index only */
  /* Text ON a --dawn fill. White clears AA on the day dawn (#A85C28), but
     dark mode's dawn (#F0BE8C) is a light peach where white is ~1.7:1 —
     so the fill's ink flips like the admin console's --on-dawn already
     does (AUDIT 2026-08-12). Used on .btn / .store-btn / the checked
     theme toggle. */
  --on-dawn: #fff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #211711; --card: #2E2118; --ink: #F0E6D9;
    --soft: rgba(240, 230, 217, 0.72);
    --dawn: #F0BE8C; --dawn-ink: #F0BE8C;
    --hair: rgba(240, 190, 140, 0.28);
    --mist: rgba(240, 190, 140, 0.12);
    --on-dawn: #241a13; /* dark ink on the light-peach dark-mode dawn */
  }
}

/* Toggle-pinned dark (wins over the OS pref above). */
:root[data-theme="dark"] {
  --surface: #211711; --card: #2E2118; --ink: #F0E6D9;
  --soft: rgba(240, 230, 217, 0.72);
  --dawn: #F0BE8C; --dawn-ink: #F0BE8C;
  --hair: rgba(240, 190, 140, 0.28);
  --mist: rgba(240, 190, 140, 0.12);
  --on-dawn: #241a13; /* was missing here: white text sat on the light-peach dawn when Dark was pinned */
}
