/* NakarYahu — white/black canvas, dark red primary, gold minor accents */
/* layout-v: 2026-08-04-sitemap-columns */
:root {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-muted: #f5f5f5;
  --text: #1a1a1a;
  --text-muted: #555555;
  --heading: #501515;
  /* Dark red primary (title bars, headings, filled buttons, body accents) */
  --accent: #501515;
  --accent-deep: #3a0f0f;
  --accent-soft: #6b2020;
  --on-accent: #ffffff;
  /* Gold secondary (dividers, outlines, subtle highlights) */
  --gold: #b08d3a;
  --gold-soft: #c9a84c;
  --link: #501515;
  --link-hover: #7a2020;
  --border: #e6e6e6;
  --border-strong: #cccccc;
  --scripture: #2a1515;
  --scripture-bg: rgba(80, 21, 21, 0.04);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(80, 21, 21, 0.06);
  --radius: 10px;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  /* Content fills the main column up to the discover rail (no stranded right gutter) */
  --content-max: 100%;
  /* Modest side inset; shell uses nearly the full viewport on desktop */
  --page-pad: clamp(0.55rem, 1vw, 1rem);
  --page-max: min(calc(100% - (var(--page-pad) * 2)), 120rem);
  --aside-w: clamp(14.5rem, 15vw, 18rem);
  --header-h: 4.5rem;
  /* Back-compat aliases used across the stylesheet */
  --royal: var(--accent);
  --royal-deep: var(--accent-deep);
  --crimson: var(--accent);
  /* Legacy ornamental bullets (sitemap / section marks) — relative to this CSS file */
  --ny-bullet: url("../images/ny-bullet.png");
  --ny-bullet-sm: url("../images/ny-bullet-small.png");
  --ny-li: url("../images/ny-li-small.png");
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #0c0c0c;
  --bg-muted: #141414;
  --text: #f2f2f2;
  --text-muted: #a8a8a8;
  --heading: #e8c8c8;
  --accent: #8b2a2a;
  --accent-deep: #000000;
  --accent-soft: #a83838;
  --on-accent: #ffffff;
  --gold: #d4bc6a;
  --gold-soft: #e0c878;
  --link: #e8a0a0;
  --link-hover: #f0c4c4;
  --border: #2a2a2a;
  --border-strong: #3d3d3d;
  --scripture: #f0e0e0;
  --scripture-bg: rgba(139, 42, 42, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
  --royal: var(--accent);
  --royal-deep: #0a0a0a;
  --crimson: var(--accent);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-serif);
  font-size: clamp(1.02rem, 0.35vw + 0.95rem, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
body.nav-open,
body.aside-open {
  overflow: hidden;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--heading);
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--on-accent); padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ========== Header (one row: logo · nav · tools) ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom: 2px solid var(--gold);
}
.header-inner {
  width: var(--page-max);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.45rem 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
}
.site-header a { text-decoration: none; color: var(--on-accent); }
.site-header a:hover { color: var(--gold-soft); }

