/* Preston Trail Ward - visual identity v2
   Mobile-first, no frameworks. */

:root {
  --ink: #1d2531;
  --ink-soft: #33404f;
  --muted: #5c6675;
  --paper: #f7f9fc;
  --card: #ffffff;
  --line: #dfe6f0;
  --midnight: #1c2f57;
  --midnight-deep: #13223f;
  --sky: #2f5da3;
  --sky-bright: #8fb4e3;
  --sky-soft: #e4ebf6;
  --sky-deep: #254a86;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 46, 0.06), 0 8px 24px rgba(20, 32, 46, 0.08);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; touch-action: pan-x pan-y; }

/* Clip horizontal overflow: the off-canvas mobile nav sits one full
   screen-width to the right when closed and must not make the page
   scrollable sideways. `clip` (not `hidden`) keeps position: sticky working. */
html, body { overflow-x: hidden; overflow-x: clip; }

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

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

a { color: var(--sky-deep); }
a:hover { color: var(--sky); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; color: var(--midnight); }

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

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

/* Skip link: hidden until keyboard focus lands on it. */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--midnight-deep); color: #fff; font-weight: 600;
  padding: 0.75rem 1.25rem; border-radius: 0 0 12px 12px; text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.92);
  border-bottom: 1px solid var(--line);
}
/* Frosted-glass blur lives on a pseudo-element, NOT on .site-header itself:
   backdrop-filter on the header would make it the containing block for the
   fixed-position mobile nav, breaking viewport anchoring (iOS Safari then
   renders the drawer at the document top instead of sliding in from the
   right). The pseudo-element blurs the same backdrop with no side effects. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: inherit;
}

.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.7rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.site-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--midnight); }

.brand-mark {
  color: var(--sky);
  border: 2px solid var(--sky); border-radius: 50%;
  width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.brand-mark svg { display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-size: 0.66rem; color: var(--muted); letter-spacing: 0.02em; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.65rem 0.7rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--midnight); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: flex; position: fixed; top: 0; right: 0; z-index: 40;
  width: 100%; height: 100vh; height: 100dvh;
  background: var(--paper);
  flex-direction: column; gap: 0.15rem;
  padding: 5.25rem 1.5rem 2rem;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
  box-shadow: -12px 0 32px rgba(20, 32, 46, 0.12);
}
.site-nav.open { transform: translateX(0); visibility: visible; }
body.nav-open { overflow: hidden; }
.site-brand, .nav-toggle { position: relative; z-index: 60; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 1rem;
  padding: 0.65rem 0.25rem; border-bottom: 1px solid var(--line);
}
.site-nav a:last-child { border-bottom: none; }
.site-nav a.active { color: var(--sky-deep); font-weight: 700; }
.site-nav a:hover { color: var(--sky); }

/* ---------- grouped nav sections ---------- */
.nav-group-label {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.25rem; margin-top: 0.35rem; cursor: pointer;
  font-family: inherit; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--sky-deep);
  text-align: left;
}
.nav-group-label::after { content: "\25BE"; font-size: 0.85rem; transition: transform 0.2s; }
.nav-group.open .nav-group-label::after { transform: rotate(180deg); }
.nav-group-links { display: none; flex-direction: column; }
.nav-group.open .nav-group-links { display: flex; }
.nav-group-links a { padding-left: 1rem; }
.nav-group-links a:last-child { border-bottom: none; }
.nav-group.active > .nav-group-label { color: var(--sky-deep); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; position: static; flex-direction: row; align-items: center;
    gap: 1rem; padding: 0; border: none; box-shadow: none; background: none;
    width: auto; height: auto; overflow: visible;
    transform: none; visibility: visible; z-index: auto; transition: none; }
  .site-nav a { border: none; padding: 0.25rem 0; font-size: 0.92rem; position: relative; white-space: nowrap; }
  .site-nav a.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
    background: var(--sky); border-radius: 2px;
  }
  .nav-group { position: relative; }
  .nav-group-label {
    border: none; margin: 0; padding: 0.25rem 0; width: auto;
    font-size: 0.92rem; font-weight: 500; text-transform: none; letter-spacing: 0;
    color: var(--ink-soft);
  }
  .nav-group-label::after { content: "\25BE"; margin-left: 0.35rem; font-size: 0.7rem; }
  .nav-group-label:hover { color: var(--sky); }
  .nav-group.active > .nav-group-label { color: var(--sky-deep); font-weight: 700; }
  .nav-group-links {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 12px 24px rgba(20, 32, 46, 0.12); padding: 0.5rem; min-width: 12rem;
    z-index: 50;
  }
  .nav-group:hover .nav-group-links,
  .nav-group:focus-within .nav-group-links,
  .nav-group.open .nav-group-links { display: flex; }
  .nav-group-links a { padding: 0.55rem 0.85rem; font-size: 0.95rem; border-radius: 8px; }
  .nav-group-links a:hover { background: rgba(176, 141, 79, 0.12); color: var(--ink); }
  .nav-group-links a.active::after { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-primary { background: var(--sky); color: #fff; }
.btn-primary:hover { background: var(--sky-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,0.6); color: #fff; padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; color: #fff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,22,34,0.25) 0%, rgba(13,22,34,0.35) 40%, rgba(13,22,34,0.82) 100%); }
.hero-inner { position: relative; padding-top: 6rem; padding-bottom: 3.5rem; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--sky-soft); margin: 0 0 0.75rem; font-weight: 600; }
.hero-title { color: #fff; font-size: clamp(2.6rem, 9vw, 4.6rem); margin: 0 0 0.75rem; font-weight: 600; }
.hero-sub { font-size: 1.15rem; color: rgba(255,255,255,0.88); max-width: 34rem; margin: 0 0 1.75rem; }
.hero-cta { display: flex; flex-direction: column; gap: 0.85rem; }
.hero-cta .btn { text-align: center; }
/* Native button chrome (iOS Safari) overrides ghost-button colors and ruins
   contrast on the dark hero; normalize the share button to match the links. */
.hero-cta button.btn {
  -webkit-appearance: none; appearance: none;
  background: transparent; color: #fff; font: inherit; cursor: pointer;
}
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; }
  .hero-cta .btn { flex: 1 1 0; }
}

@media (min-width: 860px) {
  .hero { min-height: 82vh; }
}

/* ---------- meeting band ---------- */
.meeting-band { background: var(--midnight); color: #fff; }
.meeting-band-inner { display: flex; flex-direction: column; gap: 1rem; padding-top: 1.75rem; padding-bottom: 1.75rem; }
.meeting-item { display: flex; flex-direction: column; }
.meeting-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--sky-soft); font-weight: 600; }
.meeting-value { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
@media (min-width: 860px) {
  .meeting-band-inner { flex-direction: row; align-items: center; gap: 3rem; }
  .meeting-band-inner .btn { margin-left: auto; }
}

/* ---------- sections ---------- */
.section { padding: 3.5rem 0; }
@media (max-width: 639px) { .section { padding: 2.5rem 0; } }
.section.container { padding-left: 1.25rem; padding-right: 1.25rem; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- write-a-missionary CTA band ---------- */
.missionary-cta { background: var(--midnight); color: #fff; }
.missionary-cta h2 { color: #fff; margin-bottom: 0.4em; }
.missionary-cta p { color: rgba(255, 255, 255, 0.85); margin: 0; max-width: 42rem; }
.missionary-cta-inner { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; justify-content: space-between; }
.missionary-cta .btn-primary { flex-shrink: 0; }

/* ---------- missionary spotlight (homepage) ---------- */
.spotlight-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; max-width: 36rem; margin: 0 auto; text-align: center; }
.spotlight-media { border-radius: 0.9rem; overflow: hidden; margin: -0.25rem -0.25rem 1.1rem; aspect-ratio: 16 / 9; background: #dfe7ef; }
.spotlight-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spotlight-name { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.25rem; }
.spotlight-mission { color: var(--muted); margin: 0 0 0.35rem; }
.spotlight-place { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 0.6rem; }
.spotlight-fact { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; margin: 0 0 0.6rem; }
.spotlight-credit { font-size: 0.78rem; color: var(--ink-faint); margin: 0 0 1rem; }
.spotlight-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.spotlight-card .btn-ghost { border-color: var(--sky); color: var(--sky-deep); background: #fff; }
.spotlight-card .btn-ghost:hover { background: var(--sky-soft); color: var(--sky-deep); }
.spotlight-all { margin: 0.9rem 0 0; }
.spotlight-all a { color: var(--sky-deep); font-weight: 600; text-decoration: underline; }

/* ---------- save-the-date banner ---------- */
.save-date { background: var(--midnight); color: #fff; }
.save-date-kicker {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--sky-bright); margin: 0 0 0.5rem;
}
.save-date h2 { color: #fff; margin: 0 0 0.8rem; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.save-date-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.save-date-list li {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: baseline;
  font-size: 1.05rem; color: rgba(255, 255, 255, 0.92);
}
.save-date-label {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--sky-bright); min-width: 11rem;
}
.save-date-inner { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; align-items: center; justify-content: space-between; }
.save-date .btn-primary { flex-shrink: 0; }
.section-head { margin-bottom: 2rem; max-width: 44rem; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 0.35rem; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.08rem; }

/* ---------- news cards ---------- */
.news-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.5rem;
}
.news-card h3 { font-size: 1.3rem; margin: 0; }
.news-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.news-card p + p { margin-top: 0.5rem; }

/* ---------- quick links ---------- */
.link-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .link-grid { grid-template-columns: repeat(2, 1fr); } }

.quick-link {
  display: block; text-decoration: none; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.6rem;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.quick-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--sky); }
.quick-link-title { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--midnight); }
.quick-link:hover .quick-link-title { color: var(--sky-deep); }
.quick-link-sub { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 0.25rem; }

