/*
 * Jadeite palette. Each color has a light and a dark value.
 * Text pairings are AAA (7:1+). Colors marked "large only" are AA (4.5:1+) and
 * belong on headings, borders, icons, and tags, never on small text.
 *
 * Which mode shows, strongest first:
 *   1. The visitor's saved choice from the Dark mode button (data-theme).
 *   2. The default set in Appearance > Jadeite > Settings (data-default-mode).
 *   3. The visitor's system setting.
 */
:root {
  color-scheme: light dark;
  /* Light values; used as-is by browsers without light-dark() support. */
  --ink: #0E1B16;
  --tint: #E3F4EF;
  --page: #FFFFFF;
  --link: #005C44;
  --on-link: #FFFFFF;
  --accent: #007A5A;
  --link-2: #1F4FA8;
  --link-2-deep: #0047AB;
  --accent-2: #B0245F;
  --text-berry: #8E1A4E;
  --focus: #007A5A;
  --rule: #5F7A6F;
  --warn: #8A5700;
  --throbber-bg: #212121;
}
@supports (color: light-dark(#000000, #FFFFFF)) {
  :root {
    --ink: light-dark(#0E1B16, #E3F4EF);         /* Body text */
    --tint: light-dark(#E3F4EF, #15302A);        /* Panels (always add a border) */
    --page: light-dark(#FFFFFF, #0E1B16);        /* Page background */
    --link: light-dark(#005C44, #6FD3B0);        /* Jade dark / jade light: links, headings, buttons */
    --on-link: light-dark(#FFFFFF, #0E1B16);     /* Text on a filled --link background (buttons, skip link) */
    --accent: light-dark(#007A5A, #3FA585);      /* Jade: borders, large accents */
    --link-2: light-dark(#1F4FA8, #A8C2F0);      /* Sapphire: secondary links, data lines */
    --link-2-deep: light-dark(#0047AB, #A8C2F0); /* Cobalt: secondary links inside panels (AAA on the tint) */
    --accent-2: light-dark(#B0245F, #D9628F);    /* Berry: tags, timeline line, large only */
    --text-berry: light-dark(#8E1A4E, #F0A8C6);  /* Raspberry / berry light: small berry text, hover */
    --focus: light-dark(#007A5A, #6FD3B0);       /* Focus ring */
    --rule: light-dark(#5F7A6F, #5FA58C);        /* Ordinary borders and dividers (3:1+ non-text) */
    --warn: light-dark(#8A5700, #F0B24A);        /* Warning bar and icon only; never text */
  }
}
:root[data-default-mode="dark"] { color-scheme: dark; }
:root[data-default-mode="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
