

:root {
  --paper: #f5f0e6;
  --paper-deep: #e9e1d2;
  --ink: #18201d;
  --muted: #68716b;
  --sage: #53665b;
  --sage-soft: #dce4dd;
  --gold: #b7904b;
  --line: rgba(24, 32, 29, 0.13);
  --surface: rgba(255, 253, 248, 0.72);
  --reader-scale: 1;
  --header-height: 72px;
  --rail-width: 284px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #131815;
  --paper-deep: #1b221e;
  --ink: #f3eee5;
  --muted: #aeb8b1;
  --sage: #9cb5a5;
  --sage-soft: #26342c;
  --gold: #d0a85d;
  --line: rgba(243, 238, 229, 0.13);
  --surface: rgba(24, 31, 27, 0.82);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 84% 8%, rgba(183, 144, 75, 0.1), transparent 26rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

button,
select,
input {
  color: inherit;
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.marketing-page {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(83, 102, 91, 0.13), transparent 24rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--paper) 58%, #eee8dc 100%);
  color: #18201d;
}

.marketing-page button,
.marketing-page a {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.marketing-page button:focus-visible,
.marketing-page a:focus-visible {
  outline: 2px solid #d5b979;
  outline-offset: 4px;
}

.marketing-nav {
  position: sticky;
  z-index: 100;
  top: 0;
  width: 100%;
  height: 76px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(247, 244, 237, 0.12);
  background: rgba(12, 18, 15, 0.88);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px) saturate(120%);
}

.marketing-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #f7f4ed;
  font-size: 0.95rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.marketing-wordmark .wordmark-symbol {
  width: 32px;
  height: 32px;
}

.marketing-wordmark:hover {
  color: #d8c291;
}

.nav-cta,
.nav-cta:link,
.nav-cta:visited {
  width: auto;
  height: 38px;
  min-height: 38px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 1px solid rgba(247, 244, 237, 0.92);
  border-radius: 999px;
  background: #f7f4ed;
  color: #18201d;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.18);
}

.marketing-hero {
  position: relative;
  min-height: calc(100svh - 76px);
  padding: 108px max(24px, calc((100vw - 1180px) / 2)) 96px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 11, 9, 0.94) 0%, rgba(7, 11, 9, 0.79) 42%, rgba(7, 11, 9, 0.18) 75%),
    linear-gradient(180deg, rgba(7, 11, 9, 0.08) 55%, rgba(7, 11, 9, 0.66) 100%),
    url("/hero-ai-translation.jpg") center / cover no-repeat;
  color: #f7f4ed;
}

