/* ==========================================================================
   Journey to Heaven — main stylesheet
   Palette (approved): ivory #F8F5ED · cream #E8E1D3 · vintage blue #648B9B
                       deep blue #365F73 · charcoal #343B3D
   Contrast notes: charcoal and deep blue pass WCAG AA on ivory and cream for
   body text. Vintage blue (3.4:1 on ivory) is used only for borders,
   rules and decoration — never for small text.
   ========================================================================== */

:root {
  --ivory: #F8F5ED;
  --cream: #E8E1D3;
  --vintage-blue: #648B9B;
  --deep-blue: #365F73;
  --charcoal: #343B3D;

  /* Derived tints for hover/borders only (mixes of the palette) */
  --cream-soft: #F1ECE1;
  --deep-blue-dark: #2B4C5C;
  --rule: #D6CDBB;
  --surface: #FCFAF5;   /* lighter ivory for cards and inputs */
  --error: #8A1C1C;     /* form errors only (accessibility) */

  --font-display: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", "URW Palladio L", Georgia, serif;
  --font-reading: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 38rem;
  --radius: 6px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-3);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-reading);
  font-size: 1.125rem;
  line-height: 1.7;
}

[hidden] { display: none !important; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--deep-blue);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 var(--space-2); }

a {
  color: var(--deep-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--deep-blue-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--deep-blue);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus { outline: none; }

cite { font-style: italic; }
abbr[title] { text-decoration: none; }

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

/* v0.3: widened from 72rem to 80rem (1280px). Section backgrounds and borders
   are full-bleed; reading pages keep their own narrower measure below. */
.container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--space-2);
}
@media (min-width: 40em) { .container { padding-inline: var(--space-3); } }

.page-narrow { max-width: calc(var(--measure) + 3rem); padding-block: var(--space-4) var(--space-5); }
.page-medium { max-width: 52rem; padding-block: var(--space-4) var(--space-5); }
/* About: same content width as the homepage welcome (up to 68rem / 1088px),
   centered, with left-aligned text and the same vertical spacing as page-narrow. */
.about-page { max-width: 68rem; padding-block: var(--space-4) var(--space-5); }

/* ---------- Skip link & prototype banner ---------- */

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -10rem;
  z-index: 100;
  background: var(--deep-blue);
  color: #fff;
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-ui);
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-1); color: #fff; }

.prototype-banner {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
  padding: 0.4rem var(--space-2);
}
.prototype-banner p { margin: 0 auto; max-width: 60rem; }

/* ---------- Header & navigation ---------- */

.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--rule);
}
/* Interior pages: a slim header with the navigation centered (no emblem).
   On small screens the Menu button is centered and the menu opens below it.
   The homepage has no header at all. */
.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding-block: 0.15rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font: 600 0.95rem var(--font-ui);
  color: var(--deep-blue);
  background: transparent;
  border: 1px solid var(--vintage-blue);
  border-radius: var(--radius);
  padding: 0.5rem 0.85rem;
  min-height: 44px;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
}
.site-nav a {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  color: var(--charcoal);
  text-decoration: none;
  padding: 0.6rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--deep-blue); border-bottom-color: var(--vintage-blue); }
.site-nav a[aria-current="page"] { color: var(--deep-blue); border-bottom-color: var(--deep-blue); font-weight: 600; }

/* Small screens: with JavaScript the menu collapses behind a centered Menu
   button and opens as a full-width list below it; without JS it stays visible. */
@media (max-width: 59.99em) {
  .header-inner { padding-block: 0.45rem; }
  .site-nav { width: 100%; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; padding-block: var(--space-1); }
  .js .site-nav li + li { border-top: 1px solid var(--rule); }
  .js .site-nav a { display: block; padding: 0.8rem 0; border-bottom: 0; }
  .js .site-nav a[aria-current="page"] { border-left: 3px solid var(--deep-blue); padding-left: 0.75rem; }
}

/* ---------- Shared text styles ---------- */

.eyebrow, .eyebrow-heading {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--deep-blue);
  margin: 0 0 var(--space-1);
}
.section-title { font-size: 1.6rem; margin-top: 0; }
.lede { font-size: 1.22rem; line-height: 1.6; }
.hint { font-family: var(--font-ui); font-size: 0.92rem; color: var(--charcoal); }
.empty-note { font-style: italic; }

.page-header { margin-bottom: var(--space-4); }

.breadcrumb ol {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}
.breadcrumb li + li::before { content: "›"; margin: 0 0.5rem; color: var(--charcoal); }

.badge {
  display: inline-block;
  font: 600 0.72rem/1.4 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  vertical-align: middle;
}
.badge-placeholder { background: var(--cream); color: var(--charcoal); border: 1px dashed var(--charcoal); }

.notice {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.55;
  border-radius: var(--radius);
  padding: var(--space-2);
  margin-block: var(--space-3);
}
.notice h2 { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700; color: var(--charcoal); margin-bottom: 0.4rem; }
.notice p:last-child { margin-bottom: 0; }
.notice-prototype { background: var(--cream-soft); border: 1px dashed var(--vintage-blue); }

