/* GENERATED by scripts/build-stacks-first-paint-css.mts from client/src/components/stacks/room.css, client/src/components/stacks/shelf.css, client/src/pages/stacks.css, client/src/pages/reading-table.css, client/src/components/stacks/first-paint.css. Do not edit. */
/* ==== The Library at Night: shared room tokens and surfaces (10 Nov 2026) ===========================================
   One set of materials for every room of the building (The Shelf /, The Stacks /library, The Reading Table
   /store/products/:id, and the province wings and labs next). Values match the homepage hero (home/library/library.css):
   the same navy night, amber primary, brass, teal focus and the same two typefaces. See COMPONENTS.md.
   Everything is drawn in CSS and inline SVG: no image files, no stand-in art. */
@font-face { font-family: "Atlas Display"; src: url("/atlas/fonts/libre-caslon-display-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Atlas Sans"; src: url("/atlas/fonts/manrope-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atlas Sans"; src: url("/atlas/fonts/manrope-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Atlas Sans"; src: url("/atlas/fonts/manrope-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atlas Display Fallback"; src: local("Georgia"); size-adjust: 83.1%; ascent-override: 116.7%; descent-override: 32.5%; line-gap-override: 0%; }
@font-face { font-family: "Atlas Sans Fallback"; src: local("Arial"); size-adjust: 103.8%; ascent-override: 103.1%; descent-override: 28.9%; line-gap-override: 0%; }

.mt-room {
  /* night */
  --mt-night: #0b1626; --mt-night-deep: #060d18; --mt-raised: #13223a; --mt-back: #0c1729;
  /* ink */
  --mt-ink: #f4f1e8; --mt-ink-2: #cfd6e2; --mt-ink-3: #a3aec0; --mt-line: rgba(207, 214, 226, 0.16);
  /* the one action: amber; brass for plates and tabs */
  --mt-amber: #f2b45c; --mt-amber-2: #e0953a; --mt-amber-ink: #1d1304;
  --mt-brass: #d8b46d; --mt-brass-hi: #f5dfa8; --mt-brass-lo: #8c6a2c; --mt-brass-ink: #2b1c06;
  --mt-teal: #46c8b4;
  /* walnut */
  --mt-walnut-0: #1f1108; --mt-walnut-1: #36200f; --mt-walnut-2: #553219; --mt-walnut-3: #774826; --mt-walnut-hi: #c08a55;
  /* paper */
  --mt-paper: #f7f2e6; --mt-paper-edge: #e3d9c2;
  /* light */
  --mt-lamp: rgba(255, 196, 120, 0.09); --mt-lamp-soft: rgba(255, 196, 120, 0.03); --mt-moon: rgba(140, 175, 230, 0.05);
  /* type */
  --mt-display: "Atlas Display", "Atlas Display Fallback", Georgia, serif;
  --mt-sans: "Atlas Sans", "Atlas Sans Fallback", Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* motion: settle has a hair of overshoot (mass), ease does not */
  --mt-ease: cubic-bezier(0.2, 0.8, 0.2, 1); --mt-settle: cubic-bezier(0.25, 1.25, 0.4, 1);
  /* walnut grain, drawn in code: stretched fractal noise, long streaks, no visible repeat at shelf scale */
  --mt-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1800' height='120'%3E%3Cfilter id='g' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0025 0.32' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.06 0 0 0 0 0.02 0 0 0 1.6 -0.55'/%3E%3C/filter%3E%3Crect width='1800' height='120' filter='url(%23g)'/%3E%3C/svg%3E");
  --mt-wood: var(--mt-grain), linear-gradient(180deg, var(--mt-walnut-3) 0%, var(--mt-walnut-2) 38%, var(--mt-walnut-1) 100%);

  position: relative; isolation: isolate; color: var(--mt-ink); font-family: var(--mt-sans);
  background:
    radial-gradient(70% 46% at 50% 0%, var(--mt-lamp) 0%, var(--mt-lamp-soft) 46%, rgba(255, 196, 120, 0) 74%),
    linear-gradient(90deg, var(--mt-moon) 0%, rgba(140, 175, 230, 0) 18%),
    radial-gradient(120% 90% at 50% 30%, #11203a 0%, #0b1729 52%, var(--mt-night-deep) 100%);
  background-color: var(--mt-night);
}
.mt-room *, .mt-room *::before, .mt-room *::after { box-sizing: border-box; }
.mt-room a:focus-visible, .mt-room button:focus-visible, .mt-room input:focus-visible + label, .mt-room [tabindex]:focus-visible { outline: 3px solid var(--mt-teal); outline-offset: 3px; }
.mt-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- The brass plate: the one action ("View on TpT"). Filled amber when it is the screen's primary; the quiet
   variant is an engraved brass outline that fills when its book is hovered or focused. */
.mt-plate {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 12px; font: 600 1rem/1 var(--mt-sans); letter-spacing: 0.005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  color: var(--mt-amber-ink);
  background: linear-gradient(180deg, #f8cd85 0%, var(--mt-amber) 52%, var(--mt-amber-2) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 -1px 0 rgba(90, 50, 0, 0.28) inset, 0 14px 30px -14px rgba(242, 180, 92, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.3);
  transition: transform 0.16s var(--mt-ease), box-shadow 0.2s var(--mt-ease), background-color 0.2s, color 0.2s;
}
.mt-plate:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 18px 36px -14px rgba(242, 180, 92, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.3); }
.mt-plate:active { transform: translateY(0) scale(0.985); transition-duration: 0.06s; }
.mt-plate__mark { width: 14px; height: 14px; flex: none; }
.mt-plate--lg { min-height: 58px; padding: 0 30px; border-radius: 14px; font-size: 1.0625rem; }
/* round 3: the shelf's plate is filled brass from the start (the one action), only smaller */
.mt-plate--sm { min-height: 40px; padding: 0 14px; border-radius: 9px; font-size: 0.875rem; gap: 7px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 -1px 0 rgba(90, 50, 0, 0.26) inset, 0 8px 18px -12px rgba(242, 180, 92, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.3); }
.mt-plate--sm .mt-plate__mark { width: 12px; height: 12px; }
.mt-plate--quiet {
  min-height: 40px; padding: 0 14px; border-radius: 9px; font-size: 0.875rem; color: var(--mt-brass-hi);
  background: linear-gradient(180deg, rgba(216, 180, 109, 0.14), rgba(216, 180, 109, 0.04));
  box-shadow: 0 0 0 1px rgba(216, 180, 109, 0.62) inset, 0 1px 0 rgba(255, 236, 190, 0.12) inset;
}
.mt-plate--quiet:hover, .mt-plate--quiet.is-lit {
  color: var(--mt-amber-ink); background: linear-gradient(180deg, #f8cd85 0%, var(--mt-amber) 52%, var(--mt-amber-2) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 10px 22px -12px rgba(242, 180, 92, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.3);
}

/* ---- Section and shelf headings (round 3): quiet type in the room's ink, no brass. Gold is kept for the one action. */
.mt-engraved {
  display: block; margin: 0; padding: 0;
  font: 400 clamp(1.375rem, 1.2rem + 0.55vw, 1.75rem)/1.12 var(--mt-display); letter-spacing: -0.006em; color: var(--mt-ink);
  -webkit-text-stroke: 0.01em currentColor; paint-order: stroke fill; text-wrap: balance;
}

/* ---- Paper: a real page as an object (thickness under the sheet, soft contact shadow). */
:where(.mt-paper) { position: relative; display: block; background: var(--mt-paper); border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(60, 40, 10, 0.12), 1px 1px 0 var(--mt-paper-edge), 2px 2px 0 #d6cbb1, 3px 3px 0 #c9bda0, 0 22px 34px -18px rgba(0, 0, 0, 0.85), 0 6px 10px -6px rgba(0, 0, 0, 0.6); }
:where(.mt-paper) img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  .mt-room *, .mt-room *::before, .mt-room *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---- The site footer on a night room closes on midnight, as on the homepage (homepage: home/wave/atlas-wave.css). */
[data-night-room="true"] [data-testid="marketing-footer"] {
  --brand-paper: #050c1c; --brand-forest: #f3ece0; --brand-ink: #f3ece0; --brand-secondary: rgba(243, 236, 224, 0.74);
  --brand-hairline: rgba(240, 220, 190, 0.16); --brand-clay: #d9a873; --brand-clay-muted: rgba(217, 168, 115, 0.55); --brand-clay-dark: #f0c58d;
  color: rgba(243, 236, 224, 0.74) !important; border-top: 1px solid rgba(217, 168, 115, 0.28) !important;
  background: radial-gradient(60% 90% at 90% 0%, rgba(36, 62, 140, 0.3), rgba(36, 62, 140, 0) 70%), linear-gradient(180deg, #071029, #050c1c) !important;
}
[data-night-room="true"] [data-testid="marketing-footer"] .mt-wordmark { color: #f3ece0; }
[data-night-room="true"] [data-testid="marketing-footer"] :is(a, summary, button, input):focus-visible { outline: 2px solid #f0c58d !important; outline-offset: 3px; }
[data-night-room="true"] [data-testid="site-newsletter"] { background: transparent !important; border-color: rgba(240, 220, 190, 0.14) !important; }
[data-night-room="true"] [data-testid="site-newsletter"] :is(.bg-white, .bg-slate-50) { background: rgba(13, 26, 45, 0.72) !important; border-color: rgba(216, 180, 109, 0.3) !important; box-shadow: none !important; }
[data-night-room="true"] [data-testid="site-newsletter"] :is(h2, h3, .text-slate-900, .text-slate-950, .text-slate-800, label) { color: #f3ece0 !important; }
[data-night-room="true"] [data-testid="site-newsletter"] :is(p, .text-slate-600, .text-slate-700) { color: rgba(243, 236, 224, 0.74) !important; }
[data-night-room="true"] [data-testid="site-newsletter"] a { color: #f0c58d !important; }
[data-night-room="true"] [data-testid="site-newsletter"] input[type="email"] { background: #0b1626 !important; color: #f3ece0 !important; border-color: rgba(216, 180, 109, 0.45) !important; }
[data-night-room="true"] [data-testid="site-newsletter"] button[type="submit"] { background: transparent !important; color: #f5dfa8 !important; box-shadow: 0 0 0 1.5px rgba(216, 180, 109, 0.75) inset !important; }

/* The quiet TpT link (round 3): the same tracked link as the plate, as text, wherever the one plate is elsewhere in view. */
.mt-tptlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--mt-ink); font: 600 0.9rem/1.3 var(--mt-sans);
  text-decoration: underline; text-decoration-color: rgba(216, 180, 109, 0.7); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.mt-tptlink:hover { text-decoration-color: currentColor; }
.mt-tptlink .mt-plate__mark { width: 0.8em; height: 0.8em; flex: none; }

/* ==== Book + shelf bay (The Stacks, reusable). Needs room.css (tokens) on an ancestor with class .mt-room. ==========
   A bay is a walnut frame with a picture light; inside it the books stand on boards, each above its shelf label.
   Sizes are reserved before any image arrives (stage height + cover aspect), so nothing moves while covers load. */

/* ---- the bay */
.mt-bay {
  --book-h: 268px; --book-w: 204px; --slot-w: 220px; --board-h: 24px; --post-w: 24px;
  position: relative; margin: 0; padding: 14px 30px 8px; border-radius: 4px;
  /* the case's back panel: dark walnut boards in shadow, lit from the lamp at the top */
  background:
    radial-gradient(70% 180px at 50% 0%, rgba(255, 196, 120, 0.3), rgba(255, 196, 120, 0) 100%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 1px, rgba(255, 220, 170, 0.025) 1px 2px, rgba(0, 0, 0, 0) 2px 164px),
    linear-gradient(180deg, #2b1b10 0%, #20140c 46%, #170e08 100%);
  box-shadow:
    inset 0 22px 34px -18px rgba(0, 0, 0, 0.9), inset 22px 0 30px -18px rgba(0, 0, 0, 0.92), inset -22px 0 30px -18px rgba(0, 0, 0, 0.92),
    0 40px 70px -34px rgba(0, 0, 0, 0.95);
  content-visibility: auto; contain-intrinsic-size: auto 900px;
}
/* The first shelf is on the first screen: render it in the first frame (its cover is the LCP; no 900px placeholder). */
.mt-stacks__aisles > .mt-shelfwrap:first-child .mt-bay { content-visibility: visible; }
/* honey-walnut side posts and crown, as on the homepage bookcase, with a satin edge that catches the lamp */
.mt-bay::before, .mt-bay::after { content: ""; position: absolute; top: -18px; bottom: -10px; width: var(--post-w); z-index: 3; pointer-events: none; border-radius: 3px;
  background: var(--mt-grain), linear-gradient(90deg, #5a3a1f 0%, #b07a45 34%, #c99460 52%, #8d5c31 78%, #4b2f17 100%);
  background-size: 200px 100%, 100% 100%; box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(30, 16, 6, 0.6); }
.mt-bay::before { left: calc(var(--post-w) / -2); }
.mt-bay::after { right: calc(var(--post-w) / -2); transform: scaleX(-1); }
.mt-bay__crown { position: absolute; left: calc(var(--post-w) / -2 - 6px); right: calc(var(--post-w) / -2 - 6px); top: -24px; height: 22px; z-index: 4; border-radius: 3px;
  background: var(--mt-grain), linear-gradient(180deg, #d6a06a 0%, #b07a45 30%, #8a5a31 100%); background-size: 1800px 100%, 100% 100%;
  box-shadow: 0 1px 0 rgba(255, 226, 180, 0.55) inset, 0 10px 18px -6px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(30, 16, 6, 0.6); }
/* the picture light: a brass bar on two arms, its warm cone falling onto the first row */
.mt-bay__lamp { position: absolute; z-index: 5; top: -6px; left: 50%; width: min(46%, 420px); height: 12px; transform: translateX(-50%); border-radius: 6px;
  background: linear-gradient(180deg, #fbe2a6 0%, #d9b064 45%, #8f6a2b 100%);
  box-shadow: 0 1px 0 rgba(255, 250, 225, 0.8) inset, 0 3px 6px rgba(0, 0, 0, 0.6), 0 10px 26px rgba(255, 196, 110, 0.35); }
.mt-bay__lamp::before { content: ""; position: absolute; left: 4%; right: 4%; top: 100%; height: 3px; border-radius: 2px; background: rgba(255, 236, 190, 0.9); filter: blur(1.5px); }
.mt-bay__cone { position: absolute; z-index: 1; top: 0; left: 50%; width: min(90%, 900px); height: 320px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 60% at 50% 0%, rgba(255, 200, 130, 0.22) 0%, rgba(255, 200, 130, 0.06) 55%, rgba(255, 200, 130, 0) 100%);
  mix-blend-mode: screen; animation: mt-breathe 9s ease-in-out infinite; }
@keyframes mt-breathe { 0%, 100% { opacity: 0.92; } 50% { opacity: 1; } }

/* ---- the shelf head: engraved plate, one line, the count */
.mt-shelfhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 0 0 34px; }
.mt-shelfhead h2 { margin: 0; }
.mt-shelfhead__sub { margin: 0; flex: 1 1 260px; color: var(--mt-ink-2); font: 500 0.9375rem/1.45 var(--mt-sans); }
.mt-shelfhead__count { margin: 0; color: var(--mt-ink-3); font: 500 0.875rem/1.3 var(--mt-sans); }

/* ---- the rows: slots touch, so the boards run as one shelf */
.mt-shelf { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--slot-w), 1fr)); margin: 0; padding: 0; list-style: none; }
.mt-slot { position: relative; display: flex; flex-direction: column; min-width: 0; }
/* the row is as tall as its tallest book (--tallest = height / width of the tallest cover on the shelf, set by the
   page), plus headroom: the books stand on the board with the lamp just above them, never in an empty box */
.mt-slot__stage { --stage-h: calc(min(var(--book-h), var(--book-w) * var(--tallest, 1.3)) + 22px); }
.mt-slot__stage { position: relative; display: flex; align-items: flex-end; justify-content: center; height: var(--stage-h); padding: 0 8px; perspective: 1100px; perspective-origin: 50% 22%; }
.mt-slot__stage::before { content: ""; position: absolute; inset: 0 0 0 0; pointer-events: none;
  background: radial-gradient(90% 75% at 50% 4%, rgba(255, 196, 120, 0.16), rgba(255, 196, 120, 0) 72%), linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0, rgba(0, 0, 0, 0) 18px); }
.mt-slot__board { position: relative; z-index: 1; height: var(--board-h); margin: -7px -1px 0;
  background:
    linear-gradient(180deg, rgba(120, 76, 38, 0.95) 0, rgba(186, 128, 74, 0.9) 6px, rgba(255, 226, 180, 0.6) 7px, rgba(0, 0, 0, 0) 8px),
    var(--mt-grain), linear-gradient(180deg, #c48d58 0%, #a26d3c 40%, #6f4521 100%);
  background-size: 100% 100%, 1800px 100%, 100% 100%;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5) inset, 0 16px 22px -12px rgba(0, 0, 0, 0.95); }
.mt-slot:nth-child(odd) .mt-slot__board { background-position: 0 0, 0 0, 0 0; }
.mt-slot:nth-child(even) .mt-slot__board { background-position: 0 0, -611px 0, 0 0; }
.mt-slot__board::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }
.mt-slot__label { display: grid; grid-template-rows: auto auto auto 1fr; gap: 2px; padding: 9px 12px 24px; }
.mt-slot__grade { margin: 0; color: var(--mt-brass-hi); font: 600 0.8125rem/1.3 var(--mt-sans); letter-spacing: 0.01em; }
.mt-slot__title { margin: 0; min-height: 2.6em; color: var(--mt-ink); font: 600 0.98rem/1.3 var(--mt-sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mt-slot__title a { color: inherit; text-decoration: none; }
.mt-slot__title a:hover { text-decoration: underline; text-decoration-color: rgba(216, 180, 109, 0.8); text-underline-offset: 4px; }
.mt-slot__inside { margin: 0; min-height: 2.8em; color: var(--mt-ink-2); font: 500 0.84rem/1.4 var(--mt-sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mt-slot__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; align-self: end; margin-top: 6px; }
.mt-look { display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; border: 0; background: none; cursor: pointer; color: var(--mt-ink);
  font: 600 0.875rem/1 var(--mt-sans); text-decoration: underline; text-decoration-color: rgba(70, 200, 180, 0.75); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.mt-look:hover { text-decoration-color: var(--mt-teal); }

/* ---- the book: a cover with a page block and a contact shadow; it leans out of the shelf with weight */
.mt-book { position: relative; display: block; width: min(var(--book-w), calc(var(--book-h) * var(--aspect))); aspect-ratio: var(--aspect);
  transform-style: preserve-3d; transform-origin: 30% 100%; transform: rotateY(-10deg);
  transition: transform 0.62s var(--mt-settle); will-change: transform; color: inherit; text-decoration: none; }
.mt-book__face { position: absolute; inset: 0; overflow: hidden; border-radius: 1px 3px 3px 1px; background: #0e1b30;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); backface-visibility: hidden; }
.mt-book__face img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* hinge crease and a satin sheen that moves with the lean */
.mt-book__face::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.1) 2.6%, rgba(255, 255, 255, 0.16) 3.6%, rgba(255, 255, 255, 0) 7%); }
.mt-book__face::after { content: ""; position: absolute; inset: -20%; z-index: 1; pointer-events: none; transform: translateX(-30%);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 236, 200, 0.14) 48%, rgba(255, 255, 255, 0) 58%);
  transition: transform 0.9s var(--mt-ease); }
/* the page block: the book's thickness, hinged at the cover's right edge and running back into the shelf */
.mt-book__pages { position: absolute; top: 1.4%; bottom: 1.4%; left: calc(100% - 1px); width: var(--thick, 14px); transform-origin: left center; transform: rotateY(90deg);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.32) 100%), repeating-linear-gradient(90deg, #f3ecda 0 1px, #d8cdb2 1px 2px); }
/* the back board edge, so a thick bundle reads as a boxed set */
.mt-book__back { position: absolute; inset: 0; transform: translateZ(calc(var(--thick, 14px) * -1)); background: #08111f; border-radius: 3px; }
.mt-slot__shadow { position: absolute; left: 50%; bottom: -3px; z-index: 0; width: min(calc(var(--book-w) + 18px), calc(var(--book-h) * var(--aspect) + 18px)); height: 16px;
  transform: translateX(-50%); border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 100%);
  transition: transform 0.62s var(--mt-settle), opacity 0.62s var(--mt-ease); }
/* lean: the hovered or focused book eases out, overshoots a hair and settles; its neighbours keep still */
@media (hover: hover) {
  .mt-slot:hover .mt-book { transform: translate3d(0, -8px, 30px) rotateY(-24deg) rotateX(3deg); }
  .mt-slot:hover .mt-book__face::after { transform: translateX(28%); }
  .mt-slot:hover .mt-slot__shadow { transform: translateX(-46%) scaleX(1.08); opacity: 0.7; }
}
.mt-slot:focus-within .mt-book { transform: translate3d(0, -8px, 30px) rotateY(-24deg) rotateX(3deg); }
.mt-slot:focus-within .mt-slot__shadow { transform: translateX(-46%) scaleX(1.08); opacity: 0.7; }
/* tap on a phone: the tapped book leans (set by the page for a moment) */
.mt-slot.is-pressed .mt-book { transform: translate3d(0, -6px, 22px) rotateY(-20deg) rotateX(2deg); }

/* ---- empty state */
.mt-empty { padding: 40px 24px; border-radius: 12px; border: 1px dashed rgba(216, 180, 109, 0.4); color: var(--mt-ink-2); text-align: center; font: 500 1rem/1.5 var(--mt-sans); }

@media (max-width: 1100px) {
  .mt-bay { --book-h: 244px; --book-w: 186px; --slot-w: 204px; }
}
@media (max-width: 640px) {
  /* two across, about 165 px wide at 390 */
  .mt-bay { --book-h: 220px; --book-w: 166px; --slot-w: 150px; --board-h: 18px; --post-w: 14px; padding: 18px 6px 2px; }
  .mt-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-slot__stage { padding: 0 2px; }
  .mt-slot__board { margin-top: -5px; }
  .mt-slot__label { padding: 12px 8px 22px; }
  .mt-slot__title { font-size: 0.94rem; }
  .mt-slot__inside { font-size: 0.8125rem; }
  .mt-bay__cone { height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .mt-book, .mt-slot__shadow, .mt-book__face::after { transition: none; }
  .mt-bay__cone { animation: none; }
}
.mt-slot__cover { display: block; color: inherit; }

/* ---- folded shelves (paging): the first rows show, the rest wait behind "Show all" (still in the DOM for crawlers) */
.mt-bay.is-folded.folds-wide .mt-slot:nth-child(n + 11) { display: none; }
.mt-unfold { display: inline-flex; align-items: center; min-height: 44px; margin-top: 18px; padding: 0 18px; border-radius: 10px; border: 0; cursor: pointer;
  color: var(--mt-ink); background: rgba(13, 26, 45, 0.7); box-shadow: 0 0 0 1px rgba(243, 236, 224, 0.3) inset; font: 600 0.9rem/1 var(--mt-sans); }
.mt-unfold:hover { box-shadow: 0 0 0 1px rgba(243, 236, 224, 0.7) inset; }
/* ---- a long shelf in grade groups (round 3): a quiet label over each group's own run of boards */
.mt-shelfgroup + .mt-shelfgroup { margin-top: 40px; }
.mt-shelfgroup__name { margin: 0 0 30px; color: var(--mt-ink-2); font: 600 0.9375rem/1.3 var(--mt-sans); letter-spacing: 0.01em; }
.mt-shelfgroup__name small { margin-left: 10px; color: var(--mt-ink-3); font-weight: 500; font-size: 0.875rem; }
.mt-bay:not(.folds-wide) + .mt-unfold { display: none; }
/* the last row's board runs on to the bay's far side, so a part-filled row is still one shelf */
.mt-shelf { overflow: clip; overflow-clip-margin: 40px; }
.mt-slot:last-child .mt-slot__board::before, .mt-bay.is-folded.folds-wide .mt-slot:nth-child(10) .mt-slot__board::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 100vw; background: inherit; background-position: -300px 0, 0 0; box-shadow: inherit; }
@media (max-width: 640px) {
  .mt-bay.is-folded .mt-slot:nth-child(n + 7) { display: none; }
  .mt-bay.is-folded .mt-slot:nth-child(6) .mt-slot__board::before { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 100vw; background: inherit; box-shadow: inherit; }
  .mt-bay:not(.folds-wide) + .mt-unfold { display: inline-flex; }
  .mt-bay:not(.is-folded) + .mt-unfold, .mt-bay.is-folded + .mt-unfold { display: inline-flex; }
}

/* ==== The Stacks (/library). Room tokens: components/stacks/room.css. ======================================== */
/* the site header floats over the room (81 px, night variant): the page starts under it */
.mt-stacks { min-height: 100vh; padding: 81px 0 72px; overflow-x: clip; }
.mt-stacks__head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); align-items: start; gap: 18px 44px;
  max-width: 1320px; margin: 0 auto; padding: clamp(4px, 0.8vw, 10px) clamp(16px, 4vw, 48px) 0; }
.mt-stacks__intro { max-width: 640px; }
.mt-stacks__filters { min-width: 0; }
.mt-stacks__h1 { margin: 0; max-width: 13em; font: 400 clamp(2rem, 1.4rem + 1.6vw, 2.5rem)/1.05 var(--mt-display); letter-spacing: -0.012em; color: var(--mt-ink); text-wrap: balance;
  -webkit-text-stroke: 0.012em currentColor; paint-order: stroke fill; }
.mt-stacks__sub { margin: 10px 0 0; max-width: 34em; color: var(--mt-ink-2); font: 500 clamp(0.98rem, 0.95rem + 0.2vw, 1.0625rem)/1.6 var(--mt-sans); text-wrap: pretty; }
.mt-stacks__sub--short { display: none; }
.mt-stacks__sale { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; color: var(--mt-ink-2); font: 500 0.9rem/1.45 var(--mt-sans); }
.mt-stacks__sale-tag { flex: none; padding: 4px 9px; border-radius: 6px; background: rgba(216, 180, 109, 0.16); border: 1px solid rgba(216, 180, 109, 0.55); color: var(--mt-brass-hi); font: 700 0.75rem/1 var(--mt-sans); letter-spacing: 0.02em; }
.mt-stacks__count { margin: 8px 2px 0; color: var(--mt-ink-3); font: 600 0.875rem/1.3 var(--mt-sans); }
.mt-stacks__count small { font: inherit; font-weight: 500; }

/* ---- brass filter tabs: four rows, the name of each row set in the margin */
.mt-tabs { display: grid; gap: 8px; padding: 14px 16px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(19, 34, 58, 0.7), rgba(10, 20, 36, 0.7)); box-shadow: 0 0 0 1px rgba(243, 236, 224, 0.12) inset, 0 20px 40px -26px rgba(0, 0, 0, 0.9); }
.mt-tabs__group { min-width: 0; margin: 0; padding: 0; border: 0; }
.mt-tabs__legend { float: left; width: 74px; margin: 0; padding: 10px 0 0; color: var(--mt-ink-3); font: 600 0.8125rem/1.2 var(--mt-sans); }
.mt-tabs__row { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 74px; }
.mt-tab { position: relative; display: inline-flex; }
.mt-tab input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.mt-tab label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 11px; border-radius: 7px; cursor: pointer; user-select: none;
  color: var(--mt-ink-2); font: 600 0.84rem/1 var(--mt-sans); background: rgba(13, 26, 45, 0.55); box-shadow: 0 0 0 1px rgba(243, 236, 224, 0.2) inset;
  transition: background-color 0.18s, box-shadow 0.18s, color 0.18s, transform 0.16s var(--mt-ease); }
.mt-tab label:hover { color: var(--mt-ink); box-shadow: 0 0 0 1px rgba(243, 236, 224, 0.55) inset; transform: translateY(-1px); }
.mt-tab__n { color: var(--mt-ink-3); font: 600 0.72rem/1 var(--mt-sans); font-variant-numeric: tabular-nums; }
/* the chosen tab is lit in the room's ink, not gold (gold is the one action) */
.mt-tab input:checked + label { color: #0b1626; background: var(--mt-ink); box-shadow: 0 0 0 1px var(--mt-ink) inset; }
.mt-tab input:checked + label .mt-tab__n { color: rgba(11, 22, 38, 0.66); }
.mt-tab input:focus-visible + label { outline: 3px solid var(--mt-teal); outline-offset: 2px; }
.mt-tab input:disabled + label { opacity: 0.38; cursor: default; transform: none; }
/* Province and Grades stay in view; Subject and Type open from "More filters" (round 2, every width) */
.mt-tabs__group--subject, .mt-tabs__group--type { display: none; }
.mt-tabs.is-open .mt-tabs__group { display: block; }
.mt-tabs__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin-left: 74px; }
.mt-tabs__more { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 2px; border: 0; background: none; color: var(--mt-ink); cursor: pointer;
  font: 600 0.875rem/1 var(--mt-sans); text-decoration: underline; text-decoration-color: rgba(70, 200, 180, 0.75); text-underline-offset: 5px; }
.mt-tabs__more-narrow { display: none; }
.mt-tabs__clear { min-height: 36px; padding: 0 2px; border: 0; background: none; color: var(--mt-ink); cursor: pointer;
  font: 600 0.875rem/1 var(--mt-sans); text-decoration: underline; text-decoration-color: rgba(70, 200, 180, 0.8); text-underline-offset: 5px; }

/* ---- aisles */
.mt-stacks__aisles { display: grid; gap: clamp(46px, 6vw, 76px); max-width: 1320px; margin: 4px auto 0; padding: 0 clamp(16px, 4vw, 48px); }
.mt-shelfwrap { min-width: 0; }

.mt-stacks__foot { max-width: 1320px; margin: 64px auto 0; padding: 26px clamp(16px, 4vw, 48px) 0; border-top: 1px solid var(--mt-line); color: var(--mt-ink-2); font: 500 0.9375rem/1.55 var(--mt-sans); }
.mt-stacks__foot p { margin: 0 0 10px; max-width: 60em; }
.mt-stacks__links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.mt-stacks__foot a { color: var(--mt-ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(70, 200, 180, 0.75); text-underline-offset: 5px; }

@media (max-width: 1099px) {
  .mt-stacks__head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .mt-stacks__intro { max-width: 720px; }
}
@media (max-width: 899px) {
  .mt-tabs { gap: 10px; padding: 12px 12px; }
  .mt-tabs__legend { float: none; width: auto; padding: 0 0 6px; }
  .mt-tabs__row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px 4px; }
  .mt-tabs__row::-webkit-scrollbar { display: none; }
  .mt-tab { flex: none; }
  .mt-tabs__foot { margin-left: 0; }
}
@media (max-width: 640px) {
  /* round 3: the first row of covers on the first phone screen. A two-line heading, one short line, then one row of
     province chips with "Filters" beside it (grades, subject and type open from there). */
  .mt-stacks__head { gap: 12px; padding-top: 10px; }
  .mt-stacks__h1 { font-size: 1.75rem; line-height: 1.06; }
  .mt-stacks__sub { display: none; }
  .mt-stacks__sub--short { display: block; margin-top: 8px; font-size: 0.9rem; line-height: 1.45; }
  .mt-tabs { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 6px; padding: 0; background: none; box-shadow: none; }
  .mt-tabs__group--province .mt-tabs__legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mt-tabs__group--province .mt-tabs__row { margin: 0 0 0 -16px; padding: 2px 4px 2px 16px; }
  .mt-tabs__group--band { display: none; }
  .mt-tabs.is-open .mt-tabs__group { grid-column: 1 / -1; }
  .mt-tabs__foot { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 0 12px; }
  .mt-tabs__more { min-height: 36px; padding: 0 12px; border-radius: 7px; text-decoration: none; box-shadow: 0 0 0 1px rgba(243, 236, 224, 0.3) inset; }
  .mt-tabs__more-wide { display: none; }
  .mt-tabs__more-narrow { display: inline; }
  .mt-tabs__clear { display: none; }
  .mt-tabs.is-open .mt-tabs__clear { display: inline-flex; grid-column: 1 / -1; }
  .mt-stacks__count { margin-top: 6px; font-size: 0.8125rem; }
  .mt-stacks__aisles { margin-top: 14px; gap: 44px; }
  .mt-shelfhead { margin-bottom: 30px; gap: 4px 12px; }
  .mt-shelfhead__sub { flex-basis: 100%; order: 3; font-size: 0.875rem; }
}

/* ==== The Reading Table (/store/products/:id). Room tokens: components/stacks/room.css. ======================= */
.rt { min-height: 100vh; padding: 81px 0 96px; overflow-x: clip; }
.rt-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; max-width: 1320px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 48px) 0;
  color: var(--mt-ink-3); font: 600 0.875rem/1.3 var(--mt-sans); }
.rt-crumbs a { color: var(--mt-ink-2); text-decoration: none; }
.rt-crumbs a:hover { color: var(--mt-ink); text-decoration: underline; text-decoration-color: rgba(216, 180, 109, 0.7); text-underline-offset: 4px; }

/* ---- the hero: the open book on the table (left), the listing and its plate (right) */
.rt-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: start; gap: clamp(24px, 4vw, 64px); max-width: 1320px; margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 48px) 40px; }
.rt-table { position: relative; display: grid; justify-items: center; align-content: end; height: 520px; padding: 40px 18px 26px; border-radius: 22px 22px 14px 14px;
  background:
    radial-gradient(54% 58% at 46% 30%, rgba(255, 206, 140, 0.34) 0%, rgba(255, 206, 140, 0.1) 46%, rgba(255, 206, 140, 0) 74%),
    var(--mt-grain),
    linear-gradient(180deg, #6c4223 0%, #4d2d16 48%, #2b170a 100%);
  background-size: 100% 100%, 1800px 300px, 100% 100%;
  box-shadow: 0 1px 0 rgba(255, 216, 160, 0.4) inset, 0 -10px 30px -12px rgba(0, 0, 0, 0.6) inset, 0 40px 80px -36px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.5); }
.rt-table::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(100% 80% at 46% 36%, rgba(0, 0, 0, 0) 52%, rgba(4, 7, 12, 0.6) 100%); }
/* the lamp: a brass shade at the top edge throwing the pool onto the wood */
.rt-lamp { position: absolute; top: -14px; left: 46%; z-index: 2; width: 150px; height: 24px; transform: translateX(-50%); border-radius: 80px 80px 10px 10px;
  background: linear-gradient(180deg, #fbe0a0 0%, #d6ab5c 40%, #7c5a22 100%); box-shadow: 0 2px 0 rgba(255, 245, 210, 0.6) inset, 0 12px 40px rgba(255, 196, 110, 0.55), 0 4px 10px rgba(0, 0, 0, 0.6); }
.rt-lamp::after { content: ""; position: absolute; left: 12%; right: 12%; top: 100%; height: 4px; border-radius: 3px; background: rgba(255, 240, 200, 0.95); filter: blur(2px); }
/* the open book: the cover standing, two real pages lying open beside it */
.rt-open { position: relative; z-index: 1; display: grid; grid-template-columns: auto auto; align-items: end; gap: 0; padding: 0; border: 0; background: none; cursor: zoom-in; perspective: 1400px; }
.rt-open:disabled { cursor: default; }
.rt-open__book { position: relative; z-index: 3; display: flex; align-items: flex-end; --book-h: 360px; --book-w: 300px; transform: translateX(26px); }
.rt-open__book .mt-book { transform: rotateY(-16deg) rotateX(2deg); }
.rt-open:hover .rt-open__book .mt-book, .rt-open:focus-visible .rt-open__book .mt-book { transform: translate3d(0, -6px, 24px) rotateY(-26deg) rotateX(3deg); }
.rt-open__page { position: relative; display: block; width: 262px; aspect-ratio: 0.7727; overflow: hidden; transform-origin: 50% 100%; transition: transform 0.6s var(--mt-settle); }
.rt-open__page img { width: 100%; height: 100%; object-fit: cover; }
.rt-open__page--0 { z-index: 2; transform: rotateX(46deg) rotateZ(-4deg) translate(-8px, 6px); }
.rt-open__page--1 { position: absolute; right: -44px; bottom: 6px; z-index: 1; transform: rotateX(48deg) rotateZ(7deg) translateY(4px); filter: brightness(0.92); }
.rt-open:hover .rt-open__page--0 { transform: rotateX(38deg) rotateZ(-5deg) translate(-10px, 0); }
.rt-open__page--solo { width: 300px; transform: rotateY(-8deg); }
.rt-open::after { content: ""; position: absolute; left: 8%; right: -18%; bottom: -14px; height: 34px; z-index: 0; border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)); }
.rt-open:focus-visible { outline: 3px solid var(--mt-teal); outline-offset: 10px; border-radius: 8px; }
.rt-table__hint { position: relative; z-index: 2; margin: 26px 0 0; color: rgba(255, 238, 210, 0.86); font: 500 0.875rem/1.4 var(--mt-sans); text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }

.rt-copy { min-width: 0; padding-top: 18px; }
.rt-facts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.rt-facts li { padding: 5px 10px 4px; border-radius: 6px; color: var(--mt-brass-hi); font: 600 0.8125rem/1.2 var(--mt-sans); box-shadow: 0 0 0 1px rgba(216, 180, 109, 0.45) inset; }
.rt-title { margin: 0; font: 400 clamp(2rem, 1.25rem + 2.2vw, 3.25rem)/1.06 var(--mt-display); letter-spacing: -0.01em; color: var(--mt-ink); text-wrap: balance; outline: none;
  -webkit-text-stroke: 0.012em currentColor; paint-order: stroke fill; }
/* The rest of the live title (round 3): its own block, so the H1 reads as one title but draws as a heading and a line. */
.rt-title__rest { display: block; margin-top: 10px; color: var(--mt-ink-2); font: 500 1.0625rem/1.45 var(--mt-sans); letter-spacing: 0; }
.rt-title__sep { display: none; }
.rt-fulltitle { margin: 12px 0 0; color: var(--mt-ink-2); font: 500 1.0625rem/1.5 var(--mt-sans); }
.rt-inside { margin: 18px 0 0; padding-left: 14px; border-left: 2px solid var(--mt-brass); color: var(--mt-ink); font: 600 1.0625rem/1.5 var(--mt-sans); }
.rt-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.rt-cta__look { font-size: 1rem; min-height: 48px; }
.rt-buy { margin: 14px 0 0; max-width: 32em; color: var(--mt-ink-2); font: 500 0.9375rem/1.5 var(--mt-sans); }
/* "what should I take": the bundle, as a small book card under the plate */
.rt-take { display: flex; align-items: center; gap: 16px; max-width: 34em; margin-top: 26px; padding: 14px 18px 14px 14px; border-radius: 12px; color: var(--mt-ink); text-decoration: none;
  background: linear-gradient(180deg, rgba(25, 40, 66, 0.85), rgba(13, 26, 45, 0.85)); box-shadow: 0 0 0 1px rgba(243, 236, 224, 0.16) inset, 0 18px 36px -24px rgba(0, 0, 0, 0.9);
  transition: box-shadow 0.2s var(--mt-ease), transform 0.2s var(--mt-ease); }
.rt-take:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(243, 236, 224, 0.45) inset, 0 22px 40px -24px rgba(0, 0, 0, 0.95); }
.rt-take__cover { flex: none; width: 64px; aspect-ratio: auto; align-self: flex-start; overflow: hidden; border-radius: 1px 3px 3px 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 4px 6px 12px -4px rgba(0, 0, 0, 0.8); transform: perspective(500px) rotateY(-12deg); }
.rt-take__cover img { display: block; width: 100%; height: auto; object-fit: contain; }
.rt-take__text { display: grid; gap: 3px; min-width: 0; }
.rt-take__text small { color: var(--mt-ink-3); font: 500 0.84rem/1.35 var(--mt-sans); }
.rt-take__text strong { font: 400 1.25rem/1.15 var(--mt-display); color: var(--mt-ink); }
.rt-take__text span { color: var(--mt-ink-2); font: 500 0.875rem/1.4 var(--mt-sans); }
/* the real pages, large, straight after the hero */
.rt-strip { max-width: 1320px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 48px) 0; }
.rt-strip__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 22px; }
.rt-strip__sub { margin: 0; color: var(--mt-ink-2); font: 500 0.9375rem/1.5 var(--mt-sans); }
.rt-sale { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: var(--mt-ink-2); font: 500 0.9375rem/1.45 var(--mt-sans); }
.rt-sale__tag { flex: none; padding: 4px 9px; border-radius: 6px; background: rgba(216, 180, 109, 0.16); border: 1px solid rgba(216, 180, 109, 0.55); color: var(--mt-brass-hi); font: 700 0.75rem/1 var(--mt-sans); }

