/* V31: one document, read vertically from the cover to the invitation. */
body.ready.cover .reader-frame {
  display: grid;
}
body.ready:not(.cover) #couverture,
body.ready .chapters article:not(.active) {
  display: block;
}
.reader-frame {
  margin-top: clamp(2.4rem, 5vw, 4.8rem);
}
.ready:not(.cover) .rail,
.rail {
  margin-top: 0;
}
.chapters > article[data-view] {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}
.chapters > article[data-view]:first-child {
  padding-top: 0;
}
.chapters > article[data-view] + article[data-view] {
  border-top: 1px solid var(--line);
}
.chapters > article[data-view]:has(> .part-kicker):not(:first-child) {
  margin-top: clamp(1rem, 3vw, 2rem);
  border-top-color: var(--lilac);
}
.chapters > article > :last-child {
  margin-bottom: 0;
}
.chapters [id],
#couverture {
  scroll-margin-top: 5.5rem;
}
.turn-page {
  display: none;
}
.contents,
.rail {
  scrollbar-gutter: stable;
}
.chapters > article:focus,
.chapters h2:focus,
.chapters h3[tabindex="-1"]:focus,
.chapters section[tabindex="-1"]:focus,
.chapters figure[tabindex="-1"]:focus {
  outline: none;
}
.rail a[aria-current="location"] {
  box-shadow: inset 2px 0 var(--acid);
}
.book {
  aspect-ratio: 1084 / 1451;
  border-radius: 16%;
}
@media (max-width: 900px) {
  body.ready.cover .reader-frame {
    display: block;
  }
  .reader-frame {
    margin-top: 2.8rem;
  }
}
@media (max-width: 650px) {
  .chapters > article[data-view] {
    padding-block: 2.7rem;
  }
  .chapters > article[data-view]:first-child {
    padding-top: 0;
  }
  .chapters > article[data-view]:has(> .part-kicker):not(:first-child) {
    margin-top: 1rem;
  }
  .chapters [id] {
    scroll-margin-top: 4.8rem;
  }
}
@media print {
  body.ready.cover .reader-frame {
    display: block;
  }
  .reader-frame {
    margin-top: 0;
  }
  .chapters > article[data-view] {
    padding-block: 1.5rem;
  }
}
