/* Design tokens: the only place the site's colours, type, spacing, radii and shadows are set. platform.css (site and
   owner console) and practice.css only read them. Light by default; dark follows prefers-color-scheme (a toggle
   would need an inline script, which the CSP blocks). The dark values apply to the screen only, so a page printed
   from dark mode (an invoice) gets the light values: dark text on white paper. */
:root {
  color-scheme: light dark;
  accent-color: var(--accent);

  /* brand */
  --navy: #16243d; --teal: #0f8b8d; --amber: #f2a93b; --charcoal: #262b33;

  /* surfaces and text */
  --bg: #f4f7fa;
  --surface: #fff; --card: var(--surface); --surface-2: #eef2f6;
  --heading: #16243d; --text: #1f2a3a; --muted: #566476;
  --line: #d9e1ea; --line-strong: #b8c4d2;
  /* The edge of a field or an answer tile is what shows it is one: 3:1 at least on the card and the page (WCAG
     1.4.11). --line-strong stays for buttons, whose text already says what they are, and for decoration. */
  --field-border: #7f8fa2;
  /* Teal #0f8b8d carries white text at 4.1:1 only, so it is decoration; text, links and buttons use the accent. */
  --accent: #0c7a7c; --accent-hover: #0a6668; --accent-text: #fff; --accent-soft: #e3f3f3;
  --focus: var(--accent);                        /* platform.css switches it to amber on the navy areas */
  --green: #1d7a3a; --green-soft: #e6f4ea;
  --red: #b3261e; --red-soft: #fbeaea;
  --warn: #8a5300; --warn-soft: #fdf3e1;
  --header-bg: var(--navy);
  /* on the navy areas (header, cover photo, footer, call-to-action band) */
  --on-dark: #fff; --on-dark-muted: rgba(255, 255, 255, .86); --on-dark-line: rgba(255, 255, 255, .34);
  --scrim: 11 20 36;                             /* rgb channels of the cover photo's shade: rgb(var(--scrim) / .85) */
  --shadow-1: 0 1px 2px rgba(22, 36, 61, .06), 0 1px 3px rgba(22, 36, 61, .08);
  --shadow-2: 0 2px 4px rgba(22, 36, 61, .06), 0 8px 20px rgba(22, 36, 61, .10);
  --shadow-3: 0 4px 12px rgba(22, 36, 61, .10), 0 18px 44px rgba(22, 36, 61, .18);
  /* The answer sheet (redesign of 2026-10-22): a chosen answer's bubble, the answered cells of the answer sheet and the
     used free questions are filled in ink, like a pencil mark. --stem is the colour of a question's own text. */
  --mark: var(--navy); --mark-text: #fff;
  --stem: var(--heading);

  /* type: the system font of each device, no web font. --font-read is the device's own book serif, for what is read
     at length (a question, its explanation), as in the printed booklet; everything else stays in --font. */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-read: Charter, "Iowan Old Style", "Palatino Linotype", "Noto Serif", "Source Serif Pro", Georgia, Cambria, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs: 16px; --lh: 1.6; --fs-small: 14px; --fs-lead: 18px;
  --fs-h3: 17px; --fs-h2: clamp(20px, 16px + 1vw, 26px); --fs-h1: clamp(26px, 20px + 1.6vw, 36px);
  --fs-hero: clamp(32px, 22px + 3vw, 54px);
  --fs-stem: 18px; --fs-read: 17px; --fs-clock: 20px;
  --tracking: -0.01em;

  /* spacing, radii, widths */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-pill: 999px;
  --container: 1120px; --container-mid: 720px; --container-narrow: 440px;
  --bubble: 32px;                                /* an answer's lettered bubble; the answer tile is 56px high at least */
  --tile: 56px;
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --navy: #16243d; --teal: #0f8b8d; --amber: #f2a93b; --charcoal: #262b33;     /* brand: the same in both modes */
    --bg: #0b1424;
    --surface: #132036; --surface-2: #1a2a44;
    --heading: #f3f6fa; --text: #e6edf5; --muted: #9fb0c3;
    --line: #2a3b57; --line-strong: #3a4f70;
    --field-border: #5a7394;
    --accent: #5cc6c8; --accent-hover: #7dd4d6; --accent-text: #08202a; --accent-soft: #12363d;
    --green: #81c995; --green-soft: #1a2e21;
    --red: #f28b82; --red-soft: #3a1f1d;
    --warn: #f2c46d; --warn-soft: #3a2d14;
    --header-bg: #0f1a2c;
    /* the ink of a filled bubble is the light accent at night (navy would vanish on the dark sheet); the question's
       text is a step softer than white, for a three-hour exam in a dark room */
    --mark: var(--accent); --mark-text: var(--accent-text);
    --stem: #dde6f0;
    --on-dark: #fff; --on-dark-muted: rgba(255, 255, 255, .86); --on-dark-line: rgba(255, 255, 255, .34);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .30), 0 1px 3px rgba(0, 0, 0, .24);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, .30), 0 8px 20px rgba(0, 0, 0, .32);
    --shadow-3: 0 4px 12px rgba(0, 0, 0, .34), 0 18px 44px rgba(0, 0, 0, .44);
  }
}

@media print {
  :root { color-scheme: light; }                 /* and the light values above: the dark block is screen-only */
}
