/* Shared UI bridge for the Portal, Core shortcodes, commerce and dialogs.
 * Own presentation only: leave hidden/inert states, grids, reader/editor text,
 * status colours, routes, controls and app navigation to their modules. */
html body.wp-theme-psyguild-theme :is(.psyguild-portal-shell,.psyguild-assessment-app,.psyguild-assessment-auth,.pg-report-credit-panel,.pg-credit-modal,.pg-drive,.pg-post-detail,.pg-author-manager__dialog-panel,.pg-admin-author-modal__dialog,.pg-contributor-request-modal__dialog,.pg-header-account__menu,.pg-popup-content){
 font-family:var(--pg-interface-font);color:var(--pg-text);
}
html body.wp-theme-psyguild-theme :is(.pg-site-header,.pg-sidebar-drawer,.pg-header-account__menu,.pg-popup-content,.pg-modal-card,.psyguild-portal-shell,.psyguild-assessment-app,.psyguild-assessment-auth,.pg-report-credit-panel,.pg-credit-modal,.pg-drive,.pg-personal-nav-sheet,.pg-personal-bottom-nav) :is(button,input,select,textarea):not(.wp-editor-area):not(.code){
 font-family:var(--pg-interface-font);
}
/* Core library headings previously selected their own display family. */
html body.wp-theme-psyguild-theme .psyguild-assessment-app :is(h1,h2,h3,h4){font-family:var(--pg-interface-font)!important;letter-spacing:-.02em;}
html body.wp-theme-psyguild-theme :is(.pg-portal-main,.psyguild-portal-shell) :is(.psyguild-assessment-history-title,.pg-report-credit-panel h2,.pg-report-credit-panel h3){font-family:var(--pg-interface-font);color:var(--pg-text);}

/* One finish for functional panels, including screens rendered by Core. */
html body.wp-theme-psyguild-theme :is(.pg-btn-primary,.pg-btn-dark,.pg-hero-btn-primary,.pg-sidebar-cta__btn,.pg-community-primary,.pg-channels-primary,.pg-publish-split__toggle,.pg-admin-dashboard__export,.pg-admin-filter__actions button,.pg-author-period-filter>button){color:var(--pg-action-text,var(--pg-color-white))!important;-webkit-text-fill-color:currentColor!important;}
html body.wp-theme-psyguild-theme :is(.pg-btn-primary,.pg-btn-dark,.pg-hero-btn-primary,.pg-sidebar-cta__btn,.pg-community-primary,.pg-channels-primary,.pg-publish-split__toggle,.pg-admin-dashboard__export,.pg-admin-filter__actions button,.pg-author-period-filter>button):hover{color:var(--pg-action-hover-text,var(--pg-color-white))!important;}
html body.wp-theme-psyguild-theme :is(.pg-community-primary,.pg-channels-primary,.pg-publish-split__toggle){background:var(--pg-action-gradient)!important;border-color:transparent!important;}
html body.wp-theme-psyguild-theme:not(.pg-book-reader-active) :is(.pg-site-header .pg-search-form>.pg-btn-primary,.pg-demo-profile .pg-author-follow-btn,.pg-hero-btn-primary,.pg-sidebar-cta__btn,.pg-community-primary,.pg-channels-primary){
 background:var(--pg-highlight-gradient)!important;color:var(--pg-highlight-text)!important;border-color:transparent!important;
}
html body.wp-theme-psyguild-theme:not(.pg-book-reader-active) :is(.pg-site-header .pg-search-form>.pg-btn-primary,.pg-demo-profile .pg-author-follow-btn,.pg-hero-btn-primary,.pg-sidebar-cta__btn,.pg-community-primary,.pg-channels-primary):is(:hover,:focus-visible):not(:disabled):not([aria-disabled="true"]){
 background:var(--pg-highlight-gradient-hover)!important;color:var(--pg-highlight-text)!important;
}
html body.wp-theme-psyguild-theme .pg-drive .pg-drive__file:is(:hover,[aria-pressed="true"]){background:var(--pg-action-gradient)!important;color:var(--pg-action-text)!important;}
html body.wp-theme-psyguild-theme .pg-drive .pg-drive__file:is(:hover,[aria-pressed="true"]) :is(strong,small,.pg-drive__arrow){color:inherit!important;-webkit-text-fill-color:currentColor!important;}
/* A filled state owns both its background and label. This also covers Core
 * controls and dialogs mounted outside main, without touching content/editor
 * text, overlay scrims, file cards, hidden states or control behaviour. */
