/* Adsterra — responsive (desktop + mobile). Hide leftover AdSense units. v=20260806f */

ins.adsbygoogle {
  display: none !important;
}

.ad-wrap:not(.at-ad) {
  display: none !important;
}

.ad-section.at-home {
  display: block !important;
  padding: clamp(20px, 4vw, 36px) 0;
}

.ad-section:not(.at-home):not(:has(.at-ad)) {
  display: none !important;
}

.at-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: min(970px, 100%);
  margin: 36px auto;
  padding: 18px 14px;
  background: var(--surface, #fff);
  border: 1px dashed var(--border-strong, rgba(0, 0, 0, 0.12));
  border-radius: 14px;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
}

.at-ad-label {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute, #9aa3ad);
}

.at-ad-frame {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.at-ad iframe,
.at-ad img,
.at-ad object,
.at-ad embed {
  max-width: 100% !important;
}

.at-ad--native {
  margin: 40px 0 56px;
}

/* Extra breathing room before guide cards / feature grids */
.at-ad + .guide-grid,
.at-home + .section {
  margin-top: 8px;
}

.at-ad--native [id^="container-"] {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
}

.at-native-desk {
  display: flex;
  width: 100%;
  justify-content: center;
}

.at-native-mob {
  display: none;
  width: 100%;
  justify-content: center;
}

.at-ad--300 {
  margin: 32px auto;
  max-width: min(340px, 100%);
}

.at-ad--rail {
  margin: 0 auto 18px;
  width: 100%;
  max-width: 300px;
}

.at-ad--leader,
.at-ad--incontent,
.at-ad--banner {
  margin: 48px auto;
  padding: 22px 16px;
  min-height: 70px;
  max-width: min(800px, 100%);
}

/* In-content horizontal banners: 728 desk / 320 mob — never square 300 in story */
.at-ad-banner-desk,
.at-ad-leader-desk,
.at-ad-in-desk {
  display: flex;
  justify-content: center;
  width: 100%;
}

.at-ad-banner-mob,
.at-ad-leader-mob,
.at-ad-in-mob {
  display: none;
  justify-content: center;
  width: 100%;
}

/* Space ads away from story text/images inside summaries */
.summary-story .at-ad,
.summary-center .at-ad {
  margin-top: 52px;
  margin-bottom: 52px;
}

.summary-story .summary-scene + .at-ad,
.summary-story p.story + .at-ad {
  margin-top: 48px;
}

.summary-story .at-ad + p.story,
.summary-story .at-ad + .summary-scene {
  margin-top: 8px;
}

.summary-shell {
  column-gap: 40px;
}

.summary-rail--right {
  padding-left: 8px;
}

@media (max-width: 767px) {
  .at-ad {
    margin: 36px auto 44px;
    padding: 16px 10px;
    border-radius: 12px;
  }

  .at-ad--native {
    margin: 28px 0 48px;
  }

  .at-ad--leader,
  .at-ad--incontent,
  .at-ad--banner {
    margin: 40px auto;
    max-width: 100%;
  }

  .summary-story .at-ad,
  .summary-center .at-ad {
    margin-top: 40px;
    margin-bottom: 40px;
  }

  /* Mobile: 320×50 banners inside content */
  .at-ad-leader-desk,
  .at-ad-banner-desk,
  .at-native-desk,
  .at-ad-in-desk {
    display: none !important;
  }

  .at-ad-leader-mob,
  .at-ad-banner-mob,
  .at-native-mob,
  .at-ad-in-mob {
    display: flex !important;
  }

  /* Hide sidebar / square ads on mobile — content banners only */
  .summary-rail--right {
    display: none !important;
  }

  .at-ad--300:not(.at-ad--incontent):not(.at-ad--rail) {
    display: none !important;
  }

  .at-ad--300 {
    max-width: 100%;
  }
}

/* Download interstitial */
.dl-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0 72px;
}

.dl-card {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.dl-card h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 10px;
}

.dl-card .dl-sub {
  color: var(--text-mute, #64748b);
  margin: 0 0 28px;
}

.dl-card .btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: min(280px, 100%);
  padding: 14px 22px;
  font-size: 1.05rem;
  font-weight: 700;
}

.dl-card .dl-note {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text-mute, #64748b);
}

.dl-card .dl-back {
  display: inline-block;
  margin-top: 22px;
  font-weight: 600;
}
