/* Preparing With Love — chapter & lesson pages (reusable for tiles 1–10)
   Extends PWL visual identity; does not redesign the main landing page.

   Anchor hierarchy (approved artwork only — do not redesign):
   1) Anchor Statement Anchor — optional light teaching takeaway
      (.gh-anchor-statement)
   2) Heirloom Anchor parchment — major reflective pause on chapter AND
      Conversation pages; quotation beneath the graphic comes only from
      chapter/lesson heirloomAnchorQuote (never a hard-coded default)
      (.gh-heirloom-anchor / [data-pwl-heirloom-quote])
   3) Grace Harbor / Completion Anchor — chapter completion & milestones
      (.pwl-landing-tile--complete)

   Reading-column standard (shared by chapter + lesson templates):
   - Large desktop: centered, substantial, not stretched
   - Half-screen / windowed: use most available width
   - Tablet (~768px): ~90% working width
   - Phone (~390–430px): ~92–94% usable width
*/

@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&display=swap");

body.pwl-chapter-site,
body.pwl-lesson-site {
  --pwl-cream: #f3ebe2;
  --pwl-parchment: #f6efe6;
  --pwl-panel: #fdf9f4;
  --pwl-lavender: #7d5f9a;
  --pwl-lavender-bright: #8f6bab;
  --pwl-plum: #4a2d5c;
  --pwl-plum-rich: #5c3470;
  --pwl-body: #2b2b2b;
  --pwl-body-soft: #3a3537;
  --pwl-border: rgba(182, 158, 148, 0.24);
  /* Shared reading column */
  --pwl-edge-pad: clamp(0.85rem, 3.2vw, 1.6rem);
  --pwl-chapter-max: 54rem; /* ~864px — contents band */
  --pwl-lesson-max: 52rem; /* ~832px — lesson reading */
  --pwl-intro-max: 38rem; /* tighter intro card */
  --pwl-heirloom-max: 38.5rem; /* ~616px on large desktop */
  --pwl-section-gap: clamp(1rem, 2.2vw, 1.45rem);
  /*
   * Site .header is position:absolute (css/style.css) and overlays <main>.
   * Measured rendered header height ≈ 103px (~6.44rem) at 1920 and 1100 with
   * the menu closed. Clear that box, then add a small breathing gap so the
   * chapter/lesson identity (program → title → subtitle/meta) is never cropped.
   * Do not shrink this below the header in media queries.
   */
  --pwl-header-offset: 6.5rem;
  --pwl-hero-top: calc(var(--pwl-header-offset) + clamp(0.65rem, 1.5vw, 1.15rem));
  background: var(--pwl-parchment);
}

main.page.pwl-chapter-page,
main.page.pwl-lesson-page {
  position: relative;
  color: var(--pwl-body);
  padding: 0 0 clamp(2.25rem, 4vw, 3rem);
  overflow: visible;
}

/* Chapter pages: keep existing soft fill (landing tiles unchanged). */
main.page.pwl-chapter-page {
  background:
    linear-gradient(180deg, rgba(246, 239, 230, 0.94) 0%, rgba(243, 235, 226, 0.97) 100%),
    url("../images/Preparing%20with%20Love/preparing-with-love-middle-fill.png") center top / 100% auto repeat-y;
}

/* Shared lesson baseline — quiet warm parchment (no wallpaper motif).
   Conversation 1 prototype styling lives under body.pwl-lesson-prototype. */
