/* The legacy rem resizers are superseded by one measured text multiplier. */
html[data-iveacer-a11y] { font-size: 16px !important; }
/* Keep filter off <html>/<body>/[data-a11y-toolbar] so position:fixed (.iveacer-a11y-open, modals) and sticky bars stay viewport-anchored. */
html[data-grayscale="true"],
html.grayscale-mode {
  filter: none !important;
}
html:is([data-grayscale="true"], .grayscale-mode) body > :not(script):not(style):not(link):not([data-a11y-toolbar]):not(#root),
html:is([data-grayscale="true"], .grayscale-mode) body > #root > :not(.app-shell):not(.academic-app),
html:is([data-grayscale="true"], .grayscale-mode) body > #root > :is(.app-shell, .academic-app) > *,
html:is([data-grayscale="true"], .grayscale-mode) body > [data-a11y-toolbar] > :is(.iveacer-a11y-open, #iveacer-a11y-panel) {
  filter: grayscale(1) !important;
}
html[data-iveacer-a11y] .iveacer-font-scaled {
  font-size: calc(var(--iveacer-font-base) * var(--iveacer-text-scale)) !important;
  line-height: calc(var(--iveacer-line-base, 24px) * var(--iveacer-text-scale)) !important;
}
html.iveacer-measuring .iveacer-font-scaled {
  font-size: var(--iveacer-font-base) !important;
  line-height: var(--iveacer-line-base, 1.5) !important;
}
html:is([data-reduced-motion="true"], .reduce-motion) {
  scroll-behavior: auto !important;
}
html:is([data-reduced-motion="true"], .reduce-motion) :is(.iveacer-a11y-open, #iveacer-a11y-panel .iveacer-a11y-close, #iveacer-a11y-panel fieldset button):is(:hover,:active) {
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-reduced-motion="false"]) {
    scroll-behavior: auto !important;
  }
  html:not([data-reduced-motion="false"]) :is(.iveacer-a11y-open, #iveacer-a11y-panel .iveacer-a11y-close, #iveacer-a11y-panel fieldset button):is(:hover,:active) {
    transform: none !important;
  }
}
html[data-contrast="high"], html.high-contrast {
  --text-main: #ffffff;
  --text-muted: #ffffff;
  --text-secondary: #ffffff;
  --heading: #ffff00;
  --bg-main: #000000;
  --bg-card: #000000;
  --bg-box: #000000;
  --border-color: #ffffff;
  --border-card: #ffffff;
  --border-light: #ffffff;
  --assessor-accent: #ffff00;
  --assessor-accent-hover: #ffff00;
  --assessor-accent-soft: #000000;
  --assessor-border: #ffffff;
  --assessor-surface: #000000;
  --assessor-bg: #000000;
  --assessor-text: #ffffff;
  --assessor-muted: #ffffff;
  color-scheme: dark;
}
html[data-contrast="high"] :where(a,button,input,select,textarea,summary,[tabindex]),
html.high-contrast :where(a,button,input,select,textarea,summary,[tabindex]) { outline-offset: 3px; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid #bd8b16 !important; outline-offset: 3px; }
html[data-contrast="high"] :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible,
html.high-contrast :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 3px solid #ffff00 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px #000000 !important;
}

/* ============================================================================
   1. Shared Floating Accessibility Toolbar & Dialog (#iveacer-a11y-panel)
   ============================================================================ */