/* ---------- page hero ---------- */
.page-hero { background: var(--midnight); color: #fff; padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 0.5rem; }
.page-hero .lede { color: rgba(255,255,255,0.82); font-size: 1.1rem; max-width: 46rem; margin: 0; }
.page-hero-img { min-height: 46vh; display: flex; align-items: flex-end; padding: 0; }
.page-hero-img .hero-inner { padding-top: 7rem; padding-bottom: 2.5rem; }
.page-hero-img h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }

/* ---------- prose ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.3rem; margin-top: 1.75rem; }
.prose p, .prose ul { color: var(--ink-soft); }
.prose ul { padding-left: 1.4rem; }

/* ---------- program page ---------- */
.program-hero { background: linear-gradient(160deg, var(--midnight) 0%, var(--midnight-deep) 100%); color: #fff; text-align: center; padding: 4rem 0 3.25rem; }
.program-kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; color: var(--sky-soft); margin: 0 0 0.75rem; font-weight: 600; }
.program-hero h1 { color: #fff; font-size: clamp(2.2rem, 7vw, 3.4rem); margin: 0 0 0.5rem; font-weight: 500; }
.program-date { color: rgba(255,255,255,0.85); font-size: 1.15rem; margin: 0; font-family: var(--font-display); font-style: italic; }

.program-sheet { max-width: 46rem; }
.program-meta {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.75rem; margin-bottom: 2.5rem;
}
.program-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.program-row:last-child { border-bottom: none; }
.program-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding-top: 0.25rem; }
.program-value { font-size: 1.05rem; color: var(--midnight); }

