/* DibsDabs website — shared stylesheet. No external resources. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-VariableFont.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --ink: #101112;
  --muted: rgba(0, 0, 0, .63);
  --faint: rgba(0, 0, 0, .45);

  --bg: #ffffff;
  --surface: #fbfbfb;
  --surface-2: #f6f7f7;
  --line: #eeeff1;
  --line-2: #e3e4e7;

  --teal: #00B3CA;
  --accent-text: #008697;
  --coral: #FA6353;
  --on-teal: #0B1A1D;

  --btn-bg: #101112;
  --btn-text: #ffffff;
  --btn-hover: #2a2c2e;

  --tint-teal: #E3F7FA;
  --tint-sage: #E0FCED;
  --tint-gold: #FFF3CC;
  --tint-coral: #FEEEEC;
  --tint-purple: #F0EDFF;
  --tint-lavender: #E6EFF7;

  --cover-teal: #00B3CA;
  --cover-sage: #4CCB91;
  --cover-gold: #FFC83D;
  --cover-coral: #FA6353;
  --cover-purple: #9B8CF5;
  --cover-lavender: #84AACF;
  --cover-ink: #0B1A1D;

  --mark-bg: #FFF3CC;
  --mark-text: #5c4300;

  --ring: 0 0 0 1px rgba(0, 0, 0, .06);
  --shadow-sm: 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .05);
  --shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .06), 0 16px 40px rgba(0, 0, 0, .08);

  --r-btn: 10px;
  --r-card: 14px;
  --r-card-lg: 16px;
  --r-tag: 6px;

  --dur: 150ms;
  --dur-press: 75ms;

  --maxw: 1160px;
  --gutter: 20px;
  --header-h: 64px;
}

/* Light is the default; dark only when the visitor picks it (theme toggle). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ededee;
  --muted: rgba(237, 237, 238, .68);
  --faint: rgba(237, 237, 238, .50);

  --bg: #101112;
  --surface: #18191b;
  --surface-2: #1d1e21;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .12);

  --accent-text: #00B3CA;

  --btn-bg: #ededee;
  --btn-text: #101112;
  --btn-hover: #ffffff;

  --tint-teal: #12302f;
  --tint-sage: #142d22;
  --tint-gold: #332b14;
  --tint-coral: #36201d;
  --tint-purple: #25213a;
  --tint-lavender: #1c2633;

  --mark-bg: #4a3c10;
  --mark-text: #ffe7a3;

  --ring: 0 0 0 1px rgba(255, 255, 255, .08);
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .08), 0 2px 6px rgba(0, 0, 0, .3);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 12px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "ss03";
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 1px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: var(--r-btn);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 28px; height: 28px; flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--r-btn);
  transition: color var(--dur) ease, background-color var(--dur) ease;
}
.nav a:not(.btn):hover { color: var(--ink); background: var(--surface-2); }
.nav .btn { margin-left: 8px; }

@media (max-width: 720px) {
  .nav a.nav-link { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--r-btn);
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: background-color var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur-press) ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn-hover); }

.btn-teal { background: var(--teal); color: var(--on-teal); }
.btn-teal:hover { background: #12bfd5; }

.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 -1px 0 var(--line); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: 40px; }
.section-head p { margin-top: 16px; font-size: 18px; color: var(--muted); }

.accent-bar {
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--teal);
  margin-bottom: 20px;
}
.center .accent-bar { margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-text);
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 30px; }
  .section-head p { font-size: 17px; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 12ch;
}
.hero-lede {
  margin-top: 24px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 34em;
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.text-link {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.text-link:hover { color: var(--accent-text); }
.text-link svg { width: 16px; height: 16px; transition: transform var(--dur) ease; }
.text-link:hover svg { transform: translateX(2px); }

.hero-facts {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-facts li {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--r-tag);
  padding: 6px 10px;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual .backdrop {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(440px, 100%);
  height: 78%;
  background: var(--tint-teal);
  border-radius: 999px 999px 24px 24px;
}
.hero-visual .float-cover {
  position: absolute;
  width: 120px;
  z-index: 1;
}
.hero-visual .float-cover.one { left: 2%; top: 22%; transform: rotate(-6deg); }
.hero-visual .float-cover.two { right: 0; bottom: 14%; transform: rotate(5deg); }

@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 14ch; }
}
@media (max-width: 720px) {
  .hero { padding: 40px 0 64px; }
  .hero h1 { font-size: 36px; line-height: 1.1; }
  .hero-lede { font-size: 17px; margin-top: 16px; }
  .hero-actions { margin-top: 24px; }
  .hero-facts { margin-top: 28px; }
  .hero-visual { min-height: 480px; }
  .hero-visual .float-cover { width: 76px; z-index: 3; }
  .hero-visual .float-cover.one { left: 6px; top: 12%; }
  .hero-visual .float-cover.two { right: 6px; bottom: 8%; }
}

/* ---------- Phone mockup ---------- */
.phone {
  position: relative;
  z-index: 2;
  width: 268px;
  aspect-ratio: 268 / 548;
  border-radius: 40px;
  background: #101112;
  padding: 10px;
  box-shadow: var(--shadow), 0 30px 60px rgba(0, 0, 0, .12);
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  background: #ffffff;
  color: #101112;
  display: flex;
  flex-direction: column;
  padding: 36px 16px 16px;
}
.phone-screen.shot { padding: 0; background: #f6f3ee; }
.phone-screen.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.phone-screen::before {
  content: "";
  position: absolute;
  top: 10px; left: 50%;
  width: 72px; height: 20px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: #101112;
}
.ps-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: rgba(0, 0, 0, .55);
}
.ps-dots { display: flex; gap: 4px; margin: 10px 0 14px; }
.ps-dots span { flex: 1; height: 3px; border-radius: 2px; background: #e3e4e7; }
.ps-dots span.on { background: #00B3CA; }

.ps-card {
  flex: 1;
  border-radius: 16px;
  background: #E3F7FA;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
}
.ps-kicker { font-size: 11px; font-weight: 500; color: #006b78; }
.ps-title { margin-top: 8px; font-size: 18px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.ps-bar { width: 28px; height: 3px; border-radius: 2px; background: #00B3CA; margin: 12px 0; }
.ps-body { font-size: 12.5px; line-height: 1.55; color: rgba(0, 0, 0, .7); }
.ps-reactions { margin-top: auto; display: flex; gap: 8px; }
.ps-reactions span {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #ffffff;
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}
.ps-reactions svg { width: 15px; height: 15px; }

.ps-player {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #f6f7f7;
}
.ps-play {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  background: #101112;
  display: grid; place-items: center;
}
.ps-play svg { width: 12px; height: 12px; }
.ps-meta { flex: 1; min-width: 0; }
.ps-meta b { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-meta i { display: block; font-style: normal; font-size: 10.5px; color: rgba(0, 0, 0, .5); }
.ps-progress { height: 3px; border-radius: 2px; background: #e3e4e7; margin-top: 6px; overflow: hidden; }
.ps-progress span { display: block; width: 38%; height: 100%; background: #00B3CA; }

@media (max-width: 720px) {
  .phone { width: 236px; border-radius: 36px; }
  .phone-screen { border-radius: 27px; }
}

/* ---------- Book covers ---------- */
.tile {
  position: relative;
  margin: 0;
  border-radius: var(--r-card-lg);
  background: var(--surface-2);
  aspect-ratio: 1 / 1.08;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.tile .dome {
  position: absolute;
  left: 13%; right: 13%;
  top: 30%; bottom: 0;
  border-radius: 999px 999px 0 0;
  background: var(--tint-teal);
}
.tile .cover-img {
  position: relative;
  margin-top: 12%;
  width: 54%;
}
.tile--teal .dome { background: var(--tint-teal); }
.tile--sage .dome { background: var(--tint-sage); }
.tile--gold .dome { background: var(--tint-gold); }
.tile--coral .dome { background: var(--tint-coral); }
.tile--purple .dome { background: var(--tint-purple); }
.tile--lavender .dome { background: var(--tint-lavender); }

/* Real title covers (cdn.dibsdabs.com, rendered from design/covers). */
.cover-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px 6px 6px 4px;
  background: var(--surface-2);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .05),
    0 6px 14px rgba(0, 0, 0, .10),
    0 18px 36px rgba(0, 0, 0, .10);
}

/* ---------- Value props ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr; gap: 16px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg);
  border-radius: var(--r-card-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 20px; margin-top: 20px; }
.card p { margin-top: 8px; color: var(--muted); }

.icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--tint-teal);
  color: var(--ink);
}
.icon svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sage { background: var(--tint-sage); }
.icon--gold { background: var(--tint-gold); }
.icon--coral { background: var(--tint-coral); }
.icon--purple { background: var(--tint-purple); }
.icon--lavender { background: var(--tint-lavender); }

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  background: var(--bg);
  border-radius: var(--r-card-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--on-teal);
  font-weight: 600;
  font-size: 15px;
}
.steps h3 { font-size: 20px; margin-top: 20px; }
.steps p { margin-top: 8px; color: var(--muted); }

.facts {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-radius: var(--r-card-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.fact { padding: 28px; text-align: center; }
.fact + .fact { box-shadow: -1px 0 0 var(--line); }
.fact b {
  display: block;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.fact span { display: block; margin-top: 6px; color: var(--muted); font-size: 15px; }
@media (max-width: 720px) {
  .facts { grid-template-columns: 1fr; margin-top: 32px; }
  .fact + .fact { box-shadow: 0 -1px 0 var(--line); }
  .fact { padding: 20px; }
  .fact b { font-size: 30px; }
}

/* ---------- Category chips ---------- */
.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 880px;
  margin-inline: auto;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
.chip::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--teal));
}
.chip.c-sage { --dot: var(--cover-sage); }
.chip.c-gold { --dot: var(--cover-gold); }
.chip.c-coral { --dot: var(--cover-coral); }
.chip.c-purple { --dot: var(--cover-purple); }
.chip.c-lavender { --dot: var(--cover-lavender); }

.note-center { margin-top: 32px; text-align: center; color: var(--muted); }

/* ---------- Formats ---------- */
.format {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card-lg);
  padding: 28px;
  background: var(--tint-teal);
  min-height: 260px;
}
.format.f-sage { background: var(--tint-sage); }
.format.f-gold { background: var(--tint-gold); }
.format.f-purple { background: var(--tint-purple); }
.format .tag {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--r-tag);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--ring);
}
.format h3 { font-size: 22px; margin-top: auto; padding-top: 40px; }
.format p { margin-top: 8px; color: var(--muted); }

.extras {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: center;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}
.extras li { display: inline-flex; align-items: center; gap: 8px; }
.extras svg {
  width: 18px; height: 18px;
  fill: none; stroke: var(--accent-text); stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Moments ---------- */
.moment {
  border-radius: var(--r-card-lg);
  background: var(--bg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.moment h3 { font-size: 18px; margin-top: 16px; }
.moment p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ---------- Plans ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; gap: 16px; } }
.plan {
  border-radius: var(--r-card-lg);
  padding: 32px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.plan.featured { box-shadow: var(--shadow); }
.plan h3 { font-size: 24px; }
.plan .plan-sub { margin-top: 6px; color: var(--muted); }
.plan ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.plan li { display: flex; gap: 12px; align-items: flex-start; }
.plan li svg {
  flex: none; width: 20px; height: 20px; margin-top: 2px;
  fill: none; stroke: var(--accent-text); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.plan .plan-foot { margin-top: auto; padding-top: 28px; color: var(--faint); font-size: 14px; }
.plan .badge {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--r-tag);
  background: var(--tint-teal);
  color: var(--ink);
  letter-spacing: 0;
}

/* ---------- Shelf ---------- */
.shelf {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px 20px;
}
@media (max-width: 960px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; } }
.shelf .book-meta { margin-top: 12px; }
.shelf .book-meta b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.shelf .book-meta span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.shelf .book-meta em { display: block; margin-top: 4px; font-style: normal; font-size: 13px; color: var(--faint); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border-radius: var(--r-card);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.faq details + details { margin-top: 12px; }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  border-radius: var(--r-card);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur) ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq .answer { padding: 0 24px 22px; color: var(--muted); }
.faq .answer p + p { margin-top: 10px; }

/* ---------- Download / CTA ---------- */
.cta-band {
  border-radius: 24px;
  background: var(--tint-teal);
  padding: 64px 32px;
  text-align: center;
}
.cta-band h2 { font-size: 40px; max-width: 18ch; margin: 0 auto; }
.cta-band p { margin: 16px auto 0; max-width: 36em; color: var(--muted); font-size: 18px; }
.cta-band .store-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-btn);
  background: var(--bg);
  box-shadow: var(--ring);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
.store-pill small { color: var(--faint); font-size: 13px; font-weight: 500; }
.cta-band .btn { margin-top: 28px; }
@media (max-width: 720px) {
  .cta-band { padding: 48px 20px; border-radius: 20px; }
  .cta-band h2 { font-size: 30px; }
  .cta-band p { font-size: 17px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  box-shadow: 0 -1px 0 var(--line);
  padding: 64px 0 40px;
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-about p { margin-top: 12px; color: var(--muted); max-width: 30em; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  box-shadow: 0 -1px 0 var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-size: 14px;
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }

.site-footer.compact { padding: 28px 0; }
.site-footer.compact .footer-bottom { margin-top: 0; padding-top: 0; box-shadow: none; }

/* ---------- Legal pages ---------- */
.legal-header .container { max-width: 1000px; }
.legal-header .back {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.legal-header .back:hover { color: var(--ink); }
.legal-header .back svg { width: 16px; height: 16px; }

.legal {
  max-width: 712px;
  margin: 0 auto;
  padding: 56px var(--gutter) 96px;
  font-size: 17px;
  line-height: 1.7;
}
.legal h1 { font-size: 40px; letter-spacing: -0.03em; }
.legal .updated { margin-top: 12px; color: var(--muted); font-size: 15px; }
.legal .intro { margin-top: 24px; }
.legal .callout {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: var(--r-card);
  background: var(--surface-2);
  box-shadow: var(--ring);
  font-size: 16px;
}
.legal .callout strong { font-weight: 600; }
.legal h2 {
  font-size: 24px;
  margin-top: 56px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.legal h3 { font-size: 18px; margin-top: 28px; letter-spacing: -0.01em; }
.legal p, .legal ul, .legal ol { margin: 14px 0 0; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal strong { font-weight: 600; }

.toc {
  margin-top: 32px;
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.toc h2 { font-size: 16px; margin: 0; letter-spacing: 0; }
.toc ol {
  margin: 12px 0 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.5;
  columns: 2;
  column-gap: 32px;
}
.toc li { break-inside: avoid; margin: 0 0 6px; }
.toc a { color: var(--accent-text); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

.table-wrap { overflow-x: auto; margin-top: 16px; border-radius: var(--r-card); box-shadow: var(--ring); }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; }
.legal th { font-weight: 600; background: var(--surface-2); }
.legal tr + tr td { box-shadow: 0 -1px 0 var(--line); }

mark.placeholder {
  background: var(--mark-bg);
  color: var(--mark-text);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

@media (max-width: 720px) {
  .legal { padding-top: 36px; font-size: 16px; }
  .legal h1 { font-size: 32px; }
  .legal h2 { font-size: 21px; margin-top: 44px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .btn:active { transform: none; }
}

/* Theme toggle in the header */
.theme-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer; transition: background var(--dur), color var(--dur);
}
.theme-toggle:hover { background: var(--surface-2); color: var(--ink); }
.theme-toggle:focus-visible { outline: 1px solid var(--accent-text); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.legal-header .back { margin-left: auto; margin-right: 4px; }

/* ---------- Multi-page site ---------- */
.nav a[aria-current="page"] { color: var(--ink); }

/* Mobile menu (no JS): a <details> dropdown that replaces the nav links below 720px. */
.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px; color: var(--ink);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; }
.menu[open] summary { background: var(--surface-2); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px;
  display: grid; background: var(--bg); border-radius: var(--r-card); box-shadow: var(--shadow);
}
.menu-panel a { padding: 12px 14px; border-radius: 8px; color: var(--ink) !important; text-decoration: none; font-weight: 500; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--surface-2); }
@media (max-width: 720px) {
  .menu { display: block; }
  .nav { gap: 2px; }
  .nav .btn { margin-left: 4px; padding: 8px 12px; }
}
@media (max-width: 360px) { .nav .btn { display: none; } }

.crumbs { max-width: var(--maxw); margin: 0 auto; padding: 20px var(--gutter) 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--faint); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: 48px; letter-spacing: -0.03em; max-width: 20ch; }
.page-head .lede { margin-top: 16px; font-size: 19px; color: var(--muted); max-width: 40em; }
.page-head .eyebrow { display: block; }
.section-tight { padding-top: 40px; }
.more { margin-top: 32px; }
@media (max-width: 720px) {
  .page-head { padding-top: 28px; }
  .page-head h1 { font-size: 34px; }
  .page-head .lede { font-size: 17px; }
  .section-tight { padding-top: 28px; }
}

a.chip { text-decoration: none; transition: box-shadow var(--dur) ease, transform var(--dur-press) ease; }
a.chip:hover { box-shadow: var(--shadow); }
a.chip[aria-current="page"] { background: var(--btn-bg); color: var(--btn-text); }
.chips + .book-grid, .chips + .az-jump { margin-top: 40px; }

.shelf-item, .book-card { display: block; color: inherit; text-decoration: none; }
.shelf-item:hover b, .book-card:hover b { text-decoration: underline; text-underline-offset: 3px; }

.book-grid {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 20px;
}
.book-card b { display: block; margin-top: 12px; font-weight: 600; font-size: 15px; line-height: 1.3; }
.book-card span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.book-card em { display: block; margin-top: 4px; font-style: normal; font-size: 13px; color: var(--faint); }
@media (max-width: 560px) { .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } }

.col-grid, .cat-grid {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px;
}
.col-card, .cat-card {
  display: flex; flex-direction: column; height: 100%; padding: 24px; border-radius: var(--r-card-lg);
  background: var(--tint-teal); color: var(--ink); text-decoration: none;
  transition: box-shadow var(--dur) ease;
}
.col-card:hover, .cat-card:hover { box-shadow: var(--shadow); }
.col-card .tag {
  align-self: flex-start; font-size: 13px; font-weight: 500; padding: 4px 8px; border-radius: var(--r-tag);
  background: var(--bg); box-shadow: var(--ring);
}
.col-card b, .cat-card b { display: block; margin-top: 28px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.col-card > span:last-child, .cat-card > span { margin-top: 6px; color: var(--muted); font-size: 15px; }
.f-sage { background: var(--tint-sage); }
.f-gold { background: var(--tint-gold); }
.f-coral { background: var(--tint-coral); }
.f-purple { background: var(--tint-purple); }
.f-lavender { background: var(--tint-lavender); }
.cat-covers { display: flex; justify-content: center; padding-top: 8px; }
.cat-covers .cover-img { width: 30%; margin: 0 -3%; }
.cat-covers .cover-img:nth-child(1) { transform: rotate(-6deg); }
.cat-covers .cover-img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-6px); }
.cat-covers .cover-img:nth-child(3) { transform: rotate(6deg); }

/* A-Z */
.az-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; }
.az-jump a {
  display: grid; place-items: center; min-width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px;
}
.az-jump a:hover { background: var(--tint-teal); }
.az { columns: 3 280px; column-gap: 40px; }
.az-group { break-inside: avoid-column; margin-bottom: 28px; }
.az-group h2 { font-size: 22px; margin-bottom: 8px; scroll-margin-top: calc(var(--header-h) + 16px); }
.az-group ul { list-style: none; margin: 0; padding: 0; }
.az-group li { padding: 5px 0; line-height: 1.35; break-inside: avoid; }
.az-group a { color: var(--ink); text-decoration: none; font-weight: 500; }
.az-group a:hover { color: var(--accent-text); text-decoration: underline; }
.az-group span { display: block; font-size: 14px; color: var(--faint); }

/* Book page */
.book { padding: 32px 0 80px; }
.book-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; align-items: start; }
.book-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.book-main { max-width: 680px; }
.book-main .eyebrow { text-decoration: none; }
.book-main .eyebrow:hover { text-decoration: underline; }
.book-main h1 { font-size: 44px; letter-spacing: -0.03em; }
.book-main .h1-sub { color: var(--faint); font-weight: 500; }
.book-main .byline { margin-top: 12px; color: var(--muted); }
.book-main .subtitle { margin-top: 4px; color: var(--faint); font-style: italic; }
.book-main h2 { font-size: 24px; margin-top: 44px; }
.one-line { margin-top: 32px; padding: 20px 24px; border-radius: var(--r-card); background: var(--tint-teal); }
.one-line h2 { margin-top: 0; font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--accent-text); }
.one-line p { margin-top: 6px; font-size: 18px; line-height: 1.5; font-weight: 500; }
.prose { font-size: 17px; line-height: 1.75; }
.prose p { margin-top: 16px; }
.locked { margin-top: 44px; padding: 28px; border-radius: var(--r-card-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.locked h2 { margin-top: 0; font-size: 20px; }
.chapters { list-style: none; margin: 16px 0 24px; padding: 0; display: grid; gap: 10px; }
.chapters li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.chapters b { color: var(--ink); font-weight: 600; }
.chapters svg { flex: none; width: 18px; height: 18px; margin-top: 3px; fill: none; stroke: var(--faint); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.facts-list { margin: 12px 0 0; padding-left: 22px; color: var(--muted); }
.facts-list li + li { margin-top: 10px; }
.also { margin-top: 32px; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) {
  .book { padding-top: 20px; }
  .book-layout { grid-template-columns: 1fr; gap: 28px; }
  .book-aside { position: static; width: 180px; }
  .book-main h1 { font-size: 34px; }
  .book-main h2 { font-size: 21px; margin-top: 36px; }
  .prose { font-size: 16px; }
}

/* Collection rows */
.book-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; max-width: 860px; }
.book-rows li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px; border-radius: var(--r-card-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.book-rows h2 { font-size: 20px; }
.book-rows h2 a { color: var(--ink); text-decoration: none; }
.book-rows h2 a:hover { text-decoration: underline; }
.book-rows .by { margin-top: 4px; font-size: 14px; color: var(--faint); }
.book-rows p:not(.by) { margin-top: 8px; color: var(--muted); }
@media (max-width: 520px) { .book-rows li { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 16px; } }

/* Guide steps */
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 48px; }
.guide-step h2 { display: flex; align-items: center; gap: 12px; font-size: 24px; }
.step-no { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--teal); color: var(--on-teal); font-size: 15px; }
.step-sub { margin: 6px 0 20px 44px; color: var(--muted); }

.steps h2 { font-size: 20px; margin-top: 20px; }
.plan h2 { font-size: 24px; }

.footer-cats { margin-top: 40px; }
.footer-cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.footer-cats a { color: var(--faint); text-decoration: none; }
.footer-cats a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { margin-top: 24px; }
