/* The Hidden Ladder — colours and type are taken from the KDP covers:
   a dark corporate atrium, cream serif title, steel-blue subtitle, gold rungs. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #070b11;
  --bg-2: #0b111a;
  --panel: #0f1722;
  --panel-2: #142030;
  --line: rgba(201, 214, 230, .10);
  --line-2: rgba(201, 214, 230, .20);
  --ink: #f4efe6;
  --ink-2: #cdd4de;
  --dim: #8f9cad;
  --steel: #7c9cba;
  --gold: #e2b35a;
  --gold-2: #f0cd85;
  --paper: #f3ede1;
  --paper-ink: #1f2631;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
  --radius: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.pull p, .band-quote, .section-lede { text-wrap: pretty; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.nowrap { white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: #111; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.eyebrow {
  font: 600 .78rem/1.2 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

/* ───────────────────────────── buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #10141b; box-shadow: 0 8px 28px -10px rgba(226, 179, 90, .55); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--steel); background: rgba(124, 156, 186, .08); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; }
.btn .apple { fill: currentColor; }

/* ───────────────────────────── nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 17, .78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 1.25rem; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand-mark { display: inline-grid; gap: 4px; width: 18px; }
.brand-mark i { display: block; height: 2px; border-radius: 2px; background: #96a5b6; }
.brand-mark i:last-child { background: var(--gold); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--dim); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }
.nav-row .btn { flex: none; white-space: nowrap; }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-row .btn { margin-left: auto; }
}
@media (max-width: 400px) {
  .nav-row { gap: 12px; }
  .brand { font-size: 1.05rem; gap: 9px; }
  .nav-row .btn { padding: 0 13px; font-size: .85rem; }
}

/* ───────────────────────────── ladder rail: one rung per section */
.rail {
  position: fixed; right: 26px; top: 50%; z-index: 40;
  transform: translateY(-50%);
  display: none; flex-direction: column; align-items: flex-end; gap: 16px;
}
.rail a {
  position: relative; display: block;
  width: 22px; height: 3px; border-radius: 2px;
  background: rgba(150, 165, 182, .32);
  transition: width .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.rail a::before { content: ""; position: absolute; inset: -7px -6px; }
.rail a:hover, .rail a:focus-visible { background: var(--ink-2); }
.rail a.on { width: 32px; background: var(--gold); box-shadow: 0 0 14px rgba(226, 179, 90, .55); }
.rail span {
  position: absolute; right: calc(100% + 14px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: .78rem; color: var(--ink);
  background: rgba(15, 23, 34, .95); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }
@media (min-width: 1300px) { .rail { display: flex; } }

/* ───────────────────────────── hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 9vw, 112px);
  background:
    radial-gradient(900px 600px at 78% 8%, rgba(54, 82, 118, .38), transparent 62%),
    radial-gradient(700px 500px at 0% 100%, rgba(28, 42, 62, .55), transparent 70%),
    var(--bg);
}
/* the diagonal shaft of light from the cover */
.beam {
  position: absolute; inset: -20% -10% auto auto; width: 90%; height: 140%;
  background: linear-gradient(112deg, transparent 42%, rgba(190, 210, 235, .07) 50%, rgba(190, 210, 235, .02) 58%, transparent 64%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(3.4rem, 8.4vw, 6.8rem); line-height: .94; letter-spacing: -.02em; }
.hero-sub { font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--steel); margin: 22px 0 18px; letter-spacing: .01em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 32em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 30px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--dim); }
.facts li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: rgba(255, 255, 255, .02); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .stage { order: -1; }
}

