/* Self-hosted fonts (latin) */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/caveat-440af2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ebgaramond-italic-eb4c3b.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ebgaramond-italic-eb4c3b.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ebgaramond-143e88.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ebgaramond-143e88.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/sourcesans3-263ee0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/sourcesans3-263ee0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

[hidden] { display: none !important; }
/* Direction: Small and lit. A small church at dusk, lamps on, door open. Quiet, not a concert.
   One memorable thing: the times set like an old hymn board (amber numerals on dark slats); and the hero's
   windows "light up" once on load. Dusk blue, lamplight amber, stone; EB Garamond (italic for display), Source Sans 3. */

:root {
  --hand: "Caveat", "Segoe Print", cursive;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.18 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --dusk: #1d2a44;
  --dusk-2: #16213a;
  --amber: #e3a64a;
  --amber-soft: #f0c987;
  --stone: #d9d3c7;
  --paper: #f6f3ee;
  --ink: #121722;
  --muted: #5b6070;
  --rule: #d9d3c7;
  --serif: "EB Garamond", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper) var(--grain); color: var(--ink); font: 400 1.15rem/1.65 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.example { background: var(--ink); color: #c9ccd6; font-size: .8125rem; text-align: center; padding: .45rem 1rem; line-height: 1.4; }
.example a { color: #fff; }

/* Header: sits on the dusk */
.top { background: var(--dusk-2); color: var(--stone); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1.5rem; padding: 1rem var(--pad); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font: italic 400 1.6rem/1 var(--serif); color: var(--paper); }
.nav { order: 3; width: 100%; display: flex; gap: 1.4rem; }
.nav a { text-decoration: none; font-size: 1rem; font-weight: 600; color: #b9bfcd; padding: .35rem 0; border-bottom: 1.5px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--paper); border-bottom-color: var(--amber); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: .7rem 1.6rem; background: var(--amber); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; border: 0; border-radius: 999px; cursor: pointer; font-family: var(--sans); }
.btn:hover { background: var(--amber-soft); }
.link { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--amber); padding-bottom: .1rem; }
.eyebrow { font: italic 400 1.2rem var(--serif); color: var(--amber); margin-bottom: .6rem; }

/* Hero: the church at dusk */
.hero { position: relative; background: var(--dusk-2); color: var(--paper); overflow: clip; display: grid; }
.hero-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 60%; }
.hero-text { position: relative; z-index: 1; padding: 2.2rem var(--pad) 3rem; background: var(--dusk-2); }
.hero h1 { font-style: italic; font-size: clamp(3rem, 11vw, 6rem); max-width: 12ch; }
.lede { margin-top: 1.1rem; max-width: 32rem; color: #c3c8d4; font-size: 1.2rem; }
.hero .link { color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 1.8rem; }
/* The windows light up once: the photo comes up from dark, like lamps being lit. */
@media (prefers-reduced-motion: no-preference) {
  .hero-img { animation: lamps 1.4s ease-out .1s both; }
}
@keyframes lamps { from { filter: brightness(.35) saturate(.6); } 60% { filter: brightness(.8) saturate(.9); } to { filter: none; } }

/* Hymn board */
.board { background: var(--dusk); padding: 2.6rem var(--pad); }
.board-inner { max-width: 44rem; margin: 0 auto; border: 2px solid #3a4865; outline: 1px solid #3a4865; outline-offset: 5px; background: repeating-linear-gradient(180deg, #223152 0 4.6rem, #1a2743 4.6rem calc(4.6rem + 2px)); padding: 1.4rem 1.4rem .6rem; color: var(--stone); }
.board-title { text-align: center; font: italic 400 1.3rem var(--serif); color: #b9bfcd; margin-bottom: .8rem; }
.board dl { margin: 0; }
.board dl div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 1rem; padding: .55rem 0 .7rem; border-top: 1px solid #34436166; }
.board dt { font: italic 400 1.5rem var(--serif); }
.board dd:not(.sub) { margin: 0; grid-row: span 2; font: 500 clamp(2.8rem, 12vw, 4rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--amber); text-shadow: 0 0 22px rgba(227,166,74,.35); }
.board .sub { margin: 0; font-size: .95rem; color: #9aa2b4; }

/* Split sections */
.split, .kids { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 10vw, 7rem) var(--pad) 0; display: grid; gap: 2rem; align-items: center; }
.drift { margin: 0; overflow: clip; border-radius: 4px; }
.drift img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; will-change: transform; }
.split h2, .kids h2, .visit h2, .wed h2 { font-size: clamp(2.3rem, 7vw, 3.4rem); }
.split-text p { margin-top: 1rem; color: var(--muted); max-width: 30rem; }
.split-text .link { display: inline-block; margin-top: 1.6rem; }
.plain { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.plain li { padding: .75rem 0; border-top: 1px solid var(--rule); color: var(--muted); }
.plain b { color: var(--ink); font-weight: 600; }

/* Who we are */
.pastor { position: relative; margin-top: clamp(4rem, 10vw, 7rem); background: var(--dusk-2); color: var(--paper); display: grid; }
.pastor .drift { border-radius: 0; }
.pastor .drift img { aspect-ratio: 16 / 10; opacity: .55; }
.pastor-text { padding: 2.5rem var(--pad) 3rem; max-width: 44rem; }
.pastor-line { font: italic 400 clamp(1.9rem, 6vw, 3rem)/1.2 var(--serif); }
.sig { margin-top: 1.4rem; color: var(--amber); font-weight: 600; }

.cta { background: var(--paper); text-align: center; padding: clamp(4rem, 10vw, 6.5rem) var(--pad); }
.cta-line { font: italic 400 clamp(2.4rem, 8vw, 4rem)/1.1 var(--serif); }
.cta-sub { margin: .8rem auto 2rem; color: var(--muted); }

/* Interior page heads */
.page-head { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 5.5rem) var(--pad) clamp(1rem, 4vw, 2rem); display: grid; gap: 2rem; align-items: center; }
.page-head h1 { font-style: italic; font-size: clamp(2.8rem, 9vw, 5rem); max-width: 13ch; }
.page-head .lede { color: var(--muted); }

/* Plan a visit: the morning, in order */
.timeline-wrap { max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 5vw, 3rem) var(--pad) 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--stone); }
.timeline li { position: relative; padding: 0 0 2.2rem 1.6rem; display: grid; gap: .3rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px var(--paper); }
.t { font: italic 400 1.25rem var(--serif); color: #7a5214; }
.timeline h2 { font-size: 2rem; }
.timeline p { color: var(--muted); max-width: 34rem; }
.qa { margin: 1.2rem 0 0; }
.qa dt { font: 500 1.35rem var(--serif); padding-top: 1rem; border-top: 1px solid var(--rule); }
.qa dd { margin: .3rem 0 1rem; color: var(--muted); }

/* Visit form */
.visit { margin-top: clamp(4rem, 10vw, 7rem); background: var(--dusk); color: var(--paper); padding: clamp(4rem, 10vw, 6.5rem) var(--pad); display: grid; gap: 2.2rem; scroll-margin-top: 0; }
.visit-intro p { margin-top: 1rem; color: #c3c8d4; max-width: 26rem; }
.visit-or a { color: var(--paper); }
.visit-form, .visit-done { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 1.6rem 1.3rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.visit fieldset { border: 0; margin: 0 0 1.3rem; padding: 0; }
.visit legend { font: 500 1.35rem var(--serif); margin-bottom: .6rem; padding: 0; }
.opt { font: 400 .95rem var(--sans); color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 2.9rem; padding: .5rem 1rem; border: 1.5px solid var(--stone); border-radius: 999px; background: #fff; font-weight: 600; font-size: 1rem; cursor: pointer; }
.pill:hover span { border-color: var(--amber); }
.pill input:checked + span { background: var(--dusk); border-color: var(--dusk); color: var(--paper); }
.pill input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.fields { display: grid; gap: 0 1rem; }
.field { display: grid; gap: .4rem; font: 500 1.35rem var(--serif); margin-bottom: 1.1rem; }
.field input, .field textarea { font: 400 1.05rem var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--stone); border-radius: 6px; padding: .8rem .9rem; min-height: 3rem; width: 100%; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--dusk); box-shadow: 0 0 0 3px rgba(227,166,74,.35); }
.form-error { background: #f8eadb; color: #7a4a10; border-radius: 6px; padding: .7rem .9rem; margin-bottom: 1rem; font-size: 1rem; }
.visit-form .btn { width: 100%; min-height: 3.4rem; font-size: 1.1rem; }
.form-note { margin-top: .8rem; font-size: .9rem; color: var(--muted); text-align: center; }
.visit-done { padding: 2.5rem 1.8rem; }
.visit-done:focus { outline: none; }
.done-big { font: italic 400 clamp(2.2rem, 7vw, 3rem)/1.1 var(--serif); margin-bottom: 1rem; }
.visit-done p + p { margin-top: .6rem; color: var(--muted); }

/* Wednesdays */
.wed { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 5rem) var(--pad) clamp(4rem, 10vw, 7rem); display: grid; gap: 2.5rem; align-items: center; }
.wed-card { background: var(--dusk); color: var(--stone); border-radius: 6px; text-align: center; padding: 2.4rem 1.5rem; }
.wed-day { font: italic 400 1.4rem var(--serif); }
.wed-time { font: 500 clamp(5rem, 22vw, 8rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--amber); text-shadow: 0 0 30px rgba(227,166,74,.35); margin: .4rem 0; }
.wed-what { color: #b9bfcd; }
.wed-text p { margin-top: 1rem; color: var(--muted); max-width: 32rem; }
.wed-text .btn { margin-top: 1.8rem; }

/* Contact */
.reach { max-width: var(--max); margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.5rem) var(--pad) clamp(3rem, 8vw, 5rem); display: grid; gap: 1rem; }
.reach-card { display: block; text-decoration: none; background: var(--dusk); color: var(--paper); border-radius: 6px; padding: 1.7rem 1.5rem; }
.reach-card.alt { background: var(--stone); color: var(--ink); }
.reach-card span { display: block; font: italic 400 1.25rem var(--serif); opacity: .85; }
.reach-card b { display: block; font: 500 clamp(2.2rem, 8vw, 3.2rem)/1.15 var(--serif); margin-top: .3rem; }
.reach-card:hover { filter: brightness(1.08); }

/* Footer */
.foot { background: var(--ink); color: #9aa2b4; padding: 2.5rem var(--pad) 2rem; }
.foot-grid { display: grid; gap: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #2a3243; margin-bottom: 1.2rem; }
.foot-name { font: italic 400 1.7rem var(--serif); color: var(--paper); margin-bottom: .4rem; }
.foot-grid p { font-size: 1rem; line-height: 1.75; }
.foot a { color: var(--stone); }
.foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-content: start; }
.foot nav a { text-decoration: none; font-weight: 600; color: var(--paper); padding: .3rem 0; }
.foot-note { font-size: .875rem; }

@media (min-width: 720px) {
  .split, .kids { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split.flip figure { order: 2; }
  .fields { grid-template-columns: 1fr 1fr; }
  .visit-form, .visit-done { padding: 2.2rem; }
  .reach { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr auto; }
  .wed { grid-template-columns: .8fr 1fr; gap: 4rem; }
  .board-inner { padding: 1.8rem 2.4rem .8rem; }
}
@media (min-width: 960px) {
  .nav { order: 0; width: auto; }
  .hero { display: block; }
  .hero-img { aspect-ratio: auto; height: min(90vh, 56rem); }
  .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,23,34,.88) 0%, rgba(18,23,34,.55) 38%, rgba(18,23,34,0) 65%); pointer-events: none; }
  .hero-text { position: absolute; z-index: 2; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; background: none; max-width: 44rem; } /* no transform here: drift.js owns it */
  .pastor { grid-template-columns: 1fr; }
  .pastor .drift { grid-area: 1 / 1; }
  .pastor .drift img { aspect-ratio: 21 / 9; }
  .pastor-text { grid-area: 1 / 1; align-self: center; padding: 3rem var(--pad); position: relative; }
  .page-head.with-img { grid-template-columns: 1.1fr 1fr; }
  .visit { grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; }
  .visit-intro { position: sticky; top: 2rem; }
  .visit > .visit-done { grid-column: 2; }
}

/* Scripture (KJV). Big: its own quiet interlude. Small: set inside a section. */
.verse { margin: 0; }
.verse blockquote { margin: 0; }
.verse p { font-family: var(--serif); font-style: italic; }
.verse figcaption { margin-top: .9rem; font-weight: 600; font-size: .95rem; color: #7a5214; }
.verse figcaption span { font-weight: 400; color: var(--muted); margin-left: .3rem; }
.verse.big { max-width: 52rem; margin: 0 auto; padding: clamp(4.5rem, 11vw, 8rem) var(--pad) 0; text-align: center; }
.verse.big::before { content: ""; display: block; width: 3rem; height: 2px; background: var(--amber); margin: 0 auto 2rem; }
.verse.big p { font-size: clamp(2rem, 6.5vw, 3.4rem); line-height: 1.2; color: var(--dusk); }
.verse.small { margin-top: 1.8rem; padding-left: 1.1rem; border-left: 2px solid var(--amber); }
.verse.small p { font-size: 1.4rem; line-height: 1.35; }
.verse.small.center { border-left: 0; padding-left: 0; text-align: center; margin: 0 auto 2.4rem; max-width: 34rem; }
.verse.light p { color: var(--paper); }
.verse.light figcaption { color: var(--amber); }
.verse.light figcaption span { color: #9aa2b4; }
.wed-card .verse.small.center { margin: 1.6rem auto 0; padding-top: 1.4rem; border-top: 1px solid #34436199; }
.wed-card .verse p { font-size: 1.25rem; }
.cta .verse p { color: var(--dusk); }
.contact-page .verse.big { padding-bottom: clamp(3rem, 8vw, 5rem); }
.verse.big + .board { margin-top: clamp(3rem, 8vw, 5rem); }

/* ===== Deeper: the heirloom hymnal ===== */
.running { display: flex; justify-content: space-between; gap: 1rem; font: italic 400 1rem var(--serif); color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: .4rem; margin-bottom: 1.4rem; font-variant-numeric: oldstyle-nums; }
.running span:nth-child(2) { font-style: normal; font-variant: small-caps; letter-spacing: .06em; }
.page-head .running { max-width: 34rem; }
/* The illuminated first letter */
.initial::first-letter { float: left; font: 500 4.4rem/.8 var(--serif); color: var(--amber); background: var(--dusk); padding: .55rem .5rem .45rem; margin: .3rem .7rem 0 0; border: 1px solid #7a5214; outline: 1px solid var(--dusk); outline-offset: 2px; }
.page-head .lede.initial { color: var(--ink); font-size: 1.25rem; }
/* Printed ornament between sections */
.orn { display: flex; justify-content: center; padding: clamp(3rem, 8vw, 4.5rem) 0 0; }
.orn svg { width: 9rem; fill: none; stroke: #7a5214; stroke-width: 1.4; stroke-linecap: round; }
.orn path:nth-child(2), .orn path:nth-child(3) { fill: rgba(227,166,74,.18); }

/* Countdown candle beside the hymn board */
.board-row { max-width: 52rem; margin: 0 auto; display: grid; gap: 2rem; align-items: center; }
.candle-wrap { text-align: center; color: var(--stone); }
.candle { width: 5rem; height: auto; overflow: visible; }
.candle .wax { fill: #efe6d2; }
.candle .dish { fill: #7a5214; }
.candle .wick { stroke: #2a2a2a; stroke-width: 2; }
.candle .flame { fill: var(--amber-soft); transform-origin: 40px 60px; }
.candle .halo { transform-origin: 40px 58px; }
@media (prefers-reduced-motion: no-preference) {
  .candle .flame { animation: flicker 2.8s ease-in-out infinite; }
  .candle .halo { animation: breathe 2.8s ease-in-out infinite; }
}
@keyframes flicker { 0%, 100% { transform: scale(1, 1) rotate(0); } 30% { transform: scale(.94, 1.06) rotate(-2deg); } 60% { transform: scale(1.04, .96) rotate(1.5deg); } }
@keyframes breathe { 0%, 100% { opacity: .9; } 50% { opacity: .65; } }
.count-label { font: italic 400 1.1rem var(--serif); color: #b9bfcd; margin-top: .4rem; }
.count { font: 500 1.6rem/1.2 var(--serif); color: var(--amber); font-variant-numeric: lining-nums; }
.candle-wrap[data-live] .count { color: var(--amber-soft); }

/* Index cards on the home page */
.index-cards { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 4.5rem) var(--pad) 0; display: grid; gap: 1rem; }
.ix { position: relative; display: grid; gap: .3rem; text-decoration: none; background: #fbf8f2; border: 1px solid var(--rule); padding: 1.4rem 1.3rem 1.3rem; box-shadow: 0 14px 28px -24px rgba(0,0,0,.5); }
.ix:hover { border-color: #7a5214; }
.ix-n { position: absolute; top: .9rem; right: 1rem; font: italic 400 1rem var(--serif); color: #7a5214; }
.ix b { font: 500 1.7rem var(--serif); }
.ix span:last-child { color: var(--muted); font-size: 1rem; }

/* Calendar: a church-bulletin list */
.cal-wrap { max-width: 52rem; margin: 0 auto; padding: 0 var(--pad) clamp(4rem, 10vw, 6rem); }
.cal-month { font: italic 400 2rem var(--serif); color: var(--dusk); border-bottom: 2px solid var(--dusk); padding: 2rem 0 .4rem; margin-bottom: .4rem; }
.ev { display: grid; grid-template-columns: 4.2rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.ev-date { text-align: center; line-height: 1; }
.ev-date small { display: block; font: italic 400 .95rem var(--serif); color: var(--muted); }
.ev-date b { display: block; font: 500 2.6rem/1 var(--serif); font-variant-numeric: lining-nums; color: var(--dusk); }
.ev.special .ev-date b { color: #7a5214; }
.ev h3 { font: 500 1.45rem/1.2 var(--serif); }
.ev.special h3::after { content: " ✦"; color: var(--amber); font-size: .8em; }
.ev p { color: var(--muted); font-size: 1rem; margin-top: .2rem; }
.ev-add { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; }
.ev-add a, .ev-add button { font: 600 .9rem var(--sans); padding: .45rem .8rem; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; min-height: 2.5rem; }
.ev-add a:hover, .ev-add button:hover { border-color: var(--amber); }

/* Supper sign-up sheet: a clipboard */
.sheet-wrap { padding: clamp(3rem, 8vw, 4.5rem) var(--pad) clamp(4rem, 10vw, 6rem); }
.sheet { position: relative; max-width: 40rem; margin: 0 auto; background: #fffef9; border: 1px solid #d8d2c4; border-radius: 4px; padding: 3rem 1.4rem 1.6rem; box-shadow: 0 0 0 10px #8a6a44, 0 30px 50px -20px rgba(0,0,0,.45); transform: rotate(-.6deg); }
.clip { position: absolute; top: -22px; left: 50%; width: 8rem; height: 2.6rem; margin-left: -4rem; background: linear-gradient(#cfd3d8, #9aa0a8); border-radius: 6px 6px 10px 10px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.sheet h2 { font: 500 2rem var(--serif); text-align: center; }
.sheet-tabs { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin: 1rem 0 1.2rem; }
.sheet-tabs button { font: 600 .95rem var(--sans); padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--rule); background: #fff; cursor: pointer; min-height: 2.6rem; }
.sheet-tabs button[aria-selected="true"] { background: var(--dusk); color: var(--paper); border-color: var(--dusk); }
.sheet-group { margin-top: .8rem; }
.sheet-group h3 { font: italic 500 1.25rem var(--serif); color: #7a5214; }
.slot { display: flex; align-items: baseline; gap: .6rem; min-height: 2.9rem; border-bottom: 1px solid #a9c3d9; padding: .2rem 0; background-image: linear-gradient(90deg, transparent 2.2rem, rgba(200,80,80,.35) 2.2rem, rgba(200,80,80,.35) calc(2.2rem + 1px), transparent calc(2.2rem + 1px)); }
.slot-n { width: 2.2rem; flex: none; font-size: .85rem; color: var(--muted); text-align: right; padding-right: .5rem; }
.slot-name { font: 500 1.7rem/1 var(--hand); color: #1f3a6b; }
.slot-name.mine { color: #8a3b12; }
.slot button { flex: 1; text-align: left; background: none; border: 0; font: 400 1rem var(--sans); color: #8d93a0; cursor: pointer; min-height: 2.6rem; }
.slot button:hover { color: var(--ink); }
.slot form { flex: 1; display: flex; gap: .4rem; }
.slot input { flex: 1; min-width: 0; font: 500 1.6rem var(--hand); border: 0; border-bottom: 2px solid var(--amber); background: rgba(227,166,74,.08); padding: .1rem .3rem; color: #8a3b12; }
.slot input:focus { outline: none; }
.slot form button { flex: none; font: 600 .9rem var(--sans); color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: .3rem .8rem; background: #fff; }
.undo { flex: none !important; font-size: .85rem !important; color: var(--muted) !important; }

/* Readings + audio player */
.readings { max-width: 46rem; margin: 0 auto; padding: 0 var(--pad) clamp(4rem, 10vw, 6rem); }
.reading { padding: 2.4rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 1rem; }
.r-ref { font: italic 400 1.1rem var(--serif); color: #7a5214; }
.reading h2 { font: 400 clamp(2rem, 6vw, 2.8rem)/1.1 var(--serif); margin-bottom: 1.2rem; }
.player { display: flex; align-items: center; gap: 1rem; background: var(--dusk); color: var(--paper); border-radius: 999px; padding: .5rem 1.2rem .5rem .5rem; margin-bottom: 1.4rem; }
.player.missing { opacity: .55; }
.play { flex: none; width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: var(--amber); cursor: pointer; display: grid; place-items: center; }
.play svg { width: 1.3rem; fill: var(--ink); }
.play .i-pause, .player.on .i-play { display: none; }
.player.on .i-pause { display: block; }
.p-track { flex: 1; min-width: 0; }
.p-track input { width: 100%; accent-color: var(--amber); }
.p-time { display: flex; justify-content: space-between; font-size: .85rem; color: #b9bfcd; font-variant-numeric: tabular-nums; }
.r-text { font: 400 1.25rem/1.75 var(--serif); }
.vs sup { font: 500 .7rem var(--sans); color: #7a5214; margin-right: .2rem; }

/* Prayer: a candle that lights */
.prayer-wrap { max-width: 40rem; margin: 0 auto; padding: 0 var(--pad) clamp(4rem, 10vw, 6rem); }
.prayer { background: #fbf8f2; border: 1px solid var(--rule); padding: 2rem 1.5rem; text-align: left; position: relative; }
.prayer-candle { display: block; width: 3.4rem; margin: 0 auto 1rem; }
.p-wax { fill: #efe6d2; stroke: #d6cbb4; } .p-dish { fill: #7a5214; } .p-wick { stroke: #333; stroke-width: 2; }
.p-flame { fill: var(--amber-soft); opacity: 0; transform-origin: 30px 26px; transform: scale(.2); transition: opacity .8s ease, transform .8s ease; }
.prayer.lit .p-flame { opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: no-preference) { .prayer.lit .p-flame { animation: flicker 2.8s ease-in-out .8s infinite; } }
.prayer fieldset { border: 0; margin: 0 0 1.2rem; padding: 0; }
.prayer legend { font: 500 1.35rem var(--serif); margin-bottom: .6rem; padding: 0; }
.prayer .btn { width: 100%; }
.prayer-done { font: italic 400 1.4rem/1.4 var(--serif); color: var(--dusk); text-align: center; margin-top: 1rem; }

/* Give: the offering envelope */
.give-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(4rem, 10vw, 6rem); display: grid; gap: 3rem; align-items: start; }
.offering { position: relative; background: #f1e6cf var(--grain); border: 1px solid #cdbf9f; padding: 3.4rem 1.5rem 1.8rem; box-shadow: 0 30px 50px -30px rgba(0,0,0,.45); }
.flap { position: absolute; top: 0; left: 0; right: 0; height: 2.6rem; background: #e7d9bb; clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%); border-bottom: 1px dashed #b8a67f; }
.off-head { text-align: center; font: 500 1.1rem var(--serif); font-variant: small-caps; letter-spacing: .12em; color: var(--dusk); border-bottom: 2px solid var(--dusk); padding-bottom: .5rem; margin-bottom: 1.2rem; }
.offering fieldset { border: 0; margin: 0 0 1.1rem; padding: 0; }
.offering legend { font: italic 400 1.25rem var(--serif); margin-bottom: .5rem; padding: 0; }
.line-field { display: grid; font: italic 400 1.2rem var(--serif); margin-bottom: 1.2rem; }
.line-field input { font: 500 1.6rem var(--hand); color: #1f3a6b; border: 0; border-bottom: 1px dotted #6b5d43; background: transparent; padding: .2rem .1rem; min-height: 2.6rem; }
.line-field input:focus { outline: none; border-bottom: 2px solid var(--amber); }
.offering .btn { width: 100%; }
.give-done { background: #fbf8f2; border: 1px solid var(--rule); padding: 2.2rem 1.6rem; text-align: center; }
.give-done:focus { outline: none; }
.give-done h2 { font: 400 2.4rem var(--serif); margin: .3rem 0 .8rem; }
.give-done p + p { margin-top: .6rem; color: var(--muted); }
.pay-mock { margin: 1.2rem auto 0; max-width: 24rem; border: 1px dashed var(--rule); border-radius: 6px; padding: 1rem; font-size: .95rem; color: var(--muted); }
.give-side h2 { font: 400 2rem var(--serif); }
.give-side p { color: var(--muted); margin-top: .6rem; }

/* Footer colophon */

@media (min-width: 720px) {
  .board-row { grid-template-columns: 1fr auto; gap: 3rem; }
  .index-cards { grid-template-columns: 1fr 1fr; }
  .give-wrap { grid-template-columns: 1.3fr 1fr; gap: 4rem; }
  .offering { padding: 3.6rem 2.4rem 2.2rem; }
  .sheet { padding: 3.2rem 2.2rem 1.8rem; }
}
@media (min-width: 960px) {
  .index-cards { grid-template-columns: repeat(4, 1fr); }
  .foot-grid { grid-template-columns: 1.2fr 1.2fr auto; }
  .nav { margin-left: auto; }
}
.chap { float: left; font: 500 3.6rem/.85 var(--serif); font-variant-numeric: lining-nums; color: var(--amber); background: var(--dusk); padding: .5rem .55rem .4rem; margin: .35rem .8rem 0 0; border: 1px solid #7a5214; outline: 1px solid var(--dusk); outline-offset: 2px; }

/* logo mark (header, footer) */
.logo { width: 44px; height: 44px; flex: none; display: block; }
.foot-mark img { width: 96px; height: 96px; }
@media (min-width: 860px) { .foot-mark { justify-self: end; } }
@media (max-width: 599px) { .logo, .brand .logo { width: 36px; height: 36px; } }

/* the owner's own line, word for word from the chat */
.owner-note { padding: clamp(3.5rem, 9vw, 6rem) var(--pad); }
.on-card { margin: 0 auto; max-width: 40rem; background: #fbf6ea; color: #22314f; padding: clamp(1.8rem, 5vw, 3rem); rotate: -1.2deg; box-shadow: 0 18px 36px -20px rgba(18,23,34,.6); background-image: repeating-linear-gradient(transparent 0 2.1rem, rgba(31,58,107,.14) 2.1rem 2.18rem); }
.owner-note blockquote { margin: 0; }
.owner-note blockquote p { margin: 0; font: 500 clamp(2rem, 5.5vw, 2.8rem)/1.08 var(--hand); }
.owner-note figcaption { margin-top: 1rem; text-align: right; display: grid; }
.on-name { font: italic 400 1.3rem var(--serif); color: #8a5a1c; } .on-role { font-size: .95rem; color: #5a6275; }

/* ===== 404: same header and footer, the site's own joke in the middle ===== */
.nf { display: grid; gap: 2.5rem; align-items: center; justify-items: start; max-width: 68rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--pad, 1.25rem); }
@media (min-width: 860px) { .nf { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 4rem; } }
.nf-art { justify-self: center; }
.nf-kick { margin: 0 0 .6rem; color: var(--dusk); font-weight: 700; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; }
.nf h1 { margin: 0 0 1rem; }
.nf-text > p { font-size: 1.15rem; max-width: 34rem; }
.nf-text > p a { color: var(--dusk); }
.nf-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.4rem 0 1rem; }
.nf-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.nf-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--dusk); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.nf-lamp { width: min(260px, 66vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, var(--amber-soft) 0, var(--amber) 35%, rgba(227,166,74,0) 70%); }
.nf-lamp span { font: 500 clamp(3.5rem, 12vw, 5rem)/1 var(--serif); color: var(--dusk); }

/* ===== Moving between pages: the browser's own cross-page transition, in this site's style. Header holds still.
   Browsers without it just load the page; reduced motion turns it off. ===== */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  header.top { view-transition-name: site-top; }
  ::view-transition-old(root) { animation: vt-dim .3s ease-in both; }
  ::view-transition-new(root) { animation: vt-lamp .55s ease-out both; }
  @keyframes vt-dim { to { opacity: 0; filter: brightness(.5); } }
  @keyframes vt-lamp { from { opacity: 0; filter: brightness(.6) sepia(.4); } }
  @keyframes vt-fade { from { opacity: 0; } }
}
.nf h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; }
@media (max-width: 859px) { .nf-art { order: 2; justify-self: start; scale: .8; transform-origin: 0 0; margin-bottom: -10%; } }
.nf h1 { font-family: var(--serif); font-weight: 500; }

/* ===== Phone: the menu is one row you can swipe, so the business itself is on the first screen ===== */
@media (max-width: 759px) {
  header.top nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 1.3rem; padding-right: 2.2rem; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.4rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 2.4rem), transparent); }
  header.top nav::-webkit-scrollbar { display: none; }
  header.top nav a { flex: none; white-space: nowrap; }
}
@media (max-width: 759px) { .hero .hero-text { order: -1; } }

/* ===== The hymn board: this week's times hang in the hero like hymn numbers, slid in one card at a time ===== */
.hymn { position: relative; z-index: 2; margin: 0 var(--pad) 2.4rem; padding: 1.2rem 1.2rem 1.4rem; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(90deg, rgba(0,0,0,.18), transparent 20%, transparent 80%, rgba(0,0,0,.2)), repeating-linear-gradient(90deg, #3b2718 0 7px, #34220f 7px 9px, #3f2a1a 9px 15px);
  border: 6px solid #2a1b10; box-shadow: 0 30px 50px -20px rgba(0,0,0,.7), inset 0 0 0 2px #5b3d25; color: var(--paper); }
.hymn-title { margin: 0 0 .9rem; text-align: center; font: italic 500 1.35rem var(--serif); color: var(--amber-soft); letter-spacing: .04em; }
.hymn-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.hymn-rows li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "day card" "sub card"; align-items: center; column-gap: .9rem; }
.hy-day { grid-area: day; font: italic 500 1.35rem/1.1 var(--serif); color: var(--paper); }
.hy-sub { grid-area: sub; font-size: 1rem; color: #e2d6c4; }
.hy-card { grid-area: card; min-width: 7.4rem; padding: .25rem .8rem .35rem; text-align: center; background: #f4eee2; color: #1d2a44; border-radius: 2px;
  box-shadow: 0 2px 0 #b9ab92, 0 6px 10px -4px rgba(0,0,0,.6); }
.hy-card b { font: 500 2.5rem/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .hy-card { animation: hymn-in .7s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(.6s + var(--i) * .35s); }
  @keyframes hymn-in { from { opacity: 0; transform: translateX(46px); } }
}
@media (min-width: 900px) {
  .hymn { position: absolute; right: clamp(1.5rem, 5vw, 5rem); top: 50%; translate: 0 -50%; width: 21rem; margin: 0; }
}
@media (max-width: 899px) { .hero .hymn { order: -1; } .hero .hero-text { order: -2; } }
.board-row { grid-template-columns: 1fr !important; justify-items: center; }

/* below the fold: not rendered (and its handwriting font not fetched) until you scroll near it, so the headline paints sooner */
.owner-note { content-visibility: auto; contain-intrinsic-size: auto 420px; }
/* everything below the first screen is drawn (and its photos fetched) as you scroll near it */
main > section:not(.hero):not(.board) { content-visibility: auto; contain-intrinsic-size: auto 640px; }
.hy-card b { font: 600 2.2rem/1.1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
