/*
 * Scripture-first reading layer on the canonical Speak Scripture dark-copper
 * visual system. Loaded after beautify.css so the concise public structure
 * keeps the established brand, contrast, depth, and responsive behavior.
 */

:root {
  --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, sans-serif;
}

body.scripture-first {
  min-height: 100vh;
  background-color: var(--night, #0d0a08);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(216, 135, 75, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(165, 173, 98, 0.09), transparent 28rem),
    linear-gradient(180deg, var(--night-soft, #13100d) 0%, var(--night, #0d0a08) 48%, #090705 100%);
  color: var(--text, #f3eadb);
}

body.scripture-first .site-header {
  background: rgba(13, 10, 8, 0.92);
  border-bottom: 1px solid var(--line, rgba(240, 179, 106, 0.18));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.08);
}

body.scripture-first .header-inner {
  position: relative;
  min-height: 5rem;
}

body.scripture-first .brand {
  gap: 0.75rem;
  color: var(--ivory, #f6efe3);
  text-decoration: none;
}

body.scripture-first .brand:hover {
  color: var(--copper-bright, #f0b36a);
}

body.scripture-first .brand-mark {
  width: 2.65rem;
  height: 2.65rem;
  border-color: rgba(240, 179, 106, 0.42);
  background: linear-gradient(145deg, #302218, #15100c);
  color: var(--copper-bright, #f0b36a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.42);
}

body.scripture-first .brand-logo {
  display: block;
  width: 3.7rem;
  height: 3.7rem;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.42));
}

body.scripture-first .brand-copy {
  display: grid;
  line-height: 1.05;
}

body.scripture-first .brand-copy strong {
  color: var(--ivory, #f6efe3);
  font-size: var(--kd-text-lg);
}

body.scripture-first .brand-copy small {
  margin-top: 0.26rem;
  color: var(--muted, #b9ac99);
  font-family: var(--sans);
  font-size: var(--kd-text-xs);
  letter-spacing: 0.03em;
}

body.scripture-first .nav {
  gap: 0.35rem;
}

body.scripture-first .nav a {
  padding: 0.58rem 0.78rem;
  border-radius: 999px;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
  font-weight: 700;
  text-decoration: none;
}

body.scripture-first .nav a:hover,
body.scripture-first .nav a:focus-visible,
body.scripture-first .nav a[aria-current="page"] {
  background: rgba(216, 135, 75, 0.13);
  color: var(--copper-bright, #f0b36a);
  box-shadow: inset 0 0 0 1px rgba(216, 135, 75, 0.14);
}

body.scripture-first h1,
body.scripture-first .page-hero h1 {
  max-width: 22ch;
  margin: 0;
  color: var(--ivory, #f6efe3);
  font-size: var(--kd-text-page-title);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

body.scripture-first h2 {
  color: var(--ivory, #f6efe3);
  font-size: clamp(var(--kd-text-xl), 2.3vw, var(--kd-text-2xl));
  line-height: 1.18;
}

.scripture-first-main {
  min-height: calc(100vh - 12rem);
}

.sf-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line, rgba(240, 179, 106, 0.18));
  background:
    linear-gradient(115deg, rgba(13, 10, 8, 0.98), rgba(28, 21, 16, 0.92) 52%, rgba(13, 10, 8, 0.9)),
    radial-gradient(circle at 78% 28%, rgba(216, 135, 75, 0.2), transparent 25rem);
}

.sf-home-hero {
  min-height: 0;
  display: grid;
  align-items: center;
}

.sf-reading-shell {
  width: min(100% - 2rem, 52rem);
}

.sf-home-hero p,
.sf-hero > .page-shell > p {
  max-width: 42rem;
  margin: 1.1rem 0 0;
  color: #d0c3b1;
  font-size: clamp(var(--kd-text-base), 2vw, var(--kd-text-lg));
  line-height: 1.65;
}

.sf-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  margin-bottom: 0.75rem;
  color: var(--copper-bright, #f0b36a);
  font-size: var(--kd-text-sm);
  font-weight: 700;
  text-decoration: none;
}

.sf-notfound-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.sf-back:hover,
.sf-back:focus-visible {
  color: var(--olive, #a5ad62);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.sf-index {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(3.5rem, 8vw, 5.5rem);
  background: linear-gradient(180deg, rgba(36, 29, 23, 0.28), rgba(13, 10, 8, 0));
}

/* Section heading above the home topic grid: title, then its one-line guide. */
.sf-index-head {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line, rgba(240, 179, 106, 0.18));
}

body.scripture-first .sf-index-head h2 {
  margin: 0;
  font-size: clamp(var(--kd-text-xl), 2.6vw, var(--kd-text-2xl));
  letter-spacing: -0.02em;
}

.sf-index-head .sf-page-guide {
  max-width: none;
  margin: 0;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-base);
  text-wrap: pretty;
}

.sf-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
}

/* The home grid holds equal tiles so every row lines up. */
.sf-index .sf-topic-grid {
  grid-auto-rows: 1fr;
}

/* Practical topics list three references, so their tiles get wider columns. */
.sf-topic-grid:has(> [data-specific-topic]) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

/* Tile: title at the top, count and arrow on one line at the bottom. */
.sf-topic-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 7.25rem;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem 1rem;
  color: var(--text, #f3eadb);
  background-color: var(--surface, #1b1612);
  background-image: linear-gradient(160deg, rgba(46, 37, 28, 0.9), rgba(23, 18, 14, 0.97));
  border: 1px solid var(--line, rgba(240, 179, 106, 0.18));
  border-radius: 0.95rem;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.sf-topic-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--copper-bright, #f0b36a), rgba(216, 135, 75, 0));
  opacity: 0.5;
  transition: opacity 180ms ease;
}

/* The arrow ends the meta line and shares its baseline. */
.sf-topic-card small::after {
  content: "→";
  flex: none;
  color: var(--copper, #d8874b);
  font-size: var(--kd-text-lg);
  line-height: 0;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.sf-topic-card:hover,
.sf-topic-card:focus-visible {
  border-color: rgba(240, 179, 106, 0.5);
  background-image: linear-gradient(160deg, rgba(56, 43, 32, 0.98), rgba(28, 22, 17, 0.99));
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(216, 135, 75, 0.1);
  transform: translateY(-2px);
}

.sf-topic-card:hover::before,
.sf-topic-card:focus-visible::before {
  opacity: 1;
}

.sf-topic-card:hover small::after,
.sf-topic-card:focus-visible small::after {
  color: var(--copper-bright, #f0b36a);
  transform: translateX(0.2rem);
}

.sf-topic-card span {
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: var(--kd-text-xl);
  font-weight: 700;
  line-height: 1.22;
  text-wrap: balance;
}

/* References read at body size (16 px floor); the title stays a step above. */
.sf-topic-card small {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-base);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.38;
}

/* The Why Speak Scripture tile reads as a guide, not another topic. */
.sf-education-card {
  background: rgba(27, 22, 18, 0.35);
  border-style: dashed;
  border-color: rgba(240, 179, 106, 0.36);
  box-shadow: none;
}

.sf-education-card::before {
  display: none;
}

.sf-education-card span {
  color: var(--copper-bright, #f0b36a);
}

/* Bible books are short labels, so their tiles stay compact. */
.bible-book-card {
  min-height: 5.5rem;
  gap: 0.6rem;
}

.sf-more,
.sf-count {
  margin: 1.6rem 0 0;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
}

.sf-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--copper-bright, #f0b36a);
  font-weight: 700;
}

.sf-topic-directory {
  padding: clamp(2.4rem, 6vw, 4.8rem) 0 clamp(5rem, 10vw, 8rem);
  background:
    radial-gradient(circle at 12% 0%, rgba(216, 135, 75, 0.08), transparent 30rem),
    linear-gradient(180deg, rgba(36, 29, 23, 0.28), rgba(13, 10, 8, 0));
}

.sf-anchor-nav {
  scroll-margin-top: 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin: 0 0 clamp(4rem, 9vw, 7rem);
  padding: clamp(1.35rem, 3vw, 2.25rem);
  background: linear-gradient(145deg, rgba(48, 38, 29, 0.96), rgba(24, 19, 15, 0.99));
  border: 1px solid rgba(240, 179, 106, 0.26);
  border-radius: 1.25rem;
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.sf-anchor-kicker,
.sf-topic-section-label {
  margin: 0 0 0.5rem;
  color: var(--copper-bright, #f0b36a);
  font-size: var(--kd-text-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sf-anchor-copy h2,
.sf-topic-section-intro h2 {
  margin: 0;
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: clamp(var(--kd-text-2xl), 3vw, var(--kd-text-3xl));
  line-height: 1.1;
}

.sf-anchor-copy > p:last-child,
.sf-topic-section-intro > p:last-child,
.sf-topic-subcategory-heading p {
  margin: 0.75rem 0 0;
  color: var(--muted, #b9ac99);
  line-height: 1.65;
}

.sf-anchor-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
}

.sf-anchor-link {
  position: relative;
  display: flex;
  min-height: 4.5rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.9rem 2.5rem 0.9rem 1rem;
  color: var(--ivory, #f6efe3);
  background: rgba(13, 10, 8, 0.58);
  border: 1px solid rgba(240, 179, 106, 0.18);
  border-radius: 0.85rem;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.sf-anchor-link::after {
  content: "\2193";
  position: absolute;
  margin-left: calc(100% - 3.25rem);
  color: var(--copper, #d8874b);
  font-size: var(--kd-text-lg);
}

.sf-anchor-link:hover,
.sf-anchor-link:focus-visible {
  background: rgba(64, 47, 35, 0.78);
  border-color: rgba(240, 179, 106, 0.55);
  transform: translateY(-2px);
}

.sf-anchor-link span {
  font-weight: 700;
  line-height: 1.25;
}

.sf-anchor-link small {
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
}

.sf-topic-section {
  scroll-margin-top: 5.5rem;
  padding: 0 0 clamp(4rem, 9vw, 6.5rem);
}

.sf-topic-section + .sf-topic-section {
  padding-top: clamp(3.8rem, 8vw, 6rem);
  border-top: 1px solid rgba(240, 179, 106, 0.16);
}

.sf-topic-section-intro {
  max-width: 52rem;
  margin-bottom: 1.75rem;
}

.sf-topic-collection-title {
  margin: 0 0 1rem;
  color: var(--copper-bright, #f0b36a);
  font-size: var(--kd-text-sm);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* All Topics list headings match the home "Topics" heading. */
body.scripture-first h2.sf-topic-collection-title {
  margin: 0 0 clamp(1rem, 2.5vw, 1.35rem);
  padding-bottom: 0.75rem;
  color: var(--ivory, #f6efe3);
  border-bottom: 1px solid var(--line, rgba(240, 179, 106, 0.18));
  font-size: clamp(var(--kd-text-xl), 2.6vw, var(--kd-text-2xl));
  letter-spacing: -0.02em;
  text-transform: none;
}

[data-search-group] + [data-search-group] {
  margin-top: clamp(2.75rem, 6vw, 4rem);
}

.sf-topic-subcategories {
  margin-top: clamp(2.8rem, 6vw, 4.5rem);
}

.sf-topic-subcategory {
  scroll-margin-top: 5.5rem;
  display: grid;
  grid-template-columns: minmax(13rem, 0.42fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  border-top: 1px solid rgba(240, 179, 106, 0.12);
}

.sf-topic-subcategory-heading h3 {
  margin: 0;
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: clamp(var(--kd-text-xl), 2.2vw, var(--kd-text-2xl));
  line-height: 1.2;
}

.sf-topic-subcategory-heading p {
  font-size: var(--kd-text-sm);
}

.sf-topic-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: 0.75rem;
}

.sf-topic-directory-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 5.4rem;
  overflow: hidden;
  flex-direction: column;
  /* Titles in one row start on one line, however long the references below them. */
  justify-content: flex-start;
  gap: 0.38rem;
  padding: 0.95rem 2.5rem 0.95rem 1rem;
  color: var(--text, #f3eadb);
  background: linear-gradient(145deg, rgba(39, 31, 24, 0.9), rgba(21, 17, 13, 0.98));
  border: 1px solid rgba(240, 179, 106, 0.14);
  border-radius: 0.85rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.sf-topic-directory-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.16rem;
  background: linear-gradient(180deg, var(--copper-bright, #f0b36a), var(--copper-deep, #8e4f29));
  opacity: 0.65;
}

/* The arrow sits on the title's line: same top, font size and line height. */
.sf-topic-directory-card::after {
  content: "→";
  position: absolute;
  right: 0.95rem;
  top: 0.95rem;
  color: var(--copper, #d8874b);
  font-size: var(--kd-text-base);
  line-height: 1.25;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.sf-topic-directory-card:hover,
.sf-topic-directory-card:focus-visible {
  background: linear-gradient(145deg, rgba(51, 39, 29, 0.98), rgba(27, 21, 16, 0.99));
  border-color: rgba(240, 179, 106, 0.48);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  transform: translateY(-2px);
}

.sf-topic-directory-card:hover::after,
.sf-topic-directory-card:focus-visible::after {
  color: var(--copper-bright, #f0b36a);
  transform: translateX(0.15rem);
}

.sf-topic-directory-card span {
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: var(--kd-text-lg);
  font-weight: 700;
  line-height: 1.25;
}

.sf-topic-directory-card small {
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-base);
  line-height: 1.4;
}

@media (max-width: 760px) {
  .sf-anchor-nav,
  .sf-topic-subcategory {
    grid-template-columns: 1fr;
  }

  .sf-anchor-nav {
    align-items: stretch;
  }

  .sf-topic-subcategory {
    gap: 1rem;
  }
}

@media (max-width: 520px) {
  .sf-anchor-links,
  .sf-topic-directory-grid {
    grid-template-columns: 1fr;
  }

  .sf-anchor-nav {
    padding: 1.1rem;
  }

  .sf-topic-section-intro h2 {
    font-size: var(--kd-text-2xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-anchor-link,
  .sf-topic-directory-card,
  .sf-topic-directory-card::after {
    transition: none;
  }

  .sf-anchor-link:hover,
  .sf-anchor-link:focus-visible,
  .sf-topic-directory-card:hover,
  .sf-topic-directory-card:focus-visible {
    transform: none;
  }
}

.sf-search {
  display: grid;
  max-width: 31rem;
  gap: 0.48rem;
  margin-top: 1.7rem;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
  font-weight: 700;
}

.sf-search input {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.78rem 0.9rem;
  color: var(--text, #f3eadb);
  background: rgba(27, 22, 18, 0.94);
  border: 1px solid rgba(240, 179, 106, 0.28);
  border-radius: 0.72rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 28px rgba(0, 0, 0, 0.2);
  font: inherit;
  font-weight: 550;
}

.sf-search input::placeholder {
  color: #8f8373;
}

.sf-search input:focus {
  border-color: var(--copper-bright, #f0b36a);
}

.sf-reading {
  padding: clamp(2.2rem, 5vw, 3.8rem) 0 clamp(5rem, 10vw, 8rem);
}

.scripture-sequence,
.sf-foundation-sequence {
  display: grid;
  gap: 1rem;
}

.sf-proclamation-foundations {
  box-sizing: border-box;
  width: min(100% - 2rem, 72rem);
  margin: 1rem auto 1.25rem;
}

.topic-scripture {
  position: relative;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text, #f3eadb);
  background-color: var(--surface, #1b1612);
  background-image: linear-gradient(145deg, rgba(36, 29, 23, 0.96), rgba(22, 17, 13, 0.99));
  border: 1px solid var(--line, rgba(240, 179, 106, 0.18));
  border-left: 0.24rem solid rgba(216, 135, 75, 0.75);
  border-radius: 0.95rem;
  box-shadow:
    0 14px 42px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.topic-scripture h2 {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
  color: var(--copper-bright, #f0b36a);
  font-family: var(--sans);
  font-size: clamp(var(--kd-text-base), 2vw, var(--kd-text-lg));
  line-height: 1.3;
  letter-spacing: 0;
}

.topic-scripture h2 small {
  flex: 0 0 auto;
  color: var(--olive, #a5ad62);
  font-size: var(--kd-text-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Prose pages (privacy, sources) reuse the card; give each section heading room. */
.topic-scripture > p + h2,
.topic-scripture > div + h2 {
  margin-top: 1.9rem;
}

.topic-scripture blockquote {
  margin: 0;
  padding: 0;
  color: var(--text, #f3eadb);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.topic-scripture blockquote::before,
.topic-scripture blockquote::after {
  content: none;
}

.topic-scripture blockquote p,
.topic-scripture > p {
  margin: 0;
  color: var(--text, #f3eadb);
  font-family: var(--serif);
  font-size: clamp(var(--kd-text-lg), 2.2vw, var(--kd-text-xl));
  line-height: 1.78;
}

.topic-scripture .verse {
  display: inline;
}

.topic-scripture .verse sup {
  position: relative;
  top: -0.1em;
  margin-right: 0.22em;
  color: var(--copper, #d8874b);
  font-family: var(--sans);
  font-size: max(0.62em, 0.75rem);
  font-weight: 700;
}

.topic-confession {
  position: relative;
  overflow: hidden;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--ivory, #f6efe3);
  background-color: #281b13;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(240, 179, 106, 0.16), transparent 18rem),
    linear-gradient(135deg, #332218, #1d1510 72%);
  border: 1px solid rgba(240, 179, 106, 0.42);
  border-radius: 1.1rem;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.topic-confession h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 0.72rem;
  color: var(--copper-bright, #f0b36a);
  font-family: var(--sans);
  font-size: var(--kd-text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topic-confession p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: clamp(var(--kd-text-lg), 2.2vw, var(--kd-text-xl));
  line-height: 1.72;
}

body.scripture-first .site-footer {
  margin-top: 0;
  padding: 1rem 0;
  background: #090705;
  border-top: 1px solid var(--line, rgba(240, 179, 106, 0.18));
}

body.scripture-first .footer-inner.sf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 0;
}

body.scripture-first .sf-footer p {
  margin: 0;
  color: var(--muted, #b9ac99);
  font-family: var(--sans);
  font-size: var(--kd-text-sm);
}

/* Footer links stay a text line but get a finger-sized hit area. */
body.scripture-first .sf-footer a {
  display: inline-block;
  min-width: 44px;
  padding: 0.8rem 0;
  color: #d9c6aa;
}

body.scripture-first .sf-footer a:hover {
  color: var(--copper-bright, #f0b36a);
}

@media (max-width: 56.25rem) {
  body.scripture-first .header-inner {
    min-height: 4.6rem;
    flex-direction: row;
    align-items: center;
    padding-block: 0.65rem;
  }

  body.scripture-first .brand-copy small {
    display: none;
  }

  body.scripture-first .nav-toggle {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
  }

  body.scripture-first .nav {
    position: fixed;
    top: 5.35rem;
    left: 50%;
    right: auto;
    z-index: 90;
    width: min(24rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 6.35rem);
    overflow-y: auto;
    padding: 0.85rem;
    flex-direction: column;
    align-items: center;
    gap: 0.38rem;
    background: rgba(20, 15, 11, 0.99);
    border: 1px solid rgba(240, 179, 106, 0.34);
    border-radius: 1.05rem;
    box-shadow:
      0 28px 80px rgba(0, 0, 0, 0.62),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: translateX(-50%);
  }

  body.scripture-first .nav:not([data-open="true"]) {
    display: none;
  }

  body.scripture-first .nav a {
    width: 100%;
    min-height: 3.15rem;
    display: grid;
    place-items: center;
    padding: 0.78rem 1rem;
    text-align: center;
    font-size: var(--kd-text-base);
  }

  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }

  /* The sticky header is its own stacking context (z-index 20), so the menu's
     z-index cannot lift it past the z-index 80 backdrop. Raise the whole header
     while the menu is open, or every tap on a menu link lands on the backdrop. */
  body.nav-open .site-header {
    z-index: 85;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(4, 3, 2, 0.7);
    backdrop-filter: blur(4px);
  }

  .nav-backdrop[hidden] {
    display: none;
  }
}

@media (max-width: 42rem) {
  body.scripture-first .brand-copy strong {
    font-size: var(--kd-text-base);
  }

  body.scripture-first .brand-mark {
    width: 2.4rem;
    height: 2.4rem;
  }

  body.scripture-first .brand-logo {
    width: 3.05rem;
    height: 3.05rem;
  }

  .sf-proclamation-intro {
    margin-top: 0.65rem;
    font-size: var(--kd-text-sm);
    line-height: 1.46;
  }

  .sf-topic-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Short labels (topic collections, Bible books) sit two to a row on phones;
     practical topics, which list references, keep the full width. */
  .sf-topic-grid:has(> [data-home-topic]),
  .sf-topic-grid:has(> .bible-book-card) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 0.65rem;
  }

  .sf-topic-card {
    min-height: 0;
    gap: 0.85rem;
    padding: 1rem 1rem 0.9rem;
    border-radius: 0.85rem;
  }

  .sf-index .sf-topic-card {
    min-height: 5.5rem;
  }

  .bible-book-card {
    min-height: 4.75rem;
  }

  .sf-topic-card span {
    font-size: var(--kd-text-base);
  }

  .topic-scripture h2 {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  body.scripture-first .footer-inner.sf-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-topic-card,
  .sf-topic-card small::after {
    transition: none;
  }

  .sf-topic-card:hover,
  .sf-topic-card:focus-visible,
  .sf-topic-card:hover small::after,
  .sf-topic-card:focus-visible small::after {
    transform: none;
  }
}

.sf-proclamation-intro {
  max-width: 47rem;
  margin: 1rem 0 0;
  color: #d0c3b1;
  font-family: var(--sans);
  font-size: var(--kd-text-base);
  line-height: 1.62;
}

.sf-proclamation-intro strong {
  color: var(--copper-bright, #f0b36a);
  font-weight: 700;
}

@media (max-width: 42rem) {
  .sf-home-hero .sf-proclamation-intro {
    margin-top: 0.45rem;
    font-size: var(--kd-text-xs);
    line-height: 1.34;
  }
}

.scripture-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin: 1rem 0 0;
  padding-top: 0.82rem;
  border-top: 1px solid rgba(240, 179, 106, 0.16);
}

.scripture-card-meta h2 {
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 0.6rem;
  margin: 0;
}

.scripture-card-response {
  display: grid;
  gap: 0.46rem;
  margin-top: 0.88rem;
  padding: 0.78rem 0.9rem;
  color: var(--muted, #b9ac99);
  background: rgba(13, 10, 8, 0.38);
  border: 1px solid rgba(240, 179, 106, 0.12);
  border-radius: 0.72rem;
}

.scripture-card-response h3 {
  margin: 0;
  color: var(--copper-bright, #f0b36a);
  font-family: var(--sans);
  font-size: var(--kd-text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.scripture-card-response p {
  margin: 0;
  color: inherit;
  font-family: var(--sans);
  font-size: clamp(var(--kd-text-sm), 1.55vw, var(--kd-text-base));
  line-height: 1.55;
}

.scripture-card-response strong {
  color: var(--copper-bright, #f0b36a);
  font-weight: 700;
}
.scripture-vote-controls {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(2.7rem, auto));
  gap: 0.42rem;
}

.scripture-vote {
  display: inline-flex;
  min-width: 2.7rem;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.42rem 0.52rem;
  color: var(--muted, #b9ac99);
  background: rgba(13, 10, 8, 0.68);
  border: 1px solid rgba(240, 179, 106, 0.2);
  border-radius: 0.72rem;
  font: inherit;
  font-size: var(--kd-text-xs);
  font-weight: 700;
  cursor: pointer;
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.scripture-vote:hover:not(:disabled),
.scripture-vote:focus-visible {
  color: var(--ivory, #f6efe3);
  background: rgba(216, 135, 75, 0.13);
  border-color: rgba(240, 179, 106, 0.48);
}

.scripture-vote-up[aria-pressed="true"] {
  color: var(--copper-bright, #f0b36a);
  background: rgba(216, 135, 75, 0.18);
  border-color: rgba(240, 179, 106, 0.68);
}

.scripture-vote-down[aria-pressed="true"] {
  color: #e8a690;
  background: rgba(177, 90, 66, 0.16);
  border-color: rgba(232, 166, 144, 0.56);
}

.scripture-vote:focus-visible {
  outline: 2px solid var(--copper-bright, #f0b36a);
  outline-offset: 2px;
}

.scripture-vote:active:not(:disabled) {
  transform: translateY(1px);
}

.scripture-vote:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.scripture-vote[aria-busy="true"] {
  cursor: progress;
}

.scripture-vote-count {
  min-width: 1ch;
  color: currentColor;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.topic-scripture[data-rating-state="saving"] {
  opacity: 0.84;
}

@media (max-width: 42rem) {
  .scripture-card-meta {
    gap: 0.6rem;
  }

  .scripture-card-meta h2 {
    flex-basis: 100%;
  }

  .scripture-vote-controls {
    grid-template-columns: repeat(2, minmax(2.45rem, auto));
    gap: 0.32rem;
  }

  .scripture-vote {
    min-width: 2.45rem;
    min-height: 2.4rem;
    padding: 0.36rem 0.42rem;
  }
}

.sf-page-kicker,
.sf-guidance-label {
  margin: 0 0 0.55rem;
  color: var(--copper-bright, #f0b36a);
  font-size: var(--kd-text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sf-deliverance-hub {
  padding: clamp(2.5rem, 6vw, 4.8rem) 0 clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 135, 75, 0.11), transparent 34rem),
    linear-gradient(180deg, rgba(36, 29, 23, 0.5), rgba(13, 10, 8, 0.08));
  border-bottom: 1px solid rgba(240, 179, 106, 0.13);
}

.sf-deliverance-hub-intro {
  width: min(100%, 55rem);
  margin: 0 auto clamp(2.25rem, 5vw, 3.75rem);
  text-align: center;
}

.sf-deliverance-hub-intro h2 {
  max-width: 24ch;
  margin: 0 auto;
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: var(--kd-text-3xl);
  line-height: 1.08;
  text-wrap: balance;
}

.sf-deliverance-hub-intro > p:not(.sf-page-kicker) {
  max-width: 48rem;
  margin: 0.9rem auto 0;
  color: var(--muted, #b9ac99);
  line-height: 1.68;
}

.sf-deliverance-hub-intro .sf-editorial-note {
  padding: 0.9rem 1rem;
  background: rgba(13, 10, 8, 0.48);
  border: 1px solid rgba(240, 179, 106, 0.16);
  border-radius: 0.9rem;
  font-size: var(--kd-text-sm);
}

.sf-deliverance-groups {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}

.sf-deliverance-group > header {
  width: min(100%, 48rem);
  margin: 0 auto 1.25rem;
  text-align: center;
}

.sf-deliverance-group h3 {
  margin: 0;
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: clamp(var(--kd-text-xl), 2.6vw, var(--kd-text-3xl));
  line-height: 1.15;
}

.sf-deliverance-group > header p {
  margin: 0.65rem 0 0;
  color: var(--muted, #b9ac99);
  line-height: 1.55;
}

.sf-deliverance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.85rem;
}

.sf-deliverance-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 9.25rem;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.15rem 2.75rem 1.15rem 1.2rem;
  color: var(--text, #f3eadb);
  background: linear-gradient(145deg, rgba(43, 34, 26, 0.96), rgba(21, 17, 13, 0.99));
  border: 1px solid rgba(240, 179, 106, 0.17);
  border-radius: 0.95rem;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.sf-deliverance-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.2rem;
  background: linear-gradient(180deg, var(--copper-bright, #f0b36a), var(--copper-deep, #8e4f29));
  opacity: 0.78;
}

.sf-deliverance-card::after {
  content: "→";
  position: absolute;
  right: 1rem;
  top: 50%;
  color: var(--copper, #d8874b);
  transform: translateY(-50%);
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.sf-deliverance-card:hover,
.sf-deliverance-card:focus-visible {
  background: linear-gradient(145deg, rgba(53, 41, 31, 0.99), rgba(27, 21, 16, 1));
  border-color: rgba(240, 179, 106, 0.52);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(216, 135, 75, 0.1);
  transform: translateY(-2px);
}

.sf-deliverance-card:focus-visible {
  outline: 2px solid var(--copper-bright, #f0b36a);
  outline-offset: 3px;
}

.sf-deliverance-card:hover::after,
.sf-deliverance-card:focus-visible::after {
  color: var(--copper-bright, #f0b36a);
  transform: translate(0.15rem, -50%);
}

.sf-deliverance-card span {
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: var(--kd-text-lg);
  font-weight: 700;
  line-height: 1.22;
}

.sf-deliverance-card small {
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
  line-height: 1.42;
}

.sf-deliverance-card b {
  color: var(--olive, #a5ad62);
  font-size: var(--kd-text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sf-topic-guidance {
  padding: clamp(2.2rem, 5vw, 3.8rem) 0 0;
  background: linear-gradient(180deg, rgba(36, 29, 23, 0.24), rgba(13, 10, 8, 0));
}

.sf-guidance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.sf-guidance-card,
.sf-safety-note {
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  background: linear-gradient(145deg, rgba(39, 31, 24, 0.88), rgba(21, 17, 13, 0.98));
  border: 1px solid rgba(240, 179, 106, 0.17);
  border-radius: 0.95rem;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

.sf-guidance-card h2,
.sf-safety-note h2,
.sf-scripture-intro h2,
.sf-related-topics h2 {
  margin: 0;
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: clamp(var(--kd-text-lg), 2vw, var(--kd-text-2xl));
  line-height: 1.2;
}

.sf-guidance-card > p:last-child,
.sf-safety-note p,
.sf-scripture-intro > p:last-child {
  margin: 0.75rem 0 0;
  color: var(--muted, #b9ac99);
  line-height: 1.62;
}

.sf-guidance-caution {
  border-color: rgba(165, 173, 98, 0.33);
}

.sf-safety-note {
  margin-top: 1rem;
  background: linear-gradient(145deg, rgba(74, 35, 29, 0.94), rgba(31, 20, 17, 0.99));
  border-color: rgba(232, 166, 144, 0.55);
}

.sf-safety-note h2 {
  color: #ffd5c8;
}

.sf-safety-note p {
  color: #f3ddd6;
}

.sf-scripture-intro {
  margin: 0 0 1.2rem;
  padding: 0 0 1.2rem;
  border-bottom: 1px solid rgba(240, 179, 106, 0.16);
}

.sf-translation-note {
  margin: 1.2rem 0 0;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-xs);
  line-height: 1.5;
}

.sf-related-topics {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid rgba(240, 179, 106, 0.16);
}

.sf-related-topics > h2 {
  margin-bottom: 1rem;
}

.sf-related-topics > p {
  margin: 1.1rem 0 0;
}

.sf-related-topics > p a {
  color: var(--copper-bright, #f0b36a);
  font-weight: 700;
}

.page-utilities {
  width: min(100% - 2rem, 52rem);
  margin: clamp(-4rem, -5vw, -2rem) auto clamp(3.5rem, 8vw, 6rem);
  padding: 1rem;
  background: rgba(27, 22, 18, 0.78);
  border: 1px solid rgba(240, 179, 106, 0.17);
  border-radius: 1rem;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.page-utilities-label {
  margin: 0 0 0.72rem;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-utilities-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.48rem;
}

.page-utility-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.78rem;
  color: var(--text, #f3eadb);
  background: rgba(13, 10, 8, 0.72);
  border: 1px solid rgba(240, 179, 106, 0.23);
  border-radius: 0.72rem;
  font: inherit;
  font-size: var(--kd-text-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.page-utility-button:hover,
.page-utility-button:focus-visible {
  color: var(--ivory, #f6efe3);
  background: rgba(216, 135, 75, 0.16);
  border-color: rgba(240, 179, 106, 0.58);
}

.page-utility-button:focus-visible {
  outline: 2px solid var(--copper-bright, #f0b36a);
  outline-offset: 2px;
}

.page-utility-button:active {
  transform: translateY(1px);
}

.page-utility-button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.72;
}

.page-utility-print {
  color: var(--copper-bright, #f0b36a);
}

.page-utilities-status {
  min-height: 1.15rem;
  margin: 0.65rem 0 0;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-xs);
}

.page-utilities-status[data-state="success"] {
  color: #cbd58b;
}

.page-utilities-status[data-state="error"] {
  color: #f1b3a0;
}

.print-source {
  display: none;
}

@media (max-width: 52rem) {
  .sf-guidance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 42rem) {
  .sf-deliverance-hub,
  .sf-topic-guidance {
    text-align: center;
  }

  .sf-deliverance-grid {
    grid-template-columns: 1fr;
  }

  .sf-deliverance-card {
    min-height: 0;
    align-items: center;
    padding: 1.1rem;
    text-align: center;
  }

  .sf-deliverance-card::after {
    display: none;
  }

  .sf-guidance-card,
  .sf-safety-note,
  .sf-scripture-intro {
    text-align: left;
  }

  .page-utilities {
    margin-top: -2rem;
  }

  .page-utilities-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-utility-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-deliverance-card,
  .sf-deliverance-card::after,
  .page-utility-button {
    transition: none;
  }

  .sf-deliverance-card:hover,
  .sf-deliverance-card:focus-visible,
  .page-utility-button:active {
    transform: none;
  }
}

@media print {
  @page {
    margin: 0.6in;
  }

  html,
  body.scripture-first {
    color-scheme: light;
    background: #fff !important;
    color: #000 !important;
  }

  body.scripture-first {
    font-size: 10.5pt;
  }

  body.scripture-first .site-header,
  body.scripture-first .site-footer,
  .sf-back,
  .sf-search,
  .scripture-vote-controls,
  .scripture-ratings-state,
  .sf-deliverance-hub,
  .sf-related-topics,
  .page-utilities-label,
  .page-utilities-actions,
  .page-utilities-status,
  [data-recommendation-form],
  .recommendation-form,
  form,
  nav:not(.sf-related-topics) {
    display: none !important;
  }

  .scripture-first-main,
  .sf-hero,
  .sf-topic-guidance,
  .sf-reading,
  .page-shell,
  .sf-reading-shell {
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .sf-hero {
    overflow: visible !important;
    padding-bottom: 0.2in !important;
    border-bottom: 1px solid #999 !important;
  }

  .sf-deliverance-card::before,
  .sf-deliverance-card::after {
    display: none !important;
  }

  body.scripture-first h1,
  body.scripture-first h2,
  body.scripture-first h3,
  body.scripture-first p,
  body.scripture-first small,
  body.scripture-first strong,
  body.scripture-first b,
  body.scripture-first a,
  body.scripture-first blockquote,
  body.scripture-first span {
    color: #000 !important;
    text-shadow: none !important;
  }

  body.scripture-first h1 {
    max-width: none;
    font-size: 24pt;
  }

  .sf-page-kicker,
  .sf-guidance-label {
    color: #333 !important;
  }

  .sf-guidance-grid {
    display: block !important;
    margin: 0.18in 0 !important;
  }

  .sf-guidance-card,
  .sf-safety-note,
  .sf-scripture-intro,
  .topic-scripture,
  .topic-confession {
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 0.14in !important;
    padding: 0.12in !important;
    color: #000 !important;
    background: transparent !important;
    border: 1px solid #999 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .sf-safety-note {
    border-width: 2px !important;
  }

  .scripture-sequence {
    display: block !important;
  }

  .topic-scripture h2 {
    display: block !important;
    margin-bottom: 0.06in !important;
    font-size: 11pt !important;
  }

  .topic-scripture blockquote p,
  .topic-scripture > p,
  .topic-confession p {
    font-size: 10.5pt !important;
    line-height: 1.45 !important;
  }

  .topic-scripture + .topic-scripture {
    margin-top: 0.1in !important;
  }

  .sf-translation-note {
    margin: 0.16in 0 0 !important;
    font-size: 8.5pt !important;
  }

  .page-utilities {
    display: block !important;
    width: auto !important;
    margin: 0.2in 0 0 !important;
    padding: 0.08in 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid #999 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
  }

  .print-source {
    display: block !important;
    margin: 0 !important;
    color: #333 !important;
    font-size: 8.5pt !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
  }
}

/* Launch completion: Bible-first subtopics and visitor recommendations. */
.sf-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  margin: 0 0 1rem;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-xs);
  line-height: 1.45;
}

.sf-breadcrumb a {
  color: var(--copper-bright, #f0b36a);
  font-weight: 700;
  text-decoration: none;
}

.sf-breadcrumb a:hover,
.sf-breadcrumb a:focus-visible {
  color: var(--olive, #a5ad62);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.sf-subtopic-intro {
  padding: clamp(1.45rem, 3vw, 2.25rem) 0 0;
}

.sf-subtopic-intro p {
  margin: 0;
  color: #d0c3b1;
  font-size: clamp(var(--kd-text-base), 1.7vw, var(--kd-text-lg));
  line-height: 1.7;
}

.sf-subtopic-explorer {
  padding: clamp(2.2rem, 5vw, 3.8rem) 0;
  background: linear-gradient(180deg, rgba(44, 34, 26, 0.54), rgba(13, 10, 8, 0.15));
  border-bottom: 1px solid rgba(240, 179, 106, 0.13);
}

.sf-subtopic-explorer header {
  max-width: 48rem;
  margin-bottom: 1.35rem;
}

.sf-subtopic-explorer h2,
.sf-related-topics h2 {
  margin: 0;
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: clamp(var(--kd-text-2xl), 3vw, var(--kd-text-3xl));
  line-height: 1.15;
}

.sf-subtopic-explorer header > p:last-child {
  margin: 0.7rem 0 0;
  color: var(--muted, #b9ac99);
  line-height: 1.65;
}

.sf-subtopic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.85rem;
}

.sf-subtopic-card {
  position: relative;
  display: flex;
  min-height: 8.25rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.1rem 3rem 1.1rem 1.1rem;
  color: var(--text, #f3eadb);
  background: linear-gradient(145deg, rgba(42, 33, 25, 0.96), rgba(21, 16, 13, 0.99));
  border: 1px solid rgba(240, 179, 106, 0.18);
  border-radius: 0.95rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.23);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.sf-subtopic-card > span {
  color: var(--ivory, #f6efe3);
  font-family: var(--serif);
  font-size: var(--kd-text-lg);
  font-weight: 700;
  line-height: 1.22;
}

.sf-subtopic-card small {
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
  line-height: 1.45;
}

.sf-subtopic-card b {
  position: absolute;
  right: 1rem;
  top: 50%;
  color: var(--copper, #d8874b);
  font-size: var(--kd-text-xl);
  transform: translateY(-50%);
}

.sf-subtopic-card:hover,
.sf-subtopic-card:focus-visible {
  border-color: rgba(240, 179, 106, 0.5);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.37);
  transform: translateY(-2px);
}

.sf-related-topics {
  margin-top: clamp(2.2rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(240, 179, 106, 0.14);
}

.sf-related-topics h2 {
  font-size: clamp(var(--kd-text-xl), 2vw, var(--kd-text-2xl));
}

.sf-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.sf-related-grid a {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  color: var(--ivory, #f6efe3);
  background: rgba(31, 24, 19, 0.78);
  border: 1px solid rgba(240, 179, 106, 0.15);
  border-radius: 0.75rem;
  font-size: var(--kd-text-sm);
  font-weight: 700;
  text-decoration: none;
}

.sf-related-grid a:hover,
.sf-related-grid a:focus-visible {
  color: var(--copper-bright, #f0b36a);
  border-color: rgba(240, 179, 106, 0.45);
}

.site-recommendation {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  background: linear-gradient(180deg, rgba(13, 10, 8, 0), rgba(42, 32, 24, 0.52));
  border-top: 1px solid rgba(240, 179, 106, 0.12);
}

.site-recommendation details {
  overflow: hidden;
  background: linear-gradient(145deg, rgba(40, 31, 24, 0.96), rgba(20, 16, 12, 0.99));
  border: 1px solid rgba(240, 179, 106, 0.23);
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

.site-recommendation summary {
  position: relative;
  display: flex;
  min-height: 4.4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 3.2rem 1rem 1.15rem;
  color: var(--ivory, #f6efe3);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.site-recommendation summary::-webkit-details-marker {
  display: none;
}

.site-recommendation summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  color: var(--copper-bright, #f0b36a);
  font-size: var(--kd-text-2xl);
  line-height: 1;
}

.site-recommendation details[open] summary::after {
  content: "−";
}

.site-recommendation summary:focus-visible {
  outline: 2px solid var(--copper-bright, #f0b36a);
  outline-offset: -3px;
}

.recommendation-panel {
  padding: 0 1.15rem 1.25rem;
  border-top: 1px solid rgba(240, 179, 106, 0.12);
}

.recommendation-panel > p {
  max-width: 46rem;
  margin: 1rem 0;
  color: var(--muted, #b9ac99);
  line-height: 1.62;
}

.scripture-recommendation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.recommendation-field {
  display: grid;
  gap: 0.38rem;
  color: #d8cdbc;
  font-size: var(--kd-text-sm);
  font-weight: 700;
}

.recommendation-field-wide {
  grid-column: 1 / -1;
}

.recommendation-field input,
.recommendation-field select,
.recommendation-field textarea {
  width: 100%;
  min-height: 2.95rem;
  padding: 0.72rem 0.8rem;
  color: var(--text, #f3eadb);
  background: rgba(13, 10, 8, 0.7);
  border: 1px solid rgba(240, 179, 106, 0.24);
  border-radius: 0.7rem;
  font: inherit;
  font-weight: 520;
}

.recommendation-field textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.5;
}

.recommendation-field input:focus,
.recommendation-field select:focus,
.recommendation-field textarea:focus {
  outline: 2px solid var(--copper-bright, #f0b36a);
  outline-offset: 1px;
  border-color: transparent;
}

.recommendation-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.recommendation-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.recommendation-submit {
  min-height: 2.9rem;
  padding: 0.7rem 1rem;
  color: #160e08;
  background: var(--copper-bright, #f0b36a);
  border: 0;
  border-radius: 0.72rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.recommendation-submit:hover,
.recommendation-submit:focus-visible {
  background: #ffc27b;
}

.recommendation-submit:focus-visible {
  outline: 2px solid var(--ivory, #f6efe3);
  outline-offset: 2px;
}

.recommendation-submit:disabled {
  cursor: progress;
  opacity: 0.68;
}

.recommendation-status {
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
  line-height: 1.45;
}

.recommendation-status[data-state="success"] {
  color: var(--olive, #a5ad62);
}

.recommendation-status[data-state="error"] {
  color: #e7b9a0;
}

.recommendation-privacy {
  grid-column: 1 / -1;
  margin: -0.15rem 0 0;
  color: #a89b89;
  font-size: var(--kd-text-xs);
  line-height: 1.45;
}

@media (max-width: 42rem) {
  .sf-subtopic-grid,
  .scripture-recommendation-form {
    grid-template-columns: 1fr;
  }

  .recommendation-field-wide,
  .recommendation-actions,
  .recommendation-privacy {
    grid-column: auto;
  }

  .site-recommendation summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-subtopic-card {
    transition: none;
  }

  .sf-subtopic-card:hover,
  .sf-subtopic-card:focus-visible {
    transform: none;
  }
}

/* Internal relevance tiers stay in data for ordering, but all public card accents are intentionally uniform. */
.topic-scripture[data-tier] {
  border-left-color: rgba(216, 135, 75, 0.58);
}
@media print {
  .site-recommendation,
  .nav-backdrop,
  .scripture-vote-controls {
    display: none !important;
  }
}

/* Declare, proclaim, and confess publication flow */
/* One column for every section: the same width and 1rem gutter as the header
   and footer (.header-inner), so all content shares one left edge. */
.sf-page-flow {
  box-sizing: border-box;
  width: min(100% - 2rem, var(--max, 74rem));
  min-width: 0;
  margin-inline: auto;
  padding-inline: 0;
}

/* Reading pages (topics, Bible chapters) keep a readable measure; the hero and
   the recommendation form join that same centered column. */
body:has(main > .sf-reading) .sf-page-flow {
  width: min(100% - 2rem, 52rem);
}

.sf-page-flow > *,
.sf-topic-grid > * {
  min-width: 0;
}

.sf-home-flow {
  display: grid;
  justify-items: center;
  gap: 0;
  text-align: center;
}

.sf-education-hero h1 {
  max-width: 24ch;
}

/* Compact, responsive homepage headline. */
body.scripture-first .sf-home-flow h1 {
  max-width: 15.5em;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.sf-home-search {
  display: grid;
  width: min(100%, 46rem);
  min-width: 0;
  gap: 0.65rem;
  margin: clamp(1.5rem, 3vw, 2.1rem) 0 0;
}

.sf-home-search label {
  color: var(--copper-bright, #f0b36a);
  font-size: var(--kd-text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The home hero is a short centred stack: the search sits under the heading, and
   its label stays for assistive technology while the helper line under the field
   is the visible instruction. */
.sf-home-flow .sf-home-search {
  gap: 0.75rem;
  margin-inline: auto;
  text-align: start;
}

.sf-home-flow .sf-home-search > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sf-search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.sf-search-field::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  z-index: 1;
  width: 1.2rem;
  height: 1.2rem;
  background-color: var(--copper, #d8874b);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  pointer-events: none;
}

.sf-home-search input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 3.75rem;
  padding: 0.9rem 5.75rem 0.9rem 3.25rem;
  color: var(--text, #f3eadb);
  background: rgba(13, 10, 8, 0.82);
  border: 1px solid rgba(240, 179, 106, 0.38);
  border-radius: 999px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  font: inherit;
  font-size: var(--kd-text-base);
  transition: border-color 150ms ease;
}

.sf-home-search input::placeholder {
  color: rgba(185, 172, 153, 0.72);
}

.sf-home-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.sf-home-search input:hover {
  border-color: rgba(240, 179, 106, 0.58);
}

.sf-home-search input:focus-visible {
  outline: 3px solid var(--copper-bright, #f0b36a);
  outline-offset: 2px;
  border-color: transparent;
}

.sf-home-search .sf-search-clear {
  position: absolute;
  right: 0.45rem;
  width: auto;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.sf-search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.6rem;
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
  line-height: 1.5;
}

.sf-home-flow .sf-search-meta {
  justify-content: center;
  font-size: var(--kd-text-sm);
}

.sf-search-meta .sf-search-help {
  font-size: inherit;
}

.sf-home-search .sf-count {
  margin: 0;
  color: var(--muted, #b9ac99);
  font-size: inherit;
}

.sf-home-search:has(input:placeholder-shown) .sf-count::before {
  content: "·";
  margin-right: 0.6rem;
}

/* While a query is typed, the result count replaces the hint. */
.sf-home-search:has(input:not(:placeholder-shown)) .sf-search-help {
  display: none;
}

.sf-search-help,
.sf-search-fallback,
.sf-empty {
  color: var(--muted, #b9ac99);
  font-size: var(--kd-text-sm);
  line-height: 1.5;
}

.sf-topic-card-featured {
  border-color: rgba(240, 179, 106, 0.52);
  background-image: linear-gradient(145deg, rgba(89, 54, 31, 0.98), rgba(30, 22, 16, 0.98));
}

.sf-page-kicker,
.sf-proclamation-label {
  margin: 0 0 0.55rem;
  color: var(--copper-bright, #f0b36a);
  font-family: var(--sans);
  font-size: var(--kd-text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sf-reading-flow > .scripture-sequence,
.sf-reading-flow > .topic-confession,
.sf-reading-flow > .sf-proclamation-foundations {
  width: min(100%, 52rem);
  margin-inline: auto;
}
/* The reading section's own padding already separates it from the title. */
.sf-reading-flow > .topic-confession:first-child {
  margin-top: 0;
}

.sf-reading-flow .sf-proclamation-intro,
.sf-education-hero > .sf-page-flow > p {
  max-width: 52rem;
}

.topic-confession h2 {
  margin-top: 0;
}

/* A label, not a banner: the generic h2 size made it three lines on phones. */
body.scripture-first .topic-confession h2 {
  font-size: var(--kd-text-sm);
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.sf-education-copy {
  width: min(100%, 72rem);
  min-width: 0;
  margin-inline: auto;
}

.sf-education-copy > section + section {
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.sf-education-copy p,
.sf-education-copy li {
  max-width: 72ch;
  color: #d0c3b1;
  line-height: 1.72;
}

.sf-definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.sf-definition-grid article,
.sf-guardrail-card {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line, rgba(240, 179, 106, 0.18));
  border-radius: 1rem;
  background: rgba(27, 22, 18, 0.78);
}

.sf-definition-grid h3 {
  margin: 0 0 0.55rem;
  color: var(--ivory, #f6efe3);
}

.sf-definition-grid p {
  margin: 0;
}

.sf-source-links {
  display: grid;
  gap: 0.6rem;
  padding-left: 1.2rem;
}

.sf-source-links a {
  overflow-wrap: anywhere;
}

.sf-education-cta {
  margin-top: 2rem;
}

@media (max-width: 42rem) {
  .sf-home-search,
  .sf-home-search input,
  .sf-topic-card {
    width: 100%;
    min-width: 0;
  }

  .sf-definition-grid {
    grid-template-columns: 1fr;
  }
}

/* Reading actions share the existing copper and ivory palette. */
.scripture-reading-shortcuts,
.scripture-passage-actions,
.scripture-reader-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
[data-topic-search] [hidden] {
  display: none !important;
}
.scripture-reading-shortcuts {
  margin-top: 1.1rem;
  gap: 0.5rem;
}
.scripture-reading-shortcuts a,
.scripture-reading-shortcuts button,
.scripture-passage-actions a,
.scripture-passage-actions button,
.scripture-reader-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line, #776047);
  border-radius: 0.45rem;
  background: #211911;
  color: var(--copper-bright, #f0b36a);
  font: 600 var(--kd-text-sm)/1.4 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.scripture-voice-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.scripture-voice-reader svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}
.scripture-reader-tools :is([data-voice-play], [data-voice-settings]) {
  gap: 0.45rem;
}
.scripture-voice-reader
  :is([data-voice-prev], [data-voice-pause], [data-voice-next], [data-voice-stop], [data-voice-collapse]) {
  width: 44px;
  padding: 0;
}
/* Idle, the reader is Listen and the settings; the rest appears while reading.
   The arrow shrinks the docked player to one slim row. */
.scripture-voice-reader:not([data-voice-docked])
  :is(
    [data-voice-prev],
    [data-voice-pause],
    [data-voice-next],
    [data-voice-stop],
    [data-voice-collapse],
    .scripture-voice-progress
  ),
.scripture-voice-status:empty,
.scripture-voice-progress span:empty,
[data-voice-docked] [data-voice-play],
[data-voice-collapsed]
  :is(
    [data-voice-prev],
    [data-voice-next],
    [data-voice-settings],
    .scripture-voice-progress,
    .scripture-voice-settings
  ) {
  display: none;
}
.scripture-voice-dock {
  display: flex;
  flex-direction: column;
}

/* While reading or paused, the player spans the bottom edge of the screen. */
[data-voice-docked] .scripture-voice-dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 75;
  box-sizing: border-box;
  padding: 0.5rem max(0.75rem, calc((100% - 52rem) / 2)) calc(0.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(240, 179, 106, 0.34);
  background: #140f0b;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}
[data-voice-collapsed] .scripture-voice-dock {
  padding-block: 0.375rem calc(0.375rem + env(safe-area-inset-bottom));
}
/* Collapsed, a hairline along the top edge shows how far the passage has played. */
[data-voice-collapsed] .scripture-voice-dock::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 2px;
  background: #f0b36a;
  transform: scaleX(var(--voice-progress, 0));
  transform-origin: left;
}
[data-voice-docked] .scripture-voice-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "status controls collapse"
    "progress controls collapse";
  align-items: center;
  gap: 0.1rem 0.5rem;
}
[data-voice-collapsed] .scripture-voice-bar {
  grid-template-areas: "status controls collapse";
}
.scripture-voice-bar > .scripture-voice-status {
  grid-area: status;
}
.scripture-voice-bar > .scripture-voice-progress {
  grid-area: progress;
}
.scripture-voice-bar > .scripture-voice-controls {
  grid-area: controls;
}
.scripture-voice-bar > [data-voice-collapse] {
  grid-area: collapse;
}
[data-voice-docked] .scripture-voice-controls {
  flex-wrap: nowrap;
}
.scripture-reader-tools .scripture-voice-status {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: none;
  color: var(--ivory, #f6efe3);
  font: 650 var(--kd-text-sm)/1.35 var(--sans);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-voice-docked] [data-voice-pause] {
  border-color: #f0b36a;
  background: #f0b36a;
}
/* A fill, not a text color, so the light theme inverts it to a pale icon on its darker copper. */
[data-voice-docked] [data-voice-pause] svg {
  fill: #160f09;
}
.scripture-voice-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.scripture-voice-progress input {
  flex: 1;
  min-width: 0;
  height: 1.5rem;
  min-height: 0;
  margin: 0;
  accent-color: #f0b36a;
  cursor: pointer;
}
.scripture-voice-progress input:disabled {
  opacity: 0.45;
  cursor: default;
}
.scripture-voice-progress span {
  color: #c6baa8;
  font: var(--kd-text-xs)/1 var(--sans);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 40rem) {
  [data-voice-docked]:not([data-voice-collapsed]) .scripture-voice-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "status status"
      "progress progress"
      "controls collapse";
    gap: 0.15rem 0.375rem;
  }
  [data-voice-docked] .scripture-voice-controls {
    justify-content: space-between;
    gap: 0.375rem;
  }
}
@media (max-width: 22rem) {
  [data-voice-docked] [data-voice-settings] span {
    display: none;
  }
  [data-voice-docked] [data-voice-settings] {
    width: 44px;
    padding: 0;
  }
}

/* Reading settings: under the Listen button, or above the docked player. */
.scripture-voice-settings {
  order: 1;
  display: grid;
  gap: 0.9rem;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid rgba(240, 179, 106, 0.28);
  border-radius: 0.75rem;
  background: #1a130d;
  color: var(--ivory, #f6efe3);
  font: var(--kd-text-sm)/1.45 var(--sans);
}
.scripture-voice-settings[hidden] {
  display: none;
}
[data-voice-docked] .scripture-voice-settings {
  order: -1;
  max-height: min(60vh, 28rem);
  margin: 0 0 0.6rem;
  overflow-y: auto;
}
.scripture-voice-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.scripture-voice-settings-head strong {
  font-size: var(--kd-text-base);
}
.scripture-voice-speeds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.scripture-voice-speeds legend,
.scripture-voice-field > span {
  float: left;
  width: 100%;
  margin: 0 0 0.35rem;
  padding: 0;
  color: #c6baa8;
  font-size: var(--kd-text-xs);
  font-weight: 600;
}
.scripture-voice-speeds label {
  position: relative;
}
.scripture-voice-speeds input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.scripture-voice-speeds span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  min-height: 44px;
  padding: 0 0.6rem;
  border: 1px solid var(--line, #776047);
  border-radius: 0.45rem;
  background: #211911;
  color: #f0b36a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.scripture-voice-speeds input:checked + span {
  border: 2px solid #f0b36a;
  background: rgba(240, 179, 106, 0.18);
  color: #f6efe3;
}
.scripture-voice-speeds input:focus-visible + span {
  outline: 3px solid #f0b36a;
  outline-offset: 2px;
}
.scripture-voice-field select {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #806342;
  border-radius: 0.45rem;
  background: #120e0a;
  color: #f3eadb;
  font: inherit;
}
.scripture-voice-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  cursor: pointer;
}
.scripture-voice-check input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: #f0b36a;
}

/* Keep the last passage clear of the docked player, and no more. */
body:has([data-voice-docked]) {
  padding-bottom: calc(var(--voice-dock-space, 7rem) + 0.5rem);
}
.scripture-voice-reader button:disabled {
  opacity: 0.6;
  cursor: default;
}
.topic-scripture.is-reading,
.is-reading-part {
  outline: 2px solid #f0b36a;
  outline-offset: 4px;
}
.is-reading-verse {
  border-radius: 0.2em;
  background: rgba(240, 179, 106, 0.16);
  box-shadow: 0 0 0 0.15em rgba(240, 179, 106, 0.16);
}
.scripture-reader-tools :focus-visible,
.scripture-reading-shortcuts :focus-visible,
.scripture-passage-actions :focus-visible {
  outline: 3px solid #f0b36a;
  outline-offset: 3px;
}
.scripture-reader-tools {
  max-width: 52rem;
  margin: 1.5rem auto 1rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--line, #776047);
  scroll-margin-top: 6rem;
}
.scripture-reader-search input {
  flex: 1 1 15rem;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #806342;
  border-radius: 0.45rem;
  padding: 0.65rem 0.8rem;
  background: #120e0a;
  color: #f3eadb;
  font: inherit;
}
.scripture-reader-tools p:empty {
  display: none;
}
.scripture-reader-tools p {
  margin: 0.7rem 0 0;
  color: #c6baa8;
  font: var(--kd-text-sm)/1.6 var(--sans);
}
.scripture-passage-actions {
  margin-top: 1.1rem;
}
.scripture-passage-actions [role="status"] {
  color: #c6baa8;
  font: var(--kd-text-sm)/1.5 var(--sans);
}
.topic-scripture[id],
.scripture-sequence[id] {
  scroll-margin-top: 6rem;
}
.topic-scripture:target {
  outline: 2px solid #f0b36a;
  outline-offset: 4px;
}
.topic-scripture[hidden] {
  display: none !important;
}
@media print {
  .scripture-reading-shortcuts,
  .scripture-reader-tools,
  .scripture-passage-actions,
  .scripture-voice-reader {
    display: none !important;
  }
  .topic-scripture[hidden] {
    display: block !important;
  }
  .topic-scripture:target {
    outline: none;
  }
}

/* Speak Scripture declaration/proclamation/confession closeout */
.scripture-vote-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 18rem);
}

.scripture-vote {
  min-width: 44px;
  min-height: 44px;
}

.scripture-vote-label {
  font-size: var(--kd-text-xs);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.recommendation-field select {
  -webkit-appearance: menulist;
  appearance: auto;
  padding-right: 2.25rem;
  color-scheme: dark;
}

/* Reading pickers match the dark fields instead of the platform's grey control. */
.bible-chapter-select select,
.bible-search-scope select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  color: var(--text, #f3eadb);
  background-color: #120e0a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23d8874b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.85rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  border: 1px solid rgba(240, 179, 106, 0.38);
  font: inherit;
  cursor: pointer;
  color-scheme: dark;
}

.bible-chapter-select select:hover,
.bible-search-scope select:hover {
  border-color: rgba(240, 179, 106, 0.62);
}

.bible-chapter-select select:focus-visible,
.bible-search-scope select:focus-visible {
  outline: 3px solid var(--copper-bright, #f0b36a);
  outline-offset: 2px;
}

@media (max-width: 42rem) {
  .sf-reading-shell {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .sf-reading-flow > .scripture-sequence,
  .sf-reading-flow > .topic-confession,
  .sf-reading-flow > .sf-proclamation-foundations,
  .scripture-vote-controls {
    width: 100%;
    margin-inline: 0;
  }
}

/* Bible reader (/bible/) */
.bible-chapter-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin: 1.1rem 0 0;
}

.bible-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(214, 160, 105, 0.45);
  border-radius: 999px;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.bible-nav-link:hover,
.bible-nav-link:focus-visible {
  border-color: rgba(214, 160, 105, 0.95);
  background: rgba(214, 160, 105, 0.12);
}

.bible-nav-link.is-disabled {
  opacity: 0.4;
}

.bible-chapter-select select {
  min-height: 44px;
  max-width: 100%;
  padding: 0.4rem 2.5rem 0.4rem 0.9rem;
  border-radius: 999px;
}

/* Previous | chapter picker | next; on phones the picker gets its own row. */
.bible-chapter-nav:has(.bible-chapter-select) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.bible-chapter-nav:has(.bible-chapter-select) .bible-chapter-select {
  justify-self: center;
  min-width: 0;
}

.bible-chapter-nav > .bible-nav-link:last-child {
  justify-self: end;
}

@media (max-width: 30rem) {
  .bible-chapter-nav:has(.bible-chapter-select) {
    grid-template-columns: 1fr 1fr;
  }

  .bible-chapter-nav:has(.bible-chapter-select) .bible-chapter-select {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: stretch;
  }

  .bible-chapter-select select {
    width: 100%;
  }

  .bible-chapter-nav .bible-nav-link {
    justify-content: center;
  }

  /* Book pages: previous and next book share a row under "Start at chapter 1". */
  .bible-chapter-nav:not(:has(.bible-chapter-select)) {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .bible-chapter-nav:not(:has(.bible-chapter-select)) a.bible-nav-link:not([rel]) {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .bible-chapter-nav > .bible-nav-link:last-child {
    justify-self: stretch;
  }
}

.bible-chapter .verse {
  display: block;
  margin: 0 0 0.55em;
  scroll-margin-top: 5rem;
}

.bible-chapter .verse sup {
  cursor: pointer;
  margin-right: 0.35em;
}

.bible-chapter .verse.is-target {
  padding: 0.15em 0.4em;
  margin-inline: -0.4em;
  border-radius: 0.4em;
  background: rgba(214, 160, 105, 0.16);
  box-shadow: inset 3px 0 0 rgba(214, 160, 105, 0.9);
}

.bible-chapter-meta {
  margin-top: 1rem;
  font-size: var(--kd-text-base);
  opacity: 0.75;
}

.bible-chapter-meta p {
  margin: 0;
}

.bible-continue {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0 0;
  font-weight: 600;
}

.bible-continue input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #d6a069;
}

.bible-jump {
  margin: 1.25rem 0 0;
}

.bible-jump label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.bible-jump-row {
  display: flex;
  gap: 0.5rem;
}

/* Same field as the topic search: dark pill, copper border, copper action. */
.bible-jump-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  color: var(--text, #f3eadb);
  background: rgba(13, 10, 8, 0.82);
  border: 1px solid rgba(240, 179, 106, 0.38);
  border-radius: 999px;
  font: inherit;
  font-size: var(--kd-text-base);
}

.bible-jump-row input::placeholder {
  color: rgba(185, 172, 153, 0.72);
}

.bible-jump-row input:hover {
  border-color: rgba(240, 179, 106, 0.58);
}

.bible-jump-row input:focus-visible {
  outline: 3px solid var(--copper-bright, #f0b36a);
  outline-offset: 2px;
  border-color: transparent;
}

.bible-jump-row button {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0.55rem 1.35rem;
  color: #160e08;
  background: var(--copper-bright, #f0b36a);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.bible-jump-row button:hover,
.bible-jump-row button:focus-visible {
  background: #ffc27b;
}

.bible-jump-row button:focus-visible {
  outline: 2px solid var(--ivory, #f6efe3);
  outline-offset: 2px;
}

.bible-jump-status {
  min-height: 1.3em;
  margin: 0.4rem 0 0;
  font-size: var(--kd-text-sm);
}

.bible-continue-reading {
  margin-top: 0.9rem;
  font-weight: 700;
}

.bible-section-title {
  margin: 0 0 0.75rem;
}

.bible-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr));
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.bible-chapter-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid rgba(214, 160, 105, 0.35);
  border-radius: 0.6rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.bible-chapter-link:hover,
.bible-chapter-link:focus-visible {
  border-color: rgba(214, 160, 105, 0.95);
  background: rgba(214, 160, 105, 0.12);
}

.bible-index-notice {
  margin-top: 2rem;
  font-size: var(--kd-text-base);
  opacity: 0.8;
}

/* A chapter is one passage with its own copy and print controls: no shortcut row. */
.bible-chapter-main .scripture-reading-shortcuts {
  display: none;
}

/* scripture-first.js adds the passage tools and hero shortcuts after first paint;
   hold their measured space so the Scripture does not jump (was 0.28 CLS).
   Pages over 12 passages also get the finder, so they reserve more. */
@media (scripting: enabled) {
  main:not(.bible-chapter-main):not([data-reading-shortcuts]):has(.scripture-sequence > .topic-scripture)
    .sf-hero
    h1 {
    margin-bottom: calc(1.1rem + 44px);
  }

  .sf-reading-flow > .scripture-sequence:not([data-reader-tools]) {
    margin-top: 7.875rem;
  }

  .sf-reading-flow
    > .scripture-sequence:has(> .topic-scripture:nth-child(13 of .topic-scripture)):not([data-reader-tools]) {
    margin-top: 11.8rem;
  }

  .bible-chapter-main .sf-reading-flow > .scripture-sequence:not([data-reader-tools]) {
    margin-top: 5.063rem;
  }

  /* Keep the reserved margin from collapsing out of the column. */
  .bible-chapter-main .sf-reading .sf-reading-flow {
    display: flow-root;
  }
}

/* Hold the listen button's row until scripture-voice.js adds it. */
.scripture-reader-tools:not(:has(.scripture-voice-reader, [data-voice-availability]))::after {
  content: "";
  display: block;
  height: 44px;
}

.scripture-reader-tools:has(.scripture-reader-search):not(
    :has(.scripture-voice-reader, [data-voice-availability])
  )::after {
  height: calc(0.85rem + 44px);
}

.scripture-voice-reader {
  margin-top: 0.85rem;
}
.scripture-voice-reader:first-child {
  margin-top: 0;
}

/* Directly under the hero, whose bottom border already divides the page. */
.sf-reading-flow > .scripture-reader-tools:first-child {
  padding-top: 0;
  border-top: 0;
}

/* Status and availability lines are filled only while there is something to say. */
.scripture-voice-reader p:empty {
  display: none;
}

@media print {
  .bible-chapter-nav,
  .bible-continue,
  .bible-jump,
  .bible-chapter .verse sup[role="link"] {
    cursor: auto;
  }

  .bible-chapter-nav,
  .bible-continue,
  .bible-jump {
    display: none;
  }
}

/* Topical passage -> Bible reader chapter */
/* Same shape and type as the card's Listen and More buttons beside it. */
.scripture-context-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line, #776047);
  border-radius: 0.45rem;
  background: #211911;
  color: var(--copper-bright, #f0b36a);
  font: 600 var(--kd-text-sm)/1.4 var(--sans);
  text-decoration: none;
  white-space: nowrap;
}

.scripture-context-link:hover,
.scripture-context-link:focus-visible {
  border-color: var(--copper-bright, #f0b36a);
  background: rgba(214, 160, 105, 0.12);
}

.scripture-context-link:focus-visible {
  outline: 3px solid #f0b36a;
  outline-offset: 3px;
}

@media print {
  .scripture-context-link {
    display: none;
  }
}

.bible-verse-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.25rem 0 0.9rem;
}

.bible-verse-actions button {
  min-height: 2.2rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: var(--kd-text-sm);
  font-weight: 700;
}

.bible-verse-actions span {
  font-size: var(--kd-text-sm);
  opacity: 0.85;
}

@media print {
  .bible-verse-actions {
    display: none;
  }
}

.bible-chapter-main .scripture-reader-tools {
  margin-top: 0;
  padding-top: 0.25rem;
  border-top: 0;
}

.bible-search-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  font-weight: 700;
}

.bible-search-scope select {
  min-height: 44px;
  padding: 0.35rem 2.5rem 0.35rem 0.8rem;
  border-radius: 0.6rem;
}

.bible-search-link {
  margin-top: 0.75rem;
  font-weight: 700;
}

.bible-search-link a,
.bible-index-notice a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.bible-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.bible-search-results li {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(214, 160, 105, 0.25);
  border-radius: 0.8rem;
}

.bible-search-results li > a {
  font-weight: 700;
  text-decoration: none;
}

.bible-search-results li > p {
  margin: 0.35rem 0 0;
}

.bible-search-results mark {
  background: rgba(214, 160, 105, 0.3);
  color: inherit;
  border-radius: 0.2em;
  padding: 0 0.1em;
}

.bible-search-more {
  margin-top: 1rem;
  opacity: 0.8;
}

/* Speak-it card pass (September 2026): personal confession, quiet chrome, short page guide. */
.sf-page-guide {
  max-width: 47rem;
  margin: 0.9rem 0 0;
  color: #d0c3b1;
  font-family: var(--sans);
  font-size: var(--kd-text-base);
  line-height: 1.6;
}
.sf-page-guide a {
  color: var(--copper-bright, #f0b36a);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
.sf-reading-flow .sf-page-guide {
  max-width: 52rem;
}
@media (max-width: 42rem) {
  body.scripture-first .sf-home-flow h1 {
    text-wrap: pretty;
  }

  .sf-home-search input {
    min-height: 3.4rem;
    font-size: var(--kd-text-base);
  }
}

.scripture-card-meta .scripture-passage-actions {
  margin-top: 0;
}
.scripture-card-more {
  flex: 0 0 auto;
  min-width: 0;
}
.scripture-card-more[open] {
  flex-basis: 100%;
}
.scripture-card-more > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line, #776047);
  border-radius: 0.45rem;
  background: transparent;
  color: var(--muted, #b9ac99);
  font: 600 var(--kd-text-sm)/1.4 var(--sans);
  list-style: none;
  cursor: pointer;
}
.scripture-card-more > summary::-webkit-details-marker {
  display: none;
}
.scripture-card-more > summary::after {
  content: " \25BE";
  margin-left: 0.3rem;
}
.scripture-card-more[open] > summary::after {
  content: " \25B4";
}
.scripture-card-more > summary:hover,
.scripture-card-more > summary:focus-visible {
  color: var(--copper-bright, #f0b36a);
  border-color: var(--copper-bright, #f0b36a);
}
.scripture-card-more > summary:focus-visible {
  outline: 3px solid #f0b36a;
  outline-offset: 3px;
}
.scripture-card-more-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(240, 179, 106, 0.16);
}
.scripture-passage-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.scripture-passage-secondary a,
.scripture-passage-secondary button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line, #776047);
  border-radius: 0.45rem;
  background: #211911;
  color: var(--copper-bright, #f0b36a);
  font: 600 var(--kd-text-sm)/1.4 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.scripture-passage-secondary [role="status"] {
  color: #c6baa8;
  font: var(--kd-text-sm)/1.5 var(--sans);
}
.scripture-passage-secondary :focus-visible {
  outline: 3px solid #f0b36a;
  outline-offset: 3px;
}

.scripture-card-response {
  color: var(--ivory, #f6efe3);
  background: rgba(216, 135, 75, 0.07);
  border-color: rgba(240, 179, 106, 0.22);
}
.scripture-card-response p {
  font-family: var(--serif);
  font-size: clamp(var(--kd-text-base), 1.9vw, var(--kd-text-lg));
  line-height: 1.6;
}

.scripture-voice-reader p[data-voice-availability] {
  margin: 0 0 0.6rem;
  font-size: var(--kd-text-xs);
}

@media print {
  .scripture-card-more,
  .scripture-passage-secondary,
  .scripture-reading-shortcuts [role="status"],
  .sf-page-guide a {
    display: none !important;
  }
  .scripture-card-response {
    color: #000 !important;
    background: #fff !important;
    border: 0 !important;
    border-left: 2px solid #999 !important;
    border-radius: 0 !important;
    padding: 0.1in 0 0.1in 0.18in !important;
  }
  .scripture-card-response h3 {
    color: #444 !important;
    font-size: 8pt !important;
  }
  .scripture-card-response p {
    color: #000 !important;
    font-size: 10.5pt !important;
  }
}
.sf-education-copy .sf-proclamation-foundations {
  width: auto;
  margin: 1.6rem 0 0;
}

/* Print one passage: the card's More panel offers it; everything else on the page is suppressed. */
@media print {
  body.print-single .topic-scripture:not(.print-target),
  body.print-single .topic-confession,
  body.print-single .scripture-reader-tools,
  body.print-single .sf-topic-guidance,
  body.print-single .sf-guidance-grid,
  body.print-single .site-recommendation,
  body.print-single .page-utilities {
    display: none !important;
  }
  body.print-single .topic-scripture.print-target {
    border: 0 !important;
    padding: 0.1in 0 !important;
  }
  .sf-page-guide {
    margin: 0.08in 0 0 !important;
    font-size: 9.5pt !important;
    color: #333 !important;
  }
  .scripture-reading-shortcuts {
    display: none !important;
  }
  .topic-scripture blockquote {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  .topic-scripture .verse sup {
    color: #555 !important;
  }
  .scripture-card-meta {
    margin-top: 0.06in !important;
    padding-top: 0.04in !important;
    border-top: 0 !important;
  }
  .scripture-card-meta .scripture-context-link,
  .scripture-card-meta .scripture-passage-actions {
    display: none !important;
  }
}

/* Warfare and deliverance pages: Scripture first, notes last (September 17, 2026). */
.sf-deliverance-hub-intro {
  width: auto;
  max-width: 48rem;
  margin: 0 0 clamp(1.6rem, 4vw, 2.4rem);
  text-align: left;
}
.sf-deliverance-hub-intro h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(var(--kd-text-2xl), 3vw, var(--kd-text-3xl));
  line-height: 1.15;
  text-wrap: balance;
}
.sf-deliverance-hub-intro > p:not(.sf-page-kicker) {
  max-width: 44rem;
  margin: 0.7rem 0 0;
  line-height: 1.6;
}
.sf-deliverance-group > header {
  text-align: left;
  max-width: 44rem;
  margin-inline: 0;
}
.sf-deliverance-group h3 {
  margin-inline: 0;
  text-align: left;
}
.sf-deliverance-group > header p {
  margin-inline: 0;
  text-align: left;
}
.sf-deliverance-card {
  justify-content: flex-start;
  min-height: 0;
}
.sf-deliverance-card b {
  margin-top: auto;
}
.sf-page-summary {
  max-width: 46rem;
  margin: 0.8rem 0 0;
  color: #e3d8c7;
  font-size: clamp(var(--kd-text-base), 1.7vw, var(--kd-text-lg));
  line-height: 1.55;
}
.sf-guidance-grid.sf-guidance-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  max-width: 52rem;
  margin-inline: auto;
}
.sf-guidance-compact p {
  margin: 0;
  color: #d0c3b1;
  font: var(--kd-text-base)/1.6 var(--sans);
}
.sf-guidance-compact strong {
  color: var(--copper-bright, #f0b36a);
  font-weight: 700;
}
.sf-study-notes {
  max-width: 52rem;
  margin: 2rem auto 0;
  padding: 0.2rem 1rem;
  border: 1px solid rgba(240, 179, 106, 0.16);
  border-radius: 0.8rem;
  background: rgba(13, 10, 8, 0.4);
}
.sf-study-notes > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--copper-bright, #f0b36a);
  font: 700 var(--kd-text-base)/1.4 var(--sans);
  cursor: pointer;
}
.sf-study-notes > summary:focus-visible {
  outline: 3px solid #f0b36a;
  outline-offset: 3px;
}
.sf-study-notes h2 {
  margin: 1rem 0 0.4rem;
  color: var(--ivory, #f6efe3);
  font: 700 var(--kd-text-base)/1.3 var(--sans);
  letter-spacing: 0.02em;
}
.sf-study-notes ul,
.sf-study-notes ol {
  margin: 0;
  padding-left: 1.2rem;
  color: #d0c3b1;
  font: var(--kd-text-sm)/1.6 var(--sans);
}
.sf-study-notes .sf-guidance-caution {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.sf-study-notes .sf-topic-study-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0 1.5rem;
}
.sf-source-note {
  margin: 1rem 0 0.9rem;
  color: var(--muted, #b9ac99);
  font: var(--kd-text-sm)/1.55 var(--sans);
}
@media print {
  .sf-study-notes,
  .sf-related-topics {
    display: none !important;
  }
}

/* Reading theme toggle. Its light-theme colors come from reading-light.css. */
body.scripture-first .reading-theme-toggle {
  order: 4;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(216, 135, 75, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #b9ac99);
  font: inherit;
  font-size: var(--kd-text-sm);
  font-weight: 700;
  cursor: pointer;
}

body.scripture-first .reading-theme-toggle:hover,
body.scripture-first .reading-theme-toggle:focus-visible,
body.scripture-first .reading-theme-toggle[aria-pressed="true"] {
  background: rgba(216, 135, 75, 0.13);
  border-color: rgba(216, 135, 75, 0.5);
  color: var(--copper-bright, #f0b36a);
}

body.scripture-first .reading-theme-toggle:focus-visible {
  outline: 2px solid var(--copper-bright, #f0b36a);
  outline-offset: 2px;
}

body.scripture-first .reading-theme-toggle svg {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 56.3125rem) {
  body.scripture-first .nav {
    margin-left: auto;
  }
}

@media (max-width: 56.25rem) {
  body.scripture-first .reading-theme-toggle {
    order: 0;
    min-height: 2.75rem;
    margin-left: auto;
  }

  body.scripture-first .nav-toggle {
    margin-left: 0.5rem;
  }
}

/* On phones the toggle is the sun icon alone; the label stays for screen readers. */
@media (max-width: 30rem) {
  body.scripture-first .reading-theme-toggle {
    justify-content: center;
    width: 2.75rem;
    padding: 0;
  }

  body.scripture-first .reading-theme-toggle > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media print {
  body.scripture-first .reading-theme-toggle {
    display: none;
  }
}


/* Everyday Scripture discovery. Use the existing reading theme and page width. */
.sf-home-tagline { margin: 1.1rem 0 0; color: var(--muted, #b9ac99); font-size: var(--kd-text-sm); text-wrap: balance; }
.sf-home-discovery { margin: 0 0 clamp(1.75rem, 4vw, 3rem); padding: clamp(1rem, 2.5vw, 1.7rem); border: 1px solid rgba(240, 179, 106, 0.22); border-radius: 1rem; background: rgba(216, 135, 75, 0.045); }
.sf-home-discovery[hidden] { display: none !important; }
.sf-home-discovery h2 { margin: 0 0 0.85rem; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.3; }
.sf-need-grid, .sf-daily-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.sf-need-grid + h2 { margin-top: 1.45rem; }
.sf-need-grid a, .sf-daily-links a { display: flex; align-items: center; min-height: 3rem; padding: 0.65rem 0.8rem; border: 1px solid rgba(240, 179, 106, 0.24); border-radius: 0.6rem; color: var(--text, #f3eadb); text-decoration: none; font-weight: 600; font-size: var(--kd-text-sm); line-height: 1.3; }
.sf-need-grid a:hover, .sf-daily-links a:hover, .sf-need-grid a:focus-visible, .sf-daily-links a:focus-visible { border-color: var(--copper-bright, #f0b36a); color: var(--copper-bright, #f0b36a); background: rgba(216, 135, 75, 0.10); }
.sf-daily-links a { color: var(--copper-bright, #f0b36a); }
@media (max-width: 48rem) { .sf-need-grid, .sf-daily-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print { .sf-home-discovery { display: none; } }

/* Personal reading tools reuse the site's responsive reading column and theme. */
.personal-reading .sf-reading { padding-top: 0; }
.personal-reading [hidden], .personal-passage [hidden], .topic-scripture blockquote[hidden] { display: none !important; }
.personal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .9rem 0; }
.personal-actions button, .personal-actions a, .personal-import, .scripture-passage-actions [data-personal-save] { min-height: 2.75rem; border: 1px solid rgba(240,179,106,.35); background: rgba(216,135,75,.075); color: var(--text,#f3eadb); padding: .45rem .8rem; border-radius: .55rem; text-decoration: none; font: inherit; font-size: var(--kd-text-sm); cursor: pointer; }
.personal-actions button:hover, .personal-actions a:hover, .personal-import:hover, .scripture-passage-actions [data-personal-save]:hover, [data-personal-save][aria-pressed="true"] { border-color: var(--copper-bright,#f0b36a); color: var(--copper-bright,#f0b36a); }
.personal-actions button:disabled { opacity: .55; cursor: default; }
.personal-actions button:focus-visible, .personal-import:focus-within { outline: 2px solid var(--copper-bright,#f0b36a); outline-offset: 2px; }
.personal-actions span[role="status"] { font-size: var(--kd-text-sm); }
.personal-import { display: inline-flex; align-items: center; }
.personal-import input { width: 1px; height: 1px; overflow: hidden; opacity: 0; position: absolute; }
.personal-passage-list, [data-library-list] { display: grid; gap: 1rem; margin: 1rem 0 1.5rem; }
.personal-passage { min-width: 0; }
.personal-passage blockquote { font-family: Georgia, "Times New Roman", serif; line-height: 1.65; }
.personal-passage .scripture-card-meta { margin-top: .75rem; }
.personal-collection-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.personal-discovery-more { margin: .8rem 0 1.45rem; }
.daily-controls { justify-content: space-between; }
.daily-controls [data-daily-date] { flex: 1 1 12rem; text-align: center; }
.personal-daily-links { margin: 1.35rem 0; }
[data-library-search] { display: block; width: 100%; min-height: 2.75rem; padding: .55rem .8rem; border: 1px solid rgba(240,179,106,.35); border-radius: .55rem; background: rgba(13,10,8,.75); color: var(--text,#f3eadb); font: inherit; }
.plan-day-check { display: flex; gap: .5rem; align-items: center; margin: .45rem 0 1rem; font-size: var(--kd-text-sm); }
.plan-day-check input { width: 1.2rem; height: 1.2rem; accent-color: var(--copper,#d8874b); }
@media (max-width: 35rem) { .daily-controls [data-daily-date] { order: -1; flex: 1 1 100%; } .personal-reading .personal-collection-grid { grid-template-columns: 1fr; } }
@media print { .personal-actions, .plan-day-check, .plan-progress, [data-library-search], label[for="saved-search"], [data-library-status], .personal-discovery-more, .personal-daily-links { display: none !important; } .personal-passage { break-inside: avoid; } .personal-passage blockquote[hidden] { display:block !important; } }

/* Expand the shared reading player by default; minimize it to transport controls. */
.scripture-voice-reader:not([data-voice-docked]) [data-voice-collapse] { display: inline-flex; }
.scripture-voice-reader:not([data-voice-docked]) .scripture-voice-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.scripture-voice-reader[data-voice-collapsed]:not([data-voice-docked]) .scripture-voice-dock { padding: 0; }
.scripture-voice-reader[data-voice-collapsed]:not([data-voice-docked]) .scripture-voice-dock::before { display: none; }
.scripture-voice-settings [data-voice-random] { justify-self: start; }
[data-voice-docked] .scripture-voice-settings { max-height: min(48dvh, 25rem); }
@media (min-width: 48rem) {
  .scripture-voice-settings { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: center; }
  .scripture-voice-settings-head, .scripture-voice-speeds { grid-column: 1 / -1; }
}
/* Semantic home lists preserve spacing and bullets even without the theme. */
.sf-home-discovery .sf-home-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem 1.5rem; margin: 0 0 1rem; padding-inline-start: 1.3rem; list-style: disc; }
.sf-home-discovery .sf-home-list li { display: list-item; padding: .15rem 0; }
.sf-home-discovery .sf-home-list li::marker { color: var(--copper-bright, #f0b36a); }
.sf-home-discovery .sf-home-list a { display: inline; color: var(--text, #f3eadb); font-weight: 600; line-height: 1.5; text-decoration: underline; text-underline-offset: .18em; }
.sf-home-discovery .sf-home-list a:hover, .sf-home-discovery .sf-home-list a:focus-visible { color: var(--copper-bright, #f0b36a); }
.sf-home-discovery .sf-home-list + h2, .sf-home-discovery .personal-discovery-more + h2 { margin-top: 1.45rem; }
@media (max-width: 35rem) { .sf-home-discovery .sf-home-list { grid-template-columns: 1fr; } }

/* Settings scroll independently of the Scripture page, including at either edge. */
.scripture-voice-settings { overscroll-behavior: contain; touch-action: pan-y; overflow-y: auto; max-height: min(56dvh, 29rem); }
[data-voice-docked] .scripture-voice-settings { max-height: min(56dvh, 29rem); overflow-y: auto; }
.sf-collection-playback { display:flex; flex-wrap:wrap; gap:.6rem; margin: .75rem 0 1rem; }
.sf-collection-playback button { min-height:44px; padding:.6rem .9rem; border:1px solid var(--line,#776047); border-radius:.45rem; color:var(--copper-bright,#f0b36a); background:#211911; font:inherit; cursor:pointer; }

.sf-named-collections { padding-inline-start: 1.3rem; list-style: disc; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:.45rem 1rem; }
.sf-named-collections a { color:var(--text,#f3eadb); }