.site-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  line-height: 0;
  padding: 0.15rem 0.1rem;
  border-radius: 0;
  background: transparent;
  border: 0;
  max-width: min(13.5rem, 42vw);
}
.site-logo:hover { opacity: 0.94; color: inherit; }
.site-logo-img {
  display: block;
  width: auto;
  height: clamp(2.7rem, 5vw, 3.55rem);
  max-width: 100%;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: normal;
}
.site-logo-text {
  display: inline-block;
  text-align: left;
  line-height: 1.15;
  color: var(--gold-soft);
  font-family: var(--font-serif);
  padding: 0.1rem;
}
.site-logo-text strong { display: block; font-size: 1.15rem; letter-spacing: 0.03em; }
.site-logo-text span { display: block; font-size: 0.78rem; font-style: italic; opacity: 0.9; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  order: 3;
}
.nav-toggle,
.aside-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--on-accent);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle:hover,
.aside-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.08rem 0.12rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.84rem, 0.28vw + 0.76rem, 0.96rem);
  font-weight: 700;
  letter-spacing: 0.005em;
}
.site-nav-head,
.nav-search,
.nav-close { display: none; }
.site-nav a {
  padding: 0.3rem 0.34rem;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.site-nav a:hover {
  color: var(--gold-soft);
  background: rgba(255, 255, 255, 0.1);
}
.site-nav a[aria-current="page"],
.site-nav a.is-active {
  border-bottom-color: var(--gold);
  color: var(--gold-soft);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(176, 141, 58, 0.45);
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  order: 2;
  margin-left: auto;
}
.site-nav { order: 1; }
.site-logo { order: 0; }
.nav-backdrop,
.aside-backdrop {
  display: none;
}

/* Icon theme toggle (system → dark → light) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--on-accent);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon,
.theme-toggle .icon-system { display: none; }
[data-color-mode="system"] .theme-toggle .icon-system { display: block; }
[data-color-mode="light"] .theme-toggle .icon-sun { display: block; }
[data-color-mode="dark"] .theme-toggle .icon-moon { display: block; }
html:not([data-color-mode]) .theme-toggle .icon-system { display: block; }

.admin-theme-wrap { margin-top: 1rem; }
.admin-theme-toggle.theme-toggle {
  color: var(--on-accent);
  border-color: var(--gold);
}
.search-mini form { display: flex; gap: 0.2rem; }
.search-mini input {
  width: clamp(6.25rem, 8vw, 8.5rem);
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: rgba(0, 0, 0, 0.18);
  color: var(--on-accent);
  padding: 0.3rem 0.55rem;
  font: inherit;
  font-size: 0.82rem;
}
.search-mini input::placeholder { color: rgba(255, 255, 255, 0.65); }
.search-mini button {
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--on-accent);
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}
.search-mini button:hover {
  background: var(--gold);
  color: #1a1010;
}

/* ========== Main shell: content + discover rail ========== */
.site-shell {
  width: var(--page-max);
  margin: 0 auto;
  padding: clamp(0.85rem, 2vw, 1.5rem) 0 clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  flex: 1 0 auto;
  align-items: start;
}
.site-shell.no-aside {
  grid-template-columns: 1fr;
  /* Single-column pages still use most of the width, without ultra-wide stretch on 4K */
  max-width: min(var(--page-max), 72rem);
}
.content-col {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0; /* panels keep their own margins */
}
/* Home + list panels fill the content column edge-to-edge (up to the discover rail) */
.content-col > .panel,
.content-col > .home-split {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.aside-col {
  font-size: 0.92rem;
  font-family: var(--font-sans);
  min-width: 0;
}
.aside-head { display: none; }

/* Desktop / laptop: sticky side rail uses spare width */
@media (min-width: 960px) {
  .site-shell:not(.no-aside) {
    grid-template-columns: minmax(0, 1fr) var(--aside-w);
  }
  .aside-col {
    position: sticky;
    top: calc(var(--header-h) + 0.65rem);
    max-height: calc(100dvh - var(--header-h) - 1.25rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 0.15rem;
  }
  .aside-toggle { display: none !important; }
}

/* Desktop: never wrap the top nav; free horizontal room for all labels */
@media (min-width: 960px) {
  .site-nav {
    flex-wrap: nowrap;
    overflow: visible;
  }
  .header-inner {
    flex-wrap: nowrap;
  }
}

/* Wide screens: slightly wider rail; keep nav on one row */
@media (min-width: 1280px) {
  :root {
    --aside-w: clamp(15.5rem, 14.5vw, 18rem);
  }
  .site-nav { gap: 0.1rem 0.18rem; font-size: 0.95rem; }
  .site-nav a { padding: 0.32rem 0.38rem; }
  .site-logo { max-width: min(14rem, 22vw); }
  .site-logo-img { height: clamp(2.9rem, 4.2vw, 3.6rem); }
}

/* Mid widths: tighter chrome so all nav labels stay one row */
@media (max-width: 1279px) and (min-width: 960px) {
  .site-nav { font-size: 0.8rem; gap: 0.05rem 0.08rem; }
  .site-nav a { padding: 0.26rem 0.26rem; }
  .site-logo { max-width: min(11.5rem, 24vw); }
  .site-logo-img { height: clamp(2.5rem, 4vw, 3.1rem); }
  .search-mini input { width: 5.75rem; }
  .header-inner { gap: 0.3rem 0.45rem; }
}

/* Tablet & phone: drawers for nav + discover */
@media (max-width: 959px) {
  .nav-toggle,
  .aside-toggle { display: inline-block; }
  .header-tools { display: none; }
  .header-actions { margin-left: auto; order: 1; }
  .site-logo { order: 0; }

  .site-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(20rem, 88vw);
    max-width: 100%;
    background: var(--accent);
    color: var(--on-accent);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1.5rem;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 60;
    overflow: auto;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-sans);
    font-weight: 700;
    padding: 0.25rem 0 0.75rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--gold);
  }
  .nav-close {
    display: inline-flex;
    background: transparent;
    border: 0;
    color: var(--on-accent);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
  }
  .site-nav a {
    padding: 0.85rem 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    white-space: normal;
    font-size: 1.15rem;
    font-weight: 800;
  }
  .site-nav a[aria-current="page"],
  .site-nav a.is-active {
    border-bottom-color: var(--gold);
    color: var(--gold-soft);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
  }
  .nav-search {
    display: flex;
    gap: 0.35rem;
    margin-top: 1rem;
  }
  .nav-search input {
    flex: 1;
    border-radius: 8px;
    border: 1px solid var(--gold);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    padding: 0.5rem 0.65rem;
    font: inherit;
  }
  .nav-search button {
    border-radius: 8px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #1a1010;
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
  }
  body.nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 55;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  .aside-col {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(22rem, 92vw);
    max-height: none;
    background: var(--bg);
    color: var(--text);
    z-index: 60;
    padding: 0.75rem 1rem 1.5rem;
    transform: translateX(105%);
    transition: transform 0.22s ease;
    overflow: auto;
    box-shadow: var(--shadow);
    border-left: 2px solid var(--gold);
  }
  body.aside-open .aside-col { transform: translateX(0); }
  .aside-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gold);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1;
  }
  .aside-title {
    margin: 0;
    font-size: 1rem;
    color: var(--accent);
    font-family: var(--font-sans);
  }
  .aside-close {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
  }
  body.aside-open .aside-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 55;
    border: 0;
    padding: 0;
    cursor: pointer;
  }
}

