/* The Wheel of Clarity, v3. One stylesheet for every page.
   Concept: the quiet hour. The page is the evening room, the book's words sit on lit pages,
   and the 13-point wheel from the cover is the one drawn line that ties it together. */

/* ---------- Fonts: self-hosted (SIL Open Font License, see fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url("fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  /* primitives */
  --night: #0e1729;      /* the evening room, page ground */
  --dusk: #17243d;       /* raised bands and panels */
  --starlight: #f2ede3;  /* text on night, and the lit page */
  --haze: #b3bccb;       /* secondary text on night (9.3:1) */
  --dawn: #f2b38c;       /* the one accent: buy buttons, active law, focus */
  --dawn-hover: #f7c7a8;
  --ink: #172038;        /* text on the lit page (13.8:1) */
  --ink-soft: #4d556a;   /* secondary text on the lit page (6.4:1) */

  /* semantic */
  --color-bg: var(--night);
  --color-raised: var(--dusk);
  --color-text: var(--starlight);
  --color-muted: var(--haze);
  --color-accent: var(--dawn);
  --color-rule: #2c3b58;          /* decorative dividers only */
  --color-edge: #7d8aa3;          /* field and control edges on night (3:1+) */
  --color-danger-on-night: #ffb4a8;
  --color-danger-on-paper: #a3271b;

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  /* type scale, ratio 1.25 on an 18px body */
  --fs-small: 1rem;       /* 16 */
  --fs-0: 1.125rem;       /* 18 */
  --fs-1: 1.406rem;       /* 22.5 */
  --fs-2: 1.758rem;       /* 28 */
  --fs-3: 2.197rem;       /* 35 */
  --fs-4: 2.747rem;       /* 44 */
  --fs-5: 3.433rem;       /* 55 */
  --fs-6: 4.291rem;       /* 69 */

  /* spacing, 8 based */
  --s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem; --s-5: 3rem; --s-6: 4rem; --s-7: 6rem; --s-8: 8rem;

  --radius: 6px;          /* one rule: every control and every surface */
  --header-h: 68px;
  --banner-h: 0px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scroll-padding-bottom: calc(var(--banner-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-0);
  line-height: 1.65;
  overflow-x: clip;
  padding-bottom: var(--banner-h);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
  font-optical-sizing: auto;
}
p, li, dd { text-wrap: pretty; }
p { margin: 0 0 var(--s-2); }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
blockquote { margin: 0; }
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-paper :focus-visible { outline-color: var(--ink); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--dawn); color: var(--night); padding: 12px 18px;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0.75rem 1.5rem;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: var(--fs-0); line-height: 1.2;
  text-decoration: none; cursor: pointer; text-align: center;
  transition-property: background-color, border-color, color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--dawn); color: var(--night); }
.btn-primary:hover { background: var(--dawn-hover); }
.btn-quiet { background: transparent; color: var(--starlight); border-color: var(--color-edge); }
.btn-quiet:hover { border-color: var(--starlight); background: rgb(242 237 227 / 0.06); }
.btn-ink { background: var(--ink); color: var(--starlight); }
.btn-ink:hover { background: #26324f; }
.btn-small { min-height: 44px; padding: 0.5rem 1.1rem; font-size: var(--fs-small); }
@media (prefers-reduced-motion: no-preference) {
  .btn:not(:disabled):active { scale: 0.97; transition-timing-function: var(--ease-out); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--night);
  border-bottom: 1px solid var(--color-rule);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--s-3);
}
@media (max-width: 959px) { .site-header .wrap { gap: 10px; } }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--starlight);
  font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.01em;
  margin-right: auto; min-height: 44px;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-name, .header-buy { white-space: nowrap; }
