/* Books O' Plenty
   Big, bold and playful (in the spirit of Discord's site) in the icon's indigo, with amber for warmth.
   Light and dark follow the system; the toggle in the nav overrides it (data-theme on <html>). */

:root {
  --page: #f5f3ff;
  --page-2: #ece9ff;
  --card: #ffffff;
  --card-2: #f1efff;
  --line: rgb(60 50 160 / 12%);
  --text: #16163f;
  --text-2: #55568a;
  --brand: #5146c9;
  --brand-hi: #6c5ff0;
  --on-brand: #ffffff;
  --amber: #e58a33;
  --rose: #e0567a;
  --star: #7d70f5;
  --row-bg: #ffffff;
  --row-border: rgb(81 70 201 / 8%);
  --row-shadow: 0 40px 80px -40px rgb(50 40 150 / 35%);
  --sky: radial-gradient(ellipse 55% 60% at 85% 10%, rgb(255 196 140 / 45%), transparent 70%),
         radial-gradient(ellipse 70% 70% at 10% 0%, rgb(140 128 255 / 35%), transparent 70%),
         linear-gradient(180deg, #e4e0ff 0%, #f5f3ff 85%);

  /* Names the shared components use. */
  --tile: var(--card);
  --tile-2: var(--card-2);
  --hairline: var(--line);
  --indigo: var(--brand);
  --tile-shadow: 0 1px 2px rgb(40 30 120 / 6%), 0 18px 40px -24px rgb(40 30 120 / 30%);
  --snip-shadow: 0 2px 6px rgb(40 30 120 / 8%), 0 24px 48px -20px rgb(40 30 120 / 35%);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  /* SF Pro, expanded and black, on Macs; heavy grotesques elsewhere. */
  --display: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", "Arial Black", sans-serif;
}

/* The night palette: dark mode, and the night bands in either mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0d0e2b;
    --page-2: #13154a;
    --card: #1c1f5e;
    --card-2: #262a78;
    --line: rgb(255 255 255 / 10%);
    --text: #ffffff;
    --text-2: #c5c7f3;
    --brand: #6c5ff0;
    --brand-hi: #8b80ff;
    --star: #ffffff;
    --row-bg: linear-gradient(135deg, rgb(108 95 240 / 30%), rgb(108 95 240 / 8%));
    --row-border: rgb(255 255 255 / 9%);
    --row-shadow: 0 40px 80px -40px rgb(0 0 0 / 70%);
    --sky: radial-gradient(ellipse 55% 60% at 85% 10%, rgb(240 150 70 / 18%), transparent 70%),
           radial-gradient(ellipse 80% 70% at 15% 0%, rgb(108 95 240 / 55%), transparent 70%),
           linear-gradient(180deg, #1b1f72 0%, #0d0e2b 90%);
    --tile-shadow: 0 1px 0 rgb(255 255 255 / 5%) inset;
    --snip-shadow: 0 24px 48px -20px rgb(0 0 0 / 70%);
  }
}
:root[data-theme="dark"] {
    --page: #0d0e2b;
    --page-2: #13154a;
    --card: #1c1f5e;
    --card-2: #262a78;
    --line: rgb(255 255 255 / 10%);
    --text: #ffffff;
    --text-2: #c5c7f3;
    --brand: #6c5ff0;
    --brand-hi: #8b80ff;
    --star: #ffffff;
    --row-bg: linear-gradient(135deg, rgb(108 95 240 / 30%), rgb(108 95 240 / 8%));
    --row-border: rgb(255 255 255 / 9%);
    --row-shadow: 0 40px 80px -40px rgb(0 0 0 / 70%);
    --sky: radial-gradient(ellipse 55% 60% at 85% 10%, rgb(240 150 70 / 18%), transparent 70%),
           radial-gradient(ellipse 80% 70% at 15% 0%, rgb(108 95 240 / 55%), transparent 70%),
           linear-gradient(180deg, #1b1f72 0%, #0d0e2b 90%);
    --tile-shadow: 0 1px 0 rgb(255 255 255 / 5%) inset;
    --snip-shadow: 0 24px 48px -20px rgb(0 0 0 / 70%);
  }


.night {
  --card: #1c1f5e;
  --card-2: #262a78;
  --line: rgb(255 255 255 / 10%);
  --text: #ffffff;
  --text-2: #c5c7f3;
  --brand: #6c5ff0;
  --star: #ffffff;
  --tile: var(--card);
  --tile-2: var(--card-2);
  --hairline: var(--line);
  --indigo: var(--brand);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; text-wrap: balance; }

:focus-visible { outline: 3px solid var(--brand-hi); outline-offset: 3px; border-radius: 10px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* The big, wide, heavy headline voice. */
.display {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.98;
}

/* Light and dark versions of a screenshot. */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }


