/* 20 October: shared appearance corrections, after all visitor theme rules. */
html:has(#siteAppearanceTokens) #main-content .home-contact .contact-social-band{background:var(--appearance-surface)}
html:has(#siteAppearanceTokens) #main-content .contact-page .contact-social-band>.contact-social-card{background:transparent}
@media(max-width:767px){.appearance-slider-civic .slider-previews{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(96px,1fr);overflow-x:auto;padding-bottom:5px;scroll-snap-type:x proximity}.appearance-slider-civic .slider-preview{scroll-snap-align:start}}
.municipality-home>.section-slider:not(.appearance-slider-civic){width:100%;box-sizing:border-box;margin-inline:auto;float:none}
.section-slider:not(.appearance-slider-civic) .municipality-hero{width:100%;min-width:0;margin-inline:auto;float:none}
.section-slider:not(.appearance-slider-civic) .portal-slider,.section-slider .engine-stage,.source-headline-frame{width:100%;min-width:0;margin-inline:auto;box-sizing:border-box}
.section-slider:not(.appearance-slider-civic) .slider-controls{display:none!important}
.section-slider.appearance-slider-panorama .slider-previews{justify-content:center;flex-wrap:wrap;gap:6px;padding:8px}
@media(min-width:1051px){
 .main-header .nav-container{align-items:center}
 .main-header .municipality-brand{flex-shrink:0;align-items:center;min-height:80px}
 .main-header.appearance-header-compact .municipality-brand{max-width:330px}
 .main-header.appearance-header-compact .municipality-seal{width:70px;height:70px;flex-shrink:0}
 .main-header.appearance-header-compact .brand-name{font-size:20px;line-height:1.3}
 .main-header.appearance-header-compact .brand-name small{font-size:10px}
 .main-header.appearance-header-compact.appearance-menu-band .nav-container{flex-wrap:nowrap;gap:24px}
 .main-header.appearance-header-compact.appearance-menu-band .municipality-links{flex-basis:auto;width:auto;margin-left:auto;padding:8px 0}
 .main-header.appearance-header-centered .municipality-brand{max-width:none;justify-content:center}
 .main-header .municipality-seal img{width:100%;height:100%;object-fit:contain}
}
@media(max-width:767px){
 .appearance-slider-civic{--civic-slide-height:630px}
 .section-slider.appearance-slider-civic .portal-slide,.section-slider.appearance-slider-civic .portal-slide img{height:var(--civic-slide-height);min-height:var(--civic-slide-height);object-fit:cover}
 .section-slider.appearance-slider-civic .slider-caption{justify-content:flex-end;padding-bottom:96px}
 .section-slider.appearance-slider-civic .has-previews .slider-controls{top:calc(var(--civic-slide-height) - 62px);bottom:auto}
 .section-slider.appearance-slider-panorama .portal-slide,.section-slider.appearance-slider-panorama .portal-slide img{height:644px;min-height:644px;object-fit:cover}
 .section-slider.appearance-slider-split .portal-slide img{height:420px;min-height:420px;object-fit:cover}
 .section-slider .engine-story,.section-slider .engine-swiper{height:560px}
 .section-slider .engine-story img{height:100%;object-fit:cover}
}
@media(max-width:500px){.appearance-slider-civic{--civic-slide-height:609px}}
/* Every surface declares its foreground; content/editor colors are not blindly inverted. */
html:has(#siteAppearanceTokens) body{--primary:var(--appearance-primary);--secondary:var(--appearance-accent);--line:color-mix(in srgb,var(--appearance-primary) 18%,white)}
html:has(#siteAppearanceTokens) :is(main,.detail-main,.detail-sidebar,.visitor-form,.job-application,.application-form,.contact-card,.mayor-section,.mayor-dialog-content,.archive-entry,.content-cards article,.gallery-cards article){background-color:var(--appearance-bg);color:var(--appearance-text)}
html:has(#siteAppearanceTokens) :is(.detail-sidebar,.contact-channel-card,.contact-address-card,.contact-social-card,.mayor-section-popover>summary,.job-form-section,.form-section,.application-section,.published-content pre){background-color:var(--appearance-surface);color:var(--appearance-text)}
html:has(#siteAppearanceTokens) :is(main h1,main h2,main h3,.contact-card h2,.mayor-dialog-content h2,.archive-entry h2){color:var(--appearance-primary)}
html:has(#siteAppearanceTokens) :is(.archive-pages a,.archive-entry a,.archive-categories a,.detail-sidebar a,.contact-card a,.content-attachments a,.mayor-section-links a){color:var(--appearance-primary);border-color:var(--line)}
html:has(#siteAppearanceTokens) :is(.visitor-form input,.visitor-form textarea,.visitor-form select,.application-form input,.application-form textarea,.application-form select){background:var(--appearance-bg);color:var(--appearance-text);border-color:var(--line)}
html:has(#siteAppearanceTokens) :is(.visitor-form button[type=submit],.visitor-submit,.mayor-message-button,.nav-contact,.metro-panel-contact,.hero-discover){background:var(--appearance-accent);color:var(--appearance-on-accent)}
#main-content .section-slider:not(.appearance-slider-split) :is(.slider-caption h2,.slider-caption p,.hero-eyebrow){color:#fff}
#main-content .section-slider .metro-panel-title :is(h2,span){color:var(--appearance-on-primary)}
.main-footer:is(.appearance-footer-classic,.appearance-footer-compact) .municipality-brand :is(.brand-name,.brand-name small){color:#fff}
.main-footer:is(.appearance-footer-dark,.appearance-footer-contours,.appearance-footer-city){position:relative;isolation:isolate;background-color:var(--appearance-footer-dark);color:#fff;overflow:hidden}
.main-footer:is(.appearance-footer-dark,.appearance-footer-contours,.appearance-footer-city) :is(a,p,span,small,.brand-name,.brand-name small,.configured-footer a,.footer-bottom){color:#fff}
.main-footer:is(.appearance-footer-dark,.appearance-footer-contours,.appearance-footer-city) :is(.footer-bottom,.footer-invitation){border-color:#ffffff30}
.main-footer:is(.appearance-footer-dark,.appearance-footer-contours,.appearance-footer-city) .footer-invitation>a{background:var(--appearance-accent);color:var(--appearance-on-accent)}
.main-footer.appearance-footer-contours:before,.main-footer.appearance-footer-city:before{content:'';position:absolute;inset:0;z-index:-1;background-position:center;background-size:cover;opacity:.16;pointer-events:none}
.main-footer.appearance-footer-contours:before{background-image:url('footer-contours.svg')}
.main-footer.appearance-footer-city:before{background-image:url('footer-city.svg')}
.content-cards article>a,.priced-content-cover{position:relative}
.content-price{position:absolute;left:12px;top:12px;z-index:2;display:inline-block;padding:9px 14px;border-radius:7px;background:var(--appearance-primary,#14345f);color:var(--appearance-on-primary,#fff);font-size:17px;font-weight:750;line-height:1.3;box-shadow:0 3px 14px #0003;max-width:calc(100% - 24px)}
.priced-content-cover:has(.content-cover) .content-price{top:16px;left:16px}
.price-sort-container{padding-top:20px;padding-bottom:8px}.price-sort-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:16px 20px;background:var(--appearance-surface,#f1f4f8);color:var(--appearance-text,#193451);border:1px solid var(--line,#dce4ee);border-radius:9px}
.price-sort-bar label{font-weight:650}.price-sort-bar select{padding:10px 12px;min-height:44px;border:1px solid var(--line,#dce4ee);border-radius:6px;background:var(--appearance-bg,#fff);color:var(--appearance-text,#193451);font:inherit}.price-sort-bar button{padding:10px 20px;min-height:44px;border:0;border-radius:6px;background:var(--appearance-primary,#14345f);color:var(--appearance-on-primary,#fff);font:inherit;cursor:pointer}
html:has(#siteAppearanceTokens) :is(.career-eyebrow,.career-form h2 span,.collection-notice,.visitor-secondary,.career-steps a,.repeat-row legend,.unit-dropdown summary){color:var(--appearance-primary)}
html:has(#siteAppearanceTokens) :is(.career-steps a,.collection-notice,.visitor-secondary,.repeat-row,.unit-dropdown){background-color:var(--appearance-surface);border-color:var(--line)}
html:has(#siteAppearanceTokens) :is(.career-heading>p,.visitor-form small,.visitor-comment time){color:var(--appearance-muted)}
.visitor-form input[type=checkbox]{accent-color:var(--appearance-primary,#173b68)}
.price-sort-bar a{display:inline-flex;align-items:center;min-height:44px;padding:9px 12px;border:1px solid var(--line,#dce4ee);border-radius:6px;color:var(--appearance-primary,#14345f);background:var(--appearance-bg,#fff);text-decoration:none;font-size:14px}.price-sort-bar a[aria-current]{background:var(--appearance-primary,#14345f);color:var(--appearance-on-primary,#fff)}
html:has(#siteAppearanceTokens) #main-content :is(.portal-style-contrast,.section-baskan){background-color:var(--appearance-primary);color:var(--appearance-on-primary)}
html:has(#siteAppearanceTokens) #main-content :is(.portal-style-contrast>h2,.portal-style-contrast>.portal-block>h2,.section-baskan h2,.section-baskan .profile-cards h3,.section-baskan .profile-cards p,.metro-panel-title h2,.metro-panel-title>span){color:var(--appearance-on-primary)}
html:has(#siteAppearanceTokens) #main-content .mayor-overview{--mayor-ink:var(--appearance-primary);--mayor-accent:var(--appearance-accent);--mayor-muted:var(--appearance-muted);--mayor-line:var(--line);color:var(--appearance-text)}
html:has(#siteAppearanceTokens) #main-content .contact-page{--contact-navy:var(--appearance-primary);--contact-accent:var(--appearance-accent);color:var(--appearance-text)}
html:has(#siteAppearanceTokens) #main-content .contact-heading p{color:var(--appearance-muted)}
html:has(#siteAppearanceTokens) :is(.mayor-message-dialog,.mayor-section-dialog){background:var(--appearance-bg);color:var(--appearance-text)}
html:has(#siteAppearanceTokens) #main-content .big-card .news-content :is(h3,p){color:#fff}
html:has(#siteAppearanceTokens) .comment-compose>summary,html:has(#siteAppearanceTokens) .consent-actions [data-consent=yes]{background:var(--appearance-primary);color:var(--appearance-on-primary)}
html:has(#siteAppearanceTokens) .consent-actions [data-consent=no]{background:var(--appearance-accent);color:var(--appearance-on-accent)}
html:has(#siteAppearanceTokens) .portal-consent{background:var(--appearance-bg);color:var(--appearance-text)}
html:has(#siteAppearanceTokens) .portal-consent a{color:var(--appearance-primary)}
.content-cards article>a:not(:has(img)) .content-price,.priced-content-cover:not(:has(img)) .content-price{position:static;margin:12px;max-width:none}
@media(max-width:600px){.price-sort-bar{gap:10px;padding:14px}.price-sort-bar select{flex:1;min-width:0}.price-sort-bar label{width:100%}}
/* Local page components also use the selected palette, including their dialogs. */
html:has(#siteAppearanceTokens) #main-content .mayor-overview .mayor-hero{background:linear-gradient(120deg,var(--appearance-surface),var(--appearance-bg) 66%)}
html:has(#siteAppearanceTokens) #main-content .mayor-overview :is(.mayor-position,.mayor-introduction,.mayor-story-arrow){color:var(--appearance-muted)}
html:has(#siteAppearanceTokens) #main-content .mayor-overview :is(.mayor-section-dialog,.mayor-dialog-content){background:var(--appearance-bg);color:var(--appearance-text)}
html:has(#siteAppearanceTokens) #main-content .mayor-overview :is(.mayor-dialog-close,.mayor-section-popover>summary,.mayor-gallery-link:hover){background:var(--appearance-surface);color:var(--appearance-primary);border-color:var(--line)}
html:has(#siteAppearanceTokens) #main-content .mayor-overview .mayor-message-link:hover{background:var(--appearance-accent);color:var(--appearance-on-accent)}
html:has(#siteAppearanceTokens) #main-content .mayor-message-dialog :is(h2,.mayor-fixed-type,.mayor-message-close){color:var(--appearance-primary)}
html:has(#siteAppearanceTokens) #main-content .mayor-message-dialog :is(.mayor-fixed-type,.mayor-message-close){background:var(--appearance-surface);border-color:var(--line)}
html:has(#siteAppearanceTokens) #main-content .mayor-message-dialog .visitor-form>p{color:var(--appearance-muted)}
html:has(#siteAppearanceTokens) #main-content .contact-page :is(.contact-card,.contact-map,.contact-message-form){background:var(--appearance-bg);color:var(--appearance-text);border-color:var(--line);border-top-color:var(--appearance-primary)}
html:has(#siteAppearanceTokens) #main-content .contact-page .contact-social-card{border-top-color:var(--appearance-accent)}
html:has(#siteAppearanceTokens) #main-content .contact-page :is(.contact-entry dt,.contact-message-form>p){color:var(--appearance-muted)}
html:has(#siteAppearanceTokens) #main-content .contact-page :is(.contact-entry dt i,.contact-social-card a){background:var(--appearance-surface);color:var(--appearance-primary)}
html:has(#siteAppearanceTokens) #main-content .contact-page .visitor-submit:hover{background:var(--appearance-primary);color:var(--appearance-on-primary)}
html:has(#siteAppearanceTokens) :is(.detail-share-icons>a,.detail-share-icons>button,.detail-author .mayor-home-contact a,.mayor-message-close){color:var(--appearance-primary)}
html:has(#siteAppearanceTokens) :is(.detail-share-icons>a:hover,.detail-share-icons>button:hover,.visitor-secondary,.collection-notice){background:var(--appearance-surface);border-color:var(--appearance-accent)}
html:has(#siteAppearanceTokens) #main-content :is(a,button,summary,input,textarea,select):focus-visible{outline-color:var(--appearance-accent)}