.program-section-title { text-align: center; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--sky-deep); margin: 2.75rem 0 1.25rem; font-family: var(--font-body); font-weight: 700; }
.program-section-title::after { content: ""; display: block; width: 3.5rem; height: 2px; background: var(--sky); margin: 0.75rem auto 0; border-radius: 2px; }

.order-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.75rem 1.75rem; }
.order-row { display: grid; grid-template-columns: 1fr; gap: 0.1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: none; }
.order-kind { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--midnight); }
.order-detail { color: var(--ink-soft); font-size: 1.02rem; }
@media (min-width: 640px) {
  .order-row { grid-template-columns: 13rem 1fr; gap: 1.25rem; align-items: baseline; }
}

.announcements { display: grid; gap: 1.1rem; }
.announcement { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: 10px; padding: 1.25rem 1.4rem; box-shadow: var(--shadow); }
.announcement h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.announcement p { margin: 0; color: var(--ink-soft); }

/* ---------- search controls (events page) ---------- */
.archive-controls { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .archive-controls { flex-direction: row; } }
.archive-search { flex: 1; }
.archive-search input {
  width: 100%; font-size: 1rem; padding: 0.8rem 1rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); font-family: var(--font-body);
}
.archive-search input:focus { outline: 2px solid var(--sky); border-color: var(--sky); }
.archive-count { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.25rem; }
.archive-count:empty { margin: 0; }

/* ---------- events ---------- */
.events-subhead { font-size: 1.5rem; margin: 0 0 1.25rem; }
.events-subhead:not(:first-child) { margin-top: 2.75rem; }
.event-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .event-grid { grid-template-columns: repeat(3, 1fr); } }

