/* ==========================================================================
   Dot Merriweather — site design layer.
   Every color, size, radius and shadow resolves to a token in tokens.css.
   Nothing here moves on its own: no autoplay, no parallax, no pop-ups.
   ========================================================================== */

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 32px;
  -webkit-font-smoothing: antialiased;
}

/* Large-print courtesy: three reading sizes, persisted by site.js */
html[data-textsize="lg"]  { font-size: 112.5%; }
html[data-textsize="xl"]  { font-size: 125%; }

img { max-width: 100%; height: auto; }

.dm-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--marigold-ink); color: var(--on-fill);
  padding: var(--space-3) var(--space-5); border-radius: 0 0 var(--radius-md) 0;
  font-weight: 700; z-index: 60;
}
.dm-skip:focus { left: 0; }

a { color: var(--link); }

/* ---------- Layout shell ---------- */
.dm-shell { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--space-5); }
.dm-section { padding: var(--space-9) 0; }
.dm-section-tight { padding: var(--space-8) 0; }
.dm-band-cream { background: var(--cream); }
.dm-band-linen { background: var(--linen); }
.dm-band-honey { background: var(--honey-soft); }
.dm-band-sage  { background: var(--sage-soft); }

/* Section opener: eyebrow, display heading, lede */
.dm-open { max-width: 46em; margin: 0 0 var(--space-7); }
.dm-open .display, .dm-open .title { margin: var(--space-2) 0 var(--space-3); }
.dm-open .dm-lede { font-size: 1.5rem; line-height: 2.125rem; margin: 0; }

/* The two-dot signature used as a section divider */
.dm-divider {
  display: flex; align-items: center; justify-content: center; gap: var(--space-4);
  padding: var(--space-6) 0 0;
}
.dm-divider::before, .dm-divider::after {
  content: ""; height: 2px; background: var(--line); flex: 1; max-width: 220px;
}
.dm-divider .dm-dots { font-size: 20px; }

/* ---------- Utility bar: reading controls ---------- */
.dm-utility { background: var(--linen); border-bottom: 2px solid var(--line); }
.dm-utility-in {
  max-width: var(--page-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding: var(--space-2) var(--space-5); flex-wrap: wrap;
}
.dm-utility p { margin: 0; font-size: 16px; line-height: 24px; color: var(--ink-soft); }
.dm-utility-foot { background: transparent; border-bottom: 0; border-top: 2px solid var(--line); }

/* ---------- Header ---------- */
.dm-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
.dm-header-in {
  max-width: var(--page-width); margin: 0 auto;
  display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-3) var(--space-5);
  min-height: 72px;
}
.dm-brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.dm-brand img.mark { width: 40px; height: 40px; display: block; }
.dm-brand img.wordmark { height: 26px; width: auto; display: block; }
.dm-nav { display: flex; gap: var(--space-5); margin-left: auto; align-items: center; flex-wrap: wrap; }
.dm-nav a {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; line-height: 28px;
  padding: var(--space-2) 2px; border-bottom: 3px solid transparent;
}
.dm-nav a:hover { border-bottom-color: var(--marigold); }
.dm-nav a[aria-current="page"] { border-bottom-color: var(--porch-green-deep); color: var(--porch-green-deep); }

