/* High contrast: normalize nested surfaces, including headers and page builders.
   Scoped to document light DOM (widget Shadow DOM stays unaffected).
   Media, foreign frames, inline !important declarations and closed Shadow DOM
   cannot be forced into perfect contrast by an external stylesheet. */
html[data-ec-accessibility-contrast='light'] { color-scheme: light; }
html[data-ec-accessibility-contrast='dark'] { color-scheme: dark; }
html[data-ec-accessibility-contrast='light'] body { background: #ffffff !important; color: #101010 !important; }
html[data-ec-accessibility-contrast='dark'] body { background: #101010 !important; color: #ffffff !important; }

html[data-ec-accessibility-contrast='light'] body :where(*):where(:not(#ec-accessibility-root)),
html[data-ec-accessibility-contrast='light'] body :where(*):where(:not(#ec-accessibility-root))::before,
html[data-ec-accessibility-contrast='light'] body :where(*):where(:not(#ec-accessibility-root))::after {
  background-color: transparent !important;
  background-image: none !important;
  color: #101010 !important;
  -webkit-text-fill-color: #101010 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  border-color: #101010 !important;
}
html[data-ec-accessibility-contrast='dark'] body :where(*):where(:not(#ec-accessibility-root)),
html[data-ec-accessibility-contrast='dark'] body :where(*):where(:not(#ec-accessibility-root))::before,
html[data-ec-accessibility-contrast='dark'] body :where(*):where(:not(#ec-accessibility-root))::after {
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
  box-shadow: none !important;
  border-color: #ffffff !important;
}
/* Form fields need their own opaque surface for legible placeholder and text. */
html[data-ec-accessibility-contrast='light'] body :is(input, textarea, select, button, [role='button']),
html[data-ec-accessibility-contrast='light'] body :is(option, optgroup) {
  background-color: #ffffff !important;
  color: #101010 !important;
  -webkit-text-fill-color: #101010 !important;
  border: 2px solid #101010 !important;
}
html[data-ec-accessibility-contrast='dark'] body :is(input, textarea, select, button, [role='button']),
html[data-ec-accessibility-contrast='dark'] body :is(option, optgroup) {
  background-color: #101010 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 2px solid #ffffff !important;
}
html[data-ec-accessibility-contrast='light'] body :is(a[href], a[href] *),
html[data-ec-accessibility-contrast='light'] body :is(a[href], a[href] *)::before,
html[data-ec-accessibility-contrast='light'] body :is(a[href], a[href] *)::after {
  color: #003b84 !important;
  -webkit-text-fill-color: #003b84 !important;
  text-decoration: underline !important;
}
html[data-ec-accessibility-contrast='dark'] body :is(a[href], a[href] *),
html[data-ec-accessibility-contrast='dark'] body :is(a[href], a[href] *)::before,
html[data-ec-accessibility-contrast='dark'] body :is(a[href], a[href] *)::after {
  color: #ffdf71 !important;
  -webkit-text-fill-color: #ffdf71 !important;
  text-decoration: underline !important;
}
html[data-ec-accessibility-contrast='light'] body :is(input,textarea)::placeholder { color:#424242 !important; -webkit-text-fill-color:#424242 !important; opacity:1; }
html[data-ec-accessibility-contrast='dark'] body :is(input,textarea)::placeholder { color:#d5d5d5 !important; -webkit-text-fill-color:#d5d5d5 !important; opacity:1; }
/* Make presentational vector icons legible where they use currentColor or
   explicit fill/stroke attributes; exclude SVG shapes declaring none. */
html[data-ec-accessibility-contrast='light'] body svg :is(path,circle,rect,polygon,polyline,ellipse,line):where([fill]:not([fill='none'])) { fill:#101010 !important; }
html[data-ec-accessibility-contrast='dark'] body svg :is(path,circle,rect,polygon,polyline,ellipse,line):where([fill]:not([fill='none'])) { fill:#ffffff !important; }
html[data-ec-accessibility-contrast='light'] body svg :is(path,circle,rect,polygon,polyline,ellipse,line):where([stroke]:not([stroke='none'])) { stroke:#101010 !important; }
html[data-ec-accessibility-contrast='dark'] body svg :is(path,circle,rect,polygon,polyline,ellipse,line):where([stroke]:not([stroke='none'])) { stroke:#ffffff !important; }

html.ec-a11y-spacing body :where(p, li, dd, dt, blockquote, figcaption, label, td, th) {
  letter-spacing: .08em !important;
  word-spacing: .16em !important;
  line-height: 1.8 !important;
}
html.ec-a11y-readable-font body :where(h1, h2, h3, h4, h5, h6, p, li, blockquote, a, label, input, textarea, button, td, th, figcaption) {
  font-family: Arial, Verdana, sans-serif !important;
}
html.ec-a11y-highlight-links body a[href] {
  text-decoration: underline !important;
  text-decoration-thickness: max(2px, .14em) !important;
  text-underline-offset: .2em !important;
  outline: 2px solid currentColor !important;
  outline-offset: 2px !important;
}
html.ec-a11y-highlight-headings body :where(h1, h2, h3, h4, h5, h6) {
  outline: 2px solid #d97706 !important;
  outline-offset: 4px !important;
}
/* :focus AND :focus-visible, so focused controls respond to mouse, script and keyboard.
   Dual ring is visible against light and dark surfaces. */
html.ec-a11y-strong-focus body :is(a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]):focus,
html.ec-a11y-strong-focus body :is(a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]):focus-visible {
  outline: 4px solid #ffcc00 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 7px #101010 !important;
}

html.ec-a11y-hide-images body :where(img, picture, video, canvas) {
  opacity: 0 !important; /* preserves layout and the accessible name in the DOM */
}
html.ec-a11y-hide-images body * { background-image: none !important; }
html.ec-a11y-stop-motion,
html.ec-a11y-stop-motion body,
html.ec-a11y-stop-motion body *,
html.ec-a11y-stop-motion body *::before,
html.ec-a11y-stop-motion body *::after {
  animation: none !important;
  animation-play-state: paused !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.ec-a11y-large-cursor body,
html.ec-a11y-large-cursor body * {
  cursor: url('../Icons/large-pointer.svg') 3 2, auto !important;
}
@media print {
  #ec-accessibility-root { display: none !important; }
}

/* v1.1: make keyboard-navigation focus visible without altering native Tab order. */
html.ec-a11y-keyboard-nav-mode body .ec-a11y-nav-active-focus:focus {
  outline: 4px solid #ffcc00 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 7px #101010 !important;
}
