/* Every selector requires an opted-in browsing page. Empty settings preserve the existing layout. */
/* The vendor dropdown aligns left above 1199px, overflowing a signed-in header at the right edge. */
body[data-site-page] .rbt-header .account-access .rbt-user-menu-list-wrapper { left: auto; right: 0; }
body[data-site-page][data-sa-background], body[data-site-page] [data-sa-background] {
    background-color: var(--sa-background) !important;
}
body[data-site-page][data-sa-text], body[data-site-page] [data-sa-text] { color: var(--sa-text); }
/* Image overlays and page banners own their contrast until their section explicitly sets textColor. */
body[data-site-page] [data-sa-text] :where(h1, h2, h3, h4, h5, h6, p):not(.editor-content *, .se-hero *, .map-infowindow *, .learning-resource-infowindow *, .homepage-news *, .alert *, .checkout-toast *, .checkout-confirm-header-title, [data-site-section~="banner"] *) { color: var(--sa-text); }
body[data-site-page] .se-hero[data-site-section~="overview"][data-sa-text] .se-hero-title { color: var(--sa-text); }
body[data-site-page] [data-sa-image] {
    background-image: linear-gradient(color-mix(in srgb, var(--sa-background, white) var(--sa-tint, 88%), transparent), color-mix(in srgb, var(--sa-background, white) var(--sa-tint, 88%), transparent)), var(--sa-image, none) !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
body[data-site-page][data-sa-surface] :where(.news-detail, .news-card, .rbt-card, .aboutus-block, .timeline-section, .pd-card, .policy-content),
body[data-site-page] [data-sa-surface] :where(.news-detail, .news-card, .rbt-card, .aboutus-block, .timeline-section, .pd-card, .policy-content) {
    background-color: var(--sa-surface);
}
body[data-site-page] :where(.news-detail, .news-card, .rbt-card, .aboutus-block, .timeline-section, .pd-card, .policy-content, .rbt-border-with-box)[data-sa-surface] { background-color: var(--sa-surface); }
body[data-site-page][data-sa-radius] :where(.news-detail, .news-card, .rbt-card, .aboutus-block, .timeline-section, .pd-card, .policy-content, .rbt-btn, .btn, .news-toolbar__sort-btn, .news-load-more__btn, .news-detail__back-btn, .news-detail__attach-download),
body[data-site-page] [data-sa-radius] :where(.rbt-btn, .btn, .news-toolbar__sort-btn, .news-load-more__btn, .news-detail__back-btn, .news-detail__attach-download),
body[data-site-page] [data-sa-radius] { border-radius: var(--sa-radius); }
body[data-site-page][data-sa-width] > [data-site-section~="content"] > .container,
body[data-site-page] [data-sa-width] > .container,
body[data-site-page] [data-sa-width] > .pd-content {
    width: 100%; max-width: var(--sa-width); margin-inline: auto;
}
body[data-site-page] .container[data-sa-width] { max-width: var(--sa-width); }
body[data-site-page][data-sa-width] :where([data-site-section~="header"] .rbt-header-wrapper > .container-fluid, [data-site-section~="footer"] > .site-footer-inner, [data-site-section~="banner"] .rbt-banner-content .container),
body[data-site-page] [data-site-section~="header"][data-sa-width] .rbt-header-wrapper > .container-fluid,
body[data-site-page] [data-site-section~="footer"][data-sa-width] > .site-footer-inner,
body[data-site-page] [data-site-section~="banner"][data-sa-width] .rbt-banner-content .container {
    max-width: var(--sa-width); margin-inline: auto;
}
body[data-site-page] [data-site-section][data-sa-width]:not([data-site-section~="content"]):not([data-site-section~="header"]):not([data-site-section~="footer"]):not([data-site-section~="banner"]) {
    max-width: min(100%, var(--sa-width)); margin-inline: auto;
}
body[data-site-page][data-sa-width] [data-site-section~="map"],
body[data-site-page] [data-site-section~="map"][data-sa-width] { max-width: var(--sa-width); margin-inline: auto; }
body[data-site-page] [data-sa-width] > .container > .news-detail,
body[data-site-page] [data-site-section~="article"][data-sa-width] { max-width: min(100%, var(--sa-width)); margin-inline: auto; }
body[data-site-page] [data-site-section~="header"][data-sa-background] .rbt-header-wrapper { background-color: var(--sa-background) !important; }
body[data-site-page] [data-site-section~="banner"][data-sa-background] .rbt-banner-image { background: var(--sa-background) !important; }
body[data-site-page] [data-site-section~="banner"][data-sa-image] .rbt-banner-image { background: transparent !important; }
body[data-site-page] .rbt-breadcrumb-default[data-sa-image] > .breadcrumb-inner > img,
body[data-site-page] .rbt-breadcrumb-default[data-sa-background] > .breadcrumb-inner > img { visibility: hidden; }
body[data-site-page] [data-site-section~="banner"][data-sa-text] :where(h1, h2, h3, h4, h5, h6, p, .breadcrumb-site-title, .breadcrumb-subtitle, .breadcrumb-path-item, .breadcrumb-path-item a, .breadcrumb-path-item-active, .u-text-disabled) { color: var(--sa-text) !important; }
/* Standard inner-page banners own one overlay. Maps and the homepage hero keep
   their dedicated layout/content controls and never receive this marker. */
body[data-site-page] [data-sa-banner] :where([data-site-banner-title], [data-site-banner-description]) { overflow-wrap: anywhere; }
body[data-site-page] [data-sa-banner] [data-site-banner-description] { white-space: pre-line; }
body[data-site-page] [data-sa-banner] [data-site-banner-description][hidden] { display: none !important; }
body[data-site-page] [data-sa-banner][data-sa-radius] { overflow: hidden; }
body[data-site-page] [data-sa-banner][data-sa-background]:not([data-sa-image]) { background-image: none !important; }
body[data-site-page] [data-sa-banner][data-sa-image] {
    background-image: linear-gradient(color-mix(in srgb, var(--sa-banner-overlay-color, #000) var(--sa-overlay-opacity, var(--sa-tint, 55%)), transparent), color-mix(in srgb, var(--sa-banner-overlay-color, #000) var(--sa-overlay-opacity, var(--sa-tint, 55%)), transparent)), var(--sa-image, none) !important;
}
body[data-site-page] [data-sa-banner][data-sa-overlay]:not([data-sa-image]):not([data-sa-background]) .rbt-banner-image::after {
    background: color-mix(in srgb, var(--sa-banner-overlay-color, #000) var(--sa-overlay-opacity), transparent);
}
body[data-site-page] [data-sa-banner]:is([data-sa-image], [data-sa-background]) .rbt-banner-image::after { background: transparent; }
body[data-site-page] .rbt-breadcrumb-default.version-03[data-sa-banner][data-sa-overlay]:not([data-sa-image]):not([data-sa-background]) > .breadcrumb-inner > img { filter: none; }
body[data-site-page] .rbt-breadcrumb-default.version-03[data-sa-banner][data-sa-overlay]:not([data-sa-image]):not([data-sa-background]) > .breadcrumb-inner::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: color-mix(in srgb, var(--sa-banner-overlay-color, #000) var(--sa-overlay-opacity), transparent);
}
@media (min-width: 768px) {
    body[data-site-page] [data-sa-banner-title-desktop-size] [data-site-banner-title] { font-size: var(--sa-banner-title-desktop) !important; line-height: 1.35; }
    body[data-site-page] [data-sa-banner-description-desktop-size] [data-site-banner-description] { font-size: var(--sa-banner-description-desktop) !important; line-height: 1.6; }
}
@media (max-width: 767px) {
    body[data-site-page] [data-sa-banner-title-mobile-size] [data-site-banner-title] { font-size: var(--sa-banner-title-mobile) !important; line-height: 1.35; }
    body[data-site-page] [data-sa-banner-description-mobile-size] [data-site-banner-description] { font-size: var(--sa-banner-description-mobile) !important; line-height: 1.6; }
}
/* The footer is dark chrome. Page text belongs to reading surfaces; an explicit
   footer section textColor is still honored independently. */
body[data-site-page][data-sa-primary] .site-footer,
body[data-site-page] .site-footer[data-sa-primary] {
    --footer-background: color-mix(in srgb, var(--sa-primary) 16%, #14231f);
    --footer-accent: color-mix(in srgb, var(--sa-primary) 24%, white);
}
body[data-site-page] .site-footer[data-sa-text] {
    --footer-text: var(--sa-text); --footer-muted: var(--sa-text); --footer-accent: var(--sa-text);
}
body[data-site-page][data-sa-surface] .rbt-header .rbt-header-wrapper,
body[data-site-page] .rbt-header[data-sa-surface] .rbt-header-wrapper { background-color: var(--sa-surface); }
body[data-site-page][data-sa-text] .rbt-header .mainmenu > li > a,
body[data-site-page] .rbt-header[data-sa-text] .mainmenu > li > a { color: var(--sa-text); }
/* Match the header's desktop/mobile breakpoint and leave submenu text unchanged. */
@media (min-width: 1200px) {
    body[data-site-page] .rbt-header[data-site-section~="header"][data-sa-navigation-desktop-size] .mainmenu > li > a { font-size: var(--sa-navigation-desktop-size) !important; }
}
@media (max-width: 1199px) {
    body[data-site-page] .popup-mobile-menu[data-site-navigation-mobile][data-sa-navigation-mobile-size] .mainmenu > li > a { font-size: var(--sa-navigation-mobile-size) !important; }
}
body[data-site-page][data-sa-primary] :where(.news-sidebar .rbt-show-more-btn, .news-card__tag, .news-detail__tag),
body[data-site-page] [data-sa-primary] :where(.news-sidebar .rbt-show-more-btn, .news-card__tag, .news-detail__tag) { color: var(--sa-primary); }
body[data-site-page][data-sa-primary] .news-sidebar .form-check-input,
body[data-site-page] [data-sa-primary] .news-sidebar .form-check-input { accent-color: var(--sa-primary); }
body[data-site-page][data-sa-primary] .news-sidebar .rbt-search-style-1 input:focus,
body[data-site-page] [data-sa-primary] .news-sidebar .rbt-search-style-1 input:focus { border-color: var(--sa-primary); }
body[data-site-page][data-sa-primary] :where(.news-toolbar__sort-btn.active, .news-load-more__btn:hover, .news-detail__back-btn:hover),
body[data-site-page] [data-sa-primary] :where(.news-toolbar__sort-btn.active, .news-load-more__btn:hover, .news-detail__back-btn:hover) { background: var(--sa-primary); color: var(--sa-on-primary); }
/* Public pages retain their existing components, but their local palettes follow the
   selected site colors. Do not redefine --color-white: imagery, badges and map overlays
   use that token for contrast rather than for the card surface. */
body[data-site-page][data-sa-primary], body[data-site-page] [data-sa-primary] {
    --course-primary: var(--sa-primary);
    --hotspot-primary: var(--sa-primary);
    --lr-accent: var(--sa-primary);
    --course-primary-light: color-mix(in srgb, var(--sa-primary) 10%, var(--sa-surface, white));
    --hotspot-primary-light: var(--course-primary-light);
    --course-border: color-mix(in srgb, var(--sa-primary) 16%, var(--sa-surface, white));
    --hotspot-border: var(--course-border);
    --lr-line: var(--course-border);
    --color-primary-opacity: color-mix(in srgb, var(--sa-primary) 15%, transparent);
}
body[data-site-page][data-sa-text], body[data-site-page] [data-sa-text] {
    --course-text: var(--sa-text);
    --hotspot-text: var(--sa-text);
    --lr-ink: var(--sa-text);
    --course-text-secondary: color-mix(in srgb, var(--sa-text) 78%, var(--sa-surface, white));
    --hotspot-text-secondary: var(--course-text-secondary);
    --lr-muted: var(--course-text-secondary);
}
body[data-site-page][data-sa-background], body[data-site-page] [data-sa-background] {
    --course-bg-subtle: var(--sa-background);
    --hotspot-bg-subtle: var(--sa-background);
    --lr-surface: var(--sa-background);
}
/* Structural backgrounds must not mask the page background; image/chart content is untouched. */
body[data-site-page] .learning-statistics-page[data-sa-background] > :where(.bg-color-extra2, .bg-color-light, .bg-color-white):not([data-sa-background]) { background-color: var(--sa-background) !important; }
body[data-site-page][data-sa-surface] :where(.rbt-sidebar-widget-wrapper, .news-sidebar, .hotspot-card, .rbt-border-with-box, .faq-item, .faq-search-wrap input, .ha-panel, select.ha-select-sm, .coursemap-township-panel, .learning-resource-filter-panel),
body[data-site-page] [data-sa-surface] :where(.rbt-sidebar-widget-wrapper, .news-sidebar, .hotspot-card, .rbt-border-with-box, .faq-item, .faq-search-wrap input, .ha-panel, select.ha-select-sm, .coursemap-township-panel, .learning-resource-filter-panel) { background-color: var(--sa-surface); }
body[data-site-page][data-sa-surface] .course-card-enhanced,
body[data-site-page] [data-sa-surface] .course-card-enhanced { background-color: var(--sa-surface) !important; }
body[data-site-page][data-sa-surface] :where(.coursemap-township-chip:not([aria-pressed="true"]), .learning-resource-chip:not([aria-pressed="true"]), .hotspot-category-chip:not(.active), .ha-bubble-tab.active),
body[data-site-page] [data-sa-surface] :where(.coursemap-township-chip:not([aria-pressed="true"]), .learning-resource-chip:not([aria-pressed="true"]), .hotspot-category-chip:not(.active), .ha-bubble-tab.active) { background-color: var(--sa-surface); }
body[data-site-page][data-sa-text] :where(.aboutus-content, .aboutus-block .block-body, .policy-content, .pd-rich-content, .pd-contact-item, .faq-item:not(.open) .faq-item-head, .ha-panel-title, .ha-filter-group label, select.ha-select-sm, .coursemap-township-chip:not([aria-pressed="true"]), .learning-resource-chip:not([aria-pressed="true"]):not(:hover), .hotspot-category-chip:not(.active):not(:hover)),
body[data-site-page] [data-sa-text] :where(.aboutus-content, .aboutus-block .block-body, .policy-content, .pd-rich-content, .pd-contact-item, .faq-item:not(.open) .faq-item-head, .ha-panel-title, .ha-filter-group label, select.ha-select-sm, .coursemap-township-chip:not([aria-pressed="true"]), .learning-resource-chip:not([aria-pressed="true"]):not(:hover), .hotspot-category-chip:not(.active):not(:hover)) { color: var(--sa-text); }
body[data-site-page][data-sa-primary] :where(.ha-panel-title i, .ha-bubble-tab.active, .pd-contact-item a, .pd-map-link, .pd-map-text, .pd-learning-hours-title),
body[data-site-page] [data-sa-primary] :where(.ha-panel-title i, .ha-bubble-tab.active, .pd-contact-item a, .pd-map-link, .pd-map-text, .pd-learning-hours-title) { color: var(--sa-primary); }
body[data-site-page][data-sa-primary] :where(.faq-item:not(.open) .faq-item-num, .pd-map-strip, .pd-highlights-box, .pd-summary, .pd-learning-hours-tip),
body[data-site-page] [data-sa-primary] :where(.faq-item:not(.open) .faq-item-num, .pd-map-strip, .pd-highlights-box, .pd-summary, .pd-learning-hours-tip) {
    background: var(--course-primary-light); border-color: var(--course-border); color: var(--sa-text, var(--sa-primary));
}
/* These controls have a solid accent background. Category/township dots, badges and
   data series retain their configured identity colors. */
body[data-site-page][data-sa-primary] :where(.ha-tab.active, .faq-item.open .faq-item-num, .stat-chip.active, .current-town-banner, .coursemap-township-chip:not(.map-township-chip)[aria-pressed="true"], .hotspot-category-chip.active:not(.hotspot-township-chip):not(.map-township-chip), .learning-resource-chip--all[aria-pressed="true"]:not(.map-township-chip), .pd-map-icon, .pd-contact-icon, .pd-learning-hours-icon, .pd-survey-banner, .map-infowindow__btn--go),
body[data-site-page] [data-sa-primary] :where(.ha-tab.active, .faq-item.open .faq-item-num, .stat-chip.active, .current-town-banner, .coursemap-township-chip:not(.map-township-chip)[aria-pressed="true"], .hotspot-category-chip.active:not(.hotspot-township-chip):not(.map-township-chip), .learning-resource-chip--all[aria-pressed="true"]:not(.map-township-chip), .pd-map-icon, .pd-contact-icon, .pd-learning-hours-icon, .pd-survey-banner, .map-infowindow__btn--go) {
    background: var(--sa-primary); color: var(--sa-on-primary);
}
body[data-site-page][data-sa-primary] .pd-survey-banner :where(h3, p),
body[data-site-page] [data-sa-primary] .pd-survey-banner :where(h3, p) { color: var(--sa-on-primary); }
body[data-site-page][data-sa-primary] .course-view-btn:hover,
body[data-site-page] [data-sa-primary] .course-view-btn:hover { color: var(--sa-primary) !important; }
@media (min-width: 768px) {
    body[data-site-page] [data-sa-desktop-top] { padding-top: var(--sa-desktop-top) !important; }
    body[data-site-page] [data-sa-desktop-bottom] { padding-bottom: var(--sa-desktop-bottom) !important; }
    body[data-site-page] [data-sa-desktop-gap] { margin-top: var(--sa-desktop-gap) !important; }
    body[data-site-page] .site-footer[data-sa-desktop-top] > .site-footer-inner { padding-top: 0; }
}
@media (max-width: 767px) {
    body[data-site-page] [data-sa-mobile-top] { padding-top: var(--sa-mobile-top) !important; }
    body[data-site-page] [data-sa-mobile-bottom] { padding-bottom: var(--sa-mobile-bottom) !important; }
    body[data-site-page] [data-sa-mobile-gap] { margin-top: var(--sa-mobile-gap) !important; }
    body[data-site-page] .site-footer[data-sa-mobile-top] > .site-footer-inner { padding-top: 0; }
}
