/* All new styling is confined to the header; the old header is only hidden after successful setup. */
body.ph-ready #masthead,body.ph-ready .bottom-header-wrapper,body.ph-ready #smobile-menu,body.ph-ready #mobile-menu-overlay{display:none!important}
#ph-shell{position:relative;box-sizing:border-box;isolation:isolate;z-index:1000;width:100%;height:max(var(--ph-white-height,340px),var(--ph-menu-min,340px));background:white;color:#202020;--ph-admin:0px}
#ph-shell.ph-has-image{height:max(var(--ph-image-height,520px),var(--ph-menu-min,340px));background:#202020;color:white}
#ph-shell .ph-image{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center;z-index:-2;margin:0;border:0}
#ph-shell.ph-has-image:after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(110deg,rgba(0,0,0,.45),transparent 50%,rgba(0,0,0,.55))}
#ph-header{position:relative;z-index:1000;color:inherit;font-family:inherit;line-height:1.4;text-align:left;box-sizing:border-box;margin:0;padding:0;border:0}
#ph-header *{box-sizing:border-box}
#ph-header .ph-bar{position:absolute;inset:0 0 auto;background:transparent;color:inherit;min-height:76px;padding:30px 32px}
#ph-header .ph-inner{max-width:1440px;margin:0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:32px}
#ph-header .ph-brand{display:flex;align-items:center;gap:18px;flex:none;color:inherit;text-decoration:none;border:0;line-height:1.15;background:none;box-shadow:none}
#ph-header .ph-logo{height:56px;width:56px;object-fit:contain;max-width:none;max-height:none;margin:0;display:block}
#ph-header .ph-name{font-family:inherit;font-size:clamp(22px,2.2vw,30px);font-weight:400;color:inherit;white-space:nowrap}
#ph-header .ph-nav{padding:0;margin:0;float:none;width:auto;max-width:none;background:transparent}
#ph-header #primary-menu{display:flex;flex-direction:column;align-items:flex-end;gap:0;float:none;margin:0;padding:0;list-style:none;background:transparent;width:auto}
#ph-header #primary-menu li{position:relative;float:none;margin:0;padding:0;list-style:none;background:transparent;border:0;line-height:1.4}
#ph-header #primary-menu>li{display:flex;align-items:center;justify-content:flex-end;min-height:36px}
#ph-header #primary-menu a{font-family:inherit;font-size:18px;font-weight:400;line-height:1.4;padding:4px 0;color:inherit;text-decoration:none;border:0;background:transparent;box-shadow:none;display:inline-block;white-space:normal;overflow-wrap:anywhere}
#ph-header #primary-menu>li>a{white-space:nowrap}
#ph-header #primary-menu a:hover{text-decoration:underline;text-underline-offset:5px}
#ph-header #primary-menu a:after,#ph-header #primary-menu li:before{display:none!important}
#ph-header a:focus-visible,#ph-header button:focus-visible{outline:2px solid currentColor;outline-offset:4px}
#ph-header .ph-sub-toggle,#ph-header .ph-toggle{appearance:none;background:transparent;color:inherit;border:1px solid transparent;border-radius:0;box-shadow:none;min-width:28px;min-height:32px;padding:3px 6px;font:inherit;cursor:pointer;text-transform:none;letter-spacing:normal}
#ph-header .ph-toggle{display:none}
#ph-header #primary-menu ul{position:absolute!important;top:0;right:100%;left:auto!important;display:none!important;visibility:visible!important;opacity:1!important;transform:none!important;min-width:240px;max-width:360px;width:max-content;margin:0;padding:12px 16px;list-style:none;background:#fff;color:#202020;box-shadow:0 4px 20px #0003;z-index:20;max-height:70vh;overflow:visible}
#ph-header #primary-menu .ph-sub-open>ul{display:block!important}
#ph-header #primary-menu ul li{display:block;min-width:200px}
#ph-header #primary-menu ul a{font-size:16px;max-width:280px;padding:7px 30px 7px 0}
#ph-header #primary-menu ul .ph-sub-toggle{position:absolute;right:0;top:3px}
#ph-shell.ph-compact .ph-bar{position:fixed;top:var(--ph-admin);left:0;right:0;min-height:var(--ph-compact-height,76px);height:var(--ph-compact-height,76px);padding:10px 24px;background:#000000;color:white;box-shadow:0 1px 5px #0003;z-index:9990}
#ph-shell.ph-compact .ph-inner{align-items:center;height:100%;gap:22px}
#ph-shell.ph-compact .ph-logo{height:40px;width:40px}
#ph-shell.ph-compact .ph-brand{gap:12px}
#ph-shell.ph-compact .ph-name{font-size:18px}
#ph-shell.ph-compact #primary-menu{flex-direction:row;align-items:center;gap:18px}
#ph-shell.ph-compact #primary-menu>li>a{font-size:16px}
#ph-shell.ph-compact #primary-menu>li>ul{top:100%;right:0}
#ph-shell.ph-compact #primary-menu ul ul{top:0;right:100%}
#ph-shell.ph-mobile{height:var(--ph-compact-height,76px)}
#ph-shell.ph-mobile.ph-has-image{height:max(220px,calc(var(--ph-image-height,520px)*.55))}
#ph-shell.ph-mobile .ph-bar{padding:10px 18px}
#ph-shell.ph-mobile .ph-name{font-size:20px}
#ph-shell.ph-mobile .ph-logo{width:42px;height:42px}
#ph-shell.ph-mobile .ph-toggle{display:block;margin-left:auto}
#ph-shell.ph-mobile .ph-inner{flex-wrap:wrap;gap:10px}
#ph-shell.ph-mobile .ph-nav{display:none;width:100%;max-height:calc(100dvh - var(--ph-compact-height) - var(--ph-admin) - 12px);overflow:auto;background:#000000;color:#fff;padding:12px 18px}
#ph-shell.ph-mobile.ph-menu-open .ph-nav{display:block}
#ph-shell.ph-mobile #primary-menu{display:block;width:100%}
#ph-shell.ph-mobile #primary-menu>li{display:block;text-align:left;border-bottom:1px solid #ffffff26}
#ph-shell.ph-mobile #primary-menu>li>a{font-size:18px;padding:10px 35px 10px 0;white-space:normal}
#ph-shell.ph-mobile #primary-menu ul{position:static!important;max-width:none;min-width:0;width:auto;box-shadow:none;background:#161616;color:white;padding:5px 15px;max-height:none}
#ph-shell.ph-mobile #primary-menu ul li{min-width:0}
#ph-shell.ph-mobile #primary-menu ul a{max-width:none}
#ph-shell.ph-mobile #primary-menu .ph-sub-toggle{position:absolute;right:0;top:6px}
@media(max-width:420px){#ph-shell.ph-mobile .ph-name{font-size:17px}#ph-shell.ph-mobile .ph-brand{gap:8px}#ph-shell.ph-mobile .ph-logo{width:34px;height:34px}}
@media(prefers-reduced-motion:reduce){#ph-header *{animation:none!important;transition:none!important}}

/* 1.0.2: unified controls and restrained dark navigation panels. */
#ph-header #primary-menu .sub-arrow,
#ph-header #primary-menu .dropdown-toggle,
#ph-header #primary-menu .arrow,
#ph-header #primary-menu a::before,
#ph-header #primary-menu a::after{display:none!important}
#ph-header .ph-sub-toggle{display:inline-flex;align-items:center;justify-content:center;width:24px;min-width:24px;min-height:30px;margin-left:4px;padding:0;border:0;vertical-align:middle}
#ph-header .ph-sub-toggle::before{content:'';display:block;width:6px;height:6px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .55s ease;opacity:.65}
#ph-header .ph-sub-open>.ph-sub-toggle::before{transform:rotate(225deg) translate(-1px,-1px);opacity:1}
#ph-header #primary-menu a{transition:color .45s ease,background-color .45s ease,opacity .45s ease}
#ph-header #primary-menu a:hover{text-decoration:none;color:inherit}
#ph-header #primary-menu>li>a:hover{opacity:.72}
#ph-header #primary-menu ul{background:#101010!important;color:#f2f0eb!important;border:1px solid #ffffff24;border-radius:2px;box-shadow:0 18px 48px #0007;min-width:260px;max-width:min(360px,85vw);padding:10px!important}
#ph-header #primary-menu ul li{color:#f2f0eb;min-width:0}
#ph-header #primary-menu ul a{display:block;color:#f2f0eb!important;font-size:15px!important;font-weight:400;letter-spacing:.01em;line-height:1.5;padding:11px 36px 11px 14px;max-width:none}
#ph-header #primary-menu ul a:hover,#ph-header #primary-menu ul a:focus-visible{background:#ffffff0d;color:#fff!important}
#ph-header #primary-menu ul .ph-sub-toggle{right:7px;top:7px;color:#e8e6e0}
#ph-shell.ph-compact #primary-menu>li>ul{top:100%;right:0}
#ph-shell.ph-mobile #primary-menu ul{box-shadow:none;border:0;border-left:1px solid #ffffff26;border-radius:0;margin:0 0 8px 10px;padding:0 0 0 8px!important;max-width:none;background:#101010!important}
#ph-shell.ph-mobile #primary-menu>li{border-bottom:1px solid #ffffff14}

/* 1.0.3: alignment, lighter brand and measured motion. */
#ph-header .ph-name{font-weight:300}
#ph-shell.ph-compact #primary-menu{gap:22px}
#ph-shell:not(.ph-compact):not(.ph-mobile) .ph-nav{padding-right:30px}
#ph-shell:not(.ph-compact):not(.ph-mobile) #primary-menu>li{position:relative;width:100%;justify-content:flex-end;padding:0;text-align:right}
#ph-shell:not(.ph-compact):not(.ph-mobile) #primary-menu>li>a{margin:0;padding-right:0;text-align:right}
#ph-shell:not(.ph-compact):not(.ph-mobile) #primary-menu>li>.ph-sub-toggle{position:absolute;right:-30px;top:50%;transform:translateY(-50%);margin:0;width:24px}
#ph-header #primary-menu .ph-sub-open>ul{animation:ph-panel-in 650ms cubic-bezier(.22,.48,.2,1)}
#ph-header #primary-menu a[aria-current="page"]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:6px;text-decoration-color:currentColor}
#ph-header #primary-menu ul{border-color:#ffffff1c;box-shadow:0 14px 38px #0005}
@keyframes ph-panel-in{from{opacity:0;translate:0 2px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){#ph-header #primary-menu .ph-sub-open>ul{animation:none!important}}

/* 1.0.5: brand matches navigation size in every header state. */
#ph-header .ph-name{font-size:18px;font-weight:700}
#ph-shell.ph-compact .ph-name{font-size:16px;font-weight:700}
#ph-shell.ph-mobile .ph-name{font-size:18px;font-weight:700}

/* 1.0.6: larger name at page top, compact size preserved on scroll. */
#ph-shell:not(.ph-compact):not(.ph-mobile) .ph-name{font-size:clamp(22px,2.2vw,30px);font-weight:700}

/* 1.0.7: configurable right-hand reading mask; never intercepts input. */
#ph-shell.ph-has-image:after{background:linear-gradient(to left,rgba(0,0,0,var(--ph-mask-opacity,.9)) 0%,rgba(0,0,0,var(--ph-mask-opacity,.9)) var(--ph-mask-solid,20%),transparent 100%) right top / var(--ph-mask-width,40%) 100% no-repeat}

/* 1.0.8: transparent white signet on dark surfaces; original on white. */
#ph-header .ph-logo-pair{display:grid;flex:none}
#ph-header .ph-logo-pair .ph-logo{grid-area:1 / 1;transition:opacity .65s ease;background:transparent;border:0;padding:0}
#ph-header .ph-logo-white{opacity:0}
#ph-shell.ph-has-image .ph-logo-white,#ph-shell.ph-compact .ph-logo-white{opacity:1}
#ph-shell.ph-has-image .ph-has-white-logo .ph-logo-dark,#ph-shell.ph-compact .ph-has-white-logo .ph-logo-dark{opacity:0}

/* 1.0.9: quiet grayscale-to-colour hover, image only. */
#ph-shell.ph-has-image .ph-image{filter:grayscale(100%);transition:filter var(--ph-hover-duration,800ms) ease-in-out}
@media(hover:hover) and (pointer:fine){
 #ph-shell.ph-has-image:hover .ph-image{filter:grayscale(0%)}
}
@media(prefers-reduced-motion:reduce){
 #ph-shell.ph-has-image .ph-image{transition:none}
}

/* Touch: tap image area to toggle colour; keep the configured duration. */
#ph-shell.ph-has-image.ph-image-colour .ph-image{filter:grayscale(0%)}

/* No hero placeholder for posts without a chosen image. */
#ph-shell.ph-compact-only{height:var(--ph-compact-height,64px);background:#000;color:#fff}
