/* =========================================================================
   THE STEWARDSHIP COMPANION — Stewarding the Life God Has Entrusted to You
   Series Two · Living Faithfully · Rooted & Faithful Institute LLC
   Art direction: warm parchment + deep root green + gold leaf
   (matched to Becoming Rooted in Christ and the Walking Wisely Companion)
   Fonts: Zodiak (display, Fontshare) / Work Sans (body) / JetBrains Mono (refs)
   ========================================================================= */

:root,
[data-theme='light'] {
  --bg: #f3eede;
  --bg-deep: #ebe4d0;
  --surface: #fbf8f0;
  --surface-2: #f9f4e8;
  --surface-offset: #ece4d0;
  --surface-offset-2: #e4dac0;
  --divider: #e0d8c4;
  --border: #d4caaf;
  --border-strong: #c3b690;

  --text: #2b2317;
  --text-muted: #6d6453;
  --text-faint: #a39a83;
  --text-inverse: #fbf8f0;

  --primary: #2e5d3a;
  --primary-hover: #234829;
  --primary-active: #1b361f;
  --primary-highlight: #d6e2cf;
  --primary-soft: #e6efe0;

  --gold: #9a6b12;
  --gold-hover: #7d5510;
  --gold-soft: #f0e3c4;

  /* Part accents — one per Part of the book */
  --p1: #9a6b12; --p1-soft: #f2e6c8;
  --p2: #6b3a7e; --p2-soft: #ebe0f0;
  --p3: #324a8b; --p3-soft: #dee3f1;
  --p4: #4f6b28; --p4-soft: #e4ecd2;

  --shadow-sm: 0 1px 2px rgba(43, 35, 23, 0.06);
  --shadow-md: 0 4px 14px rgba(43, 35, 23, 0.09);
  --shadow-lg: 0 18px 48px rgba(43, 35, 23, 0.14);

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Zodiak', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --text-xs: clamp(0.75rem, 0.71rem + 0.18vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.22vw, 0.9063rem);
  --text-base: clamp(0.9688rem, 0.94rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.4vw, 2.375rem);
  --text-3xl: clamp(1.875rem, 1.35rem + 2.3vw, 3.125rem);

  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;

  --wrap: 74rem;
  --measure: 40rem;
}

[data-theme='dark'] {
  --bg: #171512;
  --bg-deep: #100f0d;
  --surface: #211e19;
  --surface-2: #262218;
  --surface-offset: #2d2921;
  --surface-offset-2: #363128;
  --divider: #332e26;
  --border: #3d372d;
  --border-strong: #524a3c;

  --text: #f0ead9;
  --text-muted: #b3a892;
  --text-faint: #7d745f;
  --text-inverse: #191712;

  --primary: #86b28c;
  --primary-hover: #9dc4a2;
  --primary-active: #b3d3b7;
  --primary-highlight: #2b3d2e;
  --primary-soft: #22301f;

  --gold: #d9ae5c;
  --gold-hover: #e6c078;
  --gold-soft: #35291a;

  --p1: #d9ae5c; --p1-soft: #352a19;
  --p2: #bd93cd; --p2-soft: #2f2534;
  --p3: #92a8dd; --p3-soft: #232838;
  --p4: #a6c073; --p4-soft: #28301c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.16;
  margin: 0;
  letter-spacing: -0.011em;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }

button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--space-6); }
.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;
}

/* ===================== Header ===================== */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--divider);
}

.header-inner {
  display: flex; align-items: center; gap: var(--space-4);
  min-height: 4.25rem; padding-block: var(--space-3);
}

.brand {
  display: flex; align-items: center; gap: var(--space-3);
  text-decoration: none; color: inherit; flex: 0 1 auto; min-width: 0;
}
.brand-mark { width: 44px; height: 44px; flex: none; }
[data-theme='dark'] .brand-mark {
  background: #f7f2e8; border-radius: 50%; padding: 3px;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600;
  line-height: 1.2; letter-spacing: -0.012em; color: var(--text);
}
.brand-sub {
  font-size: 0.6875rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 500; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-short { display: none; }
.sub-short { display: none; }

.header-spacer { flex: 1 1 auto; }

.nav {
  display: flex; align-items: center; gap: var(--space-1);
  background: var(--surface-offset); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 4px;
}
.nav-btn {
  appearance: none; border: 0; background: transparent;
  padding: 0.4375rem 0.8125rem; border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  white-space: nowrap; transition: background var(--transition), color var(--transition);
}
.nav-btn:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nav-btn[aria-selected='true'] {
  background: var(--surface); color: var(--primary);
  box-shadow: var(--shadow-sm); font-weight: 600;
}

.icon-btn {
  appearance: none; width: 2.25rem; height: 2.25rem; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface-offset); color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

.nav-toggle { display: none; }

/* ===================== Views ===================== */

.view { display: none; padding-block: var(--space-12) var(--space-16); }
.view.is-active { display: block; animation: rise 320ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .view.is-active { animation: none; }
  html { scroll-behavior: auto; }
}

.eyebrow {
  font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--gold); margin-bottom: var(--space-3);
}
.view-title { font-size: var(--text-3xl); max-width: 30ch; }
.view-lede {
  font-size: var(--text-lg); color: var(--text-muted);
  max-width: 46rem; margin-top: var(--space-5); line-height: 1.6;
}

