:root {
  /* Monochrome palette lifted from the EAISEL/ISEL stamp — refined near-black on
     paper with a calm grey scale. Data colours (sheetColors / branches in
     config.js) are separate and unaffected: they colour the tree nodes, this
     palette dresses the app shell. */
  --ink: #16181d;        /* primary text */
  --paper: #ffffff;      /* card / raised surface */
  --bg: #f3f4f7;         /* app background */
  --muted: #646b76;      /* secondary text */
  --line: #e4e7ec;       /* hairline borders / dividers */
  --line-strong: #cfd4dc;/* stronger hairline (hover, inputs) */
  --sunken: #eef0f4;     /* recessed tint (badges, label cells) */

  /* Brand surfaces. --green is the near-black used for the header, primary
     buttons and headings; --lime is the light accent (active nav, hairlines). */
  --green: #14171c;
  --lime: #ffffff;

  /* Primary button (inverts per theme for a confident, high-contrast control). */
  --btn-bg: #14171c;
  --btn-fg: #ffffff;
  --btn-bg-hover: #2a2f38;

  /* Restrained accent — focus rings and subtle emphasis only. */
  --accent: #3b5bdb;
  --accent-weak: rgba(59, 91, 219, 0.14);

  --font: Barlow, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: Fraunces, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --radius: 14px;        /* panels / cards */
  --radius-sm: 9px;      /* controls, chips, list items */
  --shadow-sm: 0 1px 2px rgba(16, 18, 23, 0.06);
  --shadow: 0 1px 2px rgba(16, 18, 23, 0.05), 0 8px 24px rgba(16, 18, 23, 0.07);
}

/* Dark mode — toggled by the .dark class on <html> (Settings › Appearance ›
   Theme). --green stays a dark surface (header/headings); the foreground uses
   of it (headings, links) are flipped to light in layout.css. */
html.dark {
  color-scheme: dark;
  --ink: #e7e9ee;
  --paper: #181b21;
  --bg: #0f1115;
  --muted: #9aa1ac;
  --line: #262b33;
  --line-strong: #3a414c;
  --sunken: #14181e;

  --green: #0c0e12;
  --lime: #2a2f37;

  --btn-bg: #e7e9ee;
  --btn-fg: #14171c;
  --btn-bg-hover: #ffffff;

  --accent: #6b8afd;
  --accent-weak: rgba(107, 138, 253, 0.18);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.5);
}
