/* theme.css: the club's app, for members in their 60s to 80s. Two looks,
   read in daylight at a desk or on a phone or at night: a white ground
   with near-black text, or a near-black ground with near-white text,
   both with one blue accent. Contrast clears 4.5:1 for text and status
   pairs in both looks, measured against the surfaces these tokens sit
   on; most pairs clear considerably more (the muted and faint text
   roles sit at 5.8-10.9:1, the status pills at 6.7-9.2:1, depending on
   theme).

   Every colour is declared once as light-dark(<light>, <dark>), as the
   framework's own themes do. With no choice made, the page follows the
   device (color-scheme: light dark). The footer's choice sets data-theme on
   <html>, and the two rules at the foot pin the scheme either way. */

:root {
  color-scheme: light dark;

  --rst-font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --rst-radius: 4px;
  --rst-radius-sm: 4px;
  --rst-radius-pill: 4px;

  --rst-bg: light-dark(#ffffff, #14171b);
  --rst-surface: light-dark(#ffffff, #1c2026);
  --rst-surface-2: light-dark(#f4f5f6, #252b33);
  --rst-line: light-dark(#c4c8cc, #4a525c);
  --rst-line-strong: light-dark(#5a6068, #9aa3ad);
  --rst-header-rule: light-dark(#1b1b1b, #f1f1ef);

  --rst-text: light-dark(#1b1b1b, #f1f1ef);
  --rst-text-muted: light-dark(#4a4f55, #c5cad0);
  --rst-text-faint: light-dark(#5a6068, #aeb5bd);

  --rst-accent: light-dark(#1a4fa0, #8fb8f5);
  --rst-accent-strong: light-dark(#123a78, #b7d0f8);
  --rst-accent-soft: light-dark(#e4ecf8, #1f2c42);
  --rst-on-accent: light-dark(#ffffff, #0c1220);

  --rst-tone-neutral-fg: light-dark(#3f444a, #d6dade);
  --rst-tone-neutral-bg: light-dark(#e9ebed, #2c3238);
  --rst-tone-positive-fg: light-dark(#155c2e, #a6e2bb);
  --rst-tone-positive-bg: light-dark(#dcefe2, #173424);
  --rst-tone-warning-fg: light-dark(#6b4a00, #f2d68a);
  --rst-tone-warning-bg: light-dark(#fbeec4, #3d2f0c);
  --rst-tone-negative-fg: light-dark(#8a1c1c, #f5b1b1);
  --rst-tone-negative-bg: light-dark(#f8dede, #3f1818);
  /* Negative figures in the tables: a clear red, 5.6:1 on white and 7:1 on the dark page. */
  --lic-neg-fg: light-dark(#c62828, #ff7676);

  --rst-shadow-pop: 0 4px 12px light-dark(rgba(27, 27, 27, 0.16), rgba(0, 0, 0, 0.5));
  --rst-shadow-knob: none;
  --rst-shadow-lift: none;
  --rst-overlay: light-dark(rgba(27, 27, 27, 0.45), rgba(0, 0, 0, 0.6));

  /* Type: 18px is the reading size. Nothing is smaller than 15px. */
  --rst-fs-lg: 1.25rem;
  --rst-fs-base: 1.125rem;
  --rst-fs-sm: 1rem;
  --rst-fs-xs: 0.9375rem;
}

/* The footer's choice. Setting color-scheme re-resolves every light-dark()
   above, so an explicit choice beats the device in both directions. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
