:root {
  --paper-base: #efe2c3;
  --paper-shadow: #dcc9a0;
  --ink-primary: #2b2117;
  --ink-secondary: #5b4636;
  --accent-rust: #8c4a2f;
  --then-tint: #8c4a2f;
  --now-tint: #3e4c59;
  --paper-panel: #f7efd9;
  --border-hairline: rgba(43, 33, 23, 0.25);

  /* surfaces and lines that were fixed colours before the themes */
  --bg: #efece4;
  --surface: #faf5e8;
  --surface-hi: #fffaf0;
  --surface-rgb: 250 245 232;
  --panel-end: #efe3c5;
  --ink-rgb: 43 33 23;       /* hairlines and washes drawn in ink */
  --paper-rgb: 239 226 195;  /* translucent paper */
  --panel-rgb: 247 239 217;
  --shadow-rgb: 43 33 23;    /* shadows */
  --peggy-ink: #2f6226;
  --tn-beleef: #8c4a2f; --tn-verken: #3e4c59; --tn-toen: #5c6b34;            /* Verhaal / Verken / Toen: text */
  --tn-beleef-fill: #8c4a2f; --tn-verken-fill: #3e4c59; --tn-toen-fill: #5c6b34;   /* ... and fill */
  --accent-fill: #8c4a2f;     /* fills that carry light text */
  --error-ink: #a3372a;
  --stars: none;

  --font-display: "Vollkorn", Georgia, serif;
  --font-body: "Vollkorn", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Donker: the same paper, in the evening. Follows the device unless the reader chooses. */
:root[data-theme="donker"] {
  color-scheme: dark;
  --paper-base: #1b1814; --paper-shadow: #2b261f; --paper-panel: #24201a; --panel-end: #1f1b16;
  --ink-primary: #efe6d3; --ink-secondary: #b3a58f;
  --accent-rust: #d98a5f; --then-tint: #d98a5f; --now-tint: #8fb0c8;
  --border-hairline: rgba(239, 230, 211, 0.22);
  --bg: #14110e; --surface: #2a251e; --surface-hi: #342e25; --surface-rgb: 42 37 30;
  --ink-rgb: 239 230 211; --paper-rgb: 27 24 20; --panel-rgb: 36 32 26; --shadow-rgb: 0 0 0;
  --accent-fill: #8c4a2f;
  --error-ink: #ff9d8d;
  --peggy-ink: #8fcf7a;
  --tn-beleef: #e39a70; --tn-verken: #9dbdd4; --tn-toen: #b4c97f;
  --tn-beleef-fill: #b05e3b; --tn-verken-fill: #4479a7; --tn-toen-fill: #627f39;   /* white text 4.5:1, and 3:1 against the bar */
}

/* Nacht: midnight blue with a starry sky. Never pitch black. */
:root[data-theme="nacht"] {
  color-scheme: dark;
  --paper-base: #0c1429; --paper-shadow: #16203f; --paper-panel: #111a33; --panel-end: #0f1730;
  --ink-primary: #e8edf9; --ink-secondary: #a5b2d2;
  --accent-rust: #ebcc7b; --then-tint: #ebcc7b; --now-tint: #8fb4f0;
  --border-hairline: rgba(190, 205, 240, 0.22);
  --bg: #080e1e; --surface: #16203f; --surface-hi: #1d2950; --surface-rgb: 22 32 63;
  --ink-rgb: 232 237 249; --paper-rgb: 12 20 41; --panel-rgb: 17 26 51; --shadow-rgb: 0 0 0;
  --accent-fill: #8f5a1e;
  --error-ink: #ff9d8d;
  --peggy-ink: #9fd8a0;
  --tn-beleef: #ebcc7b; --tn-verken: #8fb4f0; --tn-toen: #9fd0a0;
  --tn-beleef-fill: #b05e3b; --tn-verken-fill: #4479a7; --tn-toen-fill: #627f39;
}

/* focus ring: blue on the light theme (yellow vanishes on paper), yellow on the dark ones */
:root { --focus-ring: #1a56c4; }
:root[data-theme="donker"], :root[data-theme="nacht"] { --focus-ring: #f2b705; }
