/* Four specialists, scoped to the six home/about team sections. */
html body[data-design=nexo] [data-team-count="4"] {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-areas:none!important;
  align-items:start;
}
html body[data-design=nexo] [data-team-count="4"] > article { grid-area:auto!important; min-width:0; }
html body[data-design=nexo][data-page=home] .nx-team-grid[data-team-count="4"] > article.nx-person > img.sonia-photo,
html body[data-design=nexo]:not([data-page=home]) .team-grid[data-team-count="4"] > article.team-card > img.sonia-photo {
  object-fit:contain!important;
  object-position:center bottom!important;
  background:#ede9f5!important;
  transform:none!important;scale:none!important;transition:none!important;
  filter:none!important;
}
@media(max-width:760px) {
  html body[data-design=nexo] [data-team-count="4"] { grid-template-columns:minmax(0,1fr)!important; }
}

/* All of Francisco's expanded shoulders fit inside the existing frame, including hover. */
html body[data-design=nexo] :is(.nx-team-grid,.team-grid)[data-team-count="4"] > article:is(.nx-person,.team-card) > img.nx-lawyer-photo {
  object-fit:contain!important;object-position:center bottom!important;
  transform:none!important;scale:none!important;transition:none!important;filter:none!important;background:#fff0d5!important;
}

/* Owner annotation: lower the four homepage portraits by one CSS centimetre inside their frames. */
html body[data-design=nexo][data-page=home] #team .nx-team-grid[data-team-count="4"] img {
  object-position:center calc(100% + 1cm)!important;
  transform:none!important;scale:none!important;transition:none!important;
}

/* Two specialists per row only on the mobile homepage. Keep full card copy. */
@media(max-width:760px) {
  html body[data-design=nexo][data-page=home] #team .nx-team-grid[data-team-count="4"] {
    --team-mobile-photo-height:clamp(104px,28vw,180px);
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;align-items:stretch;
  }
  html body[data-design=nexo][data-page=home] #team .nx-team-grid[data-team-count="4"] > article.nx-person {
    display:flex!important;flex-direction:column!important;gap:7px!important;
    padding:clamp(8px,1.6vw,12px)!important;border-radius:18px!important;
    min-width:0;align-self:stretch;
  }
  html body[data-design=nexo][data-page=home] #team :is(.nx-person-photo,.nx-person > img.nx-mono-photo) {
    width:100%!important;height:var(--team-mobile-photo-height)!important;
    min-height:0!important;flex:none!important;border-radius:12px!important;
    overflow:hidden;
  }
  html body[data-design=nexo][data-page=home] #team .nx-person-photo img {
    width:100%!important;height:100%!important;
  }
  html body[data-design=nexo][data-page=home] #team .nx-team-grid[data-team-count="4"] img {
    object-fit:contain!important;object-position:center calc(100% + 12px)!important;
  }
  html body[data-design=nexo][data-page=home] #team .nx-person-body {
    min-width:0;width:100%;overflow-wrap:anywhere;
  }
  html body[data-design=nexo][data-page=home] #team .nx-person-body h3 {
    font-size:clamp(16px,3.2vw,20px)!important;line-height:1.2!important;
    margin:0 0 4px!important;
  }
  html body[data-design=nexo][data-page=home] #team .nx-person-body p {
    font-size:clamp(13px,2.3vw,15px)!important;line-height:1.4!important;
    margin:0 0 6px!important;
  }
  html body[data-design=nexo][data-page=home] #team .nx-person-body :is(.nx-person-role,.nx-person-reg) {
    font-size:clamp(12px,2.1vw,13px)!important;line-height:1.4!important;
  }
  html body[data-design=nexo][data-page=home] #team .nx-person-body .nx-person-reg {
    margin:6px 0 0!important;padding-top:6px!important;
  }
}