/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--page) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 1px 0 var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .nav.scrolled { background: var(--page); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.05rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }

.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a[aria-current="page"] { color: var(--brand); }

.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }


@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 480px) { .nav-end .pill { display: none; } }

/* ---------- Pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1;
  white-space: nowrap;
  border: 0;
  transition: transform 0.15s var(--ease), box-shadow 0.2s ease, background-color 0.2s ease;
}
.pill:hover { text-decoration: none; transform: translateY(-2px); }
.pill:active { transform: scale(0.97); transition-duration: 0.08s; }
.pill svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill-white {
  background: #fff;
  color: #16163f;
  box-shadow: 0 10px 30px -12px rgb(40 30 120 / 35%);
}
.pill-brand { background: var(--brand); color: #fff; }
.pill-brand:hover { background: var(--brand-hi); box-shadow: 0 10px 30px -10px var(--brand); }
.pill-small { padding: 0.6rem 1.2rem; font-size: 0.92rem; }
span.pill:hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .pill, .pill:hover, .pill:active { transform: none; transition: none; }
}

/* ---------- Stars ---------- */

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.star {
  position: absolute;
  width: var(--s);
  height: var(--s);
  background: var(--star);
  opacity: var(--o, 0.6);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0c.6 5.4 4 9 10 10-6 1-9.4 4.6-10 10-.6-5.4-4-9-10-10 6-1 9.4-4.6 10-10z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0c.6 5.4 4 9 10 10-6 1-9.4 4.6-10 10-.6-5.4-4-9-10-10 6-1 9.4-4.6 10-10z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: twinkle var(--d, 5s) ease-in-out var(--delay, 0s) infinite;
}
.star.dot { border-radius: 50%; -webkit-mask: none; mask: none; }
@keyframes twinkle {
  0%, 100% { opacity: var(--o, 0.6); transform: scale(1); }
  50% { opacity: calc(var(--o, 0.6) * 0.35); transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) { .star { animation: none; } }

/* ---------- Hero ---------- */

.sky {
  position: relative;
  background: var(--sky);
  overflow: hidden;
}

.hero { margin-top: -76px; padding: calc(76px + clamp(3rem, 7vw, 6rem)) 0 clamp(3rem, 6vw, 5rem); }

.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 0.9fr 1.1fr; }
}

.hero h1 { font-size: clamp(2.7rem, 6.2vw, 5rem); }
.hero h1 .warm { color: var(--amber); }
.hero-copy p {
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 32rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}
.hero-meta {
  margin-top: 1.2rem;
  font-size: 0.92rem;
  color: var(--text-2);
}

.hero-art { position: relative; }
.hero-art .window {
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line), 0 50px 90px -40px rgb(20 15 80 / 60%);
}
.hero-art .cat {
  /* Asleep on the window's top edge, front paws just over it. */
  position: absolute;
  width: clamp(96px, 12vw, 150px);
  right: 12%;
  top: 0;
  transform: translateY(calc(-100% + 0.35em));
  font-size: clamp(10px, 1.2vw, 16px);
  filter: drop-shadow(0 3px 3px rgb(0 0 0 / 18%));
}
.hero-art .mug {
  position: absolute;
  width: clamp(48px, 6vw, 70px);
  left: -2%;
  bottom: -6%;
  filter: drop-shadow(0 8px 10px rgb(0 0 0 / 25%));
}

/* ---------- Shelf band ---------- */

.shelf-band { position: relative; padding-bottom: 1rem; text-align: center; }
.shelf-band .shelf-stage { margin-inline: 0; }
.shelf-band .shelf-stage { margin-top: 0; }

/* ---------- Feature rows ---------- */

