/* Ad zones (hand-written, like vendor-logos.css; btcp.css stays the owner's kit, unchanged). The markup comes from AdMarkup (Features/Ads):
     <div class="ad-zone" data-ad-count="1|2"> <div class="ad-slot ..." style="--ad-w:728px;--ad-ratio:728/90">...</div> ... </div>
   A zone is centred in the page container at every width, with the same space above and below. One ad is centred alone; two ads sit side by side
   as a centred pair with a gap, and stack (each centred) when the container is too narrow for both. A banner is never drawn larger than its
   natural width and shrinks with the container keeping its aspect ratio. Nothing is written for an empty zone, so nothing is reserved for it.
   The admin preview loads this same file, so the preview and the site cannot differ. */

.ad-zone {
  --ad-space: 24px;
  --ad-gap: 16px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--ad-gap);
  width: 100%;
  margin: var(--ad-space) auto;
}

/* A zone placed directly in the page frame (above the header, above the footer) lines up with the page container. */
body > .ad-zone {
  max-width: var(--page, 1320px);
  padding-inline: var(--gutter, 16px);
}

/* The vertical space of a zone is its own margin. The section that follows already starts with the kit's section gap, so a zone must not add to it. */
.ad-zone + .section { padding-top: 0; }

.ad-slot {
  flex: 0 1 auto;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  /* The reserved box: the ad's own width, never more than the container. */
  width: min(100%, var(--ad-w, auto));
  aspect-ratio: var(--ad-ratio, auto);
  height: var(--ad-h, auto);
  overflow: hidden;
}
.ad-slot > a { display: block; }
.ad-slot img { display: block; max-width: 100%; width: 100%; height: auto; }
/* A banner whose size is not stored: shown at its natural size, shrunk to fit, never enlarged. */
.ad-slot--auto { width: auto; }
.ad-slot--auto img { width: auto; margin-inline: auto; }

/* Network code and AdSense units that do not know their width share the row (a pair takes half each) up to the zone's slot width. */
.ad-slot--fluid { flex: 1 1 280px; width: auto; max-width: var(--ad-w, 100%); overflow: visible; }

/* A responsive AdSense unit reserves a minimum height per breakpoint, so the space exists before the unit is filled. */
.ad-slot--adsense-auto { min-height: 100px; }
@media (min-width: 640px) { .ad-slot--adsense-auto { min-height: 90px; } }
@media (min-width: 1024px) { .ad-slot--adsense-auto { min-height: 90px; } }
.ad-slot ins.adsbygoogle { display: block; }