@media (max-width: 480px) {
  .site-logo { max-width: min(12.5rem, 52vw); padding: 0.1rem 0; }
  .site-logo-img { height: 2.75rem; }
  .nav-toggle, .aside-toggle { padding: 0.4rem 0.65rem; font-size: 0.9rem; }
}

/* Cards / panels */
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(0.95rem, 1.8vw, 1.35rem) clamp(1rem, 2vw, 1.5rem);
  margin-bottom: clamp(0.85rem, 1.5vw, 1.15rem);
}
.panel > h1 {
  color: var(--heading);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--gold);
  margin-top: 0;
}
.panel-title {
  margin: 0 0 .75rem;
  padding: .45rem .75rem .45rem 2.35rem;
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  border-bottom: 1px solid var(--gold);
  border-radius: 6px 6px 0 0;
  font-size: 1.05rem;
  color: var(--on-accent);
  background: var(--accent) var(--ny-bullet) no-repeat 0.55rem 50% / 1.35rem auto;
}
/* Section division mark for long-form body headings (not chrome panel-title bars) */
.section-mark,
.reading > h2,
.reading h2:not(.panel-title),
.panel.reading h2:not(.panel-title),
article.reading h2 {
  padding-left: 2rem;
  background-image: var(--ny-bullet);
  background-repeat: no-repeat;
  background-position: left 0.2em;
  background-size: 1.5rem auto;
}
.reading h3,
.panel.reading h3,
article.reading h3 {
  padding-left: 1.45rem;
  background-image: var(--ny-bullet-sm);
  background-repeat: no-repeat;
  background-position: left 0.35em;
  background-size: 0.95rem auto;
}
/* Long-form reading: fill the content column up to the discover rail */
.reading {
  width: 100%;
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.16rem);
}
/* Article / prophecy bodies share the full content column (no right gutter before aside) */
article.panel.reading,
.panel.reading {
  max-width: var(--content-max);
  width: 100%;
}
.reading p { text-indent: 1.15em; }
.reading p.scripture,
.reading p.quote,
.reading blockquote,
.reading h1, .reading h2, .reading h3, .reading h4,
.reading .meta, .reading .no-indent,
.reading .quote p { text-indent: 0; }

/*
 * Regular quotation — human speech, citations, or “God speaking” in prophecy/dream.
 * Slightly inset so it stands apart from body text.
 */
.reading .quote,
.reading blockquote,
.quote,
blockquote {
  display: block;
  margin: 1.15rem 0.85rem 1.15rem 1.35rem;
  padding: 0.85rem 1.15rem 0.9rem 1.2rem;
  max-width: calc(100% - 1.35rem);
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(176, 141, 58, 0.1), var(--bg-muted) 40%);
  color: var(--text);
  font-style: italic;
  font-size: 0.98em;
  line-height: 1.7;
  box-shadow: inset 0 0 0 1px rgba(176, 141, 58, 0.12);
}
html[data-theme="dark"] .reading .quote,
html[data-theme="dark"] .reading blockquote,
html[data-theme="dark"] .quote,
html[data-theme="dark"] blockquote {
  background: linear-gradient(90deg, rgba(212, 188, 106, 0.12), var(--bg-muted) 45%);
  box-shadow: inset 0 0 0 1px rgba(212, 188, 106, 0.15);
}
.reading .quote > :first-child,
.reading blockquote > :first-child { margin-top: 0; }
.reading .quote > :last-child,
.reading blockquote > :last-child { margin-bottom: 0; }

/*
 * Scripture quotation — Bible text from [[verse:…]].
 * Different from .quote: deeper crimson accent, manuscript feel, not gold-bar speech.
 */
.scripture,
.reading .scripture,
p.scripture {
  display: block;
  margin: 1.2rem 0.35rem 1.2rem 0.65rem;
  padding: 0.9rem 1.1rem 1rem 1.15rem;
  max-width: calc(100% - 0.65rem);
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--scripture);
  background: var(--scripture-bg);
  border-left: 4px solid var(--accent);
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  border-radius: 0 8px 8px 0;
  line-height: 1.75;
  box-shadow: var(--shadow);
}
.scripture .verse-num {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: .72em;
  font-weight: 600;
  color: var(--accent);
  margin-right: .2em;
  vertical-align: super;
  opacity: 0.9;
}
/* Inline parenthetical refs: (Acts 17:11) — no extra space after "(" */
.scripture-ref {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: .9em;
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent);
}
/* Citation after verse text inside a [[verse:]] block only */
.scripture .scripture-ref,
p.scripture .scripture-ref {
  margin-left: .4em;
}
.scripture.scripture--missing {
  opacity: 0.85;
  border-left-style: dashed;
}
a.glossary {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--gold);
}
a.glossary:hover {
  color: var(--link-hover);
  border-bottom-style: solid;
}