.event-card {
  display: block; text-decoration: none; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(20,32,46,0.08), 0 16px 32px rgba(20,32,46,0.12); }
.event-flyer { aspect-ratio: 4 / 3; overflow: hidden; background: var(--midnight); }
.event-flyer img { width: 100%; height: 100%; object-fit: cover; }
.event-body { padding: 1.4rem 1.5rem 1.6rem; }
.event-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--sky-deep); background: var(--sky-soft); border-radius: 999px; padding: 0.25rem 0.75rem; margin: 0 0 0.6rem; }
.event-body h3 { font-size: 1.35rem; margin: 0 0 0.3rem; color: var(--midnight); }
.event-date, .event-time { margin: 0; color: var(--muted); font-size: 0.95rem; }

.event-detail { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-top: 3rem; padding-bottom: 3.5rem; max-width: 60rem; }
@media (min-width: 900px) { .event-detail { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.event-hero-flyer { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.event-kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--sky-soft); margin: 0 0 0.75rem; font-weight: 600; }
.detail-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.5rem 1.5rem; margin-bottom: 1.75rem; }
.detail-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: none; }
.detail-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding-top: 0.25rem; }
.detail-value { color: var(--midnight); font-size: 1.02rem; }
.event-description p { color: var(--ink-soft); font-size: 1.05rem; }
.event-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.back-link { margin-top: 1.5rem; }

/* ---------- young men schedule ---------- */
.ym-schedule { max-width: 44rem; }
.ym-month { display: flex; align-items: center; gap: 0.9rem; margin: 2rem 0 0.4rem; }
.ym-month span { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 700; color: var(--sky-deep); white-space: nowrap; }
.ym-month::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ym-event { display: flex; gap: 1rem; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin: 0.8rem 0; }
.ym-date { flex: 0 0 4.25rem; background: var(--midnight); border-radius: 10px; text-align: center; padding: 0.55rem 0 0.6rem; }
.ym-mon { display: block; color: #a9c2e8; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; }
.ym-day { display: block; color: #fff; font-size: 1.7rem; font-weight: 700; line-height: 1.15; font-family: var(--font-display); }
.ym-info { min-width: 0; }
.ym-weekday { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; font-weight: 700; color: var(--muted); margin-bottom: 0.15rem; }
.ym-badge { display: inline-block; vertical-align: 1px; margin-left: 0.5rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; background: var(--sky); border-radius: 999px; padding: 0.15rem 0.6rem; }
.ym-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--midnight); line-height: 1.3; }
.ym-title a { color: var(--midnight); text-decoration: underline; text-decoration-color: var(--sky); text-underline-offset: 3px; }
.ym-detail { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }
.ym-who { color: var(--sky); font-size: 0.9rem; font-weight: 600; margin-top: 0.25rem; }
.ym-where { color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }
.ym-flyer { margin-top: 0.35rem; }
.ym-flyer a { color: var(--sky); font-size: 0.9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ym-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; margin: 1rem 0; max-width: 44rem; }
.ym-card h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--midnight); margin: 0 0 0.6rem; }
.ym-card p { margin: 0.55rem 0; }
.ym-card ul { margin: 0.55rem 0; padding-left: 1.25rem; }
.ym-card li { margin: 0.35rem 0; }
.ym-key { margin: 0; }
.ym-cta-row, .cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
.ym-cta-row .btn, .cta-row .btn { padding: 0.65rem 1.25rem; font-size: 0.95rem; }

/* ---------- general conference box ---------- */
.gc-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin: 0 auto; max-width: 44rem; }
.gc-box p { margin: 0.55rem 0; }
.gc-day { font-size: 1.15rem; color: var(--midnight); margin: 1.1rem 0 0.25rem; }
.gc-schedule { list-style: none; margin: 0.25rem 0 0.5rem; padding: 0; }
.gc-schedule li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.gc-schedule li:last-child { border-bottom: none; }
.gc-schedule span { font-weight: 600; }
.gc-note { font-size: 0.9rem; color: var(--ink-soft); }
.teaser-note { font-size: 0.9rem; color: var(--ink-soft); margin: 0.5rem 0; }

