:root {
  --wall: #23362D;
  --wall-dark: #1D2220;
  --walnut: #4A2C17;
  --walnut-light: #6E4426;
  --walnut-dark: #2A1A0F;
  --paper: #F1E8D6;
  --paper-edge: #E2D5BC;
  --ink: #2A2420;
  --ink-soft: #6B5F55;
  --gold: #E2C46B;
  --cobalt: #2B3F8C;
  --cobalt-deep: #1C2A63;

  --sans: "Albert Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --blue: #2B63FF;
  --blue-deep: #1B4BE0;
  --grey: #6E6E73;

  --pw: 420px;   /* page width  (set by JS) */
  --ph: 580px;   /* page height (set by JS) */
  --bd: 75px;    /* book depth  (set by JS) */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--paper);
  background: var(--wall-dark);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--gold); color: var(--ink); padding: .6rem 1rem; font-weight: 700; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  background: rgba(22, 24, 23, .45);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.topbar a { pointer-events: auto; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--serif); font-weight: 400; font-size: 1.35rem; letter-spacing: 0; color: #fff; }
.wordmark svg { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: clamp(.9rem, 2.6vw, 1.8rem); }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; color: rgba(255, 255, 255, .86); padding: .2rem 0; }
.nav a:hover { color: #fff; }
.nav a.pill { color: #fff; background: var(--blue); padding: .5rem 1.25rem; border-radius: 999px; font-size: 1rem; }
.nav a.pill:hover { background: var(--blue-deep); }

/* ---------------- Scene ---------------- */
.scene { position: relative; height: 100vh; }
.stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--wall-dark); }
.book-mode .stage { position: sticky; top: 0; }

.room { position: absolute; inset: 0; transform-origin: 0 0; }

.wall {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 40% at 50% 0%, rgba(255, 214, 160, .20), transparent 70%),
    radial-gradient(ellipse 40% 30% at 18% 55%, rgba(255, 255, 255, .035), transparent 70%),
    radial-gradient(ellipse 45% 35% at 82% 35%, rgba(0, 0, 0, .18), transparent 70%),
    radial-gradient(ellipse 50% 40% at 70% 85%, rgba(255, 255, 255, .03), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E"),
    linear-gradient(#323A35 0%, #2A302C 60%, #222724 100%);
}
.floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 7vh;
  background:
    linear-gradient(rgba(0, 0, 0, .55), transparent 30%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 180px),
    linear-gradient(#4A3626, #2E2117);
  border-top: 1.4vh solid #1F2421;
  box-shadow: 0 -2px 0 rgba(255, 255, 255, .04);
}

/* Floating shelves */
.case {
  position: absolute; left: 50%; bottom: 12vh;
  width: min(92vw, 1100px); height: min(58vh, 680px);
  transform: translateX(-50%);
}
.case-body { height: 100%; display: flex; flex-direction: column; gap: clamp(22px, 4.2vh, 44px); }
.row { --t: clamp(11px, 1.7vh, 18px); flex: 1; position: relative; display: flex; align-items: flex-end; padding: 0 2%; margin-bottom: var(--t); }
.row::before { /* warm wash from the LED strip of the shelf above / the ceiling spot */
  content: ""; position: absolute; left: -10%; right: -10%; top: calc(-1 * clamp(22px, 4.2vh, 44px)); height: 75%;
  background: radial-gradient(ellipse 55% 100% at 50% 0%, rgba(255, 196, 130, .17), transparent 75%);
  pointer-events: none;
}
.row:first-child::before { top: -30%; background: radial-gradient(ellipse 45% 100% at 50% 0%, rgba(255, 210, 150, .12), transparent 75%); }
.plank {
  position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--t)); height: var(--t);
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px 9px, rgba(255, 255, 255, .04) 9px 11px, transparent 11px 27px),
    linear-gradient(#8C6440 0%, #6E4B2E 18%, #5A3C24 100%);
  box-shadow:
    0 -3px 0 #A47A52,
    0 -5px 6px rgba(0, 0, 0, .25),
    0 14px 18px rgba(0, 0, 0, .45),
    0 3px 10px rgba(255, 190, 120, .35);
  z-index: 2;
}
.plank::after { /* LED strip glow */
  content: ""; position: absolute; left: 3%; right: 3%; bottom: -2px; height: 2px;
  background: rgba(255, 214, 160, .85); filter: blur(1.5px); border-radius: 2px;
}
.books { display: flex; align-items: flex-end; height: 100%; width: 100%; position: relative; z-index: 1; }