.meta {
  font-family: var(--font-sans);
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* List titles + dates */
.content-list { list-style: none; padding: 0; margin: 0; }
.content-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.content-list-item:last-child { border-bottom: 0; }
.content-list-main {
  flex: 1 1 12rem;
  min-width: 0;
}
.content-list-title {
  font-weight: 650;
  font-family: var(--font-sans);
  text-decoration: none;
  color: var(--link);
}
.content-list-title:hover { color: var(--link-hover); }
.content-list-desc {
  margin-top: 0.2rem;
  font-size: 0.9rem;
}
.list-date {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  white-space: nowrap;
}
.list-meta-side {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  flex: 0 0 auto;
}
.list-hits {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.type-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--accent);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  vertical-align: middle;
  white-space: nowrap;
}

/* Detail timestamps */
.content-header {
  margin-bottom: 1.15rem;
}
.content-header h1 {
  margin-bottom: 0.55rem;
}
.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--text-muted);
  padding: 0.55rem 0.75rem;
  border-left: 3px solid var(--gold);
  background: var(--bg-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.content-meta .meta-item {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.45rem;
}
.content-meta .meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.content-meta time,
.content-meta .meta-value {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
@media (max-width: 560px) {
  .content-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .content-meta {
    flex-direction: column;
    gap: 0.4rem;
  }
}
.breadcrumbs {
  font-family: var(--font-sans);
  font-size: .9rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
}
.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: .5rem;
  opacity: .6;
}

.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-plain li {
  padding: .4rem 0 .4rem 1.65rem;
  border-bottom: 1px solid var(--border);
  background: var(--ny-li) no-repeat left 0.55em / 1.05rem auto;
}
.list-plain li:last-child { border-bottom: 0; }
.list-plain .muted { color: var(--text-muted); font-size: .88em; }

/* Nested content lists in article bodies (legacy sitemap/list feel) */
.reading ul,
.discern-block ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
}
.reading ul li,
.discern-block ul li {
  padding: 0.2rem 0 0.2rem 1.55rem;
  margin: 0.15rem 0;
  background: var(--ny-li) no-repeat left 0.35em / 1rem auto;
}
.reading ol {
  padding-left: 1.5rem;
}

/* Site map / category trees — same ornaments as legacy #ny-bullet / #ny-li */
/* Root categories flow in responsive columns so the map fills the content column */
.tree {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1rem;
  width: 100%;
  align-items: start;
  margin: 0.75rem 0 0.25rem;
}
@media (min-width: 640px) {
  .tree {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .tree {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.tree > details.tree-branch {
  margin: 0;
  padding: 0.55rem 0.7rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  min-width: 0;
  break-inside: avoid;
}
.tree details { margin: .35rem 0 .35rem 0; }
.tree summary {
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  padding: 0.35rem 0 0.35rem 2.1rem;
  background: var(--ny-bullet) no-repeat left 0.35em / 1.55rem auto;
  min-height: 1.5rem;
}
.tree summary::-webkit-details-marker { display: none; }
.tree summary::marker { content: ""; }
.tree ul { margin: .25rem 0 .5rem 0.35rem; padding: 0; list-style: none; }
.tree li {
  margin: .15rem 0;
  padding: 0.15rem 0 0.15rem 1.55rem;
  background: var(--ny-li) no-repeat left 0.3em / 1rem auto;
  min-height: 1.25rem;
}
.tree details > .tree,
.tree details > ul { margin-left: 0.75rem; }
/* Nested category branch inside tree */
.tree li.tree-branch {
  padding-left: 0;
  background: none;
  min-height: 0;
}
.tree li.tree-branch > a {
  display: inline-block;
  padding: 0.25rem 0 0.25rem 2.1rem;
  background: var(--ny-bullet) no-repeat left 0.2em / 1.45rem auto;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
/* “Other material” links on the sitemap also use the width */
.sitemap-other-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.25rem;
}
@media (min-width: 640px) {
  .sitemap-other-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .sitemap-other-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.sitemap-other-list > li {
  min-width: 0;
}

.hero {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  max-width: none;
}
.hero-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
/* Greeting + featured copy use the full content column (no stranded right gutter) */
.hero-greeting,
.panel.hero .hero-greeting,
.panel.hero > h1 {
  max-width: none;
  width: 100%;
}
.hero-greeting p:first-child { margin-top: 0; }
.hero-actions { margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.featured-article {
  width: 100%;
  max-width: none;
}
.featured-article .featured-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  font-family: var(--font-sans);
  max-width: none;
}
.featured-article .featured-title a { text-decoration: none; }
.featured-excerpt {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: none;
  width: 100%;
  margin: 0.35rem 0 0.85rem;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr));
  gap: clamp(0.55rem, 1.2vw, 0.85rem);
}
.home-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(0.75rem, 1.5vw, 1rem);
}
.category-card {
  display: block;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  background: var(--bg-muted);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.category-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--gold);
  transform: translateY(-1px);
  color: inherit;
}
.category-card strong {
  display: block;
  font-family: var(--font-sans);
  color: var(--accent);
  margin-bottom: .25rem;
}