.callout {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: var(--space-2);
  margin-block: var(--space-4);
  text-align: center;
  font-style: italic;
}
.callout p { margin: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font: 600 1rem var(--font-ui);
  color: #fff;
  background: var(--deep-blue);
  border: 2px solid var(--deep-blue);
  border-radius: var(--radius);
  padding: 0.55rem 1.25rem;
  cursor: pointer;
  text-decoration: none;
}
.button:hover { background: var(--deep-blue-dark); border-color: var(--deep-blue-dark); color: #fff; }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-quiet { background: transparent; color: var(--deep-blue); }
.button-quiet:hover { background: var(--cream); color: var(--deep-blue-dark); }

/* ---------- Scripture ---------- */

.scripture { margin: 0 0 var(--space-3); }
.scripture blockquote { margin: 0; }
.scripture blockquote p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.55;
  font-style: italic;
  margin: 0;
  white-space: pre-line;   /* keeps line breaks entered with a passage (v0.5.0) */
}
.scripture figcaption {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--deep-blue);
  margin-top: 0.5rem;
}
.scripture figcaption::before { content: "— "; }

.scripture-list { display: grid; gap: var(--space-2); }

/* ESV copyright notice (v0.5.0): small print at the end of pages that quote the ESV. */
.scripture-notice {
  max-width: 44rem;
  margin: var(--space-4) auto 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--charcoal);
}
.scripture-card {
  background: var(--cream-soft);
  border-left: 3px solid var(--vintage-blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-2) var(--space-3);
  margin: 0;
}

/* ---------- Home ---------- */

.hero {
  padding-block: var(--space-3) var(--space-4);
  text-align: center;
}
/* Homepage "front cover" (v0.4.1): no header above. A modest margin gives
   the artwork room to breathe (about 20px on phones, 34px on desktop). */
.page-cover .hero { padding-top: clamp(1.25rem, 0.75rem + 1.5vw, 2.25rem); }
/* Cover artwork: up to 51.5rem (824px) on desktop, about 17% larger than
   v0.4's 44rem; full container width on smaller screens. The image file
   (1774px wide) is unchanged and still downscaled, so it stays crisp. */
.hero-art {
  margin: 0 auto;
  max-width: 51.5rem;
}
.hero-art img { width: 100%; }

/* Welcome (v0.4): centered introduction directly beneath the cover artwork. */
.welcome {
  padding-block: clamp(2rem, 1.5rem + 2vw, 3rem) clamp(2.75rem, 2rem + 3vw, 4rem);
  border-top: 1px solid var(--rule);
  text-align: center;
}
/* Text area up to 68rem (1088px) wide, fluid below that; the paragraphs and
   mission statement use its full width. */
.welcome-inner { max-width: 68rem; }
.welcome-heading {
  font-size: clamp(2.15rem, 1.7rem + 2vw, 3.1rem);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-3);
  text-wrap: balance;
}
.welcome-inner > p {
  max-width: none;
  margin-inline: auto;
  font-size: clamp(1.15rem, 1.08rem + 0.3vw, 1.32rem);
  line-height: 1.75;
  text-wrap: pretty;   /* avoids a lone word on the last line */
}
.welcome-inner > .ornament { margin: var(--space-3) 0 var(--space-2); }
/* Selector includes ".welcome-inner >" so it outranks the paragraph rule above
   (before, the paragraph size and width silently overrode these values). */
.welcome-inner > .welcome-mission {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1.1rem + 0.35vw, 1.38rem);
  line-height: 1.5;
  color: var(--deep-blue);
  max-width: none;
  margin: 0 auto;
  text-wrap: balance;
}

/* Today's Poem (v0.3 design; its own page since v0.4), set like an open devotional book. */
.today {
  padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem) clamp(3.5rem, 2.5rem + 4vw, 6rem);
}
.today-head {
  text-align: center;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}
.today-heading {
  font-size: clamp(2.2rem, 1.7rem + 2vw, 3.1rem);
  letter-spacing: 0.01em;
  margin: 0 0 0.35rem;
}
.today-date {
  font-family: var(--font-reading);
  font-style: italic;
  font-size: 1rem;
  color: var(--charcoal);
  margin: 0;
  min-height: 1.5em;
}

/* Small printer's ornament: hairline · diamond · hairline */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--vintage-blue);
  margin-top: 1rem;
}
.ornament::before, .ornament::after { content: ""; width: 3.5rem; height: 1px; background: currentColor; }
.ornament-mark { width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); }

.today-grid {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  max-width: 70rem;
  margin-inline: auto;
}
@media (min-width: 56em) {
  .today-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
}

/* The poem "page": soft shadow and a thin printed frame line inside the edge. */
.today-poem {
  position: relative;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2.25rem 1.5rem 2rem;
  box-shadow: 0 1px 2px rgba(52, 59, 61, 0.05), 0 14px 36px rgba(54, 95, 115, 0.08);
}
.today-poem::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  pointer-events: none;
}
@media (min-width: 40em) { .today-poem { padding: 3.25rem 3rem 2.75rem; } .today-poem::before { inset: 12px; } }
.today-poem .poem-title { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem); margin-bottom: 0; }
.today-poem > .ornament { margin: 1rem 0 2rem; }
/* The poem block is centered on the page; each line stays left-aligned so
   Esther's indentation is preserved exactly. */
.today-poem .poem-body {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: left;
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
  line-height: 1.8;
}
.today-poem .attribution { margin-top: var(--space-3); }