/* Reading controls: text size + contrast */
.dm-controls { display: flex; align-items: center; gap: var(--space-3); }
.dm-ctl-group {
  display: inline-flex; align-items: center; gap: 2px;
  border: 2px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 2px; background: var(--paper);
}
.dm-ctl-group button {
  font-family: var(--font-display); font-weight: 700; color: var(--ink);
  background: transparent; border: 0; border-radius: var(--radius-pill);
  min-width: 44px; min-height: 40px; cursor: pointer; line-height: 1;
}
.dm-ctl-group button[aria-pressed="true"] { background: var(--marigold-ink); color: var(--on-fill); }
.dm-ctl-group button:nth-child(1) { font-size: 15px; }
.dm-ctl-group button:nth-child(2) { font-size: 18px; }
.dm-ctl-group button:nth-child(3) { font-size: 21px; }
.dm-contrast {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-4);
  border: 2px solid var(--line-strong); border-radius: var(--radius-pill);
  background: var(--paper); color: var(--ink); font-weight: 700; font-size: 16px;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.dm-contrast[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Hero ---------- */
.dm-hero {
  display: grid; grid-template-columns: 1.12fr 0.88fr;
  gap: var(--space-8); align-items: center;
  padding: var(--space-9) 0 var(--space-8);
}
.dm-hero h1 { margin: var(--space-3) 0 var(--space-4); font-size: 4rem; line-height: 4.5rem; }
.dm-hero .dm-lede { font-size: 1.5rem; line-height: 2.125rem; margin: 0 0 var(--space-6); max-width: 26em; }
.dm-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.dm-trust {
  display: flex; flex-wrap: wrap; gap: var(--space-5);
  margin: var(--space-7) 0 0; padding: 0; list-style: none;
  font-size: 18px; line-height: 28px; color: var(--ink-soft);
}
.dm-trust li { display: flex; align-items: center; gap: var(--space-2); }
.dm-trust img { width: 24px; height: 24px; }

/* The cover, lit by the porch light */
.dm-hero-art { position: relative; display: flex; justify-content: center; }
.dm-hero-art::before {
  content: ""; position: absolute; inset: -8% -14%;
  background: radial-gradient(closest-side, #c07a1a33, #c07a1a14 55%, transparent 78%);
  pointer-events: none;
}
[data-theme="high-contrast"] .dm-hero-art::before { display: none; }
.dm-hero-art .dm-book { width: min(340px, 78vw); position: relative; }
.dm-hero-art .dm-badge-float {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  z-index: 2;
}

/* ---------- Promise columns ---------- */
.dm-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.dm-col { display: flex; flex-direction: column; gap: var(--space-3); }
.dm-col img { width: 48px; height: 48px; }
.dm-col h3 { margin: 0; }
.dm-col p { margin: 0; color: var(--ink-soft); }

/* ---------- First-page excerpt ---------- */
.dm-excerpt { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-7); align-items: start; }
.dm-excerpt-art {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-6); text-align: center;
}
.dm-excerpt-art img { width: 100%; max-width: 420px; }
.dm-excerpt-art figcaption { font-size: 16px; line-height: 24px; color: var(--ink-soft); margin-top: var(--space-3); }
.dm-excerpt .body-lg { max-width: var(--measure-read); }
.dm-excerpt .body-lg p { margin: 0 0 var(--space-4); }
.dm-dropcap::first-letter {
  font-family: var(--font-display); font-weight: 700; font-size: 4.75rem; line-height: 4rem;
  float: left; padding: 6px 12px 0 0; color: var(--marigold-deep);
}

/* ---------- Story index ---------- */
.dm-storylist { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4) var(--space-6); align-items: start; }
.dm-story {
  border: 2px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper); overflow: hidden;
}
.dm-story > button {
  width: 100%; display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4); background: transparent; border: 0; cursor: pointer;
  text-align: left; font-family: var(--font-body); color: var(--ink);
}
.dm-story > button:hover { background: var(--cream); }
.dm-story .num {
  font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 24px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--marigold-deep);
  min-width: 88px;
}
.dm-story .t { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 30px; flex: 1; }
.dm-story .chev { font-size: 20px; color: var(--ink-soft); transition: transform 120ms ease; }
.dm-story[open] .chev, .dm-story.is-open .chev { transform: rotate(180deg); }
.dm-story .peek { display: none; padding: 0 var(--space-4) var(--space-5); }
.dm-story.is-open .peek { display: block; }
.dm-story .peek .art {
  background: var(--cream); border-radius: var(--radius-md); padding: var(--space-4);
  display: flex; justify-content: center; margin-bottom: var(--space-4);
}
.dm-story .peek .art img { max-height: 190px; width: auto; aspect-ratio: 5 / 4; }
.dm-story .peek .teaser { font-style: italic; color: var(--ink-soft); margin: 0 0 var(--space-4); }
.dm-story .peek .dm-question { max-width: none; padding: var(--space-4); }