/* ---- below the table */
.rt-body { display: grid; gap: clamp(44px, 5vw, 64px); max-width: 1180px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 48px) 0; }
.rt-section { min-width: 0; }
.rt-section > h2 { margin: 0 0 20px; }
.rt-lead { margin: 0 0 14px; color: var(--mt-ink-2); font: 500 1rem/1.55 var(--mt-sans); }
.rt-h3 { margin: 0 0 8px; color: var(--mt-ink-3); font: 600 0.875rem/1.3 var(--mt-sans); }

/* the documents (round 3): a list in the description's words; a document a preview page shows carries that page */
.rt-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 34px; margin: 0; padding: 0; list-style: none; }
.rt-doc { position: relative; display: flex; align-items: center; gap: 16px; min-height: 30px; padding-left: 22px; }
.rt-doc::before { content: ""; position: absolute; left: 3px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 1px; background: var(--mt-ink-3); transform: rotate(45deg); }
.rt-doc.has-page { padding-left: 0; }
.rt-doc.has-page::before { display: none; }
.rt-doc__page { flex: none; width: 76px; aspect-ratio: 0.7727; padding: 0; border: 0; cursor: zoom-in; transition: transform 0.3s var(--mt-settle); }
.rt-doc__page img { object-fit: cover; object-position: top; }
.rt-doc__page:hover { transform: translateY(-2px) rotate(-1deg); }
.rt-doc__label { min-width: 0; color: var(--mt-ink); font: 600 1rem/1.4 var(--mt-sans); overflow-wrap: anywhere; }
.rt-files { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--mt-line); }
.rt-files ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rt-files li { padding: 6px 10px; border-radius: 6px; background: rgba(13, 26, 45, 0.7); box-shadow: 0 0 0 1px var(--mt-line) inset; color: var(--mt-ink-2); font: 500 0.84rem/1.3 var(--mt-sans); overflow-wrap: anywhere; }

