/* Night appearance (owner 2026-10-10). Every colour of the site's own CSS reads a --th-* token with the original day colour
   as its fallback: var(--th-bg,#eee5ce). The day look therefore stays exactly as it was (the tokens are not defined by day),
   and the night tokens below are defined twice, as the repo's rule asks: by the visitor's device setting
   (prefers-color-scheme), unless the visitor chose day with the ☀/☾ button (data-theme="light"), and by that button
   (data-theme="dark"). The choice is stored by the inline head script of every page (localStorage "cf-theme").
   Photographs, product images and illustrations keep their own colours: no filters. Line engravings and cream plates get a
   soft cream matte (--th-matte) so they neither vanish nor glare. Contrast (WCAG): see docs/decisions P<PR>. */
:root{color-scheme:light}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){color-scheme:dark;
--th-bg:#231917;--th-bg-rgb:35 25 23;--th-bg-raised:#2e211e;--th-bg-raised-rgb:46 33 30;--th-bg-sunken:#2a1e1b;
--th-bg-sage:#25251b;--th-bg-sage-rgb:37 37 27;--th-bg-peach:#352220;--th-bg-peach-rgb:53 34 32;--th-bg-gold:#30261a;--th-bg-gold-rgb:48 38 26;
--th-wine-deep:#3b1f27;--th-wine-deep-rgb:59 31 39;
--th-ink:#efe4cc;--th-ink-rgb:239 228 203;--th-ink-soft:#cdbda2;--th-wine-text:#e8adb8;--th-wine-text-rgb:232 173 184;
--th-line:#4b3a33;--th-line-rgb:75 58 51;--th-matte:#eee5ce;--th-matte-shadow:0 0 0 1px #e8d5b333,0 14px 40px #0006;
--th-logo-backing:radial-gradient(closest-side,#f3e8cef2 0 62%,#f3e8ce00 100%);--th-toggle-icon:"\2600\FE0E";--th-blend:normal;--th-danger:#f2978b;--th-book-ink:#482d2a;--th-scene-mask:radial-gradient(ellipse 50% 50% at 50% 50%,#000 62%,#0000 100%);}}
:root[data-theme="dark"]{color-scheme:dark;
--th-bg:#231917;--th-bg-rgb:35 25 23;--th-bg-raised:#2e211e;--th-bg-raised-rgb:46 33 30;--th-bg-sunken:#2a1e1b;
--th-bg-sage:#25251b;--th-bg-sage-rgb:37 37 27;--th-bg-peach:#352220;--th-bg-peach-rgb:53 34 32;--th-bg-gold:#30261a;--th-bg-gold-rgb:48 38 26;
--th-wine-deep:#3b1f27;--th-wine-deep-rgb:59 31 39;
--th-ink:#efe4cc;--th-ink-rgb:239 228 203;--th-ink-soft:#cdbda2;--th-wine-text:#e8adb8;--th-wine-text-rgb:232 173 184;
--th-line:#4b3a33;--th-line-rgb:75 58 51;--th-matte:#eee5ce;--th-matte-shadow:0 0 0 1px #e8d5b333,0 14px 40px #0006;
--th-logo-backing:radial-gradient(closest-side,#f3e8cef2 0 62%,#f3e8ce00 100%);--th-toggle-icon:"\2600\FE0E";--th-blend:normal;--th-danger:#f2978b;--th-book-ink:#482d2a;--th-scene-mask:radial-gradient(ellipse 50% 50% at 50% 50%,#000 62%,#0000 100%);}

/* The ☀/☾ button: in the main menu next to the language switch (desktop), in the phone header bar next to the language
   switch and in the open phone menu. 44px target; aria-pressed = night is on (set by the head script). */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-width:44px;margin:-6px -6px -6px 2px;padding:0;border:1px solid transparent;border-radius:50%;background:none;color:var(--th-ink,#482d2a);font:18px/1 'Literata',serif;cursor:pointer;pointer-events:auto;transition:background .2s,border-color .2s}
.theme-toggle:before{content:var(--th-toggle-icon,"\263E")}
.theme-toggle:hover{border-color:rgb(var(--th-wine-text-rgb,117 61 72)/.35);background:rgb(var(--th-wine-text-rgb,117 61 72)/.06)}
.theme-toggle:focus-visible{outline:2px solid var(--th-wine-text,#753d48);outline-offset:2px}
@media(max-width:1300px){header.site-header:not(.site-open) #site-menu>.theme-toggle[data-theme-toggle]{display:inline-flex;margin:0 4px 0 2px}header.site-header.site-open #site-menu>.theme-toggle{margin:4px 0 0 -10px;font-size:24px}}
@media print{.theme-toggle{display:none}}

/* Night only (every value below is a token that is unset by day, so these rules do nothing in the day look). */
/* The logo artwork is coloured lettering on transparent: a soft cream backing keeps it legible on the night header. */
header.site-header .brand,.site-footer .footer-brand{background:var(--th-logo-backing,none);border-radius:50%}
/* Illustrated scenes painted on the day paper (the almond tree's soil) fade softly into the night page instead of ending in a
   hard light rectangle. Images drawn with multiply on cream (botanical plates) are shown as they are (--th-blend). */
#almond-seasons .tree{-webkit-mask-image:var(--th-scene-mask,none);mask-image:var(--th-scene-mask,none)}
/* The leather book of /family-history keeps its cream pages, so its text keeps the day ink. */
.fh-book{color:var(--th-book-ink,inherit)}
