/* Design tokens for the lean staff app (LR-03). Colours from the 2026-11-24 prototype: cream, golds, ink.
   Light on :root; dark under prefers-color-scheme (System) or data-theme="dark" (chosen on the Account page).
   Every text pair the shell uses is at least 4.5:1 in both (tests/yapper/staff_app/test_contrast.py checks).
   Fonts: Asul (headings) and Figtree (body) are self-hosted by fonts.css (LR-22); the system stacks are the fallback. */

:root {
  color-scheme: light dark;
  --ground: #FFFAE4;
  --card: #FFFFFF;
  --text: #2B2208;
  --brand: #6E5717;
  --action: #AD8D34;
  --line: #D9CFA6;
  --muted: #6F6030;
  --alert: #8A1C1C;
  --good: #2F6B4A;
  --soft: #F3EBC8;
  --onbrand: #FFFAE4;  /* text on --brand */
  --ink: #231A02;      /* text on --action, both themes */
  --shade: rgba(43, 34, 8, 0.45);  /* behind an open sheet */
  --display: "Asul", "Iowan Old Style", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark is written twice because CSS cannot share one declaration list between a media query and an attribute:
   under the device setting (no choice made: System) and under an explicit choice (<html data-theme="dark">,
   set by the server from the staff_theme cookie, LR-13). test_account_theme.py keeps the two lists equal.
   An explicit "light" keeps the :root values above and only pins color-scheme. */
:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #191508;
  --card: #262010;
  --text: #FFFAE4;
  --brand: #E7BB40;
  --action: #FFD360;
  --line: #4D4424;
  --muted: #C9BB8A;
  --alert: #FF9D8F;
  --good: #8FD3A8;
  --soft: #322A14;
  --onbrand: #191508;
  --ink: #231A02;
  --shade: rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ground: #191508;
    --card: #262010;
    --text: #FFFAE4;
    --brand: #E7BB40;
    --action: #FFD360;
    --line: #4D4424;
    --muted: #C9BB8A;
    --alert: #FF9D8F;
    --good: #8FD3A8;
    --soft: #322A14;
    --onbrand: #191508;
    --ink: #231A02;
    --shade: rgba(0, 0, 0, 0.6);
  }
}
