
/* Top leaderboard lives outside .article-body (publisher article.html.j2).
   House OAS creatives are exactly 728×90. Scale that iframe to the column
   width and shrink-wrap the bordered band to the *visual* ad size so the
   image fills the border (transform:scale alone does not shrink layout). */
#gam-leaderboard,
main .fleet-leaderboard-slot,
main .fleet-gam-slot[data-gam-slot="leaderboard"],
.article-main .fleet-leaderboard-slot {
  max-width: 100%;
  box-sizing: border-box;
}

#gam-leaderboard.fleet-leaderboard-band,
.fleet-leaderboard-band.fleet-gam-slot[data-gam-slot="leaderboard"] {
  display: block;
  container-type: inline-size;
  container-name: fleet-lb;
  width: min(100%, 728px);
  max-width: 728px;
  box-sizing: content-box;
  margin: 28px auto 44px;
  padding: 0;
  /* Pre-JS: keep band aspect so scaled iframe fills; JS sets explicit height. */
  aspect-ratio: 728 / 90;
  height: auto;
  min-height: 0;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
  text-align: left;
}

#gam-leaderboard iframe,
main .fleet-leaderboard-slot iframe,
main .fleet-gam-slot[data-gam-slot="leaderboard"] iframe,
#gam-leaderboard [id^="google_ads_iframe"],
main .fleet-leaderboard-slot [id^="google_ads_iframe"],
#gam-leaderboard.fleet-leaderboard-band iframe,
.fleet-leaderboard-band iframe,
#gam-leaderboard.fleet-leaderboard-band [id^="google_ads_iframe"],
.fleet-leaderboard-band [id^="google_ads_iframe"] {
  display: block;
  margin: 0;
  border: 0;
  width: 728px;
  max-width: none;
  height: 90px;
  transform-origin: top left;
  transform: scale(var(--fleet-lb-scale, 1));
}

@supports (width: 1cqw) {
  #gam-leaderboard.fleet-leaderboard-band iframe,
  .fleet-leaderboard-band iframe,
  #gam-leaderboard.fleet-leaderboard-band [id^="google_ads_iframe"],
  .fleet-leaderboard-band [id^="google_ads_iframe"] {
    transform: scale(var(--fleet-lb-scale, min(1, calc(100cqw / 728))));
  }
}

@media (max-width: 759px) {
  #gam-leaderboard.fleet-leaderboard-band,
  .fleet-leaderboard-band.fleet-gam-slot[data-gam-slot="leaderboard"] {
    margin: 16px auto 28px;
    width: min(100%, 728px);
    max-width: 100%;
  }
  #gam-leaderboard iframe,
  #gam-leaderboard.fleet-leaderboard-band iframe,
  .fleet-leaderboard-band iframe {
    width: 728px !important;
    height: 90px !important;
    max-width: none !important;
    transform: scale(var(--fleet-lb-scale, 1));
    transform-origin: top left;
    margin: 0;
  }
}

@supports (width: 1cqw) {
  @media (max-width: 759px) {
    #gam-leaderboard.fleet-leaderboard-band iframe,
    .fleet-leaderboard-band iframe {
      transform: scale(var(--fleet-lb-scale, min(1, calc(100cqw / 728))));
    }
  }
}

main .fleet-gam-slot[data-gam-slot="inarticle"] iframe,
#gam-inarticle iframe,
[id^="gam-inarticle"] iframe {
  display: block;
  width: 300px;
  max-width: none;
  height: 250px;
  margin: 0;
  border: 0;
  transform-origin: top left;
  transform: scale(var(--fleet-mrec-scale, 1));
}

@supports (width: 1cqw) {
  main .fleet-gam-slot[data-gam-slot="inarticle"] iframe,
  #gam-inarticle iframe,
  [id^="gam-inarticle"] iframe {
    transform: scale(var(--fleet-mrec-scale, min(1, calc(100cqw / 300))));
  }
}


/* Fleet article body — responsive media (minimal + full article templates) */
.publisher-article .article-body img,
.publisher-article-minimal .article-body img,
.article-body img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

.publisher-article .article-body figure,
.publisher-article-minimal .article-body figure,
.article-body figure {
  max-width: 100%;
  margin: 1rem 0;
}

.publisher-article .article-body figure img,
.publisher-article-minimal .article-body figure img,
.article-body figure img {
  margin: 0 auto;
}

