/* Guided reader for the Pompeii novena. Prayer copy remains untouched. */

body.novena-reader-ready .page-hero__inner {
  max-width: 1040px;
}

body.novena-reader-ready .page-content {
  max-width: 980px;
}

body.novena-reader-ready .page-content > p,
body.novena-reader-ready .page-content > h2,
body.novena-reader-ready .page-content > h3,
body.novena-reader-ready .page-content > h4,
body.novena-reader-ready .page-content > ul {
  max-width: 74ch;
}

body.novena-reader-ready .page-content > [hidden] {
  display: none !important;
}

.novena-section-title,
.novena-step-title {
  scroll-margin-top: 104px;
}

.novena-section-title {
  margin-top: clamp(44px, 7vw, 76px);
  margin-bottom: 18px;
  color: var(--air-ink);
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  line-height: 1.18;
}

.novena-step-title {
  margin-top: clamp(30px, 5vw, 48px);
  margin-bottom: 12px;
  color: var(--air-ink);
  font-family: "IBM Plex Sans", "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.42;
  font-weight: 800;
}

.novena-reader-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  width: 100%;
  margin: clamp(36px, 6vw, 64px) 0;
}

.novena-toc,
.novena-app-card {
  border: 1px solid var(--air-line);
  border-radius: var(--air-radius);
  box-shadow: 0 16px 38px rgba(3, 19, 37, .08);
}

.novena-toc {
  overflow: hidden;
  color: var(--air-ink);
  background: var(--air-paper);
}

.novena-toc__summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 48px 14px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.novena-toc__summary::-webkit-details-marker {
  display: none;
}

.novena-toc__summary::after {
  position: absolute;
  right: 18px;
  content: "+";
  color: var(--air-teal-dark);
  font-size: 1.5rem;
  line-height: 1;
}

.novena-toc[open] .novena-toc__summary::after {
  content: "−";
}

.novena-toc__list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0 10px 14px;
  list-style: none;
  counter-reset: novena-toc;
}

.novena-toc__storage-note {
  margin: 0;
  padding: 12px 18px 16px;
  color: var(--air-muted);
  border-top: 1px solid var(--air-line);
  font-size: .78rem;
  line-height: 1.45;
}

.novena-toc__item {
  margin: 0;
  counter-increment: novena-toc;
}

.novena-toc__link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 44px;
  padding: 9px 10px;
  color: var(--air-ink);
  border-radius: 9px;
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.4;
}

.novena-toc__link::before {
  content: counter(novena-toc, decimal-leading-zero);
  color: var(--air-teal-dark);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.novena-toc__link:hover,
.novena-toc__link:focus-visible,
.novena-toc__link.is-active {
  color: var(--air-ink);
  background: #efeadd;
}

.novena-toc__link.is-active {
  box-shadow: inset 4px 0 0 var(--air-brand);
  font-weight: 800;
}

.novena-app-card {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 4vw, 32px);
  color: var(--air-cream);
  background: var(--air-ink);
}

.novena-app-card__head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.novena-app-card__icon {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(248, 240, 218, .22);
  border-radius: 13px;
}

.novena-app-card__eyebrow {
  margin: 0 0 3px;
  color: var(--air-teal);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.novena-app-card__title {
  margin: 0;
  color: var(--air-cream);
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.18;
}

.novena-app-card__copy {
  margin: 18px 0 0;
  color: rgba(248, 240, 218, .88);
  line-height: 1.55;
}

.novena-app-card__benefits {
  display: grid;
  gap: 7px;
  margin: 16px 0 22px;
  padding: 0;
  list-style: none;
  color: var(--air-cream);
  font-size: .9rem;
}

.novena-app-card__benefits li {
  position: relative;
  padding-left: 22px;
}

.novena-app-card__benefits li::before {
  position: absolute;
  top: .62em;
  left: 2px;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--air-teal);
  border-radius: 50%;
}

.novena-app-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.novena-store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 15px;
  color: #fff;
  background: var(--air-brand);
  border: 1px solid var(--air-brand);
  border-radius: 10px;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 800;
}

.novena-store-link:hover,
.novena-store-link:focus-visible {
  color: #fff;
  background: var(--air-brand-dark);
}

.novena-app-card__actions[data-platform="ios"] .novena-store-link--android,
.novena-app-card__actions[data-platform="android"] .novena-store-link--ios {
  display: none;
}

.novena-resume {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 74ch;
  margin: 8px 0 34px;
  padding: 18px;
  color: var(--air-ink);
  background: #efeadd;
  border: 1px solid var(--air-line);
  border-left: 5px solid var(--air-teal-dark);
  border-radius: 11px;
}

.novena-resume__title,
.novena-resume__place {
  margin: 0;
}

.novena-resume__title {
  color: var(--air-ink);
  font-weight: 800;
}

