/* theme-light.css: light mode for the Sanctuary and Rosemary's admin (docs/GROWTH.md "Light and dark").
   public/js/san-theme.js puts data-theme="light" or "dark" on <body> from the person's choice or their device; this sheet
   remaps the site's colour tokens to paper, linen and ink when it is light. Dark mode is the site's own night tokens, so
   nothing here runs then. Only this :root block holds colour values (scripts/check.mjs); every rule below uses tokens.
   Contrast on paper: ink 12.6:1, ink-2 8.4:1, ink-3 5.3:1, deep gold 4.9:1, rose 5.6:1, teal 5.1:1. */
:root{
  --paper:#fbf7ef;                         /* the page: warm paper */
  --paper-2:#f3ecdc;                       /* fields, the deep band */
  --linen:#fffdf8;                         /* panels and cards */
  --linen-2:#f7f1e4;                       /* a panel on hover */
  --ink:#2b2140;                           /* text 1 */
  --ink-2:#4a4060;                         /* text 2 */
  --ink-3:#6b6280;                         /* text 3, captions */
  --ink-line:rgba(43,33,64,.14);           /* soft dividers */
  --gold-deep:#846518;                     /* gold that reads on paper */
  --gold-deep-2:#a07d24;                   /* hover */
  --gold-deep-line:rgba(132,101,24,.38);
  --gold-deep-soft:rgba(132,101,24,.14);
  --rose-deep:#9c4068;                     /* the thing waiting on someone */
  --teal-deep:#1d7676;                     /* the Oracle, AI labels */
  --teal-deep-line:rgba(29,118,118,.45);
  --paper-shadow:0 24px 64px rgba(43,33,64,.16);
}
html:has(body.san[data-theme="light"]){background:var(--paper)}
body.san[data-theme="light"]{
  --night:var(--paper); --deep:var(--paper-2); --card:var(--linen); --card-2:var(--linen-2);
  --cream:var(--ink); --cream-2:var(--ink-2); --cream-3:var(--ink-3); --line:var(--ink-line);
  --gold:var(--gold-deep); --gold-2:var(--gold-deep-2); --gold-line:var(--gold-deep-line); --gold-line-soft:var(--gold-deep-soft);
  --rose:var(--rose-deep); --teal:var(--teal-deep); --teal-line:var(--teal-deep-line); --on-gold:var(--paper);
  --shadow-modal:var(--paper-shadow);
}
body.san[data-theme="light"] .btn-primary{color:var(--paper)}
/* The admin's charts and pills on paper */
body.san[data-theme="light"] .cols .col{fill:var(--gold-deep-line)}
body.san[data-theme="light"] .hbar-track{background:var(--ink-line)}
/* The mood behind every page (san-theme.js): a muted clip or a still of candles, sage or incense for the mode, under a soft
   wash of the page colour so the words stay clear; panels are opaque on top. Fixed, behind .shell (z-index raised). */
.san-mood{position:fixed;inset:0;z-index:var(--z-base);overflow:hidden;pointer-events:none;background:var(--night)}
.san-mood-media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.6}
/* The wash keeps every word readable in both modes: the page colour at 72% where the greeting sits, deepening to 96% below;
   the text tokens already hold 4.5:1 or better against the page colour, and panels are opaque. */
.san-mood::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,color-mix(in srgb,var(--night) 78%,transparent) 0%,color-mix(in srgb,var(--night) 88%,transparent) 45%,color-mix(in srgb,var(--night) 96%,transparent) 100%)}
.mood-page .nav{background:color-mix(in srgb,var(--night) 90%,transparent)}
.mood-page main,.mood-page .footer{position:relative;z-index:var(--z-raised)}
.mood-page main{text-shadow:0 1px 14px var(--night)}
/* On a page with a sky behind it the form sits on its own solid panel, so the field and the small print keep their contrast. */
.mood-page form{background:var(--card);border:var(--hairline);border-radius:var(--r-m);padding:var(--card-pad);text-shadow:none}
.mood-page form input{background:var(--deep);border-color:var(--gold-line)}
.mood-page form .small{color:var(--cream-2)}
.san:not(.admin) .topbar{background:color-mix(in srgb,var(--night) 90%,transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.san:not(.admin) .rail{background:color-mix(in srgb,var(--night) 88%,transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
[data-theme-toggle]{white-space:nowrap}

/* Merged 15 Oct: the candle room (ambient.js, spiritual-home) is a night thing; light mode shows the paper alone. */
body.san[data-theme="light"] .san-ambient{display:none}