.related {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}
.related .panel-title { margin-top: 0; }
.related .list-plain li {
  margin: 0.35rem 0;
}
.related + .related,
.widget-related + .widget-related {
  margin-top: 0.55rem;
}
/* Manual attachments */
.related--direct {
  border-color: var(--gold);
}
/* Automatic keyword suggestions */
.related--possible {
  border-style: dashed;
  opacity: 0.98;
}
.related--possible .panel-title {
  font-weight: 600;
}
/* Right-rail related boxes: top of Discover column when enabled */
.widget-related {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(176, 141, 58, 0.18);
}
.widget-related h3 {
  color: var(--accent);
}
.widget-related.related--possible {
  border-style: dashed;
  box-shadow: none;
}

.discern-block {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gold);
}
.discern-block h3 {
  color: var(--accent);
  font-size: 1.05rem;
}

.gospel-block {
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  background: var(--bg-muted);
}

/* Forms */
label { display: block; font-family: var(--font-sans); font-size: .9rem; margin: .6rem 0 .25rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=number], select, textarea {
  width: 100%;
  max-width: 40rem;
  padding: .55rem .7rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(176, 141, 58, 0.25);
}
textarea { min-height: 12rem; font-family: var(--font-serif); line-height: 1.55; }
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: .55rem 1rem;
  cursor: pointer;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); color: var(--on-accent); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--gold);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  filter: none;
}
.btn-danger { background: var(--accent); border-color: var(--accent); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-family: var(--font-sans);
  font-size: .95rem;
}
.alert-ok { background: rgba(40,120,70,.12); border: 1px solid rgba(40,120,70,.35); }
.alert-err { background: rgba(160,40,40,.12); border: 1px solid rgba(160,40,40,.35); }

/* Collapsible “Email the Author” (content pages + /contact) */
.contact-inline {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}
.contact-collapse {
  margin: 0;
  border: none;
}
.contact-collapse-summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0.15rem 0;
  user-select: none;
}
.contact-collapse-summary::-webkit-details-marker { display: none; }
.contact-collapse-summary::marker { content: ""; }
.contact-collapse-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--heading);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.contact-collapse-title::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  margin-top: -0.15rem;
}
.contact-collapse[open] > .contact-collapse-summary .contact-collapse-title::before {
  transform: rotate(45deg);
  margin-top: 0.1rem;
}
.contact-collapse-hint {
  font-size: 0.88rem;
}
.contact-collapse-body {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.contact-form label {
  display: block;
  margin: 0.65rem 0;
  font-family: var(--font-sans);
  font-size: 0.92rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}
.contact-form .form-actions {
  margin: 1rem 0 0;
}
.contact-subscribe-note {
  margin: 0.5rem 0 1.5rem;
  padding: 0 var(--page-pad);
  max-width: var(--content-max);
}
.main-col .contact-subscribe-note {
  padding: 0;
  max-width: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--gold);
  background: var(--bg-muted);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: .88rem;
  padding: 1.25rem var(--page-pad) 2rem;
  margin-top: auto;
}
.footer-inner {
  width: var(--page-max);
  margin: 0 auto;
  display: grid;
  gap: .65rem;
}
@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
    column-gap: 2rem;
  }
}
.site-footer a { color: var(--accent); }
.site-footer a:hover { color: var(--link-hover); }

/* Aside widgets */
.widget {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem .85rem;
  margin-bottom: .75rem;
}
.widget h3 {
  margin: 0 0 .55rem;
  padding: 0 0 .35rem 1.55rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  border-bottom: 1px solid var(--gold);
  background: var(--ny-bullet-sm) no-repeat left 0.15em / 0.95rem auto;
}
.widget ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.widget li {
  margin: .25rem 0;
  padding: 0.15rem 0 0.15rem 1.45rem;
  background: var(--ny-li) no-repeat left 0.3em / 0.95rem auto;
}
.list-compact {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-compact li {
  padding: .3rem 0 .3rem 1.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .45rem;
  align-items: baseline;
  justify-content: space-between;
  background: var(--ny-li) no-repeat left 0.4em / 0.95rem auto;
}
/* Avoid double bullet when nested under .widget li rules */
.widget .list-compact li {
  background: var(--ny-li) no-repeat left 0.4em / 0.95rem auto;
}
.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.chip {
  display: inline-block;
  padding: .28rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--bg-muted);
  color: var(--accent) !important;
  text-decoration: none !important;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.25;
}
.chip:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  color: var(--link-hover) !important;
}

