/* ============================================================
   All Things New — page-specific layout
   ============================================================ */

/* Main clears the attached nav by default so form/list pages stay usable.
   Full-bleed first sections (hero, reader banner, support photo) cancel
   that padding so their backgrounds sit flush under the glass bar. */
main {
  padding-top: var(--nav-h, 72px);
}

main:has(> .hero:first-child),
main:has(.reader-banner),
main:has(.support-page) {
  padding-top: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* Fills the viewport including the area under the attached nav */
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 64px 0 110px;
  overflow: hidden;
  width: 100%;
}

/* Gradient overlay lives on its own layer so it never moves — only
   .hero__bg (the photo) gets the parallax transform, via JS. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(180deg, rgba(15, 23, 32, 0.22) 0%, rgba(15, 23, 32, 0.38) 55%, rgba(15, 23, 32, 0.62) 100%);
  pointer-events: none;
}

.hero__bg {
  position: absolute;
  inset: -15% 0;
  z-index: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  will-change: transform;
}

.hero__glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 640px;
  background:
    radial-gradient(60% 60% at 25% 20%, var(--wash-gold) 0%, transparent 70%),
    radial-gradient(50% 50% at 80% 10%, var(--accent-amber-pale) 0%, transparent 60%);
  opacity: 0.55;
  filter: blur(30px);
  z-index: 0;
  pointer-events: none;
}

/* .hero__content is itself the centered .container (max-width:1180, margin:0
   auto, padding:0 24px from base.css) — it MUST keep that centering so its
   left edge lines up with the nav brand above it. Only text-align changes
   between the default (centered copy) and --left (left-aligned copy) variants;
   never override this element's margin, or it detaches from the nav's grid. */
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero__content > * {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero__content--left {
  text-align: left;
}

.hero__content--left > * {
  margin-left: 0;
  margin-right: auto;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
  margin-bottom: 22px;
}

.hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.22);
  /* Scale with viewport so longer locales (e.g. Swahili) stay on one line */
  font-size: clamp(1.55rem, 4.6vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: 22px;
  max-width: none;
  white-space: nowrap;
}

.hero p.lede {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.2);
  line-height: 1.75;
  margin-bottom: 34px;
}

.hero__scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: heroScrollHint 2.8s ease-in-out infinite;
}

.hero__scroll-hint .icon {
  width: 16px;
  height: 16px;
}

@keyframes heroScrollHint {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.55; }
  50% { transform: translate(-50%, 6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-hint {
    animation: none;
  }
}

/* ---------- Section shell ---------- */
.section {
  padding: 64px 0;
}

/* "What are you looking for today?" — given room to breathe rather than
   feeling like a cramped strip between the hero and the pause section. */
#how-it-works {
  min-height: 67svh;
  display: flex;
  align-items: center;
}

/* Pale gold alone washes out on this warm photo — lift the kicker so
   "How can we support you today?" stays readable against the backdrop. */
#how-it-works .section__kicker {
  color: #FFF8EE;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-shadow:
    0 1px 2px rgba(20, 12, 8, 0.55),
    0 0 18px rgba(20, 12, 8, 0.35);
}

.section__head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 44px;
}

.section__kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.section__head p {
  color: var(--text-secondary);
  font-size: 1.02rem;
}

/* ---------- Photo section backdrop ----------
   Every landing-page section can carry its own relevant background photo
   via the --section-image custom property, layered under a warm tint so
   text stays legible. Two strengths: the default reads as an immersive
   photo moment (light text); --whisper keeps the photo as a faint, quiet
   texture behind normal dark text (used for the "Take a Moment" pause). */
.section-photo {
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Gradient tint sits on its own static layer above the photo — only
   .section-photo__bg (the photo itself) moves for the parallax effect. */
.section-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(180deg, rgba(43, 36, 30, 0.58) 0%, rgba(43, 36, 30, 0.72) 100%);
  pointer-events: none;
}

.section-photo__bg {
  position: absolute;
  inset: -15% 0;
  z-index: 0;
  background-image: var(--section-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
}

.section-photo > .container {
  position: relative;
  z-index: 2;
}

.section-photo .section__kicker {
  color: var(--accent-amber-pale);
}

.section-photo .section__head h2,
.section-photo .section__head p {
  color: #fff;
}

.section-photo .section__head p {
  color: rgba(255, 255, 255, 0.86);
}

.section-photo--whisper::before {
  background-image: linear-gradient(180deg, rgba(251, 246, 238, 0.94) 0%, rgba(243, 231, 214, 0.9) 100%);
}

.section-photo--whisper {
  color: var(--text-primary);
}

.section-photo--whisper .section__kicker,
.section-photo--whisper .pause__label {
  color: var(--accent-terracotta);
}

.section-photo--whisper .section__head h2,
.section-photo--whisper .section__head p,
.section-photo--whisper .pause p {
  color: var(--text-primary);
}

/* ---------- Take a moment ---------- */
.pause {
  text-align: center;
  padding: 88px 0;
}

.pause__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 14px;
}

