/* Keep theme colors local to content surfaces so hero and slider styles
   retain their original inherited tokens, backgrounds and animations. */
body#barad-body {
    --barad-night-bg: #10151e;
    --barad-night-paper: #1b2330;
    --barad-night-raised: #252f3d;
    --barad-night-ink: #edf2f9;
    --barad-night-muted: #b9c5d5;
    --barad-night-line: #445064;
    background-color: var(--barad-night-bg);
}

body#barad-body :is(
    #barad-page-top, #barad-main-nav, .barad-announcement,
    .barad-category-card, .bd-category-card, .product-card,
    .bpg-card, .be-product-card, .buy-box, .info-box,
    .bpl-card, .bpl-filters, .bpl-search,
    .bah-card, .bah-art-card, .ba-library-card, .ba-path-panel,
    .ba-resource-panel, .bc-form-panel, .contact-card, .quote-layout
):not(:is(
    [class*="hero"], [class*="hero"] *,
    [class*="slider"], [class*="slider"] *,
    [class*="carousel"], [class*="carousel"] *,
    [aria-roledescription="carousel"], [aria-roledescription="carousel"] *
)) {
    --bg: var(--barad-night-bg);
    --paper: var(--barad-night-paper);
    --soft: var(--barad-night-raised);
    --ink: var(--barad-night-ink);
    --muted: var(--barad-night-muted);
    --line: var(--barad-night-line);
    color-scheme: dark;
    background-color: var(--paper);
    color: var(--ink);
    border-color: var(--line);

    :is(h1, h2, h3, h4, label, legend, th, td) {
        color: var(--ink);
    }

    :is(input:not([type="color"], [type="range"], [type="submit"]), select, textarea) {
        background-color: var(--bg);
        color: var(--ink);
        border-color: var(--line);
    }

    :is(input, textarea)::placeholder {
        color: var(--muted);
    }

    :focus-visible {
        outline: 2px solid #a9ccff;
        outline-offset: 3px;
    }
}

/* Product configuration, price tables, and quote builder. */
body#barad-body :is(
    .bd-product-price, .bd-family-selected-model, .bd-spec-chips > div,
    .bd-specification .specs tr, .bd-spec-more > summary,
    .bfam-table-wrap, .br-model-table, .bpl-summary,
    .bq-picker, .bq-cart, .bq-summary, .bq-cart-row, .bq-filters
):not(:is([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *)) {
    background: var(--barad-night-paper);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
    color-scheme: dark;
}

body#barad-body :is(.bpl-table, .br-model-table, .barad-catalog-table) {
    background: var(--barad-night-paper);
    color: var(--barad-night-ink);

    th {
        background: var(--barad-night-raised);
        color: var(--barad-night-ink);
    }

    td {
        background: transparent;
        color: inherit;
        border-color: var(--barad-night-line);
    }

    tbody tr:nth-child(even) {
        background: var(--barad-night-bg);
    }
}

/* Navigation and product overlays sit above the themed surfaces. */
body#barad-body :is(
    .bn-submenu, .bn-drawer-head, .bn-drawer-foot,
    .bcb-dialog, .bcb-dialog-head, .br-more-panel, .br-lightbox-header
) {
    background: var(--barad-night-paper);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
    color-scheme: dark;
}

body#barad-body .bcb-dialog::backdrop {
    background: rgb(4 8 15 / 75%);
}

body#barad-body :is(
    .bcb-close, .bn-close, .bpl-filter-toggle,
    .ba-path-tabs button, .bl-tabs button, .bq-quantity-input
):not(:is([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *)) {
    background: var(--barad-night-raised);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);

    &:hover {
        background: #344155;
    }

    &:focus-visible {
        outline: 2px solid #a9ccff;
        outline-offset: 3px;
    }

    &[aria-selected="true"], &[aria-pressed="true"], &[aria-expanded="true"] {
        background: #613144;
        color: #fff1f5;
        border-color: #d68aa2;
    }
}

/* Family product layout and the custom color picker. */
html body.barad-site :is(.bpt-panel, .bfam-pick, .bfam-all, .bo-sheet, .bcu-options):not(
    [class*="hero"] *, [class*="slider"] *, [class*="carousel"] *
) {
    background-color: var(--barad-night-paper) !important;
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
    color-scheme: dark;
}

