/* ==========================================================================
   Sound An Alarm — public site styles
   Palette: royal blue (#0d47a1) with Cinzel, trumpet gold accents, restrained crimson.
   ========================================================================== */

@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --navy-950: #061a3d;
  --navy-900: #0a2a63;
  --navy-800: #0d47a1;
  --navy-700: #1565c0;
  --navy-100: #e3f2fd;
  --gold-500: #c9a14a;
  --gold-400: #d9b867;
  --gold-100: #f6ecd2;
  --crimson-600: #9e1b1b;
  --crimson-500: #b42323;
  --parchment: #f5f8fc;
  --paper: #ffffff;
  --ink: #1c2a3a;
  --ink-soft: #455a64;
  --ink-faint: #78909c;
  --line: #dbe3ee;
  --blue-600: #1976d2;

  --bg: var(--parchment);
  --surface: var(--paper);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --text-faint: var(--ink-faint);
  --border: var(--line);
  --link: #1565c0;
  --link-hover: var(--crimson-600);
  --accent: var(--gold-500);

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(10, 42, 99, .06), 0 1px 1px rgba(10, 42, 99, .04);
  --shadow: 0 6px 24px -8px rgba(10, 42, 99, .18), 0 2px 6px rgba(10, 42, 99, .06);
  --container: 1180px;
  --narrow: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061430;
    --surface: #0b1f45;
    --text: #e8e9ee;
    --text-soft: #b8bdcc;
    --text-faint: #8a91a6;
    --border: #1c3566;
    --link: #8fb4ff;
    --link-hover: var(--gold-400);
    --shadow: 0 6px 24px -8px rgba(0, 0, 0, .6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--text); margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; }
h3, h4 { font-family: var(--font-body); font-weight: 650; }
p { margin: 0 0 1em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--gold-500); color: var(--navy-950); padding: .6rem 1rem; border-radius: 6px; font-family: var(--font-ui); font-weight: 600; }
.skip-link:focus { top: 1rem; }
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container.narrow, .narrow { max-width: var(--narrow); }
.trap, .hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, color-mix(in srgb, var(--navy-900) 96%, transparent), color-mix(in srgb, var(--navy-800) 96%, transparent));
  backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(201, 161, 74, .25);
}
.header-bar { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(201, 161, 74, .6); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; }
.brand:hover { color: var(--gold-400); }
.site-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .5rem .75rem; border-radius: 6px;
  font-family: var(--font-ui); font-size: .92rem; font-weight: 500;
  color: #d5dbea; text-decoration: none;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.site-nav a[aria-current="page"] { color: var(--gold-400); box-shadow: inset 0 -2px 0 var(--gold-500); border-radius: 6px 6px 0 0; }
