/* AdSense spots (inc/ads.php). Loaded only on pages where ads may show.
   Label: "Advertisement" in small mono with a hairline after it. Before the ad
   loads the slot is a dashed panel holding its height, so the page doesn't jump. */
.ad{margin:30px 0; clear:both;}
.ad-lab{display:flex; align-items:center; gap:12px; margin:0 0 8px; font:500 10.5px/1.4 var(--mono,'DM Mono',ui-monospace,monospace); letter-spacing:.14em; text-transform:uppercase; color:var(--mute,#5A4D66);}
.ad-lab::after{content:""; flex:1; height:1px; background:var(--line,#B9B1A4);}
.ad .slot{min-height:250px; background:var(--panel,#F1EEE6); border:1px dashed var(--line,#B9B1A4); border-radius:2px; overflow:hidden;}
.ad .slot ins{display:block; width:100%;}
.ad .slot:has(ins[data-ad-status="filled"]){background:transparent; border-color:transparent;}
/* An unfilled slot leaves no empty box behind. */
.ad:has(ins[data-ad-status="unfilled"]){display:none;}

/* In-article: between H2 sections of a post. */
.ad--inarticle .slot{min-height:280px;}
@media (max-width:600px){ .ad--inarticle .slot{min-height:250px;} }

/* End of post. */
.ad--end{margin-top:36px;}
.ad--end .slot{min-height:250px;}

/* In-feed: one card's width in a post grid, 16:9 like a post card; a full row in lists. */
.lx-grid > .ad--feed{margin:0; display:flex; flex-direction:column;}
.lx-grid > .ad--feed .slot{flex:1; min-height:0; aspect-ratio:16/9;}
.lxs-list > .ad--feed{margin:14px 0;}
.lxs-list > .ad--feed .slot{min-height:120px;}

/* Row: between sections on subject pages, the glossary, home, free chart results. */
.ad--row .slot{min-height:120px;}
.sheet main > .ad--row,.content > .ad--row{margin:26px clamp(18px,4vw,46px);}
.gloss > .ad--row{grid-column:1 / -1; margin:6px 0;}
.gloss.is-filtered > .ad--row{display:none;}

/* Sidebar: bottom of the almanac sidebar, 160×600, dark to match it. Hidden
   where the sidebar is narrower than the unit or not shown at all. */
.ad--sidebar{margin:18px 0 0;}
.ad--sidebar .ad-lab{color:rgba(237,231,255,.55);}
.ad--sidebar .ad-lab::after{background:#3A2C52;}
.ad--sidebar .slot{width:160px; min-height:600px; margin:0 auto; background:#241838; border:1px dashed #3A2C52;}
@media (max-width:1100px){ .ad--sidebar{display:none;} }

@media print{ .ad{display:none !important;} }