html body.barad-site :is(.bfam-fields select, .bfam-search input, .bd-quantity input, .bq-quantity-input) {
    background: var(--barad-night-bg) !important;
    color: var(--barad-night-ink) !important;
    border-color: var(--barad-night-line) !important;
}

html body.barad-site :is(.bfam-hint, .bcu-status, .bpt-panel .barad-vat) {
    color: var(--barad-night-muted);
}

html body.barad-site .bcu-options .bcu-color {
    background-color: var(--barad-night-raised);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
}

html body.barad-site .bcu-options .bcu-color:is(:hover, :focus-visible, [aria-selected="true"], [aria-pressed="true"]) {
    outline: 2px solid var(--barad-night-muted);
    outline-offset: 2px;
}

html body.barad-site .bo-sheet :is(label, legend, h2, h3) {
    color: var(--barad-night-ink);
}

/* Barad navigation and content controls. Scope each surface to keep banners
   and carousel artwork on their original palette. */
html body.barad-site :is(
    #barad-page-top > .w, #barad-main-nav.bn-menu-open, .bn-submenu,
    .bo-sheet, .bcb-dialog, .bq-result, .bq-empty, .bq-summary-empty,
    .bpl-empty-search, .bpl-archive-body, .bah-search, .bo-field
):not(:is([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *, [aria-roledescription="carousel"] *)) {
    background: var(--barad-night-paper);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
    color-scheme: dark;
}

html body.barad-site #barad-page-top:not([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *) :is(
    .search, .search input, .head-contact, .head-contact a,
    .barad-menu-toggle, .bn-links > a, .bn-links > button
) {
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
}

html body.barad-site #barad-page-top:not([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *) .search {
    background: var(--barad-night-raised);
}

html body.barad-site :is(.bq-field, .bq-search, .bpl-search, .bah-search, .bo-field) :is(
    input:not([type="checkbox"], [type="radio"], [type="color"], [type="range"], [type="hidden"]),
    select, textarea
):not(:is([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *)) {
    background: var(--barad-night-bg);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
    accent-color: #d64a71;
    color-scheme: dark;

    &::placeholder { color: var(--barad-night-muted); }
    &:focus-visible { outline: 2px solid #a9ccff; outline-offset: 2px; }
}

html body.barad-site :is(.bpl-chip, .bo-chip, .bah-chips > a, .bq-active-filters > button):not(
    [class*="hero"] *, [class*="slider"] *, [class*="carousel"] *
) {
    background: var(--barad-night-raised);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);

    &:hover { background: #344155; }
    &[aria-current]:not([aria-current="false"]),
    &[aria-pressed="true"],
    &[aria-selected="true"] {
        background: #613144;
        color: #fff1f5;
        border-color: #d68aa2;
    }
}

html body.barad-site :is(.bq-price-note, .bq-cart-note, .bq-result-meta, .bpl-note, .bah-note, .bo-note):not(
    [class*="hero"] *, [class*="slider"] *, [class*="carousel"] *
) {
    color: var(--barad-night-muted);
}

html body.barad-site :is(.bq-cart-error, .bq-field [aria-invalid="true"], .bo-field [aria-invalid="true"]) {
    color: #ffb8c5;
    border-color: #ed8295;
}

html body.barad-site .bpl-table .bpl-price {
    color: #a9edc3;
}

/* Preserve the action color when the header's foreground token changes. */
html body.barad-site #barad-page-top:not([class*="hero"] *) .quote-link {
    background: #992342 !important;
    color: #fff !important;
    border-color: #b83858 !important;
}

html body.barad-site #barad-page-top:not([class*="hero"] *) .quote-link:hover {
    background: #b32c50 !important;
}

html body.barad-site :is(.breadcrumb, .bd-breadcrumb, .woocommerce-breadcrumb) a,
html body.barad-site .bpt-panel :is(small, .barad-vat, .bvm-quantity-hint) {
    color: var(--barad-night-muted);
}

html body.barad-site :is(.bpt-head h1, .bpt-panel .barad-unit, .barad-afshar-sales-link) {
    color: var(--barad-night-ink);
}

html body.barad-site :is(.bpt-specs .info-box, .bd-product-detail .info-box, .bpx-disc) {
    background: var(--barad-night-paper);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
}

