/* The light palette comes from theme.json and Site Editor customizations.
 * Dark color tokens are adapted from Extendable 2.2.0's GPL-licensed Onyx palette.
 * Set tokens on body as well as html: WordPress can define presets on body.
 */
:root:is(html),
body,
.editor-styles-wrapper {
    color-scheme: only light;
}

@media screen and (prefers-color-scheme: dark) {
    :root:is(html),
    :root body,
    body,
    .editor-styles-wrapper {
        color-scheme: only dark;
        --wp--preset--color--foreground: #FFFCFC;
        --wp--preset--color--background: #17181A;
        --wp--preset--color--primary: #FFFFFF;
        --wp--preset--color--secondary: #C4C4C4;
        --wp--preset--color--tertiary: #000000;
        --wp--preset--color--foreground-alt: #FFFCFC;
        --wp--custom--color--background-tint-1: #221E15;
        --wp--custom--color--background-tint-1-ink: #FFFCFC;
        --wp--custom--color--background-tint-1-weak: #D1CECE;
        --wp--custom--color--background-tint-2: #1A242A;
        --wp--custom--color--background-tint-2-ink: #FFFCFC;
        --wp--custom--color--background-tint-2-weak: #D7D4D4;
        --wp--custom--color--background-tint-3: #1D2220;
        --wp--custom--color--background-tint-3-ink: #FFFCFC;
        --wp--custom--color--background-tint-3-weak: #D1CECE;
        --wp--custom--color--background-base: #17181A;
        --wp--custom--color--background-sunken: #000000;
        --wp--custom--color--text-strong: #FFFCFC;
        --wp--custom--color--icon-surface: #222325;
        --wp--custom--color--icon-ink: #FFFCFC;
        --wp--custom--color--neutral-50: #17181A;
        --wp--custom--color--neutral-100: #1E1F21;
        --wp--custom--color--neutral-200: #2B2D30;
        --wp--custom--color--neutral-300: #313336;
        --wp--custom--color--neutral-400: #393B3E;
        --wp--custom--color--neutral-500: #46484B;
        --wp--custom--color--neutral-600: #5F6164;
        --wp--custom--color--neutral-700: #6C6E72;
        --wp--custom--color--neutral-800: #797B7F;
        --wp--custom--color--neutral-900: #B1B3B8;
        --wp--custom--color--neutral-950: #EDEEF0;
        --wp--custom--color--text-weak: #EDEEF0;
        --wp--custom--color--text-weaker: #B1B3B8;
        --wp--custom--color--text-disabled: #5F6164;
        --wp--custom--color--text-brand: #EDEEF0;
        --wp--custom--color--text-brand-strong: #EDEEF0;
        --wp--custom--color--text-on-brand: #17181A;
        --wp--custom--color--text-on-neutral: #FFFCFC;
        --wp--custom--color--text-error: #FFD1D9;
        --wp--custom--color--text-warning: #FFCA16;
        --wp--custom--color--text-success: #B1F1CB;
        --wp--custom--color--text-info: #C2E6FF;
        --wp--custom--color--text-inverse-strong: #1E1F21;
        --wp--custom--color--text-inverse-weak: #5A5C5F;
        --wp--custom--color--text-inverse-disabled: rgba(0, 0, 0, 0.4);
        --wp--custom--color--stroke-strong: #B1B3B8;
        --wp--custom--color--stroke-weak: #393B3E;
        --wp--custom--color--stroke-weaker: #2B2D30;
        --wp--custom--color--stroke-focus: #FFFFFF;
        --wp--custom--color--stroke-brand: #FFFFFF;
        --wp--custom--color--stroke-brand-weak: #393B3E;
        --wp--custom--color--stroke-error: #E5484D;
        --wp--custom--color--stroke-error-weak: #72232D;
        --wp--custom--color--stroke-warning: #FFC53D;
        --wp--custom--color--stroke-warning-weak: #5C3D05;
        --wp--custom--color--stroke-success: #30A46C;
        --wp--custom--color--stroke-success-weak: #20573E;
        --wp--custom--color--stroke-info: #0090FF;
        --wp--custom--color--stroke-info-weak: #104D87;
        --wp--custom--color--stroke-inverse-strong: rgba(0, 0, 0, 0.3);
        --wp--custom--color--stroke-inverse-weak: rgba(0, 0, 0, 0.15);
        --wp--custom--color--icon-default: #B1B3B8;
        --wp--custom--color--icon-brand: #FFFFFF;
        --wp--custom--color--icon-disabled: #5F6164;
        --wp--custom--color--icon-error: #E5484D;
        --wp--custom--color--icon-warning: #FFC53D;
        --wp--custom--color--icon-success: #30A46C;
        --wp--custom--color--icon-info: #0090FF;
        --wp--custom--color--icon-inverse: #1E1F21;
        --wp--custom--color--icon-inverse-disabled: rgba(0, 0, 0, 0.4);
        --wp--custom--color--fill-strong: #EDEEF0;
        --wp--custom--color--fill-neutral-strong: #6C6E72;
        --wp--custom--color--fill-weak: #26272A;
        --wp--custom--color--fill-weak-hover: #2B2D30;
        --wp--custom--color--fill-weak-active: #313336;
        --wp--custom--color--fill-neutral-hover: #26272A;
        --wp--custom--color--fill-neutral-active: #2B2D30;
        --wp--custom--color--fill-weaker: #1E1F21;
        --wp--custom--color--fill-disabled: #26272A;
        --wp--custom--color--fill-brand-strong: #FFFFFF;
        --wp--custom--color--fill-brand-weak: #26272A;
        --wp--custom--color--fill-brand-weaker: #1E1F21;
        --wp--custom--color--fill-brand-max: #EDEEF0;
        --wp--custom--color--fill-brand-strong-hover: #F5F6F8;
        --wp--custom--color--fill-brand-strong-active: #EDEEF0;
        --wp--custom--color--fill-brand-weak-hover: #2B2D30;
        --wp--custom--color--fill-brand-weak-active: #313336;
        --wp--custom--color--fill-error-strong-hover: #8C333A;
        --wp--custom--color--fill-error-strong-active: #72232D;
        --wp--custom--color--fill-error-strong: #B54548;
        --wp--custom--color--fill-error-weak: #3B1219;
        --wp--custom--color--fill-warning-strong: #8F6424;
        --wp--custom--color--fill-warning-weak: #302008;
        --wp--custom--color--fill-success-strong: #2F7C57;
        --wp--custom--color--fill-success-weak: #132D21;
        --wp--custom--color--fill-info-strong: #2870BD;
        --wp--custom--color--fill-info-weak: #0D2847;
        --wp--custom--color--fill-inverse-strong: #1E1F21;
        --wp--custom--color--fill-inverse-weak: rgba(0, 0, 0, 0.1);
        --wp--custom--color--fill-yellow: #FFC53D;
        --wp--custom--color--background-raised: #1E1F21;
        --wp--custom--color--background-overlay: #26272A;
        --wp--custom--color--overlay-scrim: rgba(0, 0, 0, 0.65);
        --wp--custom--color--highlight: #313336;
        --wp--custom--color-scheme: dark;
        --wp--custom--elements--button--color--background: var(--wp--preset--color--primary);
        --wp--custom--elements--button--color--text: var(--wp--preset--color--background);
        --wp--custom--elements--button--hover--color--background: var(--wp--preset--color--secondary);
        --wp--custom--elements--button--hover--color--text: var(--wp--preset--color--background);
        --wp--custom--elements--button--focus--color--background: var(--wp--preset--color--primary);
        --wp--custom--elements--button--focus--color--text: var(--wp--preset--color--background);
    }

    /* The site's current book mark is monochrome. Match only that asset so
       replacement logos and content images keep their original colors. */
    .wp-block-site-logo img.custom-logo[src*="/ext-custom-logo-1789329438672"] {
        filter: brightness(0) invert(1);
    }

    /* The ward contact widget supplies a fixed blue outside the theme palette. */
    body .wardcontact-reveal,
    body .wardcontact a {
        color: #9dccff;
    }
}
