/* Mandala Road Publishing
   Warm, bold, a little whimsical. Cream paper, saturated color, editorial serif. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------------------------------ tokens */
:root {
  --paper: #F8F2EA;
  --paper-2: #F0E6D9;
  --paper-3: #E5D6C3;
  --ink: #1C1714;
  --ink-2: #4A403A;
  --ink-3: #6B5F57;
  --line: rgba(28, 23, 20, .12);
  --line-strong: rgba(28, 23, 20, .26);

  --teal: #2C4A43;
  --teal-2: #1F3732;
  --marigold: #D5A35A;
  --tomato: #C8582E;
  --tomato-ink: #A5431F;
  --plum: #4A3446;
  --sage: #A9B39E;
  --rose: #E2B9A9;
  --peach: #F2C8A8;
  --wood: #A9764A;

  --accent: var(--tomato-ink);
  --accent-ink: #FFF8EE;
  --focus: #1F6FD1;

  --font-display: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1220px;
  --gutter: clamp(16px, 4.5vw, 44px);
  --header-h: 72px;
  --radius: 22px;
  --radius-sm: 12px;

  --shadow-1: 0 1px 2px rgba(35, 26, 23, .07), 0 6px 16px -6px rgba(35, 26, 23, .14);
  --shadow-2: 0 2px 6px rgba(35, 26, 23, .08), 0 26px 50px -18px rgba(35, 26, 23, .38);
  --shadow-book: 0 1px 1px rgba(0, 0, 0, .12), 0 10px 20px -8px rgba(35, 26, 23, .45), 0 24px 40px -24px rgba(35, 26, 23, .4);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --dur-1: 160ms;
  --dur-2: 300ms;
  --dur-3: 650ms;
  --dur-4: 950ms;

  --z-header: 40;
  --z-menu: 50;
}

/* Author and brand worlds. Same structure, different personality. */
.theme-jonathan { --t-mark: #1E3445; --t-bg: #1E3445; --t-ink: #FBF4E8; --t-soft: rgba(251, 244, 232, .78); --t-accent: #E3A82B; --t-accent-ink: #1E3445; --t-tint: #E7EBEE; --accent: #E3A82B; --accent-ink: #1E3445; }
.theme-miranda { --t-mark: #9E1B20; --t-bg: #141317; --t-ink: #EFE8DC; --t-soft: rgba(239, 232, 220, .74); --t-accent: #E5484D; --t-accent-ink: #FFF6EC; --t-tint: #ECE7E1; --accent: #B3191E; --accent-ink: #FFF6EC; }
.theme-doodleberry { --t-mark: #2A3EB1; --t-bg: #F4DE9A; --t-ink: #1B2470; --t-soft: rgba(27, 36, 112, .82); --t-accent: #2A3EB1; --t-accent-ink: #FFFFFF; --t-tint: #FBF1D6; --accent: #2A3EB1; --accent-ink: #FFFFFF; }
.theme-molly { --t-mark: #C0352B; --t-bg: #F5D6D0; --t-ink: #38555D; --t-soft: rgba(56, 85, 93, .85); --t-accent: #C0352B; --t-accent-ink: #FAF7F2; --t-tint: #FAF7F2; --accent: #C0352B; --accent-ink: #FAF7F2; }
.theme-cq { --t-mark: #24427A; --t-bg: #1E2C47; --t-ink: #FFFFFF; --t-soft: rgba(255, 255, 255, .8); --t-accent: #E9BC63; --t-accent-ink: #1E2C47; --t-tint: #ECEFF4; --accent: #C8582E; --accent-ink: #FFFFFF; --cq-pink: #D9785A; --cq-green: #A9B39E; --cq-yellow: #E9BC63; }
.theme-house { --t-mark: #1F3732; --t-bg: #1F3732; --t-ink: #F8F2EA; --t-soft: rgba(248, 242, 234, .8); --t-accent: #D5A35A; --t-accent-ink: #1C1714; }

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h3 { font-size: 1.25rem; letter-spacing: -.02em; }
h1 em, h2 em, .serif-em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--tomato-ink); }
p { margin: 0 0 1em; text-wrap: pretty; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--marigold); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; transition: top var(--dur-1); }
.skip:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.eyebrow { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .9rem; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 40rem; }

/* ------------------------------------------------------------ buttons */
.btn {
  --b-bg: var(--accent);
  --b-ink: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7em 1.35em;
  border: 2px solid transparent; border-radius: 999px;
  background: var(--b-bg); color: var(--b-ink);
  font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none;
  cursor: pointer; touch-action: manipulation;
  transition: transform var(--dur-2) var(--ease-spring), box-shadow var(--dur-2) var(--ease-out), background-color var(--dur-2), color var(--dur-2);
}
.btn .icon { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(35, 26, 23, .55); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: none; transition-duration: 80ms; }
.btn--lg { min-height: 56px; padding: .85em 1.7em; font-size: 1.05rem; }
.btn--small { min-height: 42px; padding: .55em 1.1em; font-size: .92rem; }
.btn--ghost { --b-bg: transparent; --b-ink: var(--ink); border-color: currentColor; }
.btn--ghost:hover { --b-bg: var(--ink); --b-ink: var(--paper); border-color: var(--ink); }
.btn--light { --b-bg: #fff; --b-ink: var(--ink); }
.btn[disabled] { opacity: .5; cursor: progress; transform: none; }

.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 700; text-decoration: none; padding-block: .4em; border-bottom: 2px solid transparent; transition: border-color var(--dur-2), gap var(--dur-2) var(--ease-out); }
.link-arrow:hover { border-color: currentColor; gap: .7em; }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: transform var(--dur-3) var(--ease-out), background-color var(--dur-2), border-color var(--dur-2);
}
.site-header.is-hidden { transform: translateY(-100%); }
.page-home .site-header:not(.is-scrolled) { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .mark { transition: transform 1.2s var(--ease-out); }
.brand:hover .mark { transform: rotate(90deg); }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: .95; letter-spacing: -.03em; display: flex; flex-direction: column; }
.brand-word small { font-family: var(--font-body); font-weight: 700; font-size: .6rem; letter-spacing: .32em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.brand--light, .brand--light small { color: var(--paper); }
.nav-list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-list a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 600; text-decoration: none; border-radius: 999px; transition: background-color var(--dur-2); }
.nav-list a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 2px; background: var(--tomato); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-out); }
.nav-list a:hover::after, .nav-list a[aria-current]::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .icon { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.mobile-nav { position: fixed; top: var(--header-h); left: 0; right: 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); z-index: var(--z-menu); background: var(--paper); padding: 24px var(--gutter) 40px; display: flex; flex-direction: column; overflow-y: auto; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(12px); animation: menu-in var(--dur-3) var(--ease-out) forwards; }
.mobile-nav li:nth-child(2) { animation-delay: 50ms; }
.mobile-nav li:nth-child(3) { animation-delay: 100ms; }
.mobile-nav li:nth-child(4) { animation-delay: 150ms; }
.mobile-nav li:nth-child(5) { animation-delay: 200ms; }
.mobile-nav a { display: flex; min-height: 64px; align-items: center; font-family: var(--font-display); font-size: 2rem; font-weight: 600; text-decoration: none; }
.mobile-nav a[aria-current] { color: var(--tomato-ink); }
.mobile-nav-foot { margin-top: auto; padding-top: 32px; font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--ink-3); }
@keyframes menu-in { to { opacity: 1; transform: none; } }
body.menu-open { overflow: hidden; }
.mobile-nav[hidden], [hidden] { display: none !important; }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  :root { --header-h: 64px; }
  .brand .mark { width: 34px; height: 34px; }
  .brand-word { font-size: 1.18rem; }
}