.publisher-article .article-body iframe:not(.fleet-oas-iframe),
.publisher-article-minimal .article-body iframe:not(.fleet-oas-iframe),
.article-body iframe:not(.fleet-oas-iframe),
.article-body video,
.article-body embed {
  max-width: 100%;
  height: auto;
}

.publisher-article .article-body table,
.publisher-article-minimal .article-body table,
.article-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.publisher-article .article-body,
.publisher-article-minimal .article-body {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 640px) {
  .publisher-article .article-body img,
  .publisher-article-minimal .article-body img,
  .article-body img {
    width: 100% !important;
  }
}

/* GAM / OAS ad slots — fixed-size iframes. Do not let the generic
   .article-body iframe { height:auto } rule above touch .fleet-oas-iframe
   (that letterboxes 300×250 / 728×90 when the column is narrow). */
.article-body .fleet-gam-slot,
.article-body .fleet-leaderboard-slot {
  overflow: hidden;
  width: 100%;
  clear: both;
}

.article-body .fleet-gam-slot[data-gam-slot="inarticle"] {
  container-type: inline-size;
  max-width: 300px;
  width: min(100%, 300px);
  box-sizing: content-box;
  aspect-ratio: 300 / 250;
  height: auto;
  min-height: 0;
  margin: 24px auto;
  padding: 0;
  overflow: hidden;
}

.article-body .fleet-leaderboard-slot,
.article-body .fleet-gam-slot[data-gam-slot="leaderboard"] {
  container-type: inline-size;
  max-width: 728px;
  width: min(100%, 728px);
  box-sizing: content-box;
  aspect-ratio: 728 / 90;
  height: auto;
  min-height: 0;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  overflow: hidden;
}

.article-body .fleet-gam-slot iframe,
.article-body .fleet-leaderboard-slot iframe,
.article-body .fleet-gam-slot iframe[id^="google_ads_iframe"],
.article-body .fleet-leaderboard-slot iframe[id^="google_ads_iframe"] {
  display: block;
  margin: 0 auto;
  border: 0;
  max-width: none;
  width: 300px;
  height: 250px !important;
  min-height: 250px;
  transform-origin: top left;
  transform: scale(var(--fleet-mrec-scale, 1));
}

@supports (width: 1cqw) {
  .article-body .fleet-gam-slot[data-gam-slot="inarticle"] iframe {
    transform: scale(var(--fleet-mrec-scale, min(1, calc(100cqw / 300))));
  }
}

.article-body .fleet-leaderboard-slot iframe,
.article-body .fleet-gam-slot[data-gam-slot="leaderboard"] iframe,
.article-body .fleet-leaderboard-slot iframe[id^="google_ads_iframe"],
.article-body .fleet-gam-slot[data-gam-slot="leaderboard"] iframe[id^="google_ads_iframe"] {
  width: 728px;
  max-width: none;
  height: 90px !important;
  min-height: 90px;
  margin: 0;
  transform-origin: top left;
  transform: scale(var(--fleet-lb-scale, 1));
}

@supports (width: 1cqw) {
  .article-body .fleet-leaderboard-slot iframe,
  .article-body .fleet-gam-slot[data-gam-slot="leaderboard"] iframe {
    transform: scale(var(--fleet-lb-scale, min(1, calc(100cqw / 728))));
  }
}

@media (max-width: 728px) {
  .article-body .fleet-leaderboard-slot iframe,
  .article-body .fleet-gam-slot[data-gam-slot="leaderboard"] iframe {
    width: 728px !important;
    max-width: none !important;
    transform: scale(var(--fleet-lb-scale, 1));
    transform-origin: top left;
    margin: 0;
  }
}

@supports (width: 1cqw) {
  @media (max-width: 728px) {
    .article-body .fleet-leaderboard-slot iframe,
    .article-body .fleet-gam-slot[data-gam-slot="leaderboard"] iframe {
      transform: scale(var(--fleet-lb-scale, min(1, calc(100cqw / 728))));
    }
  }
}

/* Featured hero sits outside .article-body — still must fit phone width */
.publisher-article .article-featured,
.publisher-article-minimal .article-featured,
.article-featured {
  max-width: 100%;
  margin: 0 0 1.25rem;
}
.publisher-article .article-featured img,
.publisher-article-minimal .article-featured img,
.article-featured img {
  max-width: 100% !important;
  width: 100%;
  height: auto !important;
  display: block;
}