.site-nav ul { display: flex; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--haze); text-decoration: none; font-size: var(--fs-small);
  padding-block: 10px;
}
.site-nav a:hover { color: var(--starlight); text-decoration: underline; }
.label-short { display: none; }
.menu-button {
  display: none; flex: none; width: 44px; height: 44px; padding: 0;
  place-items: center; background: transparent; color: var(--starlight);
  border: 1px solid var(--color-edge); border-radius: var(--radius); cursor: pointer;
}
.menu-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.menu-button svg path { transform-box: fill-box; transform-origin: center; }
.menu-button[aria-expanded="true"] .l1 { translate: 0 5px; rotate: 45deg; }
.menu-button[aria-expanded="true"] .l2 { opacity: 0; }
.menu-button[aria-expanded="true"] .l3 { translate: 0 -5px; rotate: -45deg; }
@media (prefers-reduced-motion: no-preference) {
  .menu-button svg path { transition: translate 200ms var(--ease-out), rotate 200ms var(--ease-out), opacity 150ms ease; }
}
.mobile-menu { border-top: 1px solid var(--color-rule); background: var(--night); }
.mobile-menu[hidden] { display: none; }
.site-header .mobile-menu ul { display: block; height: auto; list-style: none; margin: 0 auto; padding-block: 8px 16px; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 48px;
  color: var(--starlight); text-decoration: none; font-family: var(--font-display); font-size: var(--fs-1);
  border-bottom: 1px solid var(--color-rule);
}
.mobile-menu a:hover { color: var(--dawn); }
@media (max-width: 959px) {
  .site-nav { display: none; }
  .menu-button { display: grid; }
}
@media (min-width: 960px) { .mobile-menu { display: none !important; } }
@media (max-width: 599px) {
  .label-long { display: none; }
  .label-short { display: inline; }
  .site-header .btn-small { padding-inline: 0.85rem; }
}
@media (max-width: 399px) {
  .site-header .wrap { padding-inline: 16px; gap: 8px; }
  .brand { font-size: 1.05rem; }
  .site-header .wrap > .brand svg { display: none; }
  .site-header .btn-small { padding-inline: 0.75rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(2rem, 4vw, 3rem) clamp(1rem, 2.5vw, 2rem); }
.hero .wrap {
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}
.hero h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.4vw, var(--fs-6));
  font-weight: 350;
  letter-spacing: -0.015em;
  line-height: 1.04;
  max-width: 12ch;
}
.hero-sub {
  font-size: var(--fs-1); line-height: 1.5; color: var(--haze);
  max-width: 30ch; margin-top: var(--s-3); margin-bottom: var(--s-4);
}
@media (max-width: 599px) {
  .hero { padding-top: var(--s-4); }
  .hero .wrap { grid-template-areas: "title" "sub" "actions" "note" "orbit"; row-gap: 0; }
  .hero-copy { display: contents; }
  .hero h1 { grid-area: title; max-width: none; }
  .hero-sub { grid-area: sub; font-size: var(--fs-0); line-height: 1.5; max-width: 34ch; margin: var(--s-3) 0; }
  .hero .actions { grid-area: actions; }
  .orbit { grid-area: orbit; width: 100%; max-width: 380px; margin: var(--s-2) auto 0; }
  .hero .orbit .cover-img { width: 62%; }
  .hero .hero-note { grid-area: note; margin-top: var(--s-2); }
}
@media (min-width: 600px) and (max-width: 959px) {
  .hero { padding-top: var(--s-6); }
  .hero h1 { max-width: 16ch; }
  .hero-sub { max-width: 36ch; }
  .hero .wrap { gap: var(--s-4); }
  .orbit { width: min(100%, 560px); }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: var(--s-2); color: var(--haze); font-size: var(--fs-small); }
@media (max-width: 479px) { .hero .actions .btn { width: 100%; } }

.orbit { position: relative; aspect-ratio: 1; width: min(100%, 640px); margin-inline: auto; }
@media (min-width: 960px) { .orbit { width: 118%; max-width: 760px; margin-left: -4%; } }
.orbit-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit-lines line, .orbit-lines circle {
  fill: none; stroke: var(--starlight); stroke-width: 1; vector-effect: non-scaling-stroke;
}
.orbit-lines line { stroke-opacity: 0.2; }
.orbit-lines .ring { stroke-opacity: 0.32; }
.orbit-lines .ring-inner { stroke-opacity: 0.12; }
.orbit .cover-img {
  position: absolute; left: 50%; top: 50%; width: 46%; height: auto; translate: -50% -50%;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.3), 0 30px 60px -20px rgb(0 0 0 / 0.75);
  outline: 1px solid rgb(255 255 255 / 0.1); outline-offset: -1px;
}