.nav-search { display: flex; align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; padding: 0 .3rem 0 .9rem; }
.nav-search input { background: none; border: 0; color: #fff; font: 500 .9rem var(--font-ui); width: 9rem; padding: .45rem 0; }
.nav-search input::placeholder { color: #9aa4bd; }
.nav-search input:focus { outline: none; }
.nav-search:focus-within { border-color: var(--gold-500); }
.nav-search button { background: none; border: 0; color: #c9d0e0; padding: .35rem; cursor: pointer; display: grid; place-items: center; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; width: 44px; height: 40px; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: #fff; margin: 0 auto; position: relative; transition: transform .2s; content: ""; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy-900); flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; border-bottom: 1px solid rgba(201, 161, 74, .3); }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: .8rem .5rem; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .06); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold-500); padding-left: .9rem; }
  .nav-search { margin-top: .75rem; }
  .nav-search input { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(ellipse at 85% 20%, rgba(180, 35, 35, .45), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(201, 161, 74, .22), transparent 50%),
    linear-gradient(180deg, var(--navy-950), var(--navy-800));
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  border-bottom: 3px solid var(--gold-500);
}
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px); background-size: 120px 120px; opacity: .12; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1rem, 4vw, 3rem); }
.hero-art { width: clamp(84px, 12vw, 150px); height: clamp(84px, 12vw, 150px); border-radius: 50%; object-fit: cover; border: 2px solid rgba(201, 161, 74, .7); box-shadow: 0 0 0 6px rgba(201, 161, 74, .12), 0 20px 40px rgba(0, 0, 0, .4); }
.hero-text { text-align: center; }
.eyebrow { font-family: var(--font-ui); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-400); margin-bottom: .6rem; }
.hero-title { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 0 0 1rem; text-shadow: 0 2px 30px rgba(201, 161, 74, .35); }
.hero-verse { margin: 0 auto; max-width: 46rem; }
.hero-verse p { font-style: italic; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.6; color: #e6e9f2; margin-bottom: .5rem; }
.hero-verse cite { font-family: var(--font-display); font-style: normal; font-size: .95rem; letter-spacing: .1em; color: var(--gold-400); }
@media (max-width: 640px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

/* ---------- Banners and layout ---------- */
.site-main { min-height: 50vh; padding-bottom: 4rem; }
.page-banner { background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); color: #fff; padding: clamp(2rem, 5vw, 3.5rem) 0; border-bottom: 3px solid var(--gold-500); margin-bottom: 2.5rem; }
.page-banner h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 .4rem; }
.page-banner .lede { color: #cdd4e4; max-width: 40rem; margin: 0; }
.page-banner .crumbs a { color: var(--gold-400); }
.lede { font-size: 1.2rem; color: var(--text-soft); }
.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; margin-top: 2.5rem; }
.page-banner + .layout-split { margin-top: 0; }
@media (max-width: 980px) { .layout-split { grid-template-columns: 1fr; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .6rem; margin: 0 0 1.5rem; }
.section-title { font-size: clamp(1.3rem, 2.4vw, 1.65rem); margin: 0; }
.section-title a { color: inherit; text-decoration: none; }
.section-title a:hover { color: var(--link-hover); }
.section-link, .section-count { font-family: var(--font-ui); font-size: .9rem; font-weight: 500; white-space: nowrap; color: var(--text-faint); }
.section-link { color: var(--link); text-decoration: none; }
.empty { color: var(--text-faint); font-style: italic; }

/* ---------- Cards ---------- */
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-card-title { font-size: 1.2rem; line-height: 1.35; margin: 0 0 .5rem; }
.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a:hover { color: var(--link-hover); }
.post-card-excerpt { color: var(--text-soft); font-size: 1rem; line-height: 1.6; flex: 1; }
.meta { font-family: var(--font-ui); font-size: .8rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 .5rem; }
.tag { display: inline-block; color: var(--crimson-600); text-decoration: none; }
@media (prefers-color-scheme: dark) { .tag { color: var(--gold-400); } }
.read-more { font-family: var(--font-ui); font-weight: 600; font-size: .9rem; text-decoration: none; margin-top: .25rem; }
.post-card--lead { margin-bottom: 1.75rem; border-top: 4px solid var(--gold-500); }
.post-card--lead .post-card-body { padding: 1.8rem 2rem 2rem; }
.post-card--lead .post-card-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); }
.post-card--lead .post-card-excerpt { font-size: 1.12rem; }
.post-card--row { flex-direction: row; }
.post-card--row .post-card-media { flex: 0 0 34%; }
.post-card--row .post-card-media img { height: 100%; aspect-ratio: auto; min-height: 180px; }
@media (max-width: 640px) { .post-card--row { flex-direction: column; } }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.post-list { display: grid; gap: 1.5rem; }

