:root {
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-soft: #edf5ff;
  --text: #102a43;
  --muted: #52677a;
  --brand: #2563eb;
  --brand-dark: #1e3a8a;
  --accent: #f59e0b;
  --border: #d8e4f0;
  --shadow: 0 24px 70px rgba(16, 42, 67, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.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(248, 251, 255, 0.86);
  border-bottom: 1px solid rgba(216, 228, 240, 0.7);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: block;
  width: 52.5px;
  height: 52.5px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand img {
  display: block;
  width: 52.5px;
  height: 52.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--brand);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-search input {
  width: 210px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.nav-search input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.nav-search button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.nav-search button:hover,
.nav-search button:focus-visible {
  background: var(--brand-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 70px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero::after {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 420px;
  height: 420px;
  content: "";
  background: rgba(245, 158, 11, 0.15);
  border-radius: 999px;
  filter: blur(8px);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 42px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h1,
.hero-panel h2 {
  font-family: "Libre Baskerville", Georgia, serif;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.55rem, 7vw, 5.3rem);
}

.hero-text {
  max-width: 680px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1.18rem;
}

.search-card {
  max-width: 720px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.search-card label {
  display: block;
  margin: 0 0 10px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-row input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  color: var(--text);
  background: #f7fbff;
  border: 1px solid var(--border);
  border-radius: 18px;
  outline: none;
}

.search-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.search-row button,
.cta-link {
  min-height: 56px;
  padding: 0 24px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 0;
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.25);
}

.search-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.search-hint button,
.footer-grid [data-search] {
  color: var(--brand);
  font-weight: 800;
  background: transparent;
  border: 0;
}

.hero-panel {
  padding: 34px;
  background: var(--text);
  color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel-tag {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 7px 12px;
  color: #ffe7b3;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
}

.hero-panel p {
  color: #d8e4f0;
}

.hero-panel a {
  display: inline-flex;
  margin-top: 18px;
  color: #ffffff;
  font-weight: 800;
  border-bottom: 2px solid var(--accent);
}

.trust-strip {
  padding: 22px 0;
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.trust-grid div {
  display: grid;
  gap: 2px;
}

.trust-grid strong {
  font-size: 1rem;
}

.trust-grid span {
  color: var(--muted);
  font-size: 0.93rem;
}

.section {
  padding: 86px 0;
}

.section-soft {
  background: var(--surface-soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2,
.cta-card h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.section-heading p:not(.eyebrow),
.cta-card p {
  color: var(--muted);
}

.answer-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filter-card,
.answer-card,
.category-card,
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 45px rgba(16, 42, 67, 0.08);
}

.filter-card {
  position: sticky;
  top: 98px;
  padding: 22px;
}

.filter-card h3 {
  margin-bottom: 18px;
  font-size: 1.35rem;
}

.filter-list {
  display: grid;
  gap: 10px;
}

.filter-list button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
  background: #f7fbff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.filter-list button.active,
.filter-list button:hover {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

#results-panel {
  scroll-margin-top: 96px;
}

.result-meta {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

.result-meta.flash {
  animation: result-flash 900ms ease;
}

@keyframes result-flash {
  0% {
    color: var(--brand);
  }

  100% {
    color: var(--muted);
  }
}

.answers-list {
  display: grid;
  gap: 18px;
}

.answer-card {
  padding: 26px;
}

.answer-card h3 {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

.answer-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.answer-tags,
.scriptures {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.answer-tags span,
.scriptures span,
.tag-link,
.scripture-link {
  display: inline-flex;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
}

.tag-link {
  min-height: 32px;
  align-items: center;
  color: var(--brand-dark);
  background: #e9f1ff;
  border: 1px solid rgba(37, 99, 235, 0.16);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.tag-link:hover,
.tag-link:focus-visible {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.scriptures {
  margin-top: 14px;
}

.scripture-link {
  min-height: 40px;
  padding: 9px 14px;
  color: #7c4a03;
  background: #fff4d7;
  border: 1px solid rgba(124, 74, 3, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.scripture-link:hover,
.scripture-link:focus-visible {
  background: #ffe6a8;
  box-shadow: 0 8px 20px rgba(124, 74, 3, 0.18);
  transform: translateY(-1px);
}

.read-more {
  display: inline-flex;
  margin: 4px 0 16px;
  padding: 0;
  color: var(--brand);
  font-weight: 800;
  background: transparent;
  border: 0;
}

.read-more:hover,
.read-more:focus-visible {
  text-decoration: underline;
}

.answer-long {
  margin: -6px 0 16px;
}

.answer-long p {
  margin: 0;
  color: var(--muted);
}

.topic-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.topic-card {
  position: relative;
  min-height: 170px;
  padding: 24px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 45px rgba(16, 42, 67, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.topic-icon {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  color: var(--brand);
}

.topic-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.topic-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 900;
}

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

.category-card {
  padding: 26px;
}

.category-card h3 {
  font-size: 1.35rem;
}

.category-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.cta-section {
  padding-top: 20px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 38px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(245, 158, 11, 0.1)),
    #ffffff;
}

.cta-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.empty-state {
  padding: 32px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.site-footer {
  padding: 48px 0;
  color: #d8e4f0;
  background: var(--text);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-brand {
  color: #ffffff;
}

.footer-brand .brand-mark {
  filter: brightness(0) invert(1);
}

.footer-copyright {
  margin-top: 18px;
  color: #a9bfd4;
  font-size: 0.875rem;
}

.footer-grid h2 {
  margin-bottom: 14px;
  color: #ffffff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: 0;
}

.footer-grid a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: #d8e4f0;
}

body.modal-open {
  overflow: hidden;
}

.verse-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 42, 67, 0.55);
  backdrop-filter: blur(3px);
}

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

.verse-modal-card {
  width: min(560px, 100%);
  max-height: min(80vh, 640px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.verse-modal-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.verse-modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-family: "Libre Baskerville", Georgia, serif;
}

.verse-modal-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  background: #f7fbff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.verse-modal-close:hover,
.verse-modal-close:focus-visible {
  color: var(--brand);
  border-color: var(--brand);
}

.verse-modal-body {
  padding: 22px;
}

.verse-text {
  margin: 0 0 14px;
  color: var(--text);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.65;
}

.verse-credit {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.verse-status {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 620px) {
  .verse-modal {
    padding: 0;
    align-items: flex-end;
  }

  .verse-modal-card {
    width: 100%;
    max-height: 86vh;
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 880px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 12px;
  }

  .nav-search-item {
    order: -1;
    padding: 4px 0 8px;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    flex: 1;
    width: auto;
  }

  .hero-grid,
  .answer-layout,
  .cta-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-card {
    position: static;
  }

  .topic-grid,
  .category-grid,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .hero {
    padding-top: 58px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .topic-grid,
  .category-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 62px 0;
  }

  .hero-panel,
  .answer-card,
  .category-card,
  .cta-card {
    padding: 24px;
  }
}