main.page.pwl-lesson-page {
  background: linear-gradient(180deg, #f6efe6 0%, #f3ebe2 55%, #efe6db 100%);
}

/* —— Shared reading shells —— */
.pwl-chapter-shell,
.pwl-lesson-shell {
  width: min(100% - (var(--pwl-edge-pad) * 2), var(--pwl-chapter-max));
  margin: 0 auto;
  padding: var(--pwl-hero-top) 0 clamp(0.65rem, 1.5vw, 1rem);
  box-sizing: border-box;
}

.pwl-lesson-shell {
  width: min(100% - (var(--pwl-edge-pad) * 2), var(--pwl-lesson-max));
}

/* —— Hero: grouped title → divider → progress —— */
.pwl-chapter-hero,
.pwl-lesson-hero {
  text-align: center;
  margin: 0 0 clamp(0.75rem, 1.6vw, 1.05rem);
}

.pwl-chapter-hero__program,
.pwl-lesson-hero__program {
  margin: 0 0 0.28rem;
  font-family: "Trajan Pro", Cinzel, "Times New Roman", serif;
  font-size: clamp(0.72rem, 1.3vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pwl-lavender);
}

.pwl-chapter-hero__title,
.pwl-lesson-hero__title {
  margin: 0 0 0.4rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.18;
  color: #5c1196;
}

.pwl-chapter-hero__subtitle {
  margin: 0 auto 0.55rem;
  max-width: 34rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-style: italic;
  line-height: 1.42;
  color: var(--pwl-plum-rich);
}

.pwl-lesson-hero__meta {
  margin: 0 0 0.22rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(0.92rem, 1.6vw, 1.05rem);
  letter-spacing: 0.04em;
  color: var(--pwl-lavender);
}

.pwl-lesson-hero__conversation {
  margin: 0 0 0.5rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.22;
  color: var(--pwl-plum);
}

.pwl-chapter-hero__flourish,
.pwl-lesson-hero__flourish {
  display: block;
  width: min(10.5rem, 52%);
  margin: 0.2rem auto 0;
}

.pwl-chapter-hero__flourish img,
.pwl-lesson-hero__flourish img {
  display: block;
  width: 100%;
  height: auto;
}

/* Optional chapter hero image hook */
.pwl-chapter-hero-image {
  margin: 0 auto var(--pwl-section-gap);
  max-width: min(100%, 36rem);
  text-align: center;
}

.pwl-chapter-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.pwl-chapter-hero-image[hidden] {
  display: none !important;
}

/* —— Progress: centered, scales without becoming tiny or sparse —— */
.pwl-chapter-progress {
  margin: 0 auto var(--pwl-section-gap);
  max-width: min(100%, 32rem);
  text-align: center;
}

.pwl-chapter-progress__track {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 0.4rem;
  padding: 0.2rem 0.1rem;
  width: 100%;
  box-sizing: border-box;
}

.pwl-chapter-progress__box {
  position: relative;
  flex: 0 0 auto;
  width: clamp(0.78rem, 1.55vw, 0.95rem);
  height: clamp(0.78rem, 1.55vw, 0.95rem);
  margin: 0;
  padding: 0;
  border: 1px solid rgba(92, 52, 112, 0.42);
  border-radius: 2px;
  background: rgba(253, 249, 244, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 252, 246, 0.7);
  transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.pwl-chapter-progress__box + .pwl-chapter-progress__box {
  margin-left: clamp(0.42rem, 1.35vw, 0.72rem);
}

.pwl-chapter-progress__box + .pwl-chapter-progress__box::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: clamp(0.42rem, 1.35vw, 0.72rem);
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(125, 95, 154, 0.22),
    rgba(125, 95, 154, 0.45)
  );
  transform: translateY(-50%);
  pointer-events: none;
}