/* ===================== Finder hero ===================== */

.hero { position: relative; overflow: hidden; }
.hero-mark {
  position: absolute; right: -3rem; top: -4rem; width: 26rem; max-width: 48vw;
  opacity: 0.1; pointer-events: none; z-index: 0;
}
[data-theme='dark'] .hero-mark { opacity: 0.11; }
.hero-inner { position: relative; z-index: 1; }

.finder-card {
  margin-top: var(--space-8);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
  padding: var(--space-8);
  max-width: 56rem;
}
@media (max-width: 40rem) { .finder-card { padding: var(--space-5); } }

.field-label {
  display: block; font-size: var(--text-sm); font-weight: 600;
  color: var(--text); margin-bottom: var(--space-2);
}
.field-hint { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-4); }

.search-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.search-input {
  flex: 1 1 18rem; min-width: 0;
  font: inherit; font-size: var(--text-base);
  padding: 0.8125rem 1rem;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.btn {
  appearance: none; border: 1px solid transparent; border-radius: var(--radius-md);
  padding: 0.8125rem 1.375rem; font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.01em; transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--text-inverse); }
[data-theme='dark'] .btn-primary { color: #12160f; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost {
  background: transparent; color: var(--text-muted); border-color: var(--border);
  padding: 0.5rem 0.875rem;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.chip-groups { margin-top: var(--space-6); display: grid; gap: var(--space-5); }
.chip-group-label {
  font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--text-muted); margin-bottom: var(--space-3);
}
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  appearance: none; background: var(--surface-offset);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 0.375rem 0.8125rem; font-size: var(--text-sm); color: var(--text-muted);
  transition: all var(--transition);
}
.chip:hover {
  background: var(--primary-soft); border-color: var(--primary);
  color: var(--primary); transform: translateY(-1px);
}

.privacy-note {
  display: flex; gap: var(--space-3); align-items: flex-start;
  margin-top: var(--space-6); padding-top: var(--space-5);
  border-top: 1px solid var(--divider);
  font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6;
}
.privacy-note svg { flex: none; color: var(--primary); margin-top: 2px; }

/* ===================== Results ===================== */

.results { margin-top: var(--space-12); }
.results-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6);
  padding-bottom: var(--space-4); border-bottom: 1px solid var(--divider);
}
.results-title { font-size: var(--text-xl); }
.results-count { font-size: var(--text-sm); color: var(--text-muted); }

.empty-state {
  margin-top: var(--space-10); display: grid; gap: var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.step { border-top: 2px solid var(--gold); padding-top: var(--space-4); }
.step-n {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600;
  color: var(--gold); letter-spacing: 0.08em;
}
.step-title { font-size: var(--text-lg); margin: var(--space-2) 0 var(--space-2); }
.step-body { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.65; }

.no-match {
  margin-top: var(--space-8); padding: var(--space-8);
  background: var(--surface); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg); max-width: var(--measure);
}
.no-match h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.no-match p { color: var(--text-muted); font-size: var(--text-sm); }
.no-match .btn { margin-top: var(--space-5); }

/* ===================== Chapter card ===================== */

.card-stack { display: grid; gap: var(--space-5); }

.chapter-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--primary));
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden; transition: box-shadow var(--transition);
}
.chapter-card:hover { box-shadow: var(--shadow-md); }

.card-head {
  display: flex; gap: var(--space-4); align-items: flex-start;
  padding: var(--space-6);
}
@media (max-width: 40rem) { .card-head { padding: var(--space-5); } }

.card-head-main { flex: 1 1 auto; min-width: 0; }

