/* Shared hierarchy for public pages, editorial fragments and native PHP pages. */
:root{--type-h1:clamp(2.25rem,5vw,4rem);--type-h2:clamp(1.75rem,3vw,2.25rem);--type-h3:clamp(1.25rem,2vw,1.5rem);--type-h4:1.125rem;--type-h5:1rem;--type-h6:.9375rem;--type-copy:1rem;--type-note:.875rem;--type-muted:var(--muted,#5b685f)}
:root[data-color-scheme=dark]{--type-muted:#b6c1b6}
@media(prefers-color-scheme:dark){:root:not([data-color-scheme]){--type-muted:#b6c1b6}}
body:not(.admin-mode) :is(main,.php-surface,.account-setup) :is(h1,h2,h3,h4,h5,h6){font-weight:650;line-height:1.2;letter-spacing:-.025em;word-break:normal;overflow-wrap:break-word;hyphens:auto;text-wrap:pretty}
body:not(.admin-mode) :is(main,.php-surface,.account-setup) h1:not(.banner-content h1):not(.hero h1){font-size:var(--type-h1)!important}
body:not(.admin-mode) :is(main,.php-surface,.account-setup) h2{font-size:var(--type-h2)!important}
body:not(.admin-mode) :is(main,.php-surface,.account-setup) h3{font-size:var(--type-h3)!important}
body:not(.admin-mode) :is(main,.php-surface,.account-setup) h4{font-size:var(--type-h4)!important}
body:not(.admin-mode) :is(main,.php-surface,.account-setup) h5{font-size:var(--type-h5)!important}
body:not(.admin-mode) :is(main,.php-surface,.account-setup) h6{font-size:var(--type-h6)!important}
body:not(.admin-mode) :is(.card,.event,.stage,.person) :is(h2,h3){font-size:clamp(1.125rem,1.8vw,1.375rem)!important;line-height:1.3}
body:not(.admin-mode) :is(.prose,.reading,.built-text,.rich-text,.story-copy,.php-surface,.account-setup) :is(h2,h3,h4,h5,h6){margin-block:1.4em .6em}
body:not(.admin-mode) :is(main,.php-surface,.account-setup) p{line-height:1.65}
body:not(.admin-mode) :is(.page-head>p,.post-entry-meta,.editor-caption,.muted,.ed-help,.setup-brand){color:var(--type-muted);line-height:1.6}
body:not(.admin-mode) :is(.php-surface,.account-setup){font-size:var(--type-copy)}
body:not(.admin-mode) :is(.php-surface,.account-setup) h1{font-size:clamp(1.9rem,5vw,2.6rem)!important}
body.admin-mode :is(.desk,dialog){--type-h1:clamp(1.625rem,3vw,2.125rem);--type-h2:1.25rem;--type-h3:1.0625rem;--type-h4:1rem;--type-h5:.9375rem;--type-h6:.875rem;--type-copy:.875rem;--type-note:.8125rem;font-family:var(--cn-font,system-ui,sans-serif);font-size:var(--type-copy);line-height:1.6}
body.admin-mode :is(.desk,dialog) :is(h1,h2,h3,h4,h5,h6){font-family:var(--cn-font,system-ui,sans-serif)!important;font-weight:650!important;line-height:1.35!important;letter-spacing:-.015em;word-break:normal;overflow-wrap:break-word;hyphens:auto}
body.admin-mode :is(.desk,dialog) h1{font-size:var(--type-h1)!important;font-weight:700!important;line-height:1.2!important}
body.admin-mode :is(.desk,dialog) h2{font-size:var(--type-h2)!important}
body.admin-mode :is(.desk,dialog) h3{font-size:var(--type-h3)!important}
body.admin-mode :is(.desk,dialog) h4{font-size:var(--type-h4)!important}
body.admin-mode :is(.desk,dialog) h5{font-size:var(--type-h5)!important}
body.admin-mode :is(.desk,dialog) h6{font-size:var(--type-h6)!important}
body.admin-mode :is(.desk,dialog) :is(p,label,li,dd,dt){line-height:1.6}
body.admin-mode :is(.desk-heading>p,.ed-dialog-heading p,.ed-help,.editor-caption,.ed-field>small,.article-setting-status){color:var(--ed-muted,var(--type-muted))!important;font-size:var(--type-note)!important;line-height:1.6!important;opacity:1}
body.admin-mode :is(.ed-form-section,.stage-waitlist-editor,.self-profile,.scout-speech)>:is(h2,h3){margin:0 0 .75em}
body.admin-mode :is(.desk,dialog) :is(h2,h3,h4,h5,h6)+p{margin-top:.65em}
.scout-speech{margin:20px 0;padding:18px;border:1px solid var(--ed-line,var(--line));border-radius:12px;background:var(--ed-soft,var(--paper))}
.scout-speech-actions{display:flex;flex-wrap:wrap;gap:8px}.scout-speech audio{display:block;width:100%;margin:12px 0}.scout-speech [hidden]{display:none!important}.scout-speech [data-speech-status]{font-size:.875rem;min-height:1.6em}.scout-speech textarea{resize:vertical}
[data-clear-waitlist-date]{margin-top:10px!important;width:auto!important}

body.admin-mode :is(.desk,dialog) .ed-record :is(h2,h3){margin:0!important;color:var(--ed-ink)}
/* The same controls and feedback rhythm throughout the editorial workspace. */
body.admin-mode :is(#editor,.ed-dialog) :is(.btn,.ed-button){box-sizing:border-box;min-height:40px!important;font:600 13px/1.4 var(--cn-font,system-ui,sans-serif)!important;border-radius:10px!important;transition:background-color .12s,color .12s,border-color .12s}
body.admin-mode :is(#editor,.ed-dialog) :is(.btn:not(.ghost):not(.danger),.ed-primary){background:var(--ed-primary);color:var(--ed-on-primary);border-color:var(--ed-primary)}
body.admin-mode :is(#editor,.ed-dialog) :is(.btn.ghost,.ed-secondary){background:var(--ed-surface);color:var(--ed-ink);border:1px solid var(--ed-line)}
body.admin-mode :is(#editor,.ed-dialog) :is(.btn.ghost,.ed-secondary):hover{background:var(--ed-hover)}
body.admin-mode :is(#editor,.ed-dialog) :is(button,input,select,textarea):focus-visible{outline:2px solid var(--ed-focus);outline-offset:3px}
body.admin-mode :is(#editor,.ed-dialog) button:disabled{opacity:.55;cursor:default}
body.admin-mode :is(#dashboard-accounts,#dashboard-short-links,#stage-service-panel)[aria-busy=true]{min-height:160px;cursor:progress}
body.admin-mode :is(.ed-row-actions,.scout-result-actions){align-items:center;gap:8px;flex-wrap:wrap}
@media(prefers-reduced-motion:reduce){body.admin-mode :is(#editor,.ed-dialog) :is(.btn,.ed-button){transition:none}}