html body.wp-theme-psyguild-theme :is(.pg-channels-toolbar nav button,.pg-community-view,.pg-community-topics a,.psyguild-assessment-layout-switch button,.psyguild-assessment-category-list button,.psyguild-assessment-pagination button,.pg-drive__locations button,.pg-publish-split__menu button,.pg-admin-chart-legend button):is(.is-active,.active,.is-current,[aria-selected="true"],[aria-pressed="true"],[aria-current="page"],[aria-current="true"]),
html body.wp-theme-psyguild-theme .pg-editor-layout-collapse{
 background:var(--pg-action-gradient)!important;color:var(--pg-action-text,var(--pg-color-white))!important;
 border-color:transparent!important;-webkit-text-fill-color:currentColor!important;
}
html body.wp-theme-psyguild-theme :is(.pg-portal-main,.pg-drive,.pg-channels-dialog,.pg-post-detail,.pg-admin-author-modal__dialog,.pg-author-manager__dialog-panel,.pg-credit-modal,.pg-report-credit-panel,.psyguild-assessment-app,.pg-community) :is(button,input[type="submit"],input[type="button"],.pg-btn,.pg-post-action,.pg-admin-table-action,.pg-community-view,.pg-community-topics a,.pg-community-secondary,.pg-drive__link,.pg-channels-actions a,.pg-editor-layout-menu summary):is(:hover,:focus-visible):not(:disabled):not([aria-disabled="true"]):not(:where(.wp-editor-wrap *,.mce-container *,.tox *,[class*="backdrop"],[class*="overlay"],.pg-post-card-toggle,.pg-post-summary__media,.pg-post-card-menu,.pg-drive__file)){
 background:var(--pg-action-gradient-hover)!important;color:var(--pg-action-hover-text,var(--pg-color-white))!important;
 border-color:transparent!important;-webkit-text-fill-color:currentColor!important;
}
/* Labels and icons nested inside an action must inherit its white foreground. */
html body.wp-theme-psyguild-theme :is(.pg-btn-primary,.pg-btn-dark,.pg-community-primary,.pg-channels-primary,.pg-publish-split__toggle) :is(span,small,strong,em,i),
html body.wp-theme-psyguild-theme :is(.pg-channels-toolbar nav button,.pg-community-view,.pg-community-topics a,.psyguild-assessment-layout-switch button,.psyguild-assessment-category-list button,.psyguild-assessment-pagination button,.pg-drive__locations button,.pg-publish-split__menu button,.pg-admin-chart-legend button):is(.is-active,.active,.is-current,[aria-selected="true"],[aria-pressed="true"],[aria-current="page"],[aria-current="true"]) :is(span,small,strong,em,i),
html body.wp-theme-psyguild-theme :is(.pg-portal-main,.pg-drive,.pg-channels-dialog,.pg-post-detail,.pg-admin-author-modal__dialog,.pg-author-manager__dialog-panel,.pg-credit-modal,.pg-report-credit-panel,.psyguild-assessment-app,.pg-community) :is(button,.pg-btn,.pg-post-action,.pg-admin-table-action,.pg-community-view,.pg-community-topics a,.pg-community-secondary,.pg-drive__link,.pg-channels-actions a,.pg-editor-layout-menu summary):is(:hover,:focus-visible):not(:disabled):not([aria-disabled="true"]):not(:where(.wp-editor-wrap *,.mce-container *,.tox *,[class*="backdrop"],[class*="overlay"],.pg-post-card-toggle,.pg-post-summary__media,.pg-post-card-menu,.pg-drive__file)) :is(span,small,strong,em,i){color:inherit!important;-webkit-text-fill-color:currentColor!important;}
/* Destructive and status actions keep their semantic colour with white labels. */
html body.wp-theme-psyguild-theme :is(.pg-btn-danger,.pg-post-action--delete){--pg-filled-status:var(--pg-palette-danger);}
html body.wp-theme-psyguild-theme .pg-btn-review{--pg-filled-status:var(--pg-palette-warning);}
html body.wp-theme-psyguild-theme button.pg-post-badge{--pg-filled-status:var(--pg-palette-muted);}
html body.wp-theme-psyguild-theme button.pg-post-badge--success{--pg-filled-status:var(--pg-palette-success);}
html body.wp-theme-psyguild-theme button.pg-post-badge--warning{--pg-filled-status:var(--pg-palette-warning);}
html body.wp-theme-psyguild-theme button.pg-post-badge--info{--pg-filled-status:var(--pg-palette-blue);}
html body.wp-theme-psyguild-theme button.pg-post-badge--danger{--pg-filled-status:var(--pg-palette-danger);}
html body.wp-theme-psyguild-theme :is(.pg-portal-main,.pg-post-detail) :is(.pg-btn-danger,.pg-btn-review,.pg-post-action--delete,button.pg-post-badge){
 background:var(--pg-filled-status)!important;color:var(--pg-color-white)!important;
 border-color:var(--pg-filled-status)!important;-webkit-text-fill-color:currentColor!important;
}
html body.wp-theme-psyguild-theme :is(.pg-portal-main,.pg-post-detail) :is(.pg-btn-danger,.pg-btn-review,.pg-post-action--delete,button.pg-post-badge):is(:hover,:focus-visible):not(:disabled):not([aria-disabled="true"]){background:color-mix(in srgb,var(--pg-filled-status) 85%,black)!important;color:var(--pg-color-white)!important;}
/* Neutral button surfaces are navy in dark mode, including disabled controls.
 * Keep their opacity/cursor and their own backgrounds while making labels white. */
