:root{--ground:#F6F3EE;--panel:#FFF;--ink:#26201A;--ink2:#6B6156;--line:#E2DCD2;
--accent:#8A6320;--asoft:#F0E6D2;--sable:#241C15;--sink:#EFE7DB;--well:var(--sink);--ok:#3E7A44;--warn:#A8731E;--crit:#A03A2E;
--mono:ui-monospace,Consolas,monospace;--coding-top:180px;
/* ⚠ FOUR NAMES THAT WERE USED BUT NEVER DEFINED — the walkthrough was TRANSPARENT because of it
   (owner, 2026-07-31, with a screenshot: the page read straight through the dialog and its own
   two paragraphs collided). `background:var(--card)` with no --card is not an error in CSS: the
   declaration is simply dropped, so the element renders with no background at all and every test
   still passes, because every text node is exactly where it should be. --fg and --muted did the
   same to the tour's body text, and --panel2 elsewhere.
   Defined as ALIASES rather than renaming each use, so a future `var(--card)` also works — and
   test/cssvars.test.js now fails the build if any var() has no definition. */
--card:var(--panel);--panel2:var(--asoft);--fg:var(--ink);--muted:var(--ink2);--wait:var(--warn);
/* THE IRIS RAIL (A1). Both are rewritten at runtime and both need a definition HERE, in the
   first stylesheet, or cssvars.test.js counts them missing — it reads uses from the whole
   document but definitions only up to the first closing style tag, and the rail's rules live
   further down beside the rest of the panel.
   ⚠ Never write that tag literally in a comment: an HTML parser ends the element at the first
   one it sees, comment or not, and the rest of the stylesheet becomes page text. It happened
   while writing this block — the sheet ended 1,600 characters in and nothing below it applied.
   --railw tracks the panel's real width so the page's left padding cannot drift from it when the
   rail is dragged wider; --railtop tracks the header, which is measured rather than assumed.
   ⚠ THESE TWO FIGURES ARE PRE-PAINT DEFAULTS ONLY, and the top one was wrong: it said 56px while
   the header measures 52, so the rail hung 4px low until the script corrected it — and it is the
   gap the owner photographed on 2026-08-10. It is 52 now because that is what the header actually
   is, but the number is not the fix and must not be trusted as one: fonts, zoom and a wrapped row
   all move it. The measurement in railVar is the fix. This value only has to be close enough that
   nothing jumps between first paint and the first write. */
--railw:380px;--railtop:52px}
/* ── THE DARK PALETTE, AND HOW IT IS CHOSEN ────────────────────────────────────────────────
   Owner, 2026-08-05: "has an option of black screen".

   These colours already existed and were reachable ONLY through prefers-color-scheme — the
   operating system's setting. So on a laptop set to light there was no way to get a black screen
   at all, and nothing in Sable said so. A theme that exists but cannot be asked for is not an
   option, it is a coincidence.

   ⚠ THE PALETTE IS DECLARED ONCE, in a variable group applied by THREE selectors, rather than
   copied into a media query and a data-attribute rule. Two copies of a palette drift the first
   time a colour is corrected in one of them, and the symptom is a screen that looks right until
   you toggle it.
     :root[data-theme=dark]                        — chosen explicitly
     @media(dark) :root:not([data-theme=light])    — following the system, unless overridden
   The :not() is what makes "Light" a real choice rather than a suggestion the OS can veto.

   A media query cannot be merged with a plain selector, so there are two MAPPING blocks — but the
   COLOURS themselves appear exactly once, as --d-* below, and both blocks point at them. That is
   the property that matters: correcting a colour in one place cannot leave the other stale. */
:root{--d-ground:#171310;--d-panel:#211B16;--d-ink:#EDE5D9;--d-ink2:#9C9083;
--d-line:#373028;--d-accent:#C79A47;--d-asoft:#3A2F1D;--d-sable:#0F0C0A;
--d-ok:#7FB086;--d-warn:#D2A35A;--d-crit:#CF7A6E;
/* --well is the sunken surface (a command line, a bubble, a track). It was --sink, which is ALSO the
   cream text on the header and on primary buttons, so it could not turn dark without breaking them:
   in dark the command line stayed cream under cream text (BO card audit S-018, 2026-10-09). */
--d-well:#2B241D}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){
--ground:var(--d-ground);--panel:var(--d-panel);--ink:var(--d-ink);--ink2:var(--d-ink2);
--line:var(--d-line);--accent:var(--d-accent);--asoft:var(--d-asoft);--sable:var(--d-sable);
--ok:var(--d-ok);--warn:var(--d-warn);--crit:var(--d-crit);--well:var(--d-well)}}
:root[data-theme="dark"]{
--ground:var(--d-ground);--panel:var(--d-panel);--ink:var(--d-ink);--ink2:var(--d-ink2);
--line:var(--d-line);--accent:var(--d-accent);--asoft:var(--d-asoft);--sable:var(--d-sable);
--ok:var(--d-ok);--warn:var(--d-warn);--crit:var(--d-crit);--well:var(--d-well)}

html,body{background:var(--ground);color:var(--ink)}
body{font:16px/1.6 Aptos,system-ui,Segoe UI,Roboto,Arial,sans-serif}
a{color:var(--accent)}
h1,h2,h3{color:var(--ink);font-family:inherit}
code{background:var(--well);color:var(--ink);padding:1px 5px;border-radius:4px;font:14px var(--mono)}
.sub,.muted{color:var(--ink2)}