.today-companion { display: grid; gap: var(--space-4); }
@media (min-width: 56em) { .today-companion { padding-top: 1.5rem; } }
.companion-heading { font-size: 1.45rem; margin-bottom: var(--space-2); }
.today-scripture .scripture {
  border-left: 3px solid var(--vintage-blue);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 0;
}
.today-scripture .scripture blockquote p { font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.55rem); line-height: 1.6; }
.today-scripture .scripture figcaption { font-size: 0.95rem; margin-top: 0.85rem; }
.reflection {
  background: var(--cream);
  border-radius: var(--radius);
  padding: var(--space-3) clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}
.reflection-heading { font-size: 1.35rem; margin-bottom: var(--space-1); }
.reflection p { font-size: 1.12rem; }
.reflection p:last-child { margin-bottom: 0; }

/* One of Esther's original illustrations beneath For Your Journey: modest,
   centered in the column, transparent so it sits on the page background. */
.today-illustration { margin: 0; justify-self: center; }
.today-illustration img { display: block; width: 10rem; max-width: 100%; height: auto; }
@media (max-width: 40em) {
  .today-illustration img { width: 8.5rem; }
}

.poem-link { font-family: var(--font-ui); font-size: 0.95rem; margin: var(--space-2) 0 0; }

/* Discreet note shown only while a placeholder poem is featured (v0.2). */
.dev-note {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--charcoal);
  margin: var(--space-2) 0 0;
}

.explore { padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem) clamp(3rem, 2.5rem + 3vw, 4.5rem); background: var(--cream-soft); border-top: 1px solid var(--rule); }

/* Navigation cards (v0.2 design; four cards since v0.4).
   Phones: stacked, icon beside the text. Tablets: two columns.
   Wide screens: four equal, centered cards. */
.pathways {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-auto-rows: 1fr;          /* every card the same height */
  gap: var(--space-2);
  max-width: 70rem;
}
.pathways > li { display: flex; }
.pathway {
  flex: 1;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  grid-template-areas: "icon title" "icon text";
  align-content: center;
  column-gap: 1.1rem;
  row-gap: 0.3rem;
  min-height: 7.5rem;
  background: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.35rem 1.4rem;
  text-decoration: none;
  color: var(--charcoal);
  box-shadow: 0 1px 2px rgba(52, 59, 61, 0.04), 0 6px 18px rgba(54, 95, 115, 0.05);
}
.pathway:hover {
  color: var(--charcoal);
  background: var(--surface);
  border-color: var(--vintage-blue);
  box-shadow: 0 2px 4px rgba(52, 59, 61, 0.05), 0 12px 28px rgba(54, 95, 115, 0.11);
}
.pathway:focus-visible {
  outline: 3px solid var(--deep-blue);
  outline-offset: 4px;
  border-radius: 16px;
  border-color: var(--vintage-blue);
}
.pathway-icon {
  grid-area: icon;
  align-self: center;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--deep-blue);
}
.pathway-icon svg { width: 1.75rem; height: 1.75rem; }
.pathway:hover .pathway-icon,
.pathway:focus-visible .pathway-icon { background: #DDE6E9; }  /* a soft tint of vintage blue */
.pathway-title {
  grid-area: title;
  align-self: end;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--deep-blue);
}
.pathway-text { grid-area: text; align-self: start; font-size: 0.98rem; line-height: 1.5; }

@media (max-width: 39.99em) {
  .pathways { max-width: 32rem; }
}
@media (min-width: 40em) and (max-width: 63.99em) {
  .pathways { grid-template-columns: repeat(2, 1fr); max-width: 52rem; }
}
@media (min-width: 64em) {
  .pathways { grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
  .pathway {
    grid-template-columns: 1fr;
    grid-template-areas: "icon" "title" "text";
    align-content: start;
    justify-items: center;
    text-align: center;
    row-gap: 0.5rem;
    min-height: 15rem;
    padding: 2.25rem 1.75rem 2rem;
  }
  .pathway-icon { width: 4.25rem; height: 4.25rem; margin-bottom: 0.6rem; }
  .pathway-icon svg { width: 2.1rem; height: 2.1rem; }
  .pathway-title { font-size: 1.35rem; }
  .pathway-text { max-width: 15rem; }
}

/* ---------- Poems ---------- */

.poem-title { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); margin-bottom: var(--space-3); }
.poem-body { font-family: var(--font-reading); font-size: 1.2rem; line-height: 1.75; }
.poem-body .stanza {
  white-space: pre-wrap;      /* keeps original line breaks and indentation */
  overflow-wrap: break-word;
  margin: 0 0 1.4em;
  tab-size: 4;
}
.attribution { font-family: var(--font-display); font-size: 1.05rem; margin-top: var(--space-3); }
.attribution-pending { font-family: var(--font-ui); font-size: 0.9rem; font-style: italic; }
.placeholder-notice {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.5;
  background: var(--cream-soft);
  border: 1px dashed var(--charcoal);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  margin-bottom: var(--space-3);
}
.placeholder-notice .badge { margin-right: 0.35rem; }

.poem-page .poem-title { margin-bottom: var(--space-2); }

.poem-meta {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  border-top: 1px solid var(--rule);
  margin: var(--space-4) 0 var(--space-3);
  padding-top: var(--space-2);
}
.poem-meta > div { display: grid; grid-template-columns: 9rem 1fr; gap: var(--space-2); padding-block: 0.35rem; }
@media (max-width: 30em) { .poem-meta > div { grid-template-columns: 1fr; gap: 0; } }
.poem-meta dt { font-weight: 600; }
.poem-meta dd { margin: 0; }

