/* tiny helpers for ad shells */
.ad-slot { position: relative; }
/* Rail helper box for parity with main site dimensions */
.rail-160x600 { width:160px; height:600px; display:block; }

/* Rails: desktop-only — hide on tablets/phones and coarse pointers (match main site 1200px cutoff) */
@media (max-width: 1200px), (hover: none) and (pointer: coarse){
	.ad-rail,
	.rail-left,
	.rail-right,
	.ads-rail,
	.ads-rail-top,
	.ads-rail-bottom { display:none !important; }
	.rail-160x600 { display:none !important; }
	.ads-rail-placeholder,
	.ad-rail-placeholder,
	.ads--reserve-rail,
	.ads-reserve-top,
	.ads-reserve-bottom { display:none !important; height:0 !important; min-height:0 !important; margin:0 !important; padding:0 !important; }
	/* Defensive: if page-shell rail classes appear, remove margins */
	.has-rails .page-main,
	.has-rails-left .page-main,
	.has-rails-right .page-main { margin-left:0 !important; margin-right:0 !important; }
}

/* --- Mirror main site top/bottom ad placement/centering --- */
/* Ensure the blog topbar ad is centered like the main site */
.ad-topbar{position:relative !important;top:auto !important;margin-top:0;background:transparent}
.ad-topbar > .ad-slot{max-width:1100px;margin:0 auto !important;padding:0 18px;text-align:center}
.ad-topbar .adsbygoogle,
.ad-topbar iframe{display:block;margin:0 !important}
.ad-topbar ~ main{margin-top:0 !important}

/* Footer/top bottom wrapper centering and reserves */
.ad-block-bottom{display:block;width:100%;padding-top:8px;padding-bottom:8px}
.site-footer .ad-slot{margin:12px auto}

/* Contain any AdSense-injected absolute positioning on desktop/tablet */
@media (min-width:641px){
	.ad-topbar div[id^="aswift_"],
	.ad-topbar div[id$="_host"],
	.ad-topbar iframe[id^="aswift_"],
	.ad-topbar ins.adsbygoogle,
	.ad-topbar .adsbygoogle {
		position: static !important;
		left: auto !important;
		right: auto !important;
		width: 100% !important;
		max-width: 1100px !important;
		margin: 0 auto !important;
		transform: none !important;
	}
	.ad-topbar [style*="position:absolute"]{ position: static !important; left: auto !important; right: auto !important }
}

/* Reserve heights for top/bottom slots to avoid CLS on blog pages */
.ad-slot--top{min-height:90px;width:100%}
.ad-slot--bottom{min-height:90px}