/* Glossary panel (JS) */
.glossary-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(50vh, 22rem);
  overflow: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  z-index: 50;
  display: none;
}
.glossary-panel.is-open { display: block; }
.glossary-panel h4 {
  margin: 0 1.5rem .5rem 0;
  font-size: 1rem;
  color: var(--accent);
}
.glossary-panel .original { color: var(--gold); font-size: .95rem; margin-bottom: .5rem; }
.glossary-panel .close {
  position: absolute; top: .5rem; right: .6rem;
  border: 0; background: transparent; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer;
}

/* Inline scripture popover (click parenthetical refs) */
.scripture-popover {
  position: fixed;
  z-index: 55;
  width: min(26rem, calc(100vw - 1.25rem));
  max-height: min(55vh, 24rem);
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  font-family: var(--font-serif);
}
.scripture-popover[hidden] {
  display: none !important;
}
.scripture-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  padding: .65rem .75rem .4rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.scripture-popover-head h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 650;
  color: var(--accent);
  line-height: 1.3;
  padding-right: .25rem;
}
.scripture-popover-actions {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex-shrink: 0;
}
.scripture-popover-actions .close,
.scripture-popover-openwin {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: .25rem;
}
.scripture-popover-actions .close {
  font-size: 1.25rem;
  width: 1.75rem;
  height: 1.75rem;
}
.scripture-popover-openwin {
  width: 1.75rem;
  height: 1.75rem;
}
.scripture-popover-actions .close:hover,
.scripture-popover-openwin:hover {
  color: var(--accent);
  background: var(--scripture-bg);
}
.scripture-popover-body {
  overflow: auto;
  padding: .65rem 1rem .5rem;
  flex: 1 1 auto;
  min-height: 0;
}
.scripture-popover-body .scripture,
.scripture-popover-body p.scripture {
  margin: 0;
  padding: .5rem .65rem;
  border-left-width: 3px;
}
.scripture-popover-foot {
  margin: 0;
  padding: .4rem 1rem .55rem;
  font-family: var(--font-sans);
  font-size: .78rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.scripture-popover-foot a {
  font-weight: 600;
}
/* Keep parenthetical refs looking clickable */
a.scripture-ref {
  cursor: help;
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 55%, transparent);
}
a.scripture-ref:hover {
  border-bottom-style: solid;
  color: var(--link-hover);
}