/* ---------- Neighbors ---------- */
.dm-neighbors { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.dm-neighbor {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2);
}
.dm-neighbor h3 { margin: 0; font-size: 24px; line-height: 32px; }
.dm-neighbor p { margin: 0; color: var(--ink-soft); font-size: 18px; line-height: 28px; }
.dm-neighbor .who {
  font-family: var(--font-body); font-weight: 700; font-size: 16px; line-height: 24px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--porch-green-deep);
}

/* ---------- Gift + reading-circle bands ---------- */
.dm-band-in {
  max-width: var(--page-width); margin: 0 auto; padding: var(--space-8) var(--space-5);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-7); align-items: center;
}
.dm-facts { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.dm-facts li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 20px; line-height: 32px; }
.dm-facts li::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--marigold-deep); margin-top: 11px; flex: none;
}
.dm-pending {
  margin-top: var(--space-5); font-size: 18px; line-height: 28px; color: var(--ink-soft);
  border-left: 4px solid var(--line-strong); padding-left: var(--space-4);
}

/* ---------- Series shelf ---------- */
.dm-shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); align-items: end; }
.dm-shelf figure { margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.dm-shelf img { width: 100%; border-radius: 4px; box-shadow: var(--shadow-book); }
.dm-shelf img.is-concept { box-shadow: var(--shadow-card); opacity: 0.96; }
.dm-shelf figcaption { font-size: 18px; line-height: 28px; color: var(--ink-soft); }
.dm-shelf figcaption b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 22px; line-height: 30px; }
.dm-shelf .soon {
  display: inline-block; margin-top: var(--space-2);
  font-weight: 700; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--berry); border: 2px solid var(--berry); border-radius: var(--radius-pill);
  padding: 2px var(--space-3);
}

/* ---------- Reader dialog ---------- */
dialog.dm-reader {
  border: 0; padding: 0; background: var(--paper); color: var(--ink);
  width: min(860px, 96vw); max-height: 92vh; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-book);
}
dialog.dm-reader::backdrop { background: #2a2418b3; }
.dm-reader-bar {
  position: sticky; top: 0; display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-6); background: var(--cream);
  border-bottom: 2px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.dm-reader-bar .t { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 30px; flex: 1; }
.dm-reader-body { padding: var(--space-7) var(--space-7) var(--space-8); overflow-y: auto; max-height: calc(92vh - 84px); }
.dm-reader-body .body-lg { max-width: var(--measure-read); margin: 0 auto; }
.dm-reader-body .body-lg p { margin: 0 0 var(--space-4); }
.dm-reader-body img { display: block; margin: 0 auto var(--space-5); max-width: 320px; }
.dm-reader-q { max-width: var(--measure-read); margin: var(--space-6) auto 0; }

/* ---------- Signup ---------- */
.dm-signup { max-width: 680px; margin: 0 auto; }
.dm-signup-ok {
  background: var(--sage-soft); border: 2px solid var(--porch-green-deep);
  border-radius: var(--radius-lg); padding: var(--space-5); margin-top: var(--space-5);
}
.dm-signup-ok h3 { margin: 0 0 var(--space-2); font-family: var(--font-display); font-size: 1.5rem; line-height: 2rem; }
.dm-signup-ok p { margin: 0; }

/* ---------- Footer ---------- */
.dm-footer { background: var(--linen); border-top: 2px solid var(--line); }
.dm-footer-in {
  max-width: var(--page-width); margin: 0 auto; padding: var(--space-8) var(--space-5);
  display: grid; grid-template-columns: 1.2fr 0.8fr 0.8fr; gap: var(--space-7);
}
.dm-footer h2 {
  font-family: var(--font-body); font-weight: 700; font-size: 16px; line-height: 24px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin: 0 0 var(--space-3);
}
.dm-footer p, .dm-footer li { font-size: 18px; line-height: 28px; color: var(--ink-soft); }
.dm-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.dm-footer .fine { font-size: 16px; line-height: 24px; }
.dm-footer img.mark { width: 44px; height: 44px; display: block; margin-bottom: var(--space-3); }

/* ---------- Newsletter page ---------- */
.dm-onepage { max-width: 720px; margin: 0 auto; padding: var(--space-9) var(--space-5); text-align: center; }
.dm-onepage img.mark { width: 72px; height: 72px; margin: 0 auto var(--space-4); display: block; }
.dm-onepage .display { margin: 0 0 var(--space-3); }
.dm-onepage .dm-lede { font-size: 1.5rem; line-height: 2.125rem; margin: 0 auto var(--space-6); max-width: 24em; }
.dm-sample {
  background: var(--cream); border-radius: var(--radius-lg); padding: var(--space-6);
  text-align: left; margin: var(--space-7) 0;
}
.dm-sample .body-lg { font-style: italic; max-width: none; }
.dm-sample p { margin: 0 0 var(--space-3); }
.dm-signup.left { text-align: left; max-width: none; }

/* ---------- Links page ---------- */
.dm-links { max-width: 640px; margin: 0 auto; padding: var(--space-9) var(--space-5); display: grid; gap: var(--space-4); }
.dm-linkrow {
  display: flex; align-items: center; gap: var(--space-4);
  border: 2px solid var(--line-strong); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5); background: var(--paper);
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; line-height: 28px;
  min-height: var(--control-h);
}
.dm-linkrow:hover { background: var(--cream); border-color: var(--marigold-deep); }
.dm-linkrow .go { margin-left: auto; color: var(--ink-soft); }
.dm-linkrow.pending { border-style: dashed; color: var(--ink-soft); background: transparent; cursor: default; }

