/* One quiet, clearly separated placement. Ad artwork is controlled by AdSense. */
.site-ad {
  box-sizing: border-box;
  width: min(960px, calc(100% - 40px));
  margin: 48px auto;
  padding: 20px 24px 24px;
  border: 1px solid #3b3d3f;
  border-radius: 12px;
  background: #252729;
  color: #aaa9a5;
  font-family: system-ui, sans-serif;
  text-align: center;
  clear: both;
}
.site-ad[hidden] {
  display: none !important;
}
.site-ad-label {
  margin: 0 0 14px;
  font: 10px/1.5 system-ui, sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: inherit;
}
.site-ad-unit,
.site-ad-preview {
  display: block;
  width: 100%;
  height: 100px;
}
.site-ad-preview {
  display: grid;
  place-items: center;
  border: 1px dashed #4a4c4e;
  border-radius: 5px;
  color: #aaa9a5;
  font: 12px/1.5 system-ui, sans-serif;
}
@media (min-width: 800px) {
  .site-ad-unit,
  .site-ad-preview {
    height: 90px;
  }
}
@media (max-width: 480px) {
  .site-ad {
    width: calc(100% - 24px);
    padding: 16px 12px;
    margin-block: 36px;
  }
}

/* Avoid adding the section's generous heading space to the banner margin. */
section.ad-led:not(.hero) {
  padding-top: 24px;
}
section.ad-led > .site-ad:first-child {
  margin-top: 0;
  margin-bottom: 32px;
}

/* Footer banners own the gap; do not add a second section-sized gap. */
body > .site-ad {
  margin-block: 32px;
}
main:has(+ .site-ad:not([hidden])) {
  padding-bottom: 0;
}
main:has(+ .site-ad:not([hidden])) > section:last-child {
  padding-bottom: 0;
}

/* Responsive editorial units determine their own height. */
.site-ad-unit { height: auto; min-height: 100px; }