@media (prefers-reduced-motion: no-preference) {
  .js .orbit-lines line, .js .orbit-lines .ring {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: draw 1100ms var(--ease-in-out) both;
    animation-delay: calc(500ms + var(--i, 0) * 120ms);
  }
  .js .orbit-lines .ring { animation-duration: 1600ms; animation-delay: 150ms; }
  .js .orbit .cover-img { animation: settle 900ms var(--ease-out) both; animation-delay: 100ms; }
}
@media (prefers-reduced-motion: reduce) {
  .js .orbit .cover-img { animation: fade 400ms ease both; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes settle { from { opacity: 0; scale: 0.96; } to { opacity: 1; scale: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }


/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, var(--s-7)); }
.section-head { max-width: 46rem; margin-bottom: var(--s-5); }
.section h2 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, var(--fs-5)); letter-spacing: -0.01em; }
.lead { font-size: var(--fs-1); line-height: 1.55; color: var(--haze); margin-top: var(--s-3); max-width: 38ch; }
.band { background: var(--color-raised); }

/* The lit page: where the book's own words sit */
.page {
  background: var(--starlight); color: var(--ink);
  border-radius: var(--radius);
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.4) inset, 0 40px 90px -30px rgb(0 0 0 / 0.65);
  padding: clamp(1.75rem, 5vw, 5rem);
}
.page .lead, .page .muted { color: var(--ink-soft); }
.source { font-size: var(--fs-small); color: var(--haze); margin-top: var(--s-2); font-style: normal; }
.page .source { color: var(--ink-soft); }

/* In-flow buy and preview prompt */
.prompt {
  display: grid; gap: var(--s-3); align-items: center;
  margin-top: var(--s-6); padding-block: var(--s-4);
  border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule);
}
@media (min-width: 900px) { .prompt { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); } }
.prompt-text { margin: 0; font-family: var(--font-display); font-size: var(--fs-1); line-height: 1.4; max-width: 34ch; }
.laws-text .prompt { grid-template-columns: 1fr; margin-top: var(--s-5); }
@media (max-width: 479px) { .prompt .btn { width: 100%; } }

/* ---------- Recognise ---------- */
.recognise .page { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .recognise .page { grid-template-columns: 5fr 6fr; gap: var(--s-6); } }
.recognise h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, var(--fs-4)); }
.recognise .pull {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: var(--fs-2); line-height: 1.3; margin-top: var(--s-4);
  padding-left: var(--s-3); border-left: 2px solid var(--ink);
}
.audit { border: 0; margin: 0; padding: 0; min-width: 0; }
.audit legend { font-weight: 600; font-size: var(--fs-0); margin-bottom: var(--s-1); padding: 0; }
.audit-hint { color: var(--ink-soft); font-size: var(--fs-small); margin-bottom: var(--s-2); }
.audit ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid #cfc7b8; }
.audit li { border-bottom: 1px solid #cfc7b8; }
.audit label {
  display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start;
  padding: 16px 4px; cursor: pointer; font-size: var(--fs-0); line-height: 1.5;
}
.audit input {
  width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer;
}
.audit-answer {
  margin-top: var(--s-3); padding: var(--s-3);
  background: #e7e0d2; border-radius: var(--radius);
  font-family: var(--font-display); font-size: var(--fs-1); line-height: 1.4;
}
.audit-answer p { margin: 0; }
.audit-answer .source { font-family: var(--font-body); margin-top: var(--s-1); }

/* ---------- Promise ---------- */
.promise-grid { display: grid; gap: var(--s-5); }
@media (min-width: 960px) { .promise-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6); align-items: start; } }
.promise-quote {
  font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: clamp(1.6rem, 1.1rem + 1.9vw, var(--fs-4)); line-height: 1.22;
  max-width: 30ch; margin-top: var(--s-4);
}
.promise-side > p { color: var(--haze); max-width: 42ch; }
@media (min-width: 960px) { .promise-side { padding-top: var(--s-2); } }
.is-isnt { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
@media (min-width: 600px) and (max-width: 959px) { .is-isnt { grid-template-columns: 1fr 1fr; } }
.is-isnt h3 { font-size: var(--fs-1); margin-bottom: var(--s-1); }
.is-isnt ul { list-style: none; margin: 0; padding: 0; }
.is-isnt li { padding: 10px 0 10px 28px; border-top: 1px solid var(--color-rule); position: relative; }
.is-isnt li::before {
  content: ""; position: absolute; left: 2px; top: 1.2em; width: 12px; height: 1px; background: var(--haze);
}
.is-isnt .is li::before { background: var(--dawn); height: 2px; }

/* ---------- The laws ---------- */
.laws-grid { display: grid; gap: var(--s-5); }
.wheel-wrap { position: relative; width: min(100%, 520px); margin-inline: auto; }
.laws-side .section-head { margin-bottom: var(--s-4); }
@media (min-width: 960px) {
  .laws-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-6); align-items: stretch; }
  .wheel-wrap { position: sticky; top: calc(var(--header-h) + 24px); width: min(100%, 460px); margin-inline: 0; }
}