.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.badge {
  font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600; padding: 0.1875rem 0.5rem; border-radius: var(--radius-sm);
  background: var(--accent-soft, var(--primary-soft)); color: var(--accent, var(--primary));
  white-space: nowrap;
}
.badge-plain {
  background: transparent; color: var(--text-faint);
  border: 1px solid var(--border); text-transform: none; letter-spacing: 0.02em;
}
.badge-match {
  background: var(--gold-soft); color: var(--gold);
}

.card-title { font-size: var(--text-xl); }

.card-truth {
  margin-top: var(--space-4); font-size: var(--text-lg);
  font-family: var(--font-display); font-weight: 400; line-height: 1.45;
  color: var(--text);
}

.scripture {
  margin: var(--space-5) 0 0; padding: var(--space-4) var(--space-5);
  background: var(--surface-2); border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display); font-size: var(--text-base);
  line-height: 1.6; color: var(--text-muted); font-style: italic;
}

.card-toggle {
  appearance: none; background: transparent; border: 0;
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-5); padding: 0;
  font-size: var(--text-sm); font-weight: 600; color: var(--primary);
}
.card-toggle:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.card-toggle svg { transition: transform var(--transition); }
.card-toggle[aria-expanded='true'] svg { transform: rotate(180deg); }

.card-body { border-top: 1px solid var(--divider); padding: var(--space-6); display: none; }
@media (max-width: 40rem) { .card-body { padding: var(--space-5); } }
.card-body.is-open { display: block; }

.imagine {
  background: var(--accent-soft, var(--primary-soft));
  border-radius: var(--radius-md); padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.imagine-label {
  font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--accent, var(--primary)); margin-bottom: var(--space-2);
}
.imagine p { font-size: var(--text-base); line-height: 1.66; max-width: var(--measure); }

.prose { max-width: var(--measure); }
.prose h4 {
  font-size: var(--text-lg); margin-top: var(--space-6); margin-bottom: var(--space-3);
  color: var(--text);
}
.prose h4:first-child { margin-top: 0; }
.prose p { margin-bottom: var(--space-4); }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 var(--space-4); padding-left: 0; list-style: none; }
.prose li {
  position: relative; padding-left: 1.25rem; margin-bottom: var(--space-2);
  font-size: var(--text-base); line-height: 1.6;
}
.prose li::before {
  content: ''; position: absolute; left: 0; top: 0.6875em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent, var(--primary));
}

.read-in-book {
  margin-top: var(--space-6); padding-top: var(--space-4);
  border-top: 1px solid var(--divider);
  font-size: var(--text-sm); color: var(--text-muted);
}
.read-in-book strong { color: var(--text); font-weight: 600; }

/* ===================== Parts (chapters view) ===================== */

.part-block { margin-top: var(--space-16); }
.part-block:first-of-type { margin-top: var(--space-12); }

.part-head {
  border-top: 3px solid var(--accent); padding-top: var(--space-5);
  margin-bottom: var(--space-8);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-8) var(--space-12); align-items: start;
}
@media (max-width: 56rem) { .part-head { grid-template-columns: 1fr; gap: var(--space-6); } }

.part-roman {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.part-title { font-size: var(--text-2xl); margin: var(--space-2) 0 var(--space-2); }
.part-subtitle {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-lg); color: var(--text-muted);
}
.part-blurb { margin-top: var(--space-4); color: var(--text-muted); max-width: var(--measure); }

.reflect {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5);
}
.reflect-label {
  font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--accent); margin-bottom: var(--space-3);
}
.reflect ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-3); }
.reflect li {
  font-family: var(--font-display); font-size: var(--text-base);
  line-height: 1.5; padding-left: var(--space-4);
  border-left: 2px solid var(--accent-soft); color: var(--text);
}

/* ===================== Scripture view ===================== */

.theme-block { margin-top: var(--space-10); }
.theme-head {
  display: flex; align-items: center; gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.theme-title { font-size: var(--text-xl); flex: 0 1 auto; min-width: 0; }
.theme-rule { flex: 1 1 auto; height: 1px; background: var(--divider); }
.theme-count { font-size: var(--text-xs); color: var(--text-faint); font-family: var(--font-mono); flex: none; }

.verse-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.verse-card {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 2px solid var(--gold); border-radius: var(--radius-md);
  padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3);
}
.verse-text {
  font-family: var(--font-display); font-size: var(--text-base);
  line-height: 1.6; font-style: italic; color: var(--text);
}
.verse-ref {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.05em; color: var(--gold); margin-top: auto;
}

/* ===================== Sending / prose panels ===================== */

