:root {
    color-scheme: light;
    --ink: #000;
    --purple: #332b68;
    --paper: #f2efe9;
    --line: #d5d2cd;
    --muted: #585550;
}
* { box-sizing: border-box; }
body { margin: 0; background: #656565; color: var(--ink); font: 13px/1.6 Verdana, Arial, sans-serif; }
a { color: var(--purple); font-weight: bold; }
a:hover { background-color: #fff; }
button, input, select { font: inherit; }
button, .button { background: #d5d2cd; color: var(--purple); border: 1px solid #888; border-radius: 2px; padding: 7px 14px; cursor: pointer; font-weight: bold; }
button:hover { background: #fff; }
button:disabled { opacity: .5; cursor: default; }
input, select { width: 100%; padding: 6px 8px; background: #fff; border: 1px solid #999; color: var(--ink); }
:focus-visible { outline: 3px solid #756799; outline-offset: 3px; }
label { display: block; font-size: 12px; margin-bottom: 12px; }
label input, label select { display: block; margin-top: 4px; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 16px 0; padding: 10px 0 0; min-width: 0; }
legend { font-size: 12px; padding-right: 8px; }
small { font-size: 11px; line-height: 1.5; }
h1, h2, h3 { font-family: Verdana, Arial, sans-serif; color: var(--ink); line-height: 1.35; }
h1 { font-size: 20px; margin: 0 0 20px; }
h2 { font-size: 17px; margin: 24px 0 14px; }
h3 { font-size: 15px; }
p { margin: 0 0 16px; }
.site-header, main, .site-footer { width: calc(100% - 24px); max-width: 912px; margin: auto; }
.site-header { margin-top: 18px; }
.header-inner { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 1px; min-height: 65px; }
.brand { display: block; height: 65px; }
.brand:hover { background: none; }
.brand img { display: block; width: 296px; height: 65px; }
.site-header nav {
    display: flex; align-items: flex-start; justify-content: center; flex-wrap: wrap;
    gap: 8px 14px; padding: 20px 12px 14px; min-height: 65px;
    background: url('/images/top_left.gif') left top no-repeat, url('/images/top_right.gif') right top no-repeat, url('/images/top_bg.gif') left top repeat-x;
}
.site-header nav a { display: inline-flex; align-items: center; min-height: 20px; }
.site-header nav img { display: block; max-width: 100%; height: 16px; }
.site-header nav a[aria-current] { outline: 1px dotted var(--purple); outline-offset: 3px; }
main { background: var(--paper); padding: 20px; border-radius: 12px; min-height: 280px; }
.site-footer { color: #eee; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 6px 24px; font-size: 10px; }
.site-footer a { color: #eee; font-weight: normal; }
.site-footer a:hover { color: var(--purple); }
.intro { display: block; }
.intro .home-photo { display: block; width: 358px; max-width: 100%; height: auto; margin: 0; }
.intro p { margin: 0; }
.eyebrow { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.muted { color: var(--muted); }
.map-section { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.map-placeholder { height: 400px; background: #d5d2cd; border: 1px solid #aaa69f; display: flex; align-items: center; justify-content: center; }
.map-placeholder p { margin: 12px; }
.map-loaded { display: block; background: #e1e1dc; }
.map-status { font-size: 11px; margin: 7px 0 0; }
.leaflet-container a { font-weight: normal; }
.search-layout { display: grid; grid-template-columns: 265px minmax(0, 1fr); gap: 24px; }
.search-panel { background: #e5e1d9; border: 1px solid #c9c5be; padding: 15px; align-self: start; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.check input { width: auto; margin: 0; }
.years { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.years label { margin-bottom: 6px; }
.search-results h2 { margin-top: 0; }
.church-list { padding: 0; margin: 0; list-style: none; }
.church-list li { padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.church-list small { display: block; margin-top: 3px; color: var(--muted); }
.columns { columns: 2; column-gap: 28px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pagination a, .pagination strong { display: inline-block; padding: 3px 10px; border: 1px solid #c9c5be; }
.pagination strong { background: #d5d2cd; }
.card-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.print-link { font-size: 11px; white-space: nowrap; margin-top: 5px; }
.facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin: 0 0 20px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.description { max-width: 850px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gallery figure { margin: 0; padding: 12px; background: #d5d2cd; border: 1px solid #bbb7b0; }
.gallery img { display: block; width: 100%; max-height: 540px; object-fit: contain; background: #bbb; }
.gallery figcaption { font-size: 12px; padding-top: 10px; color: #393632; }
.gallery figcaption span, .gallery figcaption small { display: block; margin-top: 5px; }
.photo-carousel { display: block; max-width: 744px; margin: 0 auto; }
.carousel-slides { display: grid; gap: 20px; touch-action: pan-y pinch-zoom; }
.photo-carousel.is-enhanced .carousel-slide[hidden] { display: none; }
.photo-carousel.is-enhanced .carousel-slides { display: block; }
.carousel-slide img { height: min(60vh, 520px); min-height: 200px; object-fit: contain; }
.carousel-slide > .muted { min-height: 180px; display: flex; align-items: center; justify-content: center; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 12px; }
.carousel-controls[hidden] { display: none; }
.carousel-controls button { min-height: 44px; min-width: 44px; }
.carousel-counter { min-width: 70px; text-align: center; font-size: 12px; }
.historical { max-width: 900px; }
.historical > h3:first-of-type { display: none; }
.historical a { overflow-wrap: anywhere; }
.historical .gallery { margin-top: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -60px; left: 12px; background: #fff; padding: 10px; z-index: 10000; }
.skip:focus { top: 5px; }
.print-view .no-print, .print-view .carousel-controls { display: none; }
.print-view main { margin-top: 0; }
@media (max-width: 760px) {
    .header-inner { grid-template-columns: 1fr; gap: 0; }
    .brand { width: 296px; }
    .site-header nav { min-height: 51px; padding: 16px 12px 12px; gap: 8px 16px; align-content: center; }
    .search-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 18px; }
    .card-heading { display: block; }
    .print-link { display: inline-block; margin: 0 0 18px; }
}
@media (max-width: 560px) {
    .site-header, main, .site-footer { width: calc(100% - 16px); }
    .site-header { margin-top: 10px; }
    .site-header nav { background-color: var(--paper); border-radius: 5px 5px 0 0; padding: 12px 14px; }
    .site-header nav a { min-height: 28px; }
    main { padding: 18px 14px; border-radius: 0 0 10px 10px; }
    h1 { font-size: 19px; }
    .search-layout { display: block; }
    .search-panel { margin-bottom: 22px; }
    .search-panel form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
    .search-panel fieldset, .search-panel .muted, .search-panel button { grid-column: 1 / -1; }
    .columns { columns: 1; }
    .gallery { grid-template-columns: 1fr; }
    .photo-carousel { display: block; }
    .gallery figure { padding: 8px; }
    .carousel-controls { gap: 8px; }
    .carousel-controls button { padding: 7px 10px; }
    .facts { grid-template-columns: 90px minmax(0, 1fr); gap: 8px 10px; }
    .map-placeholder { height: 320px; }
}
@media print {
    body { background: #fff; font: 11pt/1.5 Verdana, sans-serif; color: #000; }
    .no-print, .site-header, .map-section, .skip, .carousel-controls { display: none !important; }
    main { width: 100%; margin: 0; max-width: none; padding: 0; border: 0; }
    h1, h2 { color: #000; break-after: avoid; }
    .gallery, .photo-carousel, .photo-carousel.is-enhanced .carousel-slides { display: block; max-width: none; }
    .gallery figure, .photo-carousel.is-enhanced .carousel-slide[hidden] { display: block; break-inside: avoid; width: 100%; margin: 12px 0; background: none; border: 1px solid #ccc; }
    .gallery img { height: auto; min-height: 0; max-height: 400px; }
    .site-footer { width: 100%; color: #444; border-top: 1px solid #aaa; font-size: 9pt; }
    .site-footer a, a { color: #000; }
    .facts { break-inside: avoid; }
}
