/* EAF V7 theme foundation.
   Load after the existing public/admin/member stylesheet. The default theme
   deliberately adds no visual overrides, preserving the V5 appearance. */

html[data-eaf-theme] {
  color-scheme: light;
  --eaf-theme-control-bg: #ffffff;
  --eaf-theme-control-text: #101828;
  --eaf-theme-control-border: #d9e1ec;
  --eaf-theme-focus: #1f72d7;
  --eaf-member-target-bg: #ffd23f;
  --eaf-member-target-text: #001f54;
  --eaf-member-target-border: #d29a00;
  --eaf-member-target-ring: rgba(0, 59, 143, 0.72);
  --eaf-member-target-shadow: rgba(0, 31, 84, 0.3);
}

[data-eaf-theme-panel] select[data-eaf-theme-control] {
  min-height: 44px;
  color: var(--eaf-theme-control-text);
  background: var(--eaf-theme-control-bg);
  border: 1px solid var(--eaf-theme-control-border);
  border-radius: 7px;
}

[data-eaf-theme-panel] [data-eaf-theme-status] {
  display: block;
  min-height: 1.5em;
  color: inherit;
  font-size: 0.82rem;
}

/* Institutional: blues, white and very light neutral surfaces only. */
html[data-eaf-theme="institutional"] {
  --navy: #2d6b99;
  --navy-deep: #174a72;
  --blue: #357aa9;
  --gold: #e7f2fb;
  --gold-deep: #cfe3f4;
  --white: #ffffff;
  --off-white: #fbfdff;
  --border: #dfeaf3;
  --text: #15324b;
  --muted: #5b7488;
  --soft-blue: #eff6fb;
  --ink: #15324b;
  --line: #dfeaf3;
  --paper: #fbfdff;
  --green: #357aa9;
  --red: #324f68;
  --orange: #5b7488;
  --member-navy: #2d6b99;
  --member-deep: #174a72;
  --member-blue: #357aa9;
  --member-gold: #e7f2fb;
  --member-ink: #15324b;
  --member-muted: #5b7488;
  --member-line: #dfeaf3;
  --eaf-map-country: #edf2f6;
  --eaf-map-member: #357aa9;
  --eaf-map-hover: #91bddd;
  --eaf-map-selected: #174a72;
  --eaf-map-border: #ffffff;
  --eaf-map-card-bg: rgba(255, 255, 255, 0.88);
  --eaf-map-card-border: rgba(53, 122, 169, 0.18);
  --eaf-map-card-shadow: 0 28px 70px rgba(23, 74, 114, 0.12);
  --eaf-map-legend-shadow: 0 3px 8px rgba(23, 74, 114, 0.11);
  --eaf-map-member-shadow: drop-shadow(0 3px 5px rgba(23, 74, 114, 0.2));
  --eaf-map-selected-shadow: drop-shadow(0 3px 6px rgba(23, 74, 114, 0.3));
  --cms-page-hero-background: linear-gradient(120deg, #174a72, #357aa9);
  --cms-page-hero-shade: linear-gradient(90deg, rgba(23, 74, 114, 0.94), rgba(45, 107, 153, 0.62) 60%, rgba(23, 74, 114, 0.22));
  --cms-page-hero-eyebrow: #e7f2fb;
  --cms-page-hero-intro: #eff6fb;
  --cms-page-image-shadow: 0 18px 45px rgba(23, 74, 114, 0.12);
  --eaf-theme-control-bg: #ffffff;
  --eaf-theme-control-text: #15324b;
  --eaf-theme-control-border: #c3d5e4;
  --eaf-theme-focus: #357aa9;
  --eaf-member-target-bg: #ffd23f;
  --eaf-member-target-text: #15324b;
  --eaf-member-target-border: #c28e00;
  --eaf-member-target-ring: rgba(23, 74, 114, 0.78);
  --eaf-member-target-shadow: rgba(23, 74, 114, 0.24);
  --shadow-sm: 0 12px 30px rgba(23, 74, 114, 0.07);
  --shadow-md: 0 24px 70px rgba(23, 74, 114, 0.12);
  --shadow-gold: 0 16px 40px rgba(23, 74, 114, 0.15);
}

html[data-eaf-theme="institutional"] :focus-visible {
  outline-color: #357aa9;
}

html[data-eaf-theme="institutional"] :is(.site-header, .site-footer, .member-site-header, .admin-header, .admin-sidebar) {
  color: #ffffff;
  background: linear-gradient(120deg, #174a72, #2d6b99 74%, #3f82af);
}

html[data-eaf-theme="institutional"] :is(.brand img, .member-site-header img, .footer-identity img) {
  opacity: 1;
  visibility: visible;
  filter: none !important;
  mix-blend-mode: normal;
  transform: none;
}

html[data-eaf-theme="institutional"] body:not(.managed-hero-none) .hero-image {
  background:
    linear-gradient(90deg, rgba(23, 74, 114, 0.96) 0%, rgba(45, 107, 153, 0.82) 39%, rgba(45, 107, 153, 0.22) 72%, rgba(23, 74, 114, 0.18) 100%),
    linear-gradient(180deg, rgba(23, 74, 114, 0.01), rgba(23, 74, 114, 0.67)),
    var(--home-hero-image, url("assets/eaf-hero.webp")) center / cover no-repeat;
  filter: saturate(0.3) contrast(1.01);
}

html[data-eaf-theme="institutional"] .managed-hero-none .hero-image {
  background: linear-gradient(118deg, #174a72, #357aa9);
}

html[data-eaf-theme="institutional"] .subhero::before {
  background-image:
    linear-gradient(90deg, rgba(23, 74, 114, 0.95) 0%, rgba(45, 107, 153, 0.78) 46%, rgba(23, 74, 114, 0.3) 100%),
    var(--section-hero, url("assets/heroes/about-hero-placeholder.webp"));
  filter: saturate(0.3) contrast(1.01);
}

html[data-eaf-theme="institutional"] .cms-page-hero > img {
  filter: saturate(0.3) contrast(1.01);
}

html[data-eaf-theme="institutional"] .button-outline {
  border-color: #bed8f1;
}

html[data-eaf-theme="institutional"] :is(.event-callout, .subhero) {
  background:
    linear-gradient(125deg, rgba(23, 74, 114, 0.98), rgba(45, 107, 153, 0.96)),
    radial-gradient(circle at 90% 15%, rgba(207, 227, 244, 0.3), transparent 35%);
}

html[data-eaf-theme="institutional"] .news-card-media {
  background:
    radial-gradient(circle at 60% 30%, rgba(207, 227, 244, 0.5), transparent 25%),
    linear-gradient(145deg, #357aa9, #174a72);
}

html[data-eaf-theme="institutional"] .member-map-section {
  background:
    radial-gradient(circle at 80% 40%, rgba(145, 189, 221, 0.12), transparent 32%),
    linear-gradient(180deg, #fbfdff, #f0f6fb);
}

html[data-eaf-theme="institutional"] :is(.board-band, .resource-library, .office-band, .calendar-filters, .calendar-pagination, .sponsor-area) {
  background: linear-gradient(180deg, #ffffff, #f3f8fc);
}

html[data-eaf-theme="institutional"] :is(.member-profile-card, .member-resource-area, .member-portal-panel, .member-resource-card) {
  border-color: #dfeaf3;
  box-shadow: 0 14px 38px rgba(23, 74, 114, 0.07);
}

html[data-eaf-theme="institutional"] :is(.map-tooltip, .news-back-link) {
  border-color: #91bddd;
}

html[data-eaf-theme="institutional"] .news-back-link {
  color: #ffffff;
  background: #357aa9;
  box-shadow: 0 8px 20px rgba(23, 74, 114, 0.14);
}

html[data-eaf-theme="institutional"] .news-back-link:hover {
  background: #2d6b99;
}

html[data-eaf-theme="institutional"] .sponsor-card.sponsor-senior-partner {
  background: linear-gradient(145deg, #eff6fb, #ffffff);
  border-color: #91bddd;
  box-shadow: 0 10px 28px rgba(23, 74, 114, 0.08);
}

html[data-eaf-theme="institutional"] .member-login-page {
  background:
    linear-gradient(90deg, rgba(23, 74, 114, 0.96), rgba(45, 107, 153, 0.82), rgba(23, 74, 114, 0.9)),
    url("assets/heroes/portal-hero-placeholder.webp") center / cover fixed;
}

html[data-eaf-theme="institutional"] .member-welcome {
  background:
    linear-gradient(100deg, rgba(23, 74, 114, 0.96) 0%, rgba(45, 107, 153, 0.84) 70%, rgba(45, 107, 153, 0.64)),
    url("assets/heroes/portal-hero-placeholder.webp") center 43% / cover;
}

html[data-eaf-theme="institutional"] :is(.member-site-footer, .hero-section) {
  color: #ffffff;
  background: linear-gradient(125deg, #174a72, #2d6b99);
}

html[data-eaf-theme="institutional"] :is(.button-gold, .nav-cta, .member-header-button, .admin-primary-action, .news-back-link) {
  color: #ffffff;
  background: #357aa9;
  border-color: #357aa9;
  box-shadow: 0 10px 26px rgba(23, 74, 114, 0.16);
}

html[data-eaf-theme="institutional"] :is(.button-gold, .nav-cta, .member-header-button, .admin-primary-action, .news-back-link):hover {
  background: #2d6b99;
}

html[data-eaf-theme="institutional"] :is(.eyebrow, .member-eyebrow, .status-label) {
  color: #357aa9;
}

html[data-eaf-theme="institutional"] :is(.site-header, .site-footer, .member-site-header, .admin-header, .hero, .subhero, .admin-sidebar) :is(.eyebrow, .member-eyebrow) {
  color: #e7f2fb;
}

html[data-eaf-theme="institutional"] :is(.news-tag, [class*="news-tag-"], .badge-live, .badge-pending, .badge-draft, .badge-danger, .badge-homepage) {
  color: #ffffff !important;
  background: #2d6b99 !important;
  border-color: #91bddd !important;
}

html[data-eaf-theme="institutional"] .event-card.event-tone-eaf .event-card-date {
  color: #ffffff;
  background: #2d6b99;
  border-color: #cfe3f4;
}

html[data-eaf-theme="institutional"] .event-card.event-tone-international .event-card-date {
  color: #174a72;
  background: #e0eef8;
  border-color: #91bddd;
}

html[data-eaf-theme="institutional"] .event-card.event-tone-associate .event-card-date {
  color: #2d6b99;
  background: #ffffff;
  border-color: #357aa9;
}

html[data-eaf-theme="institutional"] .event-card.event-tone-other .event-card-date {
  color: #174a72;
  background: #eff6fb;
  border-color: #cfe3f4;
}

html[data-eaf-theme="institutional"] .event-card.event-tone-neutral .event-card-date {
  color: #111827;
  background: #edf0f3;
  border-color: #c7cdd4;
}

html[data-eaf-theme="institutional"] .event-callout [data-home-event-list] {
  scrollbar-color: #91bddd rgba(255, 255, 255, 0.14);
}

html[data-eaf-theme="institutional"] .home-event-mini.event-tone-eaf {
  --home-event-bg: #2d6b99;
  --home-event-bg-hover: #235b85;
  --home-event-border: #cfe3f4;
  --home-event-text: #ffffff;
  --home-event-meta: #e7f2fb;
  --home-event-accent: #ffffff;
  --home-event-action: #e7f2fb;
  --home-event-focus: #cfe3f4;
}

html[data-eaf-theme="institutional"] .home-event-mini.event-tone-international {
  --home-event-bg: #e0eef8;
  --home-event-bg-hover: #d2e7f5;
  --home-event-border: #91bddd;
  --home-event-text: #174a72;
  --home-event-meta: #315f80;
  --home-event-accent: #174a72;
  --home-event-action: #174a72;
  --home-event-focus: #357aa9;
}

html[data-eaf-theme="institutional"] .home-event-mini.event-tone-associate {
  --home-event-bg: #ffffff;
  --home-event-bg-hover: #f0f7fc;
  --home-event-border: #357aa9;
  --home-event-text: #2d6b99;
  --home-event-meta: #315f80;
  --home-event-accent: #2d6b99;
  --home-event-action: #2d6b99;
  --home-event-focus: #357aa9;
}

html[data-eaf-theme="institutional"] .home-event-mini.event-tone-other {
  --home-event-bg: #eff6fb;
  --home-event-bg-hover: #e4eff7;
  --home-event-border: #c3d5e4;
  --home-event-text: #174a72;
  --home-event-meta: #315f80;
  --home-event-accent: #174a72;
  --home-event-action: #174a72;
  --home-event-focus: #357aa9;
}

html[data-eaf-theme="institutional"] .home-event-mini.event-tone-neutral {
  --home-event-bg: #edf0f3;
  --home-event-bg-hover: #e1e5e9;
  --home-event-border: #c7cdd4;
  --home-event-text: #111827;
  --home-event-meta: #374151;
  --home-event-accent: #111827;
  --home-event-action: #111827;
  --home-event-focus: #6b7280;
}

html[data-eaf-theme="institutional"] .home-event-mini:hover,
html[data-eaf-theme="institutional"] .home-event-mini:focus-visible {
  box-shadow: 0 8px 20px rgba(23, 74, 114, 0.2);
}

html[data-eaf-theme="institutional"] :is(.member-event-list article.member-event-tone-eaf time, .member-event-list article.member-event-tone-international time) {
  color: #ffffff;
  background: #2d6b99;
  border-color: #91bddd;
}

html[data-eaf-theme="institutional"] .member-event-list article.member-event-tone-international {
  background: #f2f8fc;
  border-left-color: #91bddd;
}

html[data-eaf-theme="institutional"] :is(.home-emergency-alert, .emergency-alert) {
  color: #ffffff;
  background: #174a72;
  border-color: #91bddd;
}

html[data-eaf-theme="institutional"] :is(.mission-band, .member-showcase, .submission-band, .portal-band, .section-cta) {
  color: #ffffff;
  background: linear-gradient(120deg, #235b85, #357aa9);
}

/* Neutralise component-local V5 colours so the institutional palette remains
   consistent on public, administrator and Member Portal surfaces. */
html[data-eaf-theme="institutional"] .link-panel a {
  border-top-color: rgba(23, 74, 114, 0.16);
}

html[data-eaf-theme="institutional"] :is(.section-card:hover, .member-card.is-map-target, .member-card:focus-visible) {
  border-color: #91bddd;
}

html[data-eaf-theme="institutional"] :is(.member-map-copy > p:not(.eyebrow), .member-status) {
  color: #315f80;
}

html[data-eaf-theme="institutional"] .country-information-dialog {
  border-color: #91bddd;
  box-shadow: 0 30px 90px rgba(23, 74, 114, 0.34);
}

html[data-eaf-theme="institutional"] .country-information-drag {
  background: linear-gradient(120deg, #235b85, #6aa1c8);
}

html[data-eaf-theme="institutional"] .country-information-list > div,
html[data-eaf-theme="institutional"] .country-information-custom {
  background: #f0f7fc;
  border-color: #cfe3f4;
}

html[data-eaf-theme="institutional"] :is(.member-marquee a, .member-marquee .member-tile) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(231, 242, 251, 0.58);
}

html[data-eaf-theme="institutional"] .member-marquee a:hover {
  background: rgba(231, 242, 251, 0.25);
  border-color: #e7f2fb;
}

html[data-eaf-theme="institutional"] .member-marquee small {
  color: #e7f2fb;
}

html[data-eaf-theme="institutional"] :is(.organisation-empty, .member-empty, .empty-card) {
  color: #5b7488;
  background: #fbfdff;
  border-color: #c3d5e4;
}

html[data-eaf-theme="institutional"] :is(.organisation-empty strong, .member-empty strong, .empty-card strong) {
  color: #174a72;
}

html[data-eaf-theme="institutional"] :is(.admin-nav a:hover, .admin-nav a.is-active, .member-side-nav a:hover, .member-resource-card summary:hover, .member-download-list a:hover, .member-resource-grid a:hover, .record-card summary:hover) {
  background: #eff6fb;
  border-color: #91bddd;
}

html[data-eaf-theme="institutional"] :is(.editor-panel, .contact-stat-grid article, .contact-settings-form .toggle-line, .contact-mail-actions > div, .event-bulk-controls, .settings-card, .record-editor) {
  background: #f3f8fc;
  border-color: #c3d5e4;
}

html[data-eaf-theme="institutional"] :is(.record-media, .sponsor-logo, .member-role-list li, .member-download-list a, .member-resource-grid a) {
  background: #eff6fb;
}

html[data-eaf-theme="institutional"] .sticky-save {
  background: rgba(23, 74, 114, 0.96);
  border-color: rgba(231, 242, 251, 0.28);
  box-shadow: 0 15px 35px rgba(23, 74, 114, 0.2);
}

html[data-eaf-theme="institutional"] .sticky-save span {
  color: #e7f2fb;
}

html[data-eaf-theme="institutional"] #contact {
  background: linear-gradient(150deg, #ffffff 55%, #eff6fb);
}

html[data-eaf-theme="institutional"] :is(#security, #profile) {
  border-top-color: #91bddd;
}

html[data-eaf-theme="institutional"] ::selection {
  color: #174a72;
  background: #e7f2fb;
}

/* Camouflage: olive and forest greens, EAF gold and high-contrast white. */
html[data-eaf-theme="camouflage"] {
  --navy: #3f5535;
  --navy-deep: #182617;
  --blue: #526b42;
  --gold: #f2ca52;
  --gold-deep: #d7a92d;
  --white: #ffffff;
  --off-white: #f1f3eb;
  --border: #cbd2bf;
  --text: #172113;
  --muted: #58634f;
  --soft-blue: #e3e8da;
  --ink: #172113;
  --line: #cbd2bf;
  --paper: #f1f3eb;
  --green: #3f5535;
  --red: #7b3f2c;
  --orange: #8a6424;
  --member-navy: #3f5535;
  --member-deep: #182617;
  --member-blue: #526b42;
  --member-gold: #f2ca52;
  --member-ink: #172113;
  --member-muted: #58634f;
  --member-line: #cbd2bf;
  --eaf-map-country: #dfe4d7;
  --eaf-map-member: #f2ca52;
  --eaf-map-hover: #71865c;
  --eaf-map-selected: #3f5535;
  --eaf-map-border: #ffffff;
  --eaf-map-card-bg: rgba(247, 248, 243, 0.9);
  --eaf-map-card-border: rgba(82, 107, 66, 0.28);
  --eaf-map-card-shadow: 0 28px 70px rgba(24, 38, 23, 0.18);
  --eaf-map-legend-shadow: 0 3px 8px rgba(24, 38, 23, 0.14);
  --eaf-map-member-shadow: drop-shadow(0 3px 5px rgba(138, 100, 36, 0.24));
  --eaf-map-selected-shadow: drop-shadow(0 3px 6px rgba(24, 38, 23, 0.34));
  --cms-page-hero-background: linear-gradient(120deg, #182617, #526b42);
  --cms-page-hero-shade: linear-gradient(90deg, rgba(24, 38, 23, 0.96), rgba(63, 85, 53, 0.68) 60%, rgba(24, 38, 23, 0.25));
  --cms-page-hero-eyebrow: #f2ca52;
  --cms-page-hero-intro: #eef1e7;
  --cms-page-image-shadow: 0 18px 45px rgba(24, 38, 23, 0.18);
  --eaf-theme-control-bg: #ffffff;
  --eaf-theme-control-text: #172113;
  --eaf-theme-control-border: #899778;
  --eaf-theme-focus: #d7a92d;
  --eaf-member-target-bg: #f2ca52;
  --eaf-member-target-text: #182617;
  --eaf-member-target-border: #8a6b13;
  --eaf-member-target-ring: rgba(48, 68, 38, 0.82);
  --eaf-member-target-shadow: rgba(24, 38, 23, 0.3);
  --shadow-sm: 0 12px 30px rgba(24, 38, 23, 0.12);
  --shadow-md: 0 24px 70px rgba(24, 38, 23, 0.2);
  --shadow-gold: 0 16px 40px rgba(215, 169, 45, 0.28);
}

html[data-eaf-theme="camouflage"] :focus-visible {
  outline-color: #d7a92d;
}

html[data-eaf-theme="camouflage"] :is(.site-header, .site-footer, .member-site-header, .admin-header, .admin-sidebar) {
  color: #ffffff;
  background: linear-gradient(120deg, #182617, #3f5535 72%, #526b42);
}

html[data-eaf-theme="camouflage"] :is(.site-header.is-scrolled, .member-card, .eaf-form, .portal-login, .cookie-banner) {
  box-shadow: 0 16px 38px rgba(24, 38, 23, 0.2);
}

html[data-eaf-theme="camouflage"] .button-outline {
  background: rgba(24, 38, 23, 0.34);
  border-color: rgba(242, 202, 82, 0.62);
}

html[data-eaf-theme="camouflage"] :is(.brand img, .member-site-header img, .footer-identity img) {
  opacity: 1;
  visibility: visible;
  filter: none !important;
  mix-blend-mode: normal;
  transform: none;
}

html[data-eaf-theme="camouflage"] body:not(.managed-hero-none) .hero-image {
  background:
    linear-gradient(90deg, rgba(24, 38, 23, 0.99) 0%, rgba(63, 85, 53, 0.93) 38%, rgba(63, 85, 53, 0.32) 70%, rgba(24, 38, 23, 0.24) 100%),
    linear-gradient(180deg, rgba(24, 38, 23, 0.03), rgba(24, 38, 23, 0.8)),
    var(--home-hero-image, url("assets/eaf-hero.webp")) center / cover no-repeat;
  filter: sepia(0.24) saturate(0.68) hue-rotate(330deg);
}

html[data-eaf-theme="camouflage"] .managed-hero-none .hero-image {
  background: linear-gradient(118deg, #182617, #526b42);
}

html[data-eaf-theme="camouflage"] .subhero::before {
  background-image:
    linear-gradient(90deg, rgba(24, 38, 23, 0.98) 0%, rgba(63, 85, 53, 0.88) 46%, rgba(24, 38, 23, 0.38) 100%),
    var(--section-hero, url("assets/heroes/about-hero-placeholder.webp"));
  filter: sepia(0.24) saturate(0.68) hue-rotate(330deg);
}

html[data-eaf-theme="camouflage"] .cms-page-hero > img {
  filter: sepia(0.24) saturate(0.68) hue-rotate(330deg);
}

html[data-eaf-theme="camouflage"] .login-page {
  background:
    radial-gradient(circle at 78% 15%, rgba(113, 134, 92, 0.52), transparent 30%),
    linear-gradient(125deg, #182617, #293c25 55%, #526b42);
}

html[data-eaf-theme="camouflage"] .member-login-page {
  background:
    linear-gradient(90deg, rgba(24, 38, 23, 0.98), rgba(63, 85, 53, 0.91), rgba(24, 38, 23, 0.96)),
    url("assets/heroes/portal-hero-placeholder.webp") center / cover fixed;
}

html[data-eaf-theme="camouflage"] .member-welcome {
  background:
    linear-gradient(100deg, rgba(24, 38, 23, 0.98) 0%, rgba(63, 85, 53, 0.9) 70%, rgba(63, 85, 53, 0.7)),
    url("assets/heroes/portal-hero-placeholder.webp") center 43% / cover;
}

html[data-eaf-theme="camouflage"] :is(.member-site-header nav > a:not(.member-header-button), .member-login-intro > p:last-of-type, .member-login-intro ul, .member-welcome .member-portal-shell > p:last-child, .member-site-footer, .member-marquee small) {
  color: #eef1e7;
}

html[data-eaf-theme="camouflage"] :is(.member-site-footer, .hero-section) {
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 10%, rgba(113, 134, 92, 0.45), transparent 28%),
    linear-gradient(125deg, #182617, #3f5535);
}

html[data-eaf-theme="camouflage"] :is(.button-blue, .member-primary-button, .member-secondary-button, .admin-primary-action) {
  color: #ffffff;
  background: #3f5535;
  border-color: #71865c;
}

html[data-eaf-theme="camouflage"] :is(.button-gold, .nav-cta, .member-header-button) {
  color: #182617;
  background: linear-gradient(135deg, #f2ca52, #d7a92d);
  border-color: #d7a92d;
  box-shadow: 0 10px 26px rgba(24, 38, 23, 0.24);
}

html[data-eaf-theme="camouflage"] :is(.mission-band, .member-showcase, .submission-band, .portal-band, .section-cta) {
  color: #ffffff;
  background: linear-gradient(120deg, #293c25, #526b42);
}

html[data-eaf-theme="camouflage"] .event-callout {
  background:
    linear-gradient(150deg, rgba(24, 38, 23, 0.99), rgba(63, 85, 53, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(242, 202, 82, 0.22), transparent 50%);
}

html[data-eaf-theme="camouflage"] :is(.board-band, .resource-library, .office-band, .calendar-filters, .calendar-pagination, .sponsor-area) {
  background: linear-gradient(180deg, #f7f8f3, #e8ecdf);
}

html[data-eaf-theme="camouflage"] :is(.calendar-pagination button, .news-pagination a, .event-recurrence) {
  border-color: #aebba0;
}

html[data-eaf-theme="camouflage"] :is(.event-recurrence-label, tbody th) {
  color: #304426;
  background: #e3e8da;
  border-color: #aebba0;
}

html[data-eaf-theme="camouflage"] :is(.board-portrait, .office-portrait, .office-portrait-placeholder, .person-portrait-placeholder) {
  color: #526b42;
  background: linear-gradient(145deg, #edf0e7, #d9e0ce);
}

html[data-eaf-theme="camouflage"] :is(.member-role-list li, .member-side-nav a:hover, .member-download-list a, .member-event-list article, code) {
  color: #3f5535;
  background: #e8ecdf;
  border-color: #cbd2bf;
}

html[data-eaf-theme="camouflage"] .member-event-list {
  scrollbar-color: #899778 #e8ecdf;
}

html[data-eaf-theme="camouflage"] :is(.member-profile-card, .member-resource-area, .member-portal-panel, .member-resource-card) {
  border-color: #cbd2bf;
  box-shadow: 0 14px 38px rgba(24, 38, 23, 0.1);
}

html[data-eaf-theme="camouflage"] :is(.admin-nav a:hover, .admin-nav a.is-active, .member-account-list-shell, .protected-download-library, .member-password-block) {
  color: #172113;
  background: #e3e8da;
  border-color: #aebba0;
}

html[data-eaf-theme="camouflage"] :is(.notice-info, .member-notice.info, .protected-download-warning) {
  color: #304426;
  background: #edf1e7;
  border-color: #aebba0;
}

html[data-eaf-theme="camouflage"] :is(.sponsor-card.sponsor-associate-member, #contact) {
  background: linear-gradient(145deg, #eef1e8, #ffffff);
  border-color: #899778;
}

html[data-eaf-theme="camouflage"] :is(.sponsor-card.sponsor-partner, .sponsor-card.sponsor-associate-member, .sponsor-card, .sponsor-placeholder) {
  border-color: #899778;
}

html[data-eaf-theme="camouflage"] :is(.sponsor-card.sponsor-associate-member small, .sponsor-card small) {
  color: #3f5535;
}

html[data-eaf-theme="camouflage"] :is(.search-overlay, .modal-layer) {
  background: rgba(24, 38, 23, 0.86);
}

html[data-eaf-theme="camouflage"] :is(.europe-map-card, .member-card.is-map-target, .member-card:focus-visible, .event-card[open]) {
  border-color: #899778;
  box-shadow: 0 0 0 3px rgba(82, 107, 66, 0.16), var(--shadow-sm);
}

html[data-eaf-theme="camouflage"] :is(.legal-policy, .country-information-dialog) {
  color: #26351f;
  background: #f7f8f2;
  border-color: #899778;
  box-shadow: 0 24px 70px rgba(24, 38, 23, 0.3);
}

html[data-eaf-theme="camouflage"] .legal-policy > h2 {
  border-top-color: #cbd2bf;
}

html[data-eaf-theme="camouflage"] .legal-policy :is(h2, h3, th, code) {
  color: #304426;
}

html[data-eaf-theme="camouflage"] .legal-policy th {
  color: #ffffff;
  background: #304426;
}

html[data-eaf-theme="camouflage"] .legal-policy :is(th, td) {
  border-color: #cbd2bf;
}

html[data-eaf-theme="camouflage"] .legal-policy tbody tr:nth-child(even) {
  background: #edf1e7;
}

html[data-eaf-theme="camouflage"] .country-information-drag {
  background: linear-gradient(120deg, #24331f, #526b42);
}

html[data-eaf-theme="camouflage"] .country-information-list > div,
html[data-eaf-theme="camouflage"] .country-information-custom {
  background: #e8ecdf;
  border-color: #cbd2bf;
}

html[data-eaf-theme="camouflage"] .country-information-list :is(dt, dd),
html[data-eaf-theme="camouflage"] .country-information-custom {
  color: #304426;
}

html[data-eaf-theme="camouflage"] :is(.home-news-card p:not(.news-meta), .associate-callout p:not(.eyebrow), .overview-heading > p:not(.eyebrow), .overview-heading > [data-page-override-root] > p, .section-card p, .page-toc a, .prose > p, .prose > address, .definition-card p, .content-list li, .check-list li, tbody td, .faq-item > div, .discipline-card p, .resource-card div > p:last-child, .resource-feature > p:not(.eyebrow), .resource-feature-copy > p:not(.eyebrow), .resource-feature-copy [data-page-override-root] > p, .publication-note > p:not(.eyebrow), .calendar-empty p, .legal-placeholder p:not(.status-label), .news-card > div > p:not(.news-meta), .member-map-copy > p:not(.eyebrow), .event-card-details) {
  color: #46563d;
}

html[data-eaf-theme="camouflage"] :is(.home-news-card, .event-card, .resource-card, .sponsor-card, .record-card, .settings-card, .member-dashboard-card, .member-portal-card, .contact-form-card) {
  border-color: #899778;
}

html[data-eaf-theme="camouflage"] :is(.news-tag, [class*="news-tag-"], .badge-live) {
  color: #182617 !important;
  background: #f2ca52 !important;
  border-color: #d7a92d !important;
}

html[data-eaf-theme="camouflage"] :is(.badge-pending, .badge-draft, .badge-homepage) {
  color: #ffffff !important;
  background: #3f5535 !important;
  border-color: #71865c !important;
}

/* Preserve calendar differentiation without allowing the default light and
   dark blues to leak through this theme. */
html[data-eaf-theme="camouflage"] .event-card.event-tone-eaf .event-card-date {
  color: #ffffff;
  background: #293c25;
  border-color: #f2ca52;
}

html[data-eaf-theme="camouflage"] .event-card.event-tone-international .event-card-date {
  color: #182617;
  background: #d9e0ce;
  border-color: #899778;
}

html[data-eaf-theme="camouflage"] .event-card.event-tone-associate .event-card-date {
  color: #3f5535;
  background: #ffffff;
  border-color: #526b42;
}

html[data-eaf-theme="camouflage"] .event-card.event-tone-other .event-card-date {
  color: #182617;
  background: #f2ca52;
  border-color: #d7a92d;
}

html[data-eaf-theme="camouflage"] .event-card.event-tone-neutral .event-card-date {
  color: #111827;
  background: #edf0f3;
  border-color: #c7cdd4;
}

html[data-eaf-theme="camouflage"] .event-callout [data-home-event-list] {
  scrollbar-color: #899778 rgba(255, 255, 255, 0.08);
}

html[data-eaf-theme="camouflage"] .home-event-mini.event-tone-eaf {
  --home-event-bg: #293c25;
  --home-event-bg-hover: #354d2f;
  --home-event-border: #f2ca52;
  --home-event-text: #ffffff;
  --home-event-meta: #eef1e7;
  --home-event-accent: #f2ca52;
  --home-event-action: #f2ca52;
  --home-event-focus: #f2ca52;
}

html[data-eaf-theme="camouflage"] .home-event-mini.event-tone-international {
  --home-event-bg: #d9e0ce;
  --home-event-bg-hover: #cbd5bf;
  --home-event-border: #899778;
  --home-event-text: #182617;
  --home-event-meta: #304426;
  --home-event-accent: #182617;
  --home-event-action: #304426;
  --home-event-focus: #526b42;
}

html[data-eaf-theme="camouflage"] .home-event-mini.event-tone-associate {
  --home-event-bg: #ffffff;
  --home-event-bg-hover: #edf1e7;
  --home-event-border: #526b42;
  --home-event-text: #304426;
  --home-event-meta: #3f5535;
  --home-event-accent: #304426;
  --home-event-action: #304426;
  --home-event-focus: #526b42;
}

html[data-eaf-theme="camouflage"] .home-event-mini.event-tone-other {
  --home-event-bg: #f2ca52;
  --home-event-bg-hover: #f7d66a;
  --home-event-border: #d7a92d;
  --home-event-text: #182617;
  --home-event-meta: #304426;
  --home-event-accent: #182617;
  --home-event-action: #182617;
  --home-event-focus: #526b42;
}

html[data-eaf-theme="camouflage"] .home-event-mini.event-tone-neutral {
  --home-event-bg: #edf0f3;
  --home-event-bg-hover: #e1e5e9;
  --home-event-border: #c7cdd4;
  --home-event-text: #111827;
  --home-event-meta: #374151;
  --home-event-accent: #111827;
  --home-event-action: #111827;
  --home-event-focus: #6b7280;
}

html[data-eaf-theme="camouflage"] .home-event-mini:hover,
html[data-eaf-theme="camouflage"] .home-event-mini:focus-visible {
  box-shadow: 0 8px 20px rgba(24, 38, 23, 0.22);
}

html[data-eaf-theme="camouflage"] :is(.member-event-list article.member-event-tone-eaf time, .member-event-list article.member-event-tone-international time) {
  color: #ffffff;
  background: #3f5535;
  border-color: #71865c;
}

html[data-eaf-theme="camouflage"] .member-event-list article.member-event-tone-international {
  background: #edf1e7;
  border-left-color: #899778;
}

html[data-eaf-theme="camouflage"] :is(.home-emergency-alert, .emergency-alert) {
  color: #ffffff;
  background: #6e2f24;
  border-color: #f2ca52;
}

/* Remove residual blue-tinted V5 component colours from the camouflage
   palette while retaining the semantic alert and contribution colours. */
html[data-eaf-theme="camouflage"] .member-map-section {
  background:
    radial-gradient(circle at 80% 40%, rgba(242, 202, 82, 0.1), transparent 32%),
    linear-gradient(180deg, #f1f3eb, #e3e8da);
}

html[data-eaf-theme="camouflage"] .link-panel a {
  border-top-color: rgba(63, 85, 53, 0.24);
}

html[data-eaf-theme="camouflage"] :is(.section-card:hover, .member-card.is-map-target, .member-card:focus-visible) {
  border-color: #71865c;
}

html[data-eaf-theme="camouflage"] :is(.member-marquee a, .member-marquee .member-tile) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(238, 241, 231, 0.48);
}

html[data-eaf-theme="camouflage"] .member-marquee a:hover {
  background: rgba(242, 202, 82, 0.2);
  border-color: rgba(242, 202, 82, 0.72);
}

html[data-eaf-theme="camouflage"] .member-marquee small {
  color: #eef1e7;
}

html[data-eaf-theme="camouflage"] :is(.organisation-empty, .member-empty, .empty-card) {
  color: #58634f;
  background: #f7f8f3;
  border-color: #aebba0;
}

html[data-eaf-theme="camouflage"] :is(.organisation-empty strong, .member-empty strong, .empty-card strong) {
  color: #304426;
}

html[data-eaf-theme="camouflage"] :is(.admin-nav a:hover, .admin-nav a.is-active, .member-side-nav a:hover, .member-resource-card summary:hover, .member-download-list a:hover, .member-resource-grid a:hover, .record-card summary:hover) {
  color: #304426;
  background: #e3e8da;
  border-color: #899778;
}

html[data-eaf-theme="camouflage"] :is(.editor-panel, .contact-stat-grid article, .contact-settings-form .toggle-line, .contact-mail-actions > div, .event-bulk-controls, .settings-card, .record-editor) {
  background: #edf0e7;
  border-color: #aebba0;
}

html[data-eaf-theme="camouflage"] :is(.record-media, .sponsor-logo, .member-role-list li, .member-download-list a, .member-resource-grid a) {
  color: #304426;
  background: #e8ecdf;
  border-color: #cbd2bf;
}

html[data-eaf-theme="camouflage"] :is(.hero-section > div:first-child > p:last-child, .api-note, .stats-grid span, .setup-card > p, .sticky-save span) {
  color: #dfe7d7;
}

html[data-eaf-theme="camouflage"] .stats-grid article {
  background: rgba(24, 38, 23, 0.74);
}

html[data-eaf-theme="camouflage"] .stats-grid article.attention {
  background: rgba(93, 72, 21, 0.72);
}

html[data-eaf-theme="camouflage"] .sticky-save {
  background: rgba(24, 38, 23, 0.96);
  border-color: rgba(242, 202, 82, 0.26);
  box-shadow: 0 15px 35px rgba(24, 38, 23, 0.28);
}

html[data-eaf-theme="camouflage"] #contact {
  background: linear-gradient(150deg, #ffffff 55%, #e8ecdf);
}

html[data-eaf-theme="camouflage"] :is(#security, #profile) {
  border-top-color: #899778;
}

html[data-eaf-theme="camouflage"] ::selection {
  color: #182617;
  background: #f2ca52;
}

/* A hovered, keyboard-focused, map-previewed or selected federation remains
   EAF gold in every visual theme. Explicit text and ring tokens keep each
   interactive state distinguishable without relying on colour alone. */
html[data-eaf-theme] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) {
  color: var(--eaf-member-target-text);
  background: var(--eaf-member-target-bg);
  border-color: var(--eaf-member-target-border);
}

html[data-eaf-theme] .member-card:is(:hover, :focus-within, .is-map-preview):not(.is-map-target) {
  box-shadow:
    0 0 0 2px var(--eaf-member-target-ring),
    0 16px 36px var(--eaf-member-target-shadow);
}

html[data-eaf-theme] .member-card.is-map-target,
html[data-eaf-theme] .member-card.has-country-information-window,
html[data-eaf-theme] .member-card.is-map-target:focus-visible {
  color: var(--eaf-member-target-text);
  background: var(--eaf-member-target-bg);
  border-color: var(--eaf-member-target-border);
  box-shadow:
    0 0 0 3px var(--eaf-member-target-ring),
    0 18px 42px var(--eaf-member-target-shadow);
}

html[data-eaf-theme] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) :is(.member-status, h3, p),
html[data-eaf-theme] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) > a,
html[data-eaf-theme] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) > .member-website-unavailable {
  color: var(--eaf-member-target-text);
}

html[data-eaf-theme] .member-marquee .member-tile:is(:hover, :focus-visible) {
  color: var(--eaf-member-target-text);
  background: var(--eaf-member-target-bg);
  border-color: var(--eaf-member-target-border);
  box-shadow: 0 0 0 3px var(--eaf-member-target-ring);
}

html[data-eaf-theme] .member-marquee .member-tile:is(:hover, :focus-visible) :is(span, small) {
  color: var(--eaf-member-target-text);
}

@media (prefers-reduced-motion: no-preference) {
  html[data-eaf-theme-source] body,
  html[data-eaf-theme-source] .site-header,
  html[data-eaf-theme-source] .site-footer {
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
  }
}

@media (forced-colors: active) {
  html[data-eaf-theme] .member-card:hover,
  html[data-eaf-theme] .member-card:focus-within,
  html[data-eaf-theme] .member-card.is-map-preview,
  html[data-eaf-theme] .member-card.is-map-target,
  html[data-eaf-theme] .member-card.has-country-information-window,
  html[data-eaf-theme] .member-card.is-map-target:focus-visible {
    color: CanvasText;
    background: Canvas;
    border: 3px solid Highlight;
    box-shadow: none;
  }

  html[data-eaf-theme] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) :is(.member-status, h3, p),
  html[data-eaf-theme] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) > a,
  html[data-eaf-theme] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) > .member-website-unavailable {
    color: CanvasText;
  }

  html[data-eaf-theme] .member-card-selector {
    forced-color-adjust: none;
  }

  html[data-eaf-theme] .member-marquee .member-tile:is(:hover, :focus-visible) {
    color: CanvasText;
    background: Canvas;
    border: 3px solid Highlight;
    box-shadow: none;
  }

  html[data-eaf-theme] .member-marquee .member-tile:is(:hover, :focus-visible) :is(span, small) {
    color: CanvasText;
  }

  [data-eaf-theme-panel] select[data-eaf-theme-control] {
    border: 1px solid ButtonText;
  }
}
/* V13 local night mode.
   This preference layers over the selected public website theme and leaves the
   administrator and Member Portal themes untouched. */
html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] {
  color-scheme: dark;
  --off-white: #080d14;
  --text: #e6edf5;
  --muted: #b5c1ce;
  --border: #35485d;
  --soft-blue: #162434;
  --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 24px 70px rgba(0, 0, 0, 0.34);
  --eaf-theme-control-bg: #111a25;
  --eaf-theme-control-text: #e8eef5;
  --eaf-theme-control-border: #40566d;
  --eaf-theme-focus: #ffd23f;
  --eaf-map-country: #293746;
  --eaf-map-member: #ffd23f;
  --eaf-map-hover: #567da6;
  --eaf-map-selected: #2f6fae;
  --eaf-map-border: #0d1520;
  --eaf-map-card-bg: #0c141e;
  --eaf-map-card-border: #35485d;
  --eaf-map-card-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
  --eaf-map-legend-shadow: none;
  --eaf-map-member-shadow: drop-shadow(0 2px 4px rgba(255, 210, 63, 0.18));
  --eaf-map-selected-shadow: drop-shadow(0 3px 6px rgba(67, 136, 205, 0.3));
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] body {
  color: #d8e1eb;
  background: #080d14;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(h1, h2, h3) {
  color: #f0f4f8;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .global-emergency-alert :is(h2, [data-emergency-alert-body]) {
  color: inherit;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.eyebrow.blue, .text-arrow, .text-link) {
  color: #91bce8;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.site-header, .site-header.is-scrolled) {
  color: #edf2f7;
  background: rgba(7, 15, 25, 0.97);
  border-bottom-color: #2b3e52;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.hero-image, .cms-page-hero > img),
html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .subhero::before {
  filter: brightness(0.58) saturate(0.72) contrast(1.04);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .hero-grid {
  opacity: 0.28;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :focus-visible {
  outline-color: #ffd23f;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(
  .nav-dropdown, .language-menu, .site-nav.is-open, .home-news-card,
  .associate-callout, .section-card, .definition-card, .page-sequence a,
  .page-toc, .prose address, .content-list li, .check-list li,
  .faq-item, .member-card, .board-card, .office-card, .discipline-card,
  .resource-card, .resource-feature, .publication-note, .calendar-panel,
  .calendar-copy, .calendar-pagination button, .news-pagination a,
  .event-card, .eaf-form, .portal-login, .contact-form-card,
  .legal-placeholder, .legal-policy, .news-card, .search-dialog,
  .preference-modal, .cookie-banner, .sponsor-card, .sponsor-placeholder,
  .sponsor-area, .organisation-empty, .empty-state,
  .associate-directory-card, .associate-directory-empty, .media-gallery-empty,
  .media-gallery-card, .country-information-dialog
) {
  color: #d8e1eb;
  background: #111923;
  border-color: #35485d;
  box-shadow: var(--shadow-sm);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(
  .associate-directory-band, .media-gallery-band, .office-band
) {
  color: #d8e1eb;
  background: #0b1119;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(
  .home-news-card, .associate-callout, .section-card, .definition-card,
  .page-sequence a, .faq-item, .member-card, .board-card, .office-card,
  .discipline-card, .resource-card, .resource-feature, .publication-note,
  .calendar-copy, .event-card, .legal-placeholder, .legal-policy, .news-card, .sponsor-card,
  .sponsor-placeholder, .associate-directory-card, .media-gallery-card
) :is(h2, h3, strong) {
  color: #f0f4f8;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(
  .home-news-card, .associate-callout, .overview-heading, .section-card,
  .prose, .definition-card, .content-list, .check-list, .faq-item,
  .member-card, .board-info, .office-info, .discipline-card, .resource-card,
  .resource-feature, .publication-note, .calendar-copy, .calendar-empty,
  .legal-placeholder, .legal-policy, .news-card, .associate-directory-card,
  .media-gallery-card
) :is(p, li, dd, address) {
  color: #c0cbd6;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(
  .member-card > a,
  .eaf-form label > span,
  .calendar-filters label > span,
  .event-recurrence label > span,
  .eaf-form .consent a
) {
  color: #91bce8;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .member-card .member-status {
  color: #a8d4be;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .page-toc > p {
  color: #f1f5f9;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(
  .associate-directory-empty,
  .media-gallery-empty,
  .organisation-empty,
  .empty-state
) strong {
  color: #f0f4f8;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .legal-policy .status-label {
  color: #07111f;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(
  .page-toc a, .faq-item summary, .calendar-pagination button,
  .news-pagination a, .empty-state, .organisation-empty,
  .event-card h3, .event-card p, .event-card-meta, .event-recurrence-label
) {
  color: #d8e1eb;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(tbody th, .legal-policy code) {
  color: #d8e1eb;
  background: #16212d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .cookie-actions .cookie-choice {
  color: #dce8f4;
  background: #14202d;
  border-color: #526a82;
}

/* The three primary home navigation panels need a deliberately quiet surface
   in night mode. Gold remains the accent rather than a large luminous field. */
html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .link-panel {
  color: #d8e1eb;
  background: linear-gradient(150deg, #141e2a, #0f1721);
  border-color: #3a4d61;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .link-panel.gold {
  color: #f1f3e9;
  background: linear-gradient(145deg, #3b3218, #242012);
  border-color: #8c731f;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .link-panel h2 {
  color: #f0f4f8;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .link-panel a {
  color: #dce5ee;
  border-top-color: #3a4d61;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .link-panel.gold a {
  color: #f1f3e9;
  border-top-color: rgba(255, 210, 63, 0.28);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .link-panel a:is(:hover, :focus-visible) {
  color: #ffd23f;
  background: rgba(255, 210, 63, 0.06);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.nav-dropdown a, .language-menu button, .link-panel a, .page-sequence a) {
  color: #dce5ee;
  border-color: #35485d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.nav-dropdown a:hover, .language-menu button:hover, .language-menu button:focus-visible, .language-menu button[aria-checked="true"]) {
  color: #ffffff;
  background: #1b3046;
}

/* V14.9.1 mobile night-mode navigation contrast hot-fix.
   The responsive drawer inherits the light-theme navy link colour from
   styles.css. On the night surface that combination is unreadable, so the
   drawer gets explicit high-contrast text, controls and separators. */
@media (max-width: 1500px) {
  html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .site-nav.is-open .nav-primary,
  html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .site-nav.is-open .nav-primary:visited {
    color: #f0f4f8;
  }

  html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .site-nav.is-open .nav-primary:is(:hover, :focus-visible),
  html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .site-nav.is-open .nav-group.is-active > .nav-primary {
    color: #ffd23f;
  }

  html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .site-nav.is-open .nav-expand {
    color: #ffd23f;
  }

  html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .site-nav.is-open .nav-group {
    border-bottom-color: #526a82;
  }
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.button-outline-dark, .filter-chip, .view-switch button, .faq-actions button) {
  color: #dce8f4;
  background: #14202d;
  border-color: #526a82;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.filter-chip.is-active, .view-switch button.is-active, .faq-actions button:hover) {
  color: #061326;
  background: #ffd23f;
  border-color: #ffd23f;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(
  .inline-search, .search-field, .calendar-filters, .calendar-pagination,
  .event-recurrence, .form-review, .search-results a,
  .calendar-panel.grid-view .calendar-empty
) {
  color: #d8e1eb;
  background: #0f1721;
  border-color: #35485d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(input, select, textarea) {
  color: #e8eef5;
  background-color: #101822;
  border-color: #50677d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(input, textarea)::placeholder {
  color: #aab8c6;
  opacity: 1;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] table {
  color: #d8e1eb;
  background: #111923;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(td, th) {
  border-color: #35485d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] tbody tr:nth-child(even) {
  background: #16212d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .mission-band {
  color: #edf4ff;
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 210, 63, 0.08), transparent 28%),
    linear-gradient(110deg, #151d27, #1b2632);
  border-block: 1px solid #35485d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .mission-band :is(.eyebrow, h2, p) {
  color: #edf4ff;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.member-directory-band, .board-band, .resource-library, .submission-band, .portal-band) {
  background: linear-gradient(120deg, #0d1722, #080e16);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .member-map-section {
  background:
    radial-gradient(circle at 78% 42%, rgba(255, 210, 63, 0.045), transparent 34%),
    linear-gradient(135deg, #0b121a, #111b25);
  border-color: #35485d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.member-map-copy > p:not(.eyebrow), .map-legend, .map-instruction) {
  color: #c5d0db;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .member-map-copy .eyebrow {
  color: #ffd23f;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .europe-map-card {
  background: #0c141e;
  border-color: #35485d;
  box-shadow: var(--eaf-map-card-shadow);
  backdrop-filter: none;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .map-legend i {
  border-color: #526579;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.map-tooltip, .country-information-drag) {
  color: #ffffff;
  background: linear-gradient(120deg, #0c1722, #1e3c59);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .country-information-drag button {
  color: #f2f6fa;
  background: rgba(255, 255, 255, 0.08);
  border-color: #8fa3b8;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .country-information-drag button:is(:hover, :focus-visible) {
  color: #111923;
  background: #ffd23f;
  border-color: #ffd23f;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] :is(.country-information-list > div, .country-information-custom) {
  color: #d8e1eb;
  background: #172330;
  border-color: #40566c;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .country-information-list :is(dt, dd),
html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .country-information-custom {
  color: #d8e1eb;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .country-information-warning {
  color: #ffe7a3;
  background: #30250c;
  border-color: #9d7412;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .country-information-warning :is(strong, p, span) {
  color: #ffe7a3;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .event-card-details {
  color: #c4d0dc;
  background: #111a24;
  border-color: #35485d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .media-gallery-grid {
  scrollbar-color: #7897b5 #111923;
  box-shadow: inset 0 1px 0 #35485d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .media-lightbox-dialog {
  color: #e8eef5;
  background: #0c131c;
  border-color: #35485d;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .media-lightbox-backdrop {
  background: rgba(0, 3, 9, 0.9);
}

/* Night-mode surfaces are declared after the shared member interaction rules,
   so explicitly restore the EAF-gold hover and selected state here. */
html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) {
  color: var(--eaf-member-target-text);
  background: var(--eaf-member-target-bg);
  border-color: var(--eaf-member-target-border);
  box-shadow:
    0 0 0 3px var(--eaf-member-target-ring),
    0 18px 42px var(--eaf-member-target-shadow);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) :is(.member-status, h3, p),
html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) > a,
html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) > .member-website-unavailable {
  color: var(--eaf-member-target-text);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .member-card:is(:hover, :focus-within, .is-map-preview, .is-map-target, .has-country-information-window) .country-flag-art {
  opacity: 0.07;
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] .site-footer {
  background: linear-gradient(120deg, #0b151f, #070c12);
}

html[data-eaf-theme-context="public"][data-eaf-night-mode="true"] ::selection {
  color: #07111f;
  background: #ffd23f;
}

@media (prefers-reduced-motion: no-preference) {
  html[data-eaf-theme-context="public"][data-eaf-night-mode-source] body,
  html[data-eaf-theme-context="public"][data-eaf-night-mode-source] :is(.site-header, .site-footer, .home-news-card, .section-card, .news-card) {
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
  }
}

@media (forced-colors: active) {
  .night-mode-toggle {
    forced-color-adjust: none;
  }

  .night-mode-toggle[aria-pressed="true"] {
    color: Canvas;
    background: Highlight;
    border-color: Highlight;
  }
}