/* Book spines: rounded, lit from above-left */
.bk {
  position: relative; flex: none;
  border-radius: 3px 3px 1px 1px;
  margin-right: 1px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 12%, rgba(0, 0, 0, 0) 85%, rgba(0, 0, 0, .25)),
    linear-gradient(90deg, rgba(0, 0, 0, .42) 0, rgba(255, 255, 255, .14) 16%, rgba(255, 255, 255, .02) 42%, rgba(0, 0, 0, .12) 78%, rgba(0, 0, 0, .45) 100%),
    var(--c);
  box-shadow: 5px 2px 7px rgba(0, 0, 0, .35);
}
.bk .mark { position: absolute; left: 24%; right: 24%; border-radius: 1px; background: var(--ink-c, rgba(255, 255, 255, .8)); }
.bk .blk { position: absolute; left: 0; right: 0; background: var(--b); }
.bk .dot { position: absolute; left: 50%; width: 34%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: var(--ink-c, rgba(255, 255, 255, .8)); }
.bk .lbl {
  position: absolute; inset: 16% 0;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--sans); font-weight: 650;
  color: var(--ink-c, #fff); white-space: nowrap; letter-spacing: .01em;
}
.bk.lean { transform-origin: bottom left; transform: rotate(-10deg); margin-left: 8px; }
.stack { flex: none; display: flex; flex-direction: column-reverse; align-items: center; margin: 0 5px; }
.stack .flat {
  border-radius: 2px;
  background: linear-gradient(rgba(255, 255, 255, .14), rgba(0, 0, 0, .28)), var(--c);
  border-right: 3px solid #E8E1D2;
  box-shadow: 4px 3px 6px rgba(0, 0, 0, .35);
}

/* Objects on the shelves */
.obj { flex: none; position: relative; margin: 0 clamp(4px, 1vw, 14px); display: flex; align-items: flex-end; }
.obj svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(6px 4px 6px rgba(0, 0, 0, .4)); }

/* The hero book: Back Your Shelf */
.hero-spine { flex: none; position: relative; margin: 0 2px; box-shadow: 6px 2px 9px rgba(0, 0, 0, .45); border-radius: 3px 3px 1px 1px; }
.spine-art {
  position: absolute; inset: 0;
  container-type: size;
  border-radius: 3px 3px 1px 1px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 12%, rgba(0, 0, 0, 0) 85%, rgba(0, 0, 0, .25)),
    linear-gradient(90deg, rgba(0, 0, 0, .42), rgba(255, 255, 255, .16) 18%, rgba(255, 255, 255, .02) 44%, rgba(0, 0, 0, .14) 78%, rgba(0, 0, 0, .45)),
    var(--cobalt);
  overflow: hidden;
}
.spine-art::before { content: ""; position: absolute; left: 22%; right: 22%; top: 7cqh; height: 1.2cqh; background: var(--gold); border-radius: 1px; }
.spine-art::after { content: ""; position: absolute; left: 50%; bottom: 6cqh; width: 38cqw; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: .5cqh solid var(--gold); }
.spine-art .st {
  position: absolute; inset: 14cqh 0 16cqh;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--sans); font-weight: 700;
  font-size: 44cqw; letter-spacing: .01em; white-space: nowrap;
  color: var(--gold);
}