.wheel { width: 100%; height: auto; overflow: visible; }
.wheel .rot {
  transform-box: fill-box; transform-origin: center;
  rotate: var(--rot, 0deg);
}
@media (prefers-reduced-motion: no-preference) {
  .wheel .rot { transition: rotate 450ms var(--ease-in-out); }
  .wheel .node text { transition: rotate 450ms var(--ease-in-out); }
}
.wheel .hub { fill: var(--dusk); stroke: var(--color-rule); stroke-width: 1; }
.wheel .bounds { fill: none; stroke: none; }
.wheel .track { fill: none; stroke: var(--color-rule); stroke-width: 1; }
.wheel .star { fill: none; stroke: var(--starlight); stroke-opacity: 0.18; stroke-width: 1; }
.wheel .arc { fill: none; stroke: #4a5a78; stroke-width: 3; stroke-linecap: round; transition: stroke 200ms ease; }
.wheel .arc.is-active { stroke: var(--dawn); }
.wheel .node { cursor: pointer; }
.wheel .node circle { fill: var(--dusk); stroke: #6c7a94; stroke-width: 1.5; transition: fill 200ms ease, stroke 200ms ease; }
.wheel .node text {
  fill: var(--haze); font-family: var(--font-body); font-size: 19px; font-weight: 600;
  text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums;
  transform-box: fill-box; transform-origin: center; rotate: calc(-1 * var(--rot, 0deg));
  pointer-events: none;
}
.wheel .node.is-active circle { fill: var(--dawn); stroke: var(--dawn); }
.wheel .node.is-active text { fill: var(--night); }
.wheel-center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  pointer-events: none; padding: 0 33%;
}
.wheel-center .wc-num { color: var(--haze); font-size: var(--fs-small); }
.wheel-center .wc-name { font-family: var(--font-display); font-size: clamp(1.3rem, 1rem + 1vw, var(--fs-2)); line-height: 1.15; margin-top: 4px; }
.wheel-center .wc-move { color: var(--dawn); font-size: var(--fs-small); margin-top: 6px; }

.movement + .movement { margin-top: var(--s-4); }
.movement h3 { font-size: var(--fs-2); }
.movement-line { color: var(--haze); font-family: var(--font-display); font-style: italic; font-size: var(--fs-1); line-height: 1.4; margin-top: 6px; max-width: 34ch; }
.law-list { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.law {
  display: grid; grid-template-columns: 3rem 1fr; gap: 0 var(--s-2);
  padding: 12px 0; border-top: 1px solid var(--color-rule);
  transition: border-color 200ms ease;
}
.law-num {
  font-family: var(--font-display); font-size: var(--fs-2); line-height: 1; color: var(--haze);
  font-variant-numeric: tabular-nums lining-nums; padding-top: 2px; transition: color 200ms ease;
}
.law h4 { font-size: var(--fs-1); font-weight: 400; }
.law-sub { font-family: var(--font-display); font-style: italic; color: var(--haze); margin: 0 0 4px; }
.law p:last-child { margin: 0; line-height: 1.55; }
.law.is-active .law-num { color: var(--dawn); }
.law.is-active { border-top-color: var(--dawn); }

/* ---------- Bundle ---------- */
.bundle-grid { display: grid; gap: var(--s-5); }
@media (min-width: 960px) {
  .bundle-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s-6); align-items: start; }
  .spread { align-self: center; }
}
.bundle-items { list-style: none; margin: 0; padding: 0; }
.item-row {
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--s-4); align-items: start;
  padding-block: var(--s-4); border-top: 1px solid var(--color-rule);
}
.item-row:first-child { padding-top: 0; border-top: 0; }
@media (max-width: 459px) { .item-row { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-3); } }
.item-row h3 { font-size: var(--fs-2); }
.item-row p { color: var(--haze); margin-top: var(--s-1); }
.thumb {
  width: 100%; height: auto; border-radius: 2px;
  box-shadow: 0 18px 36px -16px rgb(0 0 0 / 0.8);
  outline: 1px solid rgb(255 255 255 / 0.1); outline-offset: -1px;
}
/* the audiobook: a square cut from the real cover art (the star), labelled */
.audio-tile {
  position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden;
  background: #16223f url("img/book-cover-360.webp") 50% 83% / 115% auto no-repeat;
  box-shadow: 0 18px 36px -16px rgb(0 0 0 / 0.8);
  outline: 1px solid rgb(255 255 255 / 0.1); outline-offset: -1px;
}
.audio-tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 4px 7px; text-align: center;
  background: rgb(14 23 41 / 0.92); color: var(--starlight);
  font-family: var(--font-display); font-size: var(--fs-small); letter-spacing: 0.02em;
}
.steps { list-style: none; margin: var(--s-2) 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; padding: 8px 0; border-top: 1px solid var(--color-rule); color: var(--starlight); }
.steps li::before { content: counter(step); font-family: var(--font-display); color: var(--dawn); font-size: var(--fs-1); line-height: 1.2; }
.grace {
  font-family: var(--font-display); font-style: italic; font-size: var(--fs-1); line-height: 1.4;
  color: var(--starlight); margin-top: var(--s-3);
}
.spread { margin: 0; }
.spread-pages {
  display: grid; grid-template-columns: 1fr 1fr; max-width: 600px;
  border-radius: 3px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.8);
  outline: 1px solid rgb(255 255 255 / 0.1); outline-offset: -1px;
  position: relative;
}
.spread-pages::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 36px; translate: -50% 0;
  background: linear-gradient(90deg, transparent, rgb(0 0 0 / 0.12) 45%, rgb(0 0 0 / 0.2) 50%, rgb(0 0 0 / 0.12) 55%, transparent);
  pointer-events: none;
}
.spread img { width: 100%; height: auto; display: block; }
.spread figcaption { color: var(--haze); font-size: var(--fs-small); margin-top: var(--s-2); }

