/* Keep the overview intact so removing these two attributes restores it. */
[data-lp-temporary-hidden][hidden] { display: none !important; }

/* Reduce both sides of the review-to-instructor transition. */
#member-dms { padding-bottom: 36px; }
#mentors { padding-top: 40px; }
@media (max-width: 760px) {
  #member-dms { padding-bottom: 28px; }
  #mentors { padding-top: 32px; }
}

/* Equal outer heights follow the tallest original DM, without stretching text. */
#member-dms .member-voice-grid { align-items: stretch; }
#member-dms .member-voice-card { display: flex; flex-direction: column; }
#member-dms .testimonial-image { display: flex; flex: 1; flex-direction: column; }
#member-dms .member-voice-card h3 {
  min-height: 0;
  padding: 14px 16px;
  line-height: 1.65;
}
#member-dms .testimonial-image img {
  display: block;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  max-height: none;
  object-fit: contain;
}
#member-dms .testimonial-image > span {
  position: static;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-dark);
  font-weight: 600;
}

/* Only member DM enlargements become smaller; chart dialogs keep their size. */
.image-dialog.is-testimonial {
  width: min(76vw, 640px);
  max-height: 64vh;
}
.image-dialog.is-testimonial img { max-height: calc(64vh - 4rem); }

/* A modest reduction, retaining all three biographies and their body type size. */
#mentors .mentor-grid-profile {
  width: min(calc(100% - 16px), 1000px);
  margin-inline: auto;
  gap: 12px;
}
#mentors .mentor-card-fukuzawa,
#mentors .mentor-card-secondary {
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
}
#mentors .fukuzawa-identity img,
#mentors .mentor-secondary-identity img {
  width: 96px;
  height: 96px;
  margin-bottom: 12px;
}
#mentors .fukuzawa-identity h3,
#mentors .mentor-secondary-identity h3 { font-size: 25px; }
#mentors .fukuzawa-bio p,
#mentors .mentor-secondary-bio p { font-size: 14.5px; line-height: 1.8; }
#mentors .mentor-secondary-bio p + p { margin-top: 9px; }
#mentors .fukuzawa-results { margin-top: 12px; gap: 12px; }
#mentors .fukuzawa-bio .fukuzawa-hobbies,
#mentors .mentor-secondary-bio .mentor-secondary-hobbies {
  margin-top: 10px;
  padding-top: 9px;
}

@media (max-width: 760px) {
  .image-dialog.is-testimonial { width: 82vw; max-height: 68vh; }
  .image-dialog.is-testimonial img { max-height: calc(68vh - 3.7rem); }
  #mentors .mentor-grid-profile { width: calc(100% - 8px); }
  #mentors .mentor-card-fukuzawa,
  #mentors .mentor-card-secondary { padding: 16px 14px; }
  #mentors .fukuzawa-identity,
  #mentors .mentor-secondary-identity {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 0 12px;
    margin-bottom: 12px;
  }
  #mentors .fukuzawa-identity img,
  #mentors .mentor-secondary-identity img {
    width: 60px;
    height: 60px;
    margin: 0;
  }
  #mentors .fukuzawa-identity h3,
  #mentors .mentor-secondary-identity h3 { font-size: 23px; }
  #mentors .fukuzawa-results { margin-top: 12px; gap: 6px; }
}

/* The temporarily hidden overview no longer needs an empty transition below it. */
#about:has(> .community-definition[hidden]):has(> .community-flow[hidden]) {
  padding-bottom: 0;
}
#about:has(> .community-definition[hidden]):has(> .community-flow[hidden]) > .about-intro {
  padding-bottom: 24px;
  border-bottom: 0;
}
#about:has(> .community-definition[hidden]):has(> .community-flow[hidden]) + #member-dms {
  padding-top: 40px;
}
@media (max-width: 760px) {
  #about:has(> .community-definition[hidden]):has(> .community-flow[hidden]) > .about-intro { padding-bottom: 20px; }
  #about:has(> .community-definition[hidden]):has(> .community-flow[hidden]) + #member-dms { padding-top: 32px; }
}

/* Compact profile detail while retaining the complete editable manuscript. */
#mentors .fukuzawa-identity p,
#mentors .mentor-secondary-identity p { font-size: 10px; letter-spacing: .02em; }
#mentors .fukuzawa-bio .fukuzawa-result-label { font-size: 11px; }
#mentors .fukuzawa-bio .fukuzawa-result-value { font-size: 19px; margin-top: 3px; }
#mentors .fukuzawa-x-link { font-size: 11.5px; gap: 5px; }
#mentors .fukuzawa-bio .fukuzawa-hobbies,
#mentors .mentor-secondary-bio .mentor-secondary-hobbies { font-size: 13px; }
@media (max-width: 760px) {
  #mentors .fukuzawa-bio p,
  #mentors .mentor-secondary-bio p { font-size: 14px; line-height: 1.8; }
  #mentors .fukuzawa-bio .fukuzawa-result-value { font-size: 18px; }
}