.rt-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 0 0 22px; padding: 0; list-style: none; }
.rt-member { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; color: var(--mt-ink); text-decoration: none; background: rgba(13, 26, 45, 0.6); box-shadow: 0 0 0 1px var(--mt-line) inset;
  --book-h: 96px; --book-w: 78px; perspective: 600px; }
.rt-member:hover { box-shadow: 0 0 0 1px rgba(216, 180, 109, 0.7) inset; }
.rt-member .mt-book { flex: none; transform: rotateY(-14deg); }
.rt-member span:last-child { display: grid; gap: 4px; font: 600 0.95rem/1.3 var(--mt-sans); }
.rt-member small { color: var(--mt-ink-3); font: 500 0.8125rem/1.35 var(--mt-sans); }

.rt-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px 28px; margin: 0; padding: 0; list-style: none; }
.rt-page { display: block; width: 100%; aspect-ratio: 0.7727; padding: 0; border: 0; cursor: zoom-in; transition: transform 0.4s var(--mt-settle); }
.rt-page img { object-fit: cover; }
.rt-page--fit img { object-fit: contain; object-position: center top; }
.rt-page:hover { transform: translateY(-4px) rotate(-0.6deg); }
.rt-page:focus-visible { outline: 3px solid var(--mt-teal); outline-offset: 4px; }
.rt-page__cap { margin: 12px 0 0; color: var(--mt-ink-2); font: 500 0.875rem/1.5 var(--mt-sans); }

