.reader-testimonials {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-top: 28px;
  color: var(--ink, #202c25);
}
/* Reserve the tallest excerpt so rotating readers cannot shift layout. */
.reader-testimonials__viewport { display: grid; }
.reader-testimonials__slide { grid-area: 1 / 1; min-width: 0; }
.reader-testimonials__slide:not([data-active]) { visibility: hidden; pointer-events: none; }
.reader-testimonials__slide .reader-testimonial__quote,
.reader-testimonials__slide .reader-testimonial__author { opacity: 0; transform: translateY(4px); }
.reader-testimonials__slide[data-active] .reader-testimonial__quote,
.reader-testimonials__slide[data-active] .reader-testimonial__author { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: no-preference) {
  /* Finish the soft exit before revealing the next quote, avoiding overlapping text. */
  .reader-testimonials[data-animate] .reader-testimonials__slide {
    transition: visibility 0s linear 140ms;
  }
  .reader-testimonials[data-animate] .reader-testimonials__slide[data-active] {
    transition-delay: 0s;
  }
  .reader-testimonials[data-animate] .reader-testimonial__quote,
  .reader-testimonials[data-animate] .reader-testimonial__author {
    transition: opacity 140ms ease-out, transform 140ms ease-out;
  }
  .reader-testimonials[data-animate] [data-active] .reader-testimonial__quote,
  .reader-testimonials[data-animate] [data-active] .reader-testimonial__author {
    transition: opacity 320ms ease-out 160ms, transform 380ms cubic-bezier(.2, 0, 0, 1) 160ms;
  }
  .reader-testimonials[data-animate] [data-active] .reader-testimonial__author {
    transition-delay: 200ms;
  }
}
.reader-testimonial { display: flex; flex-direction: column; height: 100%; margin: 0; color: inherit; }
.reader-testimonial__quote {
  flex: 1;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -.01em;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.reader-testimonial__quote p { margin: 0; }
.reader-testimonial__quote p::before { content: '“'; }
.reader-testimonial__quote p::after { content: '”'; }
.reader-testimonial__author { display: block; }
.reader-testimonial__profile { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; color: inherit; text-decoration: none; cursor: pointer; }
.reader-testimonial__avatar {
  flex: none;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  outline: 1px solid rgba(0,0,0,.1);
  outline-offset: -1px;
  background: #e1e6dc;
}
.reader-testimonial__identity { display: grid; min-width: 0; gap: 1px; }
.reader-testimonial__name { font-size: 13px; font-weight: 650; line-height: 1.35; }
.reader-testimonial__handle { color: var(--muted, #67716a); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.reader-testimonial__profile:hover .reader-testimonial__name { text-decoration: underline; text-underline-offset: 3px; }
.reader-testimonial__profile:focus-visible { outline: 2px solid #8a664b; outline-offset: 4px; }

/* Trade a little desktop spacing for the reader quote, preserving the cover. */
@media (min-width: 761px) and (min-height: 651px) {
  .has-testimonials .hero { padding-bottom: 32px; }
  .has-testimonials .book-story { font-size: clamp(17px, 1.45vw, 19px); line-height: 1.5; margin-bottom: 22px; }
  .has-testimonials .book-story p { margin-bottom: .7em; }
  .has-testimonials .book-story p:last-child { margin-bottom: 0; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .reader-testimonials { margin-top: 28px; }
  .reader-testimonial__quote { font-size: 15px; }
}
@media (orientation: landscape) and (max-height: 650px) {
  .reader-testimonials { margin-top: 20px; }
  .reader-testimonial__quote { font-size: 14px; line-height: 1.4; margin-bottom: 10px; }
}