.inline-list { list-style: none; margin: 0; padding: 0; }
.inline-list li { display: inline; }
.inline-list li + li::before { content: " · "; }

.poem-actions { display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; }
.share-status { flex-basis: 100%; font-family: var(--font-ui); font-size: 0.9rem; margin: 0; overflow-wrap: anywhere; }

.print-only { display: none; }

.poem-list { list-style: none; margin: 0; padding: 0; }
.poem-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.poem-item:last-child { border-bottom: 0; }
.poem-item a { font-family: var(--font-display); font-size: 1.12rem; }
.poem-page, .poem-classes { font-family: var(--font-ui); font-size: 0.85rem; }

/* ---------- Encouragement ---------- */

.topic-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: var(--space-1);
}
.topic-link {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  height: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--vintage-blue);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--deep-blue);
  text-decoration: none;
}
.topic-link:hover { border-left-color: var(--deep-blue); background: var(--cream-soft); }
.topic-link[aria-current="page"] { background: var(--deep-blue); border-color: var(--deep-blue); color: #fff; }
.topic-grid-compact .topic-link { min-height: 2.75rem; font-size: 1rem; padding: 0.5rem 0.8rem; }

/* Find Encouragement hub: centered introduction and icon cards modeled on the
   homepage navigation cards. Phones and tablets: 2 columns; smaller desktops: 3;
   wide desktops: 4. Every card is the same size. */
.encourage-page { max-width: 72rem; padding-block: var(--space-4) var(--space-5); }
.encourage-head { text-align: center; margin-bottom: var(--space-4); }
.encourage-head h1 { margin-bottom: var(--space-2); text-wrap: balance; }
.encourage-head .lede { max-width: 42rem; margin: 0 auto; text-wrap: pretty; }
.encourage-head .ornament { margin-top: var(--space-3); }

.topic-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.75rem;
}
@media (min-width: 40em) { .topic-cards { gap: 1rem; } }
@media (min-width: 56em) { .topic-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 72em) { .topic-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.topic-cards > li { display: flex; }
.topic-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  min-height: 9.5rem;
  padding: 1.6rem 1rem 1.4rem;
  text-align: center;
  text-decoration: none;
  background: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(52, 59, 61, 0.04), 0 6px 18px rgba(54, 95, 115, 0.05);
}
.topic-card:hover {
  background: var(--surface);
  border-color: var(--vintage-blue);
  box-shadow: 0 2px 4px rgba(52, 59, 61, 0.05), 0 12px 28px rgba(54, 95, 115, 0.11);
}
.topic-card:focus-visible {
  outline: 3px solid var(--deep-blue);
  outline-offset: 4px;
  border-radius: 16px;
  border-color: var(--vintage-blue);
}
.topic-card-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--vintage-blue);
}
.topic-card-icon svg { width: 1.85rem; height: 1.85rem; }
.topic-card:hover .topic-card-icon,
.topic-card:focus-visible .topic-card-icon { background: #DDE6E9; }  /* same soft tint as the homepage cards */
.topic-card-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.3;
  color: var(--deep-blue);
  text-wrap: balance;
}
@media (max-width: 24em) {
  .topic-card { min-height: 8.5rem; padding: 1.2rem 0.6rem 1.1rem; gap: 0.65rem; }
  .topic-card-icon { width: 3.1rem; height: 3.1rem; }
  .topic-card-icon svg { width: 1.6rem; height: 1.6rem; }
  .topic-card-title { font-size: 1.05rem; }
}
.encourage-callout { max-width: 40rem; margin-inline: auto; }

.topic-section { margin-top: var(--space-4); }

/* ---------- Collection ---------- */

/* Centered introduction, a wide search field with a magnifying-glass icon, and
   the original classifications as a Table of Contents in a rounded container. */
.collection-page { max-width: 56rem; padding-block: var(--space-4) var(--space-5); }
.collection-head { text-align: center; margin-bottom: var(--space-4); }
.collection-head h1 { margin-bottom: var(--space-2); text-wrap: balance; }
.collection-head .lede { max-width: 42rem; margin: 0 auto; text-wrap: pretty; }
.collection-head .ornament { margin-top: var(--space-3); }
.collection-head .audio-link { margin: var(--space-2) 0 0; }

.search-form { margin: 0; }
.search-row { display: flex; gap: 0.6rem; }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: var(--vintage-blue);
  pointer-events: none;
}
.search-icon svg { width: 1.2rem; height: 1.2rem; }
.search-field input[type="search"] {
  min-height: 3rem;
  padding-left: 2.75rem;
  font-size: 1.05rem;
  background: var(--surface);
  border-color: var(--vintage-blue);
  border-radius: 12px;
}
.search-row .button { min-height: 3rem; padding-inline: 1.4rem; border-radius: 12px; }
.search-status { font-family: var(--font-ui); font-size: 0.95rem; min-height: 1.5em; margin: 0.6rem 0 var(--space-2); }

