.read-along-page {
  --story-size: 1.16rem;
  --story-leading: 1.82;
  background: var(--cream);
}

.read-along-page[data-reading-size="small"] {
  --story-size: 1.02rem;
}

.read-along-page[data-reading-size="large"] {
  --story-size: 1.34rem;
  --story-leading: 1.9;
}

.read-along-page.is-following {
  padding-bottom: 116px;
}

.pilot-banner {
  padding: 9px 18px;
  color: var(--white);
  background: var(--plum);
  font-size: 0.84rem;
  font-weight: 850;
  text-align: center;
  letter-spacing: 0.025em;
}

.pilot-hero {
  position: relative;
  padding: clamp(34px, 6vw, 78px) 0 clamp(74px, 9vw, 118px);
  color: var(--white);
  background:
    radial-gradient(circle at 85% 15%, rgba(246, 196, 83, 0.24), transparent 28%),
    linear-gradient(145deg, var(--fjord-deep), #0b5977 62%, var(--fjord));
  overflow: hidden;
}

.pilot-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 48px;
  background: var(--paper);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.pilot-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 800;
}

.pilot-breadcrumbs a {
  color: rgba(255, 255, 255, 0.86);
}

.pilot-breadcrumbs li + li::before {
  content: "›";
  margin-right: 7px;
  color: var(--sun);
}

.pilot-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
}

.pilot-cover {
  position: relative;
  margin: 0;
  border: 4px solid rgba(255, 255, 255, 0.84);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  transform: rotate(-1deg);
}

.pilot-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pilot-cover figcaption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 6px 10px;
  color: var(--fjord-deep);
  background: rgba(255, 253, 247, 0.92);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
}

.pilot-hero__copy .eyebrow {
  color: var(--fjord-deep);
}

.pilot-hero__copy h1 {
  margin: 12px 0 20px;
  font-size: clamp(2.35rem, 5vw, 4.55rem);
}

.pilot-hero__copy > p {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
}

.pilot-hero .fact {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pilot-actions {
  margin-top: 28px;
}

.pilot-actions .button--cream {
  border-color: rgba(255, 255, 255, 0.35);
}

.pilot-actions .button {
  min-width: 148px;
}

.pilot-actions__note {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 0.88rem !important;
}

.listen-section {
  padding: clamp(58px, 8vw, 96px) 0;
  background: var(--paper);
}

.listen-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  background: var(--white);
  border: 3px solid rgba(18, 59, 83, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.listen-card__icon {
  display: grid;
  place-items: center;
  width: clamp(76px, 10vw, 112px);
  aspect-ratio: 1;
  color: var(--fjord-deep);
  background: var(--sun);
  border-radius: 50%;
  box-shadow: 0 9px 0 rgba(18, 59, 83, 0.13);
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.listen-card h2 {
  margin-bottom: 6px;
  font-size: clamp(1.75rem, 3.8vw, 2.8rem);
}

.listen-card p {
  margin-bottom: 18px;
  color: var(--muted);
}

.episode-audio-shell {
  width: 100%;
}

.episode-audio-shell audio {
  display: block;
  width: 100%;
  min-height: 54px;
}

.audio-fallback {
  margin: 10px 0 0 !important;
  font-size: 0.86rem;
}

.follow-close {
  display: none;
}

.episode-audio-shell.is-following {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 18px;
  z-index: 150;
  width: min(calc(100% - 36px), 760px);
  margin-inline: auto;
  padding: 14px 64px 14px 16px;
  background: var(--paper);
  border: 3px solid var(--sun);
  border-radius: 22px;
  box-shadow: 0 20px 70px rgba(18, 59, 83, 0.32);
}

.episode-audio-shell.is-following .audio-fallback {
  display: none;
}

.episode-audio-shell.is-following .follow-close {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--fjord-deep);
  background: var(--sky);
  border: 0;
  border-radius: 50%;
  font-weight: 900;
  cursor: pointer;
}

.reading-progress {
  position: fixed;
  top: 76px;
  right: 0;
  left: 0;
  z-index: 95;
  height: 5px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sun), var(--coral));
  transition: width 100ms linear;
}