html body.barad-site :is(.bpt-sku, .bpt-link, .bpx-coil, .bpx-disc > summary) {
    background: var(--barad-night-raised);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
}

html body.barad-site .bd-gallery .bd-g-count {
    background: #19202d;
    color: #fff;
}

html body.barad-site :is(.bah-card, .bah-art-card) :is(h2, h3, h4) a {
    color: var(--barad-night-ink);
}

html body.barad-site :is(.bah-more, .bah-textlink) {
    color: #ff9fb5;
}

html body.barad-site .bcb-card-link strong {
    color: var(--barad-night-ink);
}

html body.barad-site :is(.bcb-brands-label, .bcb-card-link small) {
    color: var(--barad-night-muted);
}

/* Quote wizard uses its own design tokens and explicit light surfaces. */
html body.barad-site .bq-wizard {
    --qs-ink: var(--barad-night-ink);
    --qs-ln: var(--barad-night-line);
    --qs-soft: var(--barad-night-raised);
    --bqw-line: var(--barad-night-line);
}

html body.barad-site :is(section.bq-fast, .bq-wizard .bq-stage, .bq-wizard .bq-cart, .bq-wizard .bq-result) {
    background: var(--barad-night-paper) !important;
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line) !important;
    color-scheme: dark;
}

html body.barad-site :is(.bq-wizard .bq-type label > span, .bq-wizard .bq-choice, .bq-wizard .bq-reset, .bq-wizard .bq-breadcrumbs button) {
    background: var(--barad-night-raised) !important;
    color: var(--barad-night-ink) !important;
}

html body.barad-site .bq-wizard .bq-type label > span i {
    background: #992342;
}

html body.barad-site :is(section.bq-fast input, .bq-search input, .bq-cart-color select) {
    background-color: var(--barad-night-bg) !important;
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line) !important;

    &::placeholder { color: var(--barad-night-muted); }
    &:focus-visible { outline: 2px solid #a9ccff !important; outline-offset: 2px; }
}

html body.barad-site .bpt-panel .bpt-price :is(.barad-vat, .barad-unit) {
    color: var(--barad-night-muted) !important;
}

html body.barad-site .bpt-panel .bpt-price .barad-vat b {
    color: #a9edc3;
}

/* Catalog group cards and category dialog. Product photographs keep their
   own background so white packaging and cable colors remain recognizable. */
html body.barad-site .bcb-heading :is(h2, p),
html body.barad-site .bcb-bubble strong,
html body.barad-site .bcb-dialog-head :is(h2, h3) {
    color: var(--barad-night-ink);
}

html body.barad-site :is(.bcb-bubble small, .bcb-hint) {
    color: var(--barad-night-muted);
}

html body.barad-site :is(.bcb-dialog-head > div > span, .bcb-all, .bcb-card-link, .bcb-subcategories i) {
    color: #ff9fb5;
}

html body.barad-site :is(.bcb-brand-options a, .bcb-subcategories a, .bcb-controls button) {
    background: var(--barad-night-raised);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
}

html body.barad-site :is(.bcb-brand-options a[aria-current]:not([aria-current="false"]), .bcb-subcategories a:hover, .bcb-subcategories a:focus-visible) {
    background: #613144;
    color: #fff1f5;
    border-color: #d68aa2;
}

/* Price tokens belong to the table and its controls. The opening banner
   keeps its original typography and colors. */
html body.barad-site.barad-price-page :is(.bpl-table-wrap, .bpl-filters, .bpl-summary, .bpl-archive-body) {
    --bpl-ink: var(--barad-night-ink);
    --bpl-muted: var(--barad-night-muted);
    --bpl-line: var(--barad-night-line);
    --bpl-cream: var(--barad-night-raised);
    --bpl-red: #ff9fb5;
    --bpl-green: #a9edc3;
    background: var(--barad-night-paper);
    color: var(--bpl-ink);
    border-color: var(--bpl-line);
}

html body.barad-site .bpl-top .bpl-card {
    --ink: #15181d;
    --muted: #626b78;
    --paper: #fff;
    --bg: #faf6ef;
    --line: #e6e1d9;
    color-scheme: light;
}

html body.barad-site .bpl-table :is(thead th, tbody td) {
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
}