.pause p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Emotional discovery ---------- */
.need-discovery {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.need-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* Tinted frosted-glass need cards — each hue sits in the site's
   gold / terracotta / sage / umber mood without fighting the forest photo. */
.need-card {
  --need-tint: rgba(255, 248, 238, 0.28);
  --need-tint-strong: rgba(255, 248, 238, 0.42);
  --need-glow: rgba(43, 36, 30, 0.22);
  --need-edge: rgba(255, 250, 240, 0.48);

  display: block;
  padding: 26px 24px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: #FFFDF8;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.22) 0%, transparent 48%),
    var(--need-tint);
  border: 1px solid var(--need-edge);
  box-shadow:
    0 10px 28px rgba(20, 12, 8, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  transition:
    transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.need-card::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34) 0%, transparent 70%);
  opacity: 0.55;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.need-card::after {
  box-shadow:
    0 22px 48px var(--need-glow),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.need-card--i-need-peace {
  --need-tint: rgba(168, 118, 78, 0.50);
  --need-tint-strong: rgba(168, 118, 78, 0.66);
  --need-glow: rgba(120, 80, 48, 0.42);
  --need-edge: rgba(236, 204, 168, 0.45);
}

.need-card--i-need-hope {
  --need-tint: rgba(184, 131, 74, 0.50);
  --need-tint-strong: rgba(184, 131, 74, 0.68);
  --need-glow: rgba(150, 98, 42, 0.44);
  --need-edge: rgba(243, 210, 140, 0.45);
}

.need-card--i-need-prayers {
  --need-tint: rgba(181, 80, 44, 0.48);
  --need-tint-strong: rgba(181, 80, 44, 0.66);
  --need-glow: rgba(140, 52, 28, 0.44);
  --need-edge: rgba(248, 188, 160, 0.40);
}

.need-card--im-facing-illness {
  --need-tint: rgba(122, 78, 68, 0.52);
  --need-tint-strong: rgba(122, 78, 68, 0.70);
  --need-glow: rgba(88, 48, 42, 0.46);
  --need-edge: rgba(232, 188, 176, 0.38);
}

.need-card:hover,
.need-card:focus-visible {
  transform: translateY(-8px) scale(1.025);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.34) 0%, transparent 52%),
    var(--need-tint-strong);
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 18px 44px var(--need-glow),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  outline: none;
}

.need-card:hover::before,
.need-card:focus-visible::before {
  opacity: 0.9;
  transform: translateY(8%) scale(1.08);
}

.need-card:hover::after,
.need-card:focus-visible::after {
  opacity: 1;
}

.need-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #FFFDF8;
  text-shadow: 0 1px 10px rgba(20, 12, 8, 0.25);
}

.need-card p {
  font-size: 0.88rem;
  color: rgba(255, 253, 248, 0.88);
  margin: 0;
  text-shadow: 0 1px 8px rgba(20, 12, 8, 0.2);
}

.need-card__hint {
  display: inline-flex;
  margin-top: 14px;
  color: rgba(255, 253, 248, 0.92);
  transition: transform 0.34s var(--ease), color 0.34s var(--ease);
}

.need-card:hover .need-card__hint,
.need-card:focus-visible .need-card__hint {
  color: #FFFDF8;
}

.need-card:hover:not(.is-active) .need-card__hint,
.need-card:focus-visible:not(.is-active) .need-card__hint {
  transform: translateY(2px);
}

.need-card__hint .icon {
  width: 16px;
  height: 16px;
}

.need-card.is-active {
  border-color: rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.3) 0%, transparent 52%),
    var(--need-tint-strong);
  box-shadow:
    0 14px 36px var(--need-glow),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.need-card.is-active .need-card__hint {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .need-card,
  .need-card:hover,
  .need-card:focus-visible {
    transition: none;
    transform: none;
  }

  .need-card::before {
    transition: none;
  }
}

.need-topics-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.16) 0%, transparent 46%),
    var(--need-panel-fill, rgba(90, 74, 58, 0.88));
  border: 1px solid var(--need-edge, rgba(255, 250, 240, 0.4));
  border-radius: var(--radius-md);
  padding: 22px 24px 24px;
  color: #FFFDF8;
  box-shadow:
    0 14px 36px var(--need-glow, rgba(20, 12, 8, 0.28)),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  animation: need-panel-in 0.38s var(--ease);
}

/* Mood tokens MUST come after the base panel rule so they win the cascade. */
.need-topics-panel.need-topics-panel--i-need-peace {
  --need-panel-fill: rgba(128, 86, 54, 0.90);
  --need-glow: rgba(90, 58, 34, 0.48);
  --need-edge: rgba(236, 204, 168, 0.48);
  --need-accent: #F0D8B8;
  --need-chip: rgba(255, 253, 248, 0.18);
  --need-chip-hover: rgba(255, 253, 248, 0.30);
}

.need-topics-panel.need-topics-panel--i-need-hope {
  --need-panel-fill: rgba(158, 104, 48, 0.90);
  --need-glow: rgba(120, 72, 28, 0.50);
  --need-edge: rgba(243, 210, 140, 0.50);
  --need-accent: #F6DEB0;
  --need-chip: rgba(255, 253, 248, 0.18);
  --need-chip-hover: rgba(255, 253, 248, 0.30);
}

.need-topics-panel.need-topics-panel--i-need-prayers {
  --need-panel-fill: rgba(156, 62, 34, 0.90);
  --need-glow: rgba(112, 40, 22, 0.50);
  --need-edge: rgba(248, 188, 160, 0.46);
  --need-accent: #F6D0BC;
  --need-chip: rgba(255, 253, 248, 0.18);
  --need-chip-hover: rgba(255, 253, 248, 0.30);
}

.need-topics-panel.need-topics-panel--im-facing-illness {
  --need-panel-fill: rgba(98, 56, 50, 0.92);
  --need-glow: rgba(68, 34, 30, 0.52);
  --need-edge: rgba(232, 188, 176, 0.44);
  --need-accent: #F0D0C6;
  --need-chip: rgba(255, 253, 248, 0.18);
  --need-chip-hover: rgba(255, 253, 248, 0.30);
}

.need-topics-panel::before {
  content: '';
  position: absolute;
  inset: -50% -30% auto;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

.need-topics-panel > * {
  position: relative;
  z-index: 1;
}

.need-topics-panel[hidden] {
  display: none;
}

@keyframes need-panel-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .need-topics-panel {
    animation: none;
  }

  .need-card__hint {
    transition: none;
  }
}

.need-topics-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.need-topics-panel__kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--need-accent, #F3D28C);
  margin: 0 0 4px;
  text-shadow: 0 1px 8px rgba(20, 12, 8, 0.35);
}