/* ───────────────────────────── 3D book: the paperback wrap folded around a block of pages */
.stage { margin: 0; display: grid; justify-items: center; gap: 30px; }
.book-scene {
  --w: clamp(210px, 25vw, 320px);
  --h: calc(var(--w) * 1.5);
  --d: calc(var(--w) * .0803); /* 214 pages ≈ 0.48 in on a 6 in cover */
  position: relative;
  width: var(--w); height: var(--h);
  perspective: 1800px;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
}
.book-scene.dragging { cursor: grabbing; }
.book-scene::after {
  content: ""; position: absolute; left: -14%; right: -6%; bottom: -34px; height: 40px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .75), transparent);
  filter: blur(4px);
  z-index: -1;
}
.book {
  --ry: 28deg;
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(5deg) rotateY(calc(var(--ry) + var(--hover, 0deg)));
  transition: transform 1s cubic-bezier(.2, .75, .2, 1);
}
.book-scene:hover { --hover: -10deg; }
.book-scene.dragging { --hover: 0deg; }
.book-scene.dragging .book { transition: none; }
.face { position: absolute; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.front, .back { inset: 0; overflow: hidden; }
.front { transform: translateZ(calc(var(--d) / 2)); border-radius: 1px 3px 3px 1px; }
.front::after { /* hinge crease */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .45), rgba(255, 255, 255, .08) 1.6%, transparent 4.5%, transparent 92%, rgba(255, 255, 255, .05));
}
.back { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); border-radius: 3px 1px 1px 3px; }
.spine { top: 0; height: 100%; width: var(--d); left: calc(50% - var(--d) / 2); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.edge { background-color: #e9e3d5; }
.edge-right {
  top: 1%; height: 98%; width: var(--d); left: calc(50% - var(--d) / 2);
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 3px));
  background-image: repeating-linear-gradient(90deg, #efe9dc 0 1px, #d2cbbb 1px 2px);
}
.edge-top, .edge-bottom {
  left: 0; width: calc(100% - 3px); height: var(--d); top: calc(50% - var(--d) / 2);
  background-image: repeating-linear-gradient(0deg, #efe9dc 0 1px, #d2cbbb 1px 2px);
}
.edge-top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 2px)); }
.edge-bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - 2px)); }
.book-flat { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.stage figcaption { display: flex; align-items: center; gap: 14px; font-size: .88rem; color: var(--dim); }
.turn {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line-2); color: var(--ink-2);
  border-radius: 999px; padding: 8px 14px; font: inherit; cursor: pointer;
}
.turn:hover { border-color: var(--steel); color: var(--ink); }
.turn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ───────────────────────────── sections */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg) 85%); border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.section-lede { font-size: 1.18rem; color: var(--ink-2); margin-top: 18px; }

/* two rulebooks */
.rulebooks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rulebook { border-radius: var(--radius); padding: clamp(26px, 3.5vw, 40px); border: 1px solid var(--line); }
.rulebook h3 { font-size: 1.8rem; margin-bottom: 20px; }
.rulebook ul { list-style: none; display: grid; gap: 12px; }
.rulebook li { position: relative; padding-left: 30px; }
.rulebook li::before { content: ""; position: absolute; left: 0; top: .78em; width: 16px; height: 2px; border-radius: 2px; background: currentColor; opacity: .5; }
.rb-tag { font: 600 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; }
.official { background: var(--panel); color: var(--dim); }
.official .rb-tag { color: var(--dim); }
.official h3 { color: var(--ink-2); }
.real {
  background:
    linear-gradient(160deg, rgba(226, 179, 90, .10), transparent 45%),
    var(--panel-2);
  border-color: rgba(226, 179, 90, .35);
  color: var(--ink);
  box-shadow: 0 30px 80px -40px rgba(226, 179, 90, .35);
}
.real .rb-tag { color: var(--gold); }
.real li::before { background: var(--gold); opacity: 1; }
@media (max-width: 760px) { .rulebooks { grid-template-columns: 1fr; } }

