:root {
  --bg: #f4f1ea;
  --bg-strong: #efe8da;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-muted: #f8fafc;
  --surface-accent: rgba(5, 150, 105, 0.08);
  --text: #111827;
  --muted: #64748b;
  --muted-strong: #475569;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --accent: #059669;
  --accent-strong: #047857;
  --accent-soft: rgba(5, 150, 105, 0.12);
  --warm: #b45309;
  --shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.05);
  --reading-max: 860px;
  --shell-max: 1240px;
  --ui-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --reading-font: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--ui-font);
  background:
    radial-gradient(circle at top left, rgba(5, 150, 105, 0.1), transparent 28%),
    radial-gradient(circle at top right, rgba(180, 83, 9, 0.09), transparent 24%),
    linear-gradient(180deg, #fcfbf7 0%, var(--bg) 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

code {
  padding: 0.12rem 0.32rem;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.92em;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(252, 251, 247, 0.92);
  backdrop-filter: blur(18px);
}

.site-header__inner,
.site-main,
.site-footer {
  width: min(calc(100% - 32px), var(--shell-max));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand__logo {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.16);
}

.brand__eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.brand__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.brand__subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.pill-link,
.hero-link,
.helper-link,
.book-chip,
.chapter-nav__link,
.mini-nav__link,
.chapter-pill,
.button,
.button-secondary {
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #334155;
  font-size: 0.83rem;
  font-weight: 700;
}

.pill-link:hover,
.hero-link:hover,
.helper-link:hover,
.book-chip:hover,
.chapter-nav__link:hover,
.mini-nav__link:hover,
.chapter-pill:hover,
.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
}

.pill-link:hover {
  border-color: rgba(5, 150, 105, 0.44);
}

.pill-link.is-active {
  border-color: rgba(5, 150, 105, 0.54);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.site-main {
  padding: 32px 0 56px;
}

.hero-grid,
.chapter-layout,
.book-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.hero-grid {
  grid-template-columns: minmax(300px, 392px) minmax(0, 1fr);
}

.chapter-layout,
.book-layout {
  grid-template-columns: minmax(272px, 330px) minmax(0, 1fr);
}

.home-stack {
  display: grid;
  gap: 20px;
}

.card,
.chapter-card,
.reading-shell,
.book-card {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
}

.card--sticky {
  position: sticky;
  top: 104px;
}

.card--hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(180, 83, 9, 0.08));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.1);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.card__label {
  margin: 14px 0 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.card__title,
.hero-title {
  margin: 12px 0 0;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.card__title {
  font-size: 1.8rem;
}

.hero-title {
  font-size: clamp(2.25rem, 4.6vw, 3.65rem);
}

.card__lead {
  margin: 16px 0 0;
  color: var(--muted-strong);
  line-height: 1.72;
  font-size: 0.98rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.stat,
.book-stat {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.stat {
  padding: 14px 12px;
  border: 1px solid rgba(5, 150, 105, 0.14);
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.08), rgba(255, 255, 255, 0.92));
}

.stat__value,
.book-stat__value {
  display: block;
  font-size: 1.36rem;
  font-weight: 800;
}

.stat__label,
.book-stat__label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.hero-links,
.helper-links,
.button-row,
.preview-actions,
.mini-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-links {
  margin-top: 22px;
}

.hero-link,
.helper-link,
.book-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-link:hover,
.helper-link:hover,
.book-chip:hover {
  border-color: rgba(5, 150, 105, 0.4);
  color: var(--accent-strong);
}

.selection-summary {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(5, 150, 105, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.08), rgba(255, 255, 255, 0.9));
}

.selection-summary__eyebrow {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.selection-summary__title {
  margin-top: 6px;
  font-size: 1.16rem;
  font-weight: 800;
}

.selection-summary__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.selector-group {
  margin-top: 18px;
}

.selector-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select,
.number-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.select:focus,
.number-input:focus {
  outline: none;
  border-color: rgba(5, 150, 105, 0.52);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 12px;
}

.meta-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.button-row {
  margin-top: 18px;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.button {
  border: 1px solid rgba(5, 150, 105, 0.52);
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.95), rgba(4, 120, 87, 0.98));
  color: #f8fafc;
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.18);
}

.button-secondary {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
}

.mini-nav {
  margin-top: 18px;
}

.mini-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.mini-nav__link.is-disabled,
.chapter-nav__link.is-disabled {
  opacity: 0.46;
  pointer-events: none;
}

.reading-shell {
  overflow: hidden;
}

.reading-shell__header {
  padding: 28px 30px 0;
}

