.itida-theme-choice {
    display: inline-grid; place-items: center; flex: none;
    width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
    background: transparent; color: var(--blue); cursor: pointer;
}
.itida-theme-choice[hidden], .itida-theme-choice svg { display: none; }
.itida-theme-choice[data-mode="system"] .icon-system,
.itida-theme-choice[data-mode="light"] .icon-light,
.itida-theme-choice[data-mode="dark"] .icon-dark { display: block; }
.itida-theme-choice:hover { background: var(--pale); border-color: var(--brand); }
.itida-theme-choice:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (max-width: 1100px) {
    .itida-site .header-inner:has(.itida-theme-choice) { column-gap: clamp(6px, 1.2vw, 14px); }
}
@media (max-width: 360px) {
    .itida-site .header-inner .brand img { width: 108px; }
    .itida-site .header-inner { padding-inline: 10px; }
}
html[data-itida-theme="dark"] { color-scheme: dark; background: #101c25; }
html[data-itida-theme="dark"] body.itida-site {
    --bs-body-bg: #101c25; --bs-body-color: #e4eef4; --bs-border-color: #435d6c;
    --bs-link-color: #80cef8; --bs-link-hover-color: #b3e2fc;
    --ink: #e4eef4; --muted: #b5c8d3; --blue: #80cef8; --brand: #55b2e3;
    --pale: #203542; --line: #435d6c; --navy: #183d52; --orange: #ffab70;
    --canvas: #101c25; --panel: #192b38; --raised: #243c4b;
    color: var(--ink);
}
html[data-itida-theme="dark"] body.itida-site,
html[data-itida-theme="dark"] main { background: var(--canvas); }
html[data-itida-theme="dark"] .header { background: #152632f5; }
html[data-itida-theme="dark"] .itida-footer,
html[data-itida-theme="dark"] .itida-site #site-nav ul ul,
html[data-itida-theme="dark"] .skip { background: var(--panel); }
@media (max-width: 850px) {
    html[data-itida-theme="dark"] .itida-site #site-nav { background: var(--panel); }
}
html[data-itida-theme="dark"] .itida-site #sp-cookie-consent .sp-cookie-allow { color: #102332!important; }
html[data-itida-theme="dark"] .itida-site .itida-home-pilot.hero {
    background: linear-gradient(110deg, var(--canvas) 45%, #182f3e);
}
html[data-itida-theme="dark"] main :is(.itida-home-pilot, .itida-builder-section).soft,
html[data-itida-theme="dark"] main .itida-news { background: var(--panel); }
html[data-itida-theme="dark"] .itida-home-pilot .product-card.home-product-retail { background: #1a3040; }
html[data-itida-theme="dark"] .itida-home-pilot .product-card.home-product-horeca { background: #1b302b; }
html[data-itida-theme="dark"] .itida-home-pilot .product-card.home-product-imark { background: #332b24; }
html[data-itida-theme="dark"] .itida-home-pilot .product-card.home-product-rmk { background: #262e41; }
html[data-itida-theme="dark"] .itida-home-pilot :is(.partner-cta, .art-label) { background: var(--raised); color: var(--ink); }
html[data-itida-theme="dark"] main :is(.product-visual-diagram, .itida-builder-device) { background: var(--pale); }
html[data-itida-theme="dark"] main :is(.product-diagram-node:not(.is-core),
    .itida-builder-card, .product-price-card, .sppb-panel, .sppb-panel-heading) { background: var(--panel); }
html[data-itida-theme="dark"] main .sppb-panel-heading:is(:hover,:focus-visible) { background: var(--raised); }
html[data-itida-theme="dark"] main .sppb-btn:not(.sppb-btn-primary,.sppb-btn-link) { background: var(--panel); color: var(--ink); }
/* Page Builder generates per-button ID rules, including white hover and focus text. */
html[data-itida-theme="dark"] main a.sppb-btn-primary {
    background-color: var(--orange)!important; color: #29190e!important; border-color: var(--orange);
}
html[data-itida-theme="dark"] main a.sppb-btn-primary:hover { background-color: #ffc59f!important; }
html[data-itida-theme="dark"] main .com-users-login__form { background: var(--panel); }
html[data-itida-theme="dark"] main .com-users-login :is(.form-control,.input-password-toggle,.form-check-input:not(:checked)) {
    background-color: var(--canvas); border-color: #698594; color: var(--ink);
}
html[data-itida-theme="dark"] main .com-users-login .list-group-item { background: transparent; }
html[data-itida-theme="dark"] main .com-users-login__form .btn-primary { background: var(--blue); color: #102332; }
html[data-itida-theme="dark"] main .com-users-login__form .btn-primary:hover { background: #afe1fb; }
html[data-itida-theme="dark"] main .breadcrumb {
    --bs-breadcrumb-item-active-color: var(--muted); --bs-breadcrumb-divider-color: var(--muted);
}
html[data-itida-theme="dark"] #sp-cookie-consent .sp-cookie-consent-content a { color: #80cef8!important; }
/* Page Builder emits per-addon ID rules for these colors. */
html[data-itida-theme="dark"] main .sppb-btn:is(.sppb-btn-link,.sppb-btn-custom) {
    color: var(--blue)!important; background-color: transparent;
}
html[data-itida-theme="dark"] main .sppb-btn:is(.sppb-btn-link,.sppb-btn-custom):hover {
    color: var(--ink)!important;
}
html[data-itida-theme="dark"] .itida-home-pilot .hero-caption p { color: var(--muted)!important; }
html[data-itida-theme="dark"] .product-price-card .product-price strong { background: #463022; color: #ffc79e; }
/* Keep the original blue shop pictogram readable without filtering the image. */
html[data-itida-theme="dark"] main .product-diagram-emblem { background: #b6d2df; }
/* Shared foregrounds and surfaces for public Joomla views. */
html[data-itida-theme="dark"] body.itida-site {
    --bs-secondary-color: var(--muted);
    --bs-secondary-rgb: 181,200,211;
    --bs-body-color-rgb: 228,238,244;
    --bs-light-rgb: 32,53,66;
    --bs-table-bg: var(--panel);
    accent-color: var(--blue);
}
html[data-itida-theme="dark"] .itida-site {
    & :is(.btn,.contact-card,.blog-item,.product-screen,.product-visual,.product-presentation-card,.product-audience-card,
        .product-illustrated-card,.product-viewer,.product-slider-soft,.release-outline,.requirements,
        .editorial-news-image,.editorial-file-search,.editorial-empty,.com-finder__empty,.itida-release-menu,
        .partners-filters,.partner-card,.partners-map-panel,.partners-map-placeholder,.partners-map-search,.partners-map-city-results,
        .partners-empty,.partners-view-switch,.com-users-reset__form,.com-users-remind__form,.com-users-logout__form,
        .profile-edit fieldset,.com-users-profile fieldset,:where(#sp-left) .mod-menu,.list-group-item) {
        background-color: var(--panel); color: var(--ink); border-color: var(--line);
    }
    & :is(.partners-more,.partners-direct-contact,.partner-badges li,.result__taxonomy-item,.editorial-file-badge,.photo-note) {
        background: var(--pale); color: var(--ink);
    }
    & :is(.partners-map-city-results li:hover,.partners-map-city-results li[aria-selected="true"],.btn:hover) {background: var(--raised); color: var(--ink);}
    & :is(.btn.blue,.btn-primary,.product-viewer-close,.partners-view-switch [aria-pressed="true"]) {background: var(--blue); color: var(--canvas); border-color: var(--blue);}
    & :is(.btn.primary,.itida-form-grid [type="submit"]) {background: var(--orange); color: #29190e; border-color: var(--orange);}
    & :is(.btn.blue,.btn-primary,.product-viewer-close):hover {background: #afe1fb; color: var(--canvas);}
    & :is(.btn.primary,.itida-form-grid [type="submit"]):hover {background: #ffc59f; color: #29190e;}
    & main :is(input:not([type=submit],[type=button],[type=checkbox],[type=radio]),textarea,select) {
        background-color: var(--canvas); color: var(--ink); border-color: #688392;
    }
    & main :is(input,textarea)::placeholder {color: var(--muted); opacity: 1;}
    & .itida-form-grid select.form-select { appearance:auto; background-image:none; }
    & .form-check-input:not(:checked) { background-color:var(--panel); border-color:#7891a0; }
    & :is(.formRequired,.formError,.formValidation) {color: #ffb3a7;}
    & .rsform-error {outline-color:#ffb3a7;}
    & :is(.alert,.itida-form-feedback,.itida-form-success,.notice-strip,.sample-note) {
        background: var(--raised); color: var(--ink); border-color: var(--line);
    }
    & :is(.alert-danger,.itida-form-feedback) { background:#40292a; border-color:#ab736c; }
    & :is(.alert-success,.itida-form-success) { background:#20392e; border-color:#679583; }
    & :is(.alert-warning,.notice-strip,.sample-note) { background:#392e21; border-color:#98764a; }
    & :is(.article-info,.text-muted,.result__date,.pricelist-regular) {color: var(--muted)!important;}
    & .pagination {
        --bs-pagination-color:var(--blue); --bs-pagination-bg:var(--panel); --bs-pagination-border-color:var(--line);
        --bs-pagination-hover-bg:var(--raised); --bs-pagination-hover-color:var(--ink); --bs-pagination-focus-bg:var(--raised);
        --bs-pagination-active-bg:var(--navy); --bs-pagination-active-border-color:var(--brand); --bs-pagination-active-color:var(--ink);
        --bs-pagination-disabled-bg:var(--panel); --bs-pagination-disabled-color:var(--muted); --bs-pagination-disabled-border-color:var(--line);
    }
    & .pagination .page-link {background:var(--panel);color:var(--blue);border-color:var(--line);}
    & .pagination :is(.active,.disabled) .page-link {background:var(--pale);color:var(--muted);}
    & .itida-pricelist :is(thead,tbody tr:hover) {background:var(--pale);}
    & .itida-pricelist tr:target {background:var(--raised);outline-color:var(--blue);}
    & .itida-pricelist .pricelist-badge {color:var(--orange);}
    & .itida-pricelist .pricelist-sku::before {color:var(--muted);}
    & :is(.comparison-sticky-header,.product-comparison th,.native-table th) {background:var(--panel);color:var(--ink);}
    & .product-comparison :is(thead th,.comparison-group th) {background:var(--pale);}
    & .product-comparison tbody tr:is(.is-reading,:hover,:focus-within)>:is(th,td) {background:var(--raised);}
    & .comparison-value.is-yes {color:#90d9b0;}
    & .comparison-value.is-no {color:#d4a6a6;}
    & .product-slider-native .n2-ss-slider-wrapper-outside {background:var(--panel);}
    & .product-slider-native .n2-ss-slide--focus {color:#172d3c;}
    & .sppb-btn-custom {background-color:transparent!important;}
    & :is(.download-page,.itida-downloads) {background:var(--canvas);}
    & :is(.search-form,.file-table,.file-table tbody tr,.release-card,.empty-state,.no-results,.pager a,.tasks a,.chips a) {
        background:var(--panel); border-color:var(--line); color:var(--ink);
    }
    & :is(.recommendation,.file-table th,.tag,.format) {background:var(--pale);color:var(--ink);border-color:var(--line);}
    & .itida-downloads :is(a[aria-current=true],a[aria-current=page]) {background:var(--navy);color:var(--ink);border-color:var(--brand);}
    & :is(.file-table td,.file-table tr,.pricelist-scroll) {border-color:var(--line);}
    & .dropfiles-content.dropfiles-content-itida {
        color:var(--ink);background:var(--canvas);
        & :is(table.itida-files,.itida-files tr,.openlink,.breadcrumbs,.dropfilescategory) {background:var(--panel);border-color:var(--line);}
        & :is(.itida-files th,.itida-ext) {background:var(--pale);color:var(--muted);}
        & .itida-files td {color:var(--ink);border-color:var(--line);}
        & .itida-file-description {color:var(--muted);}
        & .itida-files td[data-label]::before {color:var(--muted);}
        & a {color:var(--blue);}
        & :is(.downloadlink,.download-all,.download-selected) {background:var(--blue)!important;color:var(--canvas)!important;}
    }
}

html[data-itida-theme="dark"] .itida-release-sidebar .current>a,
html[data-itida-theme="dark"] .dropfiles-content.dropfiles-content-itida h2 {color:var(--ink);}
html[data-itida-theme="dark"] .itida-site .partners-map-placeholder {background:linear-gradient(150deg,var(--panel),var(--pale));}
html[data-itida-theme="dark"] .product-slider-native .n2-ss-text {text-shadow:0 1px 3px #071620;}
html[data-itida-theme="dark"] .itida-site .product-slider-native .n2-ss-slide .n2-ss-text {background-color:#142733; color:#e4eef4; border-radius:4px;}
html[data-itida-theme="dark"] .itida-site .itida-downloads .file-table .btn.blue {color:var(--canvas);}
html[data-itida-theme="dark"] .itida-site .itida-downloads :is(.tasks,.product-tabs,.pager) a:is([aria-current="true"],[aria-current="page"]) {background:var(--navy);color:var(--ink);}
html[data-itida-theme="dark"] .product-slider-native .n2-ss-slide :is(.n2-ss-text,.n2-ss-text p) {color:var(--ink)!important;}
html[data-itida-theme="dark"] .product-slider-soft :is(.n2-ss-slider-2,.n2-ss-slide-background-color,.n2-ss-layer-row.n2-ss-layer-with-background) {background-color:var(--panel)!important;}

/* Keep filled actions distinct from text links. Keyboard focus is visible on both. */
html[data-itida-theme="dark"] .itida-site a[href]:not(:where(.btn,.sppb-btn-primary,[role="button"],.brand,.downloadlink,.download-all,.download-selected,.sp-cookie-allow)):hover {
    text-decoration-line: underline!important;
    text-underline-offset: .18em;
}
html[data-itida-theme="dark"] .itida-site a[href]:focus-visible {
    outline: 3px solid var(--blue)!important;
    outline-offset: 2px;
}