/* ------------------------------------------------------------ hero (home) */
.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(12px, 2.5vw, 36px));
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 50% 60% at 76% 62%, rgba(232, 140, 92, .42), transparent 70%),
    radial-gradient(ellipse 45% 45% at 0% 0%, rgba(213, 163, 90, .16), transparent 70%),
    linear-gradient(180deg, #F8F2EA 0%, #F6EADB 55%, #F1D5BC 100%);
}
.hero-mandala { position: absolute; z-index: -1; right: max(-220px, -14vw); top: max(-150px, -9vw); width: min(58vw, 860px); aspect-ratio: 1; opacity: .62; }
.hero-mandala-svg { width: 100%; height: 100%; animation: spin 200s linear infinite; }
.hero-mandala-svg .ring path, .hero-mandala-svg .ring circle[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; animation: draw 2.4s var(--ease-out) forwards, fill-in 1.6s var(--ease-out) forwards; }
.hero-mandala-svg .r1 > * { animation-delay: .1s, 1.2s !important; }
.hero-mandala-svg .r2 > * { animation-delay: .35s, 1.4s !important; }
.hero-mandala-svg .r3 > * { animation-delay: .6s, 1.6s !important; }
.hero-mandala-svg .r4 { opacity: 0; animation: fade-in 1.4s var(--ease-out) 1.2s forwards; }
.hero-mandala-svg .r5 { opacity: 0; animation: fade-in 1.6s var(--ease-out) 1.6s forwards; }

.hero-main { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  min-height: clamp(400px, calc(100svh - var(--header-h) - 190px), 600px); }
.hero-title { font-size: clamp(2.6rem, 4.9vw, 4.8rem); line-height: .97; letter-spacing: -.05em; font-weight: 700; margin-bottom: .35em; max-width: 9.6em; opacity: 0; animation: fade-up 1.1s var(--ease-out) .1s forwards; }
.hero-title em { font-size: 1.08em; letter-spacing: -.02em; }
.hero-sub { max-width: 30rem; font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--ink-2); opacity: 0; animation: fade-up .9s var(--ease-out) .35s forwards; }
.hero .hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 26px; opacity: 0; animation: fade-up .9s var(--ease-out) .5s forwards; }

.hero-stage { position: relative; display: grid; justify-items: center; align-self: stretch; align-items: end; }
.hero-glow { position: absolute; inset: 12% 6% 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 238, 205, .95), rgba(255, 220, 170, 0)); filter: blur(8px); animation: breathe 6s var(--ease-in-out) infinite; }
.hero-book { position: relative; z-index: 1; width: min(100%, 660px, calc((100svh - 230px) * 1.3)); margin-bottom: -110px; align-self: end; filter: drop-shadow(0 1px 2px rgba(80, 45, 15, .38)) drop-shadow(0 26px 30px rgba(90, 40, 10, .28)); animation: book-in 1.4s var(--ease-out) .2s both; }
.hero-book-img { display: block; width: 100%; height: auto; }
.hero-motes { position: absolute; left: 20%; right: 20%; top: 5%; bottom: 40%; pointer-events: none; }
.hero-motes i { position: absolute; bottom: 0; left: calc(var(--x) * 1%); width: 5px; height: 5px; border-radius: 50%; background: #FFE7B8; box-shadow: 0 0 10px 2px rgba(255, 214, 150, .8); opacity: 0;
  animation: mote var(--s) var(--ease-in-out) var(--d) infinite; }

.hero-bar { position: relative; z-index: 3; padding-block: clamp(8px, 1.5vw, 16px) clamp(20px, 3vw, 32px); opacity: 0; animation: fade-up 1s var(--ease-out) .8s forwards; }
.hero-bar-inner { display: flex; align-items: center; gap: 10px 18px; padding: 10px 10px 10px 22px; border-radius: 24px;
  background: rgba(255, 251, 246, .7); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .75); box-shadow: 0 24px 50px -24px rgba(110, 50, 15, .45); }
.hero-bar-label { margin: 0; flex: none; font-weight: 700; font-size: .98rem; }
.hero-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hero-chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line);
  font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color var(--dur-2), color var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.hero-chips a:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill-in { to { fill-opacity: 1; } }
@keyframes breathe { 50% { opacity: .7; transform: scale(1.05); } }
@keyframes book-in { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes mote { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(14px, -200px); } }