@media (min-width: 641px) {
  .rt[data-product-id="18125666"] .rt-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .rt[data-product-id="18125666"] .rt-pages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.rt-limits ul { display: grid; gap: 10px; max-width: 62em; margin: 0; padding: 0; list-style: none; }
.rt-limits li { position: relative; padding-left: 22px; color: var(--mt-ink); font: 500 1rem/1.55 var(--mt-sans); }
.rt-limits li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 1px; background: var(--mt-brass); transform: rotate(45deg); }

.rt-bay { margin-top: 34px; --book-h: 206px; --book-w: 176px; width: fit-content; min-width: min(100%, 300px); max-width: 100%; content-visibility: visible; }
.rt-bay .mt-shelf { grid-template-columns: repeat(var(--cols, 1), 236px); }
.rt-related { display: flex; flex-wrap: wrap; gap: 40px 48px; }
.rt-related:empty { display: none; }
.rt-related .rt-section { min-width: 0; max-width: 100%; }
.rt-about p { max-width: 68ch; margin: 0; color: var(--mt-ink-2); font: 500 1rem/1.7 var(--mt-sans); }
.rt-end { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; padding-top: 8px; }
.rt-back { color: var(--mt-ink); font: 600 0.95rem/1.3 var(--mt-sans); text-decoration: underline; text-decoration-color: rgba(70, 200, 180, 0.75); text-underline-offset: 5px; }

