/* Only an explicitly matched, approved editorial photo opts into this flow. */
.nvm-ed-photo-flow { container: nvm-editorial / inline-size; }
.nvm-ed-photo-flow > .nvm-ed-photo-prose { display: flow-root; min-inline-size: 0; }
.nvm-ed-photo-flow > .nvm-ed-photo-prose > figure[data-nvm-editorial-photo] {
  box-sizing: border-box;
  inline-size: 100%;
  margin: clamp(16px,3vw,24px) 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.nvm-ed-photo-flow figure[data-nvm-editorial-photo] :is(picture, img) {
  display: block;
  inline-size: 100%;
}
.nvm-ed-photo-flow figure[data-nvm-editorial-photo] img {
  block-size: auto;
  border: 0;
  border-radius: var(--nvm-ed-r-img, 12px);
}
.nvm-ed-photo-flow figure[data-nvm-editorial-photo] figcaption {
  margin-block-start: 0.5em;
  overflow-wrap: anywhere;
}
@container nvm-editorial (min-width: 580px) {
  .nvm-ed-photo-flow > .nvm-ed-photo-prose > figure[data-nvm-editorial-photo] {
    float: inline-start;
    inline-size: clamp(210px, 39%, 360px);
    margin: .2em clamp(18px, 3.5cqi, 35px) .65em 0;
  }
  .nvm-ed-photo-flow > .nvm-ed-photo-prose > :is(table, .nvm-ed-table-scroll, figure:not([data-nvm-editorial-photo]), blockquote, ul, ol) {
    clear: both;
  }
}

/* Only the positively reviewed, original plain-prose list may wrap around the photo. */
@container nvm-editorial (min-width: 580px) {
  .nvm-ed-photo-flow > .nvm-ed-photo-prose > ul[data-nvm-editorial-flow-list] {
    clear: none;
    list-style-position: inside;
    padding-inline-start: 0;
  }
}

/* #117: existing article-specific figure margin would erase the float gutter. */
@container nvm-editorial (min-width: 580px) {
  #nvm-trends-article [data-nvm-editorial-section="r117-trend9"] > .nvm-ed-photo-prose > figure[data-nvm-editorial-photo] {
    margin: .2em clamp(18px, 3.5cqi, 35px) .65em 0;
  }
}

/* Preserve standard float gutter where the source article's old margin wins. */
@container nvm-editorial (min-width: 580px) {
  #nvm-trends-article [data-nvm-photo-layout="117-regenerative"] > .nvm-ed-photo-prose > figure[data-nvm-editorial-photo] {
    margin: .2em clamp(18px, 3.5cqi, 35px) .65em 0;
  }
}

[data-nvm-photo-layout="117-regenerative"] > .nvm-ed-photo-prose > [data-nvm-photo-after]{clear:both}