.pwl-chapter-progress__box.is-filled {
  background: linear-gradient(160deg, #c4a4d4 0%, #8f6bab 55%, #6d4f88 100%);
  border-color: rgba(74, 45, 92, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(143, 107, 171, 0.18);
}

.pwl-chapter-progress__box[aria-current="step"] {
  box-shadow:
    0 0 0 2px rgba(253, 249, 244, 0.95),
    0 0 0 3px rgba(125, 95, 154, 0.45);
}

.pwl-chapter-progress__label {
  margin: 0;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-style: italic;
  color: var(--pwl-body-soft);
}

/* —— Panels / cards —— */
.pwl-chapter-panel,
.pwl-lesson-panel {
  background:
    linear-gradient(165deg, rgba(253, 249, 244, 0.94) 0%, rgba(246, 235, 225, 0.92) 100%);
  border: 1px solid rgba(125, 95, 154, 0.18);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 246, 0.75),
    0 10px 24px -8px rgba(95, 72, 85, 0.12);
  padding: clamp(0.95rem, 2.2vw, 1.35rem) clamp(0.95rem, 2.4vw, 1.45rem);
  margin: 0 0 var(--pwl-section-gap);
}

/* About this chapter: readable max-width, less empty pad */
.pwl-chapter-intro {
  width: min(100%, var(--pwl-intro-max));
  margin-left: auto;
  margin-right: auto;
  padding: clamp(0.85rem, 2vw, 1.15rem) clamp(0.9rem, 2.2vw, 1.25rem);
}

.pwl-chapter-intro__heading,
.pwl-chapter-contents__heading {
  margin: 0 0 0.55rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 600;
  font-style: italic;
  color: #5c1196;
  text-align: center;
}

.pwl-chapter-intro p,
.pwl-lesson-body p,
.pwl-lesson-after-anchor p {
  margin: 0 0 0.85rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.04rem, 1.85vw, 1.16rem);
  line-height: 1.68;
  color: var(--pwl-body);
}

.pwl-chapter-intro p:last-child,
.pwl-lesson-body p:last-child,
.pwl-lesson-after-anchor p:last-child {
  margin-bottom: 0;
}

.pwl-lesson-body h2,
.pwl-lesson-after-anchor h2 {
  margin: 1.35rem 0 0.5rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.22rem, 2.3vw, 1.42rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  color: #5c1196;
}

.pwl-lesson-body h2:first-child,
.pwl-lesson-after-anchor h2:first-child {
  margin-top: 0.15rem;
}

.pwl-lesson-body h3,
.pwl-lesson-after-anchor h3 {
  margin: 1.1rem 0 0.4rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.24rem);
  font-weight: 600;
  font-style: italic;
  color: var(--pwl-plum-rich);
}

.pwl-lesson-body ul,
.pwl-lesson-body ol,
.pwl-lesson-after-anchor ul,
.pwl-lesson-after-anchor ol {
  margin: 0 0 0.95rem;
  padding-left: 1.2rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.04rem, 1.85vw, 1.16rem);
  line-height: 1.62;
}

.pwl-lesson-body li + li,
.pwl-lesson-after-anchor li + li {
  margin-top: 0.3rem;
}

.pwl-lesson-pending {
  font-style: italic;
  color: var(--pwl-body-soft);
  text-align: center;
}

/* —— Heirloom on chapter + lesson pages: special, not overpowering ——
   Overrides shared .gh-heirloom-anchor 760px default within PWL templates.
   Master artwork: images/BrandAssets/gh-heirloom-anchor-master.png
   Quotation is live HTML overlaid in the blank parchment writing band. */
main.page.pwl-chapter-page .gh-heirloom-anchor,
main.page.pwl-chapter-page [data-pwl-heirloom-anchor],
main.page.pwl-lesson-page .gh-heirloom-anchor,
main.page.pwl-lesson-page [data-pwl-heirloom-anchor] {
  position: relative;
  container-type: inline-size;
  container-name: pwl-heirloom;
  width: min(78%, var(--pwl-heirloom-max));
  max-width: var(--pwl-heirloom-max);
  margin: clamp(0.85rem, 2vw, 1.25rem) auto var(--pwl-section-gap);
}

main.page.pwl-chapter-page .gh-heirloom-anchor img,
main.page.pwl-lesson-page .gh-heirloom-anchor img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

main.page.pwl-chapter-page .gh-heirloom-anchor[hidden],
main.page.pwl-lesson-page .gh-heirloom-anchor[hidden] {
  display: none !important;
}

