:root {
  --color-white: #ffffff;
  --color-light: #f5f5f7;
  --color-border: #e5e5ea;
  --color-muted: #86868b;
  --color-text: #1d1d1f;
  --color-black: #000000;

  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;

  --container: 1120px;
  --article: 760px;
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 32px;

  --space-xs: 0.5rem;
  --space-sm: 0.875rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --search-results-scroll-offset: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-system);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  z-index: 100;
  background: var(--color-black);
  color: var(--color-white);
  padding: 0.75rem 1rem;
  border-radius: 999px;
}

.skip-link:focus {
  left: 1rem;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 1.05rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover,
.header-search:hover,
.footer-inner a:hover {
  color: var(--color-black);
}

.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1.05rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.94rem;
  font-weight: 600;
}

.section {
  padding: clamp(5rem, 8vw, 8rem) 0;
}

.section-muted {
  background: var(--color-light);
}

.hero {
  padding-top: 5rem;
  padding-bottom: 5.5rem;
}

.hero-inner {
  max-width: 860px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(3.3rem, 7.6vw, 6.4rem);
  line-height: 0.96;
  letter-spacing: -0.018em;
  font-weight: 650;
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(2.2rem, 4.8vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: -0.015em;
  font-weight: 650;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: -0.008em;
  font-weight: 650;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 2rem;
  color: var(--color-muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.38;
  letter-spacing: -0.03em;
}

.search-panel {
  display: flex;
  gap: 0.65rem;
  max-width: 680px;
  margin: 0 auto;
  padding: 0.55rem;
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.search-panel input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text);
  padding: 0.95rem 1.1rem;
  font-size: 1rem;
}

.search-panel input::placeholder {
  color: var(--color-muted);
}

.search-panel button,
.button-primary {
  border: 0;
  border-radius: 999px;
  background: var(--color-text);
  color: var(--color-white);
  padding: 0.95rem 1.45rem;
  font-weight: 700;
  cursor: pointer;
}

.search-panel button:hover,
.button-primary:hover {
  background: var(--color-black);
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.popular-searches a {
  color: var(--color-text);
  font-weight: 600;
}

.section-heading {
  max-width: 760px;
  margin-bottom: var(--space-lg);
}

.section-heading p,
.body-large,
.cta-panel p {
  color: var(--color-muted);
  font-size: 1.15rem;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

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

.topic-card,
.video-card,
.cta-panel,
.question-list a {
  background: var(--color-white);
  border: 1px solid var(--color-border);
}

.topic-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: #c9c9cf;
}

.topic-card p {
  color: var(--color-muted);
  font-size: 1rem;
}

.topic-card span,
.video-content a {
  color: var(--color-black);
  font-weight: 700;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-xl);
  align-items: start;
}

.question-list {
  display: grid;
  gap: 0.8rem;
}

.question-list a {
  display: block;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-md);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.question-list a:hover {
  border-color: #c9c9cf;
}

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

.video-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.video-thumb {
  aspect-ratio: 16 / 9;
}

.placeholder-thumb {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #202124, #6e6e73);
  color: var(--color-white);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.video-content {
  padding: 1.3rem;
}

.video-content p {
  color: var(--color-muted);
}

.cta-panel {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem);
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--color-white);
}

.button-primary {
  display: inline-flex;
  margin-top: 1rem;
}

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  background: var(--color-light);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: 0.94rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