.reading-section {
  padding: clamp(64px, 9vw, 112px) 0;
  background:
    radial-gradient(circle at 9% 16%, rgba(191, 228, 211, 0.34), transparent 17%),
    var(--cream);
}

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

.reading-heading h2 {
  margin: 10px 0 14px;
}

.reading-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(30px, 6vw, 72px);
  align-items: start;
}

.reading-sidebar {
  position: sticky;
  top: 104px;
  order: 2;
  display: grid;
  gap: 18px;
}

.reading-toolbox,
.chapter-nav {
  padding: 20px;
  background: var(--paper);
  border: 2px solid rgba(18, 59, 83, 0.09);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.reading-toolbox h3,
.chapter-nav h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.follow-controls[hidden] {
  display: none !important;
}

.follow-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(18, 59, 83, 0.09);
}

.follow-toggle,
.find-sentence {
  width: 100%;
  min-height: 50px;
  padding: 9px 11px;
  color: var(--fjord-deep);
  background: var(--sky);
  border: 2px solid transparent;
  border-radius: 13px;
  font-family: var(--font-title);
  font-weight: 850;
  cursor: pointer;
}

.follow-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  text-align: left;
}

.follow-toggle small {
  float: right;
  min-width: 34px;
  padding: 2px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  text-align: center;
}

.follow-toggle[aria-pressed="true"] {
  background: var(--sun);
  border-color: var(--fjord-deep);
}

.follow-toggle[aria-pressed="true"] small {
  color: var(--white);
  background: var(--fjord-deep);
}

.auto-follow-choice {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  color: var(--fjord-deep);
  font-size: 0.87rem;
  font-weight: 800;
  cursor: pointer;
}

.auto-follow-choice input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  accent-color: var(--fjord-deep);
}

.find-sentence {
  min-height: 44px;
  background: var(--paper);
  border-color: rgba(18, 59, 83, 0.18);
  font-size: 0.85rem;
}

.find-sentence[hidden] {
  display: none;
}

.follow-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.reading-size-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.reading-size-buttons button,
.print-story {
  min-height: 48px;
  color: var(--fjord-deep);
  background: var(--sky);
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 850;
  cursor: pointer;
}

.reading-size-buttons button[aria-pressed="true"] {
  background: var(--sun);
  border-color: var(--fjord-deep);
}

.print-story {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
}

.chapter-nav ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter-nav a {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  color: var(--fjord-deep);
  border-radius: 10px;
  font-size: 0.91rem;
  font-weight: 800;
  text-decoration: none;
}

.chapter-nav a:hover {
  background: var(--sky);
}

.story-text {
  min-width: 0;
}