html body.barad-site .bpl-table tbody tr:hover {
    background: var(--barad-night-raised);
}

/* Apply the academy palette at section level so titles, metadata and links
   inherit the same colors as their cards. */
html body.barad-site .bah-section:not([class*="hero"] *, [class*="carousel"] *, [class*="slider"] *) {
    --bah-ink: var(--barad-night-ink);
    --bah-muted: var(--barad-night-muted);
    --bah-line: var(--barad-night-line);
    --bah-cream: var(--barad-night-raised);
    --bah-accent: #ff9fb5;
    color: var(--barad-night-ink);
}

html body.barad-site .bah-section :is(.bah-card, .bah-art-card, .bah-search):not(
    [class*="carousel"] *, [class*="slider"] *, [aria-roledescription="carousel"] *
) {
    background: var(--barad-night-paper);
    color: var(--barad-night-ink);
    border-color: var(--barad-night-line);
}

/* The compact catalog and price refinements set these colors directly. */
html body.barad-site main .bcb-heading h2 {
    color: var(--barad-night-ink) !important;
}

html body.barad-site.barad-price-page main .bpl-summary {
    color: var(--barad-night-muted) !important;
}

/* Match the surface to its text where the page or widget sets a fixed color. */
html body.barad-site:has(main .bah) main:not([class*="hero"]) {
    background-color: var(--barad-night-bg) !important;
}

html body.barad-site :is(
    .bd-product-detail .info-box, .bpt .bd-quantity,
    .bah-section :is(.bah-path, .bah-pillar, .bah-faq details),
    .bq-stage input:not([type="radio"], [type="checkbox"], [type="submit"])
) {
    background: var(--barad-night-paper) !important;
    color: var(--barad-night-ink) !important;
    border-color: var(--barad-night-line) !important;
    color-scheme: dark;
}

html body.barad-site :is(.bpt .bd-quantity input, .bpt .bd-quantity span, .bah-section .bah-tag) {
    background: var(--barad-night-raised) !important;
    color: var(--barad-night-ink) !important;
    border-color: var(--barad-night-line) !important;
}

html body.barad-site :is(
    .bq-fast label, .bq-stage-hint, .bpt-panel .bvm-quantity-hint,
    .bpx-disc summary, .bpx-disc summary span, .bd-product-detail .info-box p,
    .barad-result-heading small, .barad-local-copy p, .btv-near-head p,
    .barad-local-categories .section-title p, .bc-form-panel .bc-muted,
    .barad-about .info-box p
) {
    color: var(--barad-night-muted) !important;
}

html body.barad-site :is(
    .barad-result-heading h2, .bd-st-head h2, .bfs-step > span,
    .barad-local-copy :is(h2, h3), .btv-near-head h3,
    .barad-local-categories .section-title h2,
    .barad-about .section-title h2
) {
    color: var(--barad-night-ink) !important;
}

html body.barad-site :is(
    .bc-form-panel .bc-kicker, .barad-about .ba-eyebrow,
    .barad-about .ba-text-link, .barad-wire-buying-guide a,
    .bd-product-detail .bd-kicker
) {
    color: #ff9fb5 !important;
}

html body.barad-site :is(.bd-spec-chips small, .bah-faq details p, .bd-st-head a) {
    color: var(--barad-night-muted) !important;
}

html body.barad-site .bfam-finders h2 {
    color: var(--barad-night-ink) !important;
}

html body.barad-site #barad-support :is(.bs-contact-menu .bs-contact-action, .bs-contact-toggle, .bs-contact-main-label) {
    background: var(--barad-night-raised) !important;
    color: var(--barad-night-ink) !important;
    border-color: var(--barad-night-line) !important;
}

html body.barad-site #barad-support .bs-contact-menu :is(.bs-contact-heading, small) {
    color: var(--barad-night-muted) !important;
}

html body.barad-site.barad-price-page main .bpl-table thead th {
    background: var(--barad-night-raised) !important;
    color: var(--barad-night-ink) !important;
}

html body.barad-site.barad-price-page main .bpl-table tbody tr {
    background: var(--barad-night-paper) !important;
}

html body.barad-site.barad-price-page main .bpl-table tbody tr:is(:hover, :focus-within) {
    background: var(--barad-night-raised) !important;
}

