/* Colors, themes and dark mode, as CSS variables. Other files use these
   variables for every color that changes with the theme or dark mode; only a
   few fixed colors (such as white text on a colored button) are written
   directly.
   Goes with: js/main.js (applyLook sets data-mode and the theme --accent).

   Load order (index.html): tokens, base, the shared ui/ files, one file per
   page in screens/, then ui/print.css last. A later file may build on an
   earlier one; nothing earlier depends on anything later.

   Screen widths used in @media rules:
     max-width:640px            narrow phones
     max-width:700px / 701px    phone layout vs everything larger
     min-width:900px            wide screens (two-column forms)
     max-width:760px            Setup only: its two card columns need 760px
   Narrow rules are "screen and (max-width)" and the 701px rules are
   "print, screen and (min-width)", so a printout gets the same wide layout
   whatever the device. iPhone lays a printed page out about 550px wide,
   which would otherwise pick up the phone layout. */

:root {
  --accent: #526b5d;
  --goodbg: #eaf0e8;
  --warnbg: #f7eee7;
  --c-tax: #b97958;
  --c-ins: #b49a5b;
  --c-exp: #718c9a;
  --c-debt: #8b7b9a;
  --c-save: #6d927e;
  --c-cash: #66866b;
  color-scheme: light;
  --bg: #f8f0ed;
  --card: #fff;
  --ink: #2d1a17;
  --ink2: #7b625c;
  --mute: #937b75;
  --line: #efdfd9;
  --soft: #f6e8e3;
  --band: #8f5d54;
  --band-ink: #fff;
  --band-ink2: rgba(255,255,255,.84);
  --band-chip: rgba(255,255,255,.17);
  --good: #3d7d53;
  --amber: #b5830f;
  --over: #d23b2f;
  --warn: #d23b2f;
  --sh: inset 0 1px 0 #fff,0 8px 24px rgba(120,60,50,.08);
}
/* Dark colors are written twice: for "Dark" chosen in Settings, and for
   "Automatic" when the phone is in dark mode (this one also covers the PIN
   screen, which shows before the app's script runs). Keep the two blocks
   identical; tests/test_hosting.py checks it. */
:root[data-mode=dark] {
  --accent: #9ab39f;
  color-scheme: dark;
  --ink: #f7ede9;
  --ink2: #c7b0a9;
  --mute: #a8918a;
  --band: #3d211d;
  --band-chip: rgba(255,255,255,.11);
  --good: #8fd0a0;
  --amber: #f2b84b;
  --over: #ff6f61;
  --warn: #ff6f61;
  --goodbg: #21352a;
  --warnbg: #45241f;
  --sh: inset 0 1px 0 rgba(255,255,255,.07),0 8px 24px rgba(0,0,0,.25);
  --bg: #271a17;
  --card: #33221e;
  --line: #4a322d;
  --soft: #432d28;
}
@media (prefers-color-scheme:dark) {
  :root:not([data-mode=light]) {
    --accent: #9ab39f;
    color-scheme: dark;
    --ink: #f7ede9;
    --ink2: #c7b0a9;
    --mute: #a8918a;
    --band: #3d211d;
    --band-chip: rgba(255,255,255,.11);
    --good: #8fd0a0;
    --amber: #f2b84b;
    --over: #ff6f61;
    --warn: #ff6f61;
    --goodbg: #21352a;
    --warnbg: #45241f;
    --sh: inset 0 1px 0 rgba(255,255,255,.07),0 8px 24px rgba(0,0,0,.25);
    --bg: #271a17;
    --card: #33221e;
    --line: #4a322d;
    --soft: #432d28;
  }
}

