/* Shared, responsive presentation for Covenant Press and the Free Bible Project. */
:root {
  --ink: #252328;
  --muted: #646068;
  --paper: #ffffff;
  --surface: #f6f5f3;
  --line: #e3dfdb;
  --brand: #722630;
  --deep: #29151b;
  --gold: #a27b37;
  --gold-light: #ead8ab;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.75 var(--sans); }
body.bibles { --brand: #235b49; --deep: #102f27; --gold: #9b7835; --surface: #f4f7f5; }
[hidden] { display: none !important; }
.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; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--gold); }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
img { max-width: 100%; height: auto; }
svg { display: inline-block; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -6rem; padding: .6rem 1rem; color: white; background: var(--deep); }
.skip-link:focus { top: 1rem; }
.container { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.utility { background: var(--deep); color: #f0e9e2; font-size: .82rem; }
.utility .container { display: flex; justify-content: space-between; align-items: center; min-height: 39px; }
.utility a { color: inherit; text-decoration: none; }
.utility nav, .social-links { display: flex; gap: 1.6rem; align-items: center; }
.utility a:hover { color: var(--gold-light); }
.site-header { background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { min-height: 104px; display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--deep); flex-shrink: 0; }
.brand img { width: 58px; height: 58px; object-fit: contain; }
.brand-name { font: small-caps 1.65rem/1.05 var(--serif); letter-spacing: .025em; }
.bibles .brand-name { font-variant: normal; font-size: 1.45rem; }
.brand-name small { display: block; font: .65rem/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.primary-nav { margin-left: auto; }
.primary-nav > ul { display: flex; align-items: center; gap: 1.7rem; list-style: none; padding: 0; margin: 0; }
.primary-nav a { font-size: .9rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.primary-nav a:hover, .primary-nav a[aria-current='page'] { color: var(--brand); }
.primary-nav a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .65rem; }
.nav-group { position: relative; display: flex; align-items: center; gap: .25rem; }
.nav-group details > summary { list-style: none; padding: .5rem .15rem; line-height: 1; }
summary::-webkit-details-marker { display: none; }
.nav-group details > summary::after { content: ''; display: block; width: 6px; height: 6px; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg); }
.nav-group details ul { position: absolute; top: 100%; left: -.8rem; min-width: 240px; list-style: none; padding: .7rem; margin: .7rem 0 0; background: white; border: 1px solid var(--line); box-shadow: 0 14px 35px #0002; }
.nav-group details li a { display: block; padding: .5rem .7rem; }
.nav-group details li a:hover { background: var(--surface); }
.header-tools { position: relative; flex-shrink: 0; display: flex; gap: .5rem; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); border-radius: 50%; }
.icon-button:hover, .icon-button[aria-expanded='true'] { background: var(--brand); color: white; border-color: var(--brand); }
#menu-toggle { display: none; }
.search-panel { position: absolute; right: 0; top: calc(100% + 15px); width: min(440px, calc(100vw - 48px)); max-height: calc(100dvh - 155px); overflow-y: auto; overscroll-behavior: contain; background: white; border: 1px solid var(--line); border-top: 3px solid var(--gold); box-shadow: 0 18px 50px #1b141b28; padding: 1.3rem; }
.search-panel label { display: block; font-weight: 600; margin-bottom: .6rem; }
.search-input-row { display: flex; gap: .5rem; }
input[type='search'], input[type='text'], input[type='email'], textarea { background: white; color: var(--ink); border: 1px solid #b7b3b0; padding: .7rem .9rem; min-width: 0; border-radius: 2px; }
input[type='search'] { width: 100%; }
.search-input-row button, .button, .contact-form button { display: inline-block; border: 1px solid var(--brand); background: var(--brand); color: white; padding: .7rem 1rem; text-decoration: none; font-size: .9rem; font-weight: 600; text-align: center; }
.button:hover, .search-input-row button:hover, .contact-form button:hover { background: var(--deep); color: white; }
#search-suggestions:empty { display: none; }
#search-suggestions { max-height: 65vh; overflow-y: auto; margin-top: .8rem; font-size: .9rem; }
#search-suggestions a { display: block; padding: .7rem 0; text-decoration: none; border-top: 1px solid var(--line); }
.hero { position: relative; isolation: isolate; background: var(--deep); color: white; min-height: 470px; display: grid; align-items: center; text-align: center; overflow: hidden; }
.hero-photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(22,12,17,.8), rgba(22,12,17,.52), rgba(22,12,17,.8)); }
.bibles .hero::after { background: linear-gradient(90deg, #09271fe8, #102f2780, #09271fde); }
.hero-content { max-width: 880px; margin: 3rem auto; padding: 0 25px; }
.hero h1 { font: 4.3rem/1.13 var(--serif); font-weight: normal; margin: 0; letter-spacing: .035em; text-wrap: balance; }
.bibles .hero h1 { font-size: 4.6rem; letter-spacing: -.025em; }
.hero-rule { width: min(440px, 70%); height: 1px; margin: 1.8rem auto; background: linear-gradient(90deg, transparent, var(--gold-light), transparent); }
.hero p { max-width: 760px; font: 1.3rem/1.65 var(--serif); margin: 0 auto; text-wrap: balance; }
.section-heading { text-align: center; font: 2.2rem/1.3 var(--serif); font-weight: normal; margin: 0 0 2.5rem; }
.section-heading::after { content: ''; display: block; width: 52px; height: 2px; background: var(--gold); margin: 1.2rem auto 0; }
.home-main { padding-block: 4.5rem 5rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.content-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: white; transition: border-color .2s, box-shadow .2s; }
.content-card:hover { border-color: var(--gold); box-shadow: 0 9px 27px #251a1a0c; }
.card-image { display: block; height: 210px; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.card-image img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; transition: transform .3s; }
.covenant .home-main .card-image img { object-fit: cover; padding: 0; }
.content-card:hover .card-image img { transform: scale(1.035); }
.bibles .card-image { height: 270px; background: radial-gradient(ellipse at center, #fff, #e9eeeb); }
.card-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; align-items: start; }
.card-body h2, .card-body h3 { font: 1.45rem/1.35 var(--serif); margin: 0 0 1rem; font-weight: normal; }
.card-body h2 a, .card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body p { color: var(--muted); font-size: .95rem; margin: 0 0 1.4rem; }
.card-body .read-more { margin-top: auto; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: .2rem; }
.page-mast { padding-block: 3rem 3.2rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .82rem; margin-bottom: 1.3rem; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb span + span::before { content: '/'; padding-right: .5rem; color: #8f8a85; }
.page-mast h1 { font: 3.05rem/1.2 var(--serif); font-weight: normal; margin: 0; max-width: 990px; text-wrap: balance; }
.article-meta { font-size: .8rem; color: var(--muted); margin-top: 1.2rem; }
.content-layout { display: grid; grid-template-columns: minmax(0, 800px) minmax(200px, 280px); gap: 5rem; padding-block: 3.5rem 5rem; align-items: start; }
.article-body { min-width: 0; font-size: 1.06rem; line-height: 1.85; overflow-wrap: break-word; }
.article-body p { margin: 0 0 1.4em; }
.article-body h2 { font: 1.9rem/1.3 var(--serif); margin: 2.5rem 0 1rem; }
.article-body h3 { font: 1.5rem/1.4 var(--serif); }
.article-body > .post-body { display: contents; }
.article-body > div, .article-body .separator { max-width: 100%; }
.article-body .separator { margin-block: .5rem; }
.article-body .separator > a { margin-inline: 0 !important; }
.article-body img { display: inline-block; max-height: 650px; object-fit: contain; }
.article-body > .separator:first-child img, .article-body > .post-body > .separator:first-child img { max-height: 460px; }
.article-body hr { clear: both; height: 1px; border: none; background: var(--line); margin: 2rem 0; }
.article-body blockquote { margin: 1.7rem 0; padding: 1.3rem 1.6rem; border-left: 3px solid var(--gold); background: var(--surface); }
.article-body iframe { max-width: 100%; border: 0; aspect-ratio: 16/9; height: auto; min-height: 220px; }
.article-body table { max-width: 100%; }
.article-body table img { width: auto; height: auto; max-height: 240px; }
.article-body table.tr-caption-container { width: 100%; border: 1px solid var(--line); background: var(--surface); padding: 1.5rem; border-spacing: 0; margin-block: 1.5rem; }
.tr-caption { padding-top: .8rem; font-size: 1rem; }
.article-body ul { padding-left: 1.5rem; }
.article-body li { margin-block: .4rem; }
.getlsv ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; padding: 0; list-style: none; }
.getlsv li { margin: 0; border: 1px solid var(--line); padding: .7rem; background: white; font-size: .94rem; }
.getlsv li a { text-decoration: none; font-weight: 600; }
.getlsv .print-format { background: #8a5c20; color: white; border-radius: 2px; padding: .15rem .35rem; }
.article-body .getlsv li span { font-size: inherit !important; }
.article-body .press-list { display: flex; flex-wrap: wrap; gap: .75rem 1.2rem; }
.article-sidebar { border-top: 3px solid var(--gold); padding-top: 1.2rem; }
.article-sidebar h2 { font: 1.45rem/1.4 var(--serif); margin-top: 0; }
.article-sidebar ul { list-style: none; padding: 0; margin: 0 0 2rem; }
.article-sidebar li { border-bottom: 1px solid var(--line); }
.article-sidebar li a { display: block; padding: .7rem 0; font-size: .9rem; text-decoration: none; }
.sidebar-feature { display: block; text-decoration: none; margin-bottom: 2rem; }
.sidebar-feature img { max-height: 210px; object-fit: contain; width: 100%; background: var(--surface); }
.sidebar-feature span { display: block; font: 1.2rem/1.4 var(--serif); padding-top: .7rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; }
.tags a { border: 1px solid var(--line); font-size: .78rem; padding: .2rem .7rem; text-decoration: none; }
.rating { display: flex; justify-content: center; gap: .45rem; margin: 2rem 0; }
.rating svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 1px #5038164d); }
.rating.small { justify-content: start; margin: 0 0 .8rem; gap: .2rem; }
.rating.small svg { width: 23px; height: 23px; }
.review-cover { display: block; margin: 0 auto 2rem; max-height: 430px !important; }
.disclosure { padding: 1.1rem 1.3rem; background: var(--surface); border-left: 3px solid var(--gold); font-size: .92rem; }
.footer { padding-top: 3.5rem; background: var(--deep); color: #e8e0dc; border-top: 4px solid var(--gold); }
.footer a { color: #e8e0dc; text-decoration: none; }
.footer a:hover { color: var(--gold-light); }
.footer-grid { display: grid; grid-template-columns: 1fr 1.5fr .8fr; gap: 4.5rem; padding-bottom: 3rem; }
.footer h2 { color: white; font: 1.45rem/1.4 var(--serif); margin: 0 0 1.3rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .65rem; font-size: .88rem; line-height: 1.6; }
.footer-excerpt { font-size: .8rem; color: #bfb4b0; margin: .25rem 0 1rem; }
.footer .social-links { justify-content: center; border-top: 1px solid #ffffff20; border-bottom: 1px solid #ffffff20; padding-block: 1.2rem; gap: 2rem; font-size: .85rem; }
.copyright { padding: 1.3rem 0; color: #cfc5c1; text-align: center; font-size: .8rem; }
.copyright p { margin: 0; }
.search-page { max-width: 850px; padding-block: 3rem 5rem; }
.search-page form { margin-bottom: 2rem; }
.search-result { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.search-result h2 { font: 1.5rem/1.4 var(--serif); margin: 0 0 .5rem; }
.search-result p { margin: .4rem 0; color: var(--muted); }
.search-result a { text-decoration: none; }
mark { color: inherit; background: #e8d6a7; padding-inline: .1rem; }
.contact-form { max-width: 600px; margin: 2.5rem auto 0; border-top: 1px solid var(--line); padding-top: 2rem; }
.contact-form label { display: block; font-weight: 600; margin-top: 1rem; }
.contact-form input, .contact-form textarea { width: 100%; }
.contact-form textarea { min-height: 180px; }
.contact-form .form-note { color: var(--muted); font-size: .85rem; margin: .8rem 0; }
.archive-main { padding-block: 3rem 5rem; }
@media (min-width: 1100px) {
  .catalog .article-body { column-count: 2; column-gap: 1.5rem; }
  .catalog .article-body > .separator:first-child { column-span: all; }
  .catalog .article-body table { break-inside: avoid; }
}
@media (max-width: 1100px) {
  .header-row { gap: 1.1rem; }
  .primary-nav > ul { gap: 1rem; }
  .brand-name { font-size: 1.4rem; }
  .brand img { width: 48px; height: 48px; }
  .bibles .brand-name { font-size: 1.2rem; }
  .content-layout { gap: 2.5rem; }
  .footer-grid { gap: 2.5rem; }
}
@media (max-width: 900px) {
  .container { width: calc(100% - 40px); }
  .header-row { min-height: 85px; }
  .header-tools { margin-left: auto; }
  #menu-toggle { display: grid; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: white; border-bottom: 1px solid var(--line); padding: .7rem 20px; box-shadow: 0 12px 20px #0001; }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul { display: block; }
  .primary-nav > ul > li { border-bottom: 1px solid var(--line); padding: .65rem 0; }
  .primary-nav > ul > li:last-child { border-bottom: 0; }
  .nav-group { flex-wrap: wrap; }
  .nav-group details { margin-left: auto; }
  .nav-group details ul { right: 0; left: auto; z-index: 2; }
  .hero { min-height: 420px; }
  .hero h1, .bibles .hero h1 { font-size: 3.6rem; }
  .card-grid { gap: 1rem; }
  .card-body { padding: 1.2rem; }
  .card-body h2, .card-body h3 { font-size: 1.3rem; }
  .content-layout { grid-template-columns: minmax(0,1fr); }
  .article-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
  .sidebar-feature { grid-column: 1 / -1; max-width: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid section:last-child { grid-column: 1 / -1; }
  .footer-grid section:last-child ul { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .utility .social-links { display: none; }
  .utility .container { justify-content: center; min-height: 34px; }
  .utility nav { gap: 2rem; }
  .brand { gap: .5rem; }
  .brand-name { font-size: 1.22rem; }
  .brand-name small { font-size: .55rem; letter-spacing: .12em; }
  .brand img { width: 42px; height: 42px; }
  .bibles .brand-name { font-size: 1.12rem; }
  .header-row { min-height: 77px; gap: .5rem; }
  .icon-button { width: 36px; height: 36px; }
  .header-tools { gap: .35rem; }
  .hero { min-height: 390px; }
  .hero h1, .bibles .hero h1 { font-size: clamp(2.4rem, 9vw, 3.4rem); }
  .hero p { font-size: 1.12rem; line-height: 1.65; }
  .hero-content { margin-block: 2.5rem; padding-inline: 20px; }
  .home-main { padding-block: 3rem; }
  .section-heading { font-size: 1.8rem; }
  .card-grid { grid-template-columns: minmax(0,1fr); gap: 1.4rem; }
  .card-image { height: 205px; }
  .bibles .card-image { height: 255px; }
  .card-body { padding: 1.5rem; }
  .card-body h2, .card-body h3 { font-size: 1.55rem; }
  .page-mast { padding-block: 1.7rem 2rem; }
  .page-mast h1 { font-size: 2.15rem; overflow-wrap: anywhere; }
  .content-layout { padding-block: 2rem 3rem; gap: 2rem; }
  .article-body { font-size: 1rem; }
  .getlsv ul { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
  .getlsv li { padding: .6rem; }
  .article-body iframe { min-height: 170px; }
  .article-sidebar { display: block; }
  .footer { padding-top: 2.5rem; }
  .footer-grid { gap: 2rem; grid-template-columns: 1fr; }
  .footer-grid section:last-child { grid-column: auto; }
  .footer .social-links { flex-wrap: wrap; gap: .6rem 1.3rem; }
  .copyright { line-height: 1.8; }
  .rating svg { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (max-width: 360px) {
  .brand-name, .bibles .brand-name { font-size: 1rem; }
  .brand img { width: 34px; height: 34px; }
  .brand { gap: .35rem; }
  .icon-button { width: 32px; height: 32px; }
}
