/* Series Colour, STUDIO presentation (Taschen-informed product photography). Loaded after press.css and theme.css.
   The books are photographed in a studio, not lit on a stage:
   1. Wherever products are presented, the field is a richer, darker, less saturated version of its series colour,
      so the covers (full saturation) are the most vivid thing in the frame. Text-only bands keep the bright colours.
   2. The set is the Illustrator studio kit (design/_brand/press/studio): neutral white and ink at low opacity, so one
      kit lights every series. js/studio.js places it so its wall-to-floor horizon sits behind the product.
   3. Each cover is a real object (js/press.js bkHTML): spine face, page block with edge light, key light on the board,
      contact shadow and a soft cast shadow on the floor, all following the light setup.
   Production: the shop always uses light setup A "Window, left" at medium intensity (html[data-light="A"]
   data-intensity="medium"); setups B and C and the other intensities stay defined so the brand kit can reuse them. */

:root {
  --kit-backdrop: url("../studio/studio-backdrop.svg");
  --kit-cover-left: url("../studio/cover-light-left.svg");
  --kit-cover-right: url("../studio/cover-light-right.svg");
  --kit-cover-top: url("../studio/cover-light-top.svg");
  --kit-spine: url("../studio/spine-shade.svg");
  --kit-edge: url("../studio/edge-light.svg");
  --kit-contact: url("../studio/contact-shadow.svg");
  --kit-cast: url("../studio/cast-shadow.svg");
  --kit-pages: url("../studio/page-block.svg");

  /* Studio fields: oklch(from <series> calc(l * kl) calc(c * kc) h), tuned by eye per colour; hex is the fallback */
  --st-hero: #223899;        /* cobalt hero: kl .80, kc .74. Clearly cobalt, deeper so it recedes */
  --st-business: #2D3F75;    /* kl .78, kc .44 */
  --st-money: #7D3A24;       /* terracotta: kl .79, kc .56, hue +6 (warmer) */
  --st-marketing: #3C5249;   /* kl 1.00, kc .40: a lighter, greyer sage wall, so the deep green cover wins on saturation and separates on value */
  --st-create: #483D63;      /* kl .78, kc .50 */
  --st-work: #674B1C;        /* golden umber stone, from #8A6A00: kl .80, kc .66, hue -10 */
  --st-ink: #1D1F23;
}
@supports (color: oklch(from red l c h)) {
  :root {
    --st-hero: oklch(from #2F4BD8 calc(l * .80) calc(c * .74) h);
    --st-business: oklch(from #2F4BD8 calc(l * .78) calc(c * .44) h);
    --st-money: oklch(from #C23A20 calc(l * .79) calc(c * .56) calc(h + 6));
    --st-marketing: oklch(from #0E5A43 calc(l * 1.00) calc(c * .40) h);
    --st-create: oklch(from #6B4FA3 calc(l * .78) calc(c * .50) h);
    --st-work: oklch(from #8A6A00 calc(l * .80) calc(c * .66) calc(h - 10));
  }
}

/* ---------- Light setups (every piece follows the setup) ----------
   The kit artwork (cover-light-*, spine-shade, edge-light, contact, cast, backdrop) carries the light; each setup adds
   one soft directional key across the board (--key), blended soft-light so the cover keeps its saturation. */
:root, [data-light="A"] {           /* window light from the upper left: left of cover and spine lit, shadow falls right */
  --cover-light: var(--kit-cover-left);
  --cover-lift: var(--kit-cover-top);
  --key: linear-gradient(104deg, rgba(255,255,255,.66) 0%, rgba(255,255,255,.2) 30%, rgba(255,255,255,0) 50%, rgba(10,12,16,.34) 84%, rgba(10,12,16,.48) 100%);
  --key-spine: linear-gradient(90deg, rgba(255,255,255,.62), rgba(255,255,255,0) 58%, rgba(10,12,16,.38));
  --spine-shade: .08; --spine-lift: .9;
  --spine-glow: linear-gradient(to bottom, rgba(255,255,255,.8), rgba(255,255,255,.5));
  --edge-a: 1; --edge-b: 0; --top-tint: rgba(10,12,16,.06); --crease: .14;
  --cast-x: 20%; --cast-z: 4%; --cast-w: 78%; --cast-d: 2.2; --cast-reach: 1.2; --cast-k: 1; --cast-core: .6; --contact-k: .95;
  --shelf-cast: 22%; --shelf-cast-w: .9;
  --lift-k: .34;
}
[data-light="B"] {                  /* firmer studio key from the upper right: spine in deep shade, shadow falls left */
  --cover-light: var(--kit-cover-right);
  --cover-lift: var(--kit-cover-right);
  --key: linear-gradient(256deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.2) 30%, rgba(255,255,255,0) 50%, rgba(10,12,16,.5) 80%, rgba(10,12,16,.68) 100%);
  --key-spine: linear-gradient(270deg, rgba(255,255,255,.7), rgba(255,255,255,0) 52%, rgba(10,12,16,.5));
  --spine-shade: .95; --spine-lift: 0;
  --spine-glow: none;
  --edge-a: 0; --edge-b: 1; --top-tint: rgba(10,12,16,.14); --crease: .02;
  --cast-x: -20%; --cast-z: 4%; --cast-w: 70%; --cast-d: 2; --cast-reach: 1; --cast-k: 1.2; --cast-core: .95; --contact-k: 1.1;
  --shelf-cast: -22%; --shelf-cast-w: .8;
  --lift-k: .2;
}
[data-light="C"] {                  /* overhead, slightly in front: top edge brightest, short shadow pooled underneath */
  --cover-light: var(--kit-cover-top);
  --cover-lift: var(--kit-cover-top);
  --key: linear-gradient(180deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,.14) 28%, rgba(255,255,255,0) 48%, rgba(10,12,16,.28) 82%, rgba(10,12,16,.44) 100%);
  --key-spine: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,0) 45%, rgba(10,12,16,.4));
  --spine-shade: .3; --spine-lift: .7;
  --spine-glow: linear-gradient(to bottom, rgba(255,255,255,.85), rgba(255,255,255,0) 50%, rgba(10,12,16,.5));
  --edge-a: 1; --edge-b: 1; --top-tint: rgba(255,255,255,.3); --crease: .1;
  --cast-x: 0%; --cast-z: 14%; --cast-w: 84%; --cast-d: 2.6; --cast-reach: 1.1; --cast-k: 1.2; --cast-core: .85; --contact-k: 1.15;
  --shelf-cast: 0%; --shelf-cast-w: .75;
  --lift-k: .3;
}
/* soft: gentle, low-contrast modelling. medium: clear. strong: sculpted, crisper highlight, deeper shade and shadow */
:root, [data-intensity="medium"] { --k: 1; }
[data-intensity="soft"] { --k: .4; }
[data-intensity="strong"] { --k: 1.6; }

/* ---------- 1. Studio fields ---------- */
.hero { --field: var(--st-hero); background: var(--st-hero); }
#home-shelf, #rel-shelf, #shop-shelf { --field: var(--st-ink); }
:is(#home-shelf, #rel-shelf, #shop-shelf)[data-open="business"] { --field: var(--st-business); }
:is(#home-shelf, #rel-shelf, #shop-shelf)[data-open="money"] { --field: var(--st-money); }
:is(#home-shelf, #rel-shelf, #shop-shelf)[data-open="marketing"] { --field: var(--st-marketing); }
:is(#home-shelf, #rel-shelf, #shop-shelf)[data-open="work"] { --field: var(--st-work); }
:is(#home-shelf, #rel-shelf, #shop-shelf)[data-open="create"] { --field: var(--st-create); }
:is(#home-shelf, #rel-shelf, #shop-shelf)[data-open="bundle"] { --field: var(--st-money); }
body.pd-page[data-series="business"] { --series-studio: var(--st-business); }
body.pd-page[data-series="money"] { --series-studio: var(--st-money); }
body.pd-page[data-series="marketing"] { --series-studio: var(--st-marketing); }
body.pd-page[data-series="work"] { --series-studio: var(--st-work); }
body.pd-page[data-series="create"] { --series-studio: var(--st-create); }
body.pd-page[data-series] #main > .wrap:first-child { --field: var(--series-studio, var(--st-ink)); background: var(--field); --ink-2: #FFFFFF; }
#collection.sec--band, .collection-row { --field: var(--st-money); background: var(--field); --ink-2: #FFFFFF; }
/* Look inside: the reading room, a deep shade of the studio colour (the book itself stays in its series colour) */
body.pd-page .inside { background: color-mix(in srgb, var(--series-studio, var(--st-ink)) 54%, #07080B); }

/* The set lives in its own layer, under the content and over the field */
.hero, #home-shelf, #rel-shelf, #shop-shelf, #collection.sec--band, .collection-row { position: relative; isolation: isolate; }
#collection.sec--band, .collection-row, #shop-shelf { overflow: clip; }
.hero { overflow-x: clip; }   /* the hero is full width: shadows past the edge never widen the page */
.pd__info { position: relative; z-index: 1; }
@media (max-width: 1023px) { .pd__art { position: relative; top: auto; isolation: isolate; } }
.studio-frame { position: absolute; z-index: -1; pointer-events: none; left: 0; top: 0; width: 0; height: 0; overflow: clip; }
.studio-set {
  position: absolute; pointer-events: none; left: 0; top: 0; width: 0; height: 0;
  background: var(--kit-backdrop) 0 0 / 100% 100% no-repeat;
  opacity: min(.86, calc(.52 + .32 * var(--k)));   /* capped, so white type on the set stays AA at every setting */
  filter: blur(4px);               /* the horizon is soft, as on a real sweep */
  transform-origin: 50% 50%;
}
.studio-set.is-mirrored { transform: scaleX(-1); }
.studio-frame::after { /* the wall is brighter on the side the light comes from */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(var(--wr, 520px) calc(var(--wr, 520px) * .75) at var(--wx, 50%) var(--wy, 40%), rgba(255,255,255, calc(.05 + .06 * min(var(--k), 1))), rgba(255,255,255,0));
}
.studio-frame.is-faded { mask: linear-gradient(to bottom, #000 0, #000 calc(100% - 220px), transparent); }
@media (max-width: 767px) { .studio-set { filter: blur(3px); } }

/* ---------- 2. The book as an object ---------- */
.bk {
  --t: 26px;               /* board-to-board thickness */
  --fd: 64px;              /* how far the floor reaches behind and in front of the book */
  --dark: color-mix(in srgb, var(--s) 30%, #14161A);
  position: relative; display: block; transform-style: preserve-3d;
  transform: translateZ(calc(var(--t) * -1)) rotateX(var(--rx, -7deg)) rotateY(var(--ry, 21deg));
  transform-origin: 50% 50% calc(var(--t) / 2);
}
.bk__front { position: relative; display: block; transform: translateZ(var(--t)); }
.bk .cover { box-shadow: none !important; }
/* The cover keeps its hinge crease; its fixed top-left gloss gives way to the studio's key light */
.bk .cover::before { background: linear-gradient(90deg, rgba(0,0,0,.22) 0, rgba(0,0,0,.06) 2.6%, rgba(255,255,255, var(--crease, .12)) 3.4%, rgba(255,255,255,0) 7%); }

/* Key light on the board: the kit's highlight and shade, blended so the colour stays saturated (soft-light),
   plus a little of the light itself where it lands */
.bk__light, .bk__lift { position: absolute; inset: 0; pointer-events: none; border-radius: var(--r); }
.bk__light { z-index: 7; mix-blend-mode: soft-light; background: var(--key), var(--cover-light) 0 0 / 100% 100% no-repeat; opacity: calc(.15 + .65 * var(--k)); }
.bk__light::after { /* a second pass sculpts the strong setting */
  content: ""; position: absolute; inset: 0; background: inherit; opacity: calc((var(--k) - .7) * .75);
}
.bk__lift { z-index: 8; background: var(--cover-lift) 0 0 / 100% 100% no-repeat; opacity: calc(var(--lift-k) * min(var(--k), 1.15)); }

/* The spine face: the jacket wraps round, so the cover's horizon carries on across it; it turns away from the light */
.bk__spine {
  position: absolute; left: 0; top: 0; width: var(--t); height: 100%;
  transform-origin: 0 50%; transform: rotateY(-90deg); border-radius: 1px 0 0 1px; overflow: hidden;
  background: linear-gradient(to bottom, var(--s) 0 62%, var(--dark) 62% 100%);
}
.bk__spine i { /* turning away from the light */
  position: absolute; inset: 0;
  background: var(--kit-spine) 0 0 / 100% 100% no-repeat, rgba(10,12,16,.55);
  opacity: calc(.12 + var(--spine-shade) * (.35 + .5 * var(--k)));
}
.bk__spine::after { /* facing the light */
  content: ""; position: absolute; inset: 0; background: var(--spine-glow); mix-blend-mode: soft-light;
  opacity: calc(var(--spine-lift) * (.25 + .6 * var(--k)));
}
/* The page block on top, framed by the boards, catching the light on its lit side */
.bk__top {
  position: absolute; left: 0; top: 0; width: 100%; height: var(--t);
  transform-origin: 50% 0; transform: rotateX(90deg); overflow: hidden;
  background:
    linear-gradient(to bottom, var(--s) 0 1px, rgba(0,0,0,0) 1px calc(100% - 1.5px), var(--s) calc(100% - 1.5px)),
    linear-gradient(90deg, var(--s) 0 1px, rgba(0,0,0,0) 1px),
    var(--kit-pages) center / 100% 100% no-repeat, #F4F1EA;
}
.bk__top::before { content: ""; position: absolute; inset: 0; background: var(--top-tint); opacity: calc(.4 + .6 * var(--k)); }
.bk__top i { position: absolute; inset: 0; background: var(--kit-edge) 0 0 / 100% 100% no-repeat; }
.bk__top i:first-child { opacity: calc(var(--edge-a) * (.35 + .65 * var(--k))); }
.bk__top i:last-child { transform: scaleX(-1); opacity: calc(var(--edge-b) * (.35 + .65 * var(--k))); }
/* Floor plane under the book: a tight contact shadow at the footprint, a soft cast falling away from the light */
.bk__floor {
  position: absolute; left: -45%; width: 190%; top: 100%; height: calc(var(--t) + var(--fd) * 2);
  transform-origin: 50% 0; transform: translateZ(calc(var(--fd) * -1)) rotateX(90deg);
  pointer-events: none;
}
.bk__floor i { position: absolute; left: 50%; top: 50%; translate: -50% -50%; background-size: 100% 100%; background-repeat: no-repeat; }
.bk__contact { /* centred on the front foot: most of the footprint is hidden behind the book */
  top: calc(50% + var(--t) * .42) !important; width: 68%; height: calc(var(--t) * 1.2 + var(--fd) * .55);
  background-image: var(--kit-contact); opacity: calc(var(--contact-k) * (.55 + .45 * var(--k)));
}
.bk__contact::after { /* the tight dark line where the board meets the floor */
  content: ""; position: absolute; left: 12%; right: 12%; top: 30%; bottom: 30%;
  background: var(--kit-contact) 0 0 / 100% 100% no-repeat; opacity: calc(.75 + .25 * var(--k));
}
.bk__cast {
  left: calc(50% + var(--cast-x)) !important; top: calc(50% + var(--cast-z)) !important;
  width: var(--cast-w); height: calc(var(--t) * var(--cast-d) + var(--fd) * var(--cast-reach));
  background-image: var(--kit-cast); opacity: calc(var(--cast-k) * (.3 + .7 * var(--k)));
}
.bk__cast::after { /* the core of the shadow: firmer light, crisper core */
  content: ""; position: absolute; inset: 14% 20%; background: var(--kit-cast) 0 0 / 100% 100% no-repeat; opacity: calc(var(--cast-core) * var(--k));
}
.bk__cast::before { content: ""; position: absolute; inset: 26% 30%; background: var(--kit-cast) 0 0 / 100% 100% no-repeat; opacity: calc(var(--cast-core) * (var(--k) - .5)); }

/* ---------- 3. Product page: the edition on its own set ---------- */
.pd__stage { position: relative; perspective: 3900px; perspective-origin: 40% 22%; }
.pd__stage .bk { --t: 40px; --fd: 90px; }
.pd__art { gap: 44px; }
body.pd-page[data-series] .pd__tilt .cover { box-shadow: none; }
@media (max-width: 767px) {
  .pd__stage .bk { --t: 26px; --fd: 60px; }
  .pd__art { gap: 30px; }
}

/* ---------- 4. Hero: three editions standing in the cobalt studio, staggered in depth ---------- */
.fan__item, .fan__drop { transform-style: flat; }
.fan__drop { perspective: 2700px; perspective-origin: 40% 22%; }
.fan__item .bk { --t: 20px; --fd: 50px; }
.fan__item .cover { box-shadow: none; }
.fan__item .bk { --cast-x: 12%; }
.fan__item .bk__cast { width: 46%; }
/* staggered in depth on one floor: the back edition stands highest, so the horizon can sit below the headline */
.fan__item:nth-child(1) { transform: scale(.92); transform-origin: 50% 100%; }
@media (min-width: 1024px) { .fan__item:nth-child(1) { top: 22%; } .fan__item:nth-child(2) { top: 31%; } }
.fan__item:nth-child(1) .bk { --ry: 26deg; }
.fan__item:nth-child(2) { transform: scale(.96); transform-origin: 50% 100%; }
.fan__item:nth-child(2) .bk { --ry: 21deg; }
.fan__item:nth-child(3) { transform: none; transform-origin: 50% 100%; }
.fan__item:nth-child(3) .bk { --ry: 16deg; }
@media (hover: hover) and (pointer: fine) {
  .fan__item:nth-child(1):hover { transform: scale(.92) translateY(-1.5%); }
  .fan__item:nth-child(2):hover { transform: scale(.96) translateY(-1.5%); }
  .fan__item:nth-child(3):hover { transform: translateY(-1.5%); }
}
.fan__item:focus-visible .cover { outline-color: #FFFFFF; }

/* ---------- 5. Shelves: the editions stand on the studio floor (no rail) ---------- */
:is(#home-shelf, #rel-shelf, #shop-shelf) .shelf__row::after { display: none; }
:is(#home-shelf, #rel-shelf, #shop-shelf) .shelf__board { background: none; }
:is(#home-shelf, #rel-shelf, #shop-shelf) .spine { box-shadow: none; }
:is(#home-shelf, #rel-shelf, #shop-shelf) .book.is-open .book__cover { box-shadow: none; }
/* each spine is lit by the same key as the covers */
.book__spine::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: var(--r) var(--r) 1px 1px;
  background: var(--key-spine), var(--cover-light) 0 0 / 100% 100% no-repeat; mix-blend-mode: soft-light;
  opacity: calc(.15 + .65 * var(--k));
}
/* the pulled-out edition turns its spine away from the light */
.book__spine::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 300ms ease;
  background: var(--kit-spine) 0 0 / 100% 100% no-repeat, rgba(10,12,16,.45);
}
.book.is-open .book__spine::before { opacity: calc(.12 + var(--spine-shade) * (.35 + .5 * var(--k))); }
/* crisp spine type: closed editions render flat (2D); only the pulled-out one is drawn in 3D */
.book:not(.is-open) { transform: translateX(var(--shift, 0px)); transform-style: flat; }
.book:not(.is-open) .book__body { transform-style: flat; }
/* contact shadow at each foot, and a soft cast falling away from the light */
:is(#home-shelf, #rel-shelf, #shop-shelf) .book::after {
  left: -8%; right: -8%; bottom: -5px; height: 11px; border-radius: 0;
  background: var(--kit-contact) 0 0 / 100% 100% no-repeat; opacity: calc(var(--contact-k) * (.55 + .45 * var(--k)));
}
:is(#home-shelf, #rel-shelf, #shop-shelf) .book::before {
  content: ""; position: absolute; left: -35%; right: -35%; bottom: -12px; height: 26px; pointer-events: none;
  background: var(--kit-cast) 0 0 / 100% 100% no-repeat; translate: var(--shelf-cast) 0; scale: var(--shelf-cast-w) 1;
  opacity: calc(var(--cast-k) * (.3 + .7 * var(--k)));
}
:is(#home-shelf, #rel-shelf, #shop-shelf) .book.is-open::before { left: calc(var(--tx) - 4%); right: auto; width: calc(var(--cw) * 1.08); bottom: -14px; height: 32px; }

/* the bookend mark stays quiet, so nothing on the floor outshines the editions */
:is(#home-shelf, #rel-shelf, #shop-shelf) .bookend { color: color-mix(in srgb, #FFFFFF 26%, var(--field)); transition: color 700ms var(--stage-ease); }

/* Phone shelf: each card is an object on the floor */
.snapcard { perspective: 2100px; perspective-origin: 40% 22%; }
.snapcard .bk { --t: 16px; --fd: 40px; --ry: 18deg; width: 90%; align-self: start; margin-left: 4%; }
.snapcard .cover { box-shadow: none; }
@media (max-width: 767px) {
  :is(#home-shelf, #rel-shelf, #shop-shelf) .snaprow__track { padding-top: 22px; padding-bottom: 30px; }
}

/* ---------- 6. Collection: four editions in their box ---------- */
.boxset__covers { perspective: 2200px; perspective-origin: 50% -60%; }
.boxset__bk { position: absolute; bottom: 0; width: 28.9%; transition: transform 500ms var(--ease-pull); }
.boxset__covers .boxset__bk .cover { position: relative; left: auto; bottom: auto; width: 100%; transform: none; box-shadow: none; transition: none; }
.boxset__covers .boxset__bk:not(:last-child) .cover__top span:last-child { visibility: hidden; }
.boxset__covers .boxset__bk:last-child .cover__top span:last-child { visibility: visible; }
.bk--boxed { --t: 16px; --ry: 0deg; --rx: 0deg; }
.bk--boxed .bk__floor { display: none; }
.boxset__bk:nth-child(1) { left: 0; transform: rotate(-3deg); }
.boxset__bk:nth-child(2) { left: 23.7%; transform: rotate(-1deg) translateY(-3%); }
.boxset__bk:nth-child(3) { left: 47.4%; transform: rotate(1.5deg) translateY(-1%); }
.boxset__bk:nth-child(4) { left: 71.1%; transform: rotate(3deg) translateY(2%); }
@media (hover: hover) and (pointer: fine) {
  .boxset:hover .boxset__bk:nth-child(1) { transform: rotate(-6deg) translate(-4%, -4%); }
  .boxset:hover .boxset__bk:nth-child(2) { transform: rotate(-2deg) translate(-2%, -9%); }
  .boxset:hover .boxset__bk:nth-child(3) { transform: rotate(2.5deg) translate(2%, -7%); }
  .boxset:hover .boxset__bk:nth-child(4) { transform: rotate(6deg) translate(4%, -2%); }
}
/* the box: lit by the same key, standing on the floor */
.boxset__box { box-shadow: none; overflow: hidden; background: linear-gradient(to bottom, #24272D 0, #17191D 40%, #101114 100%); }
.boxset__box::after { /* the key across the front of the box */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--key), var(--cover-light) 0 0 / 100% 100% no-repeat; opacity: calc(.12 + .2 * var(--k));
}
/* the editions sit inside the box: the front wall shades their lower edge where they go in */
.boxset__covers::after {
  content: ""; position: absolute; z-index: 5; left: -2%; right: -2%; bottom: 15.4%; height: 10%; pointer-events: none;
  background: linear-gradient(to top, rgba(4,5,8,.5), rgba(4,5,8,0));
}

.boxset::before, .boxset::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
.boxset::after { left: 0; right: 0; bottom: -3.2%; height: 8%; background: var(--kit-contact) 0 0 / 100% 100% no-repeat; opacity: calc(var(--contact-k) * (.75 + .25 * var(--k))); }
.boxset::before { left: calc(10% + var(--cast-x) * .3); width: 80%; bottom: -9%; height: 22%; background: var(--kit-cast) 0 0 / 100% 100% no-repeat; opacity: calc(var(--cast-k) * (.6 + .5 * var(--k))); }
.boxset { isolation: isolate; }

/* ---------- 7. List view: the mini cover is a small object too ---------- */
.row__swatch .mini { perspective: 700px; perspective-origin: 40% 22%; }
.bk--mini { --t: 6px; --fd: 12px; --ry: 16deg; }
.bk--mini .bk__cast { display: none; }

/* ---------- Reduced motion: light and colour change at once ---------- */
@media (prefers-reduced-motion: reduce) {
  .boxset__bk, .book__spine::before { transition-duration: 1ms !important; }
}

/* Library "Coming later" stamp: a deeper plum so the small caps pass AA on the member card */
.library__stamp { border-color: #4E3786; color: #4E3786; }

/* Product page, desktop layout: the whole book fits the first screen (George, 27 Oct 2026). The book stands 1.4 times
   its width plus 54px of page edge and contact shadow, and starts about 122px below the header (breadcrumb and series
   line), so the width is capped by the screen height as well as the column. It scales, never crops; 220px at least. */
@media (min-width: 1024px) {
  .pd__stage { width: clamp(220px, calc((100vh - var(--head-h, 72px) - 196px) / 1.4), min(76%, 430px)); }
}

/* Look Inside, two-page spread: the pages and the page controls under them fit one screen together (George, 27 Oct
   2026). The reader stands its width / 1.414 plus about 185px of controls (measured); on shorter screens the controls
   sit a little closer to the pages. "Zoom in to read" covers small screens. */
@media (min-width: 768px) {
  .inside .bp-reader:not(.is-single) .bp-spread, .inside .reader:not(.is-single) .spread { max-width: clamp(360px, calc((100vh - var(--head-h, 72px) - 232px) * 1.414), 940px); margin-inline: auto; }
}
@media (min-width: 768px) and (max-height: 820px) {
  .inside .bp-reader__bar, .inside .reader__bar { margin-top: 16px; }
}
