/* Real render dimensions stay available to the provider while empty ads
   consume no space in the document. Only a loaded creative opens the slot. */
.hp-ad-fit-content{position:relative;display:flow-root;width:100%;max-width:none!important;max-height:none!important;transform-origin:0 0!important}
.hp-ad-fit-content[data-hp-ad-sized="1"]>[data-type="_mgwidget"]{min-height:100%}
.hp-ad-slot[data-hp-ad-fit="1"]{position:relative;min-height:0!important}
.hp-ad-slot[data-hp-ad-fit="1"]>.hp-ad-fit-content{position:absolute;top:0;left:0}

.hp-ad-shell:is([data-viewport-ad],[data-reader-ad]){position:relative;display:block;min-height:0}
.hp-ad-shell:is([data-viewport-ad],[data-reader-ad]):not([data-hp-ad-filled="1"]){height:0!important;min-height:0!important;margin:0!important;padding-block:0!important;border:0!important;overflow:visible;pointer-events:none}
.hp-ad-shell:is([data-viewport-ad],[data-reader-ad]):not([data-hp-ad-filled="1"])>.hp-ad-slot{position:absolute!important;top:0;left:0;width:100%;display:block;height:auto!important;min-height:var(--hp-ad-stage-height,250px)!important;overflow:visible;-webkit-mask-image:none!important;mask-image:none!important}
.hp-ad-shell:is([data-viewport-ad],[data-reader-ad]):not([data-hp-ad-filled="1"])>.hp-ad-label{display:none}

/* The measurable stage stays outside document flow until there is a creative.
   Do not mask it: provider visibility checks must see the actual placement. */
.hp-ad-fit-content>[data-type="_mgwidget"],.hp-ad-native-content>[data-type="_mgwidget"]{min-height:250px}
.hp-pattern-reader .hp-pattern-reader__visuals>.hp-ad-shell[data-reader-ad]:not([data-hp-ad-filled="1"]),
.hp-pattern-reader.hp-reader-desktop .hp-pattern-reader__visuals>.hp-ad-shell[data-reader-ad]:not([data-hp-ad-filled="1"]){margin:0!important}

/* Square ad corners, with the caption below and the normal post-card gap. */
.hp-ad-shell[data-viewport-ad]{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.hp-ad-shell[data-viewport-ad]>.hp-ad-slot{position:relative;border-radius:0;overflow:hidden;min-height:0!important}
.hp-ad-shell[data-viewport-ad]>.hp-ad-slot>.hp-ad-fit-content{position:absolute;top:0;left:0}
.pattern-masonry__col>.hp-ad-shell[data-viewport-ad][data-hp-ad-filled="1"]{margin:0 0 var(--hp-masonry-gap,14px)}
.pattern-masonry__col>.hp-ad-shell[data-viewport-ad][data-hp-ad-filled="1"]:last-child{margin-bottom:0}
.hp-ad-shell>.hp-ad-label{position:static;display:block;width:auto;margin:9px 2px 2px;text-align:left;color:var(--hp-muted);font-family:var(--hp-font);font-size:var(--hp-card-meta-size);font-weight:400;line-height:1.42;letter-spacing:normal;text-transform:none}

/* Reader ads stay in normal flow, without theme sizing or scaling. */
.hp-ad-shell[data-reader-ad]>.hp-ad-slot{height:auto;min-height:0!important;overflow:visible}
.hp-ad-native-content{display:flow-root}
.hp-ad-shell[data-reader-ad]:not([data-hp-ad-filled="1"])>.hp-ad-slot{height:auto!important;min-height:250px!important}
.hp-ad-shell[data-reader-ad]>.hp-ad-label{text-align:center;margin-inline:0}

/* Excluded devices keep the ad template inert and take no document space. */
html[data-hp-ad-device="phone"] .hp-ad-shell[data-hp-ad-devices]:not([data-hp-ad-devices~="phone"]),
html[data-hp-ad-device="tablet"] .hp-ad-shell[data-hp-ad-devices]:not([data-hp-ad-devices~="tablet"]),
html[data-hp-ad-device="desktop"] .hp-ad-shell[data-hp-ad-devices]:not([data-hp-ad-devices~="desktop"]){display:none!important}
/* Include provider wrappers and images: squaring just the outside slot was
   insufficient when the widget itself supplied rounded corners. */
.hp-ad-shell[data-viewport-ad],
.hp-ad-shell[data-viewport-ad]>.hp-ad-slot,
.hp-ad-shell[data-viewport-ad]>.hp-ad-slot *,
.hp-ad-shell[data-viewport-ad]>.hp-ad-slot *::before,
.hp-ad-shell[data-viewport-ad]>.hp-ad-slot *::after{border-radius:0!important}
.hp-ad-shell[data-viewport-ad]>.hp-ad-slot :is(img,picture,iframe){clip-path:none!important}

/* Below the menu: no reserved gap until a creative has actually rendered. */
.hp-below-menu-ads{--hp-below-menu-ad-gap:16px}
/* v0.5.249: move displayed menu ads down 5px without moving page content. */
.hp-below-menu-ads>.hp-ad-shell[data-hp-ad-filled="1"]{position:relative;top:5px;margin:var(--hp-below-menu-ad-gap) auto 0;max-width:100%}
.hp-below-menu-ads .hp-ad-slot{margin-inline:auto}
.hp-below-menu-ads .hp-ad-label{text-align:center}
/* Use the same outer gap above and below a displayed ad, outside article zoom. */
.hp-below-menu-ads:has(>.hp-ad-shell[data-hp-ad-filled="1"]){margin-bottom:var(--hp-below-menu-ad-gap)}
.hp-below-menu-ads:has(>.hp-ad-shell[data-hp-ad-filled="1"])+.site-main{padding-top:0!important}
body.hp-saved-document>.hp-below-menu-ads{display:none!important}

/* Filled MGID image placements: exactly 66px of black above and below.
   Loading/empty units retain their existing zero-height behavior. */
body .hp-pattern-reader .hp-pattern-reader__visuals>.hp-ad-shell[data-reader-ad][data-hp-ad-filled="1"]{
 box-sizing:border-box;margin-block:0!important;padding-block:66px!important;background:#000!important;
}
body .hp-pattern-reader .hp-pattern-reader__visuals>.visual-block:has(+.hp-ad-shell[data-reader-ad][data-hp-ad-filled="1"]),
body .hp-pattern-reader .hp-pattern-reader__visuals>.visual-block:has(+.hp-vf-reader-ad[data-vf-device-hidden]+.hp-ad-shell[data-reader-ad][data-hp-ad-filled="1"]){margin-bottom:0!important}
body .hp-pattern-reader .hp-pattern-reader__visuals>.hp-ad-shell[data-reader-ad][data-hp-ad-filled="1"]+.visual-block{margin-top:0!important}
/* With both networks, the shared black gap belongs to the preceding AdSense
   wrapper, so their two paddings cannot add together above MGID. */
body .hp-pattern-reader .hp-pattern-reader__visuals>.hp-vf-reader-ad:not([data-vf-device-hidden]):has(+.hp-ad-shell[data-reader-ad][data-hp-ad-filled="1"]){min-height:0!important;padding-bottom:88px!important}
body .hp-pattern-reader .hp-pattern-reader__visuals>.hp-vf-reader-ad:not([data-vf-device-hidden])+.hp-ad-shell[data-reader-ad][data-hp-ad-filled="1"]{padding-top:0!important}