/* Hide caption only — master artwork remains visible when quote is null */
main.page.pwl-chapter-page .pwl-heirloom-quote[hidden],
main.page.pwl-lesson-page .pwl-heirloom-quote[hidden] {
  display: none !important;
}

/*
 * Live quotation inside the blank parchment writing band only
 * (below HEIRLOOM ANCHOR + gold heart divider; above the bottom border).
 * Vertical band tuned for gh-heirloom-anchor-master.png — not the full image.
 */
main.page.pwl-chapter-page .pwl-heirloom-quote,
main.page.pwl-lesson-page .pwl-heirloom-quote {
  position: absolute;
  left: 50%;
  /* Writing band: below gold heart (~58%) to above bottom ornament (~90%). */
  top: 75%;
  bottom: 10.5%;
  width: 56%;
  max-width: 56%;
  margin: 0;
  padding: 0.15rem 0.35rem;
  box-sizing: border-box;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(0.9rem, 4.1cqi, 1.26rem);
  line-height: 1.3;
  color: #173d5a;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  hyphens: auto;
  pointer-events: none;
  z-index: 2;
}

@supports not (font-size: 1cqi) {
  main.page.pwl-chapter-page .pwl-heirloom-quote,
  main.page.pwl-lesson-page .pwl-heirloom-quote {
    font-size: clamp(0.9rem, 2.05vw, 1.22rem);
  }
}

/* —— Chapter contents —— */
.pwl-chapter-contents {
  width: 100%;
}

.pwl-chapter-contents__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
}

.pwl-chapter-contents__link {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.68rem 0.85rem;
  text-decoration: none;
  color: inherit;
  background: rgba(253, 249, 244, 0.72);
  border: 1px solid rgba(125, 95, 154, 0.16);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pwl-chapter-contents__link:hover,
.pwl-chapter-contents__link:focus-visible {
  border-color: rgba(125, 95, 154, 0.38);
  box-shadow: 0 4px 12px rgba(110, 64, 152, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.pwl-chapter-contents__link.is-explored {
  border-color: rgba(125, 95, 154, 0.28);
  background: linear-gradient(90deg, rgba(196, 164, 212, 0.14), rgba(253, 249, 244, 0.85));
}

.pwl-chapter-contents__num {
  flex: 0 0 auto;
  font-family: "Trajan Pro", Cinzel, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--pwl-lavender);
}

.pwl-chapter-contents__title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.02rem, 1.9vw, 1.14rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--pwl-plum);
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* —— Completion message —— */
.pwl-chapter-complete-note {
  margin: 0 auto var(--pwl-section-gap);
  max-width: min(100%, 32rem);
  padding: 0.75rem 0.95rem;
  text-align: center;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: clamp(1.02rem, 1.8vw, 1.12rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--pwl-plum-rich);
  background: rgba(253, 249, 244, 0.8);
  border: 1px solid rgba(125, 95, 154, 0.2);
  border-radius: 12px;
}

/* —— Anchor Statement (Conversation takeaway) —— */
main.page.pwl-lesson-page .gh-anchor-statement[data-pwl-lesson-anchor-statement] {
  margin: clamp(0.85rem, 2vw, 1.2rem) auto clamp(0.95rem, 2.2vw, 1.35rem);
  max-width: min(100%, 26rem);
}

main.page.pwl-lesson-page .gh-anchor-statement[data-pwl-lesson-anchor-statement][hidden] {
  display: none !important;
}

/* Optional lesson sections inherit the same reading column automatically */
.pwl-lesson-optional {
  margin-top: 0.85rem;
}

.pwl-lesson-optional[hidden] {
  display: none !important;
}

/* —— Navigation —— */
.pwl-lesson-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: clamp(0.85rem, 2vw, 1.15rem) 0 0.45rem;
  text-align: center;
}

