/* Yezbi brand palettes for Bookshelf (Derek, October 8, 2026; shared/brand/README.md). Loaded last on every Bookshelf
   page with the header, after /shared/brand/yezbi-tokens.css and brand-header.css. Like Homeschool's css/brand-theme.css,
   it maps Bookshelf's existing color variables onto the --yz-* roles instead of repainting each screen: neutral paper,
   white and slate surfaces; the softer blue for primary actions, links, focus and the current view; restrained
   terracotta only where matches are waiting for review. Bookshelf-only: Homeschool does not load this file.
   Saved preferences do not change, and nothing is migrated:
   - The family shelf (bookshelf.html) keeps localStorage hh-parent-appearance-v1: paper-sage is Light and midnight-teal
     is Dark. shared/ui/appearance.js puts the matching data-yezbi-theme on <html>.
   - The front door, Settings and family shelf setup keep the account's Appearance setting (System, Light or Dark;
     shared/shell/theme.mjs sets data-theme on <body>), and the device setting before sign-in. js/bookshelf-shell.js
     mirrors that to data-yezbi-theme.
   Not changed on purpose: the cloth colors of the title spines (css/bookshelf-covers.css), which are part of each book's
   look, and Clerk's own sign-in card. Bookshelf shows no child colors. */

/* ---- Family shelf (bookshelf.html): Homeschool's borrowed styles and css/bookshelf.css read these. ---- */
:root:is([data-hh-scheme="paper-sage"],[data-hh-scheme="midnight-teal"]){
  --bg:var(--yz-background);
  --bg-elev:var(--yz-surface);
  /* Card edges and dividers: the quiet divider. Fields and outlined buttons use --bs-control-line below. */
  --bg-elev-2:var(--yz-border);
  --hh-line:var(--yz-border);
  --hh-grid:var(--yz-background);
  --text:var(--yz-text);
  --text-muted:var(--yz-muted);
  --text-dim:var(--yz-muted);
  --accent:var(--yz-primary);
  --accent-hover:var(--yz-primary-hover);
  --hh-on-accent:var(--yz-on-primary);
  --on-accent:var(--yz-on-primary);
  --hh-positive:var(--yz-success);
  --danger:var(--yz-danger);
  /* shared/ui/appearance.js gives the browser bar this color: the header's. */
  --hh-theme-color:var(--yz-header-bg);
  /* Field and control edges: 3:1 or better on the page, cards and raised surfaces. */
  --bs-control-line:var(--yz-control-border);
}
:root[data-hh-scheme="paper-sage"]{--shadow:0 3px 12px rgba(36,50,71,.08)}
:root[data-hh-scheme="midnight-teal"]{--shadow:0 6px 24px rgba(0,0,0,.35)}

/* Fields and outlined buttons keep a 3:1 edge; cards, book rows and dividers keep the quiet one. The book details,
   import and bulk-edit dialogs keep their blue-edged buttons. */
html[data-hh-scheme] :is(.bookshelf-page,.shelf-dialog,#shelf-capture) :is(input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=hidden]),select,textarea){border-color:var(--bs-control-line)}
html[data-hh-scheme] .bookshelf-page :is(button,.shelf-shortcuts a){border-color:var(--bs-control-line)}
html[data-hh-scheme] :is(.shelf-dialog,#shelf-capture) button{border-color:var(--accent)}
html[data-hh-scheme] .bookshelf-page :is(button.primary-btn,.shelf-shortcuts [aria-pressed=true]){border-color:var(--accent)}
html[data-hh-scheme] .shelf-account-controls.lp-ui{--lp-line:var(--bs-control-line);--lp-on-accent:var(--yz-on-primary);--lp-focus:var(--yz-focus)}

/* Occasional emphasis: the Review matches shortcut appears only while found books wait for review. */
html[data-hh-scheme] .shelf-shortcuts #shelf-review-link{background:var(--yz-emphasis-soft);border-color:var(--yz-emphasis);color:var(--yz-emphasis)}

/* Keyboard focus: a solid ring in the action blue, 3:1 or better on every surface in both themes. */
html[data-hh-scheme] body.bookshelf-app :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--yz-focus);outline-offset:2px}

/* The Appearance dialog's swatches show the brand Light and Dark. */
[data-scheme-choice="paper-sage"] .hh-scheme-swatch{background:linear-gradient(90deg,#F7F8FA 50%,#355FCB 50%)}
[data-scheme-choice="midnight-teal"] .hh-scheme-swatch{background:linear-gradient(90deg,#141B26 50%,#9CB9FF 50%)}

/* ---- Front door, Settings and family shelf setup (index.html, account.html, family.html): the shared studio surface
   reads --lp-*. Fields, buttons and sections keep their 3:1 --lp-line edge. ---- */
body.bs-page.learning-surface.lp-ui{--lp-bg:var(--yz-background);--lp-card:var(--yz-surface);--lp-fg:var(--yz-text);--lp-muted:var(--yz-muted);--lp-line:var(--yz-control-border);--lp-accent:var(--yz-primary);--lp-on-accent:var(--yz-on-primary);--lp-focus:var(--yz-focus);--lp-success:var(--yz-success);--lp-danger:var(--yz-danger)}