.need-topics-panel__prompt {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #FFFDF8;
  margin: 0;
  line-height: 1.35;
  text-shadow: 0 1px 10px rgba(20, 12, 8, 0.35);
}

.need-topics-panel__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -6px -8px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.14);
  color: #FFFDF8;
  cursor: pointer;
  transition: border-color 0.28s var(--ease), color 0.28s var(--ease), background 0.28s var(--ease);
}

.need-topics-panel__close .icon {
  width: 16px;
  height: 16px;
}

.need-topics-panel__close:hover,
.need-topics-panel__close:focus-visible {
  border-color: rgba(255, 255, 255, 0.7);
  color: #FFFDF8;
  background: rgba(255, 253, 248, 0.26);
  outline: none;
}

.need-topics-panel__options {
  margin: 0;
  gap: 10px;
}

.need-topics-panel__options .chip {
  background: var(--need-chip, rgba(255, 253, 248, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #FFFDF8;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.need-topics-panel__options .chip--outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.48);
  color: #FFFDF8;
}

.need-topics-panel__options a.chip:hover,
.need-topics-panel__options a.chip:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  background: var(--need-chip-hover, rgba(255, 253, 248, 0.30));
  color: #FFFDF8;
  outline: none;
}

@media (max-width: 640px) {
  .need-topics-panel {
    padding: 18px 18px 20px;
  }

  .need-topics-panel__prompt {
    font-size: 1.08rem;
  }
}

/* ---------- Guide showcase / library grid ---------- */
.category-block {
  margin-bottom: 52px;
}

.category-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.category-block__head h3 {
  font-size: 1.2rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.guide-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.guide-card__number {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.guide-card h4 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.guide-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  flex-grow: 1;
  margin: 0;
}

.guide-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.guide-card__meta .icon {
  width: 14px;
  height: 14px;
}

.guide-card--complete {
  border-color: var(--accent-terracotta);
}

/* ---------- Library filters ---------- */
.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  /* Keep suggest dropdown above chip row + study cards.
     .reveal siblings create stacking contexts; without this the
     later study-card reveals paint over the panel. */
  position: relative;
  z-index: 60;
}

.library-search {
  flex: 1 1 260px;
  position: relative;
  z-index: 1;
}

.library-search .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

/* Targets the input's own .input class (not just the element) so this
   wins over the generic `main input[type="search"]` padding rule in
   components.css, which was overriding the icon clearance and causing
   the placeholder text to run underneath the icon. */
.library-search .input {
  padding-left: 42px;
  position: relative;
  z-index: 1;
}

.library-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 250, 240, 0.55);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.42) 0%, transparent 46%),
    rgba(251, 246, 238, 0.88);
  box-shadow:
    0 18px 40px rgba(43, 36, 30, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  animation: library-suggest-in 0.28s var(--ease);
}

.library-suggest[hidden] {
  display: none;
}

@keyframes library-suggest-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-suggest {
    animation: none;
  }
}

.library-suggest__item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  transition: background 0.28s var(--ease), border-color 0.28s var(--ease);
}

.library-suggest__item:hover,
.library-suggest__item.is-active,
.library-suggest__item:focus-visible {
  background: rgba(243, 228, 200, 0.55);
  border-color: rgba(184, 131, 74, 0.28);
  outline: none;
}

.library-suggest__number {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
}

.library-suggest__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.library-suggest__snippet {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.library-suggest__empty {
  padding: 16px 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.search-hit {
  background: linear-gradient(180deg, rgba(233, 194, 136, 0.55) 0%, rgba(184, 131, 74, 0.38) 100%);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0 0.12em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.search-hit--page {
  background: linear-gradient(180deg, rgba(243, 210, 140, 0.72) 0%, rgba(184, 131, 74, 0.48) 100%);
  box-shadow: 0 0 0 1px rgba(184, 131, 74, 0.22);
}

.search-hit--page.is-focused {
  background: linear-gradient(180deg, rgba(249, 220, 150, 0.95) 0%, rgba(181, 80, 44, 0.42) 100%);
  box-shadow:
    0 0 0 2px rgba(181, 80, 44, 0.35),
    0 0 18px rgba(184, 131, 74, 0.35);
  animation: search-hit-pulse 1.4s var(--ease) 2;
}

@keyframes search-hit-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .search-hit--page.is-focused {
    animation: none;
  }
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Reader ---------- */
/* Study body uses most of the viewport width so the page doesn't sit in a
   skinny column with empty side gutters. Cap keeps lines readable on
   ultra-wide monitors without forcing a phone-narrow measure on laptops. */

.reader {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 0 48px;
}

.reader > .container--narrow,
.reader-banner__content.container--narrow {
  max-width: min(1200px, 94vw);
  padding-left: clamp(20px, 3.5vw, 36px);
  padding-right: clamp(20px, 3.5vw, 36px);
}


.reader__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.reader h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 14px;
}

.reader__meta {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

/* ---------- Chunked reading stepper ---------- */
.stepper {
  margin-bottom: 18px;
}

.stepper__track {
  height: 4px;
  border-radius: 999px;
  background: var(--hairline);
  overflow: hidden;
}

.stepper__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-terracotta));
  transition: width 0.65s var(--ease);
}

.stepper__label {
  margin: 10px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stepper-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.stepper-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.42s var(--ease), border-color 0.42s var(--ease), transform 0.42s var(--ease);
}

.stepper-dot:hover {
  transform: scale(1.2);
}

.stepper-dot.is-visited {
  background: var(--accent-amber-pale);
  border-color: var(--accent-amber-pale);
}

.stepper-dot.is-active {
  background: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
  transform: scale(1.3);
}

.chunk__title {
  font-size: 1.32rem;
  margin-top: 0;
}

.chunk-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
}

.icon--flip {
  transform: scaleX(-1);
}

