/* Design tokens. Every colour in the app comes from here — swap this file and
   the whole look changes without touching a template or a line of Python.

   Palette «Лён»: a warm paper ground rather than a cold grey one. Night keeps
   the same warm bias instead of flipping to neutral grey. */

:root {
  color-scheme: light;

  --ground: #F7F4EE;
  --surface: #FFFFFF;
  --ink: #1B1915;
  --muted: #6F6659;
  --faint: #9A9082;
  --line: #E6DFD1;

  --field: #FFFFFF;
  --field-ink: #1B1915;
  --field-line: #E0D8C8;

  --accent: #8A6A3B;
  --danger: #9B3A2E;

  --print: #4A4034;
  --print-alpha-base: .10;

  --radius: 10px;
  --radius-lg: 16px;
  --step: 8px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Segoe UI Variable Text", "Segoe UI", system-ui,
               "Helvetica Neue", Arial, sans-serif;
  /* New York on Apple platforms, Palatino on Windows — both system faces, so
     nothing is downloaded and no licence travels with the app. */
  --font-serif: "New York", "Iowan Old Style", "Palatino Linotype", Palatino,
                Georgia, serif;
}

/* Two ways to be dark: the user picked it, or the system did and the user has
   not overridden. Both must set the same tokens. */
:root[data-theme="dark"],
:root[data-theme="auto"] { color-scheme: light dark; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --ground: #0C0B09;
    --surface: #17150F;
    --ink: #F2EFE7;
    --muted: #9A9184;
    --faint: #7D7568;
    --line: #2C2822;
    /* Night fields: white burns the eyes on a near-black ground, and the first
       attempt at dark was too muted to read as a field at all. */
    --field: #35302A;
    --field-ink: #F2EFE7;
    --field-line: #4A443B;
    --accent: #C6A56E;
    --danger: #D98A78;
    --print: #FFFFFF;
    --print-alpha-base: .075;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0C0B09;
  --surface: #17150F;
  --ink: #F2EFE7;
  --muted: #9A9184;
  --faint: #7D7568;
  --line: #2C2822;
  --field: #35302A;
  --field-ink: #F2EFE7;
  --field-line: #4A443B;
  --accent: #C6A56E;
  --danger: #D98A78;
  --print: #FFFFFF;
  --print-alpha-base: .075;
}
