/* Shared dark palette. High contrast remains an independent accessibility mode. */
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]){color-scheme:dark;--portal-text:#e0e8f3;--portal-heading:#f1f5fb;--portal-muted:#b1c1d5;--portal-border:#35465c;--portal-surface:#111c2c;--portal-primary-soft:#1c304a;--portal-link:#8bc4ff}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(body,#pageWrapper,main){background:#101a29!important;color:var(--portal-text)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(#pageHeader,#pageHeader .hdFixerWrap,.bg-white,.dropdown-menu,.portal-a11y-panel,.portal-a11y-panel>button,dialog,.portal-result-group,.portal-map-grid section,.portal-service-card,.portal-news-card,.pw-card,.norms-search,.norms-categories,.norms-help,.norms-document,.norms-document-card,.jumbotron,.portal-interest,.portal-interest-grid a,.home-norms-list,.portal-home-norms>section,.portal-home-hero-links){background:#172538!important;color:var(--portal-text)!important;border-color:var(--portal-border)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) main :is(h1,h2,h3,h4,strong){color:var(--portal-heading)}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.portal-home-community,.portal-home-services,.portal-home-norms header,.norms-results-heading,.portal-page-section){background:#111f32!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageHeader :is(.nav-link,.dropdown-item){color:var(--portal-text)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageHeader :is(.nav-item:hover>.nav-link,.nav-item:focus-within>.nav-link,.dropdown-item:hover,.dropdown-item:focus-visible){background:#174f87!important;color:#fff!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageHeader .logo img{background:#fff;border-radius:5px;padding:3px}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) .navbar-toggler-icon{filter:brightness(0) invert(1)}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(input,select,textarea){background:#101c2d!important;color:#e0e8f3!important;border-color:#49617f!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) input::placeholder{color:#b1c1d5!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) .portal-home-copy .portal-search-form{background:#172538!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.portal-services-grid>a,.home-norm-actions a,.home-works-controls button,.portal-quick-link){background:#172538!important;color:var(--portal-link)!important;border-color:var(--portal-border)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.portal-news-body p,.portal-news-date,.home-norm-meta,.pw-card-location,.home-work-progress,.portal-interest p,.portal-home-hero-links small){color:var(--portal-muted)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.home-work-footer strong,.portal-services-grid strong,.portal-home-hero-links strong,.portal-interest-grid strong,.home-norm-info strong,.portal-news-featured h3 a){color:var(--portal-heading)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.portal-home-copy,.portal-home-alert) :is(h1,h2,p){color:#fff!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) .portal-document-preview iframe{background:#111c2c}
@media(max-width:1279px){html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageMainNavCollapse{background:#172538!important}}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) main :is([class$="-card"],[class$="-panel"],[class$="-sidebar"],.norms-search,.norms-document-list>article,table,thead,tbody,tr,td,th){background-color:#172538!important;color:var(--portal-text)!important;border-color:var(--portal-border)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) main :is([class$="-card"],[class$="-panel"],[class$="-sidebar"]) :is(p,label,small,time){color:var(--portal-muted)}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageHeader :is(.mainNavigation,.mainNavigation>.nav-item,.hdNavWrap,.navbar,.pageMainNavCollapse){background-color:#172538!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageHeader .mainNavigation>.nav-item>.nav-link{background-color:transparent!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageHeader .mainNavigation>.nav-item:hover>.nav-link,
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageHeader .mainNavigation>.nav-item:focus-within>.nav-link{background-color:#174f87!important;color:#fff!important}
/* Normalize legacy separators without changing dimensions or light-mode styles. */
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) *,
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) *:before,
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) *:after{border-color:var(--portal-border)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) hr{border-color:var(--portal-border)!important;background:var(--portal-border)!important;opacity:1}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) #pageHeader .hdFixerWrap{box-shadow:0 1px 0 var(--portal-border)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.norms-section,.management-section,.officials-directory){background:#101a29!important;color:var(--portal-text)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.management-card,.management-category-tile,.management-action,.management-summary>div,.management-stats>div,.officials-count,.officials-search,.officials-unit,.officials-documents,.officials-document,.pw-stats,.pw-access>a,.pw-card-photo){background:#172538!important;color:var(--portal-text)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.norms-categories a,.norms-help a,.norms-advanced,.norms-active-filters a,.norms-filter-grid,.management-filter,.management-toolbar,.management-summary,.management-sidebar,.management-current,.management-files,.management-history,.officials-heading,.pw-popular a){background:#1c304a!important;color:var(--portal-text)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.management-card,.officials-directory,.norms-section,.pw-stats,.pw-access) :is(h1,h2,h3,h4,strong,a){color:var(--portal-heading)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.management-card,.officials-directory,.norms-section,.pw-stats,.pw-access) :is(p,small,label,span){color:var(--portal-muted)}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) progress,
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) progress::-webkit-progress-bar{background:#35465c!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(a,button,input,select,textarea,summary):focus-visible{outline-color:#8bc4ff!important;box-shadow:0 0 0 5px #101a29!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) .portal-home-copy .portal-search-form:focus-within{box-shadow:0 0 0 5px #101a29!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.management-overview>div,.mg-panel,.mg-history-card,.mg-current-document,.mg-files-group,.mg-version-files,.management-empty,.norms-empty,.norms-document-card,.norms-pdf-dialog,.management-pdf-dialog){background:#172538!important;color:var(--portal-text)!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.management-section,.officials-directory,.norms-section){--management-text:#e0e8f3;--management-muted:#b1c1d5;--management-border:#35465c}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.management-section,.norms-section,.officials-directory) a:hover{background-color:#1c304a!important;color:#b9dcff!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) .viewer-embedded :is(.toolbar,.viewer-status,.control-group){background:#172538!important;color:#e0e8f3!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) .viewer-embedded .toolbar button{background:#1c304a!important;color:#e0e8f3!important}
html.portal-site[data-portal-theme=dark]:not([data-portal-contrast=high]) :is(.norms-help,.management-info,.mg-information){background:#1c304a!important}
