/* HD Advertising 1.6.0. Uses the theme's variables where it has them. */
.hd-adv { margin: 1.5rem auto; text-align: center; }
.hd-adv[hidden] { display: none; }
.hd-adv__label { margin: 0 0 .35rem; font: 600 .7rem/1.2 var(--ui, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint, #777); }
.hd-adv__preview { display: inline-block; white-space: nowrap; margin-left: .5rem; padding: .1rem .45rem; border-radius: 999px; background: #fff4e5; color: #8a4b00; letter-spacing: 0; text-transform: none; font-weight: 500; }
.hd-adv__stage { display: flex; justify-content: center; }
.hd-adv__shown, .hd-adv__ad { display: block; width: min(100%, calc(var(--hd-adv-w, 728) * 1px)); max-width: 100%; line-height: 0; }
.hd-adv__img, .hd-adv picture img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.hd-adv__ad:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* An empty slot, for editors only. */
.hd-adv__empty {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
	box-sizing: border-box; width: 100%; max-width: calc(var(--hd-adv-w) * 1px);
	aspect-ratio: var(--hd-adv-w) / var(--hd-adv-h); min-height: 72px; margin: 0 auto; padding: .5rem;
	border: 2px dashed var(--line, #c9c9c9); border-radius: 6px; background: rgba(0,0,0,.02);
	font: .85rem/1.3 var(--ui, system-ui, sans-serif); color: var(--ink-faint, #666);
}
.hd-adv__empty strong { color: inherit; }
.hd-adv__empty a { font-weight: 600; }

.hd-adv--horizontal .hd-adv__stage { min-height: 50px; }

/* Modern sizes fill their column edge to edge and grow with it; standard-size artwork scales up to fit. */
.hd-adv--modern .hd-adv__stage { display: block; }
.hd-adv--modern .hd-adv__shown, .hd-adv--modern .hd-adv__ad { width: 100%; }
.hd-adv--modern picture { display: block; }
.hd-adv--modern .hd-adv__img, .hd-adv--modern picture img { width: 100%; height: auto; }
.hd-adv--modern .hd-adv__empty { max-width: none; }

/* Inside a story and after a story or page's text (Placement): never wider than the position itself, centered. */
.hd-adv--in-story, .hd-adv--after-text { width: 100%; max-width: calc(var(--hd-adv-w, 728) * 1px); margin: 2rem auto; }
.hd-adv--in-story { clear: both; }

@media print { .hd-adv { display: none !important; } }