/* ---------- Completion moment ---------- */
.completion-panel {
  margin-top: 40px;
  padding: 36px;
  text-align: center;
  background: var(--wash-gold);
  border-color: transparent;
  animation: completionIn 0.8s var(--ease);
}

.completion-panel[hidden] {
  display: none;
}

.completion-panel__badge {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-terracotta);
  color: #fff;
}

.completion-panel__badge .icon {
  width: 22px;
  height: 22px;
}

.completion-panel h3 {
  margin-bottom: 8px;
}

.completion-panel p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.completion-panel__done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--accent-terracotta);
  font-weight: 600;
  margin: 0;
}

.completion-panel__auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@keyframes completionIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .stepper__fill,
  .stepper-dot {
    transition: none;
  }
  .completion-panel {
    animation: none;
  }
}

.reader__body {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.reader__body header {
  text-align: center;
  padding: 20px 0 32px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 32px;
}

.reader__body h1 {
  font-size: 1.7rem;
  margin-top: 1.4em;
}

.reader__body h2 {
  font-size: 1.32rem;
  margin-top: 1.6em;
}

.reader__body h3 {
  font-size: 1.08rem;
  margin-top: 1.3em;
}

.reader__body blockquote {
  margin: 1.6em 0;
  padding: 20px 24px;
  border: 1px solid var(--accent-amber-pale);
  border-left: 5px solid var(--accent-gold);
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  font-style: normal;
  color: var(--text-primary);
  box-shadow: 0 1px 0 rgba(43, 36, 30, 0.04);
}

.reader__body blockquote.prayer {
  border-color: color-mix(in srgb, var(--accent-terracotta) 28%, var(--hairline));
  border-left: 5px solid var(--accent-terracotta);
  background: var(--wash-gold);
  font-style: normal;
}

.reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}

.reader-nav__link {
  flex: 1;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  transition: border-color 0.34s var(--ease), transform 0.34s var(--ease);
}

.reader-nav__link:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.reader-nav__link small {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.reader-nav__link--next {
  text-align: right;
}

.next-steps {
  margin-top: 56px;
  padding: 32px;
  text-align: center;
}

.next-steps h3 {
  margin-bottom: 22px;
}

.next-steps__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------- Journey / progress page ---------- */
.journey-summary {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px;
  margin-bottom: 40px;
}

.journey-summary__ring {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  padding: 7px;
  background: conic-gradient(var(--accent-terracotta) calc(var(--progress, 0) * 1%), var(--hairline) 0);
  transition: background 0.8s var(--ease);
}

.journey-summary__ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
}

.journey-summary__ring-value {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
}

.journey-summary__ring-pct {
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.journey-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.journey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
}

.journey-row__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.journey-row__status .icon {
  width: 16px;
  height: 16px;
}

.journey-row__status.is-complete .icon {
  color: var(--accent-terracotta);
}

/* ---------- Support (shared form helpers; page chrome lives below) ---------- */

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 600px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Closing CTA ---------- */
.closing-cta {
  text-align: center;
  padding: 120px 0;
}

.closing-cta h2 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 640px;
  margin: 0 auto 16px;
}

.closing-cta p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 480px;
  margin: 0 auto 30px;
}

.closing-cta .btn-primary {
  background: #fff;
  color: var(--text-primary);
}

/* ============================================================
   Study cards — Explore page only.
   An editorial, magazine-cover-style card: a "matted" frame around a
   cinematic image panel (label + excerpt live inside the image, on a
   layered dark gradient), with the study title set large below it in
   the display serif. Deliberately its own component (not .guide-card,
   which the homepage still uses) so this redesign stays scoped to the
   Explore page as requested.
   ============================================================ */
.study-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.study-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-warm);
  border-radius: 28px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(43, 36, 30, 0.07);
  transition: transform 0.72s var(--ease);
}

/* Shadow crossfades via opacity on a pseudo-layer, not by animating
   box-shadow itself — see .card for why. */
.study-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 28px 54px rgba(43, 36, 30, 0.18);
  opacity: 0;
  transition: opacity 0.72s var(--ease);
}

.study-card:hover {
  transform: translateY(-7px);
}

.study-card:hover::after {
  opacity: 1;
}

.study-card__media {
  position: relative;
  aspect-ratio: 9 / 13;
  border-radius: 20px;
  overflow: hidden;
  background: var(--text-primary);
}

.study-card__media-bg {
  position: absolute;
  inset: -3%;
  background-image: var(--card-image, none);
  background-size: cover;
  background-position: center;
  transition: transform 1.1s var(--ease);
}

.study-card:hover .study-card__media-bg {
  transform: scale(1.07);
}

.study-card__media-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(20, 15, 10, 0) 0%, rgba(20, 15, 10, 0) 32%, rgba(20, 15, 10, 0.42) 60%, rgba(16, 12, 9, 0.9) 100%);
  transition: background 0.72s var(--ease);
}

.study-card:hover .study-card__media-overlay {
  background:
    linear-gradient(180deg, rgba(20, 15, 10, 0) 0%, rgba(20, 15, 10, 0.05) 28%, rgba(20, 15, 10, 0.5) 58%, rgba(16, 12, 9, 0.94) 100%);
}

.study-card__label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-amber-pale);
  margin-bottom: 9px;
}

.study-card__label::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--accent-amber-pale);
  flex-shrink: 0;
}

.study-card__excerpt {
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.study-card__footer {
  /* Grid stretches every card in a row to match the tallest one, and this
     flex column lets the footer claim that extra height so the meta row
     can anchor to the bottom below — instead of sitting wherever the
     title's line count happens to leave it. */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 22px 8px 10px;
}

.study-card__title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1.28;
  color: var(--text-primary);
  margin-bottom: 14px;
  transition: color 0.8s var(--ease);
}

.study-card:hover .study-card__title {
  color: var(--accent-terracotta);
}