.rows {
  display: grid;
  gap: clamp(5rem, 10vw, 8.5rem);
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.row {
  position: relative;
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(14px, 2.4vw, 28px);
  border-radius: clamp(28px, 4vw, 48px);
  background: var(--row-bg);
  border: 1px solid var(--row-border);
  box-shadow: var(--row-shadow);
}
@media (min-width: 900px) {
  .row { grid-template-columns: 1.3fr 1fr; }
  .row-flip { grid-template-columns: 1fr 1.3fr; }
  .row-flip .row-media { order: 2; }
}

.row-media {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(20px, 4vw, 48px);
  border-radius: clamp(20px, 3vw, 36px);
  background: var(--panel);
}
.row-media img {
  border-radius: 12px;
  box-shadow: 0 30px 50px -22px rgb(20 10 60 / 55%);
}
.p-amber { --panel: linear-gradient(135deg, #f8b862, #e2566e); }
.p-violet { --panel: linear-gradient(135deg, #8b80ff, #4a40c2); }
.p-green { --panel: linear-gradient(135deg, #6bd6a4, #1f8f74); }
.p-rose { --panel: linear-gradient(135deg, #f592b6, #9c48d6); }
.p-sky { --panel: linear-gradient(135deg, #82cdff, #4f63d9); }

.row-copy { padding: clamp(0.5rem, 2vw, 1.5rem) clamp(0.5rem, 2vw, 2rem) clamp(1.5rem, 2vw, 1.5rem); }
.row-copy h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.row-copy p {
  margin-top: 1.2rem;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--text-2);
}
.row-copy p + p { margin-top: 0.8rem; }

/* Illustrations that sit on a card's top edge. */
.peek {
  position: absolute;
  top: 0;
  z-index: 2;
  transform: translateY(-82%);
  pointer-events: none;
  filter: drop-shadow(0 6px 6px rgb(0 0 0 / 15%));
}
.peek-right { right: clamp(24px, 8%, 90px); }
.peek-left { left: clamp(24px, 8%, 90px); }
.peek svg { display: block; height: auto; }

/* Snippets inside panels */
.row-media .crop-covers { width: 100%; }
.row-media .crop-inspector { width: min(300px, 100%); }
.stack-snips { display: grid; gap: 1rem; justify-items: center; }
.stack-snips img { width: min(320px, 100%); }

.mock-search { width: min(100%, 32rem); }
.row-media .mock-search { color: var(--text); }
.panel-card {
  width: min(100%, 26rem);
  background: var(--card);
  color: var(--text);
  border-radius: 22px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 30px 50px -22px rgb(20 10 60 / 55%);
}

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.checks li:last-child { border-bottom: 0; }
.checks li::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--green, #3fb27f)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 0.95rem no-repeat;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.chips span {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--card-2);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Night band: the reading year ---------- */

.night-band {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 8rem) 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgb(255 190 130 / 35%), transparent 70%),
    radial-gradient(ellipse 80% 60% at 0% 30%, rgb(140 128 255 / 30%), transparent 70%),
    linear-gradient(180deg, #e4e0ff, #f5f3ff);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .night-band {
    background:
      radial-gradient(ellipse 60% 40% at 50% 0%, rgb(240 150 70 / 16%), transparent 70%),
      radial-gradient(ellipse 80% 60% at 0% 30%, rgb(108 95 240 / 45%), transparent 70%),
      linear-gradient(180deg, #171a63, #0d0e2b);
  }
}
:root[data-theme="dark"] .night-band {
    background:
      radial-gradient(ellipse 60% 40% at 50% 0%, rgb(240 150 70 / 16%), transparent 70%),
      radial-gradient(ellipse 80% 60% at 0% 30%, rgb(108 95 240 / 45%), transparent 70%),
      linear-gradient(180deg, #171a63, #0d0e2b);
  }

.center-head {
  position: relative;
  max-width: 48rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.center-head h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.center-head p {
  margin-top: 1.2rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--text-2);
}

.shot {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
}
.shot img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgb(20 15 80 / 55%);
}
.shot figcaption {
  margin-top: 1rem;
  text-align: center;
  color: var(--text-2);
  font-size: 0.95rem;
}

.points {
  position: relative;
  list-style: none;
  width: min(1120px, 100%);
  margin: clamp(2.5rem, 5vw, 3.5rem) auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}
.points li {
  padding: 1.4rem 1.5rem;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-2);
  line-height: 1.5;
}
.points strong {
  display: block;
  color: var(--text);
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.library-head { margin-top: clamp(4.5rem, 9vw, 6.5rem); }
.library-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }

.profile {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(0.8rem, 2vw, 1.4rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  display: grid;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  box-shadow: 0 40px 80px -30px rgb(20 15 80 / 45%);
}
.profile img { width: 100%; }
.aside {
  position: relative;
  margin-top: 2.2rem;
  text-align: center;
  color: var(--text-2);
  font-size: 1.1rem;
}
.aside strong { color: var(--text); }

/* ---------- Light or dark ---------- */

.mac { padding: clamp(5rem, 10vw, 8rem) 0; }
.mac .center-head h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.compare { max-width: 1120px; margin: 0 auto; }

.mac-pills {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  max-width: 54rem;
}
.mac-pills li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 600;
  box-shadow: var(--tile-shadow);
}
.mac-pills svg { width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Closing ---------- */

.closing {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0 0;
  text-align: center;
}
.closing h2 { position: relative; font-size: clamp(2.4rem, 6vw, 4.6rem); }
.closing p {
  position: relative;
  max-width: 34rem;
  margin: 1.4rem auto 0;
  font-size: 1.2rem;
  color: var(--text-2);
}
.closing .actions { justify-content: center; position: relative; }
.closing .nook { position: relative; margin: clamp(3rem, 6vw, 4rem) auto -6px; }

.later {
  position: relative;
  margin-top: 2.6rem;
}
.later p {
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-2);
}
.devices {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.devices li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 600;
  box-shadow: var(--tile-shadow);
}
.devices svg { width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #4a40c2, #3a32a8);
  color: #fff;
  padding: clamp(3.5rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer { background: linear-gradient(180deg, #2c2a9a, #1e1d78); }
}
:root[data-theme="dark"] .footer { background: linear-gradient(180deg, #2c2a9a, #1e1d78); }

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
.footer h3 {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: rgb(255 255 255 / 70%);
  margin-bottom: 0.9rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer a { color: #fff; }
.footer-brand p { margin-top: 0.9rem; color: rgb(255 255 255 / 80%); font-size: 0.95rem; max-width: 18rem; }
.footer .brand { color: #fff; }
.fineprint {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 18%);
  display: grid;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgb(255 255 255 / 72%);
}

/* ---------- FAQ and privacy pages ---------- */
.kicker {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.doc-sky { padding: calc(76px + clamp(3rem, 7vw, 5rem)) 0 clamp(3rem, 6vw, 4rem); margin-top: -76px; }
.doc-head { position: relative; max-width: 46rem; }
.doc-head h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
.doc-head p { margin-top: 1.2rem; font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--text-2); }
.doc-head .kicker { margin-top: 0; font-size: 0.9rem; color: #fff; }
.doc {
  width: min(46rem, 100% - 32px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(5rem, 10vw, 7rem);
}
.doc .faq-group:first-child { margin-top: 0; }
.faq-group h2,
.prose h2 {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: 1.35rem;
}
details { border: 1px solid var(--line); }

/* ---------- Little things ---------- */

/* Fairy lights strung along the top of the reading year band. */
.fairy-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}
.fairy-lights svg { display: block; width: 100%; height: auto; overflow: visible; }
.fairy-lights svg > path { stroke: var(--text-2); }
.bulb { animation: glow 3.2s ease-in-out calc(var(--i) * -0.37s) infinite; }
@keyframes glow { 50% { opacity: 0.55; } }

/* A candle flame that flickers. */
.candle .flame {
  transform-origin: 25px 36px;
  animation: flicker 2.4s ease-in-out infinite;
}
.candle .flame + .flame { animation-duration: 1.7s; }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  30% { transform: scale(0.94, 1.06) rotate(-2deg); }
  60% { transform: scale(1.04, 0.95) rotate(2deg); }
}

/* Paw prints wandering into a section. */
.mac { position: relative; }
.paws {
  position: absolute;
  top: clamp(-3.5rem, -4vw, -2rem);
  left: clamp(16px, 7%, 90px);
  width: clamp(150px, 18vw, 230px);
  color: var(--brand);
  opacity: 0.3;
  transform: rotate(-6deg);
  pointer-events: none;
}
.paws svg { display: block; width: 100%; height: auto; fill: currentColor; }

/* A ball of yarn rolled away from the nook. */
.closing { position: relative; }
.yarn {
  position: absolute;
  right: clamp(16px, 7%, 110px);
  bottom: 0;
  width: clamp(110px, 12vw, 150px);
  pointer-events: none;
}
.yarn svg { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .yarn { display: none; } }

/* An illustration beside the FAQ and privacy headings. */
.doc-sky .wrap { position: relative; }
.doc-art {
  position: absolute;
  right: 2%;
  bottom: clamp(-3rem, -4vw, -1.5rem);
  width: clamp(130px, 17vw, 210px);
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgb(20 10 60 / 25%));
}
.doc-art svg { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .doc-art { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .bulb, .candle .flame { animation: none; }
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity 0.4s ease; }
}

@media (prefers-contrast: more) {
  :root { --line: rgb(0 0 0 / 40%); --text-2: var(--text); }
  .row, .mac-pills li, details { border-color: currentColor; }
}


/* ======================== Shared components ======================== */

/* ---------- The bookshelf ---------- */

.shelf-stage {
  position: relative;
  margin: clamp(2rem, 5vw, 3.5rem) -16px 0;
  --book-w: clamp(108px, 13vw, 150px);
}

.shelf {
  position: relative;
  overflow: hidden;
  padding-top: 40px; /* room for a lifted book */
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  /* Books fade out at the edges instead of being cut off. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.shelf.dragging { cursor: grabbing; }
.shelf:focus-visible { outline: none; }
.shelf:focus-visible .shelf-plank { box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 60%, transparent); }

.shelf-track {
  display: flex;
  align-items: flex-end;
  gap: clamp(10px, 1.4vw, 16px);
  width: max-content;
  padding: 0 clamp(24px, 6vw, 80px);
  will-change: transform;
}

.shelf-plank {
  position: relative;
  height: 16px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 25%), transparent 30%),
    repeating-linear-gradient(91deg, transparent 0 60px, rgb(0 0 0 / 4%) 60px 63px, transparent 63px 140px),
    linear-gradient(180deg, #c99a6b, #a8794e);
  box-shadow: 0 14px 22px -10px rgb(70 40 15 / 45%);
}
.shelf-plank::after {
  /* The front edge of the plank. */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
  background: linear-gradient(#8f6440, #74502f);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shelf-plank { background: linear-gradient(180deg, rgb(255 255 255 / 10%), transparent 30%), linear-gradient(180deg, #5d4129, #4a3220); }
  :root:not([data-theme="light"]) .shelf-plank::after { background: linear-gradient(#3a2818, #2c1e12); }
}
:root[data-theme="dark"] .shelf-plank { background: linear-gradient(180deg, rgb(255 255 255 / 10%), transparent 30%), linear-gradient(180deg, #5d4129, #4a3220); }
:root[data-theme="dark"] .shelf-plank::after { background: linear-gradient(#3a2818, #2c1e12); }


.shelf-hint {
  margin-top: 2.2rem;
  font-size: 0.85rem;
  color: var(--text-2);
}
.shelf-hint span { margin: 0 0.3rem; }

/* A book, face out. Colours and motif come from the data in site.js. */
.book {
  position: relative;
  flex: none;
  width: var(--book-w);
  height: calc(var(--book-w) * var(--ratio, 1.5));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2px 6px 6px 2px;
  background: var(--bg);
  color: var(--fg);
  box-shadow:
    inset 3px 0 0 rgb(0 0 0 / 12%),
    inset 4px 0 0 rgb(255 255 255 / 10%),
    0 2px 3px rgb(40 25 10 / 25%),
    0 12px 22px -12px rgb(40 25 10 / 55%);
  transform-origin: 50% 100%;
  /* A spring: settles quickly, a touch of overshoot. */
  transition: transform 0.6s linear(0, 0.21 6%, 0.66 14%, 1.04 24%, 1.13 30%, 1.11 36%, 1.02 47%, 0.98 58%, 1 79%, 1);
}
.book:hover { transform: translateY(-14px) rotate(-1.2deg); }
.book.pressed { transform: translateY(-22px) rotate(-2deg) scale(1.02); transition-duration: 0.35s; }
.shelf.dragging .book:not(.pressed) { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .book { transition: none; }
  .book:hover, .book.pressed { transform: none; }
}

.book-title {
  padding: 13% 10% 0;
  font-family: "New York", "Iowan Old Style", Georgia, serif;
  font-weight: 700;
  font-size: calc(var(--book-w) * 0.105);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-align: center;
}
.book-author {
  padding: 0 8% 9%;
  font-size: calc(var(--book-w) * 0.042);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.85;
}
.motif {
  flex: 1;
  margin: 8% 0;
  position: relative;
}
.motif::before {
  content: "";
  position: absolute;
  background: var(--motif);
}
.m-sun::before {
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  left: 29%;
  top: 50%;
  transform: translateY(-50%);
}
.m-waves::before {
  inset: 18% 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 6q6-6 12 0t12 0' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 24px 12px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 6q6-6 12 0t12 0' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 24px 12px repeat;
}
.m-stripes::before {
  inset: 22% 0;
  background: repeating-linear-gradient(var(--motif) 0 7px, transparent 7px 13px);
}
.m-mountains { margin-bottom: 0; }
.m-mountains::before {
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  clip-path: polygon(0 100%, 30% 25%, 52% 62%, 72% 0, 100% 70%, 100% 100%);
}
.m-dots::before {
  inset: 10% 8%;
  background: radial-gradient(circle, var(--motif) 1.2px, transparent 1.6px) 0 0 / 17px 13px;
  opacity: 0.8;
}
.m-frame { margin: 8% 12%; }
.m-frame::before {
  left: 10%;
  right: 10%;
  top: 55%;
  height: 1.5px;
}
.book.framed::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid var(--motif);
  border-radius: 2px;
  pointer-events: none;
}

/* Things that make a shelf a home. */
.shelf-thing {
  flex: none;
  align-self: flex-end;
  pointer-events: none;
}
.shelf-thing svg { display: block; width: auto; }
.mug svg { height: calc(var(--book-w) * 0.62); }
.plant svg { height: calc(var(--book-w) * 1.05); }
.steam path {
  fill: none;
  stroke: var(--text-2);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
  animation: steam 4.5s ease-in-out infinite;
}
.steam path:nth-child(2) { animation-delay: 1.5s; }
.steam path:nth-child(3) { animation-delay: 3s; }
@keyframes steam {
  0% { opacity: 0; transform: translateY(6px); }
  35% { opacity: 0.45; }
  100% { opacity: 0; transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .steam path { animation: none; opacity: 0.35; }
}

.mock-search {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  max-width: 34rem;
}

.mock-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--tile-2);
  box-shadow: 0 0 0 1px var(--hairline) inset;
  font-size: 0.95rem;
}
.mock-field svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--text-2);
  stroke-width: 2;
  stroke-linecap: round;
}
.token {
  background: color-mix(in srgb, var(--indigo) 16%, transparent);
  color: var(--indigo);
  border-radius: 6px;
  padding: 0.05rem 0.45rem;
  font-weight: 500;
}
.typed { color: var(--text); }
.caret {
  width: 2px;
  height: 1.15em;
  background: var(--indigo);
  margin-left: -0.2rem;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

.mock-suggestions {
  list-style: none;
  margin: 0 0 0 0.6rem;
  padding: 0.4rem;
  width: min(100%, 18rem);
  border-radius: 14px;
  background: var(--tile);
  box-shadow: var(--snip-shadow), 0 0 0 1px var(--hairline);
  font-size: 0.92rem;
}
.mock-suggestions li { padding: 0.35rem 0.6rem; border-radius: 8px; }
.mock-suggestions .on { background: var(--indigo); color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mock-suggestions .on { color: #17132f; }
}
:root[data-theme="dark"] .mock-suggestions .on { color: #17132f; }

.sym { display: inline-block; width: 1.2rem; opacity: 0.7; }

.keys {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  min-height: 8rem;
}
.keys kbd {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 1.9rem;
  color: var(--text);
  background: linear-gradient(var(--tile), var(--tile-2));
  box-shadow: 0 0 0 1px var(--hairline), 0 4px 0 color-mix(in srgb, var(--text) 12%, transparent), 0 10px 20px -8px rgb(70 45 20 / 30%);
}

.sources {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  min-height: 7rem;
  justify-content: center;
}
.sources span {
  background: var(--tile-2);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.sources span:nth-child(2) { margin-left: 1.2rem; }
.sources span:nth-child(3) { margin-left: 2.4rem; }

.isbn {
  min-height: 7rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}
.isbn .bars {
  width: 11rem;
  height: 4rem;
  background: repeating-linear-gradient(90deg,
    var(--text) 0 2px, transparent 2px 4px, var(--text) 4px 5px, transparent 5px 8px,
    var(--text) 8px 11px, transparent 11px 12px, var(--text) 12px 13px, transparent 13px 16px);
  opacity: 0.85;
}
.isbn span {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

.editions {
  min-height: 7rem;
  display: flex;
  align-items: center;
}
.ed {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 4.4rem;
  border-radius: 4px 10px 10px 4px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 10px 20px -10px rgb(70 45 20 / 50%);
}
.ed-en { background: #24315e; }
.ed-nl { background: #c4552f; }
.ed-link {
  width: 2.5rem;
  border-top: 2px dashed var(--text-2);
  margin: 0 0.5rem;
}

/* ---------- Light / dark comparison ---------- */

.compare {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--snip-shadow), 0 0 0 1px var(--hairline);
  touch-action: pan-y;
}
.compare img { width: 100%; }
.compare-dark {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--split));
}
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  margin-left: -1px;
  background: rgb(255 255 255 / 85%);
  box-shadow: 0 0 12px rgb(0 0 0 / 30%);
  pointer-events: none;
}
.compare-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgb(255 255 255 / 75%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgb(0 0 0 / 25%), 0 0 0 0.5px rgb(0 0 0 / 10%);
  transition: transform 0.15s var(--ease);
}
.compare-handle span::before {
  content: "‹ ›";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #3a3028;
}
.compare.dragging .compare-handle span { transform: translate(-50%, -50%) scale(1.12); }

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare:has(.compare-range:focus-visible) .compare-handle span {
  outline: 3px solid var(--indigo);
  outline-offset: 2px;
}

.faq-group { margin-top: 3rem; }
.faq-group h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

details {
  background: var(--tile);
  border-radius: 18px;
  box-shadow: var(--tile-shadow);
  margin-bottom: 0.6rem;
}
summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  font-size: 1.08rem;
  cursor: pointer;
  border-radius: 18px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--tile-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5v9M3.5 8h9' fill='none' stroke='%23e58a33' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 0.85rem no-repeat;
  transition: transform 0.35s var(--ease);
}
details[open] summary::after { transform: rotate(45deg); }
summary:active { background: var(--tile-2); }
details > div {
  padding: 0 1.4rem 1.3rem;
  color: var(--text-2);
}
details code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
}
@media (prefers-reduced-motion: reduce) {
  summary::after { transition: none; }
}

.promises {
  list-style: none;
  margin: 0 0 clamp(3rem, 7vw, 4.5rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.8rem;
}
.promises li {
  background: var(--tile);
  border-radius: 20px;
  box-shadow: var(--tile-shadow);
  padding: 1.3rem 1.4rem;
  color: var(--text-2);
  font-size: 0.98rem;
}
.promises strong {
  display: block;
  color: var(--amber);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.prose h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 2.6rem 0 0.8rem;
}
.prose h2:first-child { margin-top: 0; }
.prose p,
.prose li { color: var(--text-2); }
.prose p + p { margin-top: 0.9rem; }
.prose ul { margin: 0.9rem 0; padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose strong { color: var(--text); font-weight: 600; }


/* ---------- The reading nook ---------- */

.nook {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto 1.5rem;
}
.nook svg { display: block; width: 100%; height: auto; overflow: visible; }
.nook .steam path {
  fill: none;
  stroke: var(--text-2);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.nook-glow { mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nook-glow { mix-blend-mode: screen; opacity: 0.9; }
}
:root[data-theme="dark"] .nook-glow { mix-blend-mode: screen; opacity: 0.9; }

.closing h2 { margin-top: 0.5rem; }