/* ---------- The reading-size control ----------
   Every text size below is in rem so the A / A / A control (which sets the
   root font-size) scales the whole page's type, exactly as a large-print
   reader expects. Values are the brand scale, expressed against a 16px root. */
body { font-size: 1.25rem; line-height: 2rem; }
.display-xl { font-size: 4rem; line-height: 4.5rem; }
.display { font-size: 3rem; line-height: 3.5rem; }
.title { font-size: 2.25rem; line-height: 2.75rem; }
.heading { font-size: 1.75rem; line-height: 2.25rem; }
.lede, .dm-lede { font-size: 1.5rem; line-height: 2.125rem; }
.author-caps, .dm-author { font-size: 1.125rem; line-height: 1.5rem; }
.body-lg { font-size: 1.375rem; line-height: 2.1875rem; }
.body { font-size: 1.25rem; line-height: 2rem; }
.question { font-size: 1.25rem; line-height: 2rem; }
.body-sm { font-size: 1.125rem; line-height: 1.75rem; }
.label { font-size: 1rem; line-height: 1.5rem; }
.button, .dm-btn { font-size: 1.25rem; line-height: 1.5rem; }
.dm-eyebrow { font-size: 1rem; line-height: 1.5rem; }
.dm-input { font-size: 1.375rem; }
.dm-help { font-size: 1.125rem; line-height: 1.75rem; }
.dm-meta { font-size: 1.125rem; line-height: 1.75rem; }
.dm-badge { font-size: 1rem; }
.dm-contrast { font-size: 1rem; }
.dm-question .dm-q-text { font-size: 1.375rem; line-height: 2.1875rem; }
.dm-question .dm-q-label { font-size: 1rem; line-height: 1.5rem; }
.dm-bookcard h3 { font-size: 2.25rem; line-height: 2.75rem; }
.dm-authorcard h3 { font-size: 1.75rem; line-height: 2.25rem; }
.dm-authorcard p { font-size: 1.25rem; line-height: 2rem; }
.dm-sign { font-size: 1.5rem; }
.dm-signup h3 { font-size: 2.25rem; line-height: 2.75rem; }
.dm-trust { font-size: 1.125rem; line-height: 1.75rem; }
.dm-nav a { font-size: 1.125rem; line-height: 1.75rem; }
.dm-story .t { font-size: 1.375rem; line-height: 1.875rem; }
.dm-story .num { font-size: 1rem; line-height: 1.5rem; }
.dm-story .peek .teaser { font-size: 1.125rem; line-height: 1.75rem; }
.dm-neighbor h3 { font-size: 1.5rem; line-height: 2rem; }
.dm-neighbor p { font-size: 1.125rem; line-height: 1.75rem; }
.dm-neighbor .who { font-size: 1rem; line-height: 1.5rem; }
.dm-facts li { font-size: 1.25rem; line-height: 2rem; }
.dm-pending { font-size: 1.125rem; line-height: 1.75rem; }
.dm-shelf figcaption { font-size: 1.125rem; line-height: 1.75rem; }
.dm-shelf figcaption b { font-size: 1.375rem; line-height: 1.875rem; }
.dm-shelf .soon { font-size: 1rem; }
.dm-footer p, .dm-footer li { font-size: 1.125rem; line-height: 1.75rem; }
.dm-footer .fine { font-size: 1rem; line-height: 1.5rem; }
.dm-footer h2 { font-size: 1rem; line-height: 1.5rem; }
.dm-utility p { font-size: 1rem; line-height: 1.5rem; }
.dm-linkrow { font-size: 1.25rem; line-height: 1.75rem; }
.dm-excerpt-art figcaption { font-size: 1rem; line-height: 1.5rem; }
.dm-reader-bar .t { font-size: 1.375rem; line-height: 1.875rem; }
.dm-field label { font-size: 1rem; line-height: 1.5rem; }
.dm-hero h1 { font-size: 4rem; line-height: 4.5rem; }
.dm-open .dm-lede, .dm-hero .dm-lede, .dm-onepage .dm-lede { font-size: 1.5rem; line-height: 2.125rem; }

