/* Front pages only. Load after brand.css; keep admin and maintenance palettes separate.
 * Color overrides only: component sizes, typography, uploaded artwork and authored
 * per-link/per-section colors are owned by their existing styles and settings.
 */
html:root {
  color-scheme: light;
  --wx-primary: #acd6f5;
  --wx-hover: #94c5e9;
  --wx-accent: #327fa8;
  --wx-link: #1b5f8c;
  --wx-link-hover: #12476b;
  --wx-focus: #327fa8;
  --wx-bg: #eff7fd;
  --wx-panel: #ffffff;
  --wx-soft: #f3f9ff;
  --wx-tint: #e1f0fb;
  --wx-line: #c0d8e8;
  --wx-control: #7b9cb3;
  --wx-text: #203b50;
  --wx-muted: #516c80;
  --wx-on-primary: #173e5c;
  --wx-front-logo-filter: none;
}
html:root[data-theme="dark"] {
  color-scheme: dark;
  --wx-primary: #294b65;
  --wx-hover: #355f7f;
  --wx-accent: #80c6f0;
  --wx-link: #96cfee;
  --wx-link-hover: #d2eeff;
  --wx-focus: #8dd5ff;
  --wx-bg: #0e1b28;
  --wx-panel: #152838;
  --wx-soft: #1b3043;
  --wx-tint: #203e54;
  --wx-line: #35576f;
  --wx-control: #6487a0;
  --wx-text: #e1eff9;
  --wx-muted: #a5bfd2;
  --wx-on-primary: #e6f4ff;
  --wx-front-logo-filter: drop-shadow(0 0 .65px #dcf2ff);
}
@media (prefers-color-scheme: dark) {
  html:root:not([data-theme="light"]) {
    color-scheme: dark;
    --wx-primary: #294b65;
    --wx-hover: #355f7f;
    --wx-accent: #80c6f0;
    --wx-link: #96cfee;
    --wx-link-hover: #d2eeff;
    --wx-focus: #8dd5ff;
    --wx-bg: #0e1b28;
    --wx-panel: #152838;
    --wx-soft: #1b3043;
    --wx-tint: #203e54;
    --wx-line: #35576f;
    --wx-control: #6487a0;
    --wx-text: #e1eff9;
    --wx-muted: #a5bfd2;
    --wx-on-primary: #e6f4ff;
    --wx-front-logo-filter: drop-shadow(0 0 .65px #dcf2ff);
  }
}

/* Pale blue surfaces need dark text, including legacy white FONT elements. */
html body[data-page] #logo table,
html body[data-page] .meinv .class,
html body[data-page] #menue li {
  background-color: var(--wx-primary) !important;
  border-color: var(--wx-line) !important;
}
html body[data-page] #logo :is(td, p, span, strong, font),
html body[data-page] .meinv .class.nav-bar :is(a, a:visited, strong, span, font),
html body[data-page] .meinv .class > strong:first-child,
html body[data-page] .meinv .class > strong:first-child :is(a, a:visited, span, font),
html body[data-page] #menue :is(a, a:visited) {
  color: var(--wx-on-primary) !important;
}
html body[data-page] .meinv .class.section-header .section-header__content .section-header__item,
html body[data-page] .meinv .class.section-header .section-header__content .section-header__item * {
  color: var(--section-text-color, var(--wx-on-primary)) !important;
}
html body[data-page] .meinv .class.nav-bar a:hover,
html body[data-page] #menue li.is-side-menu-active,
html body[data-page] .meinv .class.is-side-menu-target-active,
html body[data-page] #header.is-side-menu-target-active #logo table {
  background-color: var(--wx-hover) !important;
}
html body[data-page] #logo .site-brand-logo {
  filter: var(--wx-front-logo-filter);
}

/* Floating tools and all primary actions use the same accessible surface pair. */
html body[data-page] :is(.theme-toggle, .back-to-top, .a1-language-toggle),
html body[data-page] .site-search button,
html body[data-page] .site-search-engine-options input:checked + span,
html body[data-page] .submission-actions button,
html body[data-page] .search-fallback button,
html body[data-page="member"] .button-primary,
html body[data-page] .a1-popup button:not(.a1-popup__close) {
  background-color: var(--wx-primary);
  border-color: var(--wx-control);
  color: var(--wx-on-primary);
}
html body[data-page] :is(.theme-toggle, .back-to-top, .a1-language-toggle):hover,
html body[data-page] .site-search button:hover:enabled,
html body[data-page] .submission-actions button:hover:enabled,
html body[data-page="member"] .button-primary:hover:enabled,
html body[data-page] .a1-popup button:not(.a1-popup__close):hover {
  background-color: var(--wx-hover);
}
html body[data-page] :is(.theme-toggle, .back-to-top, .a1-language-toggle) :is(svg, span) {
  color: inherit;
}
html body[data-page] input:is([type="checkbox"], [type="radio"]) {
  accent-color: var(--wx-link);
}
html body[data-page] .a1-language-toggle span,
html body[data-page] :is(input, textarea)::placeholder {
  opacity: 1;
}
html body[data-page] :is(input, textarea)::placeholder {
  color: var(--wx-muted);
}

/* Standalone member pages and their login/register/recovery dialogs. */
html body[data-page="member"] :is(.member-header, .member-site-nav),
html body[data-page] .a1-search-dialog .a1-search-dialog__header,
html body[data-page] .a1-popup .a1-popup__header {
  background-color: var(--wx-primary);
  color: var(--wx-on-primary);
}
html body[data-page="member"] :is(.member-brand, .member-brand:visited, .member-brand:hover),
html body[data-page="member"] .member-announcement :is(strong, span),
html body[data-page="member"] .member-site-nav :is(a, a:visited, button),
html body[data-page] .a1-search-dialog .a1-search-dialog__header h2,
html body[data-page] .a1-popup .a1-popup__title {
  color: var(--wx-on-primary);
}
html body[data-page="member"] .member-site-nav :is(a:hover, button:hover:enabled) {
  background-color: var(--wx-hover);
}
html body[data-page] .meinv .class.nav-bar a:focus-visible,
html body[data-page="member"] .member-site-nav :is(a, button):focus-visible,
html body[data-page="member"] .member-brand:focus-visible {
  outline-color: var(--wx-on-primary);
}