.panel-grid { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); align-items: start; margin-top: var(--space-10); }
@media (max-width: 56rem) { .panel-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 40rem) { .panel { padding: var(--space-5); } }
.panel + .panel { margin-top: var(--space-6); }
.panel-title { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.panel-sub {
  font-family: var(--font-display); font-style: italic; font-size: var(--text-base);
  color: var(--text-muted); margin-bottom: var(--space-6);
}

.prayer-body p {
  font-family: var(--font-display); font-size: var(--text-lg);
  line-height: 1.62; margin-bottom: var(--space-5); max-width: var(--measure);
}
.prayer-body p:last-child { margin-bottom: 0; }
.prayer-body p:first-child::first-letter {
  font-size: 3.25rem; float: left; line-height: 0.82;
  padding-right: 0.5rem; padding-top: 0.1rem; color: var(--gold); font-weight: 500;
}

.letter-body p { margin-bottom: var(--space-4); max-width: var(--measure); }
.letter-body p:last-child { margin-bottom: 0; }
.letter-sign {
  font-family: var(--font-display); font-style: italic;
  color: var(--gold); font-size: var(--text-lg);
}

.aside-card {
  background: var(--surface-offset); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-6);
}
.aside-card + .aside-card { margin-top: var(--space-5); }
.aside-title {
  font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--gold); margin-bottom: var(--space-4);
}
.aside-card p { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.65; }
.aside-card p + p { margin-top: var(--space-3); }

.lib-list { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.lib-item { padding-left: var(--space-4); border-left: 2px solid var(--accent, var(--gold)); }
.lib-series {
  font-size: var(--text-xs); letter-spacing: 0.09em; text-transform: uppercase;
  font-weight: 600; color: var(--accent, var(--gold));
}
.lib-book { font-family: var(--font-display); font-size: var(--text-base); margin-top: 2px; color: var(--text); }
.lib-desc { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-1); line-height: 1.55; }
.lib-tag {
  display: inline-block; margin-top: var(--space-2);
  font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 600; color: var(--text-faint);
}

.motto {
  margin-top: var(--space-8); padding-top: var(--space-6);
  border-top: 1px solid var(--divider);
  font-family: var(--font-display); font-size: var(--text-xl);
  color: var(--primary); text-align: center;
}

/* ===================== Footer ===================== */

.site-footer {
  border-top: 1px solid var(--divider); background: var(--bg-deep);
  padding-block: var(--space-10);
  font-size: var(--text-sm); color: var(--text-muted);
}
.footer-inner { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.footer-title {
  font-family: var(--font-display); font-size: var(--text-base);
  color: var(--text); margin-bottom: var(--space-2);
}
.footer-fine { font-size: var(--text-xs); line-height: 1.7; color: var(--text-muted); }
.footer-fine p + p { margin-top: var(--space-2); }

/* ===================== Mobile ===================== */

@media (max-width: 62rem) {
  .brand-long { display: none; }
  .brand-short { display: block; }
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; top: calc(100% + 0.5rem); right: var(--space-6);
    left: var(--space-6); flex-direction: column; align-items: stretch;
    border-radius: var(--radius-lg); padding: var(--space-3);
    background: var(--surface); box-shadow: var(--shadow-lg);
  }
  .nav[data-collapsed='true'] { display: none; }
  .nav-btn { text-align: left; padding: 0.625rem 0.75rem; border-radius: var(--radius-md); }
}
@media (max-width: 40rem) {
  .wrap { padding: 0 var(--space-4); }
  .nav { right: var(--space-4); left: var(--space-4); }
  .hero-mark { width: 16rem; top: -2rem; right: -3rem; opacity: 0.07; }
  .search-row { flex-direction: column; align-items: stretch; }
  .search-input { flex: 0 0 auto; width: 100%; }
  .btn-primary { width: 100%; }
  .brand-name { font-size: 1rem; }
  .sub-long { display: none; }
  .sub-short { display: inline; }
  .theme-head { flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
  .theme-title { flex: 1 1 100%; }
  .theme-rule { display: none; }
  .verse-grid { grid-template-columns: 1fr; }
}

/* Rooted & Faithful stacked logo in the footer */
.footer-brand { display: flex; justify-content: center; padding-bottom: var(--space-6); margin-bottom: var(--space-6); border-bottom: 1px solid var(--divider); }
.footer-logo { width: 220px; height: auto; border-radius: var(--radius-md); background: #f7f2e8; }
[data-theme='dark'] .footer-logo { padding: 10px 14px; }
@media (max-width: 40rem) { .footer-logo { width: 180px; } }