.novena-resume__place {
  margin-top: 3px;
  color: var(--air-muted);
  font-size: .9rem;
}

.novena-resume__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.novena-resume__continue,
.novena-resume__restart {
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 800;
}

.novena-resume__continue {
  color: #fff;
  background: var(--air-brand);
  border: 1px solid var(--air-brand);
}

.novena-resume__restart {
  color: var(--air-ink);
  background: transparent;
  border: 1px solid rgba(16, 36, 58, .28);
}

.novena-app-prompt {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  max-width: 74ch;
  margin: 38px 0;
  padding: 16px 18px;
  color: var(--air-ink);
  background: #efeadd;
  border: 1px solid var(--air-line);
  border-radius: 10px;
}

.novena-app-prompt p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.48;
}

.novena-app-prompt a {
  flex: 0 0 auto;
  color: var(--air-brand-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.novena-reader-nav {
  display: none;
}

@media (max-width: 899px) {
  .novena-reader-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .novena-toc {
    order: 1;
  }

  .novena-app-card {
    order: 2;
  }

  .novena-resume {
    grid-template-columns: minmax(0, 1fr);
  }

  .novena-resume__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  body.novena-reader-ready {
    padding-bottom: calc(var(--dzv-player-clearance, calc(var(--player-height) + env(safe-area-inset-bottom))) + 84px);
  }

  body.novena-reader-ready .page-content > p,
  body.novena-reader-ready .page-content > h2,
  body.novena-reader-ready .page-content > h3,
  body.novena-reader-ready .page-content > h4,
  body.novena-reader-ready .page-content > ul {
    max-width: none;
  }

  .novena-reader-tools {
    margin: 34px 0 44px;
  }

  .novena-toc__summary,
  .novena-toc__link {
    min-height: 48px;
  }

  .novena-app-card__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .novena-store-link {
    width: 100%;
  }

  .novena-app-prompt {
    align-items: flex-start;
    flex-direction: column;
  }

  .novena-reader-nav {
    position: fixed;
    z-index: 10020;
    right: 68px;
    bottom: calc(var(--dzv-player-clearance, calc(var(--player-height, 78px) + env(safe-area-inset-bottom))) + 10px);
    left: 10px;
    display: block;
    overflow: hidden;
    color: var(--air-cream);
    background: rgba(3, 19, 37, .98);
    border: 1px solid rgba(248, 240, 218, .18);
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .32);
    opacity: 0;
    transform: translateY(calc(100% + 24px));
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, bottom .18s ease;
  }

  .novena-reader-nav.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .novena-reader-nav__current {
    display: block;
    overflow: hidden;
    padding: 7px 12px 2px;
    color: var(--air-teal);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .7rem;
    font-weight: 800;
  }

  .novena-reader-nav__controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
  }

  .novena-reader-nav__button {
    min-height: 46px;
    padding: 8px;
    color: var(--air-cream);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: .82rem;
    font-weight: 800;
  }

  .novena-reader-nav__button + .novena-reader-nav__button {
    border-left: 1px solid rgba(248, 240, 218, .16);
  }

  .novena-reader-nav__button--toc {
    color: var(--air-teal);
  }

  .novena-reader-nav__button:disabled {
    opacity: .42;
  }

  body.novena-reader-ready .rcfw-manage {
    right: 10px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .novena-reader-nav {
    transition: none;
  }
}

/* App promotion stays readable inside the page's general prose/link styles. */
body.novena-reader-ready .novena-app-card {
  color: #fffdf6;
  background: #10243a;
}
body.novena-reader-ready .novena-app-card__title,
body.novena-reader-ready .novena-app-card__benefits,
body.novena-reader-ready .novena-app-card__benefits li { color: #fffdf6; }
body.novena-reader-ready .novena-app-card__copy { color: #e0e6ec; }
body.novena-reader-ready .novena-app-card__eyebrow { color: #8ad9ca; }
body.novena-reader-ready .page-content .novena-store-link,
body.novena-reader-ready .page-content .novena-store-link:hover,
body.novena-reader-ready .page-content .novena-store-link:focus-visible {
  color: #fff;
  text-decoration: none;
}
.novena-app-card__actions { align-items: center; gap: 8px 16px; }
body.novena-reader-ready .page-content .novena-store-link--badge,
body.novena-reader-ready .page-content .novena-store-link--badge:hover,
body.novena-reader-ready .page-content .novena-store-link--badge:focus-visible {
  width: fit-content;
  min-height: 72px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}
body.novena-reader-ready .page-content .novena-store-badge {
  display: block;
  width: auto;
  max-width: 100%;
  height: 48px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}
body.novena-reader-ready .page-content .novena-store-badge--android { height: 72px; }
body.novena-reader-ready .page-content .novena-store-link:focus-visible {
  outline: 3px solid #8ad9ca;
  outline-offset: 4px;
}