.reading-shell__label {
  margin: 0;
  color: var(--warm);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reading-shell__title,
.book-card__title,
.chapter-card__title {
  margin: 12px 0 0;
  line-height: 1;
  letter-spacing: -0.03em;
}

.reading-shell__title {
  font-size: clamp(2.2rem, 4vw, 3.3rem);
}

.reading-shell__meta,
.chapter-card__subtitle,
.book-card__lead {
  margin: 14px 0 0;
  color: var(--muted-strong);
  line-height: 1.72;
  font-size: 1rem;
}

.reading-shell__body {
  padding: 24px 30px 30px;
}

.chapter-card,
.book-card {
  width: min(100%, var(--reading-max));
  margin: 0 auto;
  padding: 28px 32px 32px;
}

.chapter-card--preview {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.93)),
    linear-gradient(180deg, rgba(5, 150, 105, 0.05), transparent);
}

.chapter-card__topline,
.book-card__hero,
.catalog-overview__header,
.catalog-panel__topline,
.book-chapters__header,
.chapter-context {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.chapter-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.12);
  color: var(--warm);
  font-size: 0.8rem;
  font-weight: 800;
}

.chapter-card__updated,
.catalog-overview__meta,
.catalog-panel__count,
.book-chapters__meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.chapter-card__title {
  font-size: clamp(2.4rem, 4vw, 3.35rem);
}

.chapter-card__title--compact {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.chapter-nav--footer {
  margin-top: 28px;
}

.chapter-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-muted);
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

.chapter-nav__link:hover {
  border-color: rgba(5, 150, 105, 0.44);
  color: var(--accent-strong);
}

.chapter-context {
  margin: 10px 0 24px;
  gap: 10px;
}

.chapter-context__item {
  min-width: 150px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.78);
}

.chapter-context__label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-context__value {
  display: inline-block;
  margin-top: 7px;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
}

.verses {
  margin-top: 14px;
}

.verse {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-family: var(--reading-font);
  color: #1f2937;
  font-size: 1.16rem;
  line-height: 1.92;
}

.verse:first-child {
  border-top: 0;
  padding-top: 0;
}

.verse-number {
  display: inline-flex;
  min-width: 28px;
  margin-right: 10px;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  vertical-align: top;
}

.reading-note {
  margin-top: 24px;
  padding: 15px 17px;
  border-left: 3px solid rgba(5, 150, 105, 0.44);
  border-radius: 14px;
  background: rgba(5, 150, 105, 0.06);
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.7;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumbs a {
  color: inherit;
}

.catalog-overview {
  margin-top: 28px;
}

.catalog-overview__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.catalog-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.catalog-panel__label,
.book-chapters__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.catalog-panel__lead {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 0.94rem;
  line-height: 1.65;
}

.book-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.book-card__hero {
  gap: 18px;
}

.book-card__title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
}

.book-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 12px;
}

.book-stat {
  padding: 16px 18px;
  border: 1px solid rgba(180, 83, 9, 0.15);
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.06), rgba(255, 255, 255, 0.92));
}

.book-chapters {
  margin-top: 12px;
}

.chapter-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.chapter-pill {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.chapter-pill:hover {
  border-color: rgba(5, 150, 105, 0.42);
}

.chapter-pill.is-featured {
  border-color: rgba(5, 150, 105, 0.38);
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.09), rgba(255, 255, 255, 0.95));
}

.chapter-pill__number {
  font-size: 1.16rem;
  font-weight: 800;
}

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

.site-footer {
  padding: 0 0 36px;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer__box {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
}

@media (max-width: 1024px) {
  .hero-grid,
  .chapter-layout,
  .book-layout {
    grid-template-columns: 1fr;
  }

  .card--sticky {
    position: static;
  }

  .catalog-overview__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-nav {
    justify-content: flex-start;
  }

  .site-main,
  .site-header__inner,
  .site-footer {
    width: min(calc(100% - 22px), var(--shell-max));
  }

  .card,
  .chapter-card,
  .book-card,
  .reading-shell__header,
  .reading-shell__body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .field-row,
  .stats-grid,
  .book-card__meta {
    grid-template-columns: 1fr;
  }

  .hero-title,
  .book-card__title,
  .chapter-card__title,
  .reading-shell__title {
    line-height: 1.08;
  }

  .chapter-pill-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .verse {
    font-size: 1.06rem;
    line-height: 1.84;
  }
}

@media (max-width: 520px) {
  .chapter-pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chapter-nav,
  .button-row,
  .preview-actions,
  .mini-nav {
    flex-direction: column;
  }

  .chapter-nav__link,
  .button,
  .button-secondary,
  .mini-nav__link {
    width: 100%;
    justify-content: center;
  }

  .hero-links,
  .helper-links,
  .book-chip-group {
    gap: 8px;
  }
}
