.testimonial-section {
  width: min(1440px, calc(100% + (var(--page-gutter) * 2)));
  flex: 0 0 auto;
  margin-top: 4rem;
}

.testimonial-section {
  display: flex;
  min-height: 751px;
  align-items: center;
  justify-content: center;
  padding: 60px var(--page-gutter);
  background: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.testimonial-inner {
  display: flex;
  width: min(960px, 100%);
  min-height: 320px;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

.testimonial-stage {
  display: grid;
  min-height: 190px;
  align-items: start;
}

.testimonial-quote {
  grid-area: 1 / 1;
  max-width: 960px;
  margin: 0;
  font-size: var(--type-quote-font-size);
  font-weight: var(--type-quote-font-weight);
  line-height: var(--type-quote-line-height);
  letter-spacing: var(--type-quote-letter-spacing);
  color: var(--ink);
  text-wrap: pretty;
}

.testimonial-footer {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.testimonial-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.testimonial-avatar {
  --avatar-accent: #e9fe71;
  display: grid;
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  color: var(--ink);
  background: var(--avatar-accent);
  font-family: 'M Saans', 'Segoe UI', sans-serif;
  font-size: var(--type-xs-17-font-size);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.04em;
  box-shadow: inset 0 0 0 1px rgba(1, 2, 5, 0.08);
}

.testimonial-avatar--image {
  background: #e9fe71;
}

.testimonial-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-person__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.testimonial-person strong {
  font-size: var(--type-person-name-font-size);
  font-weight: var(--type-person-name-font-weight);
  line-height: var(--type-person-name-line-height);
  letter-spacing: var(--type-person-name-letter-spacing);
  white-space: nowrap;
}

.testimonial-person span {
  font-size: var(--type-body-sm-font-size);
  font-weight: var(--type-body-sm-font-weight);
  line-height: var(--type-body-sm-line-height);
  color: rgba(0, 0, 0, 0.56);
  white-space: nowrap;
}

.testimonial-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.testimonial-controls button {
  display: grid;
  width: 80px;
  height: 52px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 70px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: color 220ms ease, background 220ms ease, transform 220ms ease;
}

.testimonial-controls button:last-child {
  border-color: #e9fe71;
  background: #e9fe71;
}

.testimonial-controls button:hover {
  color: #fff;
  background: var(--ink);
  transform: translateY(-2px);
}

.testimonial-controls button:last-child:hover {
  color: var(--ink);
  background: #d6f255;
}

.testimonial-controls button:active {
  transform: translateY(0) scale(0.97);
}

.testimonial-controls button:focus-visible {
  outline: 2px solid #ff80ad;
  outline-offset: 4px;
}

.testimonial-count {
  min-width: 42px;
  font-size: var(--type-body-sm-font-size);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {

  .testimonial-section {
    min-height: 620px;
    padding-block: 72px;
  }

  .testimonial-inner {
    gap: 58px;
  }

}

@media (max-width: 809.98px) {

  .testimonial-section {
    min-height: auto;
    padding-block: 92px;
  }

  .testimonial-inner {
    gap: 48px;
  }

  .testimonial-quote {
    font-size: var(--type-quote-mobile-font-size);
    line-height: 1.45;
  }

  .testimonial-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .testimonial-controls {
    width: 100%;
    justify-content: space-between;
    gap: 16px;
  }
}

@media (max-width: 479px) {

  .testimonial-section {
    padding-block: 72px;
  }

  .testimonial-quote {
    font-size: var(--type-mobile-quote-font-size);
    line-height: 1.48;
  }

  .testimonial-person {
    gap: 16px;
  }

  .testimonial-avatar {
    width: 60px;
    height: 60px;
  }

  .testimonial-person strong {
    font-size: var(--type-body-font-size);
  }

  .testimonial-person span {
    font-size: var(--type-xs-14-font-size);
  }

  .testimonial-controls button {
    width: 76px;
    height: 52px;
  }
}
