/* RBR V3.8.2: isolated visual corrections. Existing six-photo right mosaic
   and underwater six-tile geometry are intentionally not modified. */

/* Move the RBR teaching triptych into the introductory column and present it
   as one restrained editorial filmstrip instead of a full-width second grid. */
.rbr-auth-page .rbr-auth-hero-grid > div:first-child {
  min-width:0;
}
.rbr-auth-page .rbr-auth-hero-grid .rbr-v37-teaching.rbr-v38-teaching-wide.rbr-v382-filmstrip {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-column:auto!important;
  width:100%!important;
  max-width:600px!important;
  margin:clamp(24px,2.5vw,38px) 0 0!important;
  padding:14px 0 0!important;
  gap:clamp(5px,.65vw,10px)!important;
  border-top:1px solid #d5ddd5;
  align-self:auto!important;
}
.rbr-auth-page .rbr-v382-filmstrip .rbr-v37-square {
  display:block!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:5/4!important;
  min-width:0!important;
  overflow:hidden!important;
  background:#e2e8e1;
}
.rbr-auth-page .rbr-v382-filmstrip .rbr-v37-square img {
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center;
}
.rbr-auth-page .rbr-v382-filmstrip .rbr-v37-caption {
  font-size:9px!important;
  line-height:1.35!important;
  letter-spacing:0!important;
  padding:16px 6px 5px!important;
  max-height:55%!important;
}
.rbr-auth-page .rbr-auth-hero-grid:has(.rbr-v382-filmstrip) {
  align-items:start!important;
}
.rbr-auth-page .rbr-auth-hero-grid:has(.rbr-v382-filmstrip) > .rbr-v37-mosaic-host {
  align-self:start!important;
}

/* Person sections: portraits start alongside their biographies, rather than
   vertically centering several hundred pixels below the heading. */
.rbr-auth-page .rbr-auth-people {
  gap:clamp(40px,5vw,80px)!important;
}
.rbr-auth-page .rbr-auth-person {
  align-items:start!important;
  column-gap:clamp(32px,5vw,94px)!important;
  padding-bottom:clamp(45px,6vw,86px);
  border-bottom:1px solid #dfe5dc;
}
.rbr-auth-page .rbr-auth-person:last-child {
  border-bottom:0;
  padding-bottom:0;
}
.rbr-auth-page .rbr-auth-person-image {
  min-height:0!important;
  height:auto!important;
  align-self:start!important;
  margin:clamp(6px,1.2vw,18px) 0 0!important;
  max-width:100%;
  min-width:0;
}
.rbr-auth-page .rbr-auth-person-image .rbr-auth-photo {
  margin:0!important;
  width:100%;
}
.rbr-auth-page .rbr-auth-person-image .rbr-auth-photo img {
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center top!important;
  background:#e7e9e5;
}
.rbr-auth-page .rbr-auth-person-copy {
  min-width:0!important;
  align-self:start!important;
}
.rbr-auth-page .rbr-auth-person-copy > .rbr-auth-photo {
  display:block;
  width:100%;
  max-width:520px!important;
  margin:clamp(28px,3.5vw,48px) 0 16px!important;
  padding-top:24px;
  border-top:1px solid #d6dfd6;
}
.rbr-auth-page .rbr-auth-person-copy > .rbr-auth-photo::before {
  content:'SELECTED UNDERWATER PHOTOGRAPH';
  display:block;
  color:#73847c;
  font:600 10px/1.5 system-ui,sans-serif;
  letter-spacing:.16em;
  margin:0 0 13px;
}
.rbr-auth-page .rbr-auth-person-copy > .rbr-auth-photo img {
  display:block;
  width:100%!important;
  height:auto!important;
  max-height:390px!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#102c29;
}
.rbr-auth-page .rbr-auth-person-copy > .rbr-auth-photo figcaption {
  line-height:1.7;
  padding-top:9px;
}

/* The original hard-coded figure captions sit ON TOP of the curated captions
   because they are later DOM siblings. Hide only when the curated label exists. */
.photo-collection-grid > figure.rbr-v382-curated > figcaption,
.photo-collection-grid > figure:has(> a.rbr-v38-mosaic-slot > .rbr-v38-work-caption) > figcaption {
  display:none!important;
}

@media (max-width:920px) {
  .rbr-auth-page .rbr-auth-person {
    grid-template-columns:1fr!important;
    gap:clamp(18px,4vw,35px)!important;
  }
  .rbr-auth-page .rbr-auth-person-image,
  .rbr-auth-page .rbr-auth-person:nth-child(even) .rbr-auth-person-image {
    grid-column:1!important;
    grid-row:1!important;
    margin:0!important;
    max-width:600px;
  }
  .rbr-auth-page .rbr-auth-person-copy,
  .rbr-auth-page .rbr-auth-person:nth-child(even) .rbr-auth-person-copy {
    grid-column:1!important;
    grid-row:2!important;
  }
  .rbr-auth-page .rbr-auth-person-image .rbr-auth-photo img {
    max-height:580px!important;
  }
  .rbr-auth-page .rbr-auth-hero-grid:has(.rbr-v382-filmstrip) > .rbr-v37-mosaic-host {
    align-self:center!important;
  }
}
@media (max-width:600px) {
  .rbr-auth-page .rbr-auth-hero-grid .rbr-v37-teaching.rbr-v38-teaching-wide.rbr-v382-filmstrip {
    padding-top:12px!important;
    gap:5px!important;
    margin-top:24px!important;
  }
  .rbr-auth-page .rbr-v382-filmstrip .rbr-v37-caption {
    font-size:8px!important;
    padding:12px 5px 4px!important;
  }
  .rbr-auth-page .rbr-auth-person-copy > .rbr-auth-photo img {
    max-height:320px!important;
  }
}
@media (prefers-reduced-motion:reduce) {
  .rbr-auth-page .rbr-v382-filmstrip img { transition:none!important; }
}

/* Marker is for legacy gallery detection, never visible in the heading. */
.rbr-v382-work-marker { display:none!important; }
