/* ==========================================================
   TOKENS — the one place colours, paper size and timings are declared
   Every other stylesheet reads from these. Change the book's palette here.
   ========================================================== */

:root{
  --desk-dark:#100905;
  --desk:#2c1c0e;
  --leather:#2e1f16;
  --leather-edge:#4a3320;
  --paper:#e9dcbd;
  --paper-deep:#d9c79f;
  /* DAMAGE — a third category alongside rubric (structure) and brass
     (ornament). These say nothing and mark nothing; they are what time did
     to the leaf. Used only by .parchment's ::before/::after in book.css. */
  --mottle:#b0863f;   /* the broad tonal blotch, ~1/10th of the page */
  --foxing:#966428;   /* the fine rust speckle */
  --ink:#2b2116;
  --ink-faint:#5d4c35;
  --brass:#9c7c3c;
  --rubric:#7a2f1d; /* oxblood red used in medieval rubrication */
  /* the candle's fire. Desk furniture, never used on a page — the book's
     own palette above stops at brass. --flame-core is a pale gold rather
     than white: nothing here is pure white, not even a flame's hottest part. */
  --flame-core:#ffe6a8;
  --flame:#ff9c33;
  --flame-deep:#c9541a;
  --page-w: min(46vw, calc((100vh - 96px) / 1.32), 1200px);
  --page-w: min(46vw, calc((100dvh - 96px) / 1.32), 1200px);
  --page-h: calc(var(--page-w) * 1.32);
  --turn-ms: 900ms;
  /* the custom pointer: an arrow silhouette (assets/svg/cursor*.svg), onyx
     for the ordinary cursor and oxblood for anything clickable, so hovering
     a folio or button reads as an affordance shift rather than the OS's
     generic hand. Hotspot 2 2 sits at the drawn tip in both files. Each
     ends with a real fallback keyword (auto / pointer) for the rare
     browser that won't load an SVG cursor. */
  --cursor: url('../assets/svg/cursor.svg') 2 2, auto;
  --cursor-point: url('../assets/svg/cursor-point.svg') 2 2, pointer;
}

/* Fullscreen (js/fullscreen.js) hides the title AND the candle (base.css),
   so neither the 96px of title headroom nor the ~8vw of candle gutter the
   normal formula reserves is needed — reclaimed here so the book actually
   grows to fill the screen instead of just recentring at its old size.
   49vw (not 50) leaves a sliver of desk on either side on purpose — a
   book with literally nothing around it reads as a rendering bug, not a
   book. The 44px subtracted here MUST match header.site's own fs-mode
   height (base.css) exactly — that's the real band the fullscreen toggle
   sits in, and this formula has no way to know that on its own; the two
   are one measurement kept in two places. 16px is a second, small
   reserve at the BOTTOM, not part of that band.

   The 1200px cap is DELIBERATELY the same one the normal (non-fullscreen)
   formula above has always used, not raised further — every page in the
   book is authored and word-counted against that ceiling (§1 of
   DESIGN-CONVENTIONS: pages clip, they don't scroll), and pages that were
   never tuned against anything larger start silently overflowing well
   before --page-w reaches 2000px (confirmed on the contents page, unrelated
   to anything on this page, at ~1590px on a 4K display). Fullscreen still
   gives a real, often dramatic size increase on anything short of a very
   large monitor — it's only on a genuinely huge display that this cap
   binds at all — without reopening a book-wide overflow risk this session
   didn't set out to audit every page against. */
body.fs-mode{
  --page-w: min(49vw, calc((100dvh - 44px - 16px) / 1.32), 1200px);
}