.pull { margin: clamp(48px, 7vw, 80px) auto 0; max-width: 820px; text-align: center; }
.pull p { font: italic 400 clamp(1.6rem, 3.4vw, 2.5rem)/1.25 var(--serif); color: var(--ink); margin: 0; }
.pull p::before { content: ""; display: block; width: 44px; height: 3px; margin: 0 auto 26px; border-radius: 2px; background: var(--gold); }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px 24px;
  transition: border-color .25s ease;
}
.pillar:hover { border-color: rgba(124, 156, 186, .45); }
.pillar svg { width: 34px; height: 34px; fill: none; stroke: var(--steel); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.pillar h3 { font-size: 1.5rem; margin-bottom: 10px; }
.pillar p { color: var(--ink-2); flex: 1; }
.ch { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 960px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .pillars { grid-template-columns: 1fr; } }

/* stay / move / leave */
.decide-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .decide-grid { grid-template-columns: 1fr; } }
.dials { display: grid; gap: 14px; }
.dial {
  display: grid; grid-template-columns: 1fr 44px; align-items: center; gap: 6px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
}
.dial label { grid-column: 1 / -1; font-weight: 600; color: var(--ink); }
.dial small { display: block; font-weight: 400; color: var(--dim); font-size: .9rem; margin-top: 2px; }
.dial output {
  justify-self: end; width: 40px; height: 40px; display: grid; place-items: center;
  font: 400 1.4rem/1 var(--serif); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 50%;
}
.dial input[type="range"] {
  --p: 50%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer;
}
.dial input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) var(--p), rgba(150, 165, 182, .25) var(--p));
}
.dial input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(150, 165, 182, .25); }
.dial input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--gold); }
.dial input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -9px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--gold); box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.dial input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--gold); box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.dial.low output { border-color: rgba(226, 120, 90, .7); color: #f1a48c; }

.verdict {
  position: sticky; top: 92px;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(124, 156, 186, .16), transparent 70%),
    var(--panel-2);
  border: 1px solid var(--line-2); border-radius: 20px;
  padding: clamp(24px, 3.5vw, 36px);
}
.signs { display: grid; gap: 8px; margin-bottom: 26px; }
.signs span {
  justify-self: start;
  font: 600 .95rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  padding: 12px 34px 12px 18px;
  background: rgba(150, 165, 182, .08); color: var(--dim);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
  transition: background-color .35s ease, color .35s ease;
}
.signs span:nth-child(2) { margin-left: 18px; }
.signs span:nth-child(3) { margin-left: 36px; }
.signs span.on { background: var(--gold); color: #10141b; }
.verdict-label { font-size: .85rem; color: var(--dim); margin: 0 0 6px; }
.verdict-title { font: 400 clamp(1.9rem, 3.2vw, 2.4rem)/1.1 var(--serif); color: var(--ink); margin: 0 0 12px; }
.verdict-text { color: var(--ink-2); }
.patterns { list-style: none; display: grid; gap: 8px; margin: 4px 0 18px; }
.patterns:empty { display: none; }
.patterns li { position: relative; padding: 10px 14px 10px 36px; border-radius: 10px; background: rgba(226, 120, 90, .08); color: var(--ink-2); font-size: .95rem; }
.patterns li::before { content: "!"; position: absolute; left: 13px; top: 10px; font-weight: 700; color: #f1a48c; }
.verdict-foot { font-size: .9rem; color: var(--dim); border-top: 1px solid var(--line); padding-top: 16px; margin: 0; }

/* inside the book */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 0 36px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { background: var(--bg-2); padding: 22px 24px; }
.stats dt { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.stats dd { margin: 6px 0 0; font: 400 2.6rem/1 var(--serif); color: var(--ink); }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr 1fr; } }

.parts { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.part { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; }
.part-no { font: 600 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.part h3 { font-size: 1.35rem; margin-bottom: 14px; }
.part ol { padding-left: 1.6em; display: grid; gap: 8px; font-size: .93rem; color: var(--ink-2); }
.part ol li::marker { color: var(--steel); font-variant-numeric: tabular-nums; }
@media (max-width: 1040px) { .parts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .parts { grid-template-columns: 1fr; } }

.levels { margin-top: 56px; }
.levels-title { font-size: 1.7rem; margin-bottom: 20px; }
.levels ul { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-left: 1px solid var(--line); }
.levels li { padding: 4px 22px 4px; border-right: 1px solid var(--line); position: relative; }
.levels li::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 2px; background: rgba(150, 165, 182, .4); margin-bottom: 16px; }
.levels li:last-child::before { background: var(--gold); }
.levels strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.levels span { color: var(--dim); font-size: .95rem; }
@media (max-width: 860px) {
  .levels ul { grid-template-columns: 1fr 1fr; row-gap: 26px; }
}
@media (max-width: 480px) {
  .levels ul { grid-template-columns: 1fr; border-left: 0; }
  .levels li { border-right: 0; padding: 0; }
}

/* excerpt */
.excerpt-wrap { display: grid; justify-items: center; }
.excerpt-wrap .section-head { text-align: center; }
.page {
  position: relative;
  max-width: 700px; width: 100%;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .06), transparent 4%),
    var(--paper);
  color: var(--paper-ink);
  font: 400 1.17rem/1.72 var(--serif);
  padding: clamp(32px, 7vw, 72px) clamp(24px, 7vw, 76px);
  border-radius: 4px;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .04);
}
.page p { margin: 0 0 1.05em; }
.dropcap::first-letter { float: left; font-size: 4.3em; line-height: .82; padding: .06em .1em 0 0; color: #8a6420; }
.page-end { font-style: italic; }
.folio { margin: 2em 0 0 !important; font: 600 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #7a6f5d; }
.excerpt-cta { margin-top: 40px; }

/* quote band */
.band {
  padding: clamp(64px, 9vw, 112px) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background:
    linear-gradient(112deg, transparent 30%, rgba(190, 210, 235, .06) 50%, transparent 70%),
    radial-gradient(800px 300px at 50% 50%, rgba(36, 56, 82, .5), transparent 70%),
    var(--bg);
  text-align: center;
}
.band-quote { max-width: 900px; margin: 0 auto; font: 400 clamp(1.8rem, 4vw, 3.1rem)/1.2 var(--serif); color: var(--ink); }
.band-quote em { color: var(--gold-2); }

/* author */
.author { display: grid; grid-template-columns: 200px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; max-width: 980px; }
.author-photo {
  width: 200px; height: 200px; object-fit: cover; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-2), 0 0 0 8px rgba(124, 156, 186, .08);
  filter: saturate(.85);
}
.author h2 { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: 22px; }
.questions { list-style: none; display: grid; gap: 8px; margin-top: 6px; }
.questions li { font: italic 400 1.22rem/1.4 var(--serif); color: var(--ink); padding-left: 18px; border-left: 2px solid rgba(226, 179, 90, .5); }
@media (max-width: 720px) {
  .author { grid-template-columns: 1fr; }
  .author-photo { width: 132px; height: 132px; }
}

/* companion app */
.companion {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(26px, 4vw, 40px);
}
.companion h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.companion p:last-child { margin: 0; max-width: 46em; }
.companion .btn { flex: none; }
@media (max-width: 760px) { .companion { flex-direction: column; align-items: flex-start; } }

/* buy */
.store-pick { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -12px 0 40px; font-size: .92rem; color: var(--dim); }
.store-pick select {
  font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px;
}
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.format {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 36px 26px 28px;
}
.format h3 { font-size: 1.8rem; margin-top: 28px; }
.spec { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 8px 0 12px; }
.format p:not(.spec) { color: var(--ink-2); font-size: .97rem; flex: 1; }
.format .btn { width: 100%; margin-top: 8px; }
.cover { height: 300px; display: flex; align-items: flex-end; justify-content: center; }
.cover img { width: auto; max-height: 100%; }
.cover-kindle img {
  height: 262px; border-radius: 6px;
  outline: 10px solid #121820; outline-offset: 0;
  box-shadow: 0 0 0 11px #2a3442, 0 30px 50px -18px rgba(0, 0, 0, .9);
}
.cover-paper img {
  height: 276px; border-radius: 1px 3px 3px 1px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 6px 6px 0 -1px #e7e1d3, 0 30px 50px -18px rgba(0, 0, 0, .9);
}
.cover-hard img {
  height: 290px; border-radius: 2px 5px 5px 2px;
  box-shadow: 0 0 0 3px #11161d, 7px 7px 0 -1px #e7e1d3, 7px 7px 0 2px #11161d, 0 30px 50px -18px rgba(0, 0, 0, .9);
}
@media (max-width: 900px) {
  .formats { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
}

/* footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: .9rem; color: var(--dim); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.footer-row p { margin: 0; }
.footer-links { margin-left: auto !important; display: flex; gap: 22px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* 404 */
.lost { min-height: 100vh; display: flex; align-items: center; }
.lost h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 12em; margin-bottom: 22px; }

/* ───────────────────────────── motion */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rulebook, .pillar, .part, .format, .dial, .page, .levels li, .pull, .companion {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .book, .btn, .pillar, .rail a, .signs span { transition: none !important; }
}
