.edpt-shared-header .edpt-appearance-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 21px;
    line-height: 1;
}

.edpt-shared-header .edpt-appearance-toggle[hidden],
.edpt-appearance-toggle[aria-pressed="false"] .edpt-appearance-sun,
.edpt-appearance-toggle[aria-pressed="true"] .edpt-appearance-moon {
    display: none;
}

.edpt-appearance-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

@media screen {
    html[data-edpt-appearance="dark"] {
        color-scheme: dark;
        --edpt-night-page: #161c2a;
        --edpt-night-card: #212a3c;
        --edpt-night-section: #283347;
        --edpt-night-line: #515e75;
        --edpt-night-text: #f2efe8;
        --edpt-night-muted: #bcc6d7;
        --edpt-night-accent: #efd28e;
        background-color: var(--edpt-night-page);
    }

    [data-edpt-appearance="dark"] body.edpt-native {
        background: var(--edpt-night-page);
        color: var(--edpt-night-text);
    }

    [data-edpt-appearance="dark"] :is(
        .edpt-home-layout, .edpt-company-layout, .edpt-champ-layout,
        .edpt-portfolio-layout, .edpt-lex-layout, .edpt-event-layout
    ) {
        --paper: var(--edpt-night-page);
        --ink: var(--edpt-night-text);
        --muted: var(--edpt-night-muted);
        --line: var(--edpt-night-line);
        --copper: var(--edpt-night-accent);
        background-color: var(--edpt-night-page);
        color: var(--edpt-night-text);
    }

    [data-edpt-appearance="dark"] :is(
        .edpt-shared-header, .edpt-shared-footer, .edpt-shared-header header,
        .edpt-shared-header .edpt-menu-original, .edpt-analysis-card, .lex-entry,
        .edpt-shared-header .mega, .edpt-language-options,
        .edpt-panel, .edpt-company, .edpt-post-card, .edpt-event-card, .edpt-term,
        .edpt-content .wp-block-table, .edpt-content blockquote,
        .edpt-native .rail-card, .edpt-lex-layout .related-card,
        .edpt-home-layout .listing, .edpt-home-layout .need-card,
        .edpt-home-layout .search-panel, .edpt-home-layout .newsletter,
        .edpt-home-layout .discovery-ticker, .edpt-home-layout .institution-strip,
        .edpt-company-layout .company-heading, .edpt-company-layout .regulatory-card,
        .edpt-company-layout .document-card, .edpt-company-layout .company-event,
        .edpt-company-layout .company-takeaway, .edpt-company-layout .review-overview,
        .edpt-company-layout .side-favorite, .edpt-company-layout .service-pill,
        .edpt-company-layout .quiet-action, .edpt-company-layout .company-photo-dialog,
        .edpt-champ-layout .competition-stats, .edpt-champ-layout .edpt-podium-card,
        .edpt-champ-layout .ranking-table-box, .edpt-champ-layout .fund-highlight,
        .edpt-champ-layout .edpt-popular-portfolios
    ) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    [data-edpt-appearance="dark"] :is(
        .edpt-directory-section, .edpt-filter-form, .edpt-home-layout .filters,
        .edpt-home-layout .directory, .edpt-home-layout .faq-section,
        .edpt-home-layout .knowledge, .edpt-home-layout .assessment,
        .edpt-native .article-toc, .edpt-expert-analyses .lex-searchbox,
        .edpt-company-layout .company-quick-facts,
        .edpt-company-layout .company-warning, .edpt-company-layout .side-address,
        .edpt-company-layout .company-provenance, .edpt-company-layout .responsibility,
        .edpt-champ-layout .ranking-toolbox, .edpt-champ-layout .rank-table thead,
        .edpt-champ-layout .rank-table tbody td, .edpt-champ-layout .champ-format
    ) {
        background-color: var(--edpt-night-section) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    [data-edpt-appearance="dark"] :is(
        .edpt-panel, .edpt-company, .edpt-post-card, .rail-card, .edpt-content,
        .edpt-expert-analyses .lex-hero, .edpt-analysis-card, .lex-entry, .analyses-editorial,
        .edpt-filter-form, .edpt-shared-header, .edpt-shared-footer, .edpt-home-layout .need-card,
        .edpt-home-layout .listing, .edpt-home-layout .section-title,
        .edpt-company-layout .company-heading, .edpt-company-layout .company-quick-facts,
        .edpt-company-layout .company-warning, .edpt-champ-layout .edpt-podium-card
    ) :is(h1, h2, h3, h4, p, label, dt, dd, small) {
        color: inherit !important;
    }

    [data-edpt-appearance="dark"] :is(
        .edpt-home-layout .listing-tags span, .edpt-tags a, .edpt-letters a,
        .edpt-home-layout .field, .edpt-champ-layout .mode-pill,
        .edpt-language-options a:hover, .edpt-language-options a[aria-current]
    ) {
        background-color: var(--edpt-night-section) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    [data-edpt-appearance="dark"] .edpt-native :is(
        input:not([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="hidden"]),
        select, textarea
    ) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    [data-edpt-appearance="dark"] .edpt-native :is(input, textarea)::placeholder {
        color: var(--edpt-night-muted);
        opacity: 1;
    }

    [data-edpt-appearance="dark"] :is(.edpt-content, .article-content, .article-body) a:not([class]),
    [data-edpt-appearance="dark"] .edpt-shared-header .nav-group[open] summary {
        color: var(--edpt-night-accent);
    }

    [data-edpt-appearance="dark"] .edpt-shared-header :is(
        .logo, .edpt-language-switcher summary, .edpt-nav-original summary,
        .mega-heading, .mega-links a
    ) {
        color: var(--edpt-night-text);
    }

    [data-edpt-appearance="dark"] .edpt-shared-header .edpt-nav-original.open::before {
        color: var(--edpt-night-text);
    }

    [data-edpt-appearance="dark"] .edpt-shared-header .edpt-nav-original.open > .nav-group[open],
    [data-edpt-appearance="dark"] .edpt-shared-header .edpt-nav-original.open > .nav-group > summary:hover {
        background-color: var(--edpt-night-section);
        border-color: var(--edpt-night-line);
    }

    [data-edpt-appearance="dark"] .edpt-home-layout .primary {
        background-color: var(--edpt-night-accent);
        color: var(--edpt-night-page);
    }

    [data-edpt-appearance="dark"] :is(
        .edpt-language-options a, .edpt-expert-analyses .edpt-analysis-card > a
    ) {
        color: var(--edpt-night-text);
    }

    [data-edpt-appearance="dark"] .edpt-expert-analyses :is(.edpt-analysis-meta, .edpt-analysis-summary) {
        color: var(--edpt-night-muted) !important;
    }

    [data-edpt-appearance="dark"] .edpt-expert-analyses .edpt-analysis-meta > span {
        color: var(--edpt-night-accent);
    }

    /* Keep existing light SVG plots and their labels readable together. */
    [data-edpt-appearance="dark"] :is(.edpt-chart-wrap, .edpt-chart-tooltip) {
        color-scheme: light;
        color: #181e35;
    }
}

@media screen and (max-width: 1400px) {
    [data-edpt-appearance="dark"] .edpt-shared-header .edpt-nav-original {
        background-color: var(--edpt-night-card) !important;
    }
}

@media print {
    .edpt-shared-header .edpt-appearance-toggle {
        display: none;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-company h3 a, .edpt-company h2 a, .edpt-company .edpt-company-name,
        .edpt-shared-header .edpt-nav-original summary,
        .edpt-shared-header .edpt-nav-original summary a,
        .edpt-shared-header .edpt-nav-original .mega-heading,
        .edpt-shared-header .edpt-nav-original .mega-links a,
        .edpt-shared-footer footer a, .edpt-shared-footer .footer-bottom p
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-company-professions, .edpt-company-link, .verification-link,
        .edpt-approved-home .edpt-page-indicator, .edpt-approved-home .faq-section a,
        .edpt-company-layout .company-kicker, .edpt-company-layout .section-overline,
        .edpt-company-layout .rating-star, .edpt-company-layout .review-stars,
        .edpt-company-layout .event-status, .edpt-company-layout .edpt-register-link,
        .edpt-company-layout .company-warning a, .edpt-company-layout .side-address a,
        .edpt-company-layout .company-description a
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-approved-home .filters label, .edpt-approved-home .search-panel label,
        .edpt-approved-home .faq-section p, .edpt-shared-header .edpt-mega-description,
        .edpt-company-layout .breadcrumbs *, .edpt-company-layout .company-location-line a:not(.company-category),
        .edpt-company-layout .company-rating span:not(.rating-star),
        .edpt-company-layout .company-description :is(p, li, strong, span),
        .edpt-company-layout .fact-label, .edpt-company-layout .edp-company-team__role,
        .edpt-company-layout .regulatory-card span, .edpt-company-layout .review-overview :is(p, small),
        .edpt-company-layout .company-takeaway :is(p, strong),
        .edpt-company-layout .company-event p, .edpt-company-layout .side-address address
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-company-layout :is(
        .fact-value, .company-rating strong, .edp-company-team h3,
        .review-score, .edpt-register-value, .regulatory-card strong
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-company-layout .rail-button {
        background: var(--edpt-night-section) !important;
        border-color: var(--edpt-night-line) !important;
        color: var(--edpt-night-text) !important;
    }

    /* Formations uses the plugin's own catalogue components. */
    html[data-edpt-appearance="dark"] .edpt-native .edpf {
        color: var(--edpt-night-text);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpf :is(
        .edpf-hero aside, .edpf-filter-sidebar, .edpf-card, .edpf-organism-tile,
        .edpf-tariff-segments, .edpf-badge:not(.edpf-audience-badge),
        .edpf-card-tags > *, .edpf-card-facts > *
    ) {
        background-color: var(--edpt-night-card);
        border-color: var(--edpt-night-line);
        color: var(--edpt-night-text);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpf :is(
        h1, h2, h3, h4, h3 a, label, .edpf-filter-sidebar summary,
        .edpf-button-outline, .edpf-card-facts strong, .edpf-organism-tile strong
    ) {
        color: var(--edpt-night-text);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpf :is(
        p, .edpf-card-facts small, .edpf-organism-tile small, .edpf-filter-options small
    ) {
        color: var(--edpt-night-muted);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpf :is(
        .edpf-eyebrow, h1 em, .edpf-proposal-link, .edpf-organisme,
        .edpf-card-link, .edpf-organism-tile-arrow, .edpf-catalog-toolbar a:not(.edpf-button)
    ) {
        color: var(--edpt-night-accent);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpf .edpf-button-outline:hover {
        background: var(--edpt-night-section);
        color: var(--edpt-night-text);
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-approved-home .need-card :is(h3, p, span),
        .edpt-approved-home .resource-box.assessment b,
        .edpt-company-layout .company-tabs a,
        .edpt-company-layout .edp-company-video__provider,
        .edpf .edpf-filter-title a, .edpf .edpf-heading a
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-company-layout .edp-company-video {
        background-color: var(--edpt-night-card);
        color: var(--edpt-night-text);
        border-color: var(--edpt-night-line);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpf :is(.edpf-card-body > small, .edpf-organism-tile-copy > span) {
        color: var(--edpt-night-muted);
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-approved-home .hero-aside a, .edpt-approved-home .seo-copy a,
        .edpt-company-layout .edp-company-video__watch,
        .edpt-company-layout .company-section > p a,
        .edpf .edpf-seo-columns a
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edp-company-video strong {
        color: var(--edpt-night-text);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edp-company-video__description {
        color: var(--edpt-night-muted);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-shared-header .nav-group > summary:hover {
        background-color: var(--edpt-night-section);
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native .edpt-approved-home .need-card:hover {
        background: var(--edpt-night-section) !important;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .native-chart, .insight-panel, .vp-featured-fund-card, .event-card
    ),
    html[data-edpt-appearance="dark"] .edpt-native.single-edpf_course .edpf :is(
        .edpf-course-hero, .edpf-summary
    ),
    html[data-edpt-appearance="dark"] .edpt-native .edpt-wealth-guide :is(
        .edpt-profile-heading-aside, .sim-section, .edpt-profile-heading-copy .edpt-button,
        .edp-sim-hub li
    ) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .competition-stats strong, .edpt-timeline h2, .native-chart h3,
        .ranking-area h3, .ranking-area label, .rank-table th,
        .edpt-player-surname, .edpt-podium-card strong, .event-card strong,
        .edpt-popular-portfolios strong, .insight-panel h2, .insight-panel th,
        .insight-panel td, .rank-table td a
    ),
    html[data-edpt-appearance="dark"] .edpt-native.single-edpf_course .edpf :is(
        .edpf-course-hero h1, .edpf-summary :is(dt, dd, h2)
    ),
    html[data-edpt-appearance="dark"] .edpt-native .edpt-wealth-guide :is(
        .inner-title, .edpt-profile-heading-aside h2, .sim-section :is(h2, h3, strong)
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .competition-stats span, .partners-caption, .native-chart p,
        .edpt-podium-caption, .edpt-popular-portfolios small,
        .rank-table td small, .event-card .event-location, .event-date span
    ),
    html[data-edpt-appearance="dark"] .edpt-native.single-edpf_course .edpf :is(
        .edpf-course-hero p, .edpf-summary p, .edpf-course-layout small
    ),
    html[data-edpt-appearance="dark"] .edpt-native .edpt-wealth-guide :is(
        .edpt-profile-heading-copy p, .edpt-profile-heading-aside p,
        .byline span, .sim-section :is(p, li)
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .partner-out, .edpt-timeline-month, .native-chart-eyebrow,
        .edpt-podium-rank, .edpt-popular-rank, .edpt-popular-count,
        .insight-panel .eyebrow, .insight-panel td a
    ),
    html[data-edpt-appearance="dark"] .edpt-native.single-edpf_course .edpf :is(
        .edpf-course-hero a:not(.edpf-button), nav a
    ),
    html[data-edpt-appearance="dark"] .edpt-native .edpt-wealth-guide :is(
        .inner-kicker, .byline-mark, .edp-sim-hub a:not([class]), .article-toc a
    ) {
        color: var(--edpt-night-accent) !important;
    }

    /* Match the labels to the light plotting surface. */
    html[data-edpt-appearance="dark"] .edpt-native .vp-category-assets {
        color: #181e35;
        color-scheme: light;
    }

    html[data-edpt-appearance="dark"] .edpt-native .vp-category-assets__axis {
        color: #485366;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .format-card, .champ-editorial, .edpt-general-ranking .edpt-pages :is(a, span)
    ),
    html[data-edpt-appearance="dark"] .edpt-native .edpt-wealth-guide :is(.sim-card, .edpt-button:not(.edpt-button-primary)) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .ranking-heading p, .edpt-general-ranking h3, .edpt-ranking-search label,
        .rank-table td a span, .vp-featured-fund-card h2, .vp-featured-fund-card__isin,
        .vp-featured-fund-card__company, .format-card :is(h3, p),
        .champ-editorial :is(h2, p)
    ),
    html[data-edpt-appearance="dark"] .edpt-native .edpt-wealth-guide :is(
        .article-byline span, .sim-card :is(h3, p)
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .edpt-partner-contact a, .event-card :is(h3 a, a > span),
        .vp-featured-fund-card__badge, .vp-featured-fund-card__learn,
        .insight-panel a, .format-card > span, .champ-editorial .eyebrow
    ),
    html[data-edpt-appearance="dark"] .edpt-native .edpf .edpf-summary .edpf-price,
    html[data-edpt-appearance="dark"] .edpt-native .edpt-wealth-guide :is(
        .edpt-profile-heading-aside a, .sim-card-link
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .vp-category-assets :is(header span, svg text) {
        color: #485366;
        fill: #485366;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .edpt-timeline-dates span, .faq-answer p, .champ-editorial li
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .event-card-bottom span, .format-card a, .faq-answer a
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native #edpt-main.edpt-champ-layout .vp-featured-fund-card__intro h2 {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-champ-layout :is(
        .vp-category-assets__head span, .edpt-chart-legend button strong
    ) {
        color: #785800 !important;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-verification, .edpf .edpf-empty, .edpt-event-layout .events-filter-area,
        .edpt-event-layout .event-card, .edpt-event-layout .events-featured,
        .edpt-event-layout .events-publish, .edpt-event-layout .edpt-directory-editorial
    ) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-result-count, .edpt-company .edpt-company-country,
        .edpt-company .edpt-company-location a, .edpt-company .edpt-locations a,
        .edpt-event-layout .events-hero p, .edpt-event-layout .events-publish p,
        .edpt-event-layout .event-location, .edpt-event-layout .event-date span,
        .edpt-event-layout .events-filter-area label
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-filter-form a, .edpt-verification a, .edpt-page-indicator,
        .edpt-event-layout .events-kicker, .edpt-event-layout .events-hero em,
        .edpt-event-layout .events-reset, .edpt-event-layout .event-type,
        .edpt-event-layout .event-card-bottom span,
        .edpt-event-layout .event-date strong, .edpt-event-layout .events-view a:not(.is-active)
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-event-layout :is(
        .events-month-title, .event-card h3 a, .event-card h2 a,
        .edpt-directory-editorial :is(h2, h3)
    ) {
        color: var(--edpt-night-text) !important;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-hub-card, .edpt-lex-layout .lex-searchbox, .edpt-lex-layout .lex-popular,
        .edpt-lex-layout .lex-alphabet > *, .edpt-lex-layout .lex-chips a,
        .edpt-lex-layout .edpt-pages a, .edpt-lex-layout .definition-heading,
        .edpt-lex-layout .rail-button, .edpt-lex-layout .wp-block-list,
        .edpt-partners-hub .edpt-directory-editorial, .edpt-partners-hero-note,
        .edpt-partner-layout .edpt-partner-fund
    ) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-hub-heading .inner-title, .edpt-hub-editorial :is(h2, h3),
        .rail-card h3 a, .edpt-lex-layout .lex-popular h2,
        .edpt-lex-layout .definition-heading h1, .edpt-partners-hero-copy h1,
        .edpt-partners-section-heading h2, .edpt-partners-vision h2,
        .edpt-partner-layout .edpt-partner-section h2
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-hub-editorial p, .edpt-lex-layout .breadcrumbs *,
        .edpt-lex-layout .lex-searchbox label, .edpt-lex-layout .definition-heading p,
        .edpt-lex-layout .wp-block-list li, .edpt-partners-breadcrumb *,
        .edpt-partners-hero-copy p, .edpt-partners-section-heading p,
        .edpt-partners-vision p, .edpt-partner-risk p,
        .edpt-partner-layout .edpt-partner-section p
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-hub-heading .inner-kicker, .edpt-hub-number, .rail-overline,
        .edpt-post-card .edpt-kicker, .edpt-lex-layout .lex-kicker,
        .edpt-lex-layout .lex-searchbox a, .edpt-lex-layout .lex-entry > span,
        .edpt-lex-layout .toc-top span, .edpt-lex-layout .related-card span,
        .edpt-lex-layout .definition-next a, .edpt-partners-eyebrow,
        .edpt-partners-hub :is(h1, h2) em, .edpt-partners-bottom a,
        .edpt-partner-eyebrow, .edpt-partner-risk a, .edpt-partner-return a
    ) {
        color: var(--edpt-night-accent) !important;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native .edpt-partner-layout :is(
        .edpt-partner-section, .edpt-partner-method
    ) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-hub-card h2 a, .edpt-partners-hero-note h2,
        .edpt-partner-layout .edpt-partner-connect h2,
        .edpt-partner-layout .edpt-partner-section h3
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-hub-card p, .edpt-partners-hero-note p,
        .edpt-partner-layout .edpt-partner-contact dt, .edpt-partner-layout .edpt-partner-method > span,
        .edpt-partner-layout .edpt-partner-connect p
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-hub-card .edpt-hub-link, .edpt-partners-monogram,
        .edpt-partner-layout .edpt-partner-section a:not(.edpt-partner-action)
    ) {
        color: var(--edpt-night-accent) !important;
    }
}

.edpt-appearance-label {
    display: none;
}

@media screen and (max-width: 1400px) {
    .edpt-shared-header .edpt-header-tools > .edpt-appearance-toggle {
        display: none;
    }

    .edpt-shared-header .edpt-mobile-appearance {
        flex: none;
        width: min(100%, 1120px);
    }

    .edpt-shared-header .edpt-mobile-appearance .edpt-appearance-toggle {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 52px;
        height: auto;
        padding: 12px 18px;
        border-radius: 18px;
        text-align: start;
    }

    .edpt-mobile-appearance .edpt-appearance-label {
        display: inline;
        font-size: 16px;
    }

    .edpt-mobile-appearance .edpt-appearance-toggle[aria-pressed="true"] {
        border-color: var(--edpt-night-accent);
        color: var(--edpt-night-accent);
    }
}

.edpt-appearance-toggle :is(.edpt-appearance-moon, .edpt-appearance-sun) {
    font-size: 16px;
    line-height: 1;
}

.edpt-shared-header .edpt-header-tools > .edpt-appearance-toggle {
    border-color: transparent;
}

.edpt-appearance-toggle :is(.edpt-appearance-moon, .edpt-appearance-sun) {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

@media screen and (max-width: 1400px) {
    .edpt-shared-header .edpt-mobile-appearance {
        margin-top: 30px;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native main:is(
        .edpt-simulator-directory, .edpt-wealth-assessment,
        :has(.edp-sim-hub, .edp-simu, .edp-investor-profile, .edp-faq, .edp-register-premium)
    ) :is(
        .edpt-title, .edpt-profile-heading-aside h2,
        .sim-section :is(h2, h3), .edp-faq :is(h2, h3),
        .edp-simu__step-title, .sand-audit-head h2,
        .edp-register-profiles legend, .edp-register-premium label,
        .edp-simu__amount-input > span
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native main:is(
        .edpt-simulator-directory, .edpt-wealth-assessment,
        :has(.edp-sim-hub, .edp-simu, .edp-investor-profile, .edp-faq, .edp-register-premium)
    ) :is(
        .edpt-profile-heading-copy p, .edpt-profile-heading-aside p,
        .article-byline span, .edpt-simulator-card-description, .sim-section p,
        .edp-sim-hub li, .edp-faq p, .edp-faq strong, .sand-audit-head p,
        .edp-simu__field small, .sand-audit-note
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native main:is(
        .edpt-simulator-directory, .edpt-wealth-assessment,
        :has(.edp-sim-hub, .edp-simu, .edp-investor-profile, .edp-faq, .edp-register-premium)
    ) :is(
        .inner-kicker, .sim-overline, .edpt-profile-heading-aside em,
        .edp-sim-hub a:not([class]), .sim-card h3 a
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native main:is(
        .edpt-simulator-directory, .edpt-wealth-assessment,
        :has(.edp-simu, .edp-sim-hub, .edp-investor-profile, .edp-faq, .edp-register-premium)
    ) :is(
        .edpt-profile-heading-aside, .edpt-button:not(.edpt-button-primary), .sim-section,
        .sim-card, .edp-sim-hub li, .edp-faq__item, .edp-register-profile
    ),
    html[data-edpt-appearance="dark"] .edpt-native :is(
        .sand-audit-card, .sand-audit-step, .sand-audit-choice,
        .edp-simu__shell, .edp-simu__choice, .edp-simu__kpi,
        .edp-simu__card, .edp-simu__notice, .edp-simu__btn--ghost,
        .edpt-definition-layout .lex-note
    ) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edp-simu__choice:has(:checked), .sand-audit-choice:has(:checked),
        .edp-register-profile:has(:checked)
    ) {
        background-color: var(--edpt-night-section) !important;
        border-color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edp-simu__result :is(h2, h3, p), .edp-simu__card :is(strong, li),
        .edp-simu__field label, .sand-audit-field label, .sand-audit-choice span,
        .edp-register-profile strong, .edp-register-cgu span
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .sand-audit-btn-secondary, .edp-simu__restart
    ) {
        background-color: var(--edpt-night-section) !important;
        color: var(--edpt-night-text) !important;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edp-sim-hub .sim-limit, .edp-sim-hub .sim-cta,
        .edpt-simulator-directory .sim-limit, .edpt-simulator-directory .sim-cta,
        .edp-simu__field, .sand-audit-form .edp-newsletter-consent label,
        .edpt-wealth-assessment .edp-newsletter-consent label,
        .edp-register-premium .edp-register-profile:hover
    ) {
        background-color: var(--edpt-night-section) !important;
        border-color: var(--edpt-night-line) !important;
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .sim-limit p, .sim-cta p, .edp-simu__field small
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .sim-cta h3, .edp-simu__field > span
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .sim-cta a:not(.sim-button), .edp-sim-hub .sim-card-link, .sim-card .sim-amount,
        .edpt-simulator-directory .edpt-profile-heading-aside a,
        .edpt-wealth-assessment .edpt-profile-heading-aside a
    ) {
        color: var(--edpt-night-accent) !important;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native .edp-sim-hub .sim-button {
        background-color: var(--edpt-night-accent) !important;
        color: var(--edpt-night-page) !important;
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native .edpt-shared-footer footer .edpt-footer-social a {
        background: var(--edpt-night-section);
        border-color: var(--edpt-night-line);
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-shared-footer footer .edpt-footer-social a:is(:hover, :focus-visible) {
        background: var(--edpt-night-accent);
        border-color: var(--edpt-night-accent);
        color: var(--edpt-night-page) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-taxonomy-hero, .edpt-location-compass, .edpt-location-guidance,
        .edpt-location-page .edpt-directory-editorial, .edpt-location-territory-grid a,
        .edpt-registration-grid article, .edpt-registration-note,
        .edpt-partner-layout .edp-champ-premium, .edpt-tag-card,
        .editorial-main .edpt-actions .edpt-button:not(.edpt-button-primary)
    ) {
        background-color: var(--edpt-night-card) !important;
        color: var(--edpt-night-text) !important;
        border-color: var(--edpt-night-line) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .editorial-main .edpt-title, .editorial-main .edpt-content :is(h2, h3, strong),
        .edpt-taxonomy-hero :is(h1, h2), .edpt-location-page :is(h1, h2),
        .edpt-location-territory-grid a strong, .edpt-registration-grid h3,
        .edp-champ-premium label, .edpt-related-analyses h2, .edpt-tag-card h3 a
    ) {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .editorial-main .article-byline span, .editorial-main .edpt-content :is(p, li),
        .edpt-taxonomy-hero p, .edpt-location-breadcrumb *, .edpt-location-hero p,
        .edpt-location-heading p, .edpt-location-map-foot span,
        .edpt-location-guidance p, .edpt-location-compass p,
        .edpt-registration-grid p, .edpt-partner-hero p, .edpt-tag-card p,
        .edpt-analysis-date time, .edpt-tags-label
    ) {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .editorial-main .inner-kicker, .editorial-main .edpt-content a:not([class]),
        .edpt-location-eyebrow, .edpt-location-page :is(h1, h2) em,
        .edpt-location-guidance article > span, .edpt-location-actions a:not(:first-child),
        .edpt-location-map-foot a, .edpt-registration-grid article > span,
        .edp-champ-premium label a, .edpt-tag-kicker, .edpt-tag-read
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-location-page .leaflet-control-attribution {
        background: var(--edpt-night-card);
        color: var(--edpt-night-muted);
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-location-page .leaflet-control-attribution a {
        color: var(--edpt-night-accent);
    }
}

@media screen {
    html[data-edpt-appearance="dark"] .edpt-native .editorial-main .edpt-content ul:not([class]),
    html[data-edpt-appearance="dark"] .edpt-native .editorial-main .edpt-content li {
        background-color: var(--edpt-night-section) !important;
        border-color: var(--edpt-night-line) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(
        .edpt-taxonomy-hero .edpt-kicker, .edpt-taxonomy-hero h1 em,
        .edpt-taxonomy-hero .edpt-category-registration a, .edpt-location-territory-grid a > span:last-child
    ) {
        color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-location-guidance h3 {
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-location-actions a > span {
        color: inherit;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edpt-tag-date time {
        color: var(--edpt-night-muted) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edp-champ-premium .edp-champ-premium__choice {
        background: var(--edpt-night-section) !important;
        border-color: var(--edpt-night-line) !important;
        color: var(--edpt-night-text) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edp-champ-premium .edp-champ-premium__choice:has(:checked) {
        border-color: var(--edpt-night-accent) !important;
    }

    html[data-edpt-appearance="dark"] .edpt-native .edp-champ-premium .edp-champ-premium__choice span {
        color: inherit !important;
    }
}

@media screen {
    .edpt-native :is(.edpt-shared-header, .edpt-shared-footer) {
        --edpt-chrome-accent: #a45235;
    }

    html[data-edpt-appearance="dark"] .edpt-native :is(.edpt-shared-header, .edpt-shared-footer) {
        --edpt-chrome-accent: var(--edpt-night-accent);
    }

    .edpt-native .edpt-shared-header header {
        border-bottom-color: color-mix(in srgb, var(--edpt-chrome-accent) 42%, transparent);
    }

    .edpt-native .edpt-shared-header :is(.monogram, .edpt-menu-original, .edpt-appearance-toggle),
    .edpt-native .edpt-shared-footer footer :is(.monogram, .edpt-footer-social a) {
        color: var(--edpt-chrome-accent) !important;
    }

    .edpt-native .edpt-shared-header :is(.nav-chevron, .edpt-language-chevron) {
        border-color: var(--edpt-chrome-accent);
    }

    .edpt-native .edpt-shared-header .edpt-nav-original .nav-group > summary:is(:hover, :focus-visible),
    .edpt-native .edpt-shared-header .edpt-nav-original .nav-group[open] > summary,
    .edpt-native .edpt-shared-header .edpt-nav-original .nav-group > summary:is(:hover, :focus-visible) > a,
    .edpt-native .edpt-shared-header .edpt-nav-original .nav-group[open] > summary > a,
    .edpt-native .edpt-shared-footer footer :is(.footer-nav, .footer-bottom) a:not(.edpt-footer-add-company):is(:hover, :focus-visible) {
        color: var(--edpt-chrome-accent) !important;
    }

    .edpt-native .edpt-shared-footer footer .footer-bottom {
        border-top-color: color-mix(in srgb, var(--edpt-chrome-accent) 42%, transparent);
    }

    .edpt-native .edpt-shared-footer footer .edpt-footer-social a:not(:hover, :focus-visible) {
        border-color: color-mix(in srgb, var(--edpt-chrome-accent) 60%, transparent);
    }
}
