/* The notebook follows the site theme. [owner 2026-09-28: "the notebook should also have themes too";
   2026-10-05: one sky. Constellation is the only theme: night paper and star gold, light/dark.]
   Scoped to the notebook panel (.pw-sheet) only; the rest of the site keeps its own colours.
   The refusal red is set so it is always red and always readable, never absorbed by the accent.
   Guard: PANTHEON tools/prove_chat_themes.py (contrast, red stays red, live light/dark switch). */

:root[data-record][data-motif="constellation"] .pw-sheet[style*="--pw-acc"]{
  --pw-bg:#0a1233!important; --pw-bg2:#070d24!important; --pw-field:#070d24!important; --pw-figure:#0a1233!important;
  --pw-raise:#161e3d!important; --pw-ink:#e7ecf7!important; --pw-mist:#9aa6c2!important; --pw-line:#303754!important;
  --pw-acc:#f2d27a!important; --red:#ff6b6b}
:root[data-record][data-theme="light"][data-motif="constellation"] .pw-sheet[style*="--pw-acc"]{
  --pw-bg:#ede3f5!important; --pw-bg2:#e2d9ea!important; --pw-field:#e2d9ea!important; --pw-figure:#ede3f5!important;
  --pw-raise:#f5f0fa!important; --pw-ink:#141a2e!important; --pw-mist:#4c5670!important; --pw-line:#cac3d5!important;
  --pw-acc:#7a5800!important; --red:#b3261e}

/* The enquiry/booking "Send to the owners" button. widget.js builds it from a CLASS rule (.pw-cal-book) with the old
   violet baked in, so neither record.css's variable re-point nor its literal-colour override reached it: it has been
   violet on the site in every theme, the default included. Found by the themes guard. Every theme, Circuit too. */
:root[data-record] .pw-sheet .pw-cal-book{background:var(--pw-acc)!important;color:var(--pw-acc-ink)!important;
  border-radius:0!important}
:root[data-record] .pw-sheet{--pw-acc-ink:var(--acc-ink)}

/* The panel chrome. record.css paints the header bar, its wordmark and the Send button from widget.js's literal
   colour rgb(52,39,107) straight to the SITE palette (--panel/--acc), bypassing the --pw-* variables above, so
   without this the paper changed and the header and Send stayed Circuit. Re-point those three to the notebook's own
   variables for every non-default theme. The Send label uses --pw-acc-ink, set per theme for >= 4.5:1. */
:root[data-record] .pw-sheet [style*="rgb(52, 39, 107)"],
:root[data-record] .pw-sheet [style*="rgb(52,39,107)"]{
  background:var(--pw-bg)!important;color:var(--pw-ink)!important;border-bottom-color:var(--pw-line)!important}
:root[data-record] .pw-sheet [style*="rgb(52, 39, 107)"] > :first-child{color:var(--pw-acc)!important}
:root[data-record] .pw-sheet [style*="rgb(52, 39, 107)"][style*="cursor: pointer"],
:root[data-record] .pw-sheet [style*="rgb(52,39,107)"][style*="cursor: pointer"]{
  background:var(--pw-acc)!important;color:var(--pw-acc-ink)!important}
/* label on the accent: dark ink on the bright dark-theme accents, paper on the deep light-theme ones */
:root[data-record] .pw-sheet{--pw-acc-ink:#0a0a0b}
:root[data-record][data-theme="light"] .pw-sheet{--pw-acc-ink:#ffffff}