/* ---------- Responsive: one column under 820px ---------- */
@media (max-width: 820px) {
  .dm-hero, .dm-excerpt, .dm-band-in { grid-template-columns: 1fr; gap: var(--space-6); }
  .dm-cols, .dm-neighbors, .dm-shelf, .dm-storylist, .dm-footer-in { grid-template-columns: 1fr; }
  .dm-header-in { flex-wrap: wrap; gap: var(--space-3); }
  .dm-nav { margin-left: 0; width: 100%; justify-content: flex-start; gap: var(--space-4); }
  .dm-controls { margin-left: auto; }
  .dm-section { padding: var(--space-8) 0; }
  .display-xl { font-size: 2.75rem; line-height: 3.25rem; }
  .display { font-size: 2.25rem; line-height: 2.75rem; }
  .dm-story .num { min-width: 72px; }
  .dm-authorcard, .dm-bookcard { grid-template-columns: 1fr; text-align: left; }
  .dm-authorcard img { margin: 0 auto; }
  .dm-header { position: static; }
  .dm-hero { padding: var(--space-8) 0 var(--space-7); }
}

/* ---------- Print ---------- */
@media print {
  .dm-header, .dm-controls, .dm-hero-actions, .dm-footer { display: none; }
  body { background: #fff; }
}

/* ==========================================================================
   Interactive layer — every effect here answers a reader's own hand.
   Nothing blinks, slides or fades until somebody asks it to.
   ========================================================================== */

/* Hover lift: a card rises a hair when the reader reaches for it */
@media (prefers-reduced-motion: no-preference) {
  .dm-neighbor, .dm-story, .dm-linkrow, .dm-shelf figure img {
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  }
  .dm-neighbor:hover, .dm-story:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
  .dm-linkrow:hover { transform: translateY(-2px); }
  .dm-btn { transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease; }
  .dm-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
  .dm-btn:active { transform: translateY(0); box-shadow: none; }
}

/* ---------- The porch-light ritual ---------- */
.dm-ritual { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-6); flex-wrap: wrap; }
.dm-lantern-btn {
  display: inline-flex; align-items: center; gap: var(--space-3);
  min-height: var(--control-h); padding: 0 var(--space-5);
  border: 2px solid var(--porch-green-deep); border-radius: var(--radius-pill);
  background: var(--paper); color: var(--porch-green-deep);
  font-family: var(--font-body); font-weight: 700; font-size: 1.125rem; line-height: 1.75rem;
  cursor: pointer;
}
.dm-lantern-btn img { width: 28px; height: 28px; }
.dm-ritual-note { margin: 0; font-style: italic; color: var(--ink-soft); font-size: 1.125rem; line-height: 1.75rem; max-width: 30em; }
.dm-ritual-note.is-lit { color: var(--marigold-ink); }

