/* Ad units: a steady block of space, gone when Google has no ad to show. */
.ad-wrap{display:block; width:100%; min-height:100px; margin:0 auto; overflow:hidden; text-align:center;}
.ad-wrap ins.adsbygoogle{display:block; width:100%;}
.ad-box:has(ins[data-ad-status="unfilled"]){display:none;}
.ad-sec{padding-block:10px;}
@media (max-width:640px){ .ad-wrap{min-height:60px;} }
/* the in-article unit sits inside the text: a little air above and below, and it takes its own height */
.ad-article{min-height:0; margin:28px auto; clear:both;}
/* article.css styles every img inside .ar-body (big, rounded, centred): keep that away from images that belong to the ad */
.ar-body .ad-wrap img{display:inline; max-width:none; height:auto; margin:0; border-radius:0; background:none;}
/* Community: the ad rides in the end column beside the menu and stays in view while the feed scrolls */
.sl-end:has(.ad-community){align-self:stretch;}
.sl-end .ad-box-community{position:sticky; top:var(--sl-top,156px); margin-top:18px; transition:top .28s ease;}
html.nav-hidden .sl-end{--sl-top:76px;}
html.nav-instant .sl-end .ad-box-community{transition:none;}
.sl-end .ad-community{min-height:250px;}

/* Framing: a quiet bordered card with a small label, so the ad sits in the page instead of floating in it */
.ad-box{background:var(--white); border:1px solid var(--border-soft); border-radius:16px; padding:10px 10px 12px; margin-inline:auto;}
.ad-lbl{display:block; margin:2px 4px 8px; font:600 10.5px/1 'JetBrains Mono',monospace; letter-spacing:.1em; text-transform:uppercase; color:var(--navy-soft);}
.ad-box .ad-wrap{border-radius:10px;}
.ad-box:has(.ad-article){margin-block:28px; max-width:100%; clear:both;}
.ad-box .ad-article{margin:0;}

/* Reels: the ad lives beside the video on big screens only (never over the video, never on phones) */
.rl-ad{display:none;}
@media (min-width:1280px) and (min-height:780px){
  .rl-ad{display:block; position:absolute; z-index:4; top:20px; inset-inline-start:24px; width:288px; max-height:calc(100% - 70px); overflow:hidden;}
}