/* ---------- Author ---------- */
.author-grid { display: grid; gap: var(--s-5); align-items: start; }
@media (min-width: 600px) { .author-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-4); } }
@media (min-width: 900px) { .author-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); } }
.author-photo {
  width: 100%; height: auto; max-width: 460px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: var(--radius);
  outline: 1px solid rgb(255 255 255 / 0.1); outline-offset: -1px;
}
.author-story { margin-top: var(--s-3); max-width: 46ch; }
.author-story p { color: var(--haze); }
.author-peer {
  font-family: var(--font-display); font-size: var(--fs-1); line-height: 1.45; color: var(--starlight);
  max-width: 34ch; margin-top: var(--s-3); padding-left: var(--s-3); border-left: 2px solid var(--dawn);
}


/* ---------- Offer ---------- */
.offer-panel {
  display: grid; gap: var(--s-5);
  background: var(--color-raised);
  border: 1px solid var(--color-rule); border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 4.5rem);
}
@media (min-width: 900px) { .offer-panel { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6); align-items: center; } }
.price { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }
.price-num { font-family: var(--font-display); font-size: clamp(3.4rem, 2.4rem + 4vw, 5.4rem); line-height: 1; font-weight: 350; }
.price-note { color: var(--haze); }
.offer-list { list-style: none; padding: 0; margin: var(--s-4) 0; }
.offer-list li { display: grid; grid-template-columns: 28px 1fr; padding: 12px 0; border-top: 1px solid var(--color-rule); }
.offer-list li:last-child { border-bottom: 1px solid var(--color-rule); }
.offer-list svg { width: 18px; margin-top: 0.3em; color: var(--dawn); }
.guarantee { border-top: 1px solid var(--color-rule); padding-top: var(--s-4); }
@media (min-width: 900px) { .guarantee { border-top: 0; border-left: 1px solid var(--color-rule); padding: 0 0 0 var(--s-5); } }
.guarantee h3 { font-size: var(--fs-2); margin-bottom: var(--s-2); }
.guarantee p { color: var(--haze); }
.guarantee a { color: var(--starlight); }
.guarantee .seal { width: 64px; height: 64px; margin-bottom: var(--s-3); }
.guarantee .seal * { fill: none; stroke: var(--dawn); stroke-width: 1; vector-effect: non-scaling-stroke; }
.guarantee .seal text { fill: var(--dawn); stroke: none; font-family: var(--font-display); font-size: 30px; text-anchor: middle; dominant-baseline: central; }