/* ---------- program look-ahead ---------- */
.lookahead-row { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.lookahead-row:last-child { border-bottom: none; }
.lookahead-date { display: block; font-weight: 700; color: var(--midnight); margin-bottom: 0.15rem; }
.lookahead-blurb { color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { background: var(--midnight-deep); color: rgba(255,255,255,0.85); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 2.75rem 1.25rem; text-align: center; }
.footer-ward { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: #fff; margin-bottom: 0.6rem; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 0.9rem; align-items: center; font-size: 0.98rem; }
.footer-meta a { color: var(--sky-soft); }
.footer-meta .dot { color: var(--sky-bright); }
.footer-note { margin-top: 1rem; font-size: 0.85rem; color: rgba(255,255,255,0.55); }
.footer-contact { margin-top: 1rem; font-size: 0.95rem; }
.footer-contact a { color: var(--sky-soft); }
.footer-contact .dot { color: var(--sky-bright); margin: 0 0.35rem; }

/* ---------- homepage program teaser ---------- */
.program-teaser {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem;
}
.teaser-list { list-style: none; margin: 0; padding: 0; }
.teaser-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.teaser-list li:last-child { border-bottom: none; }
.teaser-label { font-weight: 700; color: var(--midnight); margin-right: 0.35rem; }
.teaser-ann-head { font-weight: 700; color: var(--midnight); margin: 1.1rem 0 0.35rem; }
.teaser-ann { margin: 0 0 1.5rem; padding-left: 1.25rem; color: var(--ink-soft); }
.teaser-ann li { margin-bottom: 0.3rem; }
@media (max-width: 639px) { .program-teaser { padding: 1.25rem; } }

/* ---------- contact buttons ---------- */
.contact-buttons { display: grid; gap: 0.75rem; margin-bottom: 1.25rem; }
.contact-buttons .btn { text-align: center; }
@media (min-width: 640px) {
  .contact-buttons { grid-template-columns: repeat(3, 1fr); max-width: 34rem; margin-left: auto; margin-right: auto; }
}
.contact-detail { color: rgba(255,255,255,0.85); margin: 0; }
.contact-detail a { color: var(--sky-soft); }
/* contact detail on light page sections (contact page) */
.section > .contact-detail { color: var(--ink-soft); }
.section > .contact-detail a { color: var(--sky-deep); }

/* ---------- visit us ---------- */
.directions-card {
  background: var(--midnight); border-radius: var(--radius); padding: 1.75rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.directions-card h2 { color: #fff; margin: 0 0 0.6rem; }
.directions-card p { color: rgba(255, 255, 255, 0.88); margin: 0 0 0.4rem; }
.directions-card p:last-child { margin-bottom: 0; }
.directions-card .btn { align-self: flex-start; }
@media (min-width: 640px) {
  .directions-card { flex-direction: row; align-items: center; justify-content: space-between; }
}
.map-embed {
  margin-bottom: 2.25rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.map-embed iframe { display: block; width: 100%; height: 300px; border: 0; }

/* ---------- ward leadership list (contact page) ---------- */
.leader-list { margin: 1rem 0 0; border-top: 1px solid var(--line); }
.leader-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--line);
}
.leader-role {
  display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--sky-deep); margin-bottom: 0.1rem;
}
.leader-name { font-size: 1.02rem; font-weight: 500; color: var(--midnight); }
.leader-phone { color: var(--sky-deep); text-decoration: none; font-size: 0.95rem; white-space: nowrap; }
.leader-phone:hover { text-decoration: underline; }

/* ---------- missionary map ---------- */
.missionary-map-wrap {
  margin: 1.25rem 0 2rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
#missionary-map { height: 380px; width: 100%; z-index: 1; background: #e8eef4; scroll-margin-top: 84px; }
/* Touch screens: the map must never swallow vertical page scrolls. */
#missionary-map.map-touch-scroll.leaflet-container { touch-action: pan-y !important; }
@media (max-width: 639px) { #missionary-map { height: 320px; } }
.map-count-label {
  background: none; border: none; box-shadow: none;
  color: #fff; font-weight: 700; font-size: 11px;
}
.map-count-label::before { display: none; }
.mission-zoom-label {
  background: rgba(255,255,255,.95); border: 1px solid var(--sky);
  border-radius: 999px; color: var(--midnight);
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.18); white-space: nowrap;
  transition: opacity .25s ease;
}
.mission-zoom-label::before { display: none; }
.map-popup-mission { font-weight: 700; color: var(--midnight); margin-bottom: 0.3rem; }
.map-popup-person { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.35rem; }
.map-popup-person a { color: var(--sky-deep); overflow-wrap: anywhere; }

/* ---------- mission spotlight ---------- */
.mission-spotlight {
  margin: 0 0 2rem; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff; box-shadow: var(--shadow);
}
.spotlight-prompt {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 1.2rem 1.4rem; color: var(--ink-soft);
}
.spotlight-prompt p { margin: 0; font-size: 0.95rem; }
.spotlight-prompt-icon { display: flex; color: var(--sky-deep); flex: 0 0 auto; }
.spotlight-img-wrap { aspect-ratio: 16 / 9; overflow: hidden; background: #dfe7ef; }
.spotlight-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spotlight-body { padding: 1.25rem 1.4rem 1.5rem; }
.spotlight-body h3 { margin: 0 0 0.2rem; color: var(--midnight); font-size: 1.3rem; }
.spotlight-place { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 0.85rem; }
.spotlight-facts { margin: 0 0 0.85rem; padding-left: 1.25rem; }
.spotlight-facts li { margin-bottom: 0.45rem; line-height: 1.55; }
.mission-spotlight { scroll-margin-top: 5rem; }
.spotlight-credit { font-size: 0.8rem; color: var(--ink-faint); margin: 0 0 0.85rem; }
.spotlight-fact-line { margin: 0 0 0.5rem; color: var(--ink-soft); }
.spotlight-fact-line[hidden] { display: none; }
.spotlight-tag { font-weight: 600; color: var(--sky-deep); }
.spotlight-serving { margin: 0; padding-top: 0.85rem; border-top: 1px solid var(--line); color: var(--ink-soft); }
.spotlight-recipe-link { color: var(--sky); font-weight: 600; text-decoration: underline; }
.spotlight-phrases { margin: 0.85rem 0; padding: 0.85rem 1rem; background: var(--sky-soft); border-radius: 0.6rem; }
.spotlight-phrases[hidden] { display: none; }
.spotlight-phrases h4 { margin: 0 0 0.5rem; color: var(--midnight); font-size: 1rem; }
.spotlight-phrases ul { list-style: none; margin: 0; padding: 0; }
.phrase-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.phrase-row:first-child { border-top: 0; padding-top: 0; }
.phrase-text { flex: 1 1 auto; min-width: 0; }
.phrase-label { font-weight: 600; color: var(--sky-deep); }
.phrase-native { font-size: 1.05rem; }
.phrase-say { color: var(--ink-soft); font-style: italic; }
.phrase-play { flex-shrink: 0; background: var(--sky); color: #fff; border: 0; border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; min-height: 44px; }
.phrase-play:hover { background: var(--sky-deep); }
.spotlight-cta { margin: 0.9rem 0 0; }
.spotlight-cta[hidden] { display: none; }

/* ---------- missionary cards ---------- */
.missionary-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; margin: 1rem 0 0; }
@media (min-width: 640px) { .missionary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .missionary-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- missionary roster toggle ---------- */
.missionary-count { font-size: 0.9rem; color: var(--muted); margin: 0.25rem 0 0; }
.is-hidden { display: none; }
.missionary-search { position: relative; margin: 0 0 0.75rem; }
.missionary-search svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.missionary-search input { width: 100%; padding: 0.7rem 1rem 0.7rem 2.6rem; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: var(--card); }
.missionary-search input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(47, 93, 163, 0.15); }
.missionary-card.is-hidden { display: none; }
.returned-region.is-hidden { display: none; }
.missionary-no-results { text-align: center; color: var(--muted); padding: 1.25rem 0; }
.returned-expander { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; margin: 1.25rem 0 0; padding: 0.85rem 1rem; background: var(--card); border: 1.5px solid var(--sky); border-radius: 14px; font: inherit; font-weight: 600; font-size: 1rem; color: var(--midnight); cursor: pointer; }
.returned-expander:hover { background: #eef3fb; }
.returned-expander .expander-chev { transition: transform 0.2s ease; flex: none; }
.returned-expander.is-open .expander-chev { transform: rotate(180deg); }
#returned-missionaries.is-hidden { display: none; }
.missionary-card.returned-missionary { cursor: default; }
.missionary-card.returned-missionary:hover { transform: none; box-shadow: var(--shadow); }
.missionary-card.returned-missionary.has-location { cursor: pointer; }
.missionary-card.returned-missionary.has-location:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(20, 32, 46, 0.10); }
.missionary-sub { font-size: 0.95rem; color: var(--ink-soft); margin-top: 0.15rem; }
.upcoming-label { display: inline-block; font-size: 0.8rem; font-weight: 600; color: #8a5a1a; background: #faf3e3; border: 1px solid #e3cf9d; border-radius: 999px; padding: 0.1rem 0.6rem; margin-top: 0.35rem; }

/* ---------- returned missionary regions ---------- */
.region-heading { font-size: 1.2rem; color: var(--midnight); margin: 1.75rem 0 0.25rem; }
.region-count { font-size: 0.85rem; font-weight: 400; color: var(--muted); margin-left: 0.35rem; }

/* ---------- returned missionary map legend ---------- */
.map-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-size: 0.85rem; color: var(--muted); margin: 0.5rem 0 0; }
.map-legend .dot { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%; margin-right: 0.35em; }
.map-legend .dot.serving { background: #1c2f57; border: 2px solid #2f5da3; }
.map-legend .dot.returned { background: #8a5a1a; border: 2px solid #b07d2b; }
.missionary-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.1rem; box-shadow: 0 2px 8px rgba(20, 32, 46, 0.05);
  display: flex; align-items: center; gap: 0.75rem; cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.missionary-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(20, 32, 46, 0.10); }
.missionary-card.is-active { border-color: var(--sky); box-shadow: 0 6px 16px rgba(47, 93, 163, 0.20); }
.missionary-card:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.missionary-card-main { flex: 1 1 auto; min-width: 0; }
.missionary-card-icon {
  flex: 0 0 auto; display: flex; align-items: center;
  color: var(--sky-deep); opacity: 0.65;
}
.missionary-card-icon svg { transition: transform 0.15s ease; }
.missionary-card:hover .missionary-card-icon,
.missionary-card.is-active .missionary-card-icon { opacity: 1; }
.missionary-card:hover .missionary-card-icon svg,
.missionary-card.is-active .missionary-card-icon svg { transform: scale(1.15); }
.missionary-name { font-size: 1.05rem; font-weight: 500; color: var(--midnight); }
.missionary-mission { color: var(--ink-soft); font-size: 0.92rem; margin-top: 0.15rem; }
.missionary-email {
  display: inline-block; margin-top: 0.55rem; font-size: 0.85rem; color: var(--sky-deep);
  overflow-wrap: anywhere; text-decoration: none;
}
.missionary-email:hover { text-decoration: underline; }
.ward-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin: 1rem 0 0; }
@media (min-width: 640px) { .ward-grid { grid-template-columns: repeat(4, 1fr); } }
.ward-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.85rem 0.5rem; text-align: center;
  font-size: 0.95rem; font-weight: 500; color: var(--midnight);
}

/* ---------- contact card (missionaries page) ---------- */
.contact-card { background: var(--midnight); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 2.25rem; box-shadow: var(--shadow); }
.contact-card h2 { color: var(--sky-soft); margin: 0 0 0.6rem; }
.contact-card p { color: rgba(255,255,255,0.88); }
.contact-card .contact-buttons { margin-bottom: 0.9rem; }
.contact-card .contact-detail { margin: 0; }
@media (min-width: 640px) {
  .contact-card .contact-buttons { grid-template-columns: repeat(2, 1fr); max-width: 30rem; margin-left: 0; margin-right: 0; }
  .contact-card { padding: 2.25rem; }
}

/* ---------- homepage timely + duo cards ---------- */
.timely-wrap { padding-top: 1.25rem; }
.timely-wrap[hidden] { display: none; }
.timely-card {
  background: var(--midnight); color: #fff; border-radius: var(--radius);
  padding: 1.25rem 1.5rem; box-shadow: var(--shadow);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
}
.timely-card + .timely-card { margin-top: 0.75rem; }
.timely-when {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--midnight); background: var(--sky-bright);
  border-radius: 999px; padding: 0.25rem 0.75rem; white-space: nowrap;
}
.timely-body { flex: 1 1 12rem; min-width: 0; }
.timely-title { margin: 0; font-size: 1.1rem; color: #fff; }
.timely-meta { margin: 0.15rem 0 0; font-size: 0.92rem; color: rgba(255,255,255,0.85); }
.timely-card .btn { flex-shrink: 0; }
.home-duo { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-bottom: 1.5rem; }
@media (min-width: 700px) { .home-duo { grid-template-columns: repeat(2, 1fr); } }
.card-kicker {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--sky-deep); margin: 0;
}
.duo-btns { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
