/* Approved advertising formats. Loaded after the editorial styles.
   Keep paid creatives at their specified display size; never shrink a desktop
   advert to make it fit a phone. Labels sit outside the creative. */
.bhm-editorial .bhm-stage-banner {
  display: block;
  max-width: none;
  margin: 0;
  font-family: var(--bhm-font);
}
.bhm-editorial .bhm-stage-ad-label {
  display: block;
  margin: 0 0 7px;
  color: #626872;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}
.bhm-editorial .bhm-stage-banner--leaderboard { width: 728px; }
.bhm-editorial .bhm-stage-banner--rectangle { width: 300px; }
.bhm-editorial .bhm-stage-banner--skyscraper { width: 160px; }
.bhm-editorial .bhm-stage-banner > a {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #f4f4f4;
  text-decoration: none;
}
.bhm-editorial .bhm-stage-banner--leaderboard > a { width: 728px; height: 90px; aspect-ratio: auto; }
.bhm-editorial .bhm-stage-banner--rectangle > a { width: 300px; height: 250px; aspect-ratio: auto; }
.bhm-editorial .bhm-stage-banner--skyscraper > a { width: 160px; height: 600px; aspect-ratio: auto; }
.bhm-editorial .bhm-stage-banner > a > picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}
.bhm-editorial .bhm-stage-banner > a:not(.bhm-house-ad) > img,
.bhm-editorial .bhm-stage-banner > a:not(.bhm-house-ad) > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  object-fit: contain;
  object-position: center;
}
.bhm-editorial .bhm-header-promotion > .bhm-stage-banner,
.bhm-editorial .bhm-header-promotion > .bhm-house-banner-wrap { margin-inline: auto; }
.bhm-editorial .bhm-site-header { container-name: bhm-site-header; container-type: inline-size; }
.bhm-editorial .bhm-house-banner-wrap { width: 728px; max-width: none; }
.bhm-editorial .bhm-house-banner { width: 728px; max-width: none; height: 90px; min-height: 90px; }