.search-results { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.search-result { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.search-result a { font-family: var(--font-display); font-size: 1.15rem; }
.search-meta { font-family: var(--font-ui); font-size: 0.88rem; margin: 0.2rem 0 0; }

.toc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: var(--space-2);
}
.toc-heading { margin: 0; font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.85rem); }
.expand-controls { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.expand-controls .button { font-size: 0.92rem; padding-inline: 1rem; border-radius: 10px; }
.toc-box {
  overflow: hidden;   /* keeps hover backgrounds inside the rounded corners */
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(52, 59, 61, 0.04), 0 6px 18px rgba(54, 95, 115, 0.05);
}
.category { border-bottom: 1px solid var(--rule); }
.category:last-child { border-bottom: 0; }
.category summary {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto 1rem;
  align-items: center;
  column-gap: 0.75rem;
  padding: 1.05rem 1.4rem;
  cursor: pointer;
  list-style: none;
}
.category summary::-webkit-details-marker { display: none; }
.category summary:hover { background: var(--cream-soft); }
.category summary:focus-visible { outline-offset: -3px; }
/* Chevron on the right: points down when closed, up when open. */
.category summary::after {
  content: "";
  justify-self: center;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--deep-blue);
  border-bottom: 2px solid var(--deep-blue);
  transform: translateY(-20%) rotate(45deg);
}
.category[open] summary::after { transform: translateY(20%) rotate(-135deg); }
.category-number { font-family: var(--font-display); color: var(--deep-blue); }
.category-title { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.3; color: var(--deep-blue); }
.category-count { font-family: var(--font-ui); font-size: 0.85rem; color: var(--charcoal); white-space: nowrap; }
.category-body { padding: 0 1.4rem 1.4rem calc(1.4rem + 2.75rem); }
@media (max-width: 30em) {
  .category summary { grid-template-columns: 1.6rem minmax(0, 1fr) auto 0.9rem; column-gap: 0.55rem; padding: 0.95rem 1rem; }
  .category-title { font-size: 1.1rem; }
  .category-count { font-size: 0.8rem; }
  .category-body { padding: 0 1rem 1.2rem; }
}
.toc-source { margin: var(--space-3) 0 0; text-align: center; font-family: var(--font-display); font-size: 1rem; color: var(--charcoal); }
.subcategory { margin-top: var(--space-2); }
.subcategory h3 { font-size: 1.12rem; margin-bottom: 0.25rem; color: var(--deep-blue); }
.subcategory .empty-note, .category-body .empty-note { font-size: 0.95rem; margin: 0.25rem 0 0; }
.audio-link { font-family: var(--font-ui); font-size: 0.95rem; }
.audio-note { font-size: 0.85rem; }

/* ---------- Forms ---------- */

/* Prayer & Support page: centered introduction, a gentle immediate-support
   notice, three request cards (real radio buttons), the form in a rounded
   ivory card, and privacy details in one expandable section. */
.prayer-page { max-width: 56rem; padding-block: var(--space-4) var(--space-5); }
.prayer-head { text-align: center; margin-bottom: var(--space-4); }
.prayer-head h1 { margin-bottom: var(--space-3); text-wrap: balance; }
.scripture-centered { margin: 0 auto; max-width: 40rem; }
.scripture-centered blockquote p { text-wrap: balance; }
.prayer-head .ornament { margin: var(--space-3) 0; }
.prayer-head .lede { max-width: 44rem; margin: 0 auto var(--space-2); text-wrap: pretty; }
.prayer-welcome { max-width: 44rem; margin: 0 auto; font-size: 1.12rem; text-wrap: pretty; }
/* Crisis-support paragraph: same typography as the welcome text, no box. */
.prayer-welcome.prayer-support { margin-top: var(--space-2); }
.support-tel { font-weight: 700; }

/* Request type cards. The native radio stays in the page (invisible but
   focusable), so arrow keys, screen readers and form logic work as before;
   the card is its label. */
.share-form { margin: 0; }
.request-types { border: 0; margin: 0 0 var(--space-3); padding: 0; min-width: 0; }
.share-heading {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: var(--space-3);
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.4rem + 0.8vw, 2rem);
  line-height: 1.2;
  color: var(--deep-blue);
}
.request-cards { display: grid; grid-auto-rows: 1fr; gap: 0.75rem; }
@media (min-width: 40em) { .request-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
.request-card { position: relative; display: flex; }
.request-card-input { position: absolute; top: 1rem; left: 1rem; width: 1px; height: 1px; margin: 0; opacity: 0; }
.request-card-label {
  flex: 1;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  grid-template-areas: "icon title" "icon hint";
  align-content: center;
  column-gap: 1rem;
  row-gap: 0.2rem;
  min-height: 6.5rem;
  padding: 1rem 2.4rem 1rem 1.2rem;
  cursor: pointer;
  background: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(52, 59, 61, 0.04), 0 6px 18px rgba(54, 95, 115, 0.05);
}
@media (min-width: 40em) {
  .request-card-label {
    grid-template-columns: 1fr;
    grid-template-areas: "icon" "title" "hint";
    align-content: start;
    justify-items: center;
    row-gap: 0.45rem;
    min-height: 12rem;
    padding: 1.6rem 1.1rem 1.4rem;
    text-align: center;
  }
}
.request-card-icon {
  grid-area: icon;
  align-self: center;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--vintage-blue);
}
@media (min-width: 40em) { .request-card-icon { width: 3.75rem; height: 3.75rem; margin-bottom: 0.3rem; } }
.request-card-icon svg { width: 1.75rem; height: 1.75rem; }
.request-card-title { grid-area: title; font-family: var(--font-display); font-size: 1.18rem; line-height: 1.25; color: var(--deep-blue); }
.request-card-hint { grid-area: hint; font-family: var(--font-ui); font-size: 0.88rem; line-height: 1.45; color: var(--charcoal); }
.request-card-label:hover { background: var(--surface); border-color: var(--vintage-blue); }
/* Selected: deep-blue border, tinted card, filled icon circle and a check mark
   (so the selection does not rely on color alone). */
