:root {
  --bg: #fbfaf7;
  --surface: #fffdf9;
  --soft: #f3eee6;
  --soft-strong: #ebe4d8;
  --ink: #211e1b;
  --muted: #6e675e;
  --cross: #6f332b;
  --rule: #d4cabd;
  --border: #bfb4a6;
  --shadow: 0 24px 70px rgba(42, 35, 27, 0.14);
  --header-h: 88px;
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(251, 250, 247, 0.92), rgba(251, 250, 247, 0.98)),
    var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  padding: 14px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--rule);
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: blur(12px);
}

.menu-button,
.close-menu-button,
.float-arrow {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.menu-button {
  width: 46px;
  height: 46px;
  align-self: center;
  justify-self: start;
  gap: 5px;
  padding: 12px;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cross);
}

.brand-center {
  min-width: 0;
  text-align: center;
}

.brand-center h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3.1vw, 43px);
  line-height: 1;
  letter-spacing: 0;
}

.issue-date {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.15;
}

.jerusalem-cross {
  width: 58px;
  height: 58px;
  justify-self: end;
  display: block;
}

.menu-button:focus-visible,
.close-menu-button:focus-visible,
.archive-search:focus-visible,
.issue-button:focus-visible,
.float-arrow:focus-visible {
  outline: 2px solid var(--cross);
  outline-offset: 4px;
}

.drawer-backdrop {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 60;
  background: rgba(33, 30, 27, 0.18);
}

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

.archive-panel {
  position: fixed;
  inset: var(--header-h) auto 0 0;
  z-index: 70;
  width: min(390px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid var(--rule);
  background: #f4f0e9;
  box-shadow: var(--shadow);
  transform: translateX(-102%);
  transition: transform 180ms ease;
  overflow: auto;
}

.archive-panel.open {
  transform: translateX(0);
}

.archive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.archive-title {
  color: var(--cross);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.close-menu-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: var(--cross);
  font-size: 28px;
  line-height: 1;
}

.archive-search {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 0 13px;
}

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

.issue-button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 96px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  padding: 13px 14px;
  text-align: left;
}

.issue-button:hover,
.issue-button.active {
  border-color: var(--border);
  background: var(--surface);
}

.issue-label {
  color: var(--cross);
  font-weight: 700;
}

.issue-meta,
.issue-topics {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.reader {
  position: fixed;
  inset: var(--header-h) 0 0;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vh, 34px);
  overflow: hidden;
}

.reader-frame {
  position: relative;
  width: min(100%, 1080px);
  height: min(100%, 730px);
  display: grid;
  place-items: center;
}

.scripture-card {
  width: calc(100% - 76px);
  height: 100%;
  display: grid;
  align-content: center;
  gap: clamp(12px, 2vh, 23px);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: rgba(255, 253, 249, 0.86);
  padding: clamp(28px, 5vh, 60px) clamp(44px, 6vw, 86px);
  box-shadow: 0 14px 56px rgba(42, 35, 27, 0.08);
}

.scripture-card.alt {
  background: var(--soft);
}

.scripture-card.featured {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.scripture-card.contemplation {
  background: var(--soft);
}

.card-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5.2vmin, 66px);
  line-height: 0.98;
  letter-spacing: 0;
  text-align: center;
}

.featured .card-title {
  font-size: clamp(47px, 7vmin, 82px);
}

.card-ref {
  color: var(--cross);
  font-size: clamp(17px, 2vmin, 25px);
  font-weight: 700;
  text-align: center;
}

.scripture-box {
  border-left: 7px solid var(--rule);
  background: rgba(247, 244, 239, 0.78);
  padding: clamp(17px, 2.8vh, 28px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 3vmin, 34px);
  line-height: 1.28;
}

.card-point {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 3vmin, 34px);
  line-height: 1.28;
}

.card-point p {
  margin: 0 0 0.78em;
}

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

.quote-list {
  display: grid;
  gap: clamp(20px, 3.8vh, 36px);
}

