/* Design ported from the Lovable "church-website-refresh" project (Tailwind) to plain CSS. */

:root {
  --radius: 0.75rem;
  --section-space: 3rem; /* vertical padding of sections: 48px on phones, 72px from 768px */
  --background: oklch(0.975 0.012 80);
  --foreground: oklch(0.24 0.03 40);
  --card: oklch(0.993 0.006 80);
  --primary: oklch(0.38 0.1 25);
  --primary-foreground: oklch(0.97 0.015 80);
  --secondary: oklch(0.93 0.025 75);
  --muted-foreground: oklch(0.5 0.03 45);
  --gold: oklch(0.74 0.13 75);
  --ink: oklch(0.2 0.03 35);
  --ink-foreground: oklch(0.95 0.02 80);
  --border: oklch(0.88 0.025 70);
  --ring: oklch(0.74 0.13 75);
  --shadow-soft: 0 20px 50px -25px color-mix(in oklab, var(--ink) 45%, transparent);
  --gradient-veil: linear-gradient(180deg, color-mix(in oklab, var(--ink) 25%, transparent), color-mix(in oklab, var(--ink) 85%, transparent));
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Layout */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; }
.container { max-width: 72rem; margin-inline: auto; padding-inline: 1.25rem; }
.container-mid { max-width: 64rem; margin-inline: auto; padding-inline: 1.25rem; }
.container-contact { max-width: 56rem; margin-inline: auto; padding-inline: 1.25rem; }
.container-narrow { max-width: 48rem; margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: var(--section-space); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom-width: 1px;
  background: color-mix(in oklab, var(--background) 90%, transparent);
  backdrop-filter: blur(8px);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.brand-mark { flex-shrink: 0; width: 2.5rem; height: 2.5rem; }
.brand-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
}
.nav-desktop { display: none; align-items: center; gap: 0.25rem; }
.nav-link {
  border-radius: 9999px; padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
.nav-link:hover { color: var(--foreground); }
.nav-link.is-active { background: var(--secondary); color: var(--foreground); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
/* Language: a circle with the current one; the others open in circles below it. */
.lang-menu { position: relative; }
.lang-circle {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  /* Capital letters sit above the middle of their line; this moves them to the middle of the circle. */
  padding-top: 0.125em;
  border-width: 1px; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em;
  color: var(--muted-foreground); cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.lang-circle:hover, .lang-menu[open] > summary { color: var(--foreground); border-color: var(--gold); }
.lang-menu > summary { list-style: none; user-select: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-options { position: absolute; top: calc(100% + 0.5rem); left: 0; z-index: 1; display: grid; gap: 0.5rem; }
.lang-option { background: var(--card); box-shadow: var(--shadow-soft); }
.menu-toggle {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-width: 1px; border-radius: 9999px; font-size: 1.125rem;
}
.menu-icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-close { display: inline; }
.nav-mobile { border-top-width: 1px; padding: 0 1.25rem 1rem; }
.nav-mobile a {
  display: block; padding-block: 0.75rem; border-bottom-width: 1px;
  font-family: var(--font-display); font-size: 1.25rem;
}
.nav-mobile a:last-child { border-bottom-width: 0; }
.nav-mobile a.is-active { color: var(--primary); }

/* Footer */
.site-footer { background: var(--ink); color: var(--ink-foreground); }
.footer-grid { display: grid; align-items: baseline; gap: 2rem; padding-block: 3rem; }
.footer-title { font-family: var(--font-display); font-size: 1.5rem; }
.footer-muted { margin-top: 0.5rem; font-size: 0.875rem; opacity: 0.7; }
.footer-col { font-size: 0.875rem; opacity: 0.8; }
.footer-heading { font-weight: 600; color: var(--gold); margin-bottom: 0.5rem; }
.footer-copy {
  border-top: 1px solid color-mix(in oklab, var(--ink-foreground) 10%, transparent);
  padding-block: 1.25rem; text-align: center; font-size: 0.75rem; opacity: 0.5;
}

/* Shared text */
.eyebrow { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--primary); }
.eyebrow-gold { color: var(--gold); }
.page-title { margin-top: 0.75rem; font-size: 3rem; }
.section-title { font-size: 2.25rem; }
.lead { margin-top: 1.25rem; font-size: 1.125rem; line-height: 1.65; }
.muted { color: var(--muted-foreground); }
.text-link { display: inline-block; margin-top: 1.75rem; font-weight: 600; color: var(--primary); text-underline-offset: 4px; }
.text-link:hover { text-decoration: underline; }
.prose { margin-top: 2rem; font-size: 1.125rem; line-height: 1.65; color: var(--muted-foreground); }
.prose p + p { margin-top: 1.25rem; }
.prose strong { color: var(--foreground); }

/* Buttons */
.btn {
  display: inline-block; border-radius: 9999px; padding: 0.75rem 1.75rem;
  font-weight: 600; transition: filter 0.15s, background-color 0.15s;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-outline { border: 1px solid color-mix(in oklab, var(--ink-foreground) 40%, transparent); }
.btn-outline:hover { background: color-mix(in oklab, var(--ink-foreground) 10%, transparent); }
.btn-primary { margin-top: 2rem; background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { filter: brightness(1.1); }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-image, .hero-veil { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-image { object-fit: cover; }
.hero-veil { background-image: var(--gradient-veil); }
.hero-content { padding-block: 7rem; color: var(--ink-foreground); }
.hero-title { margin-top: 1rem; max-width: 48rem; font-size: 3rem; line-height: 1.05; }
.hero-text { margin-top: 1.5rem; max-width: 36rem; font-size: 1.125rem; opacity: 0.9; }
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.9s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }

/* Verse */
.verse { padding-block: var(--section-space); text-align: center; }
.verse-text { font-family: var(--font-display); font-size: 1.5rem; font-style: italic; line-height: 1.6; color: var(--primary); text-wrap: balance; }
.verse-ref { margin-top: 1rem; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-foreground); }

/* Cards */
.band { background: var(--secondary); }
.cards { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
.card { border-radius: calc(var(--radius) + 8px); background: var(--card); padding: 1.75rem; }
.card-shadow { box-shadow: var(--shadow-soft); }
.card-bordered { border-width: 1px; padding: 1.5rem; }
.card-meta { font-size: 0.875rem; font-weight: 600; color: var(--primary); }
.card-title { margin-block: 0.75rem 0.5rem; font-size: 1.875rem; }
.card-title-primary { margin-top: 0; font-size: 1.5rem; color: var(--primary); }
/* As wide as a card on the contacts page. */
.cards-fixed { grid-template-columns: repeat(auto-fill, min(26rem, 100%)); }
.card-value { margin-top: 0.25rem; font-family: var(--font-display); font-size: 1.5rem; }
.card-value a:hover { color: var(--primary); }

/* Split and images */
.split { display: grid; align-items: center; gap: 3rem; }
.rounded-image { border-radius: calc(var(--radius) + 8px); object-fit: cover; box-shadow: var(--shadow-soft); }
.wide-image { width: 100%; aspect-ratio: 16 / 9; }
/* Contacts: building photo and map side by side (stacked on phones). */
.card-note { margin-top: 0.25rem; }
/* Card label on the left, link on the right, on one line. */
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.25rem 1rem; }
.badge-link {
  /* Negative margin = vertical padding, so the badge does not make the row taller
     and the address lines up with the text in the neighbouring card. */
  display: inline-block; border-radius: 9999px; padding: 0.25rem 0.75rem; margin-block: -0.25rem;
  background: var(--secondary); color: var(--primary);
  font-size: 0.8125rem; font-weight: 600; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.badge-link:hover { background: var(--primary); color: var(--primary-foreground); }
/* Contacts: a full-width card with email, messengers and Facebook side by side (stacked on phones). */
.contact-card { margin-top: 1.5rem; }
.contact-card .card-title { margin-bottom: 1rem; }
.contact-list { display: grid; gap: 1.25rem; }
.contact-list .card-meta { margin-bottom: 0.25rem; }
.contact-link { color: var(--foreground); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact-link:hover { color: var(--primary); }
.contact-messengers { display: flex; flex-wrap: wrap; gap: 1rem 0.5rem; margin-top: 0.75rem; }
@media (min-width: 640px) { .contact-list { grid-template-columns: repeat(3, 1fr); } }
.visit-grid { margin-top: 1.5rem; display: grid; gap: 1.5rem; }
/* Photo and map: both 4:3, so they line up and the page stays compact. */
.visit-photo img { width: 100%; aspect-ratio: 4 / 3; }

.church-map {
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #dfd2c0;
    box-shadow: 0 12px 32px rgba(50, 30, 15, 0.08);
}

.church-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0; /* was an inline style; CSP does not allow inline styles */
}

@media (min-width: 768px) {
    .visit-grid { grid-template-columns: 1fr 1fr; }
}
.full-image { width: 100%; }
/* 70% on tablets and desktops; full width stays on phones, where 70% would be too small. */
@media (min-width: 768px) { .full-image { width: 70%; margin-inline: auto; } }
.split-image { width: 100%; aspect-ratio: 1200 / 912; }
.page-intro { padding-block: var(--section-space) 2.5rem; }
/* Space between the site header and the page name: half of a normal section gap. */
.main > .section:first-child, .main > .page-intro:first-child { padding-top: calc(var(--section-space) / 2); }
/* Slightly warmer than the page, lighter than .band, so it stands apart from both. */
.beliefs-band {
  margin-top: 2.5rem;
  background: oklch(0.952 0.02 76);
  border-block: 1px solid var(--border);
}
/* About page has tighter sections than the rest of the site: 40px on phones, 64px from 768px. */
.about-section { padding-block: 2.5rem; }
@media (min-width: 768px) {
  .about-section { padding-block: 4rem; }
  .beliefs-band { margin-top: 4rem; }
}
.invite { text-align: center; }
.invite .lead { margin-inline: auto; max-width: 40rem; }
.invite-note { margin-top: 1.25rem; font-size: 0.875rem; color: var(--muted-foreground); }

/* Photo viewer */
img[data-zoom] { cursor: zoom-in; }
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; cursor: zoom-out;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: color-mix(in oklab, var(--ink) 88%, transparent); }
.lightbox img {
  max-width: 96vw; max-height: 94vh; max-height: 94dvh;
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgb(0 0 0 / 0.5);
}
html.lightbox-open { overflow: hidden; }

/* Library */
.search-input {
  display: block; margin-top: 2rem; width: 100%; max-width: 28rem;
  border: 1px solid var(--border); border-radius: 9999px; background: var(--card);
  padding: 0.75rem 1.25rem; font: inherit; color: inherit; outline: none;
}
.search-input:focus { box-shadow: 0 0 0 2px var(--ring); }
.topics { margin-top: 2.5rem; display: grid; gap: 0.75rem; }
.topic {
  border-width: 1px; border-radius: var(--radius); background: var(--card);
  padding: 1rem 1.25rem; font-weight: 500; transition: border-color 0.15s, box-shadow 0.15s;
}
.topic:hover { border-color: var(--gold); box-shadow: var(--shadow-soft); }
.topic { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.topic-count { font-size: 0.8125rem; font-weight: 500; color: var(--muted-foreground); font-family: var(--font-sans); }
.eyebrow a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Switch between "by topic" and "by category" */
.view-switch { display: flex; width: fit-content; gap: 0.25rem; margin-top: 1.5rem; padding: 0.25rem; border-width: 1px; border-radius: 9999px; background: var(--card); }
.view-switch a { border-radius: 9999px; padding: 0.5rem 1.25rem; font-size: 0.875rem; font-weight: 600; color: var(--muted-foreground); }
.view-switch a:hover { color: var(--foreground); }
.view-switch a.is-active { background: var(--primary); color: var(--primary-foreground); }

.categories { margin-top: 2.5rem; columns: 20rem; column-gap: 1.5rem; }
.categories .card { break-inside: avoid; margin-bottom: 1.5rem; }
.category-title { font-size: 1.5rem; color: var(--primary); }
.category-title a { display: block; }
.category-links { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.category-links a { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding-block: 0.5rem; border-bottom-width: 1px; }
.category-links li:last-child a { border-bottom-width: 0; }
.category-links a:hover, .category-title a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }

.article-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.article-card { display: block; border-width: 1px; border-radius: var(--radius); background: var(--card); padding: 1rem 1.25rem; transition: border-color 0.15s, box-shadow 0.15s; }
.article-card:hover { border-color: var(--gold); box-shadow: var(--shadow-soft); }
.article-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.article-name { font-weight: 600; color: var(--primary); }
.article-date { font-size: 0.8125rem; color: var(--muted-foreground); white-space: nowrap; }
.article-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; margin-top: 0.5rem; font-size: 0.9375rem; color: var(--muted-foreground); }

.pager { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 2rem; }
.pager a { display: grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding-inline: 0.5rem; border-width: 1px; border-radius: 9999px; font-size: 0.875rem; }
.pager a:hover { border-color: var(--gold); }
.pager a.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

/* Article text. The classes ta-*, float-* and w-full are written by tools/ExportArticles. */
.article-title { margin-top: 0.75rem; font-size: 2.25rem; overflow-wrap: break-word; }
.article-body { display: flow-root; margin-top: 2rem; overflow-x: auto; overflow-wrap: break-word; }
/* Article text: the same as the Bible verse text. */
.article-body {
  font-family: 'Literata', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}
/* Only the text: smaller headings and the series links keep the site's interface font. */
.article-body h4, .article-body h5, .article-body h6, .article-body .series-nav { font-family: var(--font-sans); }
.article-body .series-nav { font-size: 1.0625rem; }
.article-body p, .article-body blockquote, .article-body ul, .article-body ol, .article-body dl, .article-body table { margin: 0 0 1rem; }
.article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 { margin: 1.75rem 0 0.75rem; line-height: 1.2; }
.article-body h2 { font-size: 1.75rem; }
.article-body h3 { font-size: 1.5rem; }
.article-body blockquote { padding-left: 1.25rem; border-left: 3px solid var(--gold); }
.article-body a[href] { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body table { max-width: 100%; border-collapse: collapse; }
.article-body table.w-full { width: 100%; }
.article-body td, .article-body th { padding: 0.25rem 0.5rem; vertical-align: top; }
.article-body img { display: inline-block; vertical-align: middle; }
.article-body .ta-center { text-align: center; }
.article-body .ta-right { text-align: right; }
.article-body .ta-justify { text-align: justify; hyphens: auto; }
.article-body img.float-left { float: left; margin: 0.25rem 1.25rem 0.75rem 0; max-width: 45%; }
.article-body img.float-right { float: right; margin: 0.25rem 0 0.75rem 1.25rem; max-width: 45%; }
/* Previous / start / next row of a series. Each link has its own column, also when others are missing. */
.series-nav { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: 0.75rem; clear: both; margin-block: 1.25rem; }
.series-prev { grid-column: 1; grid-row: 1; text-align: left; }
.series-start { grid-column: 2; grid-row: 1; text-align: center; }
.series-next { grid-column: 3; grid-row: 1; text-align: right; }
.article-body > .series-nav:first-child { margin-top: 0; }
.translation-note { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.translation-note a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
/* Topics and category above the article text */
.article-meta { display: grid; gap: 0.5rem; margin-top: 1rem; padding-bottom: 1.25rem; border-bottom-width: 1px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.chips-label { font-size: 0.875rem; font-weight: 600; color: var(--muted-foreground); }
.chip { border-radius: 9999px; padding: 0.375rem 0.875rem; background: var(--secondary); color: var(--primary); font-size: 0.875rem; font-weight: 600; }
.chip:hover { background: var(--primary); color: var(--primary-foreground); }
@media (max-width: 479px) {
  .article-head { flex-direction: column; gap: 0.25rem; }
  .article-body .ta-justify { text-align: left; }
}

/* Bible */
.main > .band:first-child .bible-top { padding-block: calc(var(--section-space) / 2) var(--section-space); }
.bible-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.bible-search-toggle { display: inline-flex; align-items: center; gap: 0.625rem; margin-left: auto; margin-top: 0.75rem; padding: 0.625rem 1.5rem; border: 1px solid var(--primary); border-radius: 9999px; color: var(--primary); font-weight: 600; transition: background-color 0.15s, color 0.15s; }
.bible-search-toggle::after { content: ""; width: 0.45rem; height: 0.45rem; margin-top: -0.2rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.bible-search-toggle[aria-expanded="true"] { background: var(--primary); color: var(--primary-foreground); }
.bible-search-toggle[aria-expanded="true"]::after { margin-top: 0.2rem; transform: rotate(-135deg); }
.bible-search-toggle:hover { background: var(--primary); color: var(--primary-foreground); }
.bible-panel { margin-top: 2rem; padding: 1.25rem; }
.bible-translation { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 600; }
.bible-translation select { max-width: 100%; border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px); background: var(--background); padding: 0.5rem 0.75rem; font: inherit; font-weight: 500; color: inherit; }
.bible-search { margin-top: 1rem; }
.bible-search-row { display: flex; flex-direction: column; gap: 0.75rem; }
.bible-input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 9999px; background: var(--background); padding: 0.75rem 1.25rem; font: inherit; color: inherit; outline: none; }
.bible-input:focus { box-shadow: 0 0 0 2px var(--ring); }
.bible-button { border-radius: 9999px; padding: 0.75rem 1.75rem; background: var(--primary); color: var(--primary-foreground); font-weight: 600; }
.bible-button:hover { filter: brightness(1.1); }
.bible-button:disabled { opacity: 0.6; cursor: default; }
.bible-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin: 0.875rem 0 0; padding: 0; border: 0; min-width: 0; font-size: 0.875rem; }
.bible-filter legend { float: left; width: 100%; padding: 0; font-weight: 600; color: var(--muted-foreground); }
.bible-filter label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.bible-filter input { accent-color: var(--primary); width: 1rem; height: 1rem; margin: 0; }
.bible-hint { font-size: 0.8125rem; }

.bible-results { padding-top: var(--section-space); scroll-margin-top: 6rem; }
.bible-results-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bible-results-head h2 { font-size: 1.875rem; }
.bible-link { font-size: 0.875rem; font-weight: 600; color: var(--primary); }
.bible-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.bible-result-text { display: block; margin-top: 0.375rem; }
.bible-results mark { background: color-mix(in oklab, var(--gold) 40%, transparent); color: inherit; border-radius: 2px; }
.bible-results .article-list { margin-top: 1.25rem; }
.bible-results [data-results-note] { margin-top: 1rem; }
.bible-more { margin-top: 1.25rem; }

.bible-books { padding-top: var(--section-space); }
.testament { margin-bottom: 1.25rem; }
.testament > summary { display: flex; align-items: center; gap: 0.75rem; width: fit-content; list-style: none; cursor: pointer; user-select: none; border-radius: 6px; }
.testament > summary::-webkit-details-marker { display: none; }
/* Arrow: points right when closed, down when open. */
.testament > summary::after { content: ""; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); transition: transform 0.15s; }
.testament[open] > summary::after { transform: rotate(45deg); }
.testament > summary:hover h2 { color: var(--primary); }
.testament h2 { margin: 0; font-size: 1.875rem; }
.testament .bible-book-list { margin-top: 1rem; }
.bible-book-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.bible-book { border-width: 1px; border-radius: 9999px; background: var(--card); padding: 0.375rem 0.75rem; font-size: 0.875rem; }
.bible-book:hover { border-color: var(--gold); }
.bible-book.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

.bible-reader { padding-block: 1rem var(--section-space); scroll-margin-top: 5.5rem; }
.bible-card { padding: 1.5rem 1.25rem; }
.bible-heading { text-align: center; font-size: 2.25rem; }
.bible-chapters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem; margin-top: 1.25rem; }
.bible-chapters a { display: grid; place-items: center; min-width: 2.25rem; height: 2.25rem; padding-inline: 0.5rem; border-radius: calc(var(--radius) - 4px); background: var(--secondary); font-size: 0.875rem; }
.bible-chapters a:hover { box-shadow: 0 0 0 1px var(--gold); }
.bible-chapters a.is-active { background: var(--primary); color: var(--primary-foreground); }
.bible-text { margin-top: 2rem; }
/* Bible verse text: chapter, search results and translation comparison. */
.bible-text p, .bible-result-text, .compare-text {
  font-family: 'Literata', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}
/* The note shown for a chapter without text is not a verse. */
.bible-text p.bible-empty { font-family: var(--font-sans); font-size: 1rem; }
.bible-text p { margin-top: 0.5rem; padding-block: 0.05rem; border-radius: 4px; scroll-margin-top: 6rem; }
.bible-text p:target { background: color-mix(in oklab, var(--gold) 30%, transparent); }
.bible-number { margin-right: 0.15rem; padding: 0.1rem 0.25rem; border-radius: 4px; position: relative; top: -0.4em; line-height: 1; font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; color: var(--primary); }
.bible-number:hover { background: var(--primary); color: var(--primary-foreground); }
/* The area that reacts is larger than the number itself; it does not move the text. */
.bible-number::before { content: ""; position: absolute; inset: -0.55rem -0.35rem -0.55rem -0.75rem; }
/* Touch screens and phones: a visible button, and an area about 44px wide and high. */
@media (pointer: coarse), (max-width: 639px) {
  .bible-number { display: inline-block; min-width: 1.75rem; margin-right: 0.35rem; padding: 0.35rem 0.4rem; border-radius: 6px; background: var(--secondary); text-align: center; font-size: 0.8125rem; top: -0.2em; }
  .bible-number::before { inset: -0.65rem -0.45rem -0.65rem -1.1rem; }
}
/* ":target" works without JavaScript; with it, the script marks the selected verse. */
.bible-text.is-scripted p:target:not(.is-selected) { background: none; }
.bible-text p.is-selected { background: color-mix(in oklab, var(--gold) 30%, transparent); }
.bible-compare-hint { margin-top: 0.5rem; text-align: center; font-size: 0.8125rem; }
.bible-verse { border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.bible-verse:hover { background: var(--secondary); }
.compare-title { font-size: 2.25rem; }
.compare-note { margin-top: 1rem; font-size: 0.875rem; }
.compare-language { margin-top: 2.5rem; }
.compare-language > h2 { font-size: 1.875rem; color: var(--primary); }
.compare-language .article-list { margin-top: 1rem; }
.compare-row { border-width: 1px; border-radius: var(--radius); background: var(--card); padding: 1rem 1.25rem; }
.compare-row.is-source { border-color: var(--gold); box-shadow: var(--shadow-soft); }
.compare-name { font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; }
.compare-place { font-size: 0.8125rem; color: var(--primary); white-space: nowrap; }
.compare-place:hover { text-decoration: underline; text-underline-offset: 3px; }
.compare-name-link:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.compare-text { margin-top: 0.5rem; }
.strong-number { font-family: var(--font-sans); font-size: 0.65em; color: var(--muted-foreground); }
button.strong-number { margin: 0; padding: 0; border-radius: 3px; line-height: inherit; cursor: help; vertical-align: baseline; }
button.strong-number:hover, button.strong-number[aria-expanded="true"] { background: var(--secondary); box-shadow: 0 0 0 2px var(--secondary); color: var(--primary); }
/* Dictionary tooltip. bible.js sets its position. */
.strong-tip { position: absolute; z-index: 50; display: flex; flex-direction: column; width: min(22rem, calc(100vw - 16px)); border-width: 1px; border-color: var(--gold); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-soft); font-size: 0.875rem; line-height: 1.5; text-align: left; }
.strong-tip-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0.875rem; border-bottom-width: 1px; background: var(--secondary); border-radius: var(--radius) var(--radius) 0 0; }
.strong-tip-close { padding: 0 0.25rem; font-size: 1.25rem; line-height: 1; }
.strong-tip-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0.625rem 0.875rem; white-space: pre-line; overflow-wrap: anywhere; }
.strong-tip-credit { padding: 0.25rem 0.875rem 0.4rem; border-top-width: 1px; font-size: 0.6875rem; color: var(--muted-foreground); }
.bible-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; font-weight: 600; color: var(--primary); }
.bible-pager a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bible-pager span { opacity: 0.3; }
@media (min-width: 640px) {
  .bible-search-row { flex-direction: row; }
  .bible-filter legend { width: 7.5rem; }
  .bible-panel { padding: 1.5rem; }
  .bible-card { padding: 2.5rem; }
}

/* Status pages */
.status { text-align: center; }
.status-code { font-family: var(--font-display); font-size: 4.5rem; font-weight: 600; color: var(--primary); }

@media (min-width: 640px) {
  .brand-name { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .page-title { font-size: 3.75rem; }
  .section-title { font-size: 3rem; }
  .hero-content { padding-block: 10rem; }
  .hero-title { font-size: 4.5rem; }
  .verse-text { font-size: 1.875rem; }
  .cards-2, .topics { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  :root { --section-space: 4.5rem; }
  .split { grid-template-columns: repeat(2, 1fr); }
}

/* Five menu items need this width; below it the menu button is used. */
@media (min-width: 900px) {
  .header-bar { padding-block: calc(1rem - 2px); }
  .nav-desktop { display: flex; }
  .menu-toggle, .nav-mobile { display: none !important; }
  /* The negative margin keeps the larger mark from making the header taller. */
  .brand-mark { width: calc((2.5rem + 6px) * 1.08 - 4px); height: calc((2.5rem + 6px) * 1.08 - 4px); margin-block: -3px; }
}

@media (min-width: 1024px) {
  .topics { grid-template-columns: repeat(3, 1fr); }
}
