/* Education Programme team: shared home rail, About grid and biographies. */
.team-section {
  --accent: var(--ring-teal);
  min-width: 0;
}

.team-section [hidden],
.team-dialog [hidden] {
  display: none !important;
}

.team-section-home {
  padding-block: 92px;
  background: var(--soft);
}

.team-section-head {
  margin-bottom: 36px;
}

.team-section-head h2 {
  max-width: 920px;
  text-wrap: balance;
}

.team-section .team-intro {
  max-width: 770px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.team-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-block: -10px 22px;
}

.team-position {
  margin-right: 8px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.team-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
}

.team-arrow svg {
  width: 20px;
  height: 20px;
}

.team-arrow:hover:not(:disabled) {
  border-color: var(--ring-indigo);
  color: var(--ring-indigo);
  background: var(--indigo-soft);
}

.team-arrow:disabled {
  color: #86818f;
  background: #f5f5f9;
}

.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.team-rail,
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
}

.team-section[data-team-enhanced] .team-rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 8px;
  scroll-behavior: smooth;
  scrollbar-color: var(--ring-indigo) var(--line);
  scrollbar-width: thin;
  /* Leave room around the edge cards for their keyboard focus outlines. */
  padding: 8px 8px 20px;
  margin: -8px -8px 0;
}

.team-section[data-team-enhanced] .team-rail > .team-card {
  flex: 0 0 calc((100% - 48px) / 3);
}

.team-card {
  --team-card-accent: var(--ring-blue);
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--team-card-accent);
  background: #fff;
  scroll-snap-align: start;
}

.team-card[data-team-member="girts-krastins"] {
  --team-card-accent: var(--ring-teal);
}

.team-card[data-team-member="robert-fitzpatrick"] {
  --team-card-accent: var(--ring-blue);
}

.team-card[data-team-member="adrian-doyle"] {
  --team-card-accent: var(--ring-gold);
}

.team-card[data-team-member="konrad-koziol"] {
  --team-card-accent: var(--ring-indigo);
}

.team-card[data-team-member="victoria-matthews"] {
  --team-card-accent: var(--ring-green);
}
.team-card[data-team-member="john-langford"] {
  --team-card-accent: var(--ring-indigo);
}
.team-card[data-team-member="jorge-vinha-da-silva"] {
  --team-card-accent: var(--ring-teal);
}
.team-card[data-team-member="brian-kabatznick"] {
  --team-card-accent: var(--ring-gold);
}
.team-card[data-team-member="marie-lindqvist"] {
  --team-card-accent: var(--ring-green);
}
.team-section-mentors .team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-photo,
.team-photo-placeholder,
.team-dialog-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
}

.team-photo img,
.team-dialog-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  /* Client-supplied colour photography is kept in colour. */
  filter: none;
}

[data-team-member="girts-krastins"] .team-photo img,
#team-bio-girts-krastins .team-dialog-photo img {
  object-position: 50% 18%;
}

[data-team-member="robert-fitzpatrick"] .team-photo img,
#team-bio-robert-fitzpatrick .team-dialog-photo img {
  object-position: 50% 17%;
}

[data-team-member="konrad-koziol"] .team-photo img,
#team-bio-konrad-koziol .team-dialog-photo img {
  object-position: 50% 0%;
}

[data-team-member="victoria-matthews"] .team-photo img,
#team-bio-victoria-matthews .team-dialog-photo img {
  object-position: 38% 40%;
}
[data-team-member="john-langford"] .team-photo img,
#team-bio-john-langford .team-dialog-photo img {
  object-position: 50% 30%;
}
[data-team-member="jorge-vinha-da-silva"] .team-photo img,
#team-bio-jorge-vinha-da-silva .team-dialog-photo img {
  object-position: 50% 10%;
}
[data-team-member="brian-kabatznick"] .team-photo img,
#team-bio-brian-kabatznick .team-dialog-photo img {
  object-position: 50% 0%;
}
[data-team-member="marie-lindqvist"] .team-photo img,
#team-bio-marie-lindqvist .team-dialog-photo img {
  object-position: 50% 25%;
}

.team-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  background: var(--gold-soft);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.team-photo-placeholder > :first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border: 1px solid #d8ccb7;
  border-radius: 50%;
  color: var(--gold-ink);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.team-card-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: flex-start;
  padding: 24px;
}

.team-card-copy h3 {
  font-size: clamp(21px, 1.7vw, 26px);
  line-height: 1.25;
  overflow-wrap: break-word;
}