@media (max-width: 860px) {
  .header-inner {
    min-height: auto;
    padding: 1rem 0;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero {
    padding-top: 4rem;
  }

  .topic-grid,
  .video-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: 210px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-inner nav {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .search-panel {
    flex-direction: column;
    border-radius: var(--radius-md);
  }

  .search-panel button {
    width: 100%;
  }

  .main-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 0.25rem;
  }

  .header-search {
    min-height: 36px;
    padding: 0 0.9rem;
  }
}

/* Pillar page template */
.page-hero {
  padding: clamp(4.5rem, 8vw, 8rem) 0 clamp(3.5rem, 6vw, 6rem);
  background: var(--color-white);
}

.page-hero-inner {
  max-width: 860px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.breadcrumbs a {
  color: var(--color-text);
  font-weight: 600;
}

.page-intro {
  max-width: 760px;
  color: var(--color-muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.pillar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.article-content {
  max-width: var(--article);
}

.article-content h2 {
  margin-top: 3rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.article-content h3 {
  margin-top: 2rem;
}

.article-content p,
.article-content li {
  color: #424245;
  font-size: 1.08rem;
  line-height: 1.72;
  letter-spacing: -0.01em;
}

.article-content ul {
  padding-left: 1.25rem;
}

.summary-card,
.study-card,
.toc-card,
.related-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.summary-card {
  padding: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 2rem;
}

.summary-card p:last-child {
  margin-bottom: 0;
}

.toc-card {
  position: sticky;
  top: 95px;
  padding: 1.25rem;
}

.toc-card h2 {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.toc-card nav {
  display: grid;
  gap: 0.75rem;
}

.toc-card a {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.toc-card a:hover {
  color: var(--color-black);
}

.study-card {
  padding: clamp(1.5rem, 4vw, 2rem);
  margin-top: 2.5rem;
  background: var(--color-light);
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  padding: 1.35rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.faq-item h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

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

.related-card {
  padding: 1.35rem;
}

.related-card p {
  color: var(--color-muted);
}

@media (max-width: 900px) {
  .pillar-layout {
    grid-template-columns: 1fr;
  }

  .toc-card {
    position: static;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}


.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0.85rem;
  padding: 0.36rem 0.72rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  background: var(--color-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  color: var(--color-text);
  font-weight: 700;
}

.comparison-table td {
  color: #424245;
}

.comparison-table tr:last-child td {
  border-bottom: 0;
}

/* Anchor scroll offset for sticky header */
html {
  scroll-padding-top: 60px;
}

.article-content h2,
.article-content h3 {
  scroll-margin-top: 60px;
}

/* Search page */
.search-hero {
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
}

.search-page-panel {
  margin-top: 2rem;
}

.search-term-buttons button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.search-term-buttons button:hover {
  color: var(--color-black);
  text-decoration: underline;
}

#results,
.search-results-section,
#search-results-heading,
#search-results {
  scroll-margin-top: var(--search-results-scroll-offset);
}

.search-layout {
  max-width: 860px;
}

.search-summary {
  color: var(--color-muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.search-results-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.search-result-card,
.search-empty {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.35rem, 3vw, 2rem);
}

.search-result-card h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  line-height: 1.1;
}

.search-result-card p,
.search-empty p {
  color: #424245;
  font-size: 1.04rem;
  line-height: 1.65;
}

.search-result-meta {
  margin-bottom: 0.75rem;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-result-url {
  display: inline-flex;
  margin-top: 0.2rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.search-result-url:hover {
  color: var(--color-black);
}

.search-result-card mark {
  background: #f5f5f7;
  color: var(--color-black);
  border-radius: 0.25rem;
  padding: 0 0.15rem;
}

.search-empty {
  margin-top: 2rem;
}


/* Final search results scroll tuning */
#results,
.search-results-section,
#search-results-heading,
#search-results {
  scroll-margin-top: var(--search-results-scroll-offset);
}

/* Desktop browsers need a little more clearance so the "Site results" eyebrow is not clipped above the heading.
   Mobile keeps the tighter 10px offset that tested well on iPhone and iPad. */
@media (min-width: 861px) {
  :root {
    --search-results-scroll-offset: 56px;
  }
}

#search-results-heading:focus {
  outline: none;
}

/* BPG v8 Bible reference search */
.search-note {
  max-width: 680px;
  margin: 1rem auto 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.search-result-group {
  margin-top: 3rem;
}

.search-group-heading {
  margin-bottom: 1rem;
}

.search-group-heading h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  letter-spacing: -0.015em;
}

.search-result-card h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  line-height: 1.1;
}

.bible-result-card .verse-open {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 650;
  letter-spacing: -0.01em;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.bible-result-card .verse-open:hover {
  color: var(--color-black);
  text-decoration: underline;
}

.related-study-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.related-study-links a {
  display: inline-flex;
  padding: 0.28rem 0.62rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  background: var(--color-light);
}

.related-study-links a:hover {
  color: var(--color-black);
  border-color: #c9c9cf;
}

body.modal-open {
  overflow: hidden;
}

.verse-modal[hidden] {
  display: none;
}

.verse-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.verse-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}

.verse-modal-panel {
  position: relative;
  width: min(100%, 720px);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}

.verse-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.verse-modal-close:hover {
  background: var(--color-light);
}

.verse-modal-panel h2 {
  padding-right: 3rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.verse-modal-text {
  color: #424245;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.65;
}

@media (max-width: 560px) {
  .search-note {
    text-align: left;
  }

  .search-result-group {
    margin-top: 2.5rem;
  }

  .verse-modal {
    align-items: end;
    padding: 0.75rem;
  }

  .verse-modal-panel {
    max-height: 88vh;
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
  }
}

/* BPG v8.1 integrated study + Bible reference results */
.combined-results-list {
  margin-top: 2rem;
}

.study-result-card .search-result-url {
  margin-top: 1rem;
}

.related-verse-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.related-verse-chip {
  appearance: none;
  display: inline-flex;
  padding: 0.28rem 0.62rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  background: var(--color-light);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.related-verse-chip:hover {
  color: var(--color-black);
  border-color: #c9c9cf;
}

.bible-result-card {
  border-color: #d8d8de;
}

@media (max-width: 560px) {
  .related-verse-links,
  .related-study-links {
    align-items: flex-start;
  }
}

/* BPG v8.2 study-centered Bible support cards */
.study-verse-block {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.study-verse-label {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.study-verse-preview {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-light);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.study-verse-preview:hover,
.study-verse-preview:focus-visible {
  border-color: #c9c9cf;
  background: var(--color-white);
}

.study-verse-preview:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.study-verse-reference {
  display: block;
  margin: 0 0 0.35rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text);
  font-weight: 700;
}


.study-verse-preview * {
  pointer-events: none;
}

.study-verse-text {
  display: block;
  margin: 0;
  color: #424245;
  font-size: 1rem;
  line-height: 1.58;
}

@media (max-width: 560px) {
  .study-verse-preview {
    padding: 0.8rem;
  }
}


/* BPG v8.5: make standalone KJV verse cards clickable as full cards */
.bible-result-card.verse-open {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.bible-result-card.verse-open:hover,
.bible-result-card.verse-open:focus-visible {
  border-color: #c9c9cf;
  background: var(--color-white);
}

.bible-result-card.verse-open:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.bible-result-card.verse-open h3,
.bible-result-card.verse-open p {
  pointer-events: none;
}

.bible-result-card.verse-open .related-study-links,
.bible-result-card.verse-open .related-study-links * {
  pointer-events: auto;
}


/* BPG v9.0.9 — internal study-card contrast polish */
.study-card {
  margin: 2.5rem 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.04);
}

.study-card .eyebrow {
  margin-bottom: 1rem;
}

.study-card h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.study-card p {
  max-width: 760px;
  color: var(--color-muted);
}


/* BPG v9.0.11 — global card contrast polish */
.study-card,
.related-card,
.topic-card,
.question-card,
.video-card,
.resource-card,
.path-card,
.feature-card,
.search-result-card,
.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.035);
}

.study-card,
.related-card,
.topic-card,
.question-card,
.video-card,
.resource-card,
.path-card,
.feature-card {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.study-card:hover,
.related-card:hover,
.topic-card:hover,
.question-card:hover,
.video-card:hover,
.resource-card:hover,
.path-card:hover,
.feature-card:hover {
  border-color: rgba(29, 29, 31, 0.18);
  box-shadow: 0 22px 52px rgba(17, 17, 17, 0.055);
}

/* BPG v9.3.3 — four-translation Bible search and comparison layer */
.bible-version-selector,
.bible-result-toolbar,
.verse-modal-versions,
.verse-comparison-controls {
  margin-top: 1rem;
}

.bible-version-selector,
.bible-result-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  align-items: center;
}

.bible-version-selector {
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.bible-version-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.bible-version-chip,
.verse-compare-button,
.verse-compare-toggle,
.comparison-select {
  font: inherit;
}

.bible-version-chip,
.verse-compare-button,
.verse-compare-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.34rem 0.72rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.bible-version-chip:hover,
.verse-compare-button:hover,
.verse-compare-toggle:hover,
.bible-version-chip:focus-visible,
.verse-compare-button:focus-visible,
.verse-compare-toggle:focus-visible {
  border-color: #c9c9cf;
  background: var(--color-light);
  color: var(--color-black);
}

.bible-version-chip.is-active {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

.bible-card-version-chips {
  margin-right: 0.2rem;
}

.bible-result-toolbar {
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--color-border);
}

.verse-compare-button,
.verse-compare-toggle {
  background: var(--color-light);
}

.study-verse-version {
  display: inline-flex;
  margin: 0 0 0.35rem;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verse-modal-versions {
  margin-bottom: 1rem;
}

.verse-modal-text {
  margin-top: 1rem;
}

.verse-comparison-panel {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-light);
}

.verse-comparison-panel[hidden] {
  display: none;
}

.comparison-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.comparison-select {
  min-height: 2.2rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-text);
  font-weight: 750;
}

.verse-comparison-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.comparison-card {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
}

.comparison-version {
  margin-bottom: 0.55rem;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-card p {
  margin: 0;
  color: #424245;
  font-size: 1rem;
  line-height: 1.62;
}

@media (max-width: 640px) {
  .bible-version-selector {
    justify-content: flex-start;
  }

  .verse-comparison-output {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   BPG v9.3.4 REVIEW — Bible comparison modal fit polish
   Keeps the v9.3.3 four-translation logic, but reduces the slight scroll
   in the verse comparison popup on desktop/tablet screens.
   ========================================================= */

.verse-modal-panel {
  width: min(100%, 860px);
  max-height: calc(100vh - 2rem);
  padding: clamp(1.25rem, 3vw, 2.05rem);
}

.verse-modal-panel h2 {
  font-size: clamp(2rem, 3.45vw, 3rem);
  line-height: 1.02;
}

.verse-modal-text {
  font-size: clamp(1.08rem, 1.65vw, 1.26rem);
  line-height: 1.55;
}

.verse-comparison-panel {
  gap: 0.8rem;
  margin: 1rem 0 0.9rem;
  padding: 0.85rem;
}

.comparison-card {
  padding: 0.9rem;
}

.comparison-card p {
  font-size: 0.96rem;
  line-height: 1.52;
}

@media (min-width: 760px) {
  .verse-modal-panel:has(.verse-comparison-panel:not([hidden])) {
    width: min(100%, 900px);
    padding: clamp(1.15rem, 2.5vw, 1.8rem);
  }

  .verse-modal-panel:has(.verse-comparison-panel:not([hidden])) .verse-modal-text {
    margin-top: 0.85rem;
    font-size: clamp(1.02rem, 1.45vw, 1.18rem);
    line-height: 1.48;
  }

  .verse-modal-panel:has(.verse-comparison-panel:not([hidden])) .verse-modal-versions {
    margin-bottom: 0.75rem;
  }

  .verse-modal-panel:has(.verse-comparison-panel:not([hidden])) .verse-compare-toggle {
    min-height: 1.95rem;
    padding: 0.25rem 0.62rem;
  }
}


/* BPG v9.3.8 REVIEW — first optimized video study integration */
.video-grid-featured {
  align-items: stretch;
}

.video-card-featured {
  grid-column: span 1;
}

.video-thumb-embed,
.video-feature-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111;
  color: #fff;
  text-decoration: none;
}

.video-thumb-embed img,
.video-feature-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-play-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.video-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.video-link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0.36rem 0.75rem;
  border: 1px solid rgba(29, 29, 31, 0.12);
  border-radius: 999px;
  color: var(--color-black);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.video-link-row a:hover {
  border-color: rgba(29, 29, 31, 0.28);
}

.video-feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.04);
}

.video-feature-copy p {
  color: var(--color-muted);
}

.video-feature-copy p.eyebrow {
  color: var(--color-muted);
}

.video-feature-thumb {
  border-radius: var(--radius-lg);
}

@media (max-width: 900px) {
  .video-feature-panel {
    grid-template-columns: 1fr;
  }
}

/* BPG v9.3.11 REVIEW — Videos page stacked H1 refinement
   Page-specific only. Does not affect global H1 styles. */
.videos-hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.04em;
  max-width: 820px;
  margin: 0 0 24px;
  font-size: clamp(3.6rem, 7vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.videos-hero-title span {
  display: block;
}

@media (max-width: 680px) {
  .videos-hero-title {
    font-size: clamp(3rem, 14vw, 4.8rem);
    line-height: 0.94;
  }
}
