/* Keep the profile body scrollable without moving its close or chat controls. */
.team-profile {
  --profile-line: #dadfe0;
  --profile-paper: #f0f3f1;
  --profile-text: #202623;
  --profile-muted: #4c5954;
  --profile-accent: #a23f36;
  --profile-fact-bg: #293c35;
  width: min(840px, calc(100% - 48px));
  max-height: calc(100dvh - 48px);
  border: 1px solid var(--profile-line);
  color: var(--profile-text);
}
.team-profile[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.team-profile::backdrop { background: #18201da6; }
.team-profile__content { min-height: 0; max-height: none; padding: 0; scroll-padding-block: 12px; }
.team-profile__dismiss { position: absolute; z-index: 2; top: 14px; right: 14px; }
.team-profile__close { position: relative; inset: auto; background: #fff; border-color: var(--profile-line); }
.team-profile__close::before,
.team-profile__close::after {
  content: "";
  grid-area: 1 / 1;
  width: 17px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
.team-profile__close::after { transform: rotate(-45deg); }
.team-profile__head {
  gap: 24px;
  padding: 24px 72px 22px 30px;
  background: #fff;
}
.team-profile__head img { width: 110px; height: 110px; border-radius: 6px; border: 1px solid #e4e8e5; }
.team-profile__head h2 { font-size: 32px; font-weight: 800; overflow-wrap: anywhere; }
.team-profile__head p { margin-block-start: 6px; color: var(--profile-muted); }
.team-profile__facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 0;
  padding: 0 30px;
  background: var(--profile-fact-bg);
  color: #fff;
}
.team-profile__facts > div { min-width: 0; padding: 14px 18px; }
.team-profile__facts > div:first-child { padding-inline-start: 0; }
.team-profile__facts > div + div { border-inline-start: 1px solid #ffffff45; }
.team-profile__facts dt { font-size: 25px; line-height: 1.15; font-weight: 800; }
.team-profile__facts dd { margin: 5px 0 0; color: #e1e9e4; font-size: 13px; line-height: 1.38; }
.team-profile__grid {
  padding: 23px 30px 25px;
}
.team-profile__grid h3 { margin: 0 0 11px; font-size: 22px; line-height: 1.25; letter-spacing: 0; }
.team-profile__bio p { margin: 0 0 10px; color: var(--profile-muted); font-size: 14px; line-height: 1.57; }
.team-profile__bio p:first-of-type { color: var(--profile-text); font-weight: 650; }
.team-profile__bio p:last-child { margin-bottom: 0; }
.team-profile__evidence {
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--profile-line);
}
.team-profile__cases,
.team-profile__publications ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--profile-line); }
.team-profile__case-link {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(116px, max-content) 9px;
  gap: 12px;
  align-items: start;
  color: inherit;
  text-decoration: none;
  padding: 13px 10px;
  border-bottom: 1px solid var(--profile-line);
  background: #f6f8f7;
}
.team-profile__case-link:hover { background: #ecefeb; }
.team-profile__case-link:hover .team-profile__case-text strong,
.team-profile__publications a:hover { text-decoration: underline; }
.team-profile__case-thumb { display: block; aspect-ratio: 6 / 5; border-radius: 5px; overflow: hidden; background: var(--profile-paper); }
.team-profile__case-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.team-profile__case-thumb--logo img { object-fit: contain; padding: 8px; }
.team-profile__case-text { min-width: 0; }
.team-profile__case-model, .team-profile__case-result span {
  display: block;
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.35;
}
.team-profile__case-text strong { display: block; margin-block: 3px; font-size: 15px; line-height: 1.25; }
.team-profile__case-text p { margin: 4px 0 0; color: var(--profile-muted); font-size: 13px; line-height: 1.45; }
.team-profile__case-result { display: grid; gap: 4px; justify-items: end; text-align: right; }
.team-profile__case-result strong {
  color: var(--profile-accent);
  font-size: 21px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.team-profile__case-result span { max-width: 15ch; }
.team-profile__case-chevron {
  align-self: center;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--profile-muted);
  border-right: 1.5px solid var(--profile-muted);
  transform: rotate(45deg);
}
.team-profile__publications { margin-top: 22px; }
.team-profile__publications h3 { margin-bottom: 9px; }
.team-profile__publications a {
  display: flex; gap: 10px; justify-content: space-between; align-items: baseline;
  min-height: 40px; padding-block: 9px; border-bottom: 1px solid var(--profile-line);
  text-decoration: none; color: var(--profile-text); font-size: 14px; font-weight: 600;
}
.team-profile__platform { color: var(--profile-muted); white-space: nowrap; font-size: 12px; }
.team-profile__footer { padding: 12px 30px; border-top: 1px solid var(--profile-line); background: #fff; display: flex; justify-content: flex-end; }
.team-profile__chat { margin: 0; }
@media (max-width: 860px) {
  .team-profile__facts { padding-inline: 22px; }
  .team-profile__grid { padding-inline: 22px; }
}
@media (max-width: 630px) {
  .team-profile { width: calc(100% - 20px); max-height: calc(100dvh - 24px); }
  .team-profile__head { gap: 12px; padding: 15px 55px 15px 17px; }
  .team-profile__head img { width: 65px; height: 65px; }
  .team-profile__head h2 { font-size: 21px; }
  .team-profile__head p { font-size: 13px; }
  .team-profile__dismiss { right: 8px; top: 8px; }
  .team-profile__facts { padding-inline: 17px; }
  .team-profile__facts > div { padding: 11px 9px 11px 12px; }
  .team-profile__facts dt { font-size: 19px; }
  .team-profile__facts dd { font-size: 12px; }
  .team-profile__grid { padding: 18px 17px; }
  .team-profile__grid h3 { font-size: 18px; margin-bottom: 7px; }
  .team-profile__evidence { margin-top: 18px; padding-top: 14px; }
  .team-profile__case-link { grid-template-columns: 64px minmax(0, 1fr) 9px; gap: 4px 10px; }
  .team-profile__case-thumb { grid-area: 1 / 1 / 4; }
  .team-profile__case-text { display: contents; }
  .team-profile__case-model { grid-area: 1 / 2; }
  .team-profile__case-text strong { grid-area: 2 / 2; margin: 0; }
  .team-profile__case-result { grid-area: 3 / 2; margin-top: 3px; justify-items: start; text-align: left; }
  .team-profile__case-result strong { font-size: 19px; }
  .team-profile__case-result span { max-width: none; }
  .team-profile__case-text p { grid-area: 4 / 2; margin-top: 3px; }
  .team-profile__case-chevron { grid-area: 1 / 3 / 4; }
  .team-profile__footer { padding: 9px 17px; }
  .team-profile__chat { width: 100%; }
}