.request-card-input:checked + .request-card-label {
  background: var(--cream-soft);
  border-color: var(--deep-blue);
  box-shadow: inset 0 0 0 1px var(--deep-blue), 0 6px 18px rgba(54, 95, 115, 0.08);
}
.request-card-input:checked + .request-card-label .request-card-icon { background: var(--deep-blue); color: var(--ivory); }
.request-card-input:checked + .request-card-label::after {
  content: "\2713";
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--deep-blue);
  color: var(--ivory);
  font: 700 0.8rem/1.45rem var(--font-ui);
  text-align: center;
}
.request-card-input:focus-visible + .request-card-label { outline: 3px solid var(--deep-blue); outline-offset: 3px; }

/* The form card */
.form-card {
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(52, 59, 61, 0.04), 0 10px 30px rgba(54, 95, 115, 0.06);
}
/* Understated preview notice beneath the button (until the backend is connected). */
.preview-note {
  margin: 0.35rem 0 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-style: italic;
  color: var(--charcoal);
}
.form-card .field { margin-bottom: 1.6rem; }
.form-card input[type="text"], .form-card input[type="email"], .form-card textarea {
  background: var(--ivory);
  border-color: var(--vintage-blue);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}
.form-card input[aria-invalid="true"], .form-card textarea[aria-invalid="true"] { border: 2px solid var(--error); }
.field.check > label { display: inline; font-weight: 400; margin: 0; }
.form-actions { margin-top: var(--space-3); }
.button-block { width: 100%; min-height: 3rem; font-size: 1.05rem; border-radius: 10px; }
.form-reassurance {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin: 0.9rem 0 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--charcoal);
}
.form-reassurance-icon { display: inline-flex; color: var(--vintage-blue); flex: none; }
.form-reassurance-icon svg { width: 1.05rem; height: 1.05rem; }
.prototype-result {
  margin-top: var(--space-3);
  padding: 1rem 1.2rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.55;
  background: var(--cream-soft);
  border: 1px dashed var(--vintage-blue);
  border-radius: 10px;
}
.prototype-result h3 { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700; color: var(--charcoal); margin-bottom: 0.4rem; }
.prototype-result p:last-child { margin-bottom: 0; }
.field { margin: 0 0 var(--space-3); padding: 0; border: 0; }
.field > label, .field legend {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  margin-bottom: 0.35rem;
  padding: 0;
}
.optional, .required { font-weight: 400; font-size: 0.9rem; }
.field .hint { margin-bottom: 0.5rem; }

input[type="text"], input[type="email"], input[type="search"], textarea {
  width: 100%;
  font: 1.05rem/1.5 var(--font-ui);
  color: var(--charcoal);
  background: var(--surface);
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  min-height: 44px;
}
textarea { resize: vertical; min-height: 10rem; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--error); }

.check { display: flex; align-items: flex-start; gap: 0.65rem; margin-bottom: 0.6rem; font-family: var(--font-ui); }
.check input { width: 1.3rem; height: 1.3rem; margin: 0.2rem 0 0; accent-color: var(--deep-blue); flex: none; }
.check label { font-size: 1.02rem; }

.field-error { font-family: var(--font-ui); font-size: 0.95rem; font-weight: 600; color: var(--error); margin: 0.4rem 0 0; }
.error-summary {
  border: 2px solid var(--error);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-2);
  margin-bottom: var(--space-3);
  font-family: var(--font-ui);
}
.error-summary h2 { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700; color: var(--error); }
/* Live form only (v0.6.0): Turnstile check, sending errors, thank-you card */
.turnstile-field { display: flex; justify-content: center; margin-bottom: var(--space-2); }
.turnstile-field:empty { margin: 0; }
.submit-error p { margin: 0; }
.submit-result { text-align: center; }
.submit-result-heading { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem); margin-bottom: var(--space-1); }
.submit-result p { font-size: 1.12rem; max-width: 36rem; margin-inline: auto; }
.submit-result p:last-child { margin-bottom: 0; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--error); }

/* "Your Privacy & How We Care": one expandable section (native <details>). */
.care-details {
  margin-top: var(--space-4);
  background: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.care-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--deep-blue);
  border-radius: 14px;
}
.care-details summary::-webkit-details-marker { display: none; }
.care-details summary::after { content: "+"; flex: none; font: 400 1.5rem/1 var(--font-ui); color: var(--deep-blue); }
.care-details[open] summary::after { content: "\2212"; }
.care-details summary:hover { background: var(--cream-soft); }
.care-body { padding: 0 1.25rem 1.25rem; font-size: 1.02rem; }
.care-body h3 { font-size: 1.15rem; margin: var(--space-2) 0 0.5rem; }
.care-body ul { padding-left: 1.2rem; margin: 0 0 0.5rem; }
.care-body li { margin-bottom: 0.5rem; }