html body.wp-theme-psyguild-theme.pg-theme-dark :is(.pg-portal-main,.pg-drive,.pg-channels-dialog,.pg-post-detail,.pg-admin-author-modal__dialog,.pg-author-manager__dialog-panel,.pg-credit-modal,.pg-report-credit-panel,.psyguild-assessment-app,.pg-community) :is(button,input[type="submit"],input[type="button"],.pg-btn,.pg-post-action,.pg-admin-table-action,.pg-community-secondary,.pg-drive__link,.pg-channels-actions a):not(:where(.wp-editor-wrap *,.mce-container *,.tox *,[class*="backdrop"],[class*="overlay"],.pg-post-card-toggle,.pg-post-summary__media,.pg-post-card-menu,.pg-drive__file)),
html body.wp-theme-psyguild-theme.pg-theme-dark :is(.pg-sidebar-link,.pg-portal-toggle,.pg-portal-nav-item,.pg-post-summary__media){
 color:var(--pg-color-white)!important;-webkit-text-fill-color:currentColor!important;
}
html body.wp-theme-psyguild-theme :is(.pg-admin-panel,.pg-admin-kpi,.pg-admin-filter,.pg-author-period-filter,.pg-portal-filterbar,.pg-portal-empty,.pg-profile-form-card,.pg-quiz-launcher,.psyguild-assessment-history-overview,.psyguild-assessment-history-card,.psyguild-assessment-history-panel,.pg-report-credit-panel,.pg-credit-modal,.psyguild-assessment-library-sidebar,.psyguild-assessment-library-results,.psyguild-assessment-info-dialog__panel,.psyguild-assessment-auth__panel,.psyguild-assessment-question,.psyguild-assessment-result,.pg-post-detail,.pg-author-manager__dialog-panel,.pg-admin-author-modal__dialog,.pg-contributor-request-modal__dialog,.pg-modal-card,.pg-popup-content){
 border:1px solid var(--pg-brand-line)!important;border-radius:var(--pg-brand-card-radius)!important;
 background:var(--pg-block-bg)!important;color:var(--pg-text)!important;
 box-shadow:var(--pg-brand-card-shadow)!important;
}
html body.wp-theme-psyguild-theme .pg-admin-kpi::after{content:none;}
html body.wp-theme-psyguild-theme :is(.pg-admin-kpi small,.pg-author-dashboard__data-note,.psyguild-assessment-card p,.psyguild-assessment-card__time,.psyguild-assessment-info-dialog__section p){color:var(--pg-muted);}
html body.wp-theme-psyguild-theme .pg-admin-kpi small{font-size:12px;line-height:1.65;}
html body.wp-theme-psyguild-theme .pg-portal-empty__icon{border:1px solid var(--pg-brand-line);border-radius:10px;color:var(--pg-link);}
html body.wp-theme-psyguild-theme .pg-portal-main .pg-portal-empty h2{font:600 16px/1.45 var(--pg-interface-font);color:var(--pg-text);}
html body.wp-theme-psyguild-theme .pg-portal-main .pg-portal-empty p{font:400 13px/1.7 var(--pg-interface-font);color:var(--pg-muted);}
html body.wp-theme-psyguild-theme .pg-portal-empty-cell .pg-portal-empty{border:0!important;border-radius:0!important;box-shadow:none!important;}
html body.wp-theme-psyguild-theme .pg-author-dashboard__data-note{border-style:solid;border-color:var(--pg-brand-line);border-radius:10px;}
html body.wp-theme-psyguild-theme :is(.pg-portal-card,.pg-profile-form-card,.psyguild-portal-card,.pg-report-credit-panel,.pg-credit-modal,.psyguild-assessment-auth__panel) :is(input[type="text"],input[type="email"],input[type="url"],input[type="search"],input[type="number"],input[type="date"],input[type="password"],select){
 min-width:0;border:1px solid var(--pg-brand-line)!important;border-radius:8px!important;
 background-color:var(--pg-bg-soft)!important;color:var(--pg-text)!important;
}
html body.wp-theme-psyguild-theme :is(.pg-credit-balances p,.pg-report-credit-panel output,.psyguild-assessment-info-dialog__meta div,.psyguild-assessment-info-dialog__section){
 border-color:var(--pg-brand-line)!important;border-radius:10px;background:var(--pg-bg-soft)!important;color:var(--pg-text)!important;
}
html body.wp-theme-psyguild-theme :is(.pg-credit-balances strong,.psyguild-assessment-score,.psyguild-assessment-history-stats strong){font-family:var(--pg-interface-font);font-variant-numeric:tabular-nums;}
html body.wp-theme-psyguild-theme .psyguild-assessment-history-stats>div{background:var(--pg-bg-soft)!important;border:1px solid var(--pg-brand-line);border-radius:10px;color:var(--pg-text);}
html body.wp-theme-psyguild-theme .pg-portal-commerce :is(li.product,.woocommerce-Address,.cart_totals){border:1px solid var(--pg-brand-line)!important;border-radius:var(--pg-brand-card-radius)!important;background:var(--pg-block-bg)!important;box-shadow:var(--pg-brand-card-shadow)!important;}
html body.wp-theme-psyguild-theme :is(.pg-credit-modal,.pg-post-detail,.pg-author-manager__dialog-panel,.pg-admin-author-modal__dialog,.pg-contributor-request-modal__dialog,.psyguild-assessment-info-dialog__panel,.psyguild-assessment-auth__panel){border-radius:16px!important;}