/* Category editorial uses explicit light backgrounds on both the outer and inner cards. */
html body.barad-site main :is(.bcg, .bfa, .bseo-guide) {
    --ink: var(--barad-night-ink);
    --muted: var(--barad-night-muted);
    --paper: var(--barad-night-paper);
    --soft: var(--barad-night-raised);
    --line: var(--barad-night-line);
    background-color: var(--barad-night-bg) !important;
    color: var(--barad-night-ink);
}

html body.barad-site main :is(
    .bcg-intro, .bcg-selection, .bcg-bubbles, .bseo-columns, .bseo-q,
    .barad-collection-tools, .bmp-box, .bcl-nav,
    .bfam, .bo-fast, .bck-reading, .bah-stats-strip, .bah-audience-grid,
    .bc-office, .bc-visit-card, .bc-channel, .bo-map-caption,
    .bo-direction-options, .btv-w, .btv-n, .brand-door, .contact-band
):not(:is([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *, #barad-footer *)) {
    background: var(--barad-night-paper) !important;
    color: var(--barad-night-ink) !important;
    border-color: var(--barad-night-line) !important;
}

html body.barad-site main :is(
    .bcg, .bseo-guide, .bfa, .bfam, .bo-fast, .bck-reading,
    .bah-stats-strip, .bah-audience-grid, .bc-office, .bc-channel,
    .bo-map-caption, .btv-w, .btv-n, .brand-door, .contact-band
) :is(h2, h3, h4, strong, label, summary):not(:is([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *)) {
    color: var(--barad-night-ink) !important;
}

html body.barad-site main :is(
    .bcg, .bseo-guide, .bfa, .bfam, .bo-fast, .bck-reading,
    .bah-audience-grid, .bc-office, .bc-channel, .bo-map-caption, .btv-w, .btv-n
) :is(p, small, li):not(:is([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *)) {
    color: var(--barad-night-muted) !important;
}

html body.barad-site :is(
    main :is(.bfam-open, .bcx-trigger, .bfs-tabs, .catalog-q, .bc-coordinate,
        .btv-btn, .bom-visit-open, .bd-g-zoom, .bq-area-shortcuts button, .bq-more),
    .bfam-dlg .bfam-dx, main .bo-direction-options a,
    main :is(.barad-local-location, #barad-tehran-buying, .bck-reading) .btn:not(.primary)
) {
    background: var(--barad-night-raised) !important;
    color: var(--barad-night-ink) !important;
    border-color: var(--barad-night-line) !important;
    color-scheme: dark;
}

html body.barad-site main :is(.bseo-guide a:not(.btn), .bfam .source-link) {
    color: #ffadc0 !important;
}

html body.barad-site main .source-link {
    background: #352735 !important;
    color: #ffadc0 !important;
    border-color: #755362 !important;
}

html body.barad-site main :is(.bo-office-map, .bom-frame, .bom-fallback, .btv-map) {
    background-color: var(--barad-night-raised) !important;
    color: var(--barad-night-ink);
}

html body.barad-site main .bom-fallback :is(p, span) {
    color: var(--barad-night-muted) !important;
}

html body.barad-site main :is(.bd-g-stage, .bd-g-slide) {
    background-color: var(--barad-night-raised) !important;
    color: var(--barad-night-ink);
}

/* BARAD DARK BRAND SURFACES — retain the original alpha and colored emblems. */
@media (prefers-color-scheme: dark) {
    html body.barad-site :is(.bh-brand-card[data-brand], .bgl-tile:has(img[src*="sgcc-logo-420.webp"])) {
        background: var(--barad-night-paper, #1b2330) !important;
        color: var(--barad-night-ink, #edf2f9) !important;
        border-color: var(--barad-night-line, #445064) !important;
    }
    html body.barad-site .bh-brand-card[data-brand] :is(.bh-brand-copy h2, .bh-brand-link) {
        color: var(--barad-night-ink, #edf2f9) !important;
    }
    html body.barad-site .bh-brand-card[data-brand] .bh-brand-copy p {
        color: var(--barad-night-muted, #b9c5d5) !important;
    }
    html body.barad-site .bh-brand-card[data-brand] .bh-representative {
        color: #ffadc0 !important;
    }
    html body.barad-site .bh-brand-card[data-brand] .bh-brand-logo {
        background: transparent !important;
    }
    html[lang] body.barad-site .bh-brand-card[data-brand] .bh-brand-logo img {
        mix-blend-mode: normal !important;
    }
    html[lang] body.barad-site .bh-brand-card[data-brand="afshar"] .bh-brand-logo img,
    html[lang] body.barad-site .bph-logo.bph-logo-afshar img[src*="afshar-logo-transparent"],
    html[lang] body.barad-site .barad-cf-image-link img[src*="afshar-logo-transparent"] {
        mix-blend-mode: normal !important;
        filter: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cfilter%20id%3D%22ink%22%20color-interpolation-filters%3D%22sRGB%22%3E%3CfeColorMatrix%20in%3D%22SourceGraphic%22%20type%3D%22matrix%22%20values%3D%220%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20-3.4%201.6%20-.2%200%201%22%20result%3D%22key%22%2F%3E%3CfeComponentTransfer%20in%3D%22key%22%20result%3D%22mask%22%3E%3CfeFuncA%20type%3D%22table%22%20tableValues%3D%220%200%200%20.25%201%201%22%2F%3E%3C%2FfeComponentTransfer%3E%3CfeFlood%20flood-color%3D%22%23edf2f9%22%20result%3D%22white%22%2F%3E%3CfeComposite%20in%3D%22white%22%20in2%3D%22mask%22%20operator%3D%22in%22%20result%3D%22ink%22%2F%3E%3CfeComposite%20in%3D%22ink%22%20in2%3D%22SourceGraphic%22%20operator%3D%22atop%22%2F%3E%3C%2Ffilter%3E%3C%2Fsvg%3E#ink") !important;
    }
}


/* BARAD DARK SURFACES V2 — component colors, outside promotional heroes. */
@media (prefers-color-scheme: dark) {
    body.barad-site {
        --bdm-accent: #ffadc0;
        --bdm-focus: #a9ccff;
        --bdm-good: #a9e4ba;
        --bdm-warn: #ffda98;
    }

    /* Menus, search, and control states. */
    html body.barad-site :is(#barad-page-top, .bn-drawer) :is(.bn-submenu, .bn-drawer-head, .bn-drawer-foot),
    html body.barad-site.barad-js-ready .head #barad-main-nav.bn-nav:not([class*="hero"] *) {
        background-color: var(--barad-night-paper) !important;
        border-color: var(--barad-night-line) !important;
        color: var(--barad-night-ink) !important;
    }
    html body.barad-site :is(.bn-submenu, .bn-drawer) :is(a, summary, button):not(.quote-link) {
        color: var(--barad-night-ink);
    }
    html body.barad-site :is(.bn-submenu, .bn-drawer) :is(a, summary):is(:hover, :focus-visible, [aria-current="page"]) {
        background-color: var(--barad-night-raised);
        color: var(--bdm-accent);
    }
    html body.barad-site :is(.bq-wizard, .bc-form, .barad-build, #bs-panel, .bfam, .bpl-filters)
        :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="submit"], [type="button"]), textarea, select) {
        background-color: var(--barad-night-bg) !important;
        border-color: var(--barad-night-line) !important;
        color: var(--barad-night-ink) !important;
        color-scheme: dark;
        accent-color: #ed5575;
    }
    html body.barad-site :is(.bq-wizard, .bc-form, .barad-build, #bs-panel, .bfam, .bpl-filters)
        :is(input, textarea)::placeholder {
        color: var(--barad-night-muted);
        opacity: 1;
    }
    html body.barad-site :is(.bq-wizard, .bc-form, .barad-build, #bs-panel, .bfam, .bpl-filters, .bn-drawer)
        :focus-visible {
        outline: 2px solid var(--bdm-focus);
        outline-offset: 2px;
    }

    /* Article reading, estimator, contact, and partner content. */
    html body.barad-site :is(
        .bap-prose blockquote, .br-aside, .be-toc, .be-checklist, .be-request,
        .be-table-wrap, .be-sources, .be-reading-next, .be-product-reading, .be-formula,
        .be-diagram, table.be-comparison, .be-comparison caption,
        .barad-build-notice, .barad-build-card, .barad-build-kpi, .barad-build-table-wrap,
        .barad-build-prices, .barad-build-info article, .barad-build-faq details, .barad-build-result:not(:empty),
        .bc-ghost, .bc-callout, .bc-channel, .bc-form-panel, .bc-visit-card, .bc-coordinate,
        .barad-cf-partner, .barad-cf-gallery figure, .barad-cf-document-grid figure,
        .barad-cf-nav-grid a, .bpp-jump, .br-partners .br-card
    ):not(:is([class*="hero"] *, [class*="slider"] *, [class*="carousel"] *)) {
        background: var(--barad-night-paper) !important;
        border-color: var(--barad-night-line) !important;
        color: var(--barad-night-ink) !important;
    }
    html body.barad-site :is(.bap-prose, .br-aside, .be-toc, .be-sources, .barad-build, .bc-form-panel, .barad-cf-partner)
        :is(h2, h3, h4, label, legend, summary, figcaption):not([class*="hero"] *) {
        color: var(--barad-night-ink);
    }
    html body.barad-site :is(.bap-prose, .be-toc, .be-sources, .barad-build-info) a:not([class*="btn"], [class*="button"]) {
        color: var(--bdm-accent);
    }
    html body.barad-site .be-comparison :is(th, td),
    html body.barad-site .barad-build :is(th, td) {
        color: var(--barad-night-ink);
        border-color: var(--barad-night-line);
    }
    html body.barad-site :is(.be-comparison, .barad-build) thead th,
    html body.barad-site .be-comparison tbody th,
    html body.barad-site .be-comparison tbody tr:nth-child(even) > *,
    html body.barad-site .barad-build tbody tr:nth-child(even) {
        background: var(--barad-night-raised) !important;
    }

    /* Product and quotation states, with separate success and warning colors. */
    html body.barad-site :is(.bfam-example, .bfam-overview dl > div, .bfam-more > summary, .bfam-table-wrap thead th,
        .bd-specification, .bd-product-visual figcaption, .bd-inquiry-context,
        .bpl-group, .bpl-step, .bpl-archive, .bq-more, .bq-added-actions [data-new-type]) {
        background: var(--barad-night-paper) !important;
        border-color: var(--barad-night-line) !important;
        color: var(--barad-night-ink) !important;
    }
    html body.barad-site :is(.bq-wizard .bq-type input:checked + span, .bq-choice:focus-visible, .bfam-table-wrap .is-active,
        .barad-build .barad-build-presets button:hover) {
        background: #302837 !important;
        color: var(--bdm-accent) !important;
        border-color: #8d5c75 !important;
    }
    html body.barad-site :is(.bc-success, .be-callout.is-tip, .bq-added-mark, .bpl-tags .ok) {
        background: #17352e !important;
        color: var(--bdm-good) !important;
        border-color: #477664 !important;
    }
    html body.barad-site :is(.be-callout.is-warn, .barad-build-warning, .bpl-tags .off) {
        background: #3a2e20 !important;
        color: var(--bdm-warn) !important;
        border-color: #896b44 !important;
    }
    html body.barad-site :is(.bc-error, .bs-error) {
        background: #432530 !important;
        color: #ffc6ce !important;
        border-color: #9e5a69 !important;
    }
    html body.barad-site .be-callout:not(.is-tip, .is-warn) {
        background: #21344a !important;
        color: #d1e5ff !important;
        border-color: #4e6d94 !important;
    }

    /* Floating support widgets. Product photos and document thumbnails stay untouched. */
    html body.barad-site :is(#bs-panel, #barad-support .bs-contact-menu, #barad-support .bs-handoff) {
        background: var(--barad-night-paper) !important;
        border-color: var(--barad-night-line) !important;
        color: var(--barad-night-ink) !important;
        color-scheme: dark;
    }
    html body.barad-site #barad-support :is(.bs-agent, .bs-quick button, .bs-compose, .bs-foot, .bs-status, .bs-cancel) {
        background: var(--barad-night-raised) !important;
        border-color: var(--barad-night-line) !important;
        color: var(--barad-night-ink) !important;
    }
    html body.barad-site #barad-support .bs-message:not(.bs-error) {
        background: var(--barad-night-bg);
        color: var(--barad-night-ink);
    }
}

