/*
  Shared themes for the Mudroom shell and every app in it. Apps load this file directly.

  Mudroom is on the brand library (tools.alexisdavidson.org/brand/v2; the copy in shared/brand/ is updated with
  node ../personal-tools/brand/scripts/sync.mjs shared/brand). Colors, fonts (Inter Tight headings, Figtree
  text, DM Mono for code and keys), radii and light/dark all come from shared/brand/tokens.css, imported below. This
  file only maps Mudroom's own names onto the brand's.

  Garnet is the brand and Mudroom's own color. Each app has its own jewel accent, so popped-out windows are easy to
  tell apart: data-app-color on an app's <html> picks it, and shared/theme.js sets the brand's data-accent from it
  (APP_ACCENT). The shell, Needs you, Chat and Settings are garnet; Chores is amethyst; Bills is tourmaline; Upkeep
  and Folio are sapphire; Crew is slate grey. No accent is green: green means done.

  Two themes, Light and Dark, picked with the round toggle in the top right corner (or the device setting until you
  use it). The swatches in shared/theme.js must match the brand's --bg and --accent (`node tests/check-themes.mjs`).

  The line below names every theme in menu order. Keep the format: home-agents' sync script reads it.
  themes: light=Light, dark=Dark
*/
@import url("brand/tokens.css");

/* Per-app colors (for swatches and pop-out bands): each app's jewel accent, light and dark. */
:root,:root[data-theme=light]{
  --c-workshop:#7A1B36;--c-home:#7A1B36;--c-chat:#7A1B36;--c-settings:#7A1B36;--c-chores:#693375;--c-bills:#056374;--c-upkeep:#33407A;--c-notes:#33407A;--c-crew:#3E5260;
  --c-workshop-on:#FFFFFF;--c-home-on:#FFFFFF;--c-chat-on:#FFFFFF;--c-settings-on:#FFFFFF;--c-chores-on:#FFFFFF;--c-bills-on:#FFFFFF;--c-upkeep-on:#FFFFFF;--c-notes-on:#FFFFFF;--c-crew-on:#FFFFFF}
:root[data-theme=dark]{
  --c-workshop:#E59AAE;--c-home:#E59AAE;--c-chat:#E59AAE;--c-settings:#E59AAE;--c-chores:#D1A5DB;--c-bills:#7FCBDE;--c-upkeep:#B4BDF0;--c-notes:#B4BDF0;--c-crew:#B3C1CC;
  --c-workshop-on:#2A0E17;--c-home-on:#2A0E17;--c-chat-on:#2A0E17;--c-settings-on:#2A0E17;--c-chores-on:#251229;--c-bills-on:#001F26;--c-upkeep-on:#131832;--c-notes-on:#131832;--c-crew-on:#17222A}
@media (prefers-color-scheme: dark){
  :root:not([data-theme]){
    --c-workshop:#E59AAE;--c-home:#E59AAE;--c-chat:#E59AAE;--c-settings:#E59AAE;--c-chores:#D1A5DB;--c-bills:#7FCBDE;--c-upkeep:#B4BDF0;--c-notes:#B4BDF0;--c-crew:#B3C1CC;
    --c-workshop-on:#2A0E17;--c-home-on:#2A0E17;--c-chat-on:#2A0E17;--c-settings-on:#2A0E17;--c-chores-on:#251229;--c-bills-on:#001F26;--c-upkeep-on:#131832;--c-notes-on:#131832;--c-crew-on:#17222A}
}
/* Mudroom's names for brand tokens */
:root{
  --merlot:var(--hero);--merlot-ink:var(--hero-ink);--merlot-soft:var(--hero-muted);
  --raise:0 1px 2px rgba(var(--tint),.06),0 8px 20px rgba(var(--tint),.08);
  --side:var(--bg);
  --rule:var(--line);
  --line2:var(--line-strong);
  --serif:var(--display);
  /* Work sits on white sheets lifted with --raise; menus, the palette and toasts lift further. */
  --shadow:none;
  --shadow-lg:0 10px 30px color-mix(in srgb,#000 12%,transparent);
}
/* Layout tokens (docs/layout.md): page gutter, the width of list and form pages, and the line length for long text,
   by the app frame's width: compact under 1100px, desktop 1100 to 1599px, wide from 1600px. */
:root{--gutter:20px;--w-page:100%;--w-read:72ch}
@media (min-width:1100px){:root{--gutter:28px;--w-page:72rem}}
@media (min-width:1600px){:root{--gutter:36px;--w-page:88rem}}
@media (min-width:2100px){:root{--gutter:44px;--w-page:104rem}}

/* Loom's own color, slate grey (Mudroom UX v1): the brand library has four jewel accents and Folio already uses
   sapphire, so Loom's accent is defined here, beside the brand's, with the same four tokens. AA as text on the page,
   on white and on the panel color, in both themes. */
:root[data-accent=loom]{ --accent:#3E5260; --on-accent:#FFFFFF; --accent-soft:#E6ECF0; --accent-soft-ink:#3E5260; }
:root[data-theme=dark][data-accent=loom]{ --accent:#B3C1CC; --on-accent:#17222A; --accent-soft:#26323A; --accent-soft-ink:#C9D4DC; }
@media (prefers-color-scheme: dark){ :root:not([data-theme])[data-accent=loom]{ --accent:#B3C1CC; --on-accent:#17222A; --accent-soft:#26323A; --accent-soft-ink:#C9D4DC; } }