.hero-copy-block {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.marketing-kicker {
  margin: 0;
  color: #53665b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.marketing-hero .marketing-kicker {
  color: #c7ad7a;
}

.hero-verse {
  position: relative;
  max-width: 580px;
  margin: 32px 0 0;
  padding: 24px 28px 22px 64px;
  overflow: hidden;
  border: 1px solid rgba(199, 173, 122, 0.42);
  border-left: 3px solid #c7ad7a;
  border-radius: 0 18px 18px 0;
  background:
    linear-gradient(115deg, rgba(199, 173, 122, 0.13), transparent 62%),
    rgba(8, 13, 10, 0.58);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.hero-verse::before {
  position: absolute;
  top: 6px;
  left: 18px;
  color: #c7ad7a;
  content: "“";
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.2rem;
  line-height: 1;
  opacity: 0.92;
}

.hero-verse p {
  margin: 0;
  color: #f7f4ed;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.55vw, 1.24rem);
  font-style: normal;
  letter-spacing: -0.012em;
  line-height: 1.58;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.4);
}

.hero-verse cite {
  width: fit-content;
  margin-top: 14px;
  padding: 6px 9px;
  display: block;
  border: 1px solid rgba(199, 173, 122, 0.32);
  border-radius: 999px;
  background: rgba(199, 173, 122, 0.1);
  color: #c7ad7a;
  font-size: 0.61rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.marketing-hero h1 {
  max-width: 760px;
  margin: 0 0 26px;
  font-size: clamp(3.4rem, 6.7vw, 6.8rem);
  font-weight: 720;
  letter-spacing: -0.073em;
  line-height: 0.94;
}

.marketing-subtitle {
  max-width: 650px;
  margin: 0;
  color: rgba(247, 244, 237, 0.72);
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  letter-spacing: -0.018em;
  line-height: 1.58;
}

.marketing-subtitle strong {
  color: #f7f4ed;
  font-weight: 720;
}

.marketing-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.marketing-primary,
.marketing-secondary,
.marketing-text-link {
  min-height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 760;
  text-decoration: none;
}

.marketing-primary {
  border: 1px solid #18201d;
  background: #18201d;
  color: #fff;
  box-shadow: 0 10px 26px rgba(24, 32, 29, 0.14);
}

.marketing-hero .marketing-primary {
  border-color: #f7f4ed;
  background: #f7f4ed;
  color: #18201d;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.marketing-primary:hover,
.nav-cta:hover {
  background: #53665b;
  border-color: #53665b;
  color: #fff;
  transform: translateY(-2px);
}

.marketing-secondary {
  border: 1px solid rgba(247, 244, 237, 0.22);
  background: rgba(12, 18, 15, 0.42);
  color: #f7f4ed;
  backdrop-filter: blur(14px);
}

.marketing-secondary:hover {
  border-color: rgba(247, 244, 237, 0.5);
  background: rgba(247, 244, 237, 0.1);
  transform: translateY(-2px);
}

.marketing-text-link {
  min-height: 52px;
  padding-inline: 10px;
  color: rgba(247, 244, 237, 0.72);
  text-decoration: underline;
  text-decoration-color: rgba(247, 244, 237, 0.32);
  text-underline-offset: 5px;
}

.marketing-text-link:hover {
  color: #f7f4ed;
  text-decoration-color: #c7ad7a;
}

.marketing-primary:active,
.marketing-secondary:active,
.nav-cta:active {
  transform: translateY(0);
}

.hero-image-caption {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  z-index: 2;
  margin: 0;
  color: rgba(247, 244, 237, 0.6);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: right;
}

.hero-image-caption span {
  display: block;
  color: #c7ad7a;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.translation-story {
  min-height: 880px;
  padding: 130px max(24px, calc((100vw - 1120px) / 2));
  display: grid;
  grid-template-columns: minmax(0, 650px);
  align-content: center;
  gap: 28px;
  background:
    linear-gradient(90deg, rgba(7, 10, 8, 0.96) 0%, rgba(7, 10, 8, 0.84) 38%, rgba(7, 10, 8, 0.22) 72%),
    linear-gradient(180deg, rgba(7, 10, 8, 0.08) 50%, rgba(7, 10, 8, 0.58) 100%),
    url("/sermon-mount-background.jpg") 68% center / cover no-repeat;
  color: #f7f4ed;
}

.story-heading h2 {
  margin: 18px 0 0;
  font-size: clamp(3.2rem, 7vw, 6.7rem);
  font-weight: 680;
  letter-spacing: -0.07em;
  line-height: 0.93;
}

.story-body {
  max-width: 590px;
  padding-top: 0;
}

.story-body p {
  margin: 0 0 36px;
  color: #b7c1bb;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.65;
}

.story-link {
  padding: 0 0 8px;
  display: inline-flex;
  gap: 40px;
  border: 0;
  border-bottom: 1px solid rgba(247, 244, 237, 0.35);
  background: transparent;
  color: #f7f4ed;
  font-size: 0.82rem;
  font-weight: 700;
}

.story-link:hover {
  gap: 48px;
  border-color: #c7ad7a;
  color: #d8c291;
}

.broader-canon-intro > p:last-child {
  margin: 0;
  color: #68716b;
  font-size: 0.88rem;
  line-height: 1.65;
}

.broader-canon {
  margin-top: 90px;
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.45fr);
  gap: 72px;
}

.broader-canon-intro h3 {
  margin: 16px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.7vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.broader-canon-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(24, 32, 29, 0.14);
}

.broader-canon-grid li {
  min-height: 78px;
  padding: 16px 0;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(24, 32, 29, 0.14);
}

.canon-order {
  color: #b7904b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.broader-canon-grid h4 {
  margin: 0 0 4px;
  font-size: 0.92rem;
}

.broader-canon-grid h4 a,
.broader-canon-grid h4 button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 760;
  text-align: left;
  text-decoration-color: color-mix(in srgb, var(--gold) 55%, transparent);
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.broader-canon-grid h4 a:hover,
.broader-canon-grid h4 button:hover {
  color: var(--sage);
  text-decoration: underline;
}

.broader-canon-grid p {
  margin: 0;
  color: #68716b;
  font-size: 0.74rem;
}

.broader-canon-grid small {
  padding: 6px 9px;
  border: 1px solid rgba(83, 102, 91, 0.25);
  border-radius: 999px;
  color: #53665b;
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.editorial-status {
  margin: 72px 0 0;
  padding: 22px 24px;
  border-left: 2px solid #b7904b;
  background: rgba(83, 102, 91, 0.07);
  color: #53665b;
  font-size: 0.78rem;
  line-height: 1.6;
}

.marketing-footer {
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(24, 32, 29, 0.11);
  background: #f7f4ed;
  color: #18201d;
  font-size: 0.78rem;
}

.marketing-footer small {
  color: #68716b;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
}

.brand-mark,
.wordmark-symbol,
.pagination-mark {
  flex: 0 0 auto;
}

.brand-mark {
  width: 64px;
  height: 64px;
}

.cross-logo {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 24%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), transparent 42%),
    var(--sage);
  box-shadow:
    0 1px 1px rgba(24, 32, 29, 0.08),
    0 5px 14px rgba(24, 32, 29, 0.12);
}

.cross-logo::before,
.cross-logo::after {
  position: absolute;
  left: 50%;
  border-radius: 999px;
  background: var(--paper);
  content: "";
  transform: translateX(-50%);
}

.cross-logo::before {
  /* Golden-ratio construction: 61.804 ÷ 38.197 = φ. */
  top: 19.098%;
  width: 14.59%;
  height: 61.804%;
}

.cross-logo::after {
  /* The crossbar center divides the stem into 38.2% / 61.8%. */
  top: 35.41%;
  width: 38.197%;
  height: 14.59%;
}

.progress-track {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--gold);
  transition: width 300ms ease;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  text-decoration: none;
}

