/* Responsive AdSense slot sizing — reserved dimensions reduce CLS. */

.ad-banner {
  width: 100%;
  max-width: 970px;
  margin-inline: auto;
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
  padding-inline: var(--space-4, 1rem);
  clear: both;
  box-sizing: border-box;
}

.ad-banner__label {
  margin: 0 0 0.35rem;
  font: 600 0.65rem/1 var(--font-mono, monospace);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8478);
  text-align: center;
}

.ad-banner__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--border-strong, #2a2824) 70%, transparent);
  background: color-mix(in srgb, var(--bg-card, #121110) 88%, transparent);
}

.ad-banner__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  font: 600 0.75rem/1 var(--font-mono, monospace);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8478);
}

.ad-banner ins.adsbygoogle {
  display: block;
  width: 100%;
  min-height: inherit;
}

.ad-banner--lazy {
  content-visibility: auto;
  contain-intrinsic-size: auto 100px;
}

/* A. Mobile top */
.ad-slot-mobile-top {
  max-width: 320px;
  min-height: 100px;
}

.ad-slot-mobile-top .ad-banner__frame {
  min-height: 100px;
  max-height: 100px;
}

@media (min-width: 640px) {
  .ad-slot-mobile-top {
    max-width: 468px;
    min-height: 60px;
  }

  .ad-slot-mobile-top .ad-banner__frame {
    min-height: 60px;
    max-height: 60px;
  }
}

@media (min-width: 1024px) {
  .ad-slot-mobile-top {
    max-width: 728px;
    min-height: 90px;
  }

  .ad-slot-mobile-top .ad-banner__frame {
    min-height: 90px;
    max-height: 90px;
  }
}

/* B. Leaderboard */
.ad-slot-leaderboard {
  max-width: 320px;
  min-height: 100px;
}

.ad-slot-leaderboard .ad-banner__frame {
  min-height: 100px;
}

@media (min-width: 640px) {
  .ad-slot-leaderboard {
    max-width: 468px;
    min-height: 60px;
  }

  .ad-slot-leaderboard .ad-banner__frame {
    min-height: 60px;
    max-height: 60px;
  }
}

@media (min-width: 1024px) {
  .ad-slot-leaderboard {
    max-width: 970px;
    min-height: 90px;
  }

  .ad-slot-leaderboard .ad-banner__frame {
    min-height: 90px;
    max-height: 90px;
  }
}

/* C. In-article */
.ad-slot-in-article {
  max-width: 100%;
  min-height: 100px;
}

.ad-slot-in-article .ad-banner__frame {
  min-height: 100px;
}

@media (min-width: 640px) {
  .ad-slot-in-article {
    max-width: 336px;
    min-height: 280px;
  }

  .ad-slot-in-article .ad-banner__frame {
    min-height: 280px;
    max-height: 280px;
  }
}

/* D. Sidebar (desktop only) */
.ad-slot-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .ad-slot-sidebar {
    display: block;
    max-width: 300px;
    min-height: 250px;
  }

  .ad-slot-sidebar .ad-banner__frame {
    min-height: 250px;
    max-height: 250px;
  }

  .ad-slot-sidebar.ad-slot-sidebar--tall .ad-banner__frame {
    min-height: 600px;
    max-height: 600px;
  }
}

/* E. Footer */
.ad-slot-footer {
  max-width: 320px;
  min-height: 100px;
}

.ad-slot-footer .ad-banner__frame {
  min-height: 100px;
  max-height: 100px;
}

@media (min-width: 640px) {
  .ad-slot-footer {
    max-width: 728px;
    min-height: 90px;
  }

  .ad-slot-footer .ad-banner__frame {
    min-height: 90px;
    max-height: 90px;
  }
}

/* Spacing from CTAs / nav (utility classes used in templates) */
.ad-banner--below-hero {
  margin-top: clamp(2rem, 5vw, 3rem);
}

.ad-banner--above-footer {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.ad-banner--in-content {
  margin-block: clamp(2rem, 4vw, 2.75rem);
}

.ad-slot[hidden] {
  display: none !important;
}