.team-card-copy .team-role {
  margin-top: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.team-bio-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 44px;
  margin-top: auto;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.team-card-copy h3 + .team-bio-button,
.team-card-copy h3 + .team-bio-unavailable {
  margin-top: 18px;
}

.team-bio-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--ring-indigo);
}

.team-bio-button:hover {
  color: var(--ring-indigo);
  border-bottom-color: var(--ring-indigo);
}

.team-card-copy .team-bio-unavailable {
  margin-top: auto;
  padding-block: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.team-bio-fallback {
  width: 100%;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.75;
}

.team-bio-fallback summary {
  min-height: 44px;
  padding-block: 11px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-underline-offset: 4px;
}

.team-bio-fallback summary:hover {
  color: var(--ring-indigo);
}

.team-bio-fallback > :not(summary) {
  margin-top: 16px;
  overflow-wrap: anywhere;
}

.team-bio-fallback p,
.team-bio-fallback li {
  font-size: 14px;
  line-height: 1.75;
}

.team-bio-fallback p + p {
  margin-top: 16px;
}

.team-bio-fallback h2,
.team-bio-fallback h3 {
  margin-block: 20px 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.team-bio-fallback ul,
.team-bio-fallback ol {
  padding-left: 20px;
}

html.team-dialog-open {
  overflow: hidden;
}

dialog.team-dialog {
  width: min(1040px, calc(100% - 48px));
  max-width: none;
  max-height: min(90dvh, 960px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-top: 4px solid var(--ring-teal);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 100px #15102b66;
}

dialog.team-dialog::backdrop {
  background: #17122aca;
}

.team-dialog > .team-dialog-panel {
  max-height: calc(min(90dvh, 960px) - 4px);
  padding: 22px 34px 38px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

.team-dialog-toolbar {
  position: sticky;
  top: -22px;
  z-index: 2;
  margin: -22px -34px 22px;
  padding: 14px 34px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.team-dialog-close {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 2px 12px #221e4c0a;
}

.team-dialog-close:hover {
  border-color: var(--ring-indigo);
  background: var(--indigo-soft);
}

.team-dialog-close svg {
  width: 18px;
  height: 18px;
}

.team-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  align-items: start;
  gap: 40px;
}

.team-dialog-person,
.team-dialog-bio {
  min-width: 0;
}

.team-dialog .team-dialog-person h2 {
  margin: 22px 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

.team-dialog .team-dialog-person p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.team-dialog .team-dialog-bio p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.team-dialog .team-dialog-bio p + p {
  margin-top: 18px;
}

.team-dialog .team-dialog-bio h2,
.team-dialog .team-dialog-bio h3 {
  margin: 28px 0 12px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.team-dialog .team-dialog-bio > :first-child,
.team-dialog .team-inline-bio > :first-child {
  margin-top: 0;
}

.team-dialog-bio ul,
.team-dialog-bio ol {
  margin: 16px 0;
  padding-left: 22px;
  font-size: 15px;
}

.team-dialog-bio li {
  margin-block: 8px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.team-dialog-bio a {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .team-rail,
  .team-grid,
  .team-section-mentors .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-section[data-team-enhanced] .team-rail > .team-card {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 767px) {
  .team-section-mentors .team-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .team-section-home {
    padding-block: 64px;
  }

  .team-section-head {
    margin-bottom: 26px;
  }

  .team-section .team-intro {
    margin-top: 18px;
    font-size: 16px;
  }

  .team-controls {
    margin-block: 0 16px;
  }

  .team-section[data-team-enhanced] .team-rail {
    gap: 18px;
  }

  .team-section[data-team-enhanced] .team-rail > .team-card {
    flex-basis: 84%;
  }

  .team-rail,
  .team-grid {
    gap: 22px 18px;
  }

  .team-card-copy {
    padding: 20px;
  }

  .team-card-copy h3 {
    font-size: 22px;
  }

  dialog.team-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }

  .team-dialog > .team-dialog-panel {
    max-height: calc(100dvh - 28px);
    padding: 14px 22px 28px;
  }

  .team-dialog-toolbar {
    top: -14px;
    margin: -14px -22px 20px;
    padding: 12px 22px;
  }

  .team-dialog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .team-dialog-photo {
    width: min(230px, 100%);
  }

  .team-dialog .team-dialog-person h2 {
    margin-top: 18px;
    font-size: 27px;
  }

  .team-dialog .team-dialog-bio p,
  .team-dialog-bio ul,
  .team-dialog-bio ol {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .team-rail,
  .team-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-section-about .team-photo,
  .team-section-about .team-photo-placeholder {
    aspect-ratio: 1.12;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-section[data-team-enhanced] .team-rail {
    scroll-behavior: auto;
  }
}
