/* assert(llm) — v4 tokens, light + dark.
   Drop this block into :root of every page (or a shared theme.css). Dark mode
   follows the system setting only (prefers-color-scheme). There is no toggle,
   because a toggle has to be remembered and the privacy policy promises no
   localStorage, sessionStorage or cookies. */

:root{
  color-scheme:light dark;

  --ink:#111114; --paper:#FFFFFF;
  --accent:#3D3BF3;        /* text, links, underlines, borders */
  --accent-fill:#3D3BF3;   /* filled shapes carrying white text */
  --accent-soft:#DCDCFF;
  --lime:#D4F24A; --lime-line:#A9C21F;
  --fail:#D6176F; --fail-soft:#FCE4EF; --fail-line:#E58AB2; --fail-ink:#6E0A37; --fail-on-dark:#FF7DB4;
  --err:#B5B1EE; --err-on-dark:#9A97D9;
  --warn:#FFE58A; --warn-soft:#FFF4C7; --warn-line:#E8C04A; --warn-ink:#3D2E00;
  --surface:#E6E3FF; --line:#DCD9FA; --line-strong:#B5B1EE;
  --muted:#4B4F7A; --body:#2A2C4A;
  --backdrop:rgba(17,17,20,.55);   /* behind the legal modals */

  /* the dark command bar / wire band: dark in both modes */
  --bar:#111114; --bar-field:#1C1C3A; --bar-line:#35356B; --bar-muted:#9A97D9; --bar-ink:#FFFFFF;
  /* the big "ink" blocks (Run block, CTA, featured finding card).
     Always drawn with border:2px solid var(--block-line): invisible in light
     mode (same colour as the fill), it is what separates the block from the
     surface cards in dark mode. */
  --block:#111114; --block-ink:#FFFFFF; --block-muted:#9A97D9; --block-line:#111114;

  /* text that sits on a colour that does not change between modes */
  --on-lime:#111114; --on-lime-muted:#2A2C4A; --on-accent:#FFFFFF; --on-accent-muted:#DCDCFF; --on-warn:#4D3A00;

  --ds-istqb:#FF9F5A; --ds-coding:#7CC8FF; --ds-general:#C3B5FF; --ds-sql:#5FD6C4; --ds-hard:#111114;
  /* the middle latency band, as text on paper. Not --score-low: that orange
     is a background with ink on it and cannot carry 12px type. */
  --ms-mid:#B45309;
  --mono:'Spline Sans Mono',monospace;
}

/* The dark palette, written once and applied two ways.

   [data-theme] is set on <html> by the inline script in every page head,
   from the one value this site stores: the theme the reader picked. The
   media query carries the same tokens for everyone who picked nothing, and
   steps aside for :root[data-theme="light"] so an explicit "light" wins
   over a dark system setting. Keep the two lists identical - a test fails
   if they drift. */
:root[data-theme="dark"]{
  --ink:#F2F1FF; --paper:#0F0F1A;
  --accent:#8A88FF; --accent-fill:#4B49FF; --accent-soft:#2A2A5E;
  --fail-soft:#3A1030; --fail-line:#7A1F4A; --fail-ink:#FF7DB4;
  --warn-soft:#3A3010; --warn-line:#8A7420; --warn-ink:#FFE58A;
  --surface:#1C1C3A; --line:#2A2A50; --line-strong:#3F3F6E;
  --muted:#A3A1E6; --body:#CFCDF2;
  --backdrop:rgba(7,7,15,.78);
  --bar:#07070F;
  --block:#07070F; --block-ink:#F2F1FF; --block-muted:#A3A1E6; --block-line:#35356B;
  --ms-mid:#E8C04A;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --ink:#F2F1FF; --paper:#0F0F1A;
    --accent:#8A88FF; --accent-fill:#4B49FF; --accent-soft:#2A2A5E;
    --fail-soft:#3A1030; --fail-line:#7A1F4A; --fail-ink:#FF7DB4;
    --warn-soft:#3A3010; --warn-line:#8A7420; --warn-ink:#FFE58A;
    --surface:#1C1C3A; --line:#2A2A50; --line-strong:#3F3F6E;
    --muted:#A3A1E6; --body:#CFCDF2;
    --backdrop:rgba(7,7,15,.78);
    --bar:#07070F;
    --block:#07070F; --block-ink:#F2F1FF; --block-muted:#A3A1E6; --block-line:#35356B;
    --ms-mid:#E8C04A;
  }
}

/* Rules of thumb when applying the tokens to an existing page:
   - text on lime, on a --ds-* colour, or on any filled pill: color:var(--on-lime)
     (never var(--ink), which is near-white in dark mode)
   - white text on an accent fill: background:var(--accent-fill); color:var(--on-accent)
   - links inside .bar: color:var(--bar-ink)
   - ink blocks: background:var(--block); border:2px solid var(--block-line);
     color:var(--block-ink); captions var(--block-muted)
   - the sticky header gets border-bottom:1.5px solid var(--bar-line) in dark mode
     (the 3px ink rule under it disappears against --paper otherwise)
   - small ink pills inside a lime card (the "ISTQB · 3 MODELS" chip) stay
     #111114/#FFFFFF: they sit on lime, which does not change
   - .ds-hard pill/card: background:#111114; color:#FFFFFF, hard-coded in both modes
   - everything else (paper, surface, line, muted, body, ink borders) just works */

/* The theme button, here rather than in ten page stylesheets so that "the same
   component on every page" is literally one copy. It is the site's ghost
   button, round: 2px ink border on paper, surface on hover. The icon inside
   says where a click goes - a moon while the page is light, a sun while it is
   dark - and theme.js swaps which of the two is hidden. */
.theme-btn{flex:none;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--paper);color:var(--ink);border:2px solid var(--ink);border-radius:999px;cursor:pointer;padding:0}
.theme-btn:hover{background:var(--surface)}
.theme-btn:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.theme-btn svg{width:18px;height:18px;display:block}
.theme-btn svg[hidden]{display:none}

/* The wordmark is ~140px wide, which on a phone pushes the nav pills and the
   theme button onto rows of their own. Below 640px the header shows the mark
   the site already uses as its favicon and in the OG image instead: the same
   rounded square and checkmark, in the accent fill. The word is hidden from
   the eye but left in the DOM, so the link keeps its accessible name. */
.logo-mark{display:none;color:var(--accent-fill)}
.logo-mark svg{width:34px;height:34px;display:block}
@media(max-width:640px){
  .logo-mark{display:inline-flex}
  .logo-word{position:absolute;width:1px;height:1px;padding:0;margin:-1px;
    overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
}