/* ---------- Preview form ---------- */
/* The offer and preview panels sit on the same ground: one section's spacing between them, not two. */
.offer + .preview { padding-top: 0; }
.preview .page { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .preview .page { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-6); align-items: start; } }
.preview h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, var(--fs-4)); }
.preview-list { margin: var(--s-3) 0 0; padding-left: 1.2em; }
.preview-list li { padding: 4px 0; }
.form-row { display: grid; gap: var(--s-3); }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 52px; padding: 12px 14px;
  background: #fffdf8; color: var(--ink);
  border: 1px solid #7f7768; border-radius: var(--radius);
}
.field input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--color-danger-on-paper); border-width: 2px; }
.field-error { color: var(--color-danger-on-paper); font-size: var(--fs-small); margin: 6px 0 0; display: flex; gap: 6px; align-items: start; }
.field-error[hidden] { display: none; }
.field-error svg { width: 16px; flex: none; margin-top: 0.25em; }
.form-submit { margin-top: var(--s-3); width: 100%; }
.form-note { color: var(--ink-soft); font-size: var(--fs-small); margin-top: var(--s-2); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: var(--s-4); }
@media (min-width: 960px) { .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-6); align-items: start; } }
.faq-side h2 { margin-bottom: var(--s-3); }
.faq-note { color: var(--haze); max-width: 32ch; }
.faq-note a { color: var(--starlight); }
.faq-list { border-top: 1px solid var(--color-rule); }
.faq-list details { border-bottom: 1px solid var(--color-rule); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr 24px; gap: var(--s-2); align-items: center;
  padding: 22px 0; font-family: var(--font-display); font-size: var(--fs-1); line-height: 1.3;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: #fff; }
.faq-list .plus { width: 24px; height: 24px; color: var(--haze); }
.faq-list .plus .v { transform-origin: center; transform-box: fill-box; transition: scale 200ms var(--ease-out); }
.faq-list details[open] .plus .v { scale: 1 0; }
.faq-list details > div { padding: 0 0 24px; color: var(--haze); max-width: 62ch; }
.faq-list details > div p:last-child { margin-bottom: 0; }
.faq-list blockquote { font-family: var(--font-display); font-style: italic; color: var(--starlight); font-size: var(--fs-1); line-height: 1.4; margin: 0 0 var(--s-2); }

/* ---------- Closing: the quiet-hour room ---------- */
.closing { position: relative; background: var(--night); overflow: hidden; }
.closing-photo img { display: block; width: 100%; height: auto; }
.closing-in { position: relative; padding-block: var(--s-4) clamp(3.5rem, 7vw, var(--s-7)); }
.closing svg.mark { width: 72px; margin: 0 0 var(--s-4); }
.closing svg.mark * { fill: none; stroke: var(--starlight); stroke-opacity: 0.6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.closing blockquote p {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(1.8rem, 1.2rem + 2.4vw, var(--fs-5)); line-height: 1.18;
  max-width: 22ch; margin: 0;
}
.closing .actions { margin-top: var(--s-5); }
@media (max-width: 699px) {
  .closing-photo { position: relative; display: block; }
  .closing-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(14 23 41 / 0) 50%, var(--night) 100%); }
  .closing-in { margin-top: -2rem; }
}
@media (min-width: 700px) {
  .closing { min-height: min(52vw, 760px); display: flex; align-items: center; }
  .closing-photo { position: absolute; inset: 0; }
  .closing-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 50%; }
  /* the left side stays solid night under the text, so contrast never depends on the photo */
  .closing-photo::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--night) 0%, var(--night) 34%, rgb(14 23 41 / 0.75) 52%, rgb(14 23 41 / 0) 72%);
  }
  .closing-in { padding-block: var(--s-7); }
  .closing blockquote p { max-width: 17ch; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--color-rule); padding-block: var(--s-5); color: var(--haze); font-size: var(--fs-small); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; justify-content: space-between; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px var(--s-3); list-style: none; margin: 0; padding: 0; }
