/* ==========================================================================
   THE SITE'S LOOK, IN ONE PLACE
   Change a font, size or color here and every page, control and figure label
   follows. Nothing else in the project hard-codes a page font or color.
   ========================================================================== */
:root{
  /* Fonts: system fonts, so nothing downloads and text appears at once */
  --font-body:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-heading:var(--font-body);

  /* Text sizes */
  --text-sm:.9375rem;                      /* captions, tables, controls */
  --text-body:1.125rem;                    /* article text */
  --text-card:clamp(1.3rem,2vw,1.55rem);   /* module titles on the homepage */
  --text-h2:1.6rem;                        /* section headings */
  --text-h1:clamp(2rem,4.4vw,2.9rem);      /* article titles */
  --text-intro:clamp(1.7rem,3.6vw,2.4rem); /* homepage heading */

  /* Text details */
  --weight-heading:680;
  --weight-strong:620;
  --leading-body:1.65;
  --leading-heading:1.14;
  --tracking-heading:-.024em;

  /* Layout */
  --measure:42rem;        /* width of article text */
  --wide:70rem;           /* width of figures and the homepage grid */
  --gutter:clamp(18px,4vw,40px);
  --radius:12px;          /* figures and thumbnails */
  --radius-control:8px;   /* buttons and menus */

  /* Colors: light */
  color-scheme:light;
  --bg:#ffffff;
  --surface:#f4f6f8;
  --ink:#15171c;
  --muted:#555b66;
  --line:#dfe3e8;
  --accent:#1f56c4;

  /* Figure stage: a pale blue-gray in light mode (write colors as #rrggbb) */
  --stage-bg:#edf2f6;
  --stage-ink:#1a2029;
  --stage-muted:#586272;
  --stage-line:#dde4eb;
  --figure-label:12px;    /* smallest label drawn inside a figure */
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#111317;
  --surface:#1a1d22;
  --ink:#eceef1;
  --muted:#a3a9b4;
  --line:#363b45;
  --accent:#8db4ff;

  /* Figure stage: dark gray in dark mode */
  --stage-bg:#1d2025;
  --stage-ink:#ecebe8;
  --stage-muted:#a4a9b1;
  --stage-line:#2c3038;
}