/* the sticky bar: the one plate once the hero plate has scrolled away, at every width */
.rt-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: rgba(6, 13, 24, 0.94); box-shadow: 0 -1px 0 rgba(216, 180, 109, 0.35), 0 -18px 30px -18px rgba(0, 0, 0, 0.9);
  transform: translateY(110%); transition: transform 0.3s var(--mt-ease); }
.rt-bar.is-shown { transform: translateY(0); }
.rt-bar__title { min-width: 0; overflow: hidden; color: var(--mt-ink); font: 600 0.9rem/1.25 var(--mt-sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rt-bar .mt-plate { flex: none; min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }

@media (max-width: 980px) {
  .rt-hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 28px; }
  .rt-table { height: 440px; padding: 30px 12px 16px; }
}
@media (max-width: 640px) {
  .rt-crumbs { padding-top: 14px; font-size: 0.8125rem; }
  .rt-hero { gap: 22px; padding-top: 12px; }
  .rt-title { font-size: clamp(1.75rem, 1.2rem + 3vw, 2.25rem); }
  .rt-title__rest { font-size: 0.95rem; }
  .rt-fulltitle { font-size: 0.95rem; }
  .rt-inside { font-size: 0.98rem; }
  .rt-cta { margin-top: 20px; }
  .rt-open__book { --book-h: 200px; --book-w: 170px; transform: translateX(16px); }
  .rt-table__hint { margin-top: 18px; font-size: 0.8125rem; }
  .rt-open__page { width: 150px; }
  .rt-open__page--1 { right: -18px; }
  .rt-table { height: 330px; }
  .rt-docs { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rt-doc__page { width: 64px; }
  .rt-take { margin-top: 20px; padding: 12px 14px 12px 12px; }
  .rt-take__cover { width: 54px; }
  .rt-take__text strong { font-size: 1.125rem; }
  /* the pages run as a row you swipe, each one large */
  .rt-pages { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; gap: 14px; margin: 0 -16px; padding: 0 16px 10px; scrollbar-width: none; }
  .rt-pages::-webkit-scrollbar { display: none; }
  .rt-pages > li { scroll-snap-align: start; }
  .rt-bay .mt-shelf { grid-template-columns: repeat(min(var(--cols, 1), 2), minmax(0, 1fr)); }
  .rt-bay { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rt-open__page, .rt-page, .rt-bar { transition: none; }
}
@media (min-width: 981px) {
  .rt-bar { padding-left: max(24px, calc((100vw - 1180px) / 2)); padding-right: max(24px, calc((100vw - 1180px) / 2)); }
}

/* ==== First paint only (shared/stacksShell.ts): the site header's night "over" bar, drawn before React, at the
   header's own size and place (81 px, the same wordmark and links), so React's header replaces it without a jump. === */
.mt-fp-room { position: relative; }
.mt-fpbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 81px; padding: 0 clamp(20px, 4.2vw, 64px); color: #f3ece0; font-family: "Atlas Sans", "Atlas Sans Fallback", Manrope, system-ui, sans-serif; }
.mt-fpbar__mark { display: inline-flex; align-items: center; gap: 11px; color: #f3ece0; text-decoration: none; font: 400 22px/1 "Atlas Display", "Atlas Display Fallback", Georgia, serif; letter-spacing: 0.01em; white-space: nowrap;
  text-shadow: 0 1px 14px rgba(4, 9, 22, 0.95); }
.mt-fpbar__nav { display: none; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.mt-fpbar__nav a, .mt-fpbar__nav span { display: inline-flex; align-items: center; min-height: 44px; color: rgba(243, 236, 224, 0.82); font: 500 15px/1 "Atlas Sans", "Atlas Sans Fallback", Manrope, system-ui, sans-serif; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; }
.mt-fpbar__menu { display: block; width: 20px; height: 14px; margin-right: 12px; border-top: 2px solid #f3ece0; border-bottom: 2px solid #f3ece0; position: relative; }
.mt-fpbar__menu::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 2px solid #f3ece0; }
/* From 1280px, the same width the React header shows its links (conversion A, 13 Nov 2026). */
@media (min-width: 1280px) {
  .mt-fpbar__nav { display: flex; }
  .mt-fpbar__menu { display: none; }
}
