/* Three site inputs, derived semantic roles. No colour values are user CSS.
   Loaded in the public site and Gutenberg; preference overrides remain last. */
@media (forced-colors: none) {
  /* Accent fills retain the selected colour. Their foreground is independent
     of the dark brand: navy-on-purple and white-on-yellow are never assumed. */
  :is(.bwcet-hero-copy, .bwcet-hero-v1, .bwcet-section--brand, .bwcet-image-feature__copy, .bwcet-photo-cta) .wp-block-button:not(.is-style-outline) > .wp-block-button__link,
  .location-panel__load {
    color: var(--wp--custom--bwcet--accent-foreground, var(--wp--preset--color--brand-dark));
    border-color: var(--wp--custom--bwcet--accent-on-dark, var(--wp--preset--color--accent));
  }
  :is(.bwcet-hero-copy, .bwcet-hero-v1, .bwcet-section--brand, .bwcet-image-feature__copy, .bwcet-photo-cta) .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
  .location-panel__load:hover {
    color: var(--wp--preset--color--brand-dark);
    background: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--white);
  }
  .location-panel__load[aria-disabled="true"] { color: var(--wp--preset--color--white); background: transparent; }
  /* The same ordinary core Outline style works in the native hero editor and
     rendered hero, and on the other controlled dark editorial surfaces. */
  :is(.bwcet-hero-copy, .bwcet-hero-v1, .bwcet-section--brand, .bwcet-image-feature__copy, .bwcet-photo-cta) .wp-block-button.is-style-outline > .wp-block-button__link {
    color: var(--wp--preset--color--white);
    background: var(--wp--preset--color--brand-dark);
    border-color: var(--wp--preset--color--white);
  }
  :is(.bwcet-hero-copy, .bwcet-hero-v1, .bwcet-section--brand, .bwcet-image-feature__copy, .bwcet-photo-cta) .wp-block-button.is-style-outline > .wp-block-button__link:hover {
    color: var(--wp--preset--color--brand-dark);
    background: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--white);
  }

  /* Text accents require contrast; borders and decorative rules may keep the
     original accent. Dark labels never inherit an unsuitable raw dark accent. */
  :is(.bwcet-section--brand, .bwcet-image-feature__copy, .bwcet-hero-v1, .bwcet-flagship-intro__note, .bwcet-services-band, .site-footer__content, .location-panel__heading) .bwcet-eyebrow,
  .editor-styles-wrapper .bwcet-footer-information .bwcet-eyebrow,
  .bwcet-services-band__item .bwcet-services-band__number,
  .bwcet-link-grid > .wp-block-column:first-child .bwcet-link-card .bwcet-card-index,
  .bwcet-featured-news__copy .wp-block-post-terms {
    color: var(--wp--custom--bwcet--accent-on-dark, var(--wp--preset--color--accent));
  }
  :is(.primary-menu a, .entry-content a, .editor-styles-wrapper a):not(.wp-block-button__link):not(.wp-block-file__button),
  .primary-menu a:hover, .site-footer__content a, .site-footer__nav a:hover,
  .site-footer__nav a[aria-current="page"], .location-panel__link {
    text-decoration-color: currentColor;
  }
  :is(.site-footer, .bwcet-section--brand, .bwcet-services-band, .bwcet-dark-feature, .bwcet-hero-v1, .bwcet-image-feature__copy, .bwcet-flagship-intro__note, .bwcet-featured-news__article, .bwcet-footer-information, .has-brand-background-color, .has-brand-dark-background-color) {
    --bwcet-context-accent: var(--wp--custom--bwcet--accent-on-dark, var(--wp--preset--color--accent));
  }
  :is(.has-paper-background-color, .has-white-background-color, .has-surface-background-color, .bwcet-information-panel, .is-style-card, .is-style-panel) {
    --bwcet-context-accent: var(--wp--custom--bwcet--accent-on-light, var(--wp--preset--color--brand));
  }
  .has-accent-color { color: var(--bwcet-context-accent, var(--wp--custom--bwcet--accent-on-light, var(--wp--preset--color--brand))) !important; }
  .has-accent-background-color {
    color: var(--wp--custom--bwcet--accent-foreground, var(--wp--preset--color--brand-dark)) !important;
    --bwcet-context-accent: var(--wp--custom--bwcet--accent-foreground, var(--wp--preset--color--brand-dark));
  }
  .has-accent-background-color :where(a:not(.wp-block-button__link):not(.wp-block-file__button), h1, h2, h3, h4, h5, h6, p) { color: inherit; }

  /* A pale supporting input cannot weaken the photographic text mask.
     Reuse the existing composition and stop positions with a bounded scrim. */
  .bwcet-hero__media, .bwcet-photo-cta::before {
    --wp--preset--color--brand-dark: var(--wp--custom--bwcet--hero-scrim, #071f32);
  }
  :is(.bwcet-hero, .bwcet-section--brand, .bwcet-services-band, .bwcet-flagship-intro__note, .bwcet-photo-cta, .site-footer, .entry-card--featured) :focus-visible {
    outline-color: var(--wp--custom--bwcet--focus-on-dark, #ffffff);
    box-shadow: 0 0 0 6px var(--wp--preset--color--brand-dark);
  }
  :is(.search-field, .search-form input[type="search"], .wp-block-search__input) { border-color: var(--wp--custom--bwcet--control-border, var(--wp--preset--color--muted)); }

  /* Supplementary visitor choices replace every derived role together, so
     neither greyscale nor high contrast can leave a custom coloured foreground. */
  html[data-bwcet-greyscale="true"], html[data-bwcet-greyscale="true"] body {
    --wp--custom--bwcet--accent-foreground: #171717 !important;
    --wp--custom--bwcet--accent-on-dark: #c4c4c4 !important;
    --wp--custom--bwcet--accent-on-light: #484848 !important;
    --wp--custom--bwcet--hero-scrim: #171717 !important;
    --wp--custom--bwcet--control-border: #4d4d4d !important;
    --wp--custom--bwcet--focus-on-light: #171717 !important;
    --wp--custom--bwcet--focus-on-dark: #ffffff !important;
  }
  html[data-bwcet-high-contrast="true"], html[data-bwcet-high-contrast="true"] body {
    --wp--custom--bwcet--accent-foreground: #000000 !important;
    --wp--custom--bwcet--accent-on-dark: #ffe600 !important;
    --wp--custom--bwcet--accent-on-light: #000000 !important;
    --wp--custom--bwcet--hero-scrim: #000000 !important;
    --wp--custom--bwcet--control-border: #333333 !important;
    --wp--custom--bwcet--focus-on-light: #000000 !important;
    --wp--custom--bwcet--focus-on-dark: #ffffff !important;
  }
  html[data-bwcet-high-contrast="true"][data-bwcet-greyscale="true"],
  html[data-bwcet-high-contrast="true"][data-bwcet-greyscale="true"] body { --wp--custom--bwcet--accent-on-dark: #e6e6e6 !important; }
}