.iveacer-a11y, .iveacer-a11y * { box-sizing: border-box; }
.iveacer-a11y { font-family: 'Prompt','Sarabun',sans-serif; font-size: calc(16px * var(--iveacer-text-scale, 1)); line-height: 1.7; }
.iveacer-a11y-open { position: fixed; right: 16px; bottom: 76px; z-index: 1500; border: 1px solid #d4af37; border-radius: 999px; padding: 9px 14px; min-height: 44px; background: #1e4d2b; color: #fff; box-shadow: 0 4px 16px #102a1b33; font: 600 calc(13px * var(--iveacer-text-scale, 1))/1.5 'Prompt',sans-serif; cursor: pointer; transition: background-color 160ms ease-out, border-color 160ms ease-out, transform 150ms var(--iveacer-ease-out, cubic-bezier(0.23, 1, 0.32, 1)); }
.iveacer-a11y-open:active:not(:disabled) { transform: scale(0.96); }
.iveacer-a11y-open span { margin-left: 5px; color: #f5d574; }
#iveacer-a11y-panel { position: fixed; inset: 0; width: min(480px,calc(100% - 24px)); max-height: min(90dvh,800px); overflow-y: auto; margin: auto; padding: 22px; border: 1px solid #bbcfbf; border-radius: 16px; background: #fff; color: #173b24; box-shadow: 0 20px 80px #001c2440; font: calc(14px * var(--iveacer-text-scale, 1))/1.7 'Prompt','Sarabun',sans-serif; }
#iveacer-a11y-panel::backdrop { background: #09251980; }
.iveacer-a11y-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#iveacer-a11y-title { font-size: calc(19px * var(--iveacer-text-scale, 1)); font-weight: 700; margin: 0; color: inherit; }
#iveacer-a11y-panel .iveacer-a11y-close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; padding: 6px; font-size: calc(26px * var(--iveacer-text-scale, 1)); line-height: 1; background: transparent; color: inherit; cursor: pointer; transition: background-color 160ms ease-out, transform 150ms var(--iveacer-ease-out, cubic-bezier(0.23, 1, 0.32, 1)); }
#iveacer-a11y-panel .iveacer-a11y-close:hover { background: rgba(23, 59, 36, 0.08); }
#iveacer-a11y-panel .iveacer-a11y-close:active:not(:disabled) { transform: scale(0.96); }
#iveacer-a11y-panel p { font-size: calc(14px * var(--iveacer-text-scale, 1)); color: #53665b; margin: 7px 0 14px; }
#iveacer-a11y-panel fieldset { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; margin: 0 0 15px; border: 1px solid #d9e3dc; border-radius: 16px; padding: 10px 12px 12px; }
#iveacer-a11y-panel legend { float: none; width: auto; padding: 0 5px; margin: 0; font-size: calc(13px * var(--iveacer-text-scale, 1)); font-weight: 600; color: inherit; }
#iveacer-a11y-panel fieldset button { min-height: 44px; padding: 8px 14px; border: 1px solid #b9cfc0; border-radius: 6px; background: #f4f7f4; color: #173b24; font: inherit; cursor: pointer; transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, transform 150ms var(--iveacer-ease-out, cubic-bezier(0.23, 1, 0.32, 1)); }
#iveacer-a11y-panel fieldset button:active:not(:disabled) { transform: scale(0.96); }
#iveacer-a11y-panel fieldset button[aria-pressed="true"] { background: #1e4d2b; color: #fff; border-color: #1e4d2b; box-shadow: inset 0 0 0 1px #e3c65f; }
#iveacer-a11y-panel [data-a11y-language-note] { flex-basis: 100%; margin: 3px 0 0; }
#iveacer-a11y-panel .iveacer-a11y-storage { background: #eef4ef; border-radius: 8px; padding: 10px; margin-bottom: 0; }
html[data-theme="dark"] #iveacer-a11y-panel, html[data-bs-theme="dark"] #iveacer-a11y-panel, html.dark #iveacer-a11y-panel { background: #152b20; color: #edf5ef; border-color: #5c7766; }
html[data-theme="dark"] #iveacer-a11y-panel .iveacer-a11y-close:hover, html[data-bs-theme="dark"] #iveacer-a11y-panel .iveacer-a11y-close:hover, html.dark #iveacer-a11y-panel .iveacer-a11y-close:hover { background: rgba(255, 255, 255, 0.1); }
html[data-theme="dark"] #iveacer-a11y-panel p, html[data-bs-theme="dark"] #iveacer-a11y-panel p, html.dark #iveacer-a11y-panel p { color: #c5d7ca; }
html[data-theme="dark"] #iveacer-a11y-panel fieldset, html[data-bs-theme="dark"] #iveacer-a11y-panel fieldset, html.dark #iveacer-a11y-panel fieldset { border-color: #45614e; }
html[data-theme="dark"] #iveacer-a11y-panel fieldset button, html[data-bs-theme="dark"] #iveacer-a11y-panel fieldset button, html.dark #iveacer-a11y-panel fieldset button { background: #203e2d; color: #edf5ef; border-color: #63836d; }
html[data-theme="dark"] #iveacer-a11y-panel fieldset button[aria-pressed="true"], html[data-bs-theme="dark"] #iveacer-a11y-panel fieldset button[aria-pressed="true"], html.dark #iveacer-a11y-panel fieldset button[aria-pressed="true"] { background: #3f714f; }
html[data-theme="dark"] #iveacer-a11y-panel .iveacer-a11y-storage, html[data-bs-theme="dark"] #iveacer-a11y-panel .iveacer-a11y-storage, html.dark #iveacer-a11y-panel .iveacer-a11y-storage { background: #203e2d; }
html[data-contrast="high"] .iveacer-a11y-open, html.high-contrast .iveacer-a11y-open { background: #000000 !important; color: #ffff00 !important; border: 2px solid #ffff00 !important; box-shadow: none !important; }
html[data-contrast="high"] .iveacer-a11y-open span, html.high-contrast .iveacer-a11y-open span { color: #ffffff !important; }
html[data-contrast="high"] #iveacer-a11y-panel, html.high-contrast #iveacer-a11y-panel { background: #000000 !important; color: #ffffff !important; border: 2px solid #ffffff !important; box-shadow: none !important; }
html[data-contrast="high"] #iveacer-a11y-panel #iveacer-a11y-title, html.high-contrast #iveacer-a11y-panel #iveacer-a11y-title { color: #ffff00 !important; }
html[data-contrast="high"] #iveacer-a11y-panel p, html.high-contrast #iveacer-a11y-panel p,
html[data-contrast="high"] #iveacer-a11y-panel legend, html.high-contrast #iveacer-a11y-panel legend { color: #ffffff !important; }
html[data-contrast="high"] #iveacer-a11y-panel .iveacer-a11y-close, html.high-contrast #iveacer-a11y-panel .iveacer-a11y-close { color: #ffff00 !important; border: 1.5px solid #ffffff !important; border-radius: 6px; }
html[data-contrast="high"] #iveacer-a11y-panel fieldset, html.high-contrast #iveacer-a11y-panel fieldset { border: 1.5px solid #ffffff !important; }
html[data-contrast="high"] #iveacer-a11y-panel fieldset button, html.high-contrast #iveacer-a11y-panel fieldset button { background: #000000 !important; color: #ffffff !important; border: 1.5px solid #ffffff !important; }
html[data-contrast="high"] #iveacer-a11y-panel fieldset button[aria-pressed="true"], html.high-contrast #iveacer-a11y-panel fieldset button[aria-pressed="true"] { background: #ffff00 !important; color: #000000 !important; border: 2px solid #ffffff !important; font-weight: 700 !important; box-shadow: none !important; }
html[data-contrast="high"] #iveacer-a11y-panel .iveacer-a11y-storage, html.high-contrast #iveacer-a11y-panel .iveacer-a11y-storage { background: #000000 !important; color: #ffff00 !important; border: 1.5px solid #ffffff !important; }
@media(max-width:767.98px) { .iveacer-a11y-open { right: 12px; bottom: 12px; min-height: 44px; padding: 8px 14px; font-size: calc(13px * var(--iveacer-text-scale, 1)); box-shadow: 0 4px 14px rgba(16,42,27,0.24); } #iveacer-a11y-panel { padding: 17px; } }
@media print {
  [data-a11y-toolbar] { display: none !important; }
  html[data-grayscale="true"],
  html.grayscale-mode,
  html:is([data-grayscale="true"], .grayscale-mode) body > :not(script):not(style):not(link):not([data-a11y-toolbar]):not(#root),
  html:is([data-grayscale="true"], .grayscale-mode) body > #root > :not(.app-shell):not(.academic-app),
  html:is([data-grayscale="true"], .grayscale-mode) body > #root > :is(.app-shell, .academic-app) > *,
  html:is([data-grayscale="true"], .grayscale-mode) body > [data-a11y-toolbar] > :is(.iveacer-a11y-open, #iveacer-a11y-panel) {
    filter: none !important;
  }
}

/* Keep keyboard targets clear of fixed controls and preserve Windows high contrast. */
html[data-iveacer-a11y] { scroll-padding-block: 110px 150px; }
html[data-iveacer-a11y] :where(a,button,input,select,textarea,[tabindex]) { scroll-margin-block: 110px 150px; }
.news-header { flex-wrap: wrap; gap: 12px; }
.news-nav-buttons { flex-wrap: wrap; align-items: center; }
.news-pause-btn { width: auto; min-width: 44px; min-height: 44px; height: auto; padding: 8px 12px; border-radius: 6px; font-size: 14px; line-height: 1.5; }
.news-pause-btn:disabled { opacity: 1; cursor: default; }

/* ============================================================================
   2. High Contrast Mode (html[data-contrast="high"]) Main Portal Overrides
   Wins even when html[data-theme="dark"] is simultaneously active.
   ============================================================================ */
html[data-contrast="high"] .home-design,
html[data-contrast="high"] body.home-design,
html.high-contrast .home-design,
html.high-contrast body.home-design {
  --home-card-border: 1.5px solid #ffffff;
  --home-card-shadow: none;
  --home-card-hover-shadow: none;
  background: #000000 !important;
  color: #ffffff !important;
}
html[data-contrast="high"] .home-design :is(.top-accessibility-bar,.navbar-custom,.hero-portal-section),
html.high-contrast .home-design :is(.top-accessibility-bar,.navbar-custom,.hero-portal-section) {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}
html[data-contrast="high"] .home-design .hero-portal-section::before,
html.high-contrast .home-design .hero-portal-section::before {
  display: none !important;
}
html[data-contrast="high"] .home-design .top-accessibility-bar :is(.access-btn,.btn-royal-blessing,.btn-main-website-link),
html.high-contrast .home-design .top-accessibility-bar :is(.access-btn,.btn-royal-blessing,.btn-main-website-link) {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1px solid #ffffff !important;
}
html[data-contrast="high"] .home-design .top-accessibility-bar .access-btn:is(.active,[aria-pressed="true"]),
html.high-contrast .home-design .top-accessibility-bar .access-btn:is(.active,[aria-pressed="true"]) {
  background: #ffff00 !important;
  color: #000000 !important;
  font-weight: 700 !important;
}
html[data-contrast="high"] .home-design .search-input-group,
html.high-contrast .home-design .search-input-group {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
  box-shadow: none !important;
}
html[data-contrast="high"] .home-design .search-icon-btn,
html.high-contrast .home-design .search-icon-btn {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 1.5px solid #ffffff !important;
}
html[data-contrast="high"] .home-design #latestNewsSection .latest-news-section,
html.high-contrast .home-design #latestNewsSection .latest-news-section,
html[data-contrast="high"] .home-design .news-swiper .swiper-slide,
html.high-contrast .home-design .news-swiper .swiper-slide,
html[data-contrast="high"] .home-design .news-ticker,
html.high-contrast .home-design .news-ticker,
html[data-contrast="high"] .home-design .pinned-notices .breaking-alert-card,
html.high-contrast .home-design .pinned-notices .breaking-alert-card,
html[data-contrast="high"] .home-design #latestNewsSection .alert-item,
html.high-contrast .home-design #latestNewsSection .alert-item {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: none !important;
}
html[data-contrast="high"] .home-design .portal-card,
html.high-contrast .home-design .portal-card,
html[data-contrast="high"] .home-design .portal-card-item:first-child .portal-card,
html.high-contrast .home-design .portal-card-item:first-child .portal-card,
html[data-contrast="high"] .home-design :is(.smart-agri-hub-card,.colleges-network-card,.ita-section-card,.agri-weather-box,.agri-metric-tile,.agri-feature-card,.college-item-card,.ita-action-card),
html.high-contrast .home-design :is(.smart-agri-hub-card,.colleges-network-card,.ita-section-card,.agri-weather-box,.agri-metric-tile,.agri-feature-card,.college-item-card,.ita-action-card) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: none !important;
}
html[data-contrast="high"] .home-design .portal-card-footer,
html.high-contrast .home-design .portal-card-footer {
  background: #000000 !important;
  color: #ffff00 !important;
  border-top: 1.5px solid #ffffff !important;
}
html[data-contrast="high"] .home-design .role-nav-pills,
html.high-contrast .home-design .role-nav-pills,
html[data-contrast="high"] .home-design .quick-tags,
html.high-contrast .home-design .quick-tags {
  background: #000000 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: none !important;
}
html[data-contrast="high"] .home-design .role-pill-btn,
html.high-contrast .home-design .role-pill-btn {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
}
html[data-contrast="high"] .home-design .role-pill-btn:is(.active,[aria-pressed="true"]),
html.high-contrast .home-design .role-pill-btn:is(.active,[aria-pressed="true"]) {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
html[data-contrast="high"] .home-design .role-pill-btn:is(.active,[aria-pressed="true"]) :is(i,.count-badge),
html.high-contrast .home-design .role-pill-btn:is(.active,[aria-pressed="true"]) :is(i,.count-badge) {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.15) !important;
}
html[data-contrast="high"] .home-design .quick-tag-item,
html.high-contrast .home-design .quick-tag-item {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1.5px solid #ffffff !important;
}
html[data-contrast="high"] .home-design .quick-tag-item:is(:hover,:focus-visible),
html.high-contrast .home-design .quick-tag-item:is(:hover,:focus-visible) {
  background: #ffff00 !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

/* ============================================================================
   3. Cross-Page Dark Mode & High Contrast Safeguards
      (.admissions-page, .assessor-body, .academic-app & Shared Components)
   ============================================================================ */

/* 3.1 Shared Design System Components in High Contrast Mode */
html:is([data-contrast="high"],.high-contrast) :is(.iveacer-card,.iveacer-filter-bar) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: none !important;
}
html:is([data-contrast="high"],.high-contrast) .iveacer-badge {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) :is(.iveacer-pill-btn,.iveacer-btn-primary) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: none !important;
}
html:is([data-contrast="high"],.high-contrast) :is(.iveacer-pill-btn:is(.active,[aria-pressed="true"]),.iveacer-btn-gold) {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

/* 3.2 Admissions Page (.admissions-page) — Dark Mode & High Contrast Safeguards */
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .admissions-page :is(.adm-college-card,.adm-checker-box,.admissions-form-section,.admissions-receipt,.admissions-review-dialog,#kioskOverlay .card,.modal-content) {
  background-color: var(--iveacer-surface);
  color: var(--iveacer-text-main);
  border-color: var(--iveacer-border);
}
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .admissions-page .college-badge.badge-weekend {
  background: var(--iveacer-campus-lb-surface) !important;
  color: var(--iveacer-campus-lb-text) !important;
  border-color: var(--iveacer-campus-lb-border) !important;
}
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .admissions-page .college-badge.badge-weekday {
  background: var(--iveacer-campus-rb-surface) !important;
  color: var(--iveacer-campus-rb-text) !important;
  border-color: var(--iveacer-campus-rb-border) !important;
}
html:is([data-contrast="high"],.high-contrast) body.admissions-page,
html:is([data-contrast="high"],.high-contrast) .admissions-page :is(.adm-topbar,.adm-navbar,.adm-hero,.admissions-masthead,.admissions-section,.admissions-form-section,.admissions-admin-section,footer) {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .admissions-page :is(.adm-hero-title,.adm-brand-title,.admissions-section h2,.adm-college-title,.admissions-receipt h3,.admissions-status-result h3) {
  color: #ffff00 !important;
  -webkit-text-fill-color: #ffff00 !important;
}
html:is([data-contrast="high"],.high-contrast) .admissions-page :is(.adm-college-card,.adm-checker-box,.adm-checker-header,.adm-checker-result,.admissions-receipt,.admissions-status-result,.admissions-review-dialog,.accordion-item,.accordion-button,.checker-option-btn,#checkerResultBox,.adm-major-box,.adm-stats-bar,.adm-contact-item,.kiosk-campus-card,.modal-content) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: none !important;
}
html:is([data-contrast="high"],.high-contrast) .admissions-page :is(.college-badge,.hero-pill-badge,.admissions-status-cell,.adm-step-pill,.checker-option-icon,.badge) {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .admissions-page :is(.admissions-primary-link,.checker-option-btn.selected,.btn-warning) {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
  font-weight: 700 !important;
}
html:is([data-contrast="high"],.high-contrast) .admissions-page .admissions-field :is(input,select,textarea),
html:is([data-contrast="high"],.high-contrast) .admissions-page :is(.form-control,.form-select) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .admissions-page .admissions-admin-table :is(th,td) {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

/* 3.3 AUN-QA & Programme Specification (.assessor-body) — Theme & High Contrast Safeguards */
.assessor-body .study-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--iveacer-border);
  background: var(--iveacer-surface-soft);
  color: var(--iveacer-text-main);
}
.assessor-body .map-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  border-radius: 9999px;
  font-weight: 700;
  line-height: 1;
}
.assessor-body .map-symbol-primary {
  background: var(--iveacer-campus-pb-surface, var(--iveacer-success-surface));
  color: var(--iveacer-campus-pb-text, var(--iveacer-success-text));
  border: 1px solid var(--iveacer-campus-pb-border, var(--iveacer-border));
}
.assessor-body .map-symbol-secondary {
  background: var(--iveacer-campus-lb-surface, var(--iveacer-warning-surface));
  color: var(--iveacer-campus-lb-text, var(--iveacer-warning-text));
  border: 1px solid var(--iveacer-campus-lb-border, var(--iveacer-border));
}
html:is([data-contrast="high"],.high-contrast) body.assessor-body,
html:is([data-contrast="high"],.high-contrast) .assessor-body :is(.assessor-masthead,.spec-summary-band,.assessor-control-bar,.assessor-main,footer) {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .assessor-body :is(.spec-main-title,.spec-section-title,.spec-panel-title,.spec-faculty-name,.masthead-org) {
  color: #ffff00 !important;
}
html:is([data-contrast="high"],.high-contrast) .assessor-body :is(.spec-panel,.spec-panel-header,.spec-callout,.spec-outcome-card,.spec-faculty-card,.campus-segmented-bar,#curriculumPdfModal .modal-content) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: none !important;
}
html:is([data-contrast="high"],.high-contrast) .assessor-body :is(.btn-spec-nav,.btn-spec-pdf,.spec-sibling-link,.criterion-pill,.campus-seg-btn) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .assessor-body :is(.btn-spec-pdf-primary,.campus-seg-btn.active,.campus-seg-btn[aria-pressed="true"],.criterion-pill.active,.btn-spec-nav[aria-pressed="true"]) {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
  font-weight: 700 !important;
}
html:is([data-contrast="high"],.high-contrast) .assessor-body :is(.study-cat-badge,.map-symbol-primary,.map-symbol-secondary,.map-symbol-none,.criterion-num,.spec-faculty-avatar,.spec-degree-pill) {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .assessor-body .spec-table :is(th,td) {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

/* 3.4 Academic Works Portal (.academic-app) — Dark Mode & High Contrast Safeguards */
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .academic-app :is(.aw-work-card,.aw-filter-panel,.aw-source-card,.aw-dialog,.aw-search) {
  background-color: var(--iveacer-surface);
  color: var(--iveacer-text-main);
  border-color: var(--iveacer-border);
}
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .academic-app :is(.aw-type-research,.aw-status-source) {
  background: var(--iveacer-success-surface) !important;
  color: var(--iveacer-success-text) !important;
  border-color: var(--iveacer-campus-pb-border) !important;
}
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .academic-app :is(.aw-type-innovation,.aw-status-needs-review) {
  background: var(--iveacer-warning-surface) !important;
  color: var(--iveacer-warning-text) !important;
  border-color: var(--iveacer-campus-lb-border) !important;
}
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .academic-app :is(.aw-type-project,.aw-status-local) {
  background: var(--iveacer-violet-surface) !important;
  color: var(--iveacer-violet-text) !important;
  border-color: var(--iveacer-border) !important;
}
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .academic-app .aw-type-teaching {
  background: var(--iveacer-info-surface) !important;
  color: var(--iveacer-info-text) !important;
  border-color: var(--iveacer-campus-rb-border) !important;
}
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) .academic-app .aw-type-other {
  background: var(--iveacer-neutral-surface) !important;
  color: var(--iveacer-neutral-text) !important;
  border-color: var(--iveacer-border) !important;
}
html:is([data-contrast="high"],.high-contrast) .academic-app,
html:is([data-contrast="high"],.high-contrast) .academic-app :is(.aw-header,.aw-masthead,.aw-footer) {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .academic-app :is(.aw-masthead h1,.aw-section-heading h2,.aw-work-card h3,.aw-work-card h3 > button,.aw-dialog-heading h2) {
  color: #ffff00 !important;
}
html:is([data-contrast="high"],.high-contrast) .academic-app :is(.aw-filter-panel,.aw-work-card,.aw-source-card,.aw-dialog,.aw-toast,.aw-account,.aw-backup-section,.aw-citation-panel,.aw-workflow-panel,.aw-admin-panel) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: none !important;
}
html:is([data-contrast="high"],.high-contrast) .academic-app :is(.aw-work-type,.aw-source-badge,.aw-workflow-badge,.aw-citation-copy) {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .academic-app :is(.aw-search,.aw-filter-row select,.aw-sort select,.aw-field input,.aw-field select,.aw-field textarea) {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) .academic-app :is(.aw-button-primary,.aw-workspace-tabs button[aria-pressed="true"],.aw-pagination button[aria-current="page"]) {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
  font-weight: 700 !important;
}

/* ============================================================================
   4. Bonus Accessibility & WCAG Contrast Improvements
   ============================================================================ */
/* 4.1 Skip-link high-contrast visibility */
.skip-link:is(:focus,:focus-visible) {
  top: 16px !important;
  background: var(--iveacer-brand-gold, #d4af37) !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  outline: 3px solid #ffffff !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45) !important;
}

/* 4.2 Mobile/tablet navbar collapse drawer & dropdown contrast in Light/Dark/High-Contrast */
@media (max-width: 1199.98px) {
  .home-design .navbar-collapse {
    background: var(--iveacer-brand-deep) !important;
    border: 1px solid rgba(212, 175, 55, 0.45) !important;
    padding: 16px !important;
  }
  .home-design .dropdown-menu-custom {
    background: var(--iveacer-surface) !important;
    border: 1px solid var(--iveacer-border) !important;
  }
}

/* 4.3 Search highlight (mark.search-highlight) WCAG AAA contrast */
html:is([data-theme="dark"],[data-bs-theme="dark"],.dark) mark.search-highlight {
  background-color: #fde047 !important;
  color: #0f172a !important;
}
html:is([data-contrast="high"],.high-contrast) mark.search-highlight {
  background-color: #ffff00 !important;
  color: #000000 !important;
  outline: 1px solid #ffffff;
}

/* 4.4 Footer muted text & links WCAG AA contrast (>= 4.5:1 on #08170c) */
.portal-footer .footer-bottom-bar,
.portal-footer .text-white-50 {
  color: #cbd5e1 !important;
}
.portal-footer .footer-links-list a {
  color: #e2e8f0 !important;
}
html:is([data-contrast="high"],.high-contrast) .portal-footer {
  background: #000000 !important;
  color: #ffffff !important;
  border-top: 3px solid #ffff00 !important;
}
html:is([data-contrast="high"],.high-contrast) .portal-footer a {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

/* 4.5 Interactive button, icon & dialog border visibility in High Contrast Mode */
html:is([data-contrast="high"],.high-contrast) :is(.news-nav-btn,.news-ticker-controls button,.back-to-top-btn,#smartCommandClose,#smartCommandAsk) {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) :is(.card-icon-box,.category-icon-wrapper,.agri-feature-icon,.ita-icon-box) {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1.5px solid #ffffff !important;
}
html:is([data-contrast="high"],.high-contrast) #smartCommandDialog {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

@media (forced-colors: active) {
  :where(a,button,input,select,textarea,[tabindex]):focus-visible { outline: 3px solid Highlight !important; }
  #iveacer-a11y-panel, #iveacer-a11y-panel fieldset, #iveacer-a11y-panel fieldset button, .iveacer-a11y-open { border-color: ButtonText; }
  #iveacer-a11y-panel fieldset button[aria-pressed="true"] { border: 3px double Highlight; }
}