/* ---------- About ---------- */

/* Everything centered: heading, subtitle and divider; the artwork and the
   description of Esther's book; a divider; then Our Purpose and the dedication.
   All paragraphs share one style: full content width, same size, line spacing
   and paragraph gap. */
.about-head { text-align: center; margin-bottom: var(--space-3); }
.about-head h1 { margin-bottom: var(--space-2); text-wrap: balance; }
.about-head .lede { max-width: 42rem; margin: 0 auto; text-wrap: balance; }
.about-head .ornament { margin-top: var(--space-3); }

.about-section { text-align: center; }
.about-section h2 { margin-bottom: var(--space-2); }
.about-section p { font-size: 1.125rem; line-height: 1.7; margin: 0 0 var(--space-2); text-wrap: pretty; }
.about-section p:last-child { margin-bottom: 0; }
.about-art { margin: 0 auto var(--space-3); max-width: 26rem; }
.about-divider { margin: var(--space-4) 0 var(--space-3); }

/* ---- Meet Esther (About page enhancement) ----
   A framed portrait beside a short introduction, and "Glimpses of Her Life":
   a small family album. Photographs keep their own proportions (never
   cropped) inside a simple ivory mat with a hairline border. */
.about-esther-head { margin-bottom: var(--space-3); }
.about-esther-head h2 { margin-bottom: 0.35rem; }
.about-section .about-esther-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--charcoal);
  margin: 0;
}
.about-esther-body { display: grid; gap: var(--space-3); justify-items: center; }
.about-esther-text { max-width: 44rem; }
.about-esther-portrait { margin: 0; width: 100%; max-width: 21rem; }
@media (min-width: 48em) {
  .has-portrait .about-esther-body {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(2rem, 1rem + 3vw, 3.5rem);
    justify-items: stretch;
  }
  .has-portrait .about-esther-portrait { justify-self: end; }
  .has-portrait .about-esther-text { text-align: left; }
}

/* The mat: shared by the portrait and every album photograph. */
.album-link {
  display: block;
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(52, 59, 61, 0.05), 0 10px 24px rgba(54, 95, 115, 0.08);
  line-height: 0;
}
.album-link img { display: block; width: 100%; height: auto; }
.album-link:hover { border-color: var(--vintage-blue); }
.album-link:focus-visible { outline: 3px solid var(--deep-blue); outline-offset: 3px; }
.about-esther-portrait .album-link { padding: 0.75rem; }
/* Captions: small italic serif in the site's muted deep blue (as in the
   "Soli Deo Gloria" line), readable on ivory (contrast about 6:1). */
.about-esther-portrait figcaption,
.album-photo figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--deep-blue);
  text-align: center;
  text-wrap: balance;
}

/* "In Her Own Words": Esther's recorded voice, in the same ivory mat as the
   photographs. The browser's own audio controls, full width of the card. */
.esther-voice { margin-top: var(--space-4); }
.esther-voice-heading { font-size: 1.35rem; margin-bottom: 0.35rem; }
.about-section .esther-voice-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 34rem;
  margin: 0 auto;
  text-wrap: balance;
}
.esther-voice-ornament { margin: var(--space-2) 0 var(--space-3); }
.voice-card {
  margin: 0 auto;
  max-width: 30rem;
  padding: 1.1rem clamp(0.9rem, 0.5rem + 1.5vw, 1.5rem) 0.95rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(52, 59, 61, 0.05), 0 10px 24px rgba(54, 95, 115, 0.08);
}
.voice-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--deep-blue);
  margin-bottom: 0.8rem;
  text-wrap: balance;
}
.voice-player { display: block; width: 100%; }
.about-section .voice-length {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--charcoal);
  margin: 0.65rem 0 0;
}
.about-section .esther-voice-closing {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--deep-blue);
  margin: var(--space-3) 0 0;
}

.esther-album { margin-top: var(--space-4); }
.esther-album-heading { font-size: 1.35rem; margin-bottom: var(--space-3); }
/* Up to four to a row on large screens, fewer as the page narrows. A row that
   is not full is centered, and photographs of different shapes are centered
   on each other within a row. */
.photo-album {
  --album-gap: clamp(1.25rem, 0.75rem + 2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--album-gap);
}
.photo-album > li { flex: 0 1 13rem; min-width: 0; }
/* Phones: two to a row. */
@media (max-width: 34em) {
  .photo-album > li { flex: 1 1 40%; max-width: calc((100% - var(--album-gap)) / 2); }
}
.album-photo { margin: 0; }

/* Photograph viewer (native <dialog>) */
.photo-viewer {
  width: min(96vw, 64rem);
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--ivory);
  color: var(--charcoal);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.photo-viewer::backdrop { background: rgba(43, 76, 92, 0.88); }
.photo-viewer-inner { display: flex; flex-direction: column; gap: 0.75rem; padding: clamp(0.75rem, 0.5rem + 1vw, 1.25rem); }
.photo-viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.photo-viewer-count { margin: 0; font-family: var(--font-ui); font-size: 0.95rem; }
.photo-viewer-figure { margin: 0; text-align: center; touch-action: pan-y pinch-zoom; }
.photo-viewer-figure img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: calc(96vh - 11rem);
  width: auto;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.photo-viewer-figure figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--deep-blue);
  text-wrap: balance;
}
.photo-viewer-nav { display: flex; justify-content: space-between; gap: 1rem; }
.photo-viewer-nav[hidden] { display: none; }