.story-chapter {
  margin-bottom: 34px;
  padding: clamp(24px, 5vw, 52px);
  background: var(--paper);
  border: 2px solid rgba(18, 59, 83, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 106px;
}

.story-chapter__marker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 10px;
  padding: 4px 11px;
  color: var(--fjord-deep);
  background: var(--sky);
  border-radius: 999px;
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-chapter h3 {
  margin-bottom: 28px;
  color: var(--fjord-deep);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.story-chapter [data-manus] {
  max-width: 68ch;
  margin-right: auto;
  margin-left: auto;
  font-size: var(--story-size);
  line-height: var(--story-leading);
  text-wrap: pretty;
}

.story-chapter [data-manus] + [data-manus] {
  margin-top: 1.08em;
}

.read-sentence {
  border-radius: 0.18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.read-sentence.is-active {
  background: #ffe291;
  box-shadow: 0 0 0 0.14em #ffe291;
}

.story-chapter.has-active-sentence {
  border-color: rgba(17, 106, 141, 0.24);
}

.story-chapter--prayer {
  color: #2c2940;
  background: linear-gradient(145deg, #fffdf7, #f6edf3);
  border-color: rgba(104, 56, 91, 0.16);
}

.story-chapter--prayer .story-chapter__marker {
  color: var(--white);
  background: var(--plum);
}

.story-chapter--prayer [data-manus]:not(:first-of-type) {
  padding-left: 18px;
  border-left: 4px solid rgba(104, 56, 91, 0.28);
}

.conversation-stop {
  max-width: 68ch;
  margin: 30px auto 0;
  border: 0;
}

.conversation-stop summary {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 13px 16px;
  color: var(--fjord-deep);
  background: var(--sky);
  border: 2px solid rgba(17, 106, 141, 0.12);
  border-radius: 16px;
  font-family: var(--font-title);
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.conversation-stop summary::-webkit-details-marker {
  display: none;
}

.conversation-stop summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.5rem;
}

.conversation-stop[open] summary::after {
  content: "–";
}

.conversation-stop__body {
  margin-top: 8px;
  padding: 17px 18px;
  background: #eef8f8;
  border-radius: 14px;
}

.conversation-stop__body p {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.conversation-stop__body p + p {
  margin-top: 9px;
}

.source-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: start;
  margin-top: 22px;
  padding: 16px 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

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

.extra-section {
  padding: clamp(64px, 9vw, 112px) 0;
  background: var(--sky);
}

.extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.extra-card {
  padding: clamp(24px, 4vw, 36px);
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.extra-card h3 {
  font-size: 1.45rem;
}

.extra-card ul {
  margin: 0;
  padding-left: 1.2em;
}

.extra-card li + li {
  margin-top: 9px;
}

.pilot-status {
  margin-top: 28px;
  padding: 18px 20px;
  color: var(--fjord-deep);
  background: rgba(255, 255, 255, 0.72);
  border-left: 6px solid var(--sun);
  border-radius: 10px var(--radius-sm) var(--radius-sm) 10px;
}

.pilot-status p {
  margin: 0;
}

.pilot-status strong {
  font-family: var(--font-title);
}

@media (max-width: 980px) {
  .pilot-hero__grid,
  .reading-layout {
    grid-template-columns: 1fr;
  }

  .pilot-hero__copy {
    max-width: 760px;
  }

  .reading-sidebar {
    position: static;
    order: 0;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .chapter-nav ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .pilot-banner {
    font-size: 0.76rem;
  }

  .pilot-hero {
    padding-top: 28px;
  }

  .pilot-cover {
    border-width: 3px;
    border-radius: 24px;
    transform: none;
  }

  .pilot-cover figcaption {
    display: none;
  }

  .pilot-hero__grid {
    gap: 32px;
  }

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

  .pilot-actions .button {
    width: 100%;
  }

  .listen-card {
    grid-template-columns: 1fr;
  }

  .listen-card__icon {
    width: 76px;
  }

  .reading-sidebar {
    grid-template-columns: 1fr;
  }

  .chapter-nav ol {
    grid-template-columns: 1fr;
  }

  .story-chapter {
    margin-right: -2px;
    margin-left: -2px;
    padding: 24px 18px;
    border-radius: 22px;
  }

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

  .episode-audio-shell.is-following {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    width: calc(100% - 16px);
    padding: 12px 62px 12px 10px;
  }

  .read-along-page.is-following {
    padding-bottom: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress span,
  .pilot-cover,
  .read-sentence {
    transition: none;
    transform: none;
  }
}

@media print {
  .site-header,
  .pilot-banner,
  .pilot-hero,
  .listen-section,
  .reading-sidebar,
  .reading-progress,
  .conversation-stop,
  .source-note,
  .extra-section,
  .site-footer {
    display: none !important;
  }

  body,
  .reading-section {
    padding: 0;
    background: #fff;
  }

  .reading-heading {
    display: block;
  }

  .story-chapter {
    break-inside: auto;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .story-chapter [data-manus] {
    max-width: none;
    font-size: 11pt;
    line-height: 1.55;
  }

  .read-sentence.is-active {
    background: transparent;
    box-shadow: none;
  }
}