.quote-label {
  color: var(--cross);
  font-weight: 700;
  margin-bottom: 12px;
}

.quote-text {
  border-left: 7px solid var(--rule);
  padding-left: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 3.3vmin, 40px);
  font-style: italic;
  line-height: 1.3;
}

.contemplation-frame {
  width: fit-content;
  max-width: min(100%, 700px);
  justify-self: center;
  border: 1px solid var(--border);
  background: rgba(255, 253, 249, 0.62);
  padding: clamp(26px, 4.5vh, 52px);
  text-align: center;
}

.contemplation-frame .card-point {
  font-style: italic;
}

.float-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  color: var(--cross);
  font-size: 28px;
  font-weight: 700;
  transform: translateY(-50%);
  box-shadow: 0 10px 28px rgba(42, 35, 27, 0.12);
}

.float-prev {
  left: 0;
}

.float-next {
  right: 0;
}

.float-arrow:disabled {
  opacity: 0.26;
  cursor: default;
  box-shadow: none;
}

.progress {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.scripture-card.compact {
  gap: 11px;
  padding-block: clamp(22px, 3.4vh, 42px);
}

.scripture-card.compact .card-title {
  font-size: clamp(30px, 4.6vmin, 58px);
}

.scripture-card.featured.compact .card-title {
  font-size: clamp(39px, 5.8vmin, 70px);
}

.scripture-card.compact .scripture-box,
.scripture-card.compact .card-point {
  font-size: clamp(18px, 2.45vmin, 28px);
}

.scripture-card.tight {
  gap: 9px;
  padding-block: clamp(18px, 2.8vh, 34px);
}

.scripture-card.tight .card-title {
  font-size: clamp(28px, 4vmin, 52px);
}

.scripture-card.tight .scripture-box,
.scripture-card.tight .card-point,
.scripture-card.tight .quote-text {
  font-size: clamp(17px, 2.1vmin, 24px);
}

@media (max-width: 700px) {
  :root {
    --header-h: 78px;
  }

  .app-header {
    grid-template-columns: 58px minmax(0, 1fr) 58px;
    padding: 12px 14px;
  }

  .menu-button {
    width: 42px;
    height: 42px;
    padding: 10px;
  }

  .brand-center h1 {
    font-size: clamp(20px, 5.7vw, 26px);
  }

  .issue-date {
    font-size: 12px;
    margin-top: 5px;
  }

  .jerusalem-cross {
    width: 44px;
    height: 44px;
  }

  .archive-panel {
    width: min(360px, calc(100vw - 22px));
    padding: 20px;
  }

  .reader {
    padding: 12px;
  }

  .reader-frame {
    height: 100%;
  }

  .scripture-card {
    width: 100%;
    height: 100%;
    padding: 24px 24px 76px;
    gap: 13px;
  }

  .card-title {
    font-size: clamp(31px, 10vw, 42px);
  }

  .featured .card-title {
    font-size: clamp(38px, 12vw, 54px);
  }

  .card-ref {
    font-size: 18px;
  }

  .scripture-box,
  .card-point {
    font-size: clamp(19px, 5.5vw, 24px);
    line-height: 1.28;
  }

  .scripture-box {
    padding: 16px 18px;
    border-left-width: 6px;
  }

  .quote-text {
    font-size: clamp(21px, 6vw, 27px);
  }

  .float-arrow {
    top: auto;
    bottom: 14px;
    width: 46px;
    height: 46px;
    font-size: 26px;
    transform: none;
  }

  .float-prev {
    left: 18px;
  }

  .float-next {
    right: 18px;
  }

  .progress {
    bottom: 31px;
    max-width: calc(100% - 150px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .contemplation-frame {
    padding: 24px 20px;
  }
}

@media (max-width: 380px) {
  .brand-center h1 {
    font-size: 18px;
  }

  .jerusalem-cross {
    width: 40px;
    height: 40px;
  }

  .scripture-card {
    padding-inline: 20px;
  }

  .scripture-box,
  .card-point {
    font-size: 18px;
  }
}
