/* Canonical presentation for editorial inline photos inserted by content releases. */
body.mgt-editorial-post {
  --mgt-article-media: 960px;
}

body.mgt-editorial-post main figure.mgd-release-inline {
  width: min(calc(100% - (2 * var(--mgt-gutter, 24px))), var(--mgt-article-media, 960px)) !important;
  max-width: var(--mgt-article-media, 960px) !important;
  margin: 2rem auto 2.5rem !important;
}

body.mgt-editorial-post main .mgd-release-inline__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #eef2ef;
}

body.mgt-editorial-post main .mgd-release-inline__media > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover;
  object-position: center;
  border-radius: 0 !important;
}

/* Compatibility for releases published before the media wrapper existed. */
body.mgt-editorial-post main figure.mgd-release-inline > img {
  display: block;
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 18px !important;
}

body.mgt-editorial-post main figure.mgd-release-inline > figcaption {
  width: 100%;
  margin: 0.55rem 0 0 !important;
}

@media (max-width: 640px) {
  body.mgt-editorial-post main figure.mgd-release-inline {
    margin-top: 1.5rem !important;
    margin-bottom: 2rem !important;
  }

  body.mgt-editorial-post main .mgd-release-inline__media,
  body.mgt-editorial-post main figure.mgd-release-inline > img {
    border-radius: 14px !important;
  }
}


/* Pilot standard: compact contextual captions, full legal attribution at article end. */
body.mgt-editorial-post main .mg-photo-caption {
  width: 100%;
  margin: 0.55rem 0 0 !important;
  color: var(--mgt-muted, #5f6d66);
  font-size: 0.875rem;
  line-height: 1.45;
}

body.mgt-editorial-post main .mg-photo-credits {
  width: min(calc(100% - (2 * var(--mgt-gutter, 24px))), var(--mgt-reading, 760px));
  margin: 3.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--mgt-line, #dfe6e2);
}

body.mgt-editorial-post main .mg-photo-credits > p,
body.mgt-editorial-post main .mg-photo-credits li {
  color: var(--mgt-muted, #5f6d66);
  font-size: 0.875rem;
  line-height: 1.55;
}

body.mgt-editorial-post main .mg-photo-credits ol {
  padding-left: 1.35rem;
}

body.mgt-editorial-post main .mg-photo-credits li + li {
  margin-top: 0.8rem;
}