/* The blink: two soft pulses of the hero glow, only when asked for */
.dm-hero-art .dm-glow {
  position: absolute; inset: -8% -14%; pointer-events: none;
  background: radial-gradient(closest-side, #c07a1a59, #c07a1a26 55%, transparent 78%);
  opacity: 0; transition: opacity 260ms ease;
}
.dm-hero-art.is-lit .dm-glow { opacity: 1; }
[data-theme="high-contrast"] .dm-hero-art .dm-glow { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .dm-hero-art.is-blinking .dm-glow { animation: porch-blink 1.6s ease-in-out 1; }
}
@keyframes porch-blink {
  0%   { opacity: 0; }
  18%  { opacity: 1; }
  34%  { opacity: 0; }
  52%  { opacity: 1; }
  70%  { opacity: 0; }
  100% { opacity: 1; }
}

/* ---------- Story finder ---------- */
.dm-finder { max-width: 34em; margin: 0 0 var(--space-6); }
.dm-finder .label { display: block; margin-bottom: var(--space-2); }
.dm-finder .dm-help { margin-top: var(--space-2); }
.dm-story.is-hidden { display: none; }

/* ---------- The question jar ---------- */
.dm-jar {
  margin-top: var(--space-7); padding: var(--space-6);
  background: var(--cream); border-radius: var(--radius-lg);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: center;
}
.dm-jar-out { max-width: none; margin: 0; }
.dm-jar-out.is-drawn { box-shadow: var(--shadow-card); }

/* ---------- The drawings carousel ---------- */
.dm-carousel-wrap { display: flex; align-items: center; gap: var(--space-4); }
.dm-carousel {
  display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory;
  list-style: none; margin: 0; padding: var(--space-2); flex: 1;
  scrollbar-color: var(--line-strong) var(--cream);
}
.dm-carousel li { scroll-snap-align: start; flex: 0 0 240px; }
.dm-carousel figure { margin: 0; background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.dm-carousel figure .art { background: var(--cream); border-radius: var(--radius-sm); padding: var(--space-3); display: flex; justify-content: center; }
.dm-carousel figure img { max-height: 150px; width: auto; aspect-ratio: 5 / 4; }
.dm-carousel figcaption { font-size: 1rem; line-height: 1.5rem; color: var(--ink-soft); }
.dm-carousel figcaption b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.125rem; line-height: 1.75rem; }
.dm-car-btn { flex: none; min-width: 56px; padding: 0; font-size: 1.375rem; }
.dm-carousel:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* ---------- Neighbor reveal ---------- */
.dm-neighbor .more { display: none; margin: 0; color: var(--ink); font-style: italic; font-size: 1.125rem; line-height: 1.75rem; }
.dm-neighbor.is-open .more { display: block; }
.dm-neighbor-toggle {
  align-self: flex-start; margin-top: var(--space-2);
  background: transparent; border: 0; padding: 0;
  color: var(--link); font-family: var(--font-body); font-weight: 700;
  font-size: 1rem; line-height: 1.5rem; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 2px; cursor: pointer;
}

/* ---------- Reader progress + saved place ---------- */
.dm-progress { height: 6px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; margin: 0 var(--space-6); }
.dm-progress span { display: block; height: 100%; width: 0; background: var(--marigold-deep); }
.dm-reader-note { text-align: center; font-size: 1rem; line-height: 1.5rem; color: var(--ink-soft); margin: var(--space-3) 0 0; }

@media (max-width: 820px) {
  .dm-jar { grid-template-columns: 1fr; }
  .dm-carousel li { flex: 0 0 200px; }
  .dm-car-btn { display: none; }
}