.study-card__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.study-card__meta-row .icon {
  width: 14px;
  height: 14px;
}

.study-card__reading-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.study-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.68;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.study-card:hover .study-card__cta {
  opacity: 1;
  transform: translateX(3px);
}

.study-card__cta .icon {
  width: 14px;
  height: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .study-card,
  .study-card__media-bg,
  .study-card__media-overlay,
  .study-card__title,
  .study-card__cta {
    transition: none !important;
  }
}

/* ---------- Homepage guide-card cover image ---------- */
.guide-card__media {
  margin: -22px -22px 14px;
  width: calc(100% + 44px);
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ---------- Reader banner ---------- */
.reader-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 16 / 6;
  min-height: 260px;
  max-height: 480px;
  /* Full-bleed banner; title stays aligned with the wider reading column. */
  width: 100%;
}

.reader-banner__bg {
  position: absolute;
  inset: 0;
  background-image: var(--banner-image);
  background-size: cover;
  background-position: center;
}

.reader-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 15, 10, 0.1) 0%, rgba(20, 15, 10, 0.7) 100%);
}

.reader-banner__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 28px;
}

.reader-banner__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-amber-pale);
  margin-bottom: 8px;
}

.reader-banner__content h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin: 0;
}

@media (max-width: 1600px) {
  .reader-banner {
    aspect-ratio: 4 / 5;
    max-height: 90vh;
  }
}

/* ---------- Structured reading steps (intro / key verse / quiz / reflection) ---------- */
.step__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
}

.step__title {
  font-size: 1.32rem;
  margin-top: 0;
}

.key-verse {
  padding: 32px 28px;
  border-radius: var(--radius-md);
  background: var(--wash-gold);
  text-align: center;
  border: 1px solid var(--accent-amber-pale);
  border-left: 5px solid var(--accent-terracotta);
  box-shadow: 0 1px 0 rgba(43, 36, 30, 0.04);
}

.key-verse .key-verse__text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: normal;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0 0 16px;
  border: none;
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.key-verse__ref {
  font-weight: 700;
  color: var(--accent-terracotta);
  margin: 0;
}

.key-verse__translation {
  font-weight: 500;
  color: var(--text-muted);
}

/* ---------- Quiz ---------- */
.quiz {
  padding: 28px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface);
}

.quiz__instructions {
  color: var(--text-secondary);
  margin: -6px 0 20px;
}

.quiz-question {
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}

.quiz-question:first-of-type {
  border-top: none;
  padding-top: 0;
}

.quiz-question__image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.quiz-question__text {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.quiz-question__ref {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.quiz-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--hairline);
  background: var(--bg);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text-primary);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.quiz-choice:hover:not(:disabled) {
  border-color: var(--accent-gold);
}

.quiz-choice__mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  flex-shrink: 0;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.quiz-choice.is-selected {
  border-color: var(--accent-terracotta);
  background: var(--wash-gold);
}

.quiz-choice.is-selected .quiz-choice__mark {
  background: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
}

.quiz-choice.is-correct {
  border-color: var(--accent-sage);
  background: rgba(124, 146, 104, 0.14);
}

.quiz-choice.is-correct .quiz-choice__mark {
  background: var(--accent-sage);
  border-color: var(--accent-sage);
}

.quiz-choice.is-incorrect {
  border-color: var(--accent-terracotta);
  background: rgba(181, 80, 44, 0.1);
}

.quiz-choice:disabled {
  cursor: default;
}

.quiz-question__submit[hidden] {
  display: none;
}

.quiz-feedback {
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--wash-gold);
  margin-top: 4px;
  animation: completionIn 0.5s var(--ease);
}

.quiz-feedback[hidden] {
  display: none;
}

.is-answered-correct .quiz-feedback {
  background: rgba(124, 146, 104, 0.16);
}

.quiz-feedback__headline {
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--accent-terracotta);
}

.is-answered-correct .quiz-feedback__headline {
  color: var(--accent-sage);
}

.quiz-feedback__explanation {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .quiz-choice,
  .quiz-choice__mark,
  .quiz-feedback {
    transition: none;
    animation: none;
  }
}

/* ---------- Devotional (I Need Peace / Hope / Prayers) ---------- */
/* Fill the viewport under sticky nav; compact spacing to avoid scroll
   when the verse card + actions fit on a typical desktop height. */
body:has(.devotional) {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

body:has(.devotional) > main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.devotional {
  flex: 1 0 auto;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 72px 0 28px;
}

.devotional .section-photo__bg {
  inset: -22% 0;
  filter: blur(8px);
  -webkit-filter: blur(8px);
}

.devotional.section-photo::before {
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(184, 131, 74, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(22, 15, 10, 0.48) 0%, rgba(28, 18, 12, 0.64) 45%, rgba(18, 12, 8, 0.78) 100%);
}

.devotional .section__head {
  margin-bottom: 14px;
}

.devotional .section__head h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.35;
  margin: 0;
}

.devotional .section__kicker {
  margin-bottom: 6px;
}

.devotional__topics {
  justify-content: center;
  margin: 0 0 14px;
}

/* Classic emotional-need pages (Peace / Hope / Prayers): clearer vertical
   rhythm and chip breathing room. Illness journey keeps its denser layout. */
.devotional:not(.devotional--illness) > .container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.devotional:not(.devotional--illness) .section__head {
  margin-bottom: 0;
}

.devotional:not(.devotional--illness) .devotional__topics {
  gap: 14px;
  margin: 0;
}

.devotional:not(.devotional--illness) .verse-card {
  padding: 32px 36px;
}

.devotional:not(.devotional--illness) .verse-card__text {
  margin: 0 0 12px;
}

.devotional:not(.devotional--illness) .verse-card__ref {
  margin: 0 0 14px;
}

.devotional:not(.devotional--illness) .verse-card__reflection {
  margin: 0 auto 28px;
}

