/*
Theme Name: Phrasehaven — PB-D01
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aen-pb-d-01-phrasehaven
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

:root{--ph-ink:var(--wp--preset--color--text);--ph-paper:var(--wp--preset--color--surface);--ph-canvas:var(--wp--preset--color--background);--ph-accent:var(--wp--preset--color--primary);--ph-line:var(--wp--preset--color--line);--ph-muted:var(--wp--preset--color--muted);--ph-soft:var(--wp--preset--color--soft)}
*{box-sizing:border-box}body{margin:0;background:var(--ph-canvas);color:var(--ph-ink)}
a{text-decoration:none;color:inherit}a:hover{color:var(--ph-accent)}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--ph-accent);outline-offset:4px}
img{max-width:100%;height:auto}button,input,textarea{font:inherit}button,summary{cursor:pointer}h1,h2,h3{overflow-wrap:anywhere}p{overflow-wrap:break-word}.wp-site-blocks main.ph-main{padding-block:0 36px}.ph-shell{max-width:1320px;margin-inline:auto;padding-inline:0}
.ph-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.ph-header{background:var(--ph-paper);border-bottom:1px solid var(--ph-line);position:relative;z-index:30}.ph-header-inner{min-height:96px;gap:22px;padding-block:16px}.ph-brand{flex-shrink:0;gap:10px}.ph-brand .wp-block-site-title{font-size:29px;font-weight:800;line-height:1.15;white-space:nowrap;margin:0}.ph-brand .custom-logo{width:36px;height:36px;object-fit:contain}.ph-brand .wp-block-site-logo{line-height:1}
.ph-header .aen-primary-navigation{margin-left:auto;font-size:14px;font-weight:700}.ph-header .wp-block-navigation__container{gap:22px}.ph-header .aen-menu-brand,.ph-header .aen-menu-meta{display:none}.ph-header .wp-block-navigation-item__content{padding-block:9px;white-space:nowrap}.ph-header .wp-block-navigation-item__content:hover{color:var(--ph-accent)}
.ph-controls{display:flex;gap:8px;align-items:center;margin:0!important}.ph-controls button,.ph-controls summary{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--ph-line);color:var(--ph-ink);background:var(--ph-paper);padding:8px;list-style:none}.ph-header-search summary{color:#fff;background:var(--ph-accent);border-color:var(--ph-accent)}.ph-header-search summary::-webkit-details-marker{display:none}.ph-header-search[open] summary{box-shadow:0 0 0 3px var(--ph-soft)}.ph-search-panel{position:absolute;right:max(24px,calc((100vw - 1320px)/2));top:calc(100% + 8px);background:var(--ph-paper);width:min(400px,calc(100vw - 40px));padding:20px;border:1px solid var(--ph-line);border-radius:14px;box-shadow:0 8px 22px #173f3912}.ph-search-panel label{font-size:14px;font-weight:700;margin-bottom:8px}
.ph-stories{display:flex;align-items:stretch;border:1px solid var(--ph-line);border-radius:8px;background:var(--ph-paper);margin-block:20px!important;min-width:0;overflow:hidden;min-height:44px}.ph-stories>span{display:flex;align-items:center;background:var(--ph-accent);color:#fff;padding:8px 16px;font-size:14px;font-weight:750;white-space:nowrap}.ph-stories nav{display:flex;gap:28px;overflow-x:auto;align-items:center;scrollbar-width:thin;padding:8px 18px;min-width:0}.ph-stories nav a{white-space:nowrap;font-size:13px;font-weight:700;max-width:480px;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}
.ph-lead{display:grid;grid-template-columns:1fr 1.1fr;align-items:center;gap:30px;padding:30px;background:var(--ph-paper);border-radius:22px;box-shadow:0 8px 24px #173f390b;margin:0 0 44px!important}.ph-lead-cover{display:block;min-width:0}.ph-lead-cover>img,.ph-cover-empty{width:100%;aspect-ratio:1.9;object-fit:cover;border-radius:18px;display:block;background:var(--ph-line)}.ph-cover-empty{display:grid;place-items:center;color:var(--ph-muted)}.ph-cover-empty svg{width:56px;height:56px;opacity:.6}.ph-lead h2{font-size:26px;line-height:1.3;margin:14px 0}.ph-lead p{margin:12px 0 20px}.ph-lead-copy{min-width:0}.ph-category,.ph-reading .wp-block-post-terms a{font-size:13px;font-weight:750;color:var(--ph-accent);background:var(--ph-soft);padding:5px 12px;border-radius:20px;display:inline-block}.ph-continue{font-size:14px;font-weight:700}.ph-lead .ph-meta{margin-top:20px}
.ph-layout{display:grid!important;grid-template-columns:minmax(0,2.3fr) minmax(260px,1fr)!important;gap:30px;align-items:start}.ph-layout>*{min-width:0;margin:0!important}.ph-main>.ph-shell{padding:28px 0 0}.home .ph-main>.ph-shell{padding-top:0}.ph-reading .wp-block-post-template{display:grid;gap:24px}.ph-reading .wp-block-post-template>li{margin:0!important}.is-style-phrasehaven-sheet,.ph-widget{background:var(--ph-paper);border-radius:20px;padding:30px;box-shadow:0 7px 20px #173f3909}.ph-reading .wp-block-post-terms{margin-bottom:14px;font-size:0;line-height:1.7}.ph-reading .wp-block-post-terms a{font-size:12px;margin:0 6px 6px 0}.ph-reading .wp-block-post-title{font-size:26px;line-height:1.35;margin:0 0 12px}.ph-reading .wp-block-post-excerpt{margin:0 0 16px}.ph-reading .wp-block-post-excerpt__excerpt{margin:0}.ph-reading .wp-block-post-excerpt__more-text{margin-block:12px 0}.ph-reading .wp-block-post-excerpt__more-link{font-size:14px;font-weight:650}
.ph-meta{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:650;line-height:1.4;flex-wrap:wrap;color:var(--ph-muted);margin:20px 0 0}.ph-author{display:inline-flex;align-items:center;gap:8px}.ph-author img{width:30px;height:30px;border-radius:50%}.ph-meta>span[aria-hidden]{color:var(--ph-accent)}
.ph-sidebar{display:grid;gap:24px}.ph-widget h2{font-size:24px;line-height:1.25;margin:0 0 24px;display:flex;align-items:center;gap:12px}.ph-widget h2:after{content:"";height:1px;background:var(--ph-line);flex:1;border-left:9px solid var(--ph-accent)}.ph-widget ul{list-style:none;padding:0;margin:0}.ph-widget li{padding-block:16px;border-bottom:1px solid var(--ph-line);font-size:16px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}.ph-widget li:first-child{padding-top:0}.ph-widget li:last-child{border:0;padding-bottom:0}.ph-widget p{font-size:14px;color:var(--ph-muted);margin:0}.wp-block-search__inside-wrapper{gap:10px}.wp-block-search__input{border:1px solid var(--ph-line);border-radius:8px;background:var(--ph-paper);min-width:0;color:var(--ph-ink);padding:10px;width:100%}.wp-block-search__button{border-radius:8px;border:0;background:var(--ph-accent);color:#fff;padding:10px 18px;min-height:44px;font-size:14px;font-weight:700;margin-left:0}
.ph-breadcrumb{background:var(--ph-soft);font-size:13px;color:var(--ph-muted);padding:13px max(24px,calc((100vw - 1320px)/2));display:flex;gap:10px;align-items:center}.ph-breadcrumb>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ph-archive-title{padding:0 0 22px}.ph-archive-title h1{font-size:32px;line-height:1.25;margin:0}.ph-archive-title .wp-block-term-description{font-size:15px}.ph-single .wp-block-post-title,.ph-page .wp-block-post-title{font-size:40px;line-height:1.3}.ph-single .ph-meta{margin:20px 0 30px}.ph-single .wp-block-post-content,.ph-page .wp-block-post-content{line-height:1.85}.ph-single .wp-block-post-content h2,.ph-page .wp-block-post-content h2{font-size:27px;margin-block:30px 16px}.ph-single .wp-block-post-content h3{font-size:22px}.ph-single .wp-block-post-content img{border-radius:8px}.ph-single .wp-block-post-content figure{margin-inline:0}.ph-single .wp-block-post-content>*{max-width:100%}.ph-adjacent{display:grid;grid-template-columns:1fr 1fr;gap:24px;border-block:1px solid var(--ph-line);padding-block:24px;font-size:15px;font-weight:650;margin-block:32px}.ph-adjacent>:last-child{text-align:right}
.ph-comment{margin-top:32px}.ph-comment h2{font-size:26px}.ph-comment>p{font-size:14px;color:var(--ph-muted)}.ph-demo-comment label{display:block;font-size:14px;margin-bottom:6px;font-weight:650}.ph-demo-comment input:not([type=checkbox]),.ph-demo-comment textarea{width:100%;border:1px solid var(--ph-line);border-radius:8px;padding:12px;background:var(--ph-paper);color:var(--ph-ink)}.ph-demo-comment textarea{resize:vertical}.ph-form-row{display:grid;grid-template-columns:1fr 1fr;gap:20px}.ph-form-row p{margin-top:0}.ph-consent{display:flex;align-items:start;gap:8px}.ph-consent input{margin-top:7px}.ph-consent label{font-size:13px;font-weight:400}.ph-demo-comment button{min-height:44px;border:0;cursor:pointer}.ph-demo-comment [role=status]{color:var(--ph-accent);font-size:15px;font-weight:650}.ph-demo-comment button:disabled{opacity:.65;cursor:not-allowed}
.ph-query .wp-block-query-pagination{margin-top:30px;gap:10px;font-size:14px}.ph-query .page-numbers,.ph-query .wp-block-query-pagination-previous,.ph-query .wp-block-query-pagination-next{padding:8px 14px;background:var(--ph-paper);border:1px solid var(--ph-line);border-radius:7px}.ph-query .page-numbers.current{background:var(--ph-accent);color:#fff}.ph-footer{background:var(--ph-paper);border-top:1px solid var(--ph-line);font-size:13px;padding:24px}.ph-footer-inner{max-width:1320px;margin:auto;display:flex;justify-content:center;align-items:center;gap:20px;flex-wrap:wrap}.ph-footer p{margin:0}.ph-footer a{color:var(--ph-accent)}
.aen-back-to-top{position:fixed;bottom:24px;right:24px;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:var(--ph-paper);border:1px solid var(--ph-line);color:var(--ph-ink);box-shadow:0 3px 12px #173f3912;z-index:25}.aen-back-to-top[hidden]{display:none}.ph-error{min-height:calc(100vh - 96px);text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 24px!important;gap:24px}.ph-error .ph-error-code{font-size:clamp(130px,22vw,290px);line-height:.9;color:var(--ph-line);margin:0;font-weight:850}.ph-error h2{font-size:36px;margin:-100px 0 74px;position:relative}.ph-error p{max-width:440px;margin:0}.ph-error .wp-block-search{width:min(360px,100%)}.ph-error .wp-block-buttons{margin-top:20px}.ph-error .wp-block-search__inside-wrapper{border-radius:30px;background:var(--ph-paper);padding:5px;border:1px solid var(--ph-line)}.ph-error .wp-block-search__input{border:0;background:transparent}.ph-error .wp-block-search__button{border-radius:50%;padding:8px;width:40px;min-height:40px}.ph-dark{--ph-ink:#e3eee7;--ph-paper:#1c302b;--ph-canvas:#13251f;--ph-line:#3d5248;--ph-muted:#b2c4b9;--ph-soft:#274a3d;--ph-accent:#74c3aa}.ph-dark .ph-header-search summary,.ph-dark .wp-element-button,.ph-dark .wp-block-search__button{color:#13251f}
@media(max-width:1100px){.ph-header .wp-block-navigation__container{gap:14px}.ph-header .aen-primary-navigation{font-size:12px}.ph-brand .wp-block-site-title{font-size:25px}.ph-header-inner{gap:15px}.ph-layout{grid-template-columns:minmax(0,2fr) minmax(240px,1fr)!important;gap:24px}.ph-widget{padding:24px}.ph-single .wp-block-post-title{font-size:35px}}
@media(max-width:781px){.ph-shell{padding-inline:24px}.ph-main>.ph-shell{padding:24px 24px 0}.home .ph-main>.ph-shell{padding-top:0}.ph-header-inner{min-height:84px;padding-block:16px}.ph-brand .wp-block-site-title{font-size:24px}.ph-brand .custom-logo{width:30px;height:30px}.ph-brand{gap:8px}.ph-header .aen-primary-navigation{order:3;margin-left:0;position:static}.ph-controls{order:2;margin-left:auto!important}.ph-controls button,.ph-controls summary{width:34px;height:34px;padding:7px}.ph-theme-toggle{display:none!important}.ph-header .wp-block-navigation__responsive-container-open{display:flex!important;min-width:40px;min-height:40px;align-items:center;justify-content:center}.ph-header .wp-block-navigation__responsive-container:not(.is-menu-open){display:none!important}.ph-header .wp-block-navigation__responsive-container.is-menu-open{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;background:var(--ph-paper)!important;color:var(--ph-ink)!important;padding:25px 0;overflow:auto}.ph-header .wp-block-navigation__responsive-dialog{width:100%}.ph-header .wp-block-navigation__responsive-container-close{right:24px;top:0;min-width:44px;min-height:44px}.ph-header .is-menu-open .wp-block-navigation__responsive-container-content{align-items:stretch;padding-top:0;gap:0}.ph-header .is-menu-open .aen-menu-brand{display:block;padding:0 75px 24px 26px}.aen-menu-home{font-size:25px;font-weight:800;display:flex;gap:8px;align-items:center}.aen-menu-logo{display:none}.aen-menu-heading{display:none}.ph-header .is-menu-open .wp-block-navigation__container{width:100%;align-items:stretch!important;gap:0}.ph-header .is-menu-open .wp-block-navigation-item{width:100%;border-top:1px solid var(--ph-line);margin:0}.ph-header .is-menu-open .wp-block-navigation-item__content{padding:13px 26px!important;font-size:15px;text-align:left;width:100%}.ph-stories{margin-block:16px!important;min-height:38px}.ph-stories>span{font-size:12px;padding:7px 12px}.ph-stories nav{padding:6px 12px}.ph-stories nav a{font-size:11px;max-width:200px}.ph-lead{grid-template-columns:1fr;gap:20px;padding:18px;margin-bottom:28px!important;border-radius:20px}.ph-lead-cover>img,.ph-cover-empty{aspect-ratio:1.3;border-radius:17px}.ph-lead h2{font-size:22px;line-height:1.3;margin-block:12px}.ph-lead p{font-size:15px;line-height:1.7}.ph-lead .ph-meta{font-size:11px}.ph-layout{grid-template-columns:minmax(0,1fr)!important;gap:28px}.is-style-phrasehaven-sheet,.ph-widget{padding:22px;border-radius:18px}.ph-reading .wp-block-post-title{font-size:23px}.ph-reading .wp-block-post-excerpt{font-size:15px;line-height:1.75}.ph-widget h2{font-size:23px}.ph-single .wp-block-post-title,.ph-page .wp-block-post-title{font-size:30px}.ph-single .wp-block-post-content,.ph-page .wp-block-post-content{font-size:16px}.ph-single .wp-block-post-content h2,.ph-page .wp-block-post-content h2{font-size:24px}.ph-form-row{grid-template-columns:1fr;gap:0}.ph-breadcrumb{padding-inline:24px;font-size:12px}.ph-error{min-height:calc(100vh - 84px)}.ph-error h2{font-size:27px;margin-top:-65px;margin-bottom:40px}.ph-footer-inner{gap:8px;text-align:center}.ph-search-panel{right:20px}.aen-back-to-top{right:18px;bottom:18px}}
@media(max-width:380px){.ph-brand .wp-block-site-title{font-size:21px}.ph-brand .custom-logo{width:26px;height:26px}.ph-header-inner{gap:8px}.ph-shell,.ph-main>.ph-shell{padding-inline:18px}.ph-lead h2{font-size:21px}.ph-single .wp-block-post-title{font-size:28px}}
.ph-main>.ph-shell{margin-block-start:0}.ph-category-row{margin-bottom:14px}.ph-category-row .ph-category{font-size:12px}.ph-controls>.ph-theme-toggle{flex-shrink:0}.ph-search-panel .wp-block-search__button{border-radius:8px;background:var(--ph-accent);color:#fff;width:auto;height:auto;min-width:44px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