/* ---------- Library ---------- */
.library-teaser { margin-top: 3.5rem; }
.topic-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.topic-grid a { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--navy-700); border-radius: var(--radius); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.topic-grid a:hover { border-left-color: var(--gold-500); box-shadow: var(--shadow); }
.topic-name { font-family: var(--font-display); font-weight: 600; color: var(--text); line-height: 1.3; }
.topic-count { font-family: var(--font-ui); font-size: .8rem; color: var(--text-faint); }
.topic-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.topic-chips a { font-family: var(--font-ui); font-size: .88rem; font-weight: 500; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.topic-chips a:hover { border-color: var(--gold-500); color: var(--link-hover); }
.topic-block { margin-bottom: 3rem; scroll-margin-top: 90px; }
.topic-desc { color: var(--text-soft); margin-top: -.75rem; }
.article-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.article-grid a { display: flex; align-items: flex-start; gap: .75rem; padding: .95rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; line-height: 1.45; height: 100%; transition: border-color .2s, box-shadow .2s; }
.article-grid a:hover { border-color: var(--gold-500); box-shadow: var(--shadow-sm); color: var(--link-hover); }
.article-mark { color: var(--gold-500); font-size: 1.1rem; line-height: 1.3; }
.banner-search { display: flex; gap: .5rem; margin-top: 1.5rem; max-width: 34rem; }
.banner-search input { flex: 1; font: 1rem var(--font-ui); padding: .8rem 1rem; border-radius: 8px; border: 1px solid transparent; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.widget-title { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--gold-500); }
.widget-book { text-align: center; }
.widget-book img { max-width: 170px; border-radius: 4px; box-shadow: var(--shadow); margin-bottom: 1rem; }
.book-title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.book-blurb { color: var(--text-soft); font-size: .98rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px solid var(--border); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: block; padding: .6rem 0; font-size: 1rem; line-height: 1.4; color: var(--text); text-decoration: none; }
.link-list a:hover, .link-list a[aria-current="page"] { color: var(--link-hover); }
.link-list small { display: block; color: var(--text-faint); font-size: .85rem; margin: -.4rem 0 .5rem; }
.link-list--external a::after { content: " ↗"; color: var(--text-faint); font-size: .85em; }
.widget-more { display: inline-block; margin-top: .75rem; font-family: var(--font-ui); font-size: .9rem; font-weight: 600; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 .95rem var(--font-ui); padding: .7rem 1.2rem; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-gold { background: var(--gold-500); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-400); color: var(--navy-950); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-lg { padding: .9rem 1.6rem; font-size: 1rem; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }

/* ---------- Single post ---------- */
.entry-header { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.crumbs { font-family: var(--font-ui); font-size: .85rem; color: var(--text-faint); margin-bottom: 1rem; }
.crumbs a { color: var(--text-soft); text-decoration: none; }
.crumbs a:hover { color: var(--link-hover); }
.entry-title { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.18; margin-bottom: .75rem; }
.entry-meta { font-family: var(--font-ui); font-size: .9rem; color: var(--text-faint); }
.entry-meta .dot { margin: 0 .35rem; }
.entry-hero { margin: 0 auto 2rem; }
.entry-hero img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.entry-share { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-family: var(--font-ui); font-size: .9rem; margin: 3rem 0 2rem; padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text-faint); }
.entry-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.entry-nav a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); line-height: 1.4; }
.entry-nav a:hover { border-color: var(--gold-500); }
.entry-nav small { display: block; font-family: var(--font-ui); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: .25rem; }
.entry-nav-next { text-align: right; grid-column: 2; }
@media (max-width: 640px) { .entry-nav { grid-template-columns: 1fr; } .entry-nav-next { grid-column: 1; } }
.related { margin-top: 4rem; padding: 3rem 0; background: color-mix(in srgb, var(--navy-100) 45%, var(--bg)); border-top: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { .related { background: #09193a; } }
.related .section-title { margin-bottom: 1.5rem; }

/* ---------- Prose: the article text ---------- */
.prose { font-size: 1.16rem; line-height: 1.78; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-size: 1.65rem; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.32rem; margin: 1.8em 0 .5em; }
.prose h4 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
.prose a { color: var(--link); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose img { border-radius: var(--radius); display: block; margin: 1.5em auto; box-shadow: var(--shadow-sm); }
.prose blockquote { margin: 1.8em 0; padding: 1rem 1.4rem; border-left: 4px solid var(--gold-500); background: color-mix(in srgb, var(--gold-100) 55%, var(--surface)); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; }
@media (prefers-color-scheme: dark) { .prose blockquote { background: #0e2650; } }
.prose blockquote.scripture { font-style: normal; border-left-color: var(--crimson-500); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--crimson-500); }
.prose blockquote.scripture::before { content: "Scripture"; display: block; font: 600 .72rem var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--crimson-500); margin-bottom: .4rem; }
.prose blockquote.callout { font-style: normal; border-left-color: var(--navy-700); background: var(--navy-100); }
@media (prefers-color-scheme: dark) { .prose blockquote.callout { background: #0b3378; } }
.prose blockquote p + p { margin-top: .6em; }
.prose hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-500), transparent); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .98rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--navy-100); font-family: var(--font-ui); font-size: .9rem; }
@media (prefers-color-scheme: dark) { .prose th { background: #0b3378; } }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }
.prose figure { margin: 1.8em 0; }
.prose figcaption { font: .88rem var(--font-ui); color: var(--text-faint); text-align: center; margin-top: .5rem; }
.prose .text-center { text-align: center; }
.prose .text-right { text-align: right; }
.prose .hl-red { color: var(--crimson-600); }
.prose .hl-blue { color: var(--blue-600); }
.prose .hl-gold { background: linear-gradient(transparent 55%, rgba(217, 184, 103, .55) 55%); }
.prose mark { background: rgba(217, 184, 103, .55); color: inherit; padding: 0 .1em; }
@media (prefers-color-scheme: dark) {
  .prose .hl-red { color: #ff8a80; }
  .prose .hl-blue { color: #8fb4ff; }
  .prose .hl-gold { background: none; color: var(--gold-400); }
}

/* ---------- Forms ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.25rem, 4vw, 2rem); box-shadow: var(--shadow-sm); }
.form .field { margin-bottom: 1.25rem; }
.form label { display: block; font: 600 .92rem var(--font-ui); margin-bottom: .4rem; }
.form input[type="text"], .form input[type="email"], .form input[type="search"], .form textarea {
  width: 100%; font: 1.05rem var(--font-body); color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: .75rem .9rem;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201, 161, 74, .25); }
.hint { font: .85rem var(--font-ui); color: var(--text-faint); margin-top: .4rem; }
.notice { border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.5rem; border: 1px solid; }
.notice ul { margin: 0; padding-left: 1.2rem; }
.notice h2 { font-size: 1.25rem; }
.notice-success { background: #ecf7ef; border-color: #9fd3ad; color: #184d27; }
.notice-error { background: #fdeeee; border-color: #efb1b1; color: #7a1717; }
@media (prefers-color-scheme: dark) {
  .notice-success { background: #10301c; border-color: #2c6b3e; color: #bfe8cb; }
  .notice-error { background: #3a1414; border-color: #7a2b2b; color: #ffc9c9; }
}

/* ---------- Search, pagination, errors ---------- */
.result-count { font-family: var(--font-ui); color: var(--text-faint); }
.search-results { list-style: none; padding: 0; }
.search-results li { padding: 1.4rem 0; border-bottom: 1px solid var(--border); }
.search-results h2 { font-family: var(--font-body); font-size: 1.3rem; margin: 0 0 .35rem; }
.search-results h2 a { text-decoration: none; }
.search-results p:last-child { color: var(--text-soft); margin: 0; }
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; margin-top: 2.5rem; font-family: var(--font-ui); }
.page-link { min-width: 2.5rem; text-align: center; padding: .5rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--text); font-size: .92rem; }
.page-link:hover { border-color: var(--gold-500); }
.page-link.is-current { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.page-gap { color: var(--text-faint); }
.error-page { text-align: center; padding: 5rem 0 2rem; }
.error-code { font-family: var(--font-display); font-size: 5rem; line-height: 1; color: var(--gold-500); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #b5bdd0; font-family: var(--font-ui); font-size: .92rem; border-top: 3px solid var(--gold-500); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-brand { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: .6rem; }
.footer-verse { font-family: var(--font-body); font-style: italic; font-size: 1rem; max-width: 30rem; }
.footer-verse span { font-style: normal; color: var(--gold-400); }
.site-footer ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: #d5dbea; text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .08); padding: 1.2rem 0; font-size: .82rem; color: #7f88a0; }
.footer-base p { margin: 0; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- App feel: page transitions, tab bar, safe areas ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
.site-header { view-transition-name: site-header; }
.tabbar { view-transition-name: tabbar; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }
.header-bar { padding-top: env(safe-area-inset-top); }
.container { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
::selection { background: color-mix(in srgb, var(--gold-400) 55%, transparent); }

/* Bottom tab bar on phones (the header menu still holds every page) */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: .3rem max(.4rem, env(safe-area-inset-left)) calc(.3rem + env(safe-area-inset-bottom)) max(.4rem, env(safe-area-inset-right));
    background: color-mix(in srgb, var(--navy-900) 95%, transparent);
    backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid rgba(201, 161, 74, .3);
    box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .45);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    min-height: 52px; border-radius: 12px; text-decoration: none;
    color: #b8c6e3; font: 600 .68rem/1.1 var(--font-ui); letter-spacing: .02em;
    transition: color .15s, background .15s, transform .1s;
  }
  .tabbar a:active { transform: scale(.94); background: rgba(255, 255, 255, .06); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--gold-400); }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.2; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .header-bar { min-height: 58px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 1.02rem; }
  .nav-search { display: none; }
  .post-card--lead .post-card-title { font-size: 1.3rem; }
  .entry-title { font-size: 1.6rem; }
  .post-card--lead .post-card-body { padding: 1.3rem 1.25rem 1.4rem; }
  .site-nav { max-height: calc(100dvh - 58px - 64px - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
  .site-nav a { min-height: 48px; display: flex; align-items: center; }
}

/* Comfortable touch targets */
@media (pointer: coarse) {
  .page-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .topic-chips a { padding: .6rem 1rem; }
  .link-list a { padding: .8rem 0; }
  .btn { min-height: 46px; }
}

/* ---------- Offline page ---------- */
.offline-page { min-height: 100dvh; display: grid; place-items: center; padding: 2rem 1.25rem; background: linear-gradient(180deg, var(--navy-950), var(--navy-800)); color: #fff; }
.offline-card { max-width: 30rem; text-align: center; }
.offline-card img { width: 120px; height: auto; margin-bottom: 1rem; }
.offline-card h1 { color: #fff; font-size: clamp(1.8rem, 6vw, 2.4rem); }
.offline-card p:not(.eyebrow) { color: #d5dbea; }
.offline-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }
.offline-card .btn { background: var(--gold-500); color: var(--navy-950); }
.offline-card .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .sidebar, .entry-share, .entry-nav, .related, .hero-art, .tabbar { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