.devotional:not(.devotional--illness) .verse-card__actions {
  gap: 14px;
}

.devotional:not(.devotional--illness) .prayer-card {
  margin-top: 0;
}

.devotional:not(.devotional--illness) .devotional__footer {
  margin-top: 4px;
}

/* Illness journey: fixed sub-nav under main nav; one viewport, centered,
   denser spacing so Welcome / Hope / Prayers / Promises fit without scroll.
   Parent .section-photo uses overflow:hidden (breaks fixed descendants), so
   illness opts out and clips the parallax layer with inset:0 instead. */
main:has(> .devotional--illness) {
  padding-top: 0;
}

body:has(.devotional--illness) .site-footer {
  display: none;
}

.devotional--illness.section-photo {
  --subnav-h: 52px;
  --subnav-gap: 8px;
  --illness-chrome: calc(var(--nav-h, 72px) + var(--subnav-gap) + var(--subnav-h) + 16px);
  overflow: visible;
  scroll-behavior: smooth;
  box-sizing: border-box;
  min-height: 100svh;
  height: 100svh;
  max-height: 100svh;
  padding-top: var(--illness-chrome);
  padding-bottom: 12px;
  align-items: center;
}

.devotional--illness > .section-photo__bg {
  inset: 0;
  /* Lighter blur than shared .devotional so the nature photo stays enjoyable. */
  filter: blur(2.5px);
  -webkit-filter: blur(2.5px);
}

.devotional--illness.section-photo::before {
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(184, 131, 74, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, rgba(22, 15, 10, 0.30) 0%, rgba(28, 18, 12, 0.40) 45%, rgba(18, 12, 8, 0.52) 100%);
}

html:has(.devotional--illness),
.devotional--illness {
  scroll-padding-top: calc(var(--nav-h, 72px) + var(--subnav-gap, 8px) + var(--subnav-h, 52px) + 12px);
}

.devotional--illness [id] {
  scroll-margin-top: calc(var(--nav-h, 72px) + var(--subnav-gap, 8px) + var(--subnav-h, 52px) + 12px);
}

.devotional--illness > .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  min-height: calc(100svh - var(--illness-chrome) - 12px);
  max-height: calc(100svh - var(--illness-chrome) - 12px);
}

/* Illness-only: one major section visible at a time (sub-nav switches panels). */
.devotional--illness .illness-panel:not(.is-active) {
  display: none;
}

.devotional--illness .illness-panel.is-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  animation: illnessPanelIn 0.35s var(--ease);
}

@keyframes illnessPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .devotional--illness .illness-panel.is-active {
    animation: none;
  }
}

/* Denser typography + spacing — illness only */
.devotional--illness .section__head {
  margin-bottom: 6px;
}

