/* ============================================================
 * ALEX Interaction Design System v1.0 — token layer
 *
 * Extends (does not replace) the Reader's existing :root block
 * in book_reader.html. Adds the formal spacing / radius / border
 * scale defined in BOOK_READER_DESIGN_SYSTEM_v1_0.md §2.
 *
 * Loaded by book_reader.html before book_components.css so the
 * component layer can reference these tokens.
 * ============================================================ */

:root {
  /* Spacing scale — see Design System §2.3 */
  --sp-xs: 4px;
  --sp-s:  8px;
  --sp-m:  12px;
  --sp-l:  18px;
  --sp-xl: 28px;
  --sp-xxl: 44px;

  /* Radius scale — --r is retained for backward compatibility */
  --r-xs: 4px;
  --r-s:  8px;
  --r-m:  12px;      /* same as legacy --r */
  --r-l:  16px;

  /* Border weight tokens — see Design System §2.5 */
  --b-norm:      1px solid var(--border);
  --b-emph:      1px solid var(--border-l);
  --b-selected:  1.5px solid var(--gold);
  --b-assume:    1px dashed var(--amber);

  /* Elevation — the ONE shadow allowed, for workshop modals only */
  --shadow-workshop: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Inline widgets ship with ZERO shadow. No --shadow-inline token
     by design — if you reach for it you are breaking Principle 11. */
}

:root:not([data-theme="dark"]) {
  @media (prefers-color-scheme: light) {
    --shadow-workshop: 0 4px 16px rgba(11, 31, 53, 0.08);
  }
}
:root[data-theme="light"] {
  --shadow-workshop: 0 4px 16px rgba(11, 31, 53, 0.08);
}
