/* Local PB alignment. Original per-package desktop width and design remain authoritative. */
body.aen-pb-local{--aen-local-frame:94vw}
html body.aen-pb-local .wp-site-blocks :is(.aen-r3-header-shell,.aen-r3-footer-shell),
html body.aen-pb-local .wp-site-blocks>main,
html body.aen-pb-local .wp-site-blocks>.aen-pb-reading-layout{width:var(--aen-local-frame)!important;max-width:none!important;min-width:0!important;margin-inline:auto!important;padding-inline:0!important;box-sizing:border-box!important}
html body.aen-pb-local .wp-site-blocks main main,
html body.aen-pb-local .wp-site-blocks .aen-pb-reading-body main{width:100%!important;max-width:none!important;margin-inline:0!important;padding-inline:0!important}
html body.aen-pb-local:is(.single-post,.page) .wp-site-blocks :is(.aen-r3-reading-column,.aen-pb-reading-body,.pack-page-body,.pack-page-heading,.volt-page-heading,.volt-article-heading,.pbv-article-header,.ph-reading,.pb-reading,.v-reading,.v-reading-main,.v-reading-sheet,.sy-main-column,.sy-single-card,.tm-reading-panel,.rf-reading,.wr-reading,.wl-reading,.pbv-reading,.volt-reading){width:100%!important;max-width:none!important;min-width:0!important;margin-inline:0!important;padding-inline:0!important;box-sizing:border-box!important}
html body.aen-pb-local:is(.single-post,.page) .wp-site-blocks main .wp-block-post-content{width:100%!important;max-width:none!important;min-width:0!important;margin-inline:0!important;box-sizing:border-box!important}
html body.aen-pb-local:is(.single-post,.page) .wp-site-blocks main .wp-block-post-content>:is(p,ul,ol,blockquote,h2,h3,h4){width:auto!important;max-width:100%!important;margin-inline:0!important;word-break:normal!important;overflow-wrap:break-word!important;hyphens:manual!important}
html body.aen-pb-local .wp-site-blocks .aen-pb-reading-body :is(.aen-r3-reading-layout,.wire-story-layout,.pbv-reading-layout,.pb-reading-layout,.v-reading-layout){display:block!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:none!important;min-width:0!important;margin-inline:0!important}
html body.aen-pb-local .wp-site-blocks .aen-pb-reading-body .aen-r3-aside{float:none;width:100%;margin-left:0!important}
html body.aen-pb-local.aen-pb-reading-clean .wp-site-blocks .aen-r3-reading-layout{display:block!important}
html body.aen-pb-local .wp-site-blocks h1.wp-block-post-title{max-width:100%!important;word-break:normal!important;overflow-wrap:break-word!important;text-wrap:wrap!important;hyphens:manual!important}
html body.aen-pb-local .aen-r3-header-shell .aen-pb-wordmark-brand{flex:0 1 auto!important;min-width:0!important;max-width:100%!important}
html body.aen-pb-local .aen-r3-header-shell .aen-pb-wordmark-logo{width:210px!important;height:auto!important;max-width:100%!important;max-height:64px!important;object-fit:contain!important;object-position:left center}
html body.aen-pb-local .aen-r3-header-shell .aen-pb-wordmark-brand .wp-block-site-logo{width:210px!important;max-width:100%!important;flex:0 1 auto!important}
html body.aen-pb-local .aen-r3-header-shell .aen-pb-current-category{box-shadow:inset 0 -2px currentColor;text-decoration:none!important;font-weight:700}
html body.aen-pb-local .aen-pb-breadcrumb{display:flex;flex-wrap:wrap;align-items:center;gap:.55em;font-size:.875rem;line-height:1.5;margin:0 0 14px!important;padding:0!important;min-height:0;letter-spacing:normal;text-transform:none}
html body.aen-pb-local .aen-pb-breadcrumb a{display:inline;min-height:0;padding:0;background:none;color:inherit;text-decoration:none;font-weight:400}
html body.aen-pb-local .aen-pb-breadcrumb a:hover{text-decoration:underline}
@media(min-width:768px){
 html body.aen-pb-local.aen-pb-reading-active:not(.aen-pb-reading-clean) .wp-site-blocks .aen-pb-reading-layout.aen-pb-reading-layout{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(200px,30%)!important;gap:clamp(24px,4vw,56px)!important}
 html body.aen-pb-local.aen-pb-reading-active:is(.aen-pb-layout-2,.aen-pb-layout-4):not(.aen-pb-reading-clean) .wp-site-blocks .aen-pb-reading-layout.aen-pb-reading-layout{grid-template-columns:minmax(200px,30%) minmax(0,1fr)!important}
 html body.aen-pb-local.aen-pb-reading-active:is(.aen-pb-layout-5,.aen-pb-layout-6,.aen-pb-reading-clean) .wp-site-blocks .aen-pb-reading-layout.aen-pb-reading-layout,
 html body.aen-pb-local.aen-pb-reading-active .wp-site-blocks .aen-pb-reading-layout.aen-pb-reading-layout:not(:has(>.aen-pb-reading-aside)){display:block!important}
}
@media(max-width:767px){
 body.aen-pb-local{--aen-local-frame:calc(100% - 40px)}
 html body.aen-pb-local .aen-r3-header-shell .aen-pb-wordmark-logo,
 html body.aen-pb-local .aen-r3-header-shell .aen-pb-wordmark-brand .wp-block-site-logo{width:160px!important;max-width:100%!important}
 html body.aen-pb-local.aen-pb-reading-active .wp-site-blocks .aen-pb-reading-layout.aen-pb-reading-layout{display:flex!important;flex-direction:column!important;gap:28px!important}
 html body.aen-pb-local.aen-pb-reading-active .wp-site-blocks .aen-pb-reading-layout>.aen-common-wide-heading{order:-1}
 html body.aen-pb-local.aen-pb-reading-active .wp-site-blocks .aen-pb-reading-layout>.aen-pb-reading-body{order:0}
 html body.aen-pb-local.aen-pb-reading-active .wp-site-blocks .aen-pb-reading-layout>.aen-pb-reading-aside{order:1}
}