.devotional--illness .section__head h2 {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.devotional--illness .section__kicker {
  margin-bottom: 4px;
}

.devotional--illness .devotional__welcome {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 520px;
}

.devotional--illness .devotional__section {
  margin-top: 0;
}

.devotional--illness .devotional__section-title {
  margin: 0 0 4px;
  font-size: 1rem;
}

.devotional--illness .devotional__position {
  margin: 0 0 4px;
  font-size: 0.74rem;
}

.devotional--illness .devotional__item-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.devotional--illness .verse-card,
.devotional--illness .prayer-card {
  padding: 14px 18px;
}

.devotional--illness .verse-card__text,
.devotional--illness .prayer-card__text {
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  line-height: 1.4;
  margin: 0 0 6px;
}

.devotional--illness .verse-card__ref {
  margin: 0 0 8px;
  font-size: 0.85rem;
}

.devotional--illness .verse-card__reflection,
.devotional--illness .devotional__takeaway,
.devotional--illness .prayer-card__text {
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 8px;
}

.devotional--illness .verse-card__reflection,
.devotional--illness .prayer-card__text {
  max-height: 18vh;
  overflow-y: auto;
}

.devotional--illness .devotional__takeaway {
  margin-bottom: 0;
}

.devotional--illness .prayer-card__label {
  margin: 0 0 6px;
  font-size: 0.74rem;
}

.devotional--illness .devotional__nav-actions {
  gap: 8px;
  margin-top: 8px;
}

.devotional--illness .devotional__nav-actions .btn {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.devotional--illness .verse-card--bridge {
  margin-top: 0;
  padding: 10px 16px;
}

.devotional--illness .verse-card--bridge .verse-card__text {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.devotional--illness .verse-card--bridge .verse-card__ref {
  margin: 0;
  font-size: 0.78rem;
}

.devotional--illness .devotional__support-cta {
  margin-top: 8px;
  padding: 12px 16px;
}

.devotional--illness .devotional__support-cta-label {
  margin: 0 0 4px;
  font-size: 0.7rem;
}

.devotional--illness .devotional__support-cta-title {
  margin: 0 0 4px;
  font-size: 1rem;
}

.devotional--illness .devotional__support-cta-text {
  margin: 0 auto 10px;
  font-size: 0.84rem;
  line-height: 1.4;
  max-width: 380px;
}

.devotional--illness .devotional__support-cta .btn {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.devotional--illness .devotional__footer {
  display: none;
}

.devotional-subnav {
  position: fixed;
  top: calc(var(--nav-h, 72px) + var(--subnav-gap, 8px));
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 8px 12px;
  max-width: 760px;
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 8px 24px rgba(28, 18, 12, 0.12);
}

.devotional-subnav__link {
  padding: 6px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
}

.devotional-subnav__link:hover,
.devotional-subnav__link:focus-visible,
.devotional-subnav__link.is-active {
  color: var(--text-primary);
  border-color: var(--accent-gold);
  background: var(--wash-gold);
  outline: none;
}

.devotional__support-cta {
  margin-top: 22px;
  padding: 22px 24px;
  text-align: center;
  background: rgba(255, 252, 247, 0.94);
  border-color: transparent;
}

.devotional__support-cta-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.devotional__support-cta-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
}

.devotional__support-cta-text {
  max-width: 420px;
  margin: 0 auto 16px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.devotional__position {
  text-align: center;
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.84);
}

.devotional__item-title {
  margin: 0 0 16px;
  font-size: 1.16rem;
}

.devotional__nav-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.devotional__nav-actions .btn:first-child .icon {
  transform: scaleX(-1);
}

.devotional .card.is-transitioning {
  opacity: 0.62;
  transition: opacity 0.22s var(--ease);
}

.devotional .verse-card {
  padding: 28px 32px;
}

.devotional .verse-card__text {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  margin: 0 0 10px;
  line-height: 1.45;
}

.devotional .verse-card__ref {
  margin: 0 0 12px;
}

.devotional .verse-card__reflection {
  margin: 0 auto 16px;
  line-height: 1.55;
  font-size: 0.95rem;
}

.devotional .prayer-card {
  margin-top: 0;
  padding: 22px 28px;
}

.devotional .prayer-card__label {
  margin: 0 0 10px;
}

.devotional .prayer-card__text {
  line-height: 1.55;
  font-size: 0.95rem;
}

.devotional__footer {
  text-align: center;
  margin-top: 18px;
}

.devotional__footer .btn-ghost {
  color: rgba(255, 255, 255, 0.82);
}

.devotional__footer .btn-ghost:hover {
  color: #fff;
}

.verse-card {
  padding: 44px 40px;
  text-align: center;
  background: var(--wash-gold);
  border-color: transparent;
}

.verse-card__text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0 0 16px;
  border: none;
  background: none;
  padding: 0;
}

.verse-card__ref {
  font-weight: 700;
  color: var(--accent-terracotta);
  margin: 0 0 24px;
}

.verse-card__reflection {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.verse-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.prayer-card {
  margin-top: 24px;
  padding: 32px 36px;
  text-align: center;
  animation: completionIn 0.6s var(--ease);
}

.prayer-card[hidden] {
  display: none;
}

.prayer-card__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 14px;
}

.prayer-card__text {
  font-style: italic;
  line-height: 1.75;
  color: var(--text-primary);
  max-width: 560px;
  margin: 0 auto;
}

.devotional__section {
  margin-top: 20px;
}

.devotional__section-title {
  text-align: center;
  margin: 0 0 10px;
}

.devotional__welcome {
  max-width: 760px;
  margin: 10px auto 0;
  color: rgba(255, 255, 255, 0.92);
}

.devotional__hint {
  margin: 10px auto 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

.chip--recommended {
  border-color: rgba(184, 131, 74, 0.55);
  box-shadow: 0 0 0 1px rgba(184, 131, 74, 0.2) inset;
}

.devotional__takeaway {
  margin: 0;
  color: var(--text-primary);
}

.verse-card--bridge {
  margin-top: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.devotional__study-card {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .devotional {
    padding: 64px 0 20px;
    align-items: flex-start;
  }

  .devotional:not(.devotional--illness) > .container {
    gap: 18px;
  }

  .devotional:not(.devotional--illness) .devotional__topics {
    gap: 12px;
  }

  .devotional:not(.devotional--illness) .verse-card {
    padding: 28px 22px;
  }

  .devotional:not(.devotional--illness) .verse-card__reflection {
    margin-bottom: 24px;
  }

  .verse-card,
  .devotional .verse-card {
    padding: 32px 24px;
  }

  .verse-card__text {
    font-size: 1.3rem;
  }

  .devotional .verse-card__text {
    font-size: 1.2rem;
  }

  .devotional-subnav {
    top: calc(var(--nav-h, 72px) + var(--subnav-gap, 8px));
    justify-content: flex-start;
  }

  .devotional-subnav__link {
    font-size: 0.74rem;
    padding: 5px 9px;
  }

  /* Illness: allow slight scroll on very small screens if content overflows */
  .devotional--illness.section-photo {
    height: auto;
    max-height: none;
    min-height: 100svh;
    padding-bottom: 16px;
  }

  .devotional--illness > .container {
    min-height: calc(100svh - var(--illness-chrome) - 16px);
    max-height: none;
  }

  .devotional--illness .illness-panel.is-active {
    overflow: visible;
  }

  .devotional--illness .verse-card,
  .devotional--illness .prayer-card {
    padding: 12px 14px;
  }

  .devotional--illness .verse-card__reflection,
  .devotional--illness .prayer-card__text {
    max-height: 22vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .devotional .section-photo__bg {
    filter: blur(5px);
    -webkit-filter: blur(5px);
  }

  .devotional--illness > .section-photo__bg {
    filter: blur(2px);
    -webkit-filter: blur(2px);
  }
}

/* ---------- Spiritual Support page ---------- */
/* Fill the whole main column so the photo/overlay always meet the
   footer — no cream gap when the shorter form panel is showing. */
body:has(.support-page) {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

body:has(.support-page) > main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.support-page {
  flex: 1 0 auto;
  width: 100%;
  /* Fill the viewport under the attached nav (overlay), not just main's box */
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 48px 0;
}

.support-page .section-photo__bg {
  inset: -22% 0;
  /* Same soft-focus strength as .devotional emotional-need pages */
  filter: blur(8px);
  -webkit-filter: blur(8px);
}

.support-page.section-photo::before {
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(184, 131, 74, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(22, 15, 10, 0.48) 0%, rgba(28, 18, 12, 0.64) 45%, rgba(18, 12, 8, 0.78) 100%);
}

.support-page .container {
  width: 100%;
}

/* When the form is open, drop the intro so the card sits cleanly in the
   filled photo band instead of pushing the layout into awkward scroll. */
.support-page:has([data-support-form]:not([hidden])) .support-intro {
  display: none;
}

.support-page .support-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
}

.support-page .support-intro .section__kicker {
  color: var(--accent-amber-pale);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.support-page .support-intro h2 {
  color: #fff;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
  margin-bottom: 12px;
}

.support-page .support-intro p {
  color: rgba(255, 250, 240, 0.92);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
  max-width: 34em;
  line-height: 1.65;
}

.support-picker,
.support-form,
.support-picker.card,
.support-form.card {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 30px;
  /* Subtle warm gradient border — fill on padding-box, stroke on border-box */
  border: 1.5px solid transparent;
  background:
    linear-gradient(rgba(255, 253, 248, 0.97), rgba(255, 253, 248, 0.97)) padding-box,
    linear-gradient(
      145deg,
      rgba(244, 214, 160, 0.95) 0%,
      rgba(184, 131, 74, 0.55) 42%,
      rgba(233, 194, 136, 0.88) 100%
    ) border-box;
  border-radius: var(--radius-md);
  box-shadow:
    0 28px 64px rgba(12, 8, 4, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.support-picker.card:hover,
.support-form.card:hover {
  transform: none;
}

.support-picker.card::after,
.support-form.card::after {
  opacity: 1;
  box-shadow: 0 28px 64px rgba(12, 8, 4, 0.38);
}

.support-picker__label {
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 18px;
  font-size: 1.02rem;
}

.support-picker__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.support-option:last-child {
  grid-column: 1 / -1;
}

.support-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(43, 36, 30, 0.14);
  background: var(--bg);
  color: var(--text-primary);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.support-option:hover {
  border-color: var(--accent-gold);
  background: var(--wash-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(43, 36, 30, 0.1);
}

.support-option .icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent-terracotta);
}

.support-option__label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 1px;
}

.support-option__hint {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.support-form__chosen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--wash-gold);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-terracotta);
}

.support-form__chosen a {
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-form__chosen a:hover {
  color: var(--text-primary);
}

.support-form .field-row {
  margin-bottom: 14px;
}

.support-form .field-row .field {
  margin-bottom: 0;
}

.support-form > .field {
  margin-bottom: 14px;
  min-width: 0;
}

/* Message field — vertical resize only, stays inside the card,
   and shares the cream/gold language of the custom select. */
.support-form textarea.input,
.support-form .support-message {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  resize: vertical;
  min-height: 7.5rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(184, 131, 74, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98) 0%, rgba(243, 228, 200, 0.55) 100%);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.55;
  box-shadow: 0 6px 18px rgba(43, 36, 30, 0.06);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.support-form textarea.input:hover,
.support-form .support-message:hover {
  border-color: var(--accent-gold);
}

.support-form textarea.input:focus,
.support-form .support-message:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(184, 131, 74, 0.16), 0 10px 24px rgba(43, 36, 30, 0.08);
}

.support-form textarea.input::placeholder,
.support-form .support-message::placeholder {
  color: var(--text-secondary);
  opacity: 0.85;
}

/* Compact custom select — replaces the native OS menu so width, type,
   and colors can follow the sanctuary palette. */
.support-select-wrap {
  position: relative;
  display: inline-block;
  width: min(100%, 260px);
  vertical-align: top;
}

.support-select--native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}

.support-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 14px 11px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(184, 131, 74, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98) 0%, var(--wash-gold) 100%);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(43, 36, 30, 0.06);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.support-select-trigger::after {
  content: '';
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid var(--accent-terracotta);
  border-bottom: 2px solid var(--accent-terracotta);
  transform: rotate(45deg) translateY(-1px);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.support-select-trigger:hover,
.support-select-wrap.is-open .support-select-trigger {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(184, 131, 74, 0.16), 0 10px 24px rgba(43, 36, 30, 0.08);
}

.support-select-wrap.is-open .support-select-trigger::after {
  transform: rotate(225deg) translateY(-1px);
}

.support-select-trigger__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: max(100%, 220px);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(233, 194, 136, 0.7);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 40px rgba(28, 18, 12, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}

.support-select-wrap.is-open .support-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.support-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}

.support-select-option::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(184, 131, 74, 0.45);
  flex-shrink: 0;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease);
}

