/* The article side of the directory: the app's own stylesheets (loaded first, from the chrome) give the tokens, type, panels,
   chips and buttons; this file only lays out what WordPress adds — the article, its sidebar, listings and the estate's ad,
   AAWP and widget contracts. Colours come only from the app's tokens (--bg, --surface, --surface-2, --ink, --muted, --line,
   --brand, --brand-ink, --accent), so light and dark follow the directory. */
:root {
	/* the estate's colour contracts — each site's ym-monetize theme-bridge.php maps them to the OLD theme's tokens (printed at
	   wp_head 3); this file prints later, so these win and the Phase 1 strip and the AAWP boxes take the directory's colours */
	--ym-p1-display: var(--font-display);
	--ym-p1-text: var(--font-text);
	--ym-p1-panel: var(--surface);
	--ym-p1-paper: var(--surface-2);
	--ym-p1-ink: var(--ink);
	--ym-p1-muted: var(--muted);
	--ym-p1-rule: var(--line);
	--ym-p1-rule-dark: var(--ink);
	--ym-p1-label: var(--accent);
	--ym-p1-blue: var(--brand);
	--ym-p1-amber: var(--accent);
	--ym-p1-violet: var(--accent);
	--ym-aawp-label: var(--accent);
	--ym-aawp-link: var(--brand);
	--ym-aawp-surface: var(--surface);
	--ym-aawp-panel: var(--surface-2);
	--ym-aawp-ink: var(--ink);
	--ym-aawp-muted: var(--muted);
	--ym-aawp-line: var(--line);
	--ym-aawp-line-soft: var(--line);
	--ym-latest-ink: var(--ink);
	--ym-latest-muted: var(--muted);
	--ym-latest-border: var(--line);
}
body { overflow-x: clip; }
/* a widget or plugin that prints a picture with no source (APS brand logos) shows nothing, not a broken-image icon */
img[src=""], img:not([src]):not([srcset]) { display: none; }
/* Ad Inserter "Header" block anchor (selector: main#main > article > header) */
.pdt-adslot { display: block; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.pdt-post { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 32px; align-items: start; padding: 4px 0 24px; }
.pdt-post--full { grid-template-columns: minmax(0, 860px); justify-content: center; }
.pdt-col { min-width: 0; }
.pdt-paper { padding: clamp(18px, 3.2vw, 40px); overflow: clip; }
.pdt-head { margin-bottom: 16px; display: grid; gap: 10px; justify-items: start; }
.pdt-head h1 { margin: 0; font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.6rem); text-wrap: balance; }
.pdt-byline { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-weight: 600; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius); }
.pdt-byline a { color: var(--ink); }
.pdt-hero { margin: 0 0 22px; }
.pdt-hero img { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; }
.entry-content { font-size: 1.06rem; line-height: 1.75; color: var(--ink); }
.entry-content > * { max-width: 100%; }
.entry-content h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.55rem); margin: 1.7em 0 .6em; }
.entry-content h3 { font-size: 1.2rem; margin: 1.5em 0 .5em; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.1em; }
.entry-content li { margin-bottom: .35em; }
.entry-content a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.entry-content img { display: block; margin-left: auto; margin-right: auto; height: auto; border-radius: var(--radius); }
.entry-content .alignleft { float: left; margin: 0 1em 1em 0; } .entry-content .alignright { float: right; margin: 0 0 1em 1em; }
.entry-content figure { margin: 1.4em 0; } .entry-content figcaption { font-size: .86rem; color: var(--muted); text-align: center; margin-top: 6px; }
.entry-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); color: var(--muted); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .96rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content pre { overflow-x: auto; background: var(--surface-2); padding: 14px; border-radius: var(--radius); font-size: .9rem; }
.entry-content code { font-family: var(--font-mono); font-size: .88em; }
.entry-content iframe, .entry-content embed, .entry-content video { max-width: 100%; }
.pdt-tags { margin-top: 24px; }
.pdt-hop { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.pdt-hop a { display: grid; gap: 4px; padding: 14px 16px; color: var(--ink); }
.pdt-hop a:hover { border-color: var(--brand); color: var(--ink); }
.pdt-hop a.nx { text-align: right; } .pdt-hop strong { line-height: 1.3; }
.pdt-next h2 { margin: 26px 0 14px; }
.pdt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pdt-card { padding: 14px; display: grid; gap: 7px; align-content: start; min-width: 0; }
.pdt-card__pic { display: block; margin: -14px -14px 4px; }
.pdt-card__pic img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; display: block; }
.pdt-card h3 { margin: 0; font-size: 1.04rem; line-height: 1.3; } .pdt-card h3 a { color: var(--ink); } .pdt-card h3 a:hover { color: var(--brand); }
.pdt-card p { margin: 0; }
.pdt-cat { color: var(--brand); font-weight: 700; }
.pdt-archhead { padding: 6px 0 20px; } .pdt-archhead h1 { margin: 0 0 8px; }
.pdt-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 26px 0; }
.pdt-pager .page-numbers { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 650; }
.pdt-pager .page-numbers.current { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.pdt-page { padding-bottom: 24px; }
.pdt-lost { padding-block: 60px; max-width: 720px; }
.pdt-404s { display: flex; gap: 10px; margin: 14px 0; } .pdt-404s .field { flex: 1; min-width: 0; }
.pdt-comments { margin-top: 28px; }
.pdt-comments textarea, .pdt-comments input[type="text"], .pdt-comments input[type="email"], .pdt-comments input[type="url"] { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font: inherit; background: var(--surface); color: var(--ink); }
.pdt-comments .submit { min-height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650; cursor: pointer; }
/* ── sidebar (AdSense custom_html widgets, sticky units, latest-cards MU) ── */
.pdt-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; min-width: 0; }
.pdt-side .widget { min-width: 0; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; }
.pdt-side .widget img, .pdt-side .widget iframe { max-width: 100%; }
.pdt-side .widget-title { font: 700 .74rem/1.3 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.pdt-side .widget ul { list-style: none; margin: 0; padding: 0; } .pdt-side .widget li { padding: 8px 0; border-bottom: 1px solid var(--line); } .pdt-side .widget li:last-child { border-bottom: 0; }
.pdt-side .widget a { color: var(--ink); font-weight: 650; font-size: .94rem; }
/* the estate search keeps its wrapper class (anything that targets it still finds it); the directory's column sets the width */
.pdt-col.ym-srch-wrap { max-width: none; margin: 0; padding: 0; }
.ymsr-media { border-radius: var(--radius-lg); }
.pdt-band { border-top: 1px solid var(--line); background: var(--surface-2); padding: 26px 0; margin-top: 8px; }
.pdt-band-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px; }
.pdt-band-col { min-width: 0; display: grid; gap: 14px; align-content: start; color: var(--ink); font-size: .95rem; line-height: 1.6; }
.pdt-band .widget-title { font: 700 .74rem/1.3 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.pdt-band img { max-width: 100%; height: auto; border-radius: var(--radius); }
.pdt-band a { color: var(--brand); }
.pdt-band ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pdt-side ins.adsbygoogle { display: block; min-height: 250px; }
/* ── AdSense rules carried from the estate's ad contract ── */
.entry-content ins.adsbygoogle { display: block; min-height: 250px; margin: 1.3em 0; }
@media (max-width: 480px) { .entry-content ins.adsbygoogle { min-height: 200px; } }
.pdt-paper ins.adsbygoogle, .pdt-col ins.adsbygoogle, .entry-content ins.adsbygoogle { margin-left: 0 !important; margin-right: 0 !important; max-width: 100% !important; }
.pdt-paper .code-block, .pdt-paper ins.adsbygoogle, .pdt-paper ins.adsbygoogle > div, .pdt-paper [id^="aswift_"][id$="_host"], .pdt-paper [id^="aswift_"][id$="_host"] iframe { width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
.entry-content ins.adsbygoogle, .pdt-side ins.adsbygoogle { overflow: hidden !important; }
.entry-content ins.adsbygoogle iframe, .pdt-side ins.adsbygoogle iframe, .entry-content iframe[width] { max-width: 100% !important; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.pdt-side .widget:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
[class*="adslot"]:not(:has(iframe)):not(:has(img)):not(:has(ins.adsbygoogle iframe)) { background: transparent !important; border: none !important; box-shadow: none !important; min-height: 0 !important; padding: 0 !important; }
[id^="rk-"][id$="-shell"]:not(:has(ins[data-ad-status="filled"])) { display: none !important; }
@media (max-width: 1000px) { .pdt-side .ym-latest-posts-widget, .widget_recent_entries, .ym-sidebar-latest { display: none; } }
/* the estate header-search icon would sit beside the directory's own search box — one search, the directory's */
.ymhs { display: none !important; }
@media (max-width: 1080px) { .pdt-post { grid-template-columns: minmax(0, 1fr); } .pdt-side { max-width: 640px; } }
@media (max-width: 560px) { .pdt-hop { grid-template-columns: minmax(0, 1fr); } .pdt-hop a.nx { text-align: left; } .pdt-paper { padding: 16px; } .pdt-404s { flex-direction: column; } }
/* AdSense auto ads sometimes choose a spot INSIDE the header's rows (a flex row): give such a unit its own full-width line at
   the top of the header instead of letting it split the navigation (it stays visible and where Google put it — no hiding). */
header.hd .wrap.between, header.hd .main-row { flex-wrap: wrap; }
header.hd .google-auto-placed { order: -1; flex: 0 0 100%; width: 100%; margin: 6px 0; }
