:root {
  --ink: #19352f;
  --forest: #17483d;
  --forest-deep: #0d342c;
  --sage: #a6bc91;
  --sage-pale: #e8eee2;
  --cream: #f7f3e9;
  --paper: #fffdf8;
  --gold: #d2a854;
  --line: rgba(25, 53, 47, .16);
  --serif: "Lora", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --shadow: 0 22px 60px rgba(13, 52, 44, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: auto; scroll-padding-top: var(--header-offset, 88px); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; }
body:has(:is(#messages, #events, #calendar, #need-prayer, #contact):not([hidden])) { min-height: 100dvh; display: flex; flex-direction: column; }
body:has(:is(#messages, #events, #calendar, #need-prayer, #contact):not([hidden])) > .site-header,
body:has(:is(#messages, #events, #calendar, #need-prayer, #contact):not([hidden])) > .site-footer { flex-shrink: 0; }
body:has(:is(#messages, #events, #calendar, #need-prayer, #contact):not([hidden])) > main { flex: 1 0 auto; display: flex; flex-direction: column; }
body:has(:is(#messages, #events, #calendar, #need-prayer, #contact):not([hidden])) :is(#messages, #events, #calendar, #need-prayer, #contact) { flex: 1 0 auto; }
a { color: inherit; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 100px 0; }
#need-prayer { padding-block: 10px; }
#need-prayer h2 { font-size: clamp(28px, 3vw, 36px); }
.prayer-form { display: grid; gap: 6px; max-width: 640px; margin-top: 12px; }
.prayer-form label { font-weight: 600; }
.prayer-form input, .prayer-form textarea { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink); background: var(--paper); }
.prayer-form textarea { resize: vertical; }
.prayer-form input:focus-visible, .prayer-form textarea:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.prayer-form p { margin: 4px 0; font-size: 14px; }
.prayer-form button { justify-self: start; }
.prayer-form button:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.sr-only { 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 { position: fixed; left: 16px; top: -60px; z-index: 1000; background: white; padding: 10px 16px; border-radius: 4px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,253,248,.94); border-bottom: 1px solid transparent; backdrop-filter: blur(14px); transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(13,52,44,.05); }
.nav-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 16px; padding-block: 8px; }
.header-motto { width: 360px; margin: 0; text-align: left; color: var(--forest); font: 600 clamp(19px, 2vw, 24px)/1.2 var(--serif); letter-spacing: -.025em; }
.header-motto em { color: #607d54; font-weight: 500; }
.hero-service-events { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 6px 14px; margin: 12px 0; }
.hero-service-events > div { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.2); }
.sunday-school { grid-column: 1; grid-row: 1; }
.sunday-worship { grid-column: 2; grid-row: 1; }
.sunday-children { grid-column: 2; grid-row: 2; }
.wednesday-study { grid-column: 1 / -1; grid-row: 2; }
.hero-service-events dt { color: #dce6d3; font: 600 18px/1.3 var(--serif); }
.hero-service-events dd { margin: 3px 0 0; font-size: 15px; line-height: 1.4; color: var(--cream); }
.church-identity { min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 11px; align-items: start; }
.church-details { grid-column: 2; grid-row: 2; margin: 2px 0 0; font-size: 13px; line-height: 1.5; }
.church-details p { margin: 0; }
.church-contact-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 32px; row-gap: 2px; }
.church-details a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pastor-name { font-weight: 700; }
.nav-wrap .primary-nav { grid-column: 1 / -1; justify-content: flex-end; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; line-height: 1.1; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50% 50% 44% 56%; background: var(--forest); color: var(--cream); font: 600 22px var(--serif); }
.site-header .brand { display: contents; }
.site-header .brand-mark { flex-shrink: 0; }
.site-header .brand-flag { grid-column: 1; grid-row: 1 / 3; display: block; width: 76px; height: auto; flex-shrink: 0; }
.site-header .brand-name { grid-column: 2; grid-row: 1; max-width: 580px; }
.site-header .brand-name strong { font-size: clamp(19px, 2vw, 24px); line-height: 1.2; text-wrap: balance; }
.site-header .menu-toggle { flex-shrink: 0; }
.brand strong { display: block; font: 600 20px var(--serif); }
.brand small { display: block; margin-top: 3px; color: #537068; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.primary-nav { display: flex; align-items: center; gap: 30px; }
.primary-nav a { font-size: 14px; font-weight: 600; text-decoration: none; }
.primary-nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.primary-nav a:not(.nav-button):hover, .primary-nav a:not(.nav-button):focus-visible { color: #8a691f; }
.nav-button { padding: 11px 18px; border: 1px solid var(--forest); border-radius: 100px; }
.nav-button:hover { background: var(--forest); color: white; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.menu-toggle span:not(.sr-only) { display: block; width: 25px; height: 2px; margin: 5px 0; background: var(--ink); }

.hero { position: relative; display: grid; align-items: start; overflow: hidden; color: white; background: var(--forest-deep); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(120deg, transparent 45%, var(--sage) 45.2%, transparent 45.5%), radial-gradient(circle at 85% 30%, var(--gold) 0 1px, transparent 2px); background-size: auto, 26px 26px; }
.hero-glow { position: absolute; width: 600px; height: 600px; right: -160px; top: -170px; border-radius: 50%; background: rgba(166,188,145,.18); border: 1px solid rgba(255,255,255,.1); }
.hero-content { position: relative; z-index: 2; display: grid; grid-template-columns: .75fr 1.25fr; align-items: start; gap: 40px; padding: 12px 0 16px; }
.church-photo-placeholder { margin: 0; max-width: 430px; width: 100%; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; background: var(--cream); color: var(--ink); }
.church-photo-placeholder svg { display: block; width: 100%; height: auto; }
.church-photo-placeholder figcaption { padding: 16px 20px; line-height: 1.5; }
.church-photo-placeholder figcaption strong, .church-photo-placeholder figcaption span { display: block; }
.church-photo-placeholder figcaption span { margin-top: 4px; font-size: 12px; }
.hero-invitation { margin: 0 0 14px; font: 600 clamp(30px, 3vw, 40px)/1.15 var(--serif); color: #bfd0ac; }
.hero h1 { font-size: clamp(30px, 3vw, 38px); line-height: 1.15; }
.eyebrow { margin: 0 0 18px; color: #dce6d3; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 34px; height: 1px; margin: 0 12px 4px 0; background: var(--gold); }
.eyebrow.dark { color: #607d74; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -.035em; }
h1 { max-width: 800px; font-size: clamp(54px, 8vw, 102px); }
h1 em { color: #bfd0ac; font-weight: 500; }
h2 { font-size: clamp(40px, 5vw, 62px); }
h3 { margin: 0; font: 600 25px var(--serif); }
.hero-copy { max-width: 580px; margin: 12px 0; color: #dfe9e5; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 52px; padding: 13px 22px; border-radius: 3px; font-weight: 700; text-decoration: none; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--gold); color: #17342e; }
.button-secondary { border: 1px solid rgba(255,255,255,.45); color: white; }
.button-light { background: var(--cream); color: var(--forest-deep); }
.placeholder-note { padding: 10px 13px; border-left: 3px solid var(--gold); background: #f4efe1; color: #5a5c4d; font-size: 13px; }
.light-note { max-width: 630px; margin: 10px 0 0; padding: 8px 12px; font-size: 12px; line-height: 1.5; color: #dbe5e1; background: rgba(255,255,255,.08); }
.hero .eyebrow { margin-bottom: 8px; }
.verse-card { position: relative; z-index: 3; justify-self: center; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 20px 20px; width: min(1120px, calc(100% - 40px)); padding: 10px 20px; color: var(--ink); background: var(--cream); box-shadow: var(--shadow); }
.verse-slides { display: grid; }
.verse-slide { grid-area: 1 / 1; display: flex; flex-wrap: nowrap; white-space: nowrap; align-items: center; gap: 4px 16px; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.verse-slide.is-active { opacity: 1; visibility: visible; }
.verse-toggle { padding: 6px 8px; font: 600 12px var(--sans); color: var(--forest); background: transparent; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.verse-toggle[hidden] { display: none; }
.verse-toggle:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.verse-symbol { color: var(--gold); }
.verse-card blockquote { margin: 0; font: italic 500 17px/1.45 var(--serif); }
.verse-card cite { font-size: 12px; font-style: normal; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.welcome { padding-top: 145px; }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: start; }
.welcome-copy { padding-top: 45px; font-size: 18px; }
.services { background: var(--cream); }
.section-heading { margin-bottom: 42px; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.section-heading > p { max-width: 330px; margin: 0 0 8px; color: #5d716b; }
.service-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.service-card { min-height: 355px; padding: 30px; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--paper); }
.service-card.featured { color: white; background: var(--forest); }
.card-number { margin-left: auto; color: #7e918b; font-size: 12px; letter-spacing: .15em; }
.featured .card-number { color: #b7ccc5; }
.card-label { margin: 50px 0 8px; color: #71847e; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; }
.featured .card-label { color: #b9d1c9; }
.service-time { margin: 13px 0 auto; color: #9a7225; font-weight: 700; }
.featured .service-time { color: #ebca83; }
.service-schedule { display: grid; gap: 18px; margin: 14px 0 auto; }
.service-day { display: grid; gap: 12px; }
.service-day + .service-day { padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.service-day-heading { margin: 0; color: #b9d1c9; font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.service-schedule h3 { margin: 0; }
.service-schedule .service-time { margin: 6px 0 0; }
.service-schedule .service-detail { margin: 6px 0 0; color: #bfd0ca; font-size: 14px; line-height: 1.5; }
.service-card > p:last-child { margin-bottom: 0; font-size: 14px; opacity: .83; }

#events { padding-block: 20px; background: var(--paper); }
.events .section-heading { margin-bottom: 18px; gap: 24px; }
.events .eyebrow { margin-bottom: 6px; }
.events h2 { font-size: clamp(32px, 4vw, 44px); }
.events .event-card { min-height: 0; padding: 18px 22px; gap: 6px; }
.events .event-card h3 { font-size: clamp(20px, 2.3vw, 25px); }
.events .section-heading > p { margin-block: 0; }
.event-list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event-card { min-height: 190px; padding: 38px 34px; display: grid; align-content: center; gap: 10px; border-left: 4px solid var(--gold); background: var(--cream); }
.event-frequency { margin: 0; color: #607d74; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.event-card h3 { margin: 0; }
.event-time { margin: 0; color: #9a7225; font-weight: 700; }

#messages { padding-block: 20px; background: #eef2e9; }
#messages .section-heading { margin-bottom: 18px; gap: 24px; }
#messages .eyebrow { margin-bottom: 6px; }
#messages h2 { font-size: clamp(32px, 4vw, 44px); }
#messages .message-grid { margin-top: 14px; gap: 14px; }
#messages .message-card { padding: 16px; }
#messages .message-topic { margin: 0 0 12px; }
#messages .message-card h3 { font-size: 22px; margin-bottom: 10px; }
#messages .message-meta { margin-bottom: 12px; }
.library-toolbar { display: grid; grid-template-columns: 1fr 210px 180px; gap: 12px; margin-bottom: 18px; }
.library-toolbar input, .library-toolbar select { width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: var(--paper); font: 500 14px var(--sans); }
.library-toolbar input:focus, .library-toolbar select:focus { outline: 3px solid rgba(210,168,84,.35); border-color: #9a7225; }
.message-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 25px; }
.message-card { position: relative; padding: 28px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 8px 25px rgba(13,52,44,.04); }
.message-card::before { content: ""; position: absolute; top: 0; left: 0; width: 52px; height: 3px; background: var(--gold); }
.message-topic { margin: 8px 0 28px; color: #74837e; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.message-card h3 { margin-bottom: 16px; }
.message-meta { display: grid; gap: 5px; margin: 0 0 24px; color: #61716c; font-size: 13px; }
.message-actions { display: flex; gap: 9px; }
.media-link { padding: 8px 12px; border: 1px solid var(--line); color: var(--forest); font-size: 12px; font-weight: 700; text-decoration: none; }
button.media-link { font-family: inherit; line-height: inherit; background: transparent; cursor: pointer; }
.message-player { width: min(900px, calc(100vw - 32px), calc((100dvh - 140px) * 16 / 9 + 32px)); max-height: calc(100dvh - 24px); padding: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; overflow: auto; }
.message-player::backdrop { background: rgba(8,40,32,.8); }
.message-player-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.message-player h2 { font: 600 20px/1.25 var(--serif); }
.message-player button { min-height: 44px; padding: 8px 12px; flex-shrink: 0; color: var(--forest); background: var(--cream); border: 1px solid var(--line); border-radius: 3px; font: 600 14px var(--sans); cursor: pointer; }
.message-player button:focus-visible, button.media-link:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.message-player-mount { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; background: #000; }
.message-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.message-player p { margin: 10px 0 0; font-size: 12px; line-height: 1.4; }
body:has(.message-player[open]) { overflow: hidden; }
.media-link[aria-disabled="true"] { color: #7e8784; background: #f2f1ed; cursor: not-allowed; }
.empty-message { padding: 30px; text-align: center; background: var(--paper); }

.section-heading.centered { max-width: 690px; margin-inline: auto; display: block; text-align: center; }
.section-heading.centered .eyebrow { margin-bottom: 16px; }
.section-heading.centered > p:last-child { max-width: none; margin: 18px 0 0; }
.ministry-grid { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ministry-grid article { min-height: 270px; padding: 32px 25px; border-right: 1px solid var(--line); }
.ministry-grid article:last-child { border-right: 0; }
.ministry-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 38px; border: 1px solid var(--sage); border-radius: 50%; color: #667c75; font-size: 11px; }
.ministry-grid p { color: #62716d; font-size: 14px; }

.visit { padding-top: 20px; }
.visit-panel { padding: 70px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; color: white; background: var(--forest-deep); }
.visit-panel h2 { max-width: 540px; }
.visit-panel > div:first-child > p:last-child { max-width: 570px; color: #cbdad5; }
.visit-details { border-left: 1px solid rgba(255,255,255,.18); padding-left: 55px; }
.visit-details > div { display: flex; gap: 14px; margin-bottom: 24px; }
.visit-details strong { display: block; }
.visit-details p { margin: 2px 0 0; color: #bfd0ca; }
.visit-details .button { margin-top: 8px; }

.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 120px; align-items: start; }
#contact { padding-block: 20px; }
#contact .contact-layout { display: block; text-align: left; }
#contact .contact-list { display: grid; grid-template-columns: max-content max-content max-content max-content minmax(0, 1fr); gap: 12px; }
#contact .contact-person > div:last-child { margin-left: 0; }
#contact .contact-list .contact-person { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; gap: inherit; padding: 0; margin: 0; align-items: start; }
#contact .contact-person + .contact-person { border-top: 1px solid var(--line); }
#contact h2 { font-size: clamp(28px, 3vw, 36px); }
#contact .contact-list div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; padding-block: 14px; border: 0; }
#contact .contact-list strong { overflow-wrap: anywhere; }
.contact-layout > div > p:last-child { max-width: 400px; color: #60716c; }
.contact-list { font-style: normal; border-top: 1px solid var(--line); }
.contact-list div { display: grid; grid-template-columns: 130px 1fr; gap: 25px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-list span { color: #71827d; font-size: 13px; }
.contact-list strong { font-weight: 600; }

.site-footer { padding: 12px 0; color: #cedbd7; background: #082820; }
.footer-content { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-footer p { margin: 0; }
.footer-brand strong { color: white; }
.footer-brand small { color: #aac0b8; }
.site-footer p, .site-footer > a { font-size: 12px; }
.site-footer a { text-decoration: none; }

@media (max-width: 850px) {
  #contact .contact-list { grid-template-columns: 1fr 1fr; gap: 8px 20px; }
  #contact .contact-person > div:last-child { margin-left: 0; }
  .nav-wrap { grid-template-columns: minmax(0, 1fr) auto auto; }
  .menu-toggle { display: block; }
  .nav-wrap { gap: 16px; padding-block: 12px; }
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 22px 20px 28px; flex-direction: column; align-items: stretch; gap: 16px; max-height: calc(100dvh - 110px); overflow-y: auto; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .primary-nav.open { display: flex; }
  .nav-button { text-align: center; }
}

@media (max-width: 850px) {
  .hero-service-events { grid-template-columns: 1fr 1.5fr; }
  .verse-slide { flex-wrap: wrap; white-space: normal; }
  .nav-wrap { grid-template-columns: minmax(0, 1fr) auto; }
  .header-motto { width: auto; grid-column: 1 / -1; grid-row: 2; text-align: left; font-size: 22px; }
  .site-header .menu-toggle { grid-column: 2; grid-row: 1; }
  .hero { min-height: 650px; }
  .hero-content { grid-template-columns: 1fr; gap: 24px; padding: 12px 0 24px; }
  .church-photo-placeholder { max-width: 560px; width: 100%; margin-inline: auto; }
  .verse-card { width: calc(100% - 40px); }
  .welcome { padding-top: 90px; }
  .split-layout, .visit-panel, .contact-layout { grid-template-columns: 1fr; gap: 35px; }
  .welcome-copy { padding-top: 0; }
  .service-grid { grid-template-columns: 1fr; }
  .message-grid { grid-template-columns: 1fr; }
  .library-toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .service-card { min-height: 280px; }
  .card-label { margin-top: 25px; }
  .ministry-grid { grid-template-columns: 1fr 1fr; }
  .ministry-grid article:nth-child(2) { border-right: 0; }
  .ministry-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .visit-details { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.18); padding-top: 35px; }
}

@media (max-width: 560px) {
  #contact .contact-list { grid-template-columns: 1fr; gap: 0; }
  .church-identity { grid-template-columns: 58px minmax(0, 1fr); }
  .church-details { grid-column: 1 / -1; margin-top: 6px; }
  .verse-card { grid-template-columns: minmax(0, 1fr) auto; width: calc(100% - 28px); margin-inline: 14px; padding: 12px; }
  .verse-symbol { display: none; }
  .hero-service-events { grid-template-columns: 1fr; gap: 4px; }
  .hero-service-events > div { grid-column: 1; grid-row: auto; }
  .site-header .brand-flag { width: 58px; }
  .church-details { margin-left: 0; font-size: 12px; }
  .nav-wrap { align-items: start; gap: 12px; }
  .container { width: min(100% - 28px, 1120px); }
  .section { padding: 72px 0; }
  .brand small { font-size: 8px; }
  .hero-content { padding: 12px 0 24px; }
  h1 { font-size: clamp(46px, 15vw, 64px); }
  .hero-actions .button { width: 100%; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 18px; }
  .ministry-grid { grid-template-columns: 1fr; }
  .ministry-grid article { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ministry-grid article:nth-child(3) { border-bottom: 1px solid var(--line); }
  .ministry-grid article:last-child { border-bottom: 0; }
  .visit { padding-top: 0; }
  .visit-panel { width: 100%; padding: 55px 24px; }
  .contact-list div { grid-template-columns: 1fr; gap: 3px; }
  .library-toolbar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .footer-content { flex-direction: column; text-align: center; }
}

@media (min-width: 851px) and (max-height: 600px) {
  #messages { padding-block: 6px; }
  #messages > .container { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 6px 16px; }
  #messages .section-heading { display: block; margin: 0; }
  #messages .eyebrow { margin-bottom: 2px; font-size: 10px; line-height: 1.3; }
  #messages h2 { font-size: 28px; }
  #messages .section-heading > p { margin: 4px 0 0; font-size: 12px; line-height: 1.3; }
  #messages .library-toolbar { align-self: center; grid-template-columns: minmax(0, 1fr) 130px 130px; gap: 8px; margin: 0; }
  #messages .library-toolbar input, #messages .library-toolbar select { min-height: 40px; padding-inline: 8px; }
  #messages .placeholder-note { grid-column: 1 / -1; margin: 0; padding: 5px 10px; font-size: 12px; line-height: 1.3; }
  #messages .message-grid { grid-column: 1 / -1; margin: 0; gap: 10px; }
  #messages .message-card { padding: 8px 10px; }
  #messages .message-topic { margin: 0 0 4px; line-height: 1.3; }
  #messages .message-card h3 { margin-bottom: 6px; font-size: 20px; line-height: 1.2; }
  #messages .message-meta { gap: 0; margin-bottom: 6px; font-size: 12px; line-height: 1.35; }
  #messages .media-link { padding: 5px 8px; line-height: 1.3; }
  #messages .empty-message { grid-column: 1 / -1; margin: 0; padding: 12px; }
  #need-prayer { padding-block: 6px; }
  #need-prayer h2 { font-size: 28px; }
  .prayer-form { max-width: 760px; gap: 4px; margin-top: 8px; }
  .prayer-form { grid-template-columns: 120px minmax(0, 1fr); }
  .prayer-form label[for="prayer-subject"] { grid-column: 1; grid-row: 1; align-self: center; }
  #prayer-subject { grid-column: 2; grid-row: 1; }
  .prayer-form label[for="prayer-note"] { grid-column: 1; grid-row: 2; }
  #prayer-note { grid-column: 2; grid-row: 2; }
  .prayer-form > p, .prayer-form > button, .prayer-form > noscript { grid-column: 1 / -1; }
  .prayer-form label { font-size: 14px; line-height: 1.25; }
  .prayer-form input { padding: 6px 10px; line-height: 1.25; }
  .prayer-form textarea { height: 112px; min-height: 112px; }
  .prayer-form p { margin: 0; font-size: 12px; line-height: 1.3; }
  .prayer-form button { min-height: 36px; padding: 6px 16px; font-size: 14px; }
  .nav-wrap { padding-block: 6px; gap: 6px 16px; }
  .church-details { font-size: 12px; margin-top: 2px; }
  .hero-content { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding: 8px 0 10px; }
  .church-photo-placeholder { max-width: 240px; }
  .church-photo-placeholder figcaption { padding: 8px 12px; font-size: 13px; }
  .church-photo-placeholder figcaption span { font-size: 11px; }
  .hero h1 { font-size: 30px; }
  .hero-service-events { margin: 8px 0; gap: 4px 20px; }
  .hero-service-events > div { padding: 3px 0; }
  .hero-service-events dt { font-size: 16px; }
  .hero-service-events dd { font-size: 14px; }
  .hero-copy { font-size: 15px; line-height: 1.5; margin: 8px 0; }
  .verse-card { padding-block: 8px; margin-bottom: 8px; }
  .verse-card blockquote { font-size: 15px; }
}

@media (min-width: 851px) {
  #contact .contact-person + .contact-person span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

.church-photo-placeholder img { display: block; width: 100%; height: auto; }
.calendar-section { padding-block: 20px; background: var(--paper); }
.calendar-section .section-heading { margin-bottom: 18px; }
.calendar-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.calendar-controls h3 { margin: 0; font-size: 24px; text-align: center; }
.calendar-controls button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--cream); color: var(--forest); font-size: 24px; cursor: pointer; border-radius: 4px; }
.calendar-days, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.calendar-days { text-align: center; font-weight: 700; font-size: 12px; padding-block: 8px; }
.calendar-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-day { background: #ffffff; min-height: 58px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--forest); font-weight: 700; }
.calendar-day.has-event { background: var(--cream); }
.calendar-day small { display: block; font-size: 11px; line-height: 1.3; margin-top: 3px; overflow-wrap: anywhere; }
.calendar-notes { margin-top: 14px; padding: 12px 16px; border-left: 4px solid var(--gold); background: var(--cream); }
.calendar-notes p { margin: 0; }
@media(max-width:600px) { .calendar-section .section-heading { display: block; } .calendar-section .section-heading > p { margin-top: 10px; } .calendar-day { padding: 5px 3px; min-height: 55px; } .calendar-day small { font-size: 9px; } }

.calendar-day:nth-child(14n + 1), .calendar-day:nth-child(14n + 2), .calendar-day:nth-child(14n + 3), .calendar-day:nth-child(14n + 4), .calendar-day:nth-child(14n + 5), .calendar-day:nth-child(14n + 6), .calendar-day:nth-child(14n + 7) { background: #e8f0e3; }
.calendar-day.has-event { box-shadow: inset 0 -3px 0 var(--gold); }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--forest); }

#calendar { padding-block: 2px; }
#calendar .section-heading { margin-bottom: 6px; }
#calendar h2 { font-size: clamp(28px, 3.3vw, 38px); }
#calendar .calendar-controls { margin-bottom: 4px; }
#calendar .calendar-days { padding-block: 4px; }
#calendar .calendar-day { min-height: 42px; padding: 4px 7px; }
#calendar .calendar-notes { margin-top: 8px; padding: 6px 12px; font-size: 13px; }
@media (min-width: 851px) and (max-height: 700px) {
 #calendar > .container { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
 #calendar .section-heading { margin: 0; align-self: center; }
 #calendar .section-heading > p { display: none; }
 #calendar .calendar-controls { margin: 0; }
 #calendar .calendar-days, #calendar .calendar-grid, #calendar .calendar-notes { grid-column: 1 / -1; }
 #calendar .calendar-controls button { width: 32px; height: 32px; font-size: 20px; }
 #calendar .calendar-controls h3 { font-size: 20px; }
 #calendar .calendar-day { min-height: 30px; padding: 2px 6px; line-height: 1.2; }
 #calendar .calendar-day small { display: inline; margin-left: 6px; font-size: 10px; }
 #calendar .calendar-notes { margin-top: 4px; padding-block: 3px; font-size: 12px; }
}

@media (min-width: 851px) {
 #calendar { display: flex; }
 #calendar > .container { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto; column-gap: 20px; }
 #calendar .section-heading { grid-column: 1; }
 #calendar .calendar-controls { grid-column: 2; }
 #calendar .calendar-days, #calendar .calendar-grid, #calendar .calendar-notes { grid-column: 1 / -1; }
 #calendar .calendar-grid { grid-auto-rows: minmax(30px, 1fr); }
}

#calendar .calendar-day { font-size: 14px; }
#calendar .calendar-day small { font-size: 11px; }
@media(max-width:600px) { #calendar .calendar-day small { font-size: 10px; } }

#calendar .calendar-days { background: var(--cream); color: var(--forest); border: 1px solid var(--line); padding-block: 8px; }
@media(min-width:851px) and (max-height:700px) { #calendar .calendar-days { padding-block: 4px; } #calendar .calendar-day small { font-size: 10px; } }

#calendar .calendar-days { padding-block: 0; border-right: 0; border-bottom: 0; }
#calendar .calendar-days > span { padding: 8px 3px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#calendar .calendar-grid { border-top: 0; }
@media(min-width:851px) and (max-height:700px) { #calendar .calendar-days > span { padding-block: 3px; } }

@media(min-width:851px) {
 #calendar > .container { grid-template-columns: 1fr; }
 #calendar .section-heading { grid-area: 1 / 1; justify-self: center; align-self: center; margin: 0; pointer-events: none; }
 #calendar .section-heading > p { display: none; }
 #calendar .calendar-controls { grid-area: 1 / 1; margin: 0; }
 #calendar .calendar-controls h3 { margin-left: auto; margin-right: 16px; }
 #calendar-prev { margin-right: auto; }
 #calendar .calendar-days { grid-row: 2; }
 #calendar .calendar-grid { grid-row: 3; }
}

@media(min-width:851px) { #calendar .section-heading { justify-self: start; margin-left: 150px; transform: translateY(-26px); } }

@media(min-width:851px) { #calendar .section-heading { position: relative; z-index: 51; } }