.wordmark-symbol {
  width: 38px;
  height: 38px;
}

.header-actions,
.reading-controls,
.rail-heading,
.search-panel header {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 8px;
}

.icon-button,
.text-button,
.reading-controls button {
  border: 0;
  background: transparent;
}

.icon-button {
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.15rem;
}

.icon-button:hover,
.text-button:hover,
.reading-controls button:hover {
  background: var(--sage-soft);
}

.text-button {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
}

.library-rail {
  position: fixed;
  z-index: 40;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--rail-width);
  overflow-y: auto;
  padding: 28px 22px 36px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, var(--sage-soft));
}

.rail-heading {
  justify-content: space-between;
  margin-bottom: 25px;
}

.eyebrow {
  margin: 0;
  color: var(--sage);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.book-group {
  margin: 0 0 24px;
}

.book-group h2 {
  margin: 0 10px 8px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-group button,
.book-group a {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  text-align: left;
  text-decoration: none;
}

.book-group button small,
.book-group a small {
  color: var(--muted);
  font-size: 0.68rem;
}

.book-group button:hover,
.book-group a:hover,
.book-group .active {
  background: var(--sage-soft);
}

.book-group .active {
  color: var(--sage);
  font-weight: 700;
}

.rail-note {
  margin-top: 36px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.rail-note span {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.rail-note p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.reader-main {
  min-height: 100vh;
  margin-left: var(--rail-width);
  padding-top: var(--header-height);
}

.reader-toolbar {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.breadcrumb i {
  color: var(--gold);
  font-style: normal;
}

.breadcrumb strong {
  color: var(--ink);
}

.reading-controls {
  gap: 4px;
}

.reading-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.reading-controls select {
  height: 34px;
  min-width: 112px;
  padding: 0 24px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.reading-controls button {
  width: 36px;
  height: 34px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 700;
}

.chapter-audio-card audio:focus-visible,
.chapter-audio-actions button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 48%, transparent);
  outline-offset: 3px;
}

.chapter {
  max-width: 780px;
  margin: 0 auto;
  padding: 76px 54px 48px;
}

.chapter-heading {
  margin-bottom: 42px;
}

.chapter-heading h1 {
  margin: 12px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 8vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.gold-rule {
  width: 62px;
  height: 2px;
  background: var(--gold);
}

.overview {
  margin: 0 0 52px;
  padding: 26px 30px;
  border-left: 2px solid var(--gold);
  background: var(--surface);
}

.overview h2 {
  margin: 0 0 10px;
  color: var(--sage);
  font-size: 0.69rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.overview p {
  margin: 0;
  color: color-mix(in srgb, var(--ink) 86%, var(--muted));
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(1rem * var(--reader-scale));
  font-style: italic;
  line-height: 1.7;
}

.chapter-audio-card {
  margin: -22px 0 54px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--sage) 30%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 38%),
    var(--surface);
  box-shadow: 0 16px 42px rgba(22, 29, 25, 0.07);
}

.chapter-audio-copy {
  min-width: 0;
}

.chapter-audio-copy .eyebrow {
  margin: 0 0 7px;
}

.chapter-audio-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
}

.chapter-audio-copy > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.chapter-audio-card audio {
  width: 100%;
  height: 48px;
  color-scheme: light;
}

[data-theme="dark"] .chapter-audio-card audio {
  color-scheme: dark;
}

.chapter-audio-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chapter-audio-actions button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 760;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.chapter-audio-actions button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.chapter-audio-actions button:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  background: var(--sage);
}

.chapter-audio-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.chapter-audio-disclosure {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.verses p {
  margin: 0 0 1.15em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(1.18rem * var(--reader-scale));
  line-height: 1.82;
}

.verse-number {
  position: relative;
  top: -0.08em;
  margin-right: 0.58em;
  color: var(--gold);
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 0.58em;
  font-weight: 800;
  text-decoration: none;
}

.verse-number:target,
.verses p:target {
  background: color-mix(in srgb, var(--gold) 15%, transparent);
}

.chapter-pagination {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 54px 88px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
}

.chapter-pagination button,
.chapter-pagination a {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}

.chapter-pagination button:last-child,
.chapter-pagination a:last-child {
  justify-self: end;
}

.chapter-pagination button:disabled {
  opacity: 0.25;
  cursor: default;
}

.chapter-pagination small {
  color: var(--muted);
  font-size: 0.72rem;
}

.pagination-mark {
  width: 42px;
  height: 42px;
}

.search-layer,
.search-scrim,
.drawer-scrim {
  position: fixed;
  inset: 0;
}

.search-layer {
  z-index: 90;
  display: grid;
  place-items: start center;
  padding: 9vh 20px 20px;
}

.search-scrim,
.drawer-scrim {
  border: 0;
  background: rgba(9, 13, 11, 0.63);
  backdrop-filter: blur(5px);
}

.search-panel {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  max-height: 82vh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

.search-panel header {
  justify-content: space-between;
  padding: 20px 24px 8px;
}

.search-panel input {
  width: calc(100% - 48px);
  margin: 8px 24px 18px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.search-results {
  max-height: 58vh;
  overflow-y: auto;
  padding: 0 16px 20px;
}

.search-results button {
  width: 100%;
  padding: 14px 12px;
  display: grid;
  gap: 5px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.search-results button:hover {
  background: var(--sage-soft);
}

.search-results strong {
  color: var(--gold);
  font-size: 0.78rem;
}

.search-results span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  line-height: 1.5;
}

.empty-state {
  padding: 24px 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.mobile-only {
  display: none;
}

@media (max-width: 860px) {
  :root {
    --header-height: 64px;
  }

  .mobile-only {
    display: grid;
  }

  .site-header {
    padding: 0 14px;
  }

  .wordmark {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
  }

  .wordmark-symbol {
    width: 31px;
    height: 31px;
    border-radius: 8px;
    box-shadow: 2px 2px 0 var(--gold);
  }

  .header-actions .text-button {
    display: none;
  }

  .library-rail {
    z-index: 81;
    top: 0;
    width: min(330px, 88vw);
    padding-top: 24px;
    transform: translateX(-105%);
    transition: transform 220ms ease;
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.24);
  }

  .library-rail.is-open {
    transform: translateX(0);
  }

  .drawer-scrim {
    z-index: 80;
  }

  .reader-main {
    margin-left: 0;
  }

  .reader-toolbar {
    padding: 16px 20px;
  }

  .breadcrumb span,
  .breadcrumb i,
  .reading-controls label > span {
    display: none;
  }

  .chapter {
    padding: 54px 24px 38px;
  }

  .chapter-heading {
    margin-bottom: 32px;
  }

  .overview {
    margin-bottom: 38px;
    padding: 22px 22px;
  }

  .chapter-audio-card {
    margin-top: -14px;
    padding: 20px;
  }

  .verses p {
    font-size: calc(1.12rem * var(--reader-scale));
    line-height: 1.75;
  }

  .chapter-pagination {
    padding: 28px 24px 70px;
  }

  .search-layer {
    padding: 0;
  }

  .search-panel {
    width: 100%;
    min-height: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
  }

  .search-results {
    max-height: calc(100vh - 150px);
  }

  .marketing-hero {
    min-height: 820px;
    padding-top: 82px;
    align-items: flex-start;
    background-position: 58% center;
  }

  .marketing-subtitle {
    margin-inline: 0;
  }

  .marketing-actions {
    justify-content: flex-start;
  }

  .translation-story {
    grid-template-columns: 1fr;
    gap: 30px;
    background:
      linear-gradient(90deg, rgba(7, 10, 8, 0.94) 0%, rgba(7, 10, 8, 0.78) 48%, rgba(7, 10, 8, 0.28) 100%),
      linear-gradient(180deg, rgba(7, 10, 8, 0.05) 45%, rgba(7, 10, 8, 0.68) 100%),
      url("/sermon-mount-background.jpg") 66% center / cover no-repeat;
  }

  .story-body {
    max-width: 620px;
    padding-top: 0;
  }

  .broader-canon {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 620px) {
  .reader-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .breadcrumb {
    min-width: 0;
  }

  .breadcrumb strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reading-controls {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(112px, 1fr) 38px 38px;
    gap: 6px;
  }

  .reading-controls label {
    min-width: 0;
    margin-right: 0;
  }

  .reading-controls select {
    width: 100%;
  }

  .reading-controls button {
    width: 100%;
    min-width: 0;
    height: 40px;
  }

  .chapter-audio-actions > * {
    flex: 1 1 160px;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .chapter-heading h1 {
    font-size: 3.25rem;
  }

  .chapter {
    padding-inline: 20px;
  }

  .overview {
    margin-inline: -4px;
  }

  .chapter-audio-card {
    margin-inline: -4px;
    padding: 18px;
    border-radius: 15px;
  }

  .chapter-audio-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chapter-audio-actions > * {
    width: 100%;
  }

  .chapter-pagination {
    padding-inline: 20px;
  }
  .marketing-nav {
    padding-inline: 14px;
  }

  .marketing-hero {
    min-height: 760px;
    padding: 58px 20px 88px;
    background-position: 61% center;
  }

  .marketing-hero h1 {
    font-size: clamp(3rem, 14.5vw, 4.1rem);
  }

  .hero-verse {
    padding: 21px 20px 19px 52px;
  }

  .hero-verse::before {
    left: 14px;
    font-size: 3.5rem;
  }

  .marketing-subtitle {
    font-size: 1rem;
  }

  .marketing-actions {
    display: grid;
  }

  .hero-image-caption {
    right: 20px;
    bottom: 22px;
  }

  .translation-story {
    min-height: 780px;
    padding-block: 90px;
    background:
      linear-gradient(90deg, rgba(7, 10, 8, 0.92), rgba(7, 10, 8, 0.6)),
      linear-gradient(180deg, rgba(7, 10, 8, 0.12) 38%, rgba(7, 10, 8, 0.76) 100%),
      url("/sermon-mount-background.jpg") 70% center / cover no-repeat;
  }

  .broader-canon-grid li {
    grid-template-columns: 34px 1fr;
  }

  .broader-canon-grid small {
    grid-column: 2;
    width: fit-content;
  }

  .marketing-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marketing-page button,
  .marketing-page a {
    transition: none;
  }
}

@media print {
  .site-header,
  .library-rail,
  .reader-toolbar,
  .chapter-pagination,
  .progress-track {
    display: none;
  }

  .reader-main {
    margin: 0;
    padding: 0;
  }

  .chapter {
    max-width: 100%;
    padding: 0;
  }
}

.home-body {
  background:
    radial-gradient(circle at 78% 12%, rgba(183, 144, 75, 0.18), transparent 25rem),
    var(--paper);
}

.home-main {
  padding-top: var(--header-height);
}

.hero {
  min-height: 78vh;
  padding: 11vh clamp(24px, 8vw, 120px) 80px;
  display: grid;
  align-content: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: min(48vw, 660px);
  aspect-ratio: 1;
  top: 6%;
  right: -12%;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.46;
  pointer-events: none;
}

.hero h1 {
  max-width: 940px;
  margin: 20px 0 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 8.7vw, 8.6rem);
  font-weight: 400;
  letter-spacing: -0.067em;
  line-height: 0.87;
}

.hero h1 em {
  color: var(--sage);
  font-weight: 400;
}

.hero-copy {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.7;
}

.translation-callout {
  max-width: 650px;
  margin: 22px 0 0;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.6;
}

.translation-callout span {
  display: block;
  margin-bottom: 3px;
  color: var(--gold-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.translation-note {
  margin: 16px 18px 24px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  min-height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.primary-action {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.primary-action:hover {
  background: var(--sage);
  border-color: var(--sage);
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.continue-card {
  width: min(360px, 100%);
  margin-top: 36px;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.continue-card .eyebrow {
  grid-column: 1 / -1;
}

.continue-card i {
  color: var(--gold);
  font-style: normal;
}

.library-section {
  padding: 100px clamp(24px, 8vw, 120px);
  background: var(--ink);
  color: var(--paper);
}

.library-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 54px;
}

.library-section h2,
.about-strip h2 {
  margin: 14px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(245, 240, 230, 0.16);
}

.book-card {
  min-height: 175px;
  padding: 24px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  border-right: 1px solid rgba(245, 240, 230, 0.16);
  border-bottom: 1px solid rgba(245, 240, 230, 0.16);
  color: var(--paper);
  text-decoration: none;
  transition: background 160ms ease;
}

.book-card:nth-child(3n) {
  border-right: 0;
}

.book-card:hover {
  background: rgba(245, 240, 230, 0.07);
}

.book-order {
  color: var(--gold);
  font-size: 0.68rem;
}

.book-card small,
.book-card p {
  color: #aab5ae;
  font-size: 0.7rem;
}

.book-card h3 {
  margin: 7px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.book-card p {
  margin: 0;
}

.book-card i {
  color: var(--gold);
  font-style: normal;
}

.about-strip {
  padding: 100px clamp(24px, 8vw, 120px);
  display: grid;
  grid-template-columns: 0.7fr 1.6fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-strip > div p {
  max-width: 620px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.75;
}

.about-strip dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.about-strip dl div {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.about-strip dt {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.about-strip dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.site-footer {
  padding: 38px clamp(24px, 8vw, 120px);
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.site-footer .wordmark-symbol {
  width: 38px;
  height: 38px;
}

.site-footer p {
  font-family: Georgia, "Times New Roman", serif;
}

.site-footer small {
  justify-self: end;
  max-width: 600px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: right;
}

.search-layer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.search-layer.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.search-results a {
  padding: 14px 12px;
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.search-results a:hover {
  background: var(--sage-soft);
}

.search-results a strong {
  color: var(--gold);
  font-size: 0.78rem;
}

.search-results a span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  line-height: 1.5;
}

.drawer-scrim {
  z-index: 39;
  display: none;
}

.drawer-scrim.is-visible {
  display: block;
}

.not-found {
  min-height: 100vh;
  padding: 18vh 8vw;
}

.not-found h1 {
  max-width: 800px;
  margin: 16px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.05em;
}

.not-found p {
  margin-bottom: 30px;
  color: var(--muted);
}

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

  .book-card:nth-child(3n) {
    border-right: 1px solid rgba(245, 240, 230, 0.16);
  }

  .book-card:nth-child(2n) {
    border-right: 0;
  }

  .about-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 84vh;
    padding-top: 90px;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 17vw, 5.4rem);
  }

  .library-section {
    padding-block: 74px;
  }

  .library-section > header {
    display: block;
  }

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

  .book-card,
  .book-card:nth-child(3n),
  .book-card:nth-child(2n) {
    border-right: 0;
  }

  .about-strip dl {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer {
    grid-template-columns: auto 1fr;
  }

  .site-footer small {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }
}