/* Trust pages must not inherit the previous centred 880px reading-column cap. */
html body.aen-pb-local.aen-pb-reading-active.aen-pb-reading-clean .wp-site-blocks .aen-r3-reading-layout>.aen-r3-reading-column,
html body.aen-pb-local.aen-pb-reading-active.aen-pb-reading-clean .wp-site-blocks .aen-pb-reading-layout>.aen-pb-reading-body,
html body.aen-pb-local.aen-pb-reading-active.aen-pb-reading-clean .wp-site-blocks :is(.vb-layout,.fg-layout,.tm-reading-layout,.wire-story-layout,.rf-layout,.pb-layout,.wl-layout,.sy-layout,.ph-layout,.v-reading-layout,.wr-layout,.pb-reading-layout,.pbv-reading-layout)>:is(main,.aen-r3-reading-column,.tm-reading-panel,.rf-reading,.pb-reading,.wl-reading,.sy-main-column,.ph-reading,.wr-reading,.v-reading,.v-reading-main,.pb-article,.pbv-reading){width:100%!important;max-width:none!important;margin-inline:0!important;min-width:0!important}

/* PB-D01: featured image right; readable white article; menu then copyright. */
@media(min-width:768px){html body.aen-pb-local .ph-lead{grid-template-columns:1.1fr 1fr!important}html body.aen-pb-local .ph-lead-copy{grid-column:1;grid-row:1}html body.aen-pb-local .ph-lead-cover{grid-column:2;grid-row:1}}
html body.aen-pb-local.single-post .wp-site-blocks main article.ph-single.ph-single{background:#fff!important;color:#192f2b;padding:clamp(22px,3vw,44px)!important;box-sizing:border-box!important}
html body.aen-pb-local.single-post .ph-single>.aen-pb-breadcrumb{margin:28px 0 14px!important;padding-top:20px!important;border-top:1px solid #dce7e3}
html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner{display:flex!important;flex-wrap:wrap!important;justify-content:space-between!important;align-items:center!important;gap:18px 30px!important}
html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner>p{margin:0!important;text-align:right}
@media(max-width:767px){html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner{align-items:flex-start!important;flex-direction:column!important;gap:16px!important}html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner>p{text-align:left}}
html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner>nav{margin:0!important;min-width:0;max-width:100%}
html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner>nav ul{justify-content:flex-start!important}
@media(min-width:768px){html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(180px,auto)!important}html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner>p{max-width:320px}}
html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-brand{display:flex;align-items:center;gap:12px;min-width:0;text-decoration:none;color:inherit;font-size:24px;font-weight:750;line-height:1.25}
html body.aen-pb-local .ph-footer-brand img{width:auto;height:40px;max-width:160px;object-fit:contain;flex-shrink:0}
html body.aen-pb-local .ph-footer-brand span{overflow-wrap:anywhere}
@media(min-width:768px){html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-inner{grid-template-columns:minmax(170px,1fr) minmax(0,1.2fr) minmax(160px,.8fr)!important}}
@media(max-width:767px){html body.aen-pb-local .wp-site-blocks .aen-r3-footer-shell .ph-footer-brand{font-size:22px;margin-bottom:4px}}

/* Dark posts use the same surfaces and readable ink as the rest of Phrasehaven. */
html.ph-dark body.aen-pb-local.single-post .wp-site-blocks main article.ph-single.ph-single{background:var(--ph-paper)!important;color:var(--ph-ink)}
html.ph-dark body.aen-pb-local.single-post .ph-single>.aen-pb-breadcrumb{border-top-color:var(--ph-line)}
html.ph-dark body.aen-pb-local.single-post .ph-single .wp-block-post-content{--vf-line:var(--ph-line);--vf-accent:var(--ph-accent)}
html.ph-dark body.aen-pb-local.single-post .ph-single .wp-block-post-content a:not(.wp-element-button):not([class*=button]):not([class*=btn]){color:var(--ph-accent)}
html.ph-dark body.aen-pb-local.single-post .ph-single .wp-block-post-content :is(thead th,thead td,tbody>tr>th,table:not(:has(thead))>tbody>tr:first-child>td:has(>strong:only-child)){background:var(--ph-soft)}
html.ph-dark body.aen-pb-local.single-post .ph-single :is(.wp-element-button,button[type=submit],input[type=submit]){background:var(--ph-accent);color:var(--ph-canvas)}