.about-purpose .ornament { margin: var(--space-3) 0 var(--space-2); }
.about-purpose .about-sdg {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  color: var(--deep-blue);
}

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

/* Compact three-column footer (v0.4; content as approved in v0.3).
   Whitespace separates the columns; phones stack them. */
.site-footer {
  --footer-line: rgba(248, 245, 237, 0.45);   /* ivory hairlines */
  background: var(--deep-blue);
  color: var(--ivory);
  font-family: var(--font-display);
  line-height: 1.4;
  padding-block: 1.6rem 1.75rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--ivory); }
.site-footer :focus-visible { outline-color: var(--ivory); }

.footer-grid {
  display: grid;
  row-gap: 1.4rem;
  text-align: center;
}
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@media (min-width: 48em) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 0.8fr); column-gap: clamp(1.5rem, 4vw, 4rem); }
}
/* Desktop (v0.4.2): a wider center column with equal side columns, so both
   center statements fit on one line and the footer stays balanced. */
@media (min-width: 64em) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr); }
}

/* Left: illustration and dedication */
.footer-home { display: block; width: 100%; max-width: 9.5rem; line-height: 0; border-radius: 4px; }
.footer-art { width: 100%; max-width: 9.5rem; height: auto; }
.site-footer .footer-sdg {
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.15;
  margin-top: 0.45rem;
}
.site-footer .footer-sdg-translation {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-reading);
  font-style: italic;
  font-size: 0.86rem;
  margin-top: 0.2rem;
  white-space: nowrap;          /* keep the translation on one line */
}
.footer-sdg-translation::before,
.footer-sdg-translation::after { content: ""; flex: 0 1 1.5rem; min-width: 0.5rem; height: 1px; background: var(--footer-line); }

/* Center: encouragement and crisis support */
/* v0.4.2: no width caps — each statement stays on one line when the column
   is wide enough and wraps naturally (balanced) when it is not. */
/* Both center statements share one typeface, size, weight and color. */
.footer-loved,
.footer-crisis {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ivory);
  text-wrap: balance;
}
.footer-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.6rem 0;
}
.footer-divider::before,
.footer-divider::after { content: ""; width: 2.5rem; height: 1px; background: var(--footer-line); }
.footer-divider svg { width: 1.75rem; height: auto; display: block; }
.footer-crisis-action { display: inline-block; white-space: nowrap; }   /* when it wraps, keeps "call or text 988." together */
.footer-tel {
  font-weight: 700;          /* same size as the statement; bold only */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--footer-line);
  padding: 0.1em 0;        /* taller tap target; no side padding, so the period sits right after 988 */
}
.footer-tel:hover { color: var(--ivory); text-decoration-color: var(--ivory); text-decoration-thickness: 2px; }

/* Right: three links, identical styling */
.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.75rem;
}
@media (min-width: 48em) { .footer-links ul { flex-direction: column; align-items: center; gap: 0.5rem; } }
.footer-links a {
  display: inline-block;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--ivory);
  text-decoration: none;
  padding: 0.25rem 0.1rem 0.15rem;
  border-bottom: 1px solid var(--footer-line);
}
.footer-links a:hover { color: var(--ivory); border-bottom-color: var(--ivory); box-shadow: 0 1px 0 var(--ivory); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .topic-link, .button { transition: background-color 0.15s ease, border-color 0.15s ease; }
  .pathway { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease; }
  .pathway-icon { transition: background-color 0.2s ease; }
  .pathway:hover, .pathway:focus-visible { transform: translateY(-2px); }
  .topic-card { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease; }
  .topic-card-icon { transition: background-color 0.2s ease; }
  .topic-card:hover, .topic-card:focus-visible { transform: translateY(-2px); }
  .footer-links a, .footer-tel { transition: border-color 0.2s ease, box-shadow 0.2s ease, text-decoration-color 0.2s ease; }
  .request-card-label { transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease; }
  .request-card-icon { transition: background-color 0.15s ease, color 0.15s ease; }
  .category summary { transition: background-color 0.15s ease; }
  .category summary::after { transition: transform 0.2s ease; }
  .album-link { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
  .album-link:hover { box-shadow: 0 1px 2px rgba(52, 59, 61, 0.06), 0 14px 30px rgba(54, 95, 115, 0.14); }
}

/* ---------- Print ---------- */

@media print {
  @page { margin: 2cm; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .prototype-banner, .skip-link, .breadcrumb,
  .no-print, .poem-actions, .callout, .nav-toggle, .voice-player { display: none !important; }
  .page-narrow, .page-medium, .about-page { padding: 0; max-width: none; }
  h1, h2, h3, .poem-title { color: #000; }
  a { color: #000; text-decoration: none; }
  .poem-body { font-size: 13pt; }
  .poem-body .stanza { break-inside: avoid; }
  .placeholder-notice { border-color: #000; }
  .poem-meta { border-color: #999; }
  .print-only { display: block; font-family: var(--font-ui); font-size: 9pt; margin-top: 1cm; }
  .photo-viewer { display: none !important; }
  .album-link { box-shadow: none; }
  .album-photo, .about-esther-portrait { break-inside: avoid; }
}
