.quote-portrait-hero {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  min-height: 19rem;
  margin: 0;
  position: relative;
}

.quote-portrait-hero.side-left { flex-direction: row-reverse; }
.quote-portrait-copy { flex: 1; min-width: 0; position: relative; }
.quote-portrait-media { flex: 0 0 min(42%, 19rem); position: relative; }
.quote-portrait-media > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.quote-portrait-lines { inset: 0; position: absolute; }
.quote-portrait-lines > span { position: absolute; white-space: pre; }
.quote-portrait-hero.is-shaped .quote-portrait-copy { inset: 0; position: absolute; }
.quote-portrait-hero.is-shaped [data-hero-flow] { color: transparent; }

.js-hero-pending [data-hero-copy] {
  animation: portrait-reveal 0s 2s forwards;
  opacity: 0;
}

@keyframes portrait-reveal { to { opacity: 1; } }

.portrait-credit { bottom: .25rem; position: absolute; right: .25rem; z-index: 2; }
.portrait-credit summary {
  align-items: center;
  background: rgb(255 255 255 / 90%);
  border: 1px solid rgb(0 0 0 / 20%);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  list-style: none;
  width: 44px;
}
.portrait-credit summary::-webkit-details-marker { display: none; }
.portrait-credit-popover {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: .375rem;
  bottom: 3rem;
  box-shadow: 0 .25rem .75rem rgb(0 0 0 / 15%);
  font-size: .75rem;
  padding: .75rem;
  position: absolute;
  right: 0;
  width: min(18rem, 75vw);
}
.portrait-credit-popover p { margin: 0 0 .25rem; }

/* Provenance credits in the header tabs. Muted italic swallowed the link
   affordance, so every source link here states it is clickable. */
.originator-credit a { color: var(--bs-primary); text-decoration: underline; }
/* The bio's sourcing line — biography and portrait — is centred under the bio;
   the other tabs keep their own alignment. */
.originator-bio-credit { text-align: center; }
/* linebreaks wraps the bio in <p>; its trailing margin plus a top margin here
   opened a two-line gap above the credit. */
.bio-content > p:last-child { margin-bottom: .35rem; }

/* Portrait column: image on top, signature filling the space beneath it. The
   signature rides the info-tray collapse, so it folds away on scroll while the
   portrait stays put. */
.originator-header-aside {
  align-items: center;
  display: flex;
  flex: 0 0 8rem;
  flex-direction: column;
  gap: .35rem;
  justify-content: flex-start;
  /* Stretches to the row height so the portrait can track the tray collapsing;
     min-height:0 is what lets it actually shrink below its content size. */
  min-height: 0;
}
.originator-signature-slot { width: 100%; }
.originator-signature { display: block; height: auto; margin: 0 auto; max-width: 100%; }

.originator-header-row { display: flex; gap: .75rem; }
.originator-header-content { flex: 1; min-width: 0; }
.originator-header-row.side-left { flex-direction: row-reverse; }
/* The portrait tracks the available column height so it scales down as the info
   tray collapses — but is capped so that, with the tray open, its bottom edge
   lands on the rule the tabs sit on. 7.2rem == the measured 115.2px from the row
   top to that rule, which held constant across short names, long names and a
   missing description. Nudge --originator-portrait-max if the header's rows ever
   change height. min-height:0 permits the shrink. */
.originator-header-portrait {
  flex: 1 1 auto;
  margin: 0;
  max-height: var(--originator-portrait-max, 7.2rem);
  min-height: 0;
  position: relative;
  width: 100%;
}
.originator-header-portrait > img {
  height: 100%;
  inset: 0;
  object-fit: contain;
  position: absolute;
  width: 100%;
}

@media (max-width: 575.98px) {
  .quote-portrait-hero,
  .quote-portrait-hero.side-left { flex-direction: column; }
  .quote-portrait-media { align-self: center; flex-basis: auto; height: 11rem; width: 11rem; }
  .quote-portrait-hero.is-shaped [data-hero-flow] { color: inherit; }
  .quote-portrait-lines { display: none; }
  .originator-header-aside { flex-basis: 4.5rem; }
  .originator-header-portrait { max-height: 4.5rem; }
}