.pwl-lesson-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.5rem 0.95rem;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: 1.02rem;
  text-decoration: none;
  color: var(--pwl-plum);
  background: rgba(253, 249, 244, 0.9);
  border: 1px solid rgba(125, 95, 154, 0.28);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pwl-lesson-nav__btn:hover,
.pwl-lesson-nav__btn:focus-visible {
  background: #f7f0fb;
  border-color: rgba(125, 95, 154, 0.45);
  color: #4a2d5c;
  outline: none;
}

.pwl-lesson-nav__btn.is-disabled,
.pwl-lesson-nav__btn[aria-disabled="true"] {
  opacity: 0.42;
  pointer-events: none;
}

.pwl-lesson-nav__btn--primary {
  background: linear-gradient(180deg, #8f6bab 0%, #6d4f88 100%);
  border-color: rgba(74, 45, 92, 0.35);
  color: #fdf9f4;
}

.pwl-lesson-nav__btn--primary:hover,
.pwl-lesson-nav__btn--primary:focus-visible {
  background: linear-gradient(180deg, #9a78b6 0%, #785896 100%);
  color: #fff;
}

.pwl-back-chapter {
  display: block;
  margin: 0.35rem auto 0;
  text-align: center;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: 0.98rem;
  font-style: italic;
  color: var(--pwl-lavender);
  text-decoration: none;
}

.pwl-back-chapter:hover,
.pwl-back-chapter:focus-visible {
  color: var(--pwl-plum);
  text-decoration: underline;
  outline: none;
}

/* After-anchor host retained for compatibility (unused in canonical order) */
.pwl-lesson-after-anchor[hidden] {
  display: none !important;
}

/* Heirloom after navigation — shared spacing; prototype may deepen this */
main.page.pwl-lesson-page .gh-heirloom-anchor[data-pwl-heirloom-placement="after-navigation"] {
  margin-top: clamp(1.35rem, 3vw, 2rem);
  margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
}

.pwl-chapter-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  justify-content: center;
  margin-top: clamp(0.65rem, 1.5vw, 0.95rem);
  margin-bottom: 0.15rem;
}

.pwl-chapter-footer-links .pwl-lesson-nav__btn {
  min-height: 2.45rem;
  padding: 0.45rem 1.05rem;
}

/* —— Breakpoints —— */

/* Half-screen / windowed desktop (~1000–1200, also covers ~769–1199) */
@media (max-width: 1200px) {
  body.pwl-chapter-site,
  body.pwl-lesson-site {
    --pwl-chapter-max: 100%;
    --pwl-lesson-max: 100%;
    --pwl-intro-max: min(100%, 40rem);
    --pwl-heirloom-max: min(34rem, 76%);
    --pwl-edge-pad: clamp(0.95rem, 3.5vw, 1.35rem);
  }

  main.page.pwl-chapter-page .gh-heirloom-anchor,
  main.page.pwl-chapter-page [data-pwl-heirloom-anchor],
  main.page.pwl-lesson-page .gh-heirloom-anchor,
  main.page.pwl-lesson-page [data-pwl-heirloom-anchor] {
    width: min(76%, 34rem);
  }
}

/* Large desktop comfort (~1440+) — already handled by rem maxes; fine-tune heirloom */
@media (min-width: 1400px) {
  body.pwl-chapter-site,
  body.pwl-lesson-site {
    --pwl-heirloom-max: 39rem; /* ~624px */
    --pwl-chapter-max: 54.5rem; /* ~872px */
    --pwl-lesson-max: 52.5rem; /* ~840px */
  }
}

@media (min-width: 720px) {
  .pwl-lesson-nav {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .pwl-lesson-nav__btn--prev {
    justify-self: start;
  }

  .pwl-lesson-nav__btn--home {
    justify-self: center;
  }

  .pwl-lesson-nav__btn--next {
    justify-self: end;
  }
}

/* Tablet ~768 */
@media (max-width: 900px) {
  body.pwl-chapter-site,
  body.pwl-lesson-site {
    --pwl-edge-pad: clamp(0.85rem, 4vw, 1.15rem);
    --pwl-chapter-max: 100%;
    --pwl-lesson-max: 100%;
    --pwl-intro-max: 100%;
    --pwl-heirloom-max: 88%;
    /* Keep header clearance; only tighten the breathing gap slightly. */
    --pwl-hero-top: calc(var(--pwl-header-offset) + clamp(0.55rem, 1.4vw, 0.9rem));
    --pwl-section-gap: clamp(0.9rem, 2.5vw, 1.2rem);
  }

  .pwl-chapter-shell,
  .pwl-lesson-shell {
    width: min(90%, calc(100% - (var(--pwl-edge-pad) * 2)));
  }

  main.page.pwl-chapter-page .gh-heirloom-anchor,
  main.page.pwl-chapter-page [data-pwl-heirloom-anchor],
  main.page.pwl-lesson-page .gh-heirloom-anchor,
  main.page.pwl-lesson-page [data-pwl-heirloom-anchor] {
    width: min(88%, 30rem);
  }

  .pwl-chapter-progress__track {
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }
}

/* Phone ~390–430 */
@media (max-width: 700px) {
  body.pwl-chapter-site,
  body.pwl-lesson-site {
    --pwl-edge-pad: 0.7rem;
    /* Hamburger bar still ≈6.5rem; preserve full identity below it. */
    --pwl-hero-top: calc(var(--pwl-header-offset) + 0.55rem);
    --pwl-section-gap: 0.95rem;
    --pwl-heirloom-max: 92%;
  }

  .pwl-chapter-shell,
  .pwl-lesson-shell {
    width: min(94%, calc(100% - 1.2rem));
  }

  .pwl-chapter-progress {
    max-width: 100%;
  }

  .pwl-chapter-progress__box {
    width: 0.74rem;
    height: 0.74rem;
  }

  .pwl-chapter-progress__box + .pwl-chapter-progress__box {
    margin-left: 0.4rem;
  }

  .pwl-chapter-progress__box + .pwl-chapter-progress__box::before {
    width: 0.4rem;
  }

  main.page.pwl-chapter-page .gh-heirloom-anchor,
  main.page.pwl-chapter-page [data-pwl-heirloom-anchor],
  main.page.pwl-lesson-page .gh-heirloom-anchor,
  main.page.pwl-lesson-page [data-pwl-heirloom-anchor] {
    width: min(92%, 22rem);
    margin-top: 0.75rem;
    margin-bottom: 0.95rem;
  }

  .pwl-chapter-contents__link {
    padding: 0.65rem 0.75rem;
  }

  .pwl-lesson-nav__btn {
    min-height: 2.65rem;
  }
}

/* —— Landing tile completion (shared; applied on preparing-with-love.html) —— */
a.pwl-landing-tile.pwl-landing-tile--complete {
  border-color: rgba(120, 78, 150, 0.5);
  box-shadow:
    inset 0 2px 6px rgba(110, 64, 152, 0.07),
    0 0 0 1px rgba(196, 164, 212, 0.35),
    0 0 18px rgba(168, 130, 190, 0.28),
    0 8px 18px rgba(110, 64, 152, 0.16);
}

a.pwl-landing-tile.pwl-landing-tile--just-completed {
  animation: pwl-tile-complete-glow 1s ease-out 1;
}

@keyframes pwl-tile-complete-glow {
  0% {
    box-shadow:
      inset 0 2px 6px rgba(110, 64, 152, 0.08),
      0 6px 14px rgba(110, 64, 152, 0.18);
  }
  45% {
    box-shadow:
      inset 0 2px 6px rgba(110, 64, 152, 0.07),
      0 0 0 1px rgba(196, 164, 212, 0.45),
      0 0 22px rgba(168, 130, 190, 0.38),
      0 10px 20px rgba(110, 64, 152, 0.18);
  }
  100% {
    box-shadow:
      inset 0 2px 6px rgba(110, 64, 152, 0.07),
      0 0 0 1px rgba(196, 164, 212, 0.35),
      0 0 18px rgba(168, 130, 190, 0.28),
      0 8px 18px rgba(110, 64, 152, 0.16);
  }
}

.pwl-landing-tile__complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  margin: 0.28rem auto 0.05rem;
}

.pwl-landing-tile__complete-ornament {
  display: block;
  width: min(7.5rem, 92%);
  height: auto;
  margin: 0 auto;
  opacity: 0.92;
}

.pwl-landing-tile__complete-label {
  display: block;
  margin: 0;
  font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: 0.04em;
  color: #6d4f88;
}

@media (prefers-reduced-motion: reduce) {
  a.pwl-landing-tile.pwl-landing-tile--just-completed {
    animation: none;
  }

  .pwl-chapter-progress__box,
  .pwl-chapter-contents__link,
  .pwl-lesson-nav__btn {
    transition: none;
  }
}

/* —— Tile 1 shared lavender floral identity (chapter + Conversations 1–8) ——
   Light botanical vocabulary only. Full reading-field / heirloom-hero treatment
   remains gated to body.pwl-lesson-prototype (Conversation 1). */
body.pwl-floral--lavender {
  --pwl-lavender: #7a5a96;
  --pwl-lavender-bright: #8f6bab;
  --pwl-plum: #4a2d5c;
  --pwl-plum-rich: #5c3470;
}

body.pwl-floral--lavender.pwl-chapter-site main.page.pwl-chapter-page {
  background:
    linear-gradient(
      180deg,
      rgba(248, 242, 246, 0.55) 0%,
      rgba(246, 239, 230, 0.92) 28%,
      rgba(243, 235, 226, 0.97) 100%
    ),
    url("../images/Preparing%20with%20Love/preparing-with-love-middle-fill.png") center top / 100% auto repeat-y;
}

body.pwl-floral--lavender .pwl-chapter-shell,
body.pwl-floral--lavender.pwl-lesson-site:not(.pwl-lesson-prototype) .pwl-lesson-shell {
  position: relative;
}

/* Quiet lavender sprig — chapter doorway + non-prototype lesson pages only */
body.pwl-floral--lavender .pwl-chapter-hero::after,
body.pwl-floral--lavender.pwl-lesson-site:not(.pwl-lesson-prototype) .pwl-lesson-hero::after {
  content: "";
  display: block;
  width: min(3.75rem, 18%);
  height: 4.85rem;
  margin: 0.35rem auto 0;
  background: url("../images/Preparing%20with%20Love/pwl-lavender-sprig.png") center / contain no-repeat;
  opacity: 0.4;
  pointer-events: none;
}

body.pwl-floral--lavender .pwl-chapter-contents__link {
  border-color: rgba(125, 95, 154, 0.18);
}

body.pwl-floral--lavender .pwl-chapter-contents__link:hover,
body.pwl-floral--lavender .pwl-chapter-contents__link:focus-visible {
  border-color: rgba(125, 95, 154, 0.34);
  background: rgba(250, 244, 248, 0.55);
}

body.pwl-floral--lavender .pwl-chapter-contents__num {
  color: #5c3470;
}

body.pwl-floral--lavender.pwl-lesson-site:not(.pwl-lesson-prototype) main.page.pwl-lesson-page {
  background: linear-gradient(
    180deg,
    #f7f0e9 0%,
    #f4ebe6 42%,
    #efe6db 100%
  );
}

@media (max-width: 700px) {
  body.pwl-floral--lavender .pwl-chapter-hero::after,
  body.pwl-floral--lavender.pwl-lesson-site:not(.pwl-lesson-prototype) .pwl-lesson-hero::after {
    width: min(3.15rem, 22%);
    height: 4.1rem;
    opacity: 0.36;
  }
}