/* Intro text */
.intro {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 0 1.2rem;
  pointer-events: none;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .55);
}
.intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -.01em;
  color: #fff;
}
.intro p { margin: 1rem 0 0; max-width: 36ch; font-size: clamp(1rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, .78); }
.cap {
  position: absolute; left: 50%; top: 12vh; z-index: 3; margin: 0; padding: 1.1rem 2rem 1.3rem;
  width: max-content; max-width: calc(100vw - 2rem); translate: -50% 0;
  background: radial-gradient(closest-side, rgba(10, 12, 11, .55), rgba(10, 12, 11, 0));
  text-align: center; font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 3.4rem); line-height: 1.08; color: #fff;
  opacity: 0; pointer-events: none; text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
}
.cap-low { top: 12vh; }
canvas.scene3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.has-3d .room { visibility: hidden; }

.scrim { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10, 14, 12, .55), rgba(10, 14, 12, .92)); opacity: 0; pointer-events: none; }

.hint {
  position: absolute; left: 50%; bottom: 2.6vh; transform: translateX(-50%); z-index: 3;
  margin: 0; font-size: .85rem; font-weight: 500; letter-spacing: .04em; color: rgba(255, 255, 255, .7);
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  pointer-events: none; text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
.hint::after {
  content: ""; width: 10px; height: 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .hint::after { animation: nudge 1.6s ease-in-out infinite; }
  @keyframes nudge { 50% { transform: translateY(5px) rotate(45deg); } }
}

/* ---------------- 3D closed book (for the turn) ---------------- */
.book3d {
  position: absolute; left: 50%; top: 50%;
  width: var(--pw); height: var(--ph);
  margin: calc(var(--ph) / -2) 0 0 calc(var(--pw) / -2);
  transform-style: preserve-3d;
  visibility: hidden;
}
.stage { perspective: 2600px; }
.b3-face { position: absolute; top: 0; height: 100%; backface-visibility: hidden; }
.b3-front { left: 0; width: 100%; transform: translateZ(calc(var(--bd) / 2)); }
.b3-back { left: 0; width: 100%; transform: rotateY(180deg) translateZ(calc(var(--bd) / 2)); background: var(--cobalt-deep); border-radius: 3px; }
.b3-spine { width: var(--bd); left: calc((var(--pw) - var(--bd)) / 2); transform: rotateY(-90deg) translateZ(calc(var(--pw) / 2)); }
.b3-edge {
  width: var(--bd); left: calc((var(--pw) - var(--bd)) / 2);
  transform: rotateY(90deg) translateZ(calc(var(--pw) / 2));
  background: repeating-linear-gradient(90deg, #EFE5D0 0 2px, #D8C9AA 2px 3px);
  top: 1.2%; height: 97.6%;
}

/* Cover design (used on the 3D book and the first page) */
.cover-art {
  position: absolute; inset: 0;
  container-type: size;
  border-radius: 2px 6px 6px 2px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 6%, rgba(255, 255, 255, .08) 7.5%, rgba(0, 0, 0, 0) 11%),
    radial-gradient(ellipse at 25% 15%, rgba(255, 255, 255, .14), transparent 60%),
    linear-gradient(160deg, #31479A, #1F2E6C);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
  color: var(--gold);
  font-family: var(--sans);
}
.cover-art .frame { position: absolute; left: 12cqw; right: 8cqw; top: 9cqw; height: .5cqw; background: var(--gold); opacity: .9; }
.cover-art .ct { position: absolute; left: 12cqw; right: 8cqw; top: 18cqh; color: #E2C46B; }
.cover-art .ct b { display: block; font-family: var(--serif); font-size: 17cqw; line-height: .912; font-weight: 400; letter-spacing: 0; }
.cover-art .ct span { display: block; margin-top: 6.2cqw; font-family: var(--sans); font-size: 4.4cqw; line-height: 1.41; font-weight: 400; color: #EBDDB0; white-space: nowrap; }
.cover-art .emblem { position: absolute; left: 12cqw; bottom: 9cqw; width: 16cqw; height: 16cqw; }
.cover-art .imprint { position: absolute; right: 8cqw; bottom: 10cqw; font-size: 3.2cqw; font-weight: 600; letter-spacing: .02em; color: #EBDDB0; }

/* ---------------- Flip book ---------------- */
.flip {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--pw) * 2); height: var(--ph);
  margin: calc(var(--ph) / -2) 0 0 calc(var(--pw) * -1);
  transform-style: preserve-3d;
  visibility: hidden;
  will-change: transform;
}
.board {
  position: absolute; left: 50%; top: 0; width: var(--pw); height: 100%;
  border-radius: 2px 6px 6px 2px;
  background:
    repeating-linear-gradient(45deg, rgba(226, 196, 107, .18) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(226, 196, 107, .12) 0 2px, transparent 2px 9px),
    var(--cobalt-deep);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55);
}
.leaves { position: absolute; inset: 0; transform-style: preserve-3d; }
.leaf {
  position: absolute; left: 50%; top: 0;
  width: var(--pw); height: 100%;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  will-change: transform;
}
.leaf > .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.leaf > .face.back { transform: rotateY(180deg); }
.leaf > .face > .page { position: absolute; inset: 0; }

/* gutter shading */
.leaf > .face.front::after, .leaf > .face.back::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 12%; pointer-events: none;
}
.leaf > .face.front::after { left: 0; background: linear-gradient(90deg, rgba(60, 40, 20, .28), transparent); }
.leaf > .face.back::after { right: 0; background: linear-gradient(-90deg, rgba(60, 40, 20, .28), transparent); }
.leaf:first-child > .face.front::after { display: none; }

/* ---------------- Pages ---------------- */
.page { --pg: min(560px, calc(100vw - 2.4rem)); position: relative; color: #3A3A3F; font-family: var(--sans); }
.leaf .page { --pg: var(--pw); }
.paper {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .35), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"),
    #FBFAF7;
  padding: calc(var(--pg) * 11 / 100) calc(var(--pg) * 10 / 100) calc(var(--pg) * 12 / 100);
  font-size: clamp(13px, calc(var(--pg) * 3.55 / 100), 19px);
  line-height: 1.55;
}
.page p { margin: 0 0 .85em; }
.page a { color: var(--blue); text-underline-offset: .15em; }
.page-title {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-weight: 400; color: #141416;
  font-size: clamp(22px, calc(var(--pg) * 8.2 / 100), 42px);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.drop { font-size: 1.12em; line-height: 1.5; }
.aside { font-style: italic; color: var(--ink-soft); }
.folio { position: absolute; bottom: calc(var(--pg) * 5 / 100); left: 0; right: 0; text-align: center; font-size: clamp(11px, calc(var(--pg) * 2.8 / 100), 14px); color: var(--ink-soft); }

.howto { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.howto li { counter-increment: s; position: relative; padding-left: 2.1em; margin-bottom: 1.05em; }
.howto li::before {
  content: counter(s); position: absolute; left: 0; top: -.15em;
  font-family: var(--serif); font-size: 1.7em; font-weight: 400; color: var(--blue); line-height: 1.1;
}
.howto strong { display: block; font-weight: 700; }

.toc { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0 0 .55em; }
.toc a { display: flex; align-items: baseline; gap: .5em; text-decoration: none; color: var(--ink); }
.toc a:hover .toc-name { text-decoration: underline; }
.toc .dot { width: .7em; height: .7em; border-radius: 1px; background: var(--c); flex: none; transform: translateY(.05em); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.toc .lead { flex: 1; border-bottom: 2px dotted rgba(42, 36, 32, .35); transform: translateY(-.25em); }

.chapter { margin-bottom: 1.05em; }
.chapter h3 { display: flex; align-items: center; gap: .5em; margin: 0 0 .2em; font-family: var(--sans); font-size: 1.15em; font-weight: 700; }
.chapter h3 .dot { width: .75em; height: .75em; border-radius: 1px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.chapter .cb { margin: 0 0 .35em; color: var(--ink-soft); font-size: .92em; }
.chapter .soon { font-size: .92em; font-style: italic; }
.chapter-label { margin: 0 0 .4em; font-style: italic; color: var(--ink-soft); }
.feature h3 { font-family: var(--serif); font-size: clamp(26px, calc(var(--pg) * 9 / 100), 46px); line-height: 1; margin: 0 0 .2em; letter-spacing: -.01em; font-weight: 400; color: #141416; }
.feature .sub { font-weight: 600; margin-bottom: .7em; }
.mini-product { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .8em; margin: .2em 0 .5em; }
.mini-product b { font-weight: 700; }
.price { font-family: var(--sans); font-weight: 800; font-size: 1.5em; letter-spacing: -.02em; }
.buyrow { display: flex; flex-wrap: wrap; align-items: center; gap: .6em 1em; margin-top: 1em; }

.ink-btn, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 700; font-size: .95em;
  text-decoration: none; cursor: pointer;
  padding: .65em 1.15em; border-radius: 999px;
  background: var(--blue); color: #fff; border: 2px solid var(--blue);
}
.page a.ink-btn, .page a.btn { color: #fff; }
.ink-btn:hover, .btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn[aria-disabled="true"] { background: transparent; color: var(--ink-soft); border-color: rgba(42, 36, 32, .3); cursor: default; }
.page-end .sign { margin-top: 2em; font-family: var(--sans); font-weight: 600; color: var(--ink-soft); }

.creator-pick { position: relative; display: inline-block; }
.creator-pick summary { list-style: none; }
.creator-pick summary::-webkit-details-marker { display: none; }
.creator-pick ul {
  position: absolute; z-index: 3; left: 0; bottom: calc(100% + .4em);
  min-width: 13em; margin: 0; padding: .35em; list-style: none;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 10px;
  font-family: var(--sans);
}
.creator-pick li a { display: block; padding: .5em .7em; border-radius: 6px; text-decoration: none; font-weight: 600; color: var(--ink); }
.creator-pick li a:hover { background: var(--paper); }

/* Inside cover */
.page-endpaper {
  background:
    radial-gradient(circle at 20% 30%, rgba(226, 196, 107, .25) 0 8%, transparent 9%),
    radial-gradient(circle at 70% 65%, rgba(226, 196, 107, .2) 0 10%, transparent 11%),
    repeating-radial-gradient(circle at 30% 40%, #1C2A63 0 6px, #23336F 6px 9px, #2B3F8C 9px 13px, #1C2A63 13px 17px),
    var(--cobalt-deep);
  display: flex; align-items: center; justify-content: center;
}
.bookplate {
  background: var(--paper); color: var(--ink);
  width: 62%; padding: calc(var(--pg) * 9 / 100) calc(var(--pg) * 6 / 100); text-align: center;
  border: calc(var(--pg) * .6 / 100) solid var(--ink); outline: calc(var(--pg) * .4 / 100) solid var(--paper); outline-offset: calc(var(--pg) * -2.4 / 100);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transform: rotate(-2deg);
}
.bp-small { margin: 0; font-size: clamp(11px, calc(var(--pg) * 3.2 / 100), 16px); font-style: italic; color: var(--ink-soft); }
.bp-name { margin: .2em 0 0; font-size: clamp(30px, calc(var(--pg) * 13 / 100), 64px); font-weight: 600; font-style: italic; line-height: 1; }

.page-cover { background: var(--cobalt); }

/* ---------------- Reduced motion / no book: stacked pages ---------------- */
.pages-src { display: grid; gap: 2.5rem; justify-items: center; padding: 3rem 1.2rem 1rem; }
.pages-src > .page { width: min(560px, 100%); aspect-ratio: 0.72; border-radius: 4px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); overflow: hidden; }
.pages-src > .page-cover { border-radius: 2px 8px 8px 2px; }
.book-mode .pages-src { display: none; }

/* ---------------- Every guide ---------------- */
.wrap { max-width: 70rem; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }
.all { padding: clamp(5rem, 10vw, 8rem) 0 3rem; background: #fff; color: #1D1D1F; }
.all h2 { margin: 0; font-family: var(--serif); font-weight: 400; color: #1D1D1F; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -.03em; }
.all-intro { margin: .9rem 0 0; color: var(--grey); font-size: 1.2rem; max-width: 46ch; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 2rem; }
.chip {
  appearance: none; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .95rem; border-radius: 999px;
  border: 1px solid #D2D2D7; background: #fff; color: #1D1D1F;
}
.chip i { width: .7rem; height: .7rem; border-radius: 2px; background: var(--dot, var(--paper)); }
.chip[aria-pressed="true"] { background: #1D1D1F; color: #fff; border-color: #1D1D1F; }

.catalogue { display: grid; gap: 1.1rem; }
.card {
  display: grid; grid-template-columns: minmax(7.5rem, 11rem) 1fr;
  background: #F5F5F7; color: #1D1D1F;
  border-radius: 22px; overflow: hidden;
  font-family: var(--sans);
}
.card .cv {
  background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(255, 255, 255, .08) 14%, rgba(0, 0, 0, 0) 30%), var(--c);
  padding: 1.1rem 1rem; display: flex; flex-direction: column; justify-content: space-between;
  color: #FFF4D6; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); min-height: 11rem;
}
.card .cv strong { font-family: var(--serif); font-size: 1.7rem; line-height: 1; font-weight: 400; }
.card .cv small { font-family: var(--sans); font-size: .8rem; font-weight: 600; opacity: .85; }
.card .body { padding: clamp(1.1rem, 3vw, 1.6rem); }
.card h3 { margin: 0; font-family: var(--serif); font-size: 2.1rem; font-weight: 400; line-height: 1; letter-spacing: 0; }
.card .sub { margin: .3rem 0 0; font-weight: 600; color: var(--ink-soft); }
.card p { margin: .6rem 0 0; max-width: 60ch; }
.card .buyrow { margin-top: 1.1rem; }
.card .creator-pick ul { bottom: auto; top: calc(100% + .4em); }

.empty-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 2rem;
  padding: 1.1rem 1.4rem; border: 1px solid #E5E5EA; border-radius: 18px; background: #fff;
}
.empty-row .l { display: flex; align-items: center; gap: .9rem; }
.empty-row .mini { width: 12px; height: 2.4rem; border-radius: 2px; background: var(--c); flex: none; }
.empty-row strong { display: block; font-size: 1.1rem; }
.empty-row span { color: var(--grey); font-size: .92rem; }
.empty-row a { font-weight: 600; color: var(--blue); }

.footer { background: #F5F5F7; padding: 1.8rem 0 2.4rem; color: var(--grey); font-size: .9rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; }
.footer a { color: #1D1D1F; font-weight: 600; }

@media (max-width: 640px) {
  .wordmark span { display: none; }
  .card { grid-template-columns: 1fr; }
  .card .cv { min-height: 6rem; }
  .case { height: 62vh; }
}

/* Kinds of product */
.kinds { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: .55em; }
.kinds li { display: grid; grid-template-columns: 1.7em 1fr; gap: .7em; align-items: start; }
.kinds svg { width: 1.7em; height: 1.7em; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.kinds strong { display: block; font-family: var(--sans); font-weight: 700; }
.tag {
  display: inline-block; font-family: var(--sans); font-size: .78em; font-weight: 600;
  padding: .25em .7em; border-radius: 999px;
  background: rgba(43, 99, 255, .1); color: var(--blue-deep); margin-bottom: .5em;
}
.card .tag { margin: .5rem 0 0; }
.flat-hide { display: none; }
.book-mode .flat-hide { display: block; }
.page-endpaper:empty { display: block; }

/* ---------------- For creators page ---------------- */
.cr { background: #fff; color: #1D1D1F; }
.cr .topbar { position: sticky; }
.nav a[aria-current="page"] { color: #fff; }
.cr-hero {
  padding: clamp(6rem, 14vw, 11rem) 0 clamp(5rem, 11vw, 9rem); text-align: center; color: #fff;
  background:
    radial-gradient(ellipse 60% 60% at 50% 110%, rgba(43, 99, 255, .45), transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 10%, rgba(255, 200, 140, .14), transparent 70%),
    linear-gradient(#121514, #1A1F1D);
  margin-top: -3.6rem; padding-top: calc(clamp(6rem, 14vw, 11rem) + 3.6rem);
}
.cr-hero h1 { margin: 0 auto; font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 6.6vw, 5.6rem); line-height: 1; letter-spacing: -.01em; max-width: 16ch; }
.cr-lede { margin: 1.6rem auto 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: rgba(255, 255, 255, .76); max-width: 54ch; }
.cr-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.6rem; margin-top: 2.4rem; }
.cr .ink-btn { font-size: 1rem; padding: .8em 1.5em; }
.cr-link { font-weight: 600; color: #fff; text-underline-offset: .25em; }

.cr-sec { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.cr-sec h2, .cr-cta h2 { margin: 0 0 1.6rem; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.02; letter-spacing: -.01em; }
.cr-sec p { max-width: 62ch; color: var(--grey); font-size: 1.1rem; line-height: 1.6; }
.cr-sub { margin: -.8rem 0 2rem; }

.cr-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.cr-steps li { counter-increment: s; padding: 1.8rem 1.6rem; border-radius: 22px; background: #F5F5F7; }
.cr-steps li::before { content: counter(s); display: block; font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--blue); margin-bottom: 1rem; }
.cr-steps h3 { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 600; color: #1D1D1F; }
.cr-steps p { margin: 0; font-size: 1rem; }

.cr-paper { background: #F5F5F7; }
.cr-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.cr-card { background: #fff; border-radius: 22px; padding: 2rem 1.8rem; }
.cr-card h3 { margin: 0 0 .7rem; font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.05; }
.cr-card p { margin: 0; font-size: 1.05rem; }
.cr-note { margin: 1.8rem 0 0; color: #1D1D1F !important; font-weight: 500; }
.cr-narrow p { max-width: 60ch; }

.cr-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 3rem 5rem; }
.cr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.cr-list li { position: relative; padding-left: 1.9rem; color: #3A3A3F; line-height: 1.5; font-size: 1.05rem; }
.cr-list li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; }

.cr-timeline { list-style: none; margin: 0; padding: 0; counter-reset: t; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.cr-timeline::before { content: ""; position: absolute; left: 1.2rem; right: 1.2rem; top: 1.2rem; height: 2px; background: #E5E5EA; }
.cr-timeline li { counter-increment: t; position: relative; padding: 3.8rem 1.2rem 0 0; color: #3A3A3F; line-height: 1.45; }
.cr-timeline li::before {
  content: counter(t); position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: #1D1D1F; color: #fff; font-weight: 600;
}
@media (max-width: 760px) {
  .cr-timeline { grid-template-columns: 1fr; gap: 1.6rem; }
  .cr-timeline::before { left: 1.2rem; right: auto; top: 1rem; bottom: 1rem; width: 2px; height: auto; }
  .cr-timeline li { padding: .4rem 0 0 3.4rem; }
}

.cr-cta { padding: clamp(5rem, 10vw, 8rem) 0; text-align: center; color: #fff; background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(43, 99, 255, .45), transparent 70%), #121514; }
.cr-cta p { margin: 0 auto 2rem; max-width: 46ch; color: rgba(255, 255, 255, .76); font-size: 1.15rem; }
.cr-cta .cr-email { margin: 1.1rem auto 0; font-weight: 500; color: rgba(255, 255, 255, .7); }
@media (max-width: 480px) {
  .topbar { padding-left: 1rem; padding-right: 1rem; }
  .nav { gap: .85rem; font-size: .9rem; }
}

/* ---------------- Filmed shelf (scroll-scrubbed frames) ---------------- */
canvas.film { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.has-film canvas.film { display: block; }
.has-film .room { visibility: hidden; }
.film-spine {
  position: absolute; left: 0; top: 0; display: none;
  container-type: size; pointer-events: none;
  transform-origin: 0 0;
}
.has-film .film-spine { display: block; }
.spine-title, .film-spine .st {
  position: absolute; left: 0; right: 0; top: 37%; bottom: 9%;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--serif); font-weight: 400; font-size: 30cqw; line-height: 1;
  letter-spacing: .03em; white-space: nowrap;
  color: #D6B878;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .45), 0 0 1px rgba(255, 230, 170, .35);
}
.film-spine .st { opacity: .92; }
/* The closed book's spine, matched to the filmed one */
.has-film .b3-spine .spine-art {
  border-radius: 2px;
  background:
    linear-gradient(180deg, transparent 5.7%, #B79A68 5.7% 6.6%, transparent 6.6% 7.4%, #A08A70 7.4% 7.7%, transparent 7.7%),
    linear-gradient(180deg, transparent 31%, #A08A70 31% 31.4%, transparent 31.4% 32%, #B79A68 32% 33%, transparent 33%),
    linear-gradient(180deg, transparent 92.9%, #A08A70 92.9% 93.2%, transparent 93.2% 94%, #B79A68 94% 95%, transparent 95%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(90deg, #4A5D8F, #2C3F7A 14%, #26386A 50%, #1B2A58 85%, #111C47);
}
.has-film .b3-spine .spine-art::before, .has-film .b3-spine .spine-art::after { display: none; }
.has-film .b3-spine .spine-art .st { font-family: var(--serif); font-weight: 400; font-size: 30cqw; inset: 37% 0 9%; letter-spacing: .03em; color: #D6B878; text-shadow: 0 1px 0 rgba(0,0,0,.45); }

/* First-screen route to the shop */
.intro-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .8rem 1.2rem; margin-top: 1.8rem; pointer-events: auto; text-shadow: none; }
.intro-cta .pill { display: inline-block; padding: .78rem 1.6rem; font-size: 1rem; font-weight: 600; color: #fff; background: var(--blue); border-radius: 999px; text-decoration: none; }
.intro-cta .pill:hover { background: var(--blue-deep); }
.intro-new { display: inline-flex; align-items: center; gap: .55rem; padding: .5rem 1rem .5rem .55rem; border-radius: 999px;
  background: rgba(20, 22, 21, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .18); color: #fff; text-decoration: none; font-size: .95rem; font-weight: 500; }
.intro-new span { background: var(--gold); color: #1d1d1f; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; }
.intro-new:hover { border-color: rgba(255, 255, 255, .45); }
.want-next { margin: 1.6rem 0 0; color: var(--grey); font-size: .98rem; }
.want-next a { color: var(--blue); }
.card { scroll-margin-top: 90px; }
/* Privacy page */
.legal { max-width: 46rem; }
.legal h2 { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; margin: 2.6rem 0 .8rem !important; }
.legal p, .legal li { color: #3a3a3c; font-size: 1.02rem; line-height: 1.65; max-width: none; }
.legal ul { padding-left: 1.2rem; }
.kinds li div { line-height: 1.42; }