@media (max-width: 900px) {
  .hero-chips a { min-height: 44px; }
  .hero-book { margin-bottom: -70px; }
  .hero-main { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .hero-mandala { width: 120vw; right: -48vw; top: 300px; opacity: .45; }
  .hero-book { width: min(100%, 540px); }
  .hero-bar-inner { flex-direction: column; align-items: flex-start; padding: 18px; }
  .hero-chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 36px); margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
  .hero-chips::-webkit-scrollbar { display: none; }
}
@media (max-width: 560px) {
  .hero-title { font-size: clamp(2.5rem, 12.4vw, 3.6rem); }
}

/* ------------------------------------------------------------ sections */
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { margin: 0; max-width: 16em; }
.section-head .eyebrow { color: var(--teal); }

/* reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ moods */
.moods-section { position: relative; }
.moods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mood:first-child { grid-column: span 2; }
.mood a {
  --m-bg: var(--ink); --m-ink: var(--paper); --m-soft: rgba(251, 244, 232, .78);
  position: relative; display: flex; flex-direction: column; height: 100%; min-height: 250px;
  padding: 24px 24px 28px; border-radius: var(--radius); overflow: hidden;
  background: var(--m-bg); color: var(--m-ink); text-decoration: none;
  transition: transform var(--dur-3) var(--ease-spring), box-shadow var(--dur-3) var(--ease-out);
}
.mood a:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow-2); }
.mood a { --m-bg: #EFE5D8; --m-ink: var(--ink); --m-soft: var(--ink-3); }
.mood:first-child a { --m-bg: var(--ink); --m-ink: #F8F2EA; --m-soft: rgba(248, 242, 234, .72); }
.mood:nth-child(4) a { --m-bg: var(--tomato-ink); --m-ink: #FFF7EF; --m-soft: rgba(255, 247, 239, .8); }
.mood a:hover { --m-bg: #E8DCCB; }
.mood:first-child a:hover { --m-bg: #2A231F; }
.mood:nth-child(4) a:hover { --m-bg: #943A1A; }
.mood-short { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--m-soft); margin-bottom: 10px; }
.mood-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.1vw, 1.8rem); line-height: 1.05; letter-spacing: -.035em; max-width: 11em; }
.mood:first-child .mood-name { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.mood-line { margin-top: 10px; font-size: .97rem; color: var(--m-soft); max-width: 18em; }
.mood-fan { position: absolute; right: 18px; bottom: -28px; width: 130px; height: 150px; pointer-events: none; }
.mood-fan img { position: absolute; bottom: 0; right: 0; width: 88px; border-radius: 3px 5px 5px 3px; box-shadow: 0 10px 20px -6px rgba(0, 0, 0, .45); transform-origin: 50% 120%; transform: rotate(calc((var(--n) - 1) * 9deg)) translateX(calc((var(--n) - 1) * -10px)); transition: transform var(--dur-3) var(--ease-spring); }
.mood a:hover .mood-fan img { transform: rotate(calc((var(--n) - 1) * 16deg)) translateX(calc((var(--n) - 1) * -18px)) translateY(-14px); }
.mood-go { position: absolute; left: 24px; bottom: 22px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid currentColor; transition: transform var(--dur-3) var(--ease-spring), background-color var(--dur-2), color var(--dur-2); }
.mood a:hover .mood-go { transform: translateX(6px); background: var(--m-ink); color: var(--m-bg); }
.mood a { padding-bottom: 84px; }
.mood:first-child .mood-fan { width: 190px; height: 190px; bottom: -40px; right: 32px; }
.mood:first-child .mood-fan img { width: 110px; }

@media (max-width: 1000px) {
  .moods { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .moods { grid-template-columns: 1fr; gap: 12px; }
  .mood:first-child { grid-column: auto; }
  .mood a { min-height: 190px; }
  .mood-fan { width: 100px; }
  .mood-fan img { width: 64px; }
  .mood:first-child .mood-fan { width: 140px; right: 18px; }
  .mood:first-child .mood-fan img { width: 84px; }
}

/* ------------------------------------------------------------ books */
.book-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(42%, 190px), 1fr)); gap: clamp(28px, 4vw, 48px) clamp(16px, 2.6vw, 32px); }
.card { min-width: 0; }
.card[hidden] { display: none; }
.card-link { display: block; text-decoration: none; color: inherit; border-radius: 8px; }
.card-cover { position: relative; aspect-ratio: 8.5 / 11; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 16px; }
.cover {
  position: relative; width: 100%;
  border-radius: 3px 7px 7px 3px;
  box-shadow: var(--shadow-book);
  transform-origin: 50% 100%;
  transition: transform var(--dur-3) var(--ease-spring), box-shadow var(--dur-3) var(--ease-out);
  background: var(--paper-3);
}
.cover img { width: 100%; border-radius: inherit; }
/* spine crease and light sheen */
.cover::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(255, 255, 255, .22) 1.6%, rgba(0, 0, 0, .1) 3.4%, transparent 7%), linear-gradient(115deg, rgba(255, 255, 255, .16) 0%, transparent 38%); }
.card-cover { isolation: isolate; }
.card-cover > .cover { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; width: var(--trim-w, 100%); }
.card-link:hover .cover, .card-link:focus-visible .cover { transform: translateY(-10px) rotate(-1.6deg); box-shadow: 0 2px 2px rgba(0, 0, 0, .1), 0 30px 40px -14px rgba(35, 26, 23, .5); }
.card-title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; line-height: 1.2; margin: 0 0 4px; }
.card-author { font-size: .9rem; color: var(--ink-3); margin: 0; font-weight: 500; }
.card-series { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.flag { position: absolute; top: 10px; left: -6px; z-index: 2; padding: 4px 10px; border-radius: 4px 999px 999px 4px; background: var(--marigold); color: #2A1A06; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4); }
.flag--soon { background: var(--ink); color: var(--paper); }

/* designed placeholder cover */
.cover--ph { aspect-ratio: 2 / 3; display: flex; flex-direction: column; justify-content: space-between; padding: 14% 12%; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, #fff 10%, var(--c1)), var(--c1) 60%); color: var(--c2); outline: 1px solid color-mix(in srgb, var(--c2) 35%, transparent); outline-offset: -8px; }
.ph-mark { opacity: .9; }
.ph-mark .mark { width: 28px; height: 28px; }
.ph-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(.95rem, 1.5vw, 1.25rem); line-height: 1.05; }
.ph-author { font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .9; }
.ph-badge { position: absolute; right: 8px; bottom: 8px; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: rgba(255, 255, 255, .88); color: #231A17; }
.theme-molly .cover--ph, .cover--ph[style*="F3D5CC"] { color: #8E2420; }

/* home: the nightstand shelf */
.book-grid--shelf { grid-template-columns: repeat(6, 1fr); row-gap: 56px; }
.book-grid--shelf .card-cover::before { content: ""; position: absolute; left: calc(clamp(16px, 2.6vw, 32px) / -2 - 1px); right: calc(clamp(16px, 2.6vw, 32px) / -2 - 1px); bottom: -14px; height: 14px; z-index: -1;
  background: linear-gradient(180deg, #C98A50 0, #A9682F 60%, #7E4A1E 100%); box-shadow: 0 14px 22px -10px rgba(60, 30, 5, .55); }
.book-grid--shelf .card:first-child .card-cover::before { left: -14px; border-radius: 4px 0 0 4px; }
.book-grid--shelf .card:last-child .card-cover::before { right: -14px; border-radius: 0 4px 4px 0; }
.book-grid--shelf .card-body { padding-top: 14px; }
@media (max-width: 1000px) {
  .book-grid--shelf { grid-template-columns: repeat(3, 1fr); }
  .book-grid--shelf .card:nth-child(3n + 1) .card-cover::before { left: -10px; }
  .book-grid--shelf .card:nth-child(3n) .card-cover::before { right: -10px; }
}
@media (max-width: 600px) {
  .shelf { margin-inline: calc(var(--gutter) * -1); }
  .book-grid--shelf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px var(--gutter) 24px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .book-grid--shelf::-webkit-scrollbar { display: none; }
  .book-grid--shelf .card { scroll-snap-align: start; }
}

/* ------------------------------------------------------------ authors */
.author-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.author-card a { position: relative; display: flex; flex-direction: column; height: 100%; padding: 28px 24px 24px; border-radius: var(--radius); background: #FFFCF8; color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--t-mark); text-decoration: none; overflow: hidden; transition: transform var(--dur-3) var(--ease-spring), box-shadow var(--dur-3) var(--ease-out); }
.author-card a:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.author-card .monogram { margin-bottom: 22px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--t-ink) 14%, transparent); transition: transform var(--dur-4) var(--ease-spring); }
.author-card a:hover .monogram { transform: rotate(-10deg) scale(1.06); }
.author-card h3 { font-size: 1.7rem; margin: 6px 0 10px; }
.author-card p { color: var(--ink-3); font-size: .98rem; margin-bottom: 18px; }
.author-card .link-arrow { margin-top: auto; color: var(--t-mark); }
.author-card .ac-pos { color: var(--ink-3); }
.author-card .monogram { box-shadow: none !important; }
.theme-doodleberry .link-arrow, .theme-molly .link-arrow { color: var(--t-accent); }
.ac-pos { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--t-soft); }
@media (max-width: 1000px) { .author-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .author-cards { grid-template-columns: 1fr; } }

.monogram { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--t-accent); color: var(--t-accent-ink); font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; letter-spacing: -.02em; }
.monogram--img { background: #FFFFFF; }
.monogram--img img { width: 100%; height: 100%; object-fit: cover; }
.monogram--img.theme-jonathan img, .monogram--img.theme-molly img { transform: scale(1.28); }
.monogram--sm { width: 56px; height: 56px; font-size: 1.25rem; }
.monogram--lg { width: 120px; height: 120px; font-size: 2.6rem; }
.monogram--hero { width: 108px; height: 108px; font-size: 2.4rem; margin-bottom: 22px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--t-ink) 12%, transparent); }
.theme-doodleberry.monogram:not(.monogram--img) { background: #2A3EB1; color: #FFFFFF; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 2rem; }

/* authors index */
.author-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.author-row a { display: grid; grid-template-columns: auto 1fr minmax(0, 300px); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: #FFFCF8; color: var(--ink); border: 1px solid var(--line); border-left: 5px solid var(--t-mark); text-decoration: none; overflow: hidden; transition: transform var(--dur-3) var(--ease-spring), box-shadow var(--dur-3) var(--ease-out); }
.author-row a:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.author-row h2 { margin: 6px 0 8px; }
.ar-tag { font-family: var(--font-serif); font-style: italic; font-size: 1.45rem; line-height: 1.25; color: var(--ink); }
.ar-copy p:not(.ar-tag) { color: var(--ink-3); max-width: 34rem; }
.ar-copy .link-arrow { color: var(--t-mark); }
.author-row .ac-pos { color: var(--ink-3); }
.ar-covers { position: relative; height: 210px; }
.ar-covers img { position: absolute; bottom: 0; width: 120px; border-radius: 3px 6px 6px 3px; box-shadow: var(--shadow-book); transition: transform var(--dur-3) var(--ease-spring); }
.ar-covers img:nth-child(1) { right: 90px; transform: rotate(-7deg); }
.ar-covers img:nth-child(2) { right: 10px; transform: rotate(6deg); }
.author-row a:hover .ar-covers img:nth-child(1) { transform: rotate(-11deg) translate(-12px, -10px); }
.author-row a:hover .ar-covers img:nth-child(2) { transform: rotate(10deg) translate(8px, -14px); }
@media (max-width: 860px) {
  .author-row a { grid-template-columns: 1fr; }
  .ar-covers { display: none; }
}
.cq-callout { display: flex; align-items: center; gap: 24px; margin-top: 20px; padding: 24px clamp(20px, 4vw, 44px); border-radius: var(--radius); background: var(--t-bg); color: var(--t-ink); text-decoration: none; transition: transform var(--dur-3) var(--ease-spring); }
.cq-callout:hover { transform: translateY(-4px); }
.cq-callout img { width: 96px; height: 96px; border-radius: 50%; background: #fff; flex: none; }
.cq-callout > span { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cq-callout .eyebrow { color: var(--t-soft); margin: 0; }
.cq-callout strong { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; }
.cq-callout .icon { width: 28px; height: 28px; color: var(--t-accent); }

/* ------------------------------------------------------------ author & series hero */
.author-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--t-bg); color: var(--t-ink); padding-block: clamp(56px, 8vw, 110px) clamp(64px, 8vw, 120px); }
.author-hero .eyebrow, .author-hero .crumbs a { color: var(--t-soft); }
.author-hero-inner { display: grid; grid-template-columns: 1fr minmax(0, 340px); gap: clamp(32px, 6vw, 80px); align-items: center; }
.author-hero h1 { margin-bottom: .2em; }
.author-tagline { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.3; max-width: 30rem; color: var(--t-ink); }
.author-hero .btn--ghost { --b-ink: var(--t-ink); }
.author-hero .btn--ghost:hover { --b-bg: var(--t-ink); --b-ink: var(--t-bg); border-color: var(--t-ink); }
.author-hero-book { display: block; max-width: 300px; justify-self: center; transform: rotate(4deg); }
.author-hero-book .cover { box-shadow: 0 2px 2px rgba(0, 0, 0, .2), 0 40px 60px -20px rgba(0, 0, 0, .6); }
.author-hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.author-hero--series .author-hero-inner { grid-template-columns: 1fr; }
@media (max-width: 760px) {
  .author-hero-inner { grid-template-columns: 1fr; }
  .author-hero-book { max-width: 200px; justify-self: start; }
}

/* Miranda: rain on a dark street, one warm window */
.theme-miranda .author-hero-fx {
  background:
    radial-gradient(ellipse 40% 50% at 85% 35%, rgba(230, 160, 70, .22), transparent 70%),
    radial-gradient(ellipse 60% 40% at 10% 110%, rgba(196, 38, 43, .2), transparent 70%);
}
.theme-miranda .author-hero-fx::before {
  content: ""; position: absolute; inset: -50% -10%;
  background-image: repeating-linear-gradient(104deg, transparent 0 14px, rgba(220, 225, 235, .07) 14px 15px, transparent 15px 41px);
  animation: rain 1.1s linear infinite;
}
.theme-miranda .author-hero h1 { font-weight: 500; letter-spacing: .02em; text-transform: uppercase; font-size: clamp(2.6rem, 6.6vw, 5.4rem); }
.theme-miranda .monogram--hero.monogram--img { background: transparent; box-shadow: none; width: 170px; height: 170px; margin: -30px 0 -10px -24px; border-radius: 0; overflow: visible; }
.theme-miranda .monogram--hero img { filter: invert(1); mix-blend-mode: screen; object-fit: contain; }
@keyframes rain { from { transform: translate3d(0, -40px, 0); } to { transform: translate3d(-9px, 40px, 0); } }

/* Jonathan: a dashed trail on a case-file navy, X marks the spot */
.theme-jonathan .author-hero-fx {
  background-image:
    radial-gradient(circle at 78% 30%, rgba(227, 168, 43, .14), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='360' viewBox='0 0 560 360'%3E%3Cpath d='M-20 300 C 90 240, 120 120, 230 140 S 380 300, 470 190 S 560 40, 600 60' fill='none' stroke='%23FBF4E8' stroke-opacity='.13' stroke-width='3' stroke-dasharray='10 12' stroke-linecap='round'/%3E%3Cpath d='M455 172l22 22M477 172l-22 22' stroke='%23E3A82B' stroke-opacity='.5' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: auto, 560px 360px;
  animation: trail 40s linear infinite;
}
@keyframes trail { to { background-position: 0 0, 560px 0; } }

/* E.D. Doodleberry: sprinkles drifting on sunshine yellow */
.theme-doodleberry .author-hero-fx { opacity: .28 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg stroke-width='7' stroke-linecap='round'%3E%3Cpath d='M30 40l14 8' stroke='%23F25C9A'/%3E%3Cpath d='M120 22l-6 14' stroke='%232A3EB1'/%3E%3Cpath d='M200 60l14-4' stroke='%2336B37E'/%3E%3Cpath d='M70 120l4 15' stroke='%23FF7A2F'/%3E%3Cpath d='M160 140l14 6' stroke='%239B4DCA'/%3E%3Cpath d='M30 200l12-8' stroke='%2336B37E'/%3E%3Cpath d='M110 210l15 3' stroke='%23F25C9A'/%3E%3Cpath d='M210 200l-5 14' stroke='%232A3EB1'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: .55;
  animation: drift 26s linear infinite;
}
.theme-doodleberry .author-hero h1 { font-weight: 800; letter-spacing: -.02em; }
.theme-doodleberry .author-hero h1::after { content: ""; display: block; width: 2.4em; height: .1em; margin-top: .14em; border-radius: 1em; background: #2A3EB1; }
@keyframes drift { to { background-position: 240px 480px; } }

/* Molly: cozy blush with looping thread and a warm cup */
.theme-molly .author-hero-fx {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='220' viewBox='0 0 420 220'%3E%3Cpath d='M0 120 C 30 60, 70 60, 60 100 S 100 160, 130 110 S 170 40, 200 90 S 250 170, 280 110 S 330 50, 350 100 S 400 150, 420 120' fill='none' stroke='%23C0352B' stroke-opacity='.16' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 420px 220px;
  animation: drift-x 50s linear infinite;
}
@keyframes drift-x { to { background-position: 420px 0; } }

/* ------------------------------------------------------------ author page body */
.bio-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.bio p { font-size: 1.12rem; max-width: 36rem; }
.bio h2 + p::first-letter { font-family: var(--font-serif); font-weight: 400; float: left; font-size: 3.6em; line-height: .82; padding: .06em .1em 0 0; color: var(--accent); }
.facts { margin: 0; padding: 28px; border-radius: var(--radius); background: var(--paper-2); display: grid; gap: 18px; }
.facts div { border-bottom: 1px dashed var(--line-strong); padding-bottom: 14px; }
.facts div:last-child { border: 0; padding: 0; }
.facts dt { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
@media (max-width: 800px) { .bio-grid { grid-template-columns: 1fr; } }

.series-feature { padding-top: 0; }
.series-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: var(--radius); background: var(--t-tint); }
.series-card h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.series-copy .link-arrow { color: var(--ink); }
.book-grid--series { grid-template-columns: repeat(auto-fill, minmax(min(42%, 160px), 1fr)); }
@media (max-width: 800px) { .series-card { grid-template-columns: 1fr; } }

/* reading order */
.reading-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: book; }
.reading-item { display: grid; grid-template-columns: auto 150px 1fr; gap: clamp(16px, 3vw, 40px); align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.reading-n { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: clamp(3rem, 6vw, 5rem); line-height: 1; color: var(--accent); min-width: 1.2ch; }
.reading-item h3 { font-size: 1.6rem; }
.reading-item h3 a { text-decoration: none; }
.reading-item p { color: var(--ink-2); max-width: 38rem; }
.reading-item .tilt { display: block; }
@media (max-width: 640px) { .reading-item { grid-template-columns: auto 100px; } .reading-item > div { grid-column: 1 / -1; } }

/* ------------------------------------------------------------ newsletter */
.newsletter { background: var(--t-bg); color: var(--t-ink); padding-block: clamp(56px, 8vw, 100px); position: relative; overflow: hidden; }
.newsletter::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; border: 60px solid color-mix(in srgb, var(--t-accent) 22%, transparent); pointer-events: none; }
.nl-inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.nl-copy h2 { margin-top: 18px; font-size: clamp(2rem, 4vw, 3rem); }
.nl-copy p { color: var(--t-soft); font-size: 1.1rem; max-width: 32rem; }
.nl-gift { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: color-mix(in srgb, var(--t-accent) 22%, transparent); color: var(--t-ink) !important; font-size: 1rem !important; }
.nl-gift .icon { color: var(--t-accent); }
.theme-doodleberry .nl-gift .icon, .theme-molly .nl-gift .icon { color: var(--t-accent); }
.nl-form { display: grid; gap: 14px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: color-mix(in srgb, var(--t-ink) 8%, transparent); border: 1px solid color-mix(in srgb, var(--t-ink) 16%, transparent); }
.nl-form label { color: var(--t-ink); }
.nl-form input { background: color-mix(in srgb, var(--t-bg) 70%, #fff 30%); border-color: color-mix(in srgb, var(--t-ink) 30%, transparent); color: var(--t-ink); }
.theme-doodleberry .nl-form input, .theme-molly .nl-form input { background: #FFFFFF; color: #231A17; }
.nl-form .btn { --b-bg: var(--t-accent); --b-ink: var(--t-accent-ink); justify-self: start; }
.nl-msg { margin: 0; font-weight: 600; min-height: 1.2em; }
.nl-fine { font-size: .85rem; color: var(--t-soft, var(--ink-3)); margin: 0; }
.nl-fine a { color: inherit; }
@media (max-width: 800px) { .nl-inner { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ forms */
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #FFFDF9; font-size: 1rem;
  transition: border-color var(--dur-2), box-shadow var(--dur-2);
}
.field textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent); }
.field [aria-invalid="true"] { border-color: #B3261E; }
.hint { font-size: .88rem; color: var(--ink-3); margin: 0; }
.err { font-size: .9rem; color: #B3261E; font-weight: 600; margin: 0; min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ CQ band (home) */
.cq-band { position: relative; overflow: hidden; background: radial-gradient(circle at 85% 10%, #2C3E62 0, transparent 50%), var(--t-bg); color: var(--t-ink); padding-top: clamp(64px, 9vw, 120px); }
.cq-band-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.cq-logo { width: 116px; height: 116px; border-radius: 50%; background: #fff; margin-bottom: 24px; box-shadow: 0 0 0 6px rgba(255, 255, 255, .18); }
.cq-band .eyebrow { color: var(--cq-yellow); }
.cq-band h2 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.cq-band-copy > p { color: var(--t-soft); font-size: 1.12rem; max-width: 34rem; }
.cq-stats { display: flex; gap: 40px; margin: 28px 0 32px; }
.cq-stats p { display: flex; flex-direction: column; margin: 0; }
.cq-stats strong { font-family: var(--font-display); font-size: clamp(2.8rem, 5vw, 4rem); line-height: 1; color: var(--cq-yellow); }
.cq-stats span { font-size: .9rem; color: var(--t-soft); }
.marquee { margin-top: clamp(56px, 8vw, 96px); padding-block: 28px 44px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-track img { width: 140px; border-radius: 3px 6px 6px 3px; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .55); transition: transform var(--dur-3) var(--ease-spring); }
.marquee-track li:nth-child(odd) img { transform: rotate(-2.5deg); }
.marquee-track li:nth-child(even) img { transform: rotate(2deg) translateY(10px); }
.marquee-track a:hover img { transform: translateY(-10px) rotate(0); }
@keyframes marquee { to { transform: translateX(calc(-50% - 14px)); } }
@media (max-width: 860px) { .cq-band-inner { grid-template-columns: 1fr; } }

/* quick question card */
.quiz { position: relative; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); background: #FFFCF8; color: var(--ink); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .5); transform: rotate(1.5deg); transition: transform var(--dur-3) var(--ease-spring); }
.quiz:hover { transform: rotate(0); }
.quiz::before { content: "?"; position: absolute; right: 18px; top: -34px; font-family: var(--font-serif); font-style: italic; font-size: 6.5rem; line-height: 1; color: var(--marigold); opacity: .8; }
.quiz-label { font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--tomato-ink); }
.quiz-q { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; max-width: 14em; }
.quiz-a { padding: 16px 18px; border-radius: var(--radius-sm); background: #F1E8DA; color: var(--ink-2); margin-bottom: 16px; animation: pop-in var(--dur-3) var(--ease-spring); }
.quiz-a p { margin: 0; }
.btn--quiz { --b-bg: var(--ink); --b-ink: #FFFFFF; }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ Curious Quest page */
.cq-hero { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(circle at 80% 20%, #2C3E62 0, transparent 50%), var(--t-bg); color: var(--t-ink); padding-block: clamp(56px, 8vw, 110px); }
.cq-hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.cq-hero-logo { width: 140px; height: 140px; border-radius: 50%; background: #fff; margin-bottom: 26px; box-shadow: 0 0 0 8px rgba(255, 255, 255, .16); animation: bob 5s var(--ease-in-out) infinite; }
.cq-title { font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 800; }
.cq-hero .lede { color: var(--t-soft); }
.cq-hero-stack { position: relative; height: 420px; }
.cq-hero-stack img { position: absolute; width: 190px; left: 50%; top: 50%; border-radius: 3px 6px 6px 3px; box-shadow: 0 30px 50px -18px rgba(0, 0, 0, .6);
  transform: translate(-50%, -50%) translateX(calc((var(--n) - 1.5) * 70px)) translateY(calc((var(--n) - 1.5) * 12px)) rotate(calc((var(--n) - 1.5) * 8deg));
  animation: fan-in 1.1s var(--ease-spring) both; animation-delay: calc(var(--n) * 90ms + 200ms); }
@keyframes fan-in { from { opacity: 0; transform: translate(-50%, -30%) rotate(0); } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
.cq-confetti { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cq-confetti { opacity: .45; }
.cq-confetti i { position: absolute; left: calc(var(--x) * 1%); top: -20px; width: 10px; height: 18px; border-radius: 3px; background: var(--cq-yellow); opacity: .7; transform: rotate(calc(var(--r) * 1deg)); animation: fall 14s linear infinite; animation-delay: calc(var(--d) * -1.4s); }
.cq-confetti i:nth-child(3n) { background: var(--cq-pink); }
.cq-confetti i:nth-child(3n + 1) { background: var(--cq-green); width: 12px; height: 12px; border-radius: 50%; }
@keyframes fall { to { transform: translateY(110vh) rotate(calc(var(--r) * 1deg + 540deg)); } }
@media (max-width: 860px) { .cq-hero-inner { grid-template-columns: 1fr; } .cq-hero-stack { height: 300px; } .cq-hero-stack img { width: 140px; } }

.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promise { padding: 32px 28px; border-radius: var(--radius); background: var(--t-tint); }
.promise { background: #FFFCF8; border: 1px solid var(--line); }
.promise-n { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 2.6rem; color: var(--accent); line-height: 1; }
.promise h3 { margin-top: 18px; font-size: 1.5rem; }
.promise p { color: var(--ink-2); margin: 0; }
@media (max-width: 800px) { .promises { grid-template-columns: 1fr; } }
.cq-quizzes { background: var(--t-bg); color: var(--t-ink); }
.cq-quizzes .section-head .eyebrow { color: var(--cq-yellow); }
.quiz-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.quiz-grid li:nth-child(2) .quiz { transform: rotate(-1.5deg); }
.quiz-grid li:nth-child(3) .quiz { transform: rotate(1deg); }
@media (max-width: 900px) { .quiz-grid { grid-template-columns: 1fr; max-width: 520px; } }

/* ------------------------------------------------------------ filters */
.filters { margin-bottom: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; font-weight: 600; font-size: .95rem; cursor: pointer; transition: background-color var(--dur-2), color var(--dur-2), border-color var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.field--inline { position: relative; min-width: 220px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23231A17' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; cursor: pointer; }
.field--search { flex: 1; max-width: 420px; }
.field--search .icon { position: absolute; left: 14px; bottom: 15px; color: var(--ink-3); pointer-events: none; }
.field--search input { padding-left: 42px; }
.filter-count { margin: 16px 0 0; color: var(--ink-3); font-weight: 600; }
.empty { text-align: center; padding: 48px 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius); }
.empty-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; margin-bottom: 4px; }

/* ------------------------------------------------------------ page heroes */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 100px) clamp(8px, 2vw, 20px); }
.page-hero + .section--tight { padding-top: clamp(24px, 3vw, 40px); }
.page-hero .lede { margin-bottom: 0; }
.page-hero::after { display: none; content: ""; position: absolute; right: -120px; top: -120px; width: 460px; height: 460px; border-radius: 50%; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--marigold) 45%, transparent) 0 10deg, transparent 10deg 22.5deg);
  -webkit-mask: radial-gradient(circle, transparent 0 22%, #000 23% 60%, transparent 61%); mask: radial-gradient(circle, transparent 0 22%, #000 23% 60%, transparent 61%);
  animation: spin 120s linear infinite; }
.page-hero h1 { max-width: 13em; }
.page-hero--plain::after { display: none; }
.page-hero--404 { text-align: center; padding-block: clamp(80px, 12vw, 160px); }
.page-hero--404 h1, .page-hero--404 .lede { margin-inline: auto; }
.page-hero--404::after { display: none; }
.page-hero--404 .hero-ctas { justify-content: center; }
.nf-mark { display: grid; place-items: center; margin-bottom: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.mark--spin { animation: spin 90s linear infinite; }

.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: .9rem; font-weight: 600; margin-bottom: 22px; color: var(--ink-3); }
.crumbs a { text-decoration: none; color: inherit; }
.crumbs a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ book page */
.book-hero { background: linear-gradient(180deg, var(--t-tint) 0, var(--paper) 100%); padding-block: clamp(40px, 6vw, 88px); }
.book-hero-inner { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: clamp(32px, 7vw, 96px); align-items: start; }
.book-hero-cover { position: sticky; top: calc(var(--header-h) + 24px); perspective: 1400px; }
.tilt--large .cover { box-shadow: 0 2px 2px rgba(0, 0, 0, .12), 0 50px 70px -30px rgba(35, 26, 23, .6); }
.tilt { transform-style: preserve-3d; }
.book-hook { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--accent); margin-bottom: .4em; }
.theme-jonathan .book-hook { color: #8A5E00; }
.book-title { font-size: clamp(2.4rem, 5vw, 4.2rem); margin-bottom: .2em; }
.book-sub { font-size: 1.15rem; color: var(--ink-2); font-weight: 500; }
.book-by { font-size: 1.1rem; }
.book-by a { font-weight: 700; }
.book-desc { margin: 28px 0; font-size: 1.12rem; max-width: 38rem; }
.book-desc p:first-child { font-family: var(--font-serif); font-size: 1.75rem; line-height: 1.25; letter-spacing: -.01em; }
.book-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 22px 0; border-block: 1px solid var(--line); }
.book-cta .btn { min-width: 220px; }
.cta-note { margin: 0; font-size: .9rem; color: var(--ink-3); }
.book-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px 24px; margin: 24px 0; }
.book-details dt { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.book-details dd { margin: 4px 0 0; font-weight: 600; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; min-height: 36px; align-items: center; padding: 4px 14px; border-radius: 999px; background: var(--paper-2); font-size: .9rem; font-weight: 600; text-decoration: none; transition: background-color var(--dur-2); }
.tag:hover { background: var(--paper-3); }
.ph-note { padding: 12px 16px; border-radius: var(--radius-sm); background: #FFF2CC; border: 1px solid #E8C97A; font-weight: 600; }
@media (max-width: 800px) {
  .book-hero-inner { grid-template-columns: 1fr; }
  .book-hero-cover { position: static; max-width: 210px; margin-inline: auto; }
  .book-cta .btn { width: 100%; }
}

.about-author { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 40px); align-items: center; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: var(--t-tint); }
.about-author h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.about-author p { max-width: 40rem; color: var(--ink-2); }
.about-author .monogram { width: 120px; height: 120px; font-size: 2.6rem; }
@media (max-width: 600px) { .about-author { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ about, contact, prose */
.about-teaser { background: var(--paper-2); }
.about-teaser-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 7vw, 96px); align-items: center; }
.about-teaser h2 { max-width: 13em; }
.about-teaser p { font-size: 1.12rem; color: var(--ink-2); max-width: 38rem; }
.about-teaser-mark .mark { width: clamp(160px, 22vw, 260px); height: auto; }
@media (max-width: 760px) { .about-teaser-inner { grid-template-columns: 1fr; } .about-teaser-mark .mark { width: 140px; } }

.prose-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.prose { font-size: 1.1rem; max-width: 42rem; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose--legal { font-size: 1.04rem; }
.prose--legal h2 { font-size: 1.6rem; }
.values { position: sticky; top: calc(var(--header-h) + 24px); padding: 32px; border-radius: var(--radius); background: var(--teal); color: #F4EEE2; }
.values-h { font-size: 1.8rem; }
.values ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.values li { padding-left: 28px; position: relative; color: rgba(244, 238, 226, .86); }
.values li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; border-radius: 50%; background: var(--marigold); }
.values strong { color: #FFFFFF; }
.values .btn { --b-bg: var(--marigold); --b-ink: #2A1A06; }
@media (max-width: 860px) { .prose-grid { grid-template-columns: 1fr; } .values { position: static; } }

.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-form { display: grid; gap: 20px; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: #FFFDF9; box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.contact-form .btn { justify-self: start; }
.req-note { margin: 0; font-size: .88rem; color: var(--ink-3); }
.form-status { margin: 0; font-weight: 700; min-height: 1.2em; }
.form-status.is-ok { color: #1E6B37; }
.form-status.is-err { color: #B3261E; }
.form-summary { padding: 16px 18px; border-radius: var(--radius-sm); background: #FDECEA; border: 1px solid #F1B0AA; color: #7A1A14; }
.form-summary ul { margin: 6px 0 0; padding-left: 20px; }
.form-summary a { color: inherit; font-weight: 700; }
.contact-aside { display: grid; gap: 16px; }
.contact-card { padding: 28px; border-radius: var(--radius); background: var(--paper-2); }
.contact-card h2 { font-size: 1.5rem; }
.contact-card p { color: var(--ink-2); }
.contact-sent { text-align: left; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ footer */
.site-footer { background: #1A1512; color: #E9DFD0; padding-bottom: 32px; }
.footer-road { height: 4px; background: var(--tomato); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-block: 64px 48px; }
.footer-brand p { color: rgba(233, 223, 208, .72); max-width: 24rem; margin-top: 18px; }
.footer-h { font-family: var(--font-body); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--marigold); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer ul a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; color: rgba(233, 223, 208, .86); transition: color var(--dur-2); }
.site-footer ul a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-fine { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; border-top: 1px solid rgba(233, 223, 208, .14); font-size: .86rem; color: rgba(233, 223, 208, .62); }
.footer-fine p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ------------------------------------------------------------ page transitions */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 220ms var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 420ms var(--ease-out) both; }
::view-transition-group(*) { animation-duration: 480ms; animation-timing-function: var(--ease-out); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-title { opacity: 1; }
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none !important; }
  .cq-confetti, .theme-miranda .author-hero-fx::before { display: none; }
  @view-transition { navigation: none; }
}
.nl-embed { display: grid; gap: 12px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: #FFFFFF; color: #231A17; }
.nl-embed .nl-fine { color: #5C524E; }

/* reader bonus pages (hidden, linked from printed books) */
.page-bonus .bonus { min-height: 72vh; display: grid; align-items: center; padding-block: clamp(48px, 8vw, 110px); }
.bonus h1 { margin-top: 10px; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.bonus-cover { width: clamp(130px, 18vw, 190px); margin-bottom: 26px; transform: rotate(-3deg); }
.bonus-cover .cover { box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.bonus-grownups { font-size: .98rem !important; font-style: italic; }
.bonus-more p { margin: 0; text-align: center; font-size: 1.05rem; }

/* series without book numbers */
.reading-order--free .reading-item { grid-template-columns: 150px 1fr; }
@media (max-width: 640px) { .reading-order--free .reading-item { grid-template-columns: 100px 1fr; } .reading-order--free .reading-item > div { grid-column: auto; } }

/* a book that is not on Amazon yet */
.btn--soon { cursor: default; opacity: .75; pointer-events: none; }