.support-select-option:hover,
.support-select-option:focus {
  background: var(--wash-gold);
  color: var(--text-primary);
  outline: none;
}

.support-select-option.is-selected {
  background: rgba(184, 131, 74, 0.14);
  color: var(--accent-terracotta);
  font-weight: 700;
}

.support-select-option.is-selected::before {
  background: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
}

@media (prefers-reduced-motion: reduce) {
  .support-page .section-photo__bg {
    filter: blur(5px);
    -webkit-filter: blur(5px);
  }

  .support-option:hover {
    transform: none;
  }

  .support-select-trigger,
  .support-select-trigger::after,
  .support-select-menu,
  .support-select-option,
  .support-select-option::before,
  .support-form textarea.input,
  .support-form .support-message {
    transition: none;
  }
}

@media (max-width: 640px) {
  .support-picker,
  .support-form {
    padding: 22px 18px;
  }

  .support-picker__options {
    grid-template-columns: 1fr;
  }

  .support-option:last-child {
    grid-column: auto;
  }
}

/* ---------- Legal pages (Privacy / Terms) ---------- */
.legal-page h1 {
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  margin: 0 0 12px;
  line-height: 1.2;
}

.legal-page__lede {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.legal-page__meta {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 36px;
}

.legal-page h2 {
  font-size: 1.15rem;
  margin: 28px 0 10px;
  line-height: 1.3;
}

.legal-page p,
.legal-page li {
  color: var(--text-secondary);
  line-height: 1.65;
}

.legal-page ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.legal-page li {
  margin-bottom: 0.55em;
}

.legal-page a {
  color: var(--accent-gold);
  font-weight: 600;
}

.legal-page__also {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
}

.site-footer__links {
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}
