/* Current network ad slots: IAB / AdSense sizes, CLS-safe, no overflow.
   Direct sponsors render in .nc-ad-direct; AdSense backfill + "Advertise here" sit in the reserved frame. */

.nc-ad, .nc-slot, .nc-banner-slot { position: relative; margin: 0 0 20px; max-width: 100%; box-sizing: border-box; }
.nc-ad > .adl, .nc-slot > .adl, .nc-banner-slot > .adl {
  display: block; text-align: center; font: 600 10px Inter, sans-serif;
  letter-spacing: .12em; text-transform: uppercase; color: #777; margin: 0 0 6px;
}
.nc-ad-frame {
  position: relative; display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: 100%; max-width: 100%; margin-inline: auto;
  overflow: hidden; background: #0F0F10; color: #fff;
}
.nc-ad-direct { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.nc-ad-direct[hidden] { display: none !important; }
.nc-ad-direct img, .nc-ad-direct a { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; margin: 0 auto; }
.nc-ad-adsense { display: block; position: relative; z-index: 1; width: 100%; height: 100%; max-width: 100%; box-sizing: border-box; }
.nc-ad-adsense[hidden] { display: none !important; }

/* Placeholder sits behind the AdSense unit so unfilled slots still read as inventory. */
.nc-ph, .nc-ad-ph {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  box-sizing: border-box; width: 100%; max-width: 100%; background: #0F0F10; color: #fff;
  border-bottom: 4px solid #E1251B; text-decoration: none; padding: 16px 18px;
}
.nc-ad-ph { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.nc-ad--direct .nc-ad-ph, .nc-ad--direct .nc-ad-adsense { display: none !important; }
.nc-ph-kicker { margin: 0 0 8px; font: 700 10px/1.2 Inter, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.nc-ph-head { margin: 0 0 8px; font: 800 1.35rem/1.1 Inter, system-ui, sans-serif; color: #fff; }
.nc-ph-cta { margin: 0; font: 400 .92rem/1.4 "Source Sans 3", system-ui, sans-serif; color: #f2f2f2; max-width: 36ch; }
.nc-ph-cta a { color: #fff; text-decoration: underline; }
.nc-ph-cta a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Top / mid / end leaderboard: 320x100 mobile, 728x90 tablet, 970x90 desktop */
.nc-ad--leaderboard { width: 100%; max-width: 100%; }
.nc-ad--leaderboard .nc-ad-frame {
  width: 320px; height: 100px; min-width: 320px; min-height: 100px;
  max-width: 100%;
}
.nc-ad-top { display: flex; justify-content: center; padding: 10px 16px 0; box-sizing: border-box; max-width: 1232px; margin: 0 auto; width: 100%; }
@media (min-width: 768px) {
  .nc-ad--leaderboard .nc-ad-frame { width: 728px; height: 90px; min-width: 728px; min-height: 90px; max-width: 100%; }
}
@media (min-width: 1000px) {
  .nc-ad--leaderboard .nc-ad-frame { width: 970px; height: 90px; min-width: 970px; min-height: 90px; max-width: 100%; }
}
/* If the viewport is narrower than the IAB width, drop to the next size instead of overflowing. */
@media (max-width: 759px) {
  .nc-ad--leaderboard .nc-ad-frame { width: 320px; height: 100px; min-width: 0; min-height: 100px; }
}
@media (min-width: 760px) and (max-width: 999px) {
  .nc-ad--leaderboard .nc-ad-frame { width: 728px; height: 90px; min-width: 0; min-height: 90px; }
}
@media (min-width: 1000px) {
  .nc-ad--leaderboard .nc-ad-frame { min-width: 0; }
}

/* Medium rectangle 300x250 */
.nc-ad--mr .nc-ad-frame { width: 300px; height: 250px; min-width: 0; min-height: 250px; max-width: 100%; }
.nc-ad--mr .nc-ph-head { font-size: 1.35rem; }

/* Half page 300x600 */
.nc-ad--hp .nc-ad-frame { width: 300px; height: 600px; min-width: 0; min-height: 600px; max-width: 100%; }
.nc-ad--sticky { position: sticky; top: 12px; }

/* In-feed / between-section: 300x250 mobile, 728x90 desktop */
.nc-ad--infeed { width: 100%; }
.nc-ad--infeed .nc-ad-frame { width: 300px; height: 250px; min-width: 0; min-height: 250px; max-width: 100%; }
@media (min-width: 768px) {
  .nc-ad--infeed .nc-ad-frame { width: 728px; height: 90px; min-height: 90px; }
}

/* In-article mid-story */
.nc-ad--inarticle { margin: 24px auto; width: 100%; max-width: 100%; }
.nc-ad--inarticle .nc-ad-frame { width: 300px; height: 250px; min-width: 0; min-height: 250px; max-width: 100%; }
@media (min-width: 768px) {
  .nc-ad--inarticle .nc-ad-frame { width: 728px; height: 90px; min-height: 90px; }
}

section.banner.nc-banner-host { background: transparent; overflow: visible; margin-top: 28px; margin-bottom: 8px; }
section.banner.nc-banner-host .bn-strip { margin-top: 8px; }
.nc-page-sponsor { display: flex; justify-content: center; padding: 12px 0 8px; }
.nc-page-sponsor .nc-ad--mr { max-width: 300px; }

/* Keep 300px IAB units aligned in side rails; stack mid-width so they never clip. */
@media (min-width: 1200px) {
  .feat1 { grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 24px; }
}
@media (min-width: 988px) and (max-width: 1199px) {
  .feat1 { grid-template-columns: minmax(160px, 200px) minmax(0, 1fr); gap: 16px; }
  .feat1 > .side {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .feat1 > .side .nc-ad--hp { display: none; } /* half-page needs a 300px rail; hide when the rail is shared */
}
@media (min-width: 988px) {
  .a-grid, .more-wrap { grid-template-columns: minmax(0, 1fr) 300px; }
  .side2 .nc-ad--sticky { top: 12px; }
}
@media (max-width: 987px) {
  .nc-ad--hp { margin-inline: auto; }
}

/* Never let an ad unit force sideways scroll */
.nc-ad, .nc-ad-frame, .nc-banner-host, .nc-ad-top, .nc-page-sponsor { max-width: 100%; }
.nc-ad img, .nc-ad iframe, .nc-ad ins { max-width: 100%; }