/* Preserve the library's existing rows, controls, filters and runner flow. */
html body.wp-theme-psyguild-theme .psyguild-assessment-app__hero{
 border:1px solid var(--pg-brand-line);border-radius:var(--pg-brand-card-radius);
 background:linear-gradient(120deg,var(--pg-block-bg),color-mix(in srgb,var(--pg-primary) 9%,var(--pg-block-bg)))!important;
 color:var(--pg-text)!important;box-shadow:var(--pg-brand-card-shadow);
}
html body.wp-theme-psyguild-theme .psyguild-assessment-app__hero :is(h1,h2,p){color:var(--pg-text)!important;}
html body.wp-theme-psyguild-theme .psyguild-assessment-app__eyebrow{color:var(--pg-link)!important;}
html body.wp-theme-psyguild-theme .psyguild-assessment-library-results .psyguild-assessment-card{
 background:var(--pg-block-bg)!important;color:var(--pg-text)!important;border-color:var(--pg-brand-line)!important;box-shadow:none!important;
}
html body.wp-theme-psyguild-theme .psyguild-assessment-library-results .psyguild-assessment-card:hover{background:var(--pg-bg-soft)!important;}
html body.wp-theme-psyguild-theme .psyguild-assessment-app :is(.psyguild-assessment-slider__controls,.psyguild-assessment-search,.psyguild-assessment-app__toolbar select){
 background:var(--pg-block-bg)!important;color:var(--pg-text)!important;border-color:var(--pg-brand-line)!important;
}
html body.wp-theme-psyguild-theme .psyguild-assessment-search input{background:transparent!important;color:var(--pg-text)!important;}
html body.wp-theme-psyguild-theme .psyguild-assessment-search input::placeholder{color:var(--pg-muted)!important;}
html body.wp-theme-psyguild-theme .psyguild-assessment-app :is(.psyguild-assessment-filter-section label,.psyguild-assessment-category-list button){color:var(--pg-muted);}
html body.wp-theme-psyguild-theme .psyguild-assessment-info-dialog__guidance{background:var(--pg-bg-soft)!important;color:var(--pg-text)!important;}
html body.wp-theme-psyguild-theme .psyguild-assessment-info-dialog__close{background:var(--pg-bg-soft)!important;color:var(--pg-text)!important;border-color:var(--pg-brand-line)!important;}
html body.wp-theme-psyguild-theme :is(.psyguild-assessment-card,.psyguild-assessment-auth__panel,.pg-credit-modal) .pg-btn{border-radius:8px;}
@media(max-width:767.98px){
 html body.wp-theme-psyguild-theme .pg-admin-kpi small{font-size:11px;}
 html body.wp-theme-psyguild-theme .pg-portal-main .pg-portal-empty h2{font-size:15px;}
 html body.wp-theme-psyguild-theme .pg-portal-main .pg-portal-empty p{font-size:12px;}
}
@media print{
 body.wp-theme-psyguild-theme :is(.psyguild-assessment-cover-sheet,.psyguild-print-header,.psyguild-print-footer){font-family:var(--pg-interface-font)!important;}
}