/* Site-wide announcement banner (public pages; LT1-style dismiss) */
.site-banner {
  position: relative;
  z-index: 45;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.45;
  border-bottom: 1px solid transparent;
}
.site-banner-inner {
  width: var(--page-max);
  max-width: 100%;
  margin: 0 auto;
  padding: 0.65rem var(--page-pad);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
}
.site-banner-text {
  margin: 0;
  flex: 1 1 16rem;
}
.site-banner-link {
  margin: 0;
  flex: 0 0 auto;
  font-weight: 650;
}
.site-banner-link a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-banner-dismiss {
  flex: 0 0 auto;
  margin-left: auto;
  appearance: none;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.9;
}
.site-banner-dismiss:hover,
.site-banner-dismiss:focus-visible {
  opacity: 1;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
html.site-banner-dismissed .site-banner,
.site-banner[hidden] {
  display: none !important;
}
.site-banner--info {
  background: #e8f1fb;
  color: #14365c;
  border-bottom-color: #b7cfe8;
}
.site-banner--info a { color: #0b4f8a; }
.site-banner--notice {
  background: #fff6df;
  color: #5c4208;
  border-bottom-color: #e6d29a;
}
.site-banner--notice a { color: #7a5200; }
.site-banner--urgent {
  background: #fde8e8;
  color: #6b1212;
  border-bottom-color: #e5b0b0;
}
.site-banner--urgent a { color: #8b0000; font-weight: 700; }
html[data-theme="dark"] .site-banner--info {
  background: #1a2d42;
  color: #d4e6fa;
  border-bottom-color: #2a4563;
}
html[data-theme="dark"] .site-banner--info a { color: #8ec5ff; }
html[data-theme="dark"] .site-banner--notice {
  background: #3a3014;
  color: #f5e6b8;
  border-bottom-color: #5c4a1a;
}
html[data-theme="dark"] .site-banner--notice a { color: #ffd56a; }
html[data-theme="dark"] .site-banner--urgent {
  background: #3a1818;
  color: #f5c8c8;
  border-bottom-color: #5c2a2a;
}
html[data-theme="dark"] .site-banner--urgent a { color: #ff9a9a; }

/* Public external links page */
.links-list {
  margin: 1.25rem 0 0;
  padding: 0;
}
.links-list-item {
  margin: 0 0 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  list-style: none;
}
.links-list-item:last-child {
  border-bottom: 0;
}
.links-list-item > a {
  font-weight: 600;
  font-size: 1.05rem;
}
.links-list-desc {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
}

/* Admin */
.admin-body {
  font-family: var(--font-sans);
  font-size: 1rem;
  margin: 0;
}
.admin-topbar {
  display: none;
}
.admin-nav-backdrop {
  display: none;
}
.admin-shell {
  display: grid;
  grid-template-columns: 14rem 1fr;
  min-height: 100vh;
}
.admin-nav {
  background: var(--accent);
  color: var(--on-accent);
  padding: 1rem;
  border-right: 2px solid var(--gold);
  overflow-y: auto;
}
.admin-nav-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.admin-nav-brand { margin: 0 0 0.35rem; }
.admin-nav-brand a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.admin-nav-brand a:hover { color: var(--gold-soft); }
.admin-nav-sub { opacity: 0.8; font-size: 0.9rem; }
.admin-nav-close {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--on-accent);
  border-radius: 8px;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-nav a {
  color: var(--on-accent);
  display: block;
  padding: 0.45rem 0.15rem;
  text-decoration: none;
  border-radius: 6px;
}
.admin-nav a:hover { color: var(--gold-soft); }
.admin-nav-hr,
.admin-nav hr {
  border: 0;
  border-top: 1px solid var(--gold);
  opacity: 0.5;
  margin: 0.75rem 0;
}
.admin-logout-form { margin: 0.35rem 0 0; }
.admin-theme-wrap--nav { margin-top: 1rem; }
.admin-main {
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  color: var(--text);
  min-width: 0; /* allow tables to scroll inside grid */
}
.admin-main h1 { color: var(--heading); margin-top: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: .45rem .35rem;
  vertical-align: top;
}
.admin-table th {
  color: var(--accent);
  border-bottom-color: var(--gold);
}
/* Wide tables on small screens */
.admin-main .admin-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin-bottom: .4rem;
}
.editor-toolbar button {
  font-family: var(--font-sans);
  font-size: .85rem;
  border: 1px solid var(--gold);
  background: var(--bg-muted);
  color: var(--text);
  border-radius: 6px;
  padding: .3rem .55rem;
  cursor: pointer;
}
.editor-toolbar button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.login-wrap {
  max-width: 22rem;
  margin: 4rem auto;
  padding: 1.5rem;
}

/* Mobile admin: content first; nav is a drawer */
@media (max-width: 900px) {
  .admin-topbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 3.25rem;
    padding: 0.45rem 0.75rem;
    background: var(--accent);
    color: var(--on-accent);
    border-bottom: 2px solid var(--gold);
  }
  .admin-topbar-title {
    font-weight: 700;
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--on-accent);
    text-decoration: none;
  }
  .admin-topbar-title:hover {
    color: var(--gold-soft);
    text-decoration: underline;
  }
  .admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
  .admin-menu-btn {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.15);
    color: var(--on-accent);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
  }
  .admin-menu-btn:hover {
    border-color: var(--gold-soft);
  }
  .admin-shell {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 3.25rem);
  }
  .admin-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.45);
    border: 0;
    padding: 0;
    cursor: pointer;
  }
  .admin-nav-backdrop[hidden] {
    display: none !important;
  }
  .admin-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(18rem, 86vw);
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    border-right: 2px solid var(--gold);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    padding-bottom: 2rem;
  }
  body.admin-nav-open .admin-nav {
    transform: translateX(0);
  }
  body.admin-nav-open {
    overflow: hidden;
  }
  .admin-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* Theme control lives in the sticky top bar on mobile */
  .admin-theme-wrap--nav {
    display: none;
  }
  .admin-main {
    padding: 1rem 0.9rem 2rem;
  }
  .admin-main h1 {
    font-size: 1.35rem;
  }
}

.embed-scripture {
  margin: 0;
  padding: 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
}

/* Forms: newsletter prefs, admin link pickers */
.pref-set {
  border: 1px solid var(--border, #ccc);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin: 1rem 0;
}
.pref-set legend {
  padding: 0 .35rem;
  font-weight: 600;
  color: var(--accent);
}
.pref-set .check,
label.check {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin: .35rem 0;
  font-weight: normal;
}
.link-pick-grid {
  display: grid;
  gap: .25rem;
  max-height: 12rem;
  overflow: auto;
  padding: .25rem 0;
}
.admin-logout-btn {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
  opacity: .95;
  text-decoration: underline;
}
.admin-logout-btn:hover { opacity: 1; color: var(--gold, #c9a227); }
button.linkish {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
  padding: 0;
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: flex-end;
}
.hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

/* Content header: title + compact share */
.content-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}
.content-header-row h1 {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
}
.share-icon-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0.15rem 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--accent);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.share-icon-btn:hover,
.share-icon-btn:focus-visible {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  outline: none;
}
.share-icon-btn:active {
  transform: scale(0.96);
}
.share-icon {
  display: block;
}
.share-icon-btn.is-copied {
  border-color: var(--gold);
  color: var(--gold);
}
.slug-preview code {
  font-size: .9em;
  word-break: break-all;
}

/* Author page */
.author-photo {
  margin: 0 0 1.25rem;
  text-align: center;
}
.author-photo img {
  max-width: min(280px, 100%);
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(128,128,128,.35));
}

