/* Give a 970px unit its own space on wide article layouts. */
@media (min-width: 1360px) {
  .article-layout {
    width: min(calc(100% - 2.2rem), 1360px);
    column-gap: 40px;
  }
}

.ad-shell--heading {
  container-type: inline-size;
}


.ad-slot--heading {
  display: none;
  margin: 0.75rem auto 1.6rem;
  outline: 1px solid var(--line);
}

.ad-slot--heading > .adsbygoogle {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
}

@media (max-width: 820px) {
  @container (min-width: 200px) {
    .ad-slot--heading { display: grid; width: 200px; height: 200px; }
  }

  @container (min-width: 250px) {
    .ad-slot--heading { width: 250px; height: 250px; }
  }

  @container (min-width: 300px) {
    .ad-slot--heading { width: 300px; height: 250px; }
  }
}

@media (width > 820px) {
  .intro-grid:has(> div > .ad-shell--heading) {
    grid-template-columns: minmax(0, 1fr);
  }

  @container (min-width: 234px) {
    .ad-slot--heading { display: grid; width: 234px; height: 60px; }
  }

  @container (min-width: 320px) {
    .ad-slot--heading { width: 320px; height: 50px; }
  }

  @container (min-width: 468px) {
    .ad-slot--heading { display: grid; width: 468px; height: 60px; }
  }

  @container (min-width: 728px) {
    .ad-slot--heading { width: 728px; height: 90px; }
  }

  @container (min-width: 970px) {
    .ad-slot--heading { width: 970px; height: 250px; }
    .ad-slot--heading[data-desktop-compact="true"] { height: 90px; }
  }
}

.ad-shell--heading:has(.adsbygoogle[data-ad-status="unfilled"]) {
  display: none;
}

.ad-shell--heading[data-ad-preview="true"] .ad-slot--heading {
  border: 1px dashed var(--muted);
  background: var(--accent-soft);
}


/* Let an inserted unit occupy a whole grid row on overview pages. */
.section-heading > .ad-shell--heading {
  grid-column: 1 / -1;
}

.hub-hero-content:has(> .ad-shell--heading:not([hidden])) {
  max-width: none;
}

.hub-hero-content:has(> .ad-shell--heading:not([hidden])) h1 {
  max-width: 700px;
}

.ad-shell--heading[hidden] {
  display: none;
}

/* Use the full reading column and align ads with its leading edge. */
.article-body {
  font-size: clamp(1.125rem, calc(1rem + 0.3vw), 1.25rem);
}

.article-body :is(p, ul, ol, dl, blockquote, h3, .article-summary, .article-example, .article-note, .article-related) {
  max-width: none;
}

.article-body :is(p, li, dd, blockquote) {
  overflow-wrap: anywhere;
}

.article-body .article-lead {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
}

.ad-slot--heading,
.ad-slot--leaderboard {
  margin-inline: 0 auto;
}

@media (max-width: 620px) {
  .article-body .article-example td {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