.site-footer a, .link-button {
  color: var(--haze); display: inline-flex; align-items: center; min-height: 44px; padding-block: 0;
}
.site-footer a:hover, .link-button:hover { color: var(--starlight); }
.link-button { background: none; border: 0; padding-inline: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.site-footer .brand { display: inline-flex; font-size: 1.05rem; margin-right: 0; color: var(--starlight); }
/* Social profiles: their own row under the legal links. */
.footer-social { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s-3); border-top: 1px solid var(--color-rule); padding-top: var(--s-2); }

/* ---------- Cookie bar ---------- */
.consent {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  background: var(--dusk); color: var(--starlight);
  border-top: 1px solid var(--color-edge);
  box-shadow: 0 -12px 30px -16px rgb(0 0 0 / 0.7);
  font-size: var(--fs-small); line-height: 1.45;
}
.consent[hidden] { display: none; }
.consent-in {
  max-width: 1240px; margin-inline: auto;
  padding: 10px clamp(16px, 5vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
}
.consent p { margin: 0; color: var(--haze); flex: 1 1 18rem; }
.consent a { color: var(--starlight); }
.consent-short { display: none; }
.consent-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.consent-actions .btn { min-width: 8.5rem; }
@media (max-width: 599px) {
  .consent-long { display: none; }
  .consent-short { display: inline; }
  .consent p { flex-basis: 100%; }
  .consent-actions { flex: 1 1 100%; }
  .consent-actions .btn { flex: 1 1 0; min-width: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .consent:not([hidden]) { animation: rise 250ms var(--ease-out) both; }
}
@keyframes rise { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Simple pages (thank you, legal) ---------- */
.simple { padding-block: clamp(3rem, 8vw, 6rem); }
.simple .page { max-width: 820px; margin-inline: auto; }
.simple h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, var(--fs-5)); letter-spacing: -0.01em; }
.legal h2 { font-size: var(--fs-2); margin: var(--s-5) 0 var(--s-2); }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 8px; }
.legal .updated { color: var(--ink-soft); margin-top: var(--s-2); }
.legal a, .thanks a:not(.btn) { color: var(--ink); }
.thanks .mark { width: 72px; margin-bottom: var(--s-4); }
.thanks .mark * { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.thanks ul { padding-left: 1.2em; }
.thanks .actions { margin-top: var(--s-4); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s-4); }

@media (forced-colors: active) {
  .btn { border-color: ButtonText; }
  .wheel .node.is-active circle { fill: Highlight; }
}

main:focus { outline: none; }

/* Links inside running text: a taller tap area without changing the line layout */
main p a, main li a, .consent p a { padding-block: 0.75em; }
.thanks .soft-offer { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid #cfc7b8; }

/* The free-preview page (reached from the Kit email): downloads and chapter players */
.preview-pack h2 { font-size: var(--fs-2); margin: var(--s-5) 0 var(--s-2); }
.preview-pack .downloads { padding-left: 1.2em; }
.preview-pack .downloads li { margin-bottom: var(--s-1); }
.preview-pack .downloads .muted { display: block; font-size: var(--fs-small); }
.preview-pack .tracks { list-style: none; padding: 0; margin: var(--s-3) 0 0; }
.preview-pack .tracks li { padding: var(--s-2) 0; border-top: 1px solid #cfc7b8; }
.preview-pack .tracks li:last-child { border-bottom: 1px solid #cfc7b8; }
.preview-pack .track-title { margin: 0 0 var(--s-1); font-weight: 600; }
.preview-pack .track-time { font-weight: 400; color: var(--ink-soft); margin-left: 0.4em; }
.preview-pack audio { display: block; width: 100%; }
.preview-pack .track-save { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); }
.preview-pack .care { margin-top: var(--s-4); font-size: var(--fs-small); }

/* Free preview page */
.preview-card { display: grid; gap: var(--s-5); max-width: 1000px; }
@media (min-width: 860px) { .preview-card { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s-6); align-items: start; } }
.simple .preview-card { max-width: 1000px; }
.preview-card h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, var(--fs-5)); }
.preview-cover { display: block; width: 150px; height: auto; margin-top: var(--s-4); border-radius: 2px; box-shadow: 0 18px 36px -16px rgb(0 0 0 / 0.5); }
.preview-card .field + .field { margin-top: var(--s-3); }
.preview-back { text-align: center; margin: var(--s-3) 0 0; }
.preview-back a { color: var(--starlight); }
.legal .link-button { color: var(--ink); font-weight: 600; vertical-align: middle; }
@media (max-width: 859px) { .preview-cover { display: none; } }