/* First-party promotions use the existing published magazine/resources links. */
.bhm-editorial .bhm-stage-banner > .bhm-house-ad {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  padding: 22px;
  border: 0;
  color: #222630;
  background: #f5f5f5;
  font-family: var(--bhm-font);
  line-height: 1.35;
  text-decoration: none;
}
.bhm-house-ad-kicker {
  display: block;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.bhm-house-ad-title {
  display: block;
  margin: 0 0 12px;
  color: inherit;
  font-size: 29px;
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}
.bhm-house-ad-copy { display: block; margin: 0 0 16px; color: inherit; font-size: 15px; line-height: 1.55; }
.bhm-house-ad-action {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid currentColor;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.bhm-house-ad-action svg { display: none; }
.bhm-house-ad-mark { display: block; margin: 0 0 20px; color: inherit; font-size: 36px; font-weight: 900; line-height: .95; letter-spacing: -.05em; }
.bhm-house-ad-mark small { display: block; margin-top: 6px; font-size: 23px; font-weight: 750; line-height: 1; letter-spacing: .02em; }
.bhm-editorial .bhm-stage-banner > .bhm-house-ad--skyscraper { padding: 26px 17px 22px; color: #fff; background: #a51e2a; }
.bhm-house-ad--skyscraper .bhm-house-ad-kicker { margin-bottom: 17px; font-size: 11px; line-height: 1.6; letter-spacing: .05em; }
.bhm-house-ad--skyscraper .bhm-house-ad-title { margin-bottom: 18px; font-size: 25px; line-height: 1.14; }
.bhm-house-ad--skyscraper .bhm-house-ad-copy { font-size: 14px; line-height: 1.6; }
.bhm-house-ad--skyscraper .bhm-house-ad-action { font-size: 13px; line-height: 1.5; }
.bhm-house-ad:hover .bhm-house-ad-action { text-decoration: underline; text-underline-offset: .2em; }

/* Six homepage promotions share the same 160 x 600 format and type system. */
.bhm-editorial .bhm-stage-banner > .bhm-house-ad--home.bhm-house-ad--tone-gold { background: #ffd243; color: #202127; }
.bhm-editorial .bhm-stage-banner > .bhm-house-ad--home.bhm-house-ad--tone-ink { background: #222630; color: #fff; }
.bhm-editorial .bhm-stage-banner > .bhm-house-ad--home.bhm-house-ad--tone-red { background: #a51e2a; color: #fff; }
.bhm-editorial .bhm-stage-banner > .bhm-house-ad--home.bhm-house-ad--tone-paper { background: #f4eee3; color: #80202a; box-shadow: inset 0 0 0 1px #e2d6c5; }
.bhm-house-ad--home .bhm-house-ad-mark small { font-size: 15px; letter-spacing: .14em; }
.bhm-editorial .bhm-stage-banner > .bhm-house-ad--home:focus-visible { outline: 3px solid #1c5bc6; outline-offset: 4px; }

/* A content advert has a deliberate place in the reading column. The wrapper
   spans the column; the paid creative and its label stay centred at 300px. */
.bhm-editorial .bhm-inline-ad {
  --bhm-inline-house-width: 100%;
  --bhm-inline-house-margin: auto;
  box-sizing: border-box;
  display: block;
  clear: both;
  float: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 32px 0;
  padding: 0;
}
.bhm-editorial .bhm-inline-ad > .bhm-adserver--rectangle,
.bhm-editorial .bhm-inline-ad > .bhm-stage-banner--rectangle {
  margin-inline: calc((100% - 300px) / 2);
}
.bhm-editorial .bhm-inline-ad .bhm-stage-ad-label { text-align: center; }
.bhm-editorial .bhm-home .bhm-news-inline-ad {
  margin-top: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.bhm-editorial .bhm-home .bhm-news-inline-ad .bhm-inline-ad,
.bhm-editorial .bhm-home .bhm-news-inline-ad .bhm-stage-banner { margin: 0; }

/* The magazine house promotion is editorial content, not a paid 300 x 250
   creative. Only a visible fallback owns the wider strip. Integrated homepage,
   service and video placements keep their existing compact house artwork. */
.bhm-editorial :is(.bhm-news-inline-ad, .bhm-service-inline-ad, .bhm-video-library-inline-ad) .bhm-inline-ad {
  --bhm-inline-house-width: 300px;
  --bhm-inline-house-margin: calc((100% - 300px) / 2);
}
.bhm-editorial .bhm-inline-ad .bhm-stage-banner--rectangle:has(> .bhm-house-ad) { width: 100%; }
.bhm-editorial .bhm-inline-ad > .bhm-stage-banner--rectangle:has(> .bhm-house-ad) {
  width: var(--bhm-inline-house-width);
  max-width: 780px;
  margin-inline: var(--bhm-inline-house-margin);
}
.bhm-editorial .bhm-inline-ad .bhm-stage-banner > .bhm-house-ad--rectangle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 28px;
  width: 100%;
  height: auto;
  min-height: 136px;
  padding: 22px 24px;
  border-left: 3px solid #a51e2a;
  background: #f5f5f6;
  text-align: left;
}
.bhm-inline-ad .bhm-house-ad--rectangle .bhm-house-ad-kicker { grid-column: 1; margin: 0 0 6px; color: #656b75; }
.bhm-inline-ad .bhm-house-ad--rectangle .bhm-house-ad-title { grid-column: 1; margin: 0 0 7px; color: #a51e2a; font-size: 28px; }
.bhm-inline-ad .bhm-house-ad--rectangle .bhm-house-ad-copy { grid-column: 1; margin: 0; font-size: 16px; }
.bhm-inline-ad .bhm-house-ad--rectangle .bhm-house-ad-action {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 12px 15px;
  border: 1px solid #a51e2a;
  color: #a51e2a;
  font-size: 14px;
  text-align: center;
}

/* Every right-hand advertising rail is exactly one skyscraper wide. */
.bhm-home-adverts,
.bhm-editorial .bhm-reader-ad-rail {
  display: grid;
  align-content: start;
  align-items: start;
  justify-items: start;
  gap: 40px;
  width: 160px;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.bhm-home-advert-slot { width: 160px; max-width: none; min-width: 0; margin: 0; padding: 0; }
.bhm-home .bhm-home-adverts { align-self: stretch; align-content: space-between; }
/* Optional long-page slots are opened only when the existing story is tall
   enough. The rail must never stretch the content used to measure that fit. */
.bhm-editorial [data-bhm-ad-rail-content] { align-self: start; height: auto; }
.bhm-editorial [data-bhm-ad-rail-slot][hidden],
.bhm-editorial :is(.bhm-author-ad-slot, .bhm-political-ad-slot):has(> [data-bhm-ad-rail-slot][hidden]) { display: none !important; }
/* The controller clears this state before measuring again. Hidden initial
   slots alone must never hide their rail or prevent its first fit check. */
.bhm-editorial [data-bhm-ad-rail][data-bhm-ad-rail-empty="true"] { display: none !important; }
.bhm-editorial .bhm-reader-ad-rail { justify-self: end; }
.bhm-editorial .bhm-reader-ad { margin-inline: 0; }
.bhm-editorial .banner-wrap .bhm-stage-banner,
.bhm-editorial .banner-sub-wrap .bhm-stage-banner { margin: 0; }
body.bhm-editorial:is(.archive, .search, .blog) .page-wrap > .container > .banner-wrap {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 40px;
  width: 160px;
  max-width: none;
  margin: 0;
}
body.bhm-editorial:is(.archive, .search, .blog) .page-wrap > .container > .banner-wrap:not(:has(.bhm-stage-banner)) { display: none; }

@media (min-width: 960px) {
  body.bhm-editorial:is(.archive, .search, .blog) .page-wrap > .container:has(> .banner-wrap .bhm-stage-banner--skyscraper) { grid-template-columns: minmax(0, 1fr) 160px; }
  .bhm-editorial .bhm-article-layout--rail {
    grid-template-columns: minmax(0, 780px) 160px;
    grid-template-rows: auto;
    grid-template-areas: "reader rail";
    column-gap: 40px;
    row-gap: 40px;
  }
  .bhm-editorial .bhm-article-layout--sidebar.bhm-article-layout--rail { grid-template-areas: "reader rail" "sidebar rail"; }
  .bhm-editorial .bhm-article-layout--rail > .bhm-reader { grid-area: reader; }
  .bhm-editorial .bhm-article-layout--rail > .bhm-reader-ad-rail { grid-area: rail; }
  .bhm-editorial .bhm-article-layout--rail > .bhm-reader-sidebar { grid-area: sidebar; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .bhm-editorial .bhm-article-layout--rail > .bhm-reader-sidebar > :only-child { grid-column: 1 / -1; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  body.bhm-editorial:is(.archive, .search, .blog) #main-content > .row:has(> .widgets-aside > *) { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1120px) {
  .bhm-editorial .bhm-masthead { grid-template-columns: minmax(240px, 1fr) 728px; column-gap: 32px; }
}
@media (min-width: 800px) and (max-width: 1119px) {
  .bhm-editorial .bhm-masthead { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .bhm-editorial .bhm-brand { margin-inline: 0; }
  .bhm-editorial .bhm-header-promotion { width: 728px; max-width: none; margin-inline: auto; }
}
@media (max-width: 959px) {
  .bhm-home-adverts,
  .bhm-editorial .bhm-reader-ad-rail,
  body.bhm-editorial:is(.archive, .search, .blog) .page-wrap > .container > .banner-wrap { display: none; }
  .bhm-editorial .bhm-home .bhm-home-layout,
  body.bhm-editorial:is(.archive, .search, .blog) .page-wrap > .container { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 799px) {
  .bhm-editorial .bhm-header-promotion {
    width: 320px;
    max-width: none;
    justify-self: center;
    margin-inline: calc((100% - 320px) / 2);
  }
  .bhm-editorial .bhm-stage-banner--leaderboard:not(.bhm-stage-banner--has-mobile),
  .bhm-editorial .bhm-header-promotion:has(> .bhm-stage-banner--leaderboard:not(.bhm-stage-banner--has-mobile)) { display: none; }
  .bhm-editorial .bhm-stage-banner--leaderboard,
  .bhm-editorial .bhm-house-banner-wrap { width: 320px; max-width: none; }
  .bhm-editorial .bhm-stage-banner--leaderboard > a,
  .bhm-editorial .bhm-house-banner { width: 320px; max-width: none; height: 50px; min-height: 50px; aspect-ratio: auto; }
  .bhm-editorial .bhm-house-banner { border-left-width: 4px; padding: 6px 9px; gap: 10px; }
  .bhm-editorial .bhm-house-banner .bhm-house-mark,
  .bhm-editorial .bhm-house-banner .bhm-house-kicker,
  .bhm-editorial .bhm-house-banner .bhm-house-description,
  .bhm-editorial .bhm-house-banner .bhm-house-cta svg { display: none; }
  .bhm-editorial .bhm-house-banner .bhm-house-copy strong { font-size: 16px; line-height: 1.15; }
  .bhm-editorial .bhm-house-banner .bhm-house-cta { padding: 8px; font-size: 13px; }
  .bhm-editorial .bhm-inline-ad .bhm-stage-banner > .bhm-house-ad--rectangle { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .bhm-inline-ad .bhm-house-ad--rectangle .bhm-house-ad-action { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 17px; }
}
@media (max-width: 599px) {
  .bhm-editorial .bhm-stage-banner--skyscraper { display: none; }
}
@media (max-width: 319px) {
  .bhm-editorial .bhm-header-promotion,
  .bhm-editorial .bhm-inline-ad,
  .bhm-editorial .bhm-home .bhm-news-inline-ad,
  .bhm-editorial .bhm-stage-banner--rectangle { display: none; }
}
/* A scrollbar can leave less room than the viewport media query reports.
   Hide the slot when its actual header container cannot fit a 320px creative. */
@container bhm-site-header (width < 320px) {
  .bhm-editorial .bhm-header-promotion { display: none; }
}
@media print {
  .bhm-home-adverts,
  .bhm-inline-ad,
  .bhm-stage-banner,
  .bhm-house-banner-wrap { display: none !important; }
}

/* Approved Revive placements. Their inert templates are activated only when
   the corresponding format fits; each creative keeps its actual dimensions. */
.bhm-editorial .bhm-adserver {
  --bhm-ad-width: 728px;
  --bhm-ad-height: 90px;
  width: var(--bhm-ad-width);
  max-width: none;
  min-width: 0;
  min-height: calc(var(--bhm-ad-height) + 23px);
  margin: 0;
  padding: 0;
}
.bhm-editorial .bhm-adserver--skyscraper { --bhm-ad-width: 160px; --bhm-ad-height: 600px; }
.bhm-editorial .bhm-adserver--rectangle { --bhm-ad-width: 300px; --bhm-ad-height: 250px; }
.bhm-editorial .bhm-header-promotion > .bhm-adserver { margin-inline: auto; }
.bhm-editorial .bhm-adserver > .bhm-adserver-panel { width: var(--bhm-ad-width); max-width: none; }
.bhm-editorial .bhm-adserver > .bhm-adserver-panel[hidden],
.bhm-editorial .bhm-adserver > .bhm-adserver-fallback[hidden] { display: none !important; }
/* An unbooked image fallback has no content. Keep its root measurable so the
   loader can activate it, without leaving a tall empty rail when JS is absent. */
.bhm-editorial .bhm-adserver:has(> .bhm-adserver-fallback:not([hidden]):empty) { min-height: 0; }
/* A restored house promotion owns its height. A short magazine strip should
   not retain the paid rectangle's empty space below it. */
.bhm-editorial .bhm-adserver:has(> .bhm-adserver-fallback:not([hidden]):not(:empty)) { min-height: 0; }
.bhm-editorial .bhm-adserver-creative {
  width: var(--bhm-ad-width);
  height: var(--bhm-ad-height);
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  line-height: 0;
}
.bhm-editorial .bhm-adserver-creative > ins {
  display: block;
  width: var(--bhm-ad-width);
  height: var(--bhm-ad-height);
  margin: 0;
  padding: 0;
  background: transparent;
  text-decoration: none;
}
.bhm-editorial .bhm-adserver-creative > ins > iframe { display: block; max-width: none; margin: 0; border: 0; }

/* The existing magazine fallback may be a full-width editorial strip. Keeping
   that fallback usable must not stretch a paid 300 x 250 creative. */
.bhm-editorial .bhm-inline-ad .bhm-adserver--rectangle:has(> .bhm-adserver-fallback:not([hidden]) .bhm-house-ad--rectangle) {
  width: var(--bhm-inline-house-width);
  max-width: 780px;
  margin-inline: var(--bhm-inline-house-margin);
}
/* A no-fill slot must remain measurable for the loader, but must not leave an
   empty reading break when neither a creative nor house fallback is visible. */
.bhm-editorial .bhm-inline-ad:empty,
.bhm-editorial .bhm-inline-ad:has(> .bhm-adserver--rectangle > .bhm-adserver-fallback:not([hidden]):empty):not(:has(> .bhm-adserver--rectangle > .bhm-adserver-panel:not([hidden]))) {
  margin-block: 0;
  padding-block: 0;
}
@media (min-width: 320px) and (max-width: 599px) {
  /* A 320px phone can have a padded reading column narrower than 300px. Let
     the native creative use those equal gutters, centred without scaling. */
  .bhm-editorial .bhm-home .bhm-home-edition .bhm-news-side .bhm-news-inline-ad .bhm-inline-ad,
  .bhm-editorial .bhm-service-archive .bhm-service-inline-ad .bhm-inline-ad,
  .bhm-editorial .bhm-video-library .bhm-video-library-inline-ad .bhm-inline-ad {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .bhm-editorial .bhm-home .bhm-home-edition .bhm-news-side .bhm-inline-ad > .bhm-stage-banner--rectangle {
    margin-inline: calc((100% - 300px) / 2);
  }
}
@media (min-width: 1100px) {
  .bhm-editorial .bhm-subjects .bhm-subject-ad > .bhm-adserver + .bhm-adserver { margin-top: 40px; }
}
@media (min-width: 800px) {
  .bhm-editorial .bhm-adserver--leaderboard > .bhm-adserver-panel--mobile { display: none !important; }
}
@media (max-width: 959px) {
  .bhm-editorial .bhm-adserver--skyscraper { display: none; }
}
@media (max-width: 799px) {
  .bhm-editorial .bhm-adserver--leaderboard { --bhm-ad-width: 320px; --bhm-ad-height: 50px; }
  .bhm-editorial .bhm-adserver--leaderboard > .bhm-adserver-panel--desktop { display: none !important; }
}
@media (max-width: 319px) {
  .bhm-editorial .bhm-adserver--leaderboard,
  .bhm-editorial .bhm-adserver--rectangle { display: none; }
}
@media print {
  .bhm-editorial .bhm-adserver { display: none !important; }
}