/* Territories / flag board (legacy country flags from page views) */
.territories-intro { margin: 0 0 0.75rem; font-size: 0.95rem; }
.territories-more { margin: 0.75rem 0 0; font-size: 0.95rem; }
.flag-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  align-items: center;
}
.territories-full .flag-board {
  gap: 0.55rem 0.85rem;
}
.flag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  min-height: 1.75rem;
}
.territories-compact .flag-item {
  padding: 0.15rem 0.3rem;
  background: transparent;
  border-color: transparent;
}
.flag-img {
  display: block;
  width: 24px;
  height: 16px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset;
}
html[data-theme="dark"] .flag-img {
  border-color: rgba(255,255,255,.2);
}
.flag-name {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text);
}
.flag-meta { font-size: 0.8rem; }
.flag-code {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.widget-territories .territories-intro {
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}
.widget-territories .flag-board {
  gap: 0.25rem 0.35rem;
}
.widget-territories .flag-img {
  width: 22px;
  height: 15px;
}
.widget-territories .territories-more {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== Admin: email samples ========== */
.mail-samples {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) 1fr;
  gap: 1rem;
  align-items: start;
}
.mail-samples-list {
  max-height: calc(100vh - 7rem);
  overflow: auto;
  position: sticky;
  top: 1rem;
}
.sample-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sample-nav-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-muted);
}
.sample-nav-item:hover {
  border-color: var(--border);
  color: var(--accent);
}
.sample-nav-item.is-active {
  border-color: var(--accent);
  background: var(--scripture-bg);
  color: var(--text);
}
.sample-nav-key {
  font-size: 0.78rem;
  font-weight: 650;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.sample-nav-note { font-size: 0.82rem; line-height: 1.35; }
.sample-nav-aud { font-size: 0.72rem; }
.sample-meta-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: flex-start;
}
.sample-subject {
  font-size: 1.05rem;
  font-weight: 650;
  margin-top: 0.2rem;
  line-height: 1.35;
  color: var(--heading);
}
.sample-view-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.sample-view-tabs a {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
}
.sample-view-tabs a.is-active,
.sample-view-tabs a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--scripture-bg);
}
.sample-frame-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 70vh;
}
.sample-frame {
  display: block;
  width: 100%;
  min-height: 70vh;
  height: calc(100vh - 14rem);
  border: 0;
  background: var(--bg-muted);
}
.sample-text {
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace;
  color: var(--text);
}
.mail-edit-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}
.mail-edit-label input,
.mail-edit-label textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: 13px/1.45 ui-monospace, Menlo, Consolas, monospace;
  background: var(--bg);
  color: var(--text);
}
.mail-edit-label textarea { resize: vertical; min-height: 14rem; }
.var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
}
.var-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  color: var(--accent);
  font: 600 0.72rem ui-monospace, Menlo, Consolas, monospace;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
}
.var-chip:hover {
  border-color: var(--accent);
  background: var(--scripture-bg);
}
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
}
.badge-ok {
  background: rgba(26, 92, 42, 0.12);
  color: #1a5c2a;
}
.badge-warn {
  background: rgba(176, 141, 58, 0.18);
  color: #7a5c12;
}
html[data-theme="dark"] .badge-ok {
  background: rgba(157, 212, 173, 0.15);
  color: #9dd4ad;
}
html[data-theme="dark"] .badge-warn {
  background: rgba(212, 188, 106, 0.15);
  color: #d4bc6a;
}
.mail-swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 3px;
  vertical-align: middle;
  margin: 0 0.1rem;
}
@media (max-width: 900px) {
  .mail-samples {
    grid-template-columns: 1fr;
  }
  .mail-samples-list {
    position: static;
    max-height: 16rem;
  }
  .sample-frame {
    height: 60vh;
  }
}

/* Mail sample editor formatting toolbar */
.mail-fmt-toolbar {
  margin: 0.35rem 0 0.5rem;
}
.mail-fmt-sep {
  display: inline-block;
  width: 1px;
  height: 1.25rem;
  background: var(--border);
  margin: 0 0.15rem;
  vertical-align: middle;
  align-self: center;
}
.mail-text-template {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: 13px/1.45 ui-monospace, Menlo, Consolas, monospace;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  min-height: 14rem;
  margin-bottom: 0.5rem;
}
.mail-fmt-help {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.mail-fmt-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}
.mail-fmt-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.mail-fmt-list li { margin: 0.25rem 0; }
.mail-fmt-list code {
  font-size: 0.85em;
  background: var(--bg-muted);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
