/* Display the supplied portrait without the old image's extra fading. */
.teacher-grid .portrait {
  width: 100%;
  max-width: 400px;
  align-self: start;
  justify-self: center;
  overflow: visible;
}
.teacher-grid .portrait img {
  display: block;
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 799;
  object-fit: contain;
  opacity: 1;
  filter: url(#mxg-photo-alpha);
  -webkit-mask-image: none;
  mask-image: none;
}
@media (max-width: 750px) {
  .teacher-grid .portrait {
    width: 100%;
    min-width: 0;
    max-width: 320px;
  }
  .teacher-grid h2.tname {
    font-size: clamp(1.25rem, 5.8vw, 1.6rem);
    letter-spacing: .06em;
  }
  .teacher-grid .portrait img {
    height: auto;
    aspect-ratio: 600 / 799;
    object-fit: contain;
  }
}

/* The legacy phone documents keep their section's original grid position. */
.mxg-teacher-section {
  height: auto !important;
  min-height: 0 !important;
}
.mxg-teacher-section > [class*="-overflow-wrapper"] {
  height: auto !important;
  min-height: 0 !important;
}
.mxg-teacher-section .mxg-teacher-layout {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  grid-template-rows: auto !important;
}
.mxg-teacher-section .mxg-teacher-bio {
  order: 0;
  width: calc(100% - 36px) !important;
  height: auto !important;
  margin: 24px 18px 0 !important;
  align-self: stretch !important;
}
.mxg-teacher-section .mxg-teacher-photo {
  display: block !important;
  order: 1;
  width: calc(100% - 36px) !important;
  max-width: 440px !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  margin: 26px auto 32px !important;
  align-self: center !important;
}
.mxg-teacher-photo > img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  filter: url(#mxg-photo-alpha);
  -webkit-mask-image: none;
  mask-image: none;
}


/* Match the supplied white-matte references without changing image pixels. */
.teacher-grid .portrait,
.mxg-teacher-section .mxg-teacher-photo {
  position: relative !important;
  aspect-ratio: 599 / 799 !important;
  overflow: hidden !important;
  border-radius: 16px;
  background: #fff;
}
.teacher-grid .portrait > img,
.mxg-teacher-photo > img {
  position: absolute !important;
  inset: auto !important;
  top: 0 !important;
  left: -.1669449082% !important;
  width: 100.1669449082% !important;
  height: auto !important;
  aspect-ratio: 600 / 799;
}
.mxg-intro-photo {
  position: relative !important;
  width: 100%;
  max-width: 400px;
  min-width: 0;
  margin: 24px auto;
  align-self: center;
  justify-self: center;
  overflow: hidden !important;
  border-radius: 16px;
  background: #fff;
}
.mxg-intro-photo > img {
  position: absolute !important;
  inset: auto !important;
  top: 0 !important;
  left: 0 !important;
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  object-fit: contain !important;
  opacity: 1;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.mxg-photo-beads { aspect-ratio: 600 / 750; }
.mxg-photo-beads > img {
  -webkit-mask-image: linear-gradient(to right, #000, transparent);
  mask-image: linear-gradient(to right, #000, transparent);
}
.mxg-photo-fan { aspect-ratio: 720 / 600; }
.mxg-photo-fan > img {
  -webkit-mask-image: linear-gradient(to right, transparent, #000);
  mask-image: linear-gradient(to right, transparent, #000);
}
.mxg-photo-horse { aspect-ratio: 598 / 879; }
.mxg-photo-horse > img {
  width: 100.3344481605% !important;
  top: -28.5551763367% !important;
  filter: url(#mxg-photo-alpha);
}
.mxg-intro-section { height: auto !important; min-height: 0 !important; }
.mxg-intro-row {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: calc(100% - 36px);
  max-width: 760px;
  padding: 24px 0;
  margin: 0 auto;
}
.mxg-intro-row .mxg-intro-photo { margin: 0 auto; }
.mxg-intro-copy > [data-testid="richTextElement"] {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 12px !important;
}
.mxg-intro-copy h3 { font-size: clamp(20px, 5vw, 26px) !important; line-height: 1.4 !important; }
.mxg-intro-copy p { font-size: 16px !important; line-height: 1.8 !important; }
