/* SD-11 dark mode, "Night paper" (design owner: Grok; docs/dark-mode.md). ONE block of token values: the same names
   app.css / talk.css / watch.css / signin.css define for light, given their dark values here. Nothing else lives in this
   file but a few rules that are about dark itself (the native colour scheme, the toggle's icon).

   How it switches with no inline script: the server (SMS\Theme::head) links this file with a media attribute —
   "(prefers-color-scheme: dark)" for System, "all" for Dark, "not all" for Light — and writes <html data-theme> from the
   sms_theme cookie; assets/theme.js changes both when the setting changes. The selector list also names the mode, so the
   file only ever applies to a page whose setting allows it.

   Customer sites never load this file (previews, live sites, /try, the booking page, mail, print sheets). Frames that
   show one keep color-scheme: light and a #fff canvas (app.css). Contrast (WCAG AA) for every pair: docs/dark-mode.md. */
html[data-theme=dark], html[data-theme=system] {
  color-scheme: dark;
  /* the page, surfaces, words */
  --paper:#16141B; --paper-0:rgba(22,20,27,0); --surface:#201D27; --raised:#2A2633; --sheet:#2A2633;
  --b-ink:#F3EEE8; --b-muted:#B3AABB; --b-line:#3A3544; --text-2:#D9D1E0; --text-3:#E0D4A8; --text-4:#C3BACB; --text-5:#C3BACB;
  /* the sticker: a 2px outline and a hard black shadow; the focus ring */
  --outline:#8A8296; --shadow:#000; --focus:#F3EEE8;
  /* coral keeps its fill with ink words; coral as words is lighter */
  --coral-text:#FF7A5C; --on-accent:#1B1530; --err:#FF6B5E; --err-2:#FF6B5E; --err-bg:#3A1F1F;
  /* butter chips; butter-toned cards are a dark tint with light words */
  --butter:#E9C96A; --butter-card:#3A3322; --mark:#6A5A26; --butter-1:#3A3420; --butter-2:#4A4128; --butter-text:#E0D4A8; --butter-line:#5A4E2C;
  /* peach panels, mint / teal (done, live) */
  --peach:#3A2620; --peach-2:#4A2E25; --peach-text:#E4D3CC;
  --teal:#2EC4AD; --teal-d:#2EC4AD; --mint:#12332F; --mint-1:#12332F; --mint-2:#17423C; --ok-ink:#2EC4AD; --on-teal:#16141B;
  /* ink-filled shapes (your chat line, the sidebar's current page, the "Say it!" tag) */
  --inv-bg:#3A3544; --inv-fg:#F3EEE8; --inv-bg-h:#4A4456;
  /* off / disabled, the builder's grid, placeholders */
  --off-bg:#2A2633; --off-fg:#A39BAD; --off-fg-2:#A39BAD; --off-line:#4A4456; --grid:#1E1B24; --chrome-bar:#2A2633; --chrome-dot:#3A3544;
  --wait:#2A2633; --wash:#1D1A23; --band-text:#D2CADB;
  --scrim:rgba(0,0,0,.6); --scrim-2:rgba(0,0,0,.45); --sheet-shadow:rgba(0,0,0,.35); --sheet-shadow-2:rgba(0,0,0,.25);
  --glow:.6;   /* the sunset orb's halos at ~60% */
  /* the older pages (no brand class): the same night paper */
  --bg:#16141B; --card:#201D27; --ink:#F3EEE8; --muted:#B3AABB; --line:#3A3544; --blue:#FF7A5C; --blue-d:#FF7A5C; --on-blue:#1B1530;
  --blue-h:#FF9A7E; --field-line:#8A8296; --line-2:#3A3544; --tint:#2A2633; --tint-2:#2A2633; --tint-3:#2A2633; --tint-4:#201D27;
  --tint-sel:#2A2633; --tint-call:#2A2633; --new-bg:#1E2A44; --new-fg:#A9C8FF; --ok:#2EC4AD; --ok-2:#2EC4AD; --ok-3:#2EC4AD;
  --ok-fill:#12332F; --on-ok:#2EC4AD; --warn:#F0B45A; --stars:#E9C96A; --soon-fg:#B3AABB;
  /* watch.css (the bigger screen) */
  --placeholder:#9A92A6; --err-ring:#5A2A28; --note:#FF9A7E; --you-who:#E9C96A;
  /* /talk: the night stays; its paper cards and SITE view bars become raised surfaces, the blue orb's glow softer */
  --talk-paper:#2A2633; --talk-page:#16141B; --talk-bar:#2A2633; --talk-card:#2A2633; --talk-ink:#F3EEE8; --talk-line:#8A8296;
  --talk-shadow:#000; --talk-butter:#E9C96A; --talk-live-bg:#12332F; --talk-live-fg:#2EC4AD; --talk-hair:#3A3544; --talk-wait:#201D27;
  --talk-muted:#B3AABB; --talk-muted-2:#B3AABB; --talk-focus:#8DB4FF; --talk-teal:#1A8C7B;
  --talk-btn:var(--talk-blue-deep); --talk-btn-edge:var(--talk-night-edge-5);
  --talk-orb-fill:radial-gradient(circle at 34% 30%, #9cc6f2 0%, #6aa6f2 18%, #2f7bf5 44%, #1048b8 72%, #071f5c 100%);
  --talk-orb-glow:0 0 56px 4px rgba(47, 123, 245, .3), 0 0 150px 24px rgba(31, 111, 235, .12), inset 0 -18px 40px rgba(2, 12, 48, .55);
  --talk-orb-glow-small:0 0 14px 1px rgba(47, 123, 245, .28), inset 0 -6px 12px rgba(2, 12, 48, .5);
  --talk-ripple:rgba(80, 150, 255, .16);
}
/* the sign-in page's moon / sun button shows the sun while dark is on (the way back to light) */
html[data-theme=dark] .thm-tog .thm-moon, html[data-theme=system] .thm-tog .thm-moon { display:none; }
html[data-theme=dark] .thm-tog .thm-sun, html[data-theme=system] .thm-tog .thm-sun { display:block; }
/* the owner's "Request a time" card in the Inbox (book.css's own --sb-* tokens, scoped to .bk-card): the booking block on a
   customer's site and the visitor's Pick one page never get these */
html[data-theme=dark] .bk-card, html[data-theme=system] .bk-card {
  --sb-ink:#F3EEE8; --sb-paper:#2A2633; --sb-muted:#B3AABB; --sb-line:#3A3544; --sb-err:#FF6B5E; --sb-err-bg:#3A1F1F;
  --sb-outline:#8A8296; --sb-shadow:#000; --sb-focus:#F3EEE8; --sb-inv:#3A3544; --sb-inv-fg:#F3EEE8; --sb-card:#201D27; --sb-off:#8A8296;
  --sb-ok:#2EC4AD; --sb-on-ok:#16141B; --sb-dis-bg:#2A2633; --sb-dis-fg:#A39BAD; --sb-dis-line:#4A4456;
}
