/**
 * Rhodium Master — Free Self-Hosted Accessibility Widget Stylesheet
 * 100% Self-Hosted | Zero Third-Party Paid Services | WCAG 2.2 Compliant Focus
 * Namespace: .rm-a11y-* | Root states: html.rm-a11y-*
 */

/* ==========================================================================
   1. FLOATING LAUNCHER BUTTON & TOOLTIP
   ========================================================================== */

#rm-a11y-container {
  position: relative;
  z-index: 99999;
}

.rm-a11y-trigger-btn {
  position: fixed;
  bottom: 25px;
  right: 20px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #1e1e1e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  font-size: 38px;
  padding: 0;
  outline: none;
  border: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s ease;
}

/* Base perimeter border track */
.rm-a11y-trigger-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(250, 124, 32, 0.25);
  pointer-events: none;
  z-index: 1;
}

/* Infinite rotating glowing border beam */
.rm-a11y-trigger-btn::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg,
      transparent 0%,
      transparent 45%,
      #fa7c20 75%,
      #ffbe76 90%,
      #ffffff 98%,
      transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2.5px));
  animation: rm-a11y-border-spin 2.6s linear infinite;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 0 6px rgba(250, 124, 32, 0.7));
}

@keyframes rm-a11y-border-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.rm-a11y-trigger-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(250, 124, 32, 0.35), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.rm-a11y-trigger-btn:hover::before {
  animation-duration: 1.6s;
  filter: drop-shadow(0 0 9px rgba(250, 124, 32, 0.95));
}

.rm-a11y-trigger-btn:focus-visible {
  outline: 3px solid #fa7c20 !important;
  outline-offset: 4px !important;
}

.rm-a11y-trigger-icon {
  font-size: 38px;
  line-height: 1;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rm-a11y-trigger-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Active indicator dot when settings are on */
.rm-a11y-active-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background-color: #fa7c20;
  border: 2px solid #ffffff;
  display: none;
  z-index: 10;
}

.rm-a11y-has-active .rm-a11y-active-badge {
  display: block;
}

/* Tooltip */
.rm-a11y-tooltip {
  position: fixed;
  bottom: 42px;
  right: 96px;
  background: #1e1e1e;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font1, "Poppins", sans-serif);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 99999;
}

/* Tooltip arrow pointing towards the button */
.rm-a11y-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent #1e1e1e;
}

.rm-a11y-trigger-btn:hover+.rm-a11y-tooltip,
.rm-a11y-trigger-btn:focus-visible+.rm-a11y-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

#rm-a11y-trigger[aria-expanded="true"]+.rm-a11y-tooltip {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   2. ACCESSIBILITY DIALOG PANEL (WHITE/LIGHT THEME)
   ========================================================================== */

.rm-a11y-panel {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 410px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: #ffffff;
  color: #1e293b;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 48px -6px rgba(0, 0, 0, 0.14), 0 8px 20px -4px rgba(0, 0, 0, 0.06);
  font-family: var(--font1, "Poppins", sans-serif);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.25s;
}

.rm-a11y-panel.rm-a11y-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Launcher remains visible and interactive when panel is open */
#rm-a11y-trigger[aria-expanded="true"] {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: scale(1) !important;
}

/* Panel Header */
.rm-a11y-header {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.rm-a11y-header-titles {
  display: flex;
  flex-direction: column;
}

.rm-a11y-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rm-a11y-title-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #fff7ed;
  color: #fa7c20;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(250, 124, 32, 0.12);
}

.rm-a11y-subtitle {
  margin: 3px 0 0 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

.rm-a11y-close-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  padding: 0;
  outline: none;
}

.rm-a11y-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.rm-a11y-close-btn:focus-visible {
  outline: 2px solid #fa7c20 !important;
  outline-offset: 2px;
}

/* Panel Body & Scrollbar */
.rm-a11y-body {
  padding: 16px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
}

.rm-a11y-body::-webkit-scrollbar {
  width: 6px;
}

.rm-a11y-body::-webkit-scrollbar-track {
  background: #f8fafc;
}

.rm-a11y-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.rm-a11y-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   FEATURE CARD GRID (USERWAY DESIGN)
   ========================================================================== */

.rm-a11y-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

/* UserWay Style Card */
.rm-a11y-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  min-height: 110px;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  width: 100%;
}

.rm-a11y-card:hover {
  background: #ffffff;
  border-color: #fdba74;
  box-shadow: 0 4px 14px rgba(250, 124, 32, 0.12);
  transform: translateY(-2px);
}

.rm-a11y-card:focus-visible {
  outline: 2px solid #fa7c20 !important;
  outline-offset: 2px;
}

.rm-a11y-card.rm-a11y-active {
  background: #ffffff;
  border: 1px solid #fa7c20;

}

/* Top-Right Circular Checkmark Badge */
.rm-a11y-check-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fa7c20;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 2;
}

.rm-a11y-card.rm-a11y-active .rm-a11y-check-badge {
  opacity: 1;
  transform: scale(1);
}

/* Centered Card Icon */
.rm-a11y-card-icon {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  color: #334155;
  margin-top: 4px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.rm-a11y-card:hover .rm-a11y-card-icon {
  transform: scale(1.08);
}

.rm-a11y-card.rm-a11y-active .rm-a11y-card-icon {
  color: #fa7c20;
}

/* Dedicated Serif 'TT' Icon (Matching UserWay Screenshot) */
.rm-a11y-icon-tt {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1;
}

.rm-a11y-icon-tt .tt-s {
  font-size: 19px;
  transform: translateY(-1px);
}

.rm-a11y-icon-tt .tt-l {
  font-size: 27px;
}

/* Card Title */
.rm-a11y-card-title {
  font-size: 13.5px;
  line-height: 1.22;
  color: #1e293b;
  margin: 6px 0 8px 0;
  text-align: center;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  word-break: break-word;
  width: 100%;
}

.rm-a11y-card.rm-a11y-active .rm-a11y-card-title {
  color: #fa7c20;
}

/* Bottom Multi-Step Horizontal Dash / Bar Indicator */
.rm-a11y-step-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 90%;
  margin-top: auto;
}

.rm-a11y-bar {
  height: 4px;
  border-radius: 3px;
  flex: 1;
  background: #ffedd5;
  /* Warm soft peach tone matching brand palette */
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.rm-a11y-card.rm-a11y-active .rm-a11y-bar.rm-a11y-bar-active {
  background: #fa7c20;
}

/* Toggle card bottom indicator pill */
.rm-a11y-toggle-bar .rm-a11y-bar {
  max-width: 50px;
}

/* Keyboard hint bar */
.rm-a11y-kbd-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.rm-a11y-kbd-info i {
  color: #94a3b8;
  font-size: 14px;
  flex-shrink: 0;
}

.rm-a11y-kbd-info kbd {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Panel Footer */
.rm-a11y-footer {
  padding: 14px 20px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.rm-a11y-btn-reset {
  flex: 1;
  height: 42px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.rm-a11y-btn-reset:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #dc2626;
}

.rm-a11y-btn-reset:focus-visible {
  outline: 2px solid #dc3545 !important;
  outline-offset: 2px;
}

.rm-a11y-btn-done {
  height: 42px;
  min-width: 96px;
  background: #fa7c20;
  border: 1px solid #fa7c20;
  color: #ffffff;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: 0 2px 8px rgba(250, 124, 32, 0.25);
}

.rm-a11y-btn-done:hover {
  background: #e06801;
  border-color: #e06801;
  box-shadow: 0 4px 12px rgba(250, 124, 32, 0.35);
}

.rm-a11y-btn-done:focus-visible {
  outline: 2px solid #111827 !important;
  outline-offset: 2px;
}

/* ==========================================================================
   3. MOBILE RESPONSIVE TWEAKS (360px – 768px)
   ========================================================================== */

@media (max-width: 768px) {
  .rm-a11y-trigger-btn {
    bottom: 25px;
    right: 15px;
    width: 56px;
    height: 56px;
  }

  .rm-a11y-trigger-icon {
    font-size: 28px;
  }

  .rm-a11y-trigger-icon svg {
    width: 28px;
    height: 28px;
  }

  .rm-a11y-tooltip {
    display: none;
    /* hide tooltip on touch devices */
  }

  /* Centered, balanced floating panel on mobile */
  .rm-a11y-panel {
    bottom: 90px;
    left: 12px;
    right: 12px;
    margin: 0 auto;
    width: auto;
    max-width: 400px;
    max-height: calc(100vh - 105px);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  }

  /* Compact header */
  .rm-a11y-header {
    padding: 12px 14px;
    flex-shrink: 0;
  }

  .rm-a11y-title {
    font-size: 15px;
  }

  .rm-a11y-title-badge {
    width: 28px;
    height: 28px;
    font-size: 13px;
    border-radius: 7px;
  }

  .rm-a11y-subtitle {
    font-size: 11px;
  }

  .rm-a11y-close-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  /* Scrollable body with smooth touch scrolling */
  .rm-a11y-body {
    padding: 12px 12px;
    gap: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 2-Column Grid with comfortable 8px gap */
  .rm-a11y-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }

  /* Compact Cards */
  .rm-a11y-card {
    padding: 10px 6px 8px;
    min-height: 94px;
    border-radius: 10px;
  }

  .rm-a11y-card-icon {
    height: 26px;
    font-size: 20px;
    margin-top: 1px;
  }

  .rm-a11y-card-icon svg {
    width: 24px;
    height: 24px;
  }

  .rm-a11y-icon-tt .tt-s {
    font-size: 16px;
  }

  .rm-a11y-icon-tt .tt-l {
    font-size: 23px;
  }

  .rm-a11y-check-badge {
    width: 17px;
    height: 17px;
    top: 5px;
    right: 5px;
    font-size: 9px;
  }

  /* Unified 2-line title container so all cards stay identical in height */
  .rm-a11y-card-title {
    font-size: 12px;
    line-height: 1.2;
    margin: 4px 0 6px;
    text-align: center;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
  }

  .rm-a11y-step-bars {
    width: 88%;
    gap: 3px;
    margin-top: auto;
  }

  .rm-a11y-bar {
    height: 3.5px;
    border-radius: 2px;
  }

  .rm-a11y-toggle-bar .rm-a11y-bar {
    max-width: 40px;
  }

  /* Compact Footer */
  .rm-a11y-footer {
    padding: 10px 14px;
    gap: 8px;
    flex-shrink: 0;
  }

  .rm-a11y-btn-reset {
    height: 38px;
    font-size: 12px;
    padding: 0 10px;
    border-radius: 8px;
  }

  .rm-a11y-btn-done {
    height: 38px;
    min-width: 76px;
    font-size: 12px;
    padding: 0 14px;
    border-radius: 8px;
  }
}

@media (max-width: 360px) {
  .rm-a11y-grid {
    gap: 6px;
  }

  .rm-a11y-card {
    padding: 8px 4px 6px;
    min-height: 90px;
  }

  .rm-a11y-card-title {
    font-size: 11px;
    height: 26px;
  }
}

/* ==========================================================================
   4. ACCESSIBILITY ROOT STATE OVERRIDES
   ========================================================================== */

/* A. FONT SIZING */
html[data-rm-a11y-font="110"] p,
html[data-rm-a11y-font="110"] a:not(#rm-a11y-container *),
html[data-rm-a11y-font="110"] span:not(#rm-a11y-container *),
html[data-rm-a11y-font="110"] li,
html[data-rm-a11y-font="110"] td,
html[data-rm-a11y-font="110"] th,
html[data-rm-a11y-font="110"] input:not(#rm-a11y-container *),
html[data-rm-a11y-font="110"] select:not(#rm-a11y-container *),
html[data-rm-a11y-font="110"] textarea:not(#rm-a11y-container *) {
  font-size: 110% !important;
}

html[data-rm-a11y-font="120"] p,
html[data-rm-a11y-font="120"] a:not(#rm-a11y-container *),
html[data-rm-a11y-font="120"] span:not(#rm-a11y-container *),
html[data-rm-a11y-font="120"] li,
html[data-rm-a11y-font="120"] td,
html[data-rm-a11y-font="120"] th,
html[data-rm-a11y-font="120"] input:not(#rm-a11y-container *),
html[data-rm-a11y-font="120"] select:not(#rm-a11y-container *),
html[data-rm-a11y-font="120"] textarea:not(#rm-a11y-container *) {
  font-size: 120% !important;
}

html[data-rm-a11y-font="130"] p,
html[data-rm-a11y-font="130"] a:not(#rm-a11y-container *),
html[data-rm-a11y-font="130"] span:not(#rm-a11y-container *),
html[data-rm-a11y-font="130"] li,
html[data-rm-a11y-font="130"] td,
html[data-rm-a11y-font="130"] th,
html[data-rm-a11y-font="130"] input:not(#rm-a11y-container *),
html[data-rm-a11y-font="130"] select:not(#rm-a11y-container *),
html[data-rm-a11y-font="130"] textarea:not(#rm-a11y-container *) {
  font-size: 130% !important;
}

html[data-rm-a11y-font="140"] p,
html[data-rm-a11y-font="140"] a:not(#rm-a11y-container *),
html[data-rm-a11y-font="140"] span:not(#rm-a11y-container *),
html[data-rm-a11y-font="140"] li,
html[data-rm-a11y-font="140"] td,
html[data-rm-a11y-font="140"] th,
html[data-rm-a11y-font="140"] input:not(#rm-a11y-container *),
html[data-rm-a11y-font="140"] select:not(#rm-a11y-container *),
html[data-rm-a11y-font="140"] textarea:not(#rm-a11y-container *) {
  font-size: 140% !important;
}

/* Dyslexia Friendly Font */
html.rm-a11y-dyslexia,
html.rm-a11y-dyslexia *:not(#rm-a11y-container *):not(i):not(svg) {
  font-family: 'OpenDyslexic', 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif !important;
  letter-spacing: 0.05em !important;
}

/* B. TEXT SPACING (3 STEPS) */
html[data-rm-a11y-spacing="1"] *:not(#rm-a11y-container *):not(i):not(svg) {
  letter-spacing: 0.08em !important;
  word-spacing: 0.12em !important;
}

html[data-rm-a11y-spacing="2"] *:not(#rm-a11y-container *):not(i):not(svg),
html.rm-a11y-spacing *:not(#rm-a11y-container *):not(i):not(svg) {
  letter-spacing: 0.14em !important;
  word-spacing: 0.18em !important;
}

html[data-rm-a11y-spacing="3"] *:not(#rm-a11y-container *):not(i):not(svg) {
  letter-spacing: 0.22em !important;
  word-spacing: 0.26em !important;
}

/* C. LINE HEIGHT (3 STEPS) */
html[data-rm-a11y-line-height="1"] p,
html[data-rm-a11y-line-height="1"] li,
html[data-rm-a11y-line-height="1"] td,
html[data-rm-a11y-line-height="1"] th,
html[data-rm-a11y-line-height="1"] h1,
html[data-rm-a11y-line-height="1"] h2,
html[data-rm-a11y-line-height="1"] h3,
html[data-rm-a11y-line-height="1"] h4,
html[data-rm-a11y-line-height="1"] h5,
html[data-rm-a11y-line-height="1"] h6 {
  line-height: 1.65 !important;
}

html[data-rm-a11y-line-height="2"] p,
html[data-rm-a11y-line-height="2"] li,
html[data-rm-a11y-line-height="2"] td,
html[data-rm-a11y-line-height="2"] th,
html[data-rm-a11y-line-height="2"] h1,
html[data-rm-a11y-line-height="2"] h2,
html[data-rm-a11y-line-height="2"] h3,
html[data-rm-a11y-line-height="2"] h4,
html[data-rm-a11y-line-height="2"] h5,
html[data-rm-a11y-line-height="2"] h6,
html.rm-a11y-line-height p,
html.rm-a11y-line-height li,
html.rm-a11y-line-height td,
html.rm-a11y-line-height th,
html.rm-a11y-line-height h1,
html.rm-a11y-line-height h2,
html.rm-a11y-line-height h3,
html.rm-a11y-line-height h4,
html.rm-a11y-line-height h5,
html.rm-a11y-line-height h6 {
  line-height: 1.95 !important;
}

html[data-rm-a11y-line-height="3"] p,
html[data-rm-a11y-line-height="3"] li,
html[data-rm-a11y-line-height="3"] td,
html[data-rm-a11y-line-height="3"] th,
html[data-rm-a11y-line-height="3"] h1,
html[data-rm-a11y-line-height="3"] h2,
html[data-rm-a11y-line-height="3"] h3,
html[data-rm-a11y-line-height="3"] h4,
html[data-rm-a11y-line-height="3"] h5,
html[data-rm-a11y-line-height="3"] h6 {
  line-height: 2.3 !important;
}

/* D. HIGH CONTRAST (Professional Black / White / Yellow high contrast) */
html.rm-a11y-high-contrast body {
  background-color: #000000 !important;
  color: #ffffff !important;
}

html.rm-a11y-high-contrast *:not(#rm-a11y-container):not(#rm-a11y-container *):not(#rm-a11y-trigger) {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html.rm-a11y-high-contrast header,
html.rm-a11y-high-contrast footer,
html.rm-a11y-high-contrast nav,
html.rm-a11y-high-contrast .navbar,
html.rm-a11y-high-contrast .modal-content:not(#rm-a11y-container *) {
  background: #000000 !important;
  border-color: #ffffff !important;
}

html.rm-a11y-high-contrast a:not(#rm-a11y-container *) {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

html.rm-a11y-high-contrast a:not(#rm-a11y-container *):hover,
html.rm-a11y-high-contrast a:not(#rm-a11y-container *):focus {
  background-color: #ffff00 !important;
  color: #000000 !important;
}

html.rm-a11y-high-contrast button:not(#rm-a11y-container *),
html.rm-a11y-high-contrast .custom-btn:not(#rm-a11y-container *),
html.rm-a11y-high-contrast .btn:not(#rm-a11y-container *) {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
  font-weight: 700 !important;
}

html.rm-a11y-high-contrast button:not(#rm-a11y-container *):hover,
html.rm-a11y-high-contrast .custom-btn:not(#rm-a11y-container *):hover,
html.rm-a11y-high-contrast .btn:not(#rm-a11y-container *):hover {
  background-color: #ffff00 !important;
  color: #000000 !important;
}

html.rm-a11y-high-contrast input:not(#rm-a11y-container *),
html.rm-a11y-high-contrast select:not(#rm-a11y-container *),
html.rm-a11y-high-contrast textarea:not(#rm-a11y-container *) {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

/* E. GRAYSCALE */
html.rm-a11y-grayscale body>*:not(#rm-a11y-container) {
  filter: grayscale(100%) !important;
}

/* F. HIGHLIGHT LINKS */
html.rm-a11y-links a:not(#rm-a11y-container *):not(.rm-a11y-trigger-btn) {
  text-decoration: underline 3px solid #fa7c20 !important;
  text-underline-offset: 4px !important;
  font-weight: 700 !important;
}

html.rm-a11y-links a:not(#rm-a11y-container *):hover,
html.rm-a11y-links a:not(#rm-a11y-container *):focus {
  background-color: rgba(250, 124, 32, 0.15) !important;
  outline: 2px solid #fa7c20 !important;
}

/* G. LARGE CURSOR */
html.rm-a11y-large-cursor,
html.rm-a11y-large-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath fill='%23111111' stroke='%23ffffff' stroke-width='1.5' stroke-linejoin='round' d='M4.5 2.5l14 14-5.5 1.1 3.4 6.7-3.1 1.5-3.4-6.7-3.9 4.1V2.5z'/%3E%3C/svg%3E"), auto !important;
}

html.rm-a11y-large-cursor a,
html.rm-a11y-large-cursor button,
html.rm-a11y-large-cursor [role='button'],
html.rm-a11y-large-cursor input,
html.rm-a11y-large-cursor select,
html.rm-a11y-large-cursor textarea,
html.rm-a11y-large-cursor label,
html.rm-a11y-large-cursor .custom-btn {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath fill='%23111111' stroke='%23ffffff' stroke-width='1.5' stroke-linejoin='round' d='M9 1a1.5 1.5 0 0 1 1.5 1.5v6.5l1.2-1a1.5 1.5 0 0 1 2.1.2l.2.2a1.5 1.5 0 0 1 0 2.1l-4.7 4.7a3 3 0 0 1-2.1.9H5a3 3 0 0 1-3-3v-4.5a1.5 1.5 0 0 1 1.5-1.5h.3a1.5 1.5 0 0 1 1.2.6V3.5A1.5 1.5 0 0 1 6.5 2h.1A1.5 1.5 0 0 1 8 3.5V9.7l1-1.1V2.5A1.5 1.5 0 0 1 9 1z'/%3E%3C/svg%3E"), pointer !important;
}

/* H. STOP ANIMATIONS */
html.rm-a11y-no-motion *,
html.rm-a11y-no-motion *::before,
html.rm-a11y-no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* I. READING MODE */
html.rm-a11y-reading body {
  background-color: #faf9f6 !important;
  color: #1a1a1a !important;
}

html.rm-a11y-reading .page-header-vector,
html.rm-a11y-reading [class*="vector"],
html.rm-a11y-reading [class*="pattern"],
html.rm-a11y-reading .swiper-slide-duplicate,
html.rm-a11y-reading #preloader {
  display: none !important;
}

html.rm-a11y-reading p,
html.rm-a11y-reading article,
html.rm-a11y-reading .content,
html.rm-a11y-reading .service-card-info,
html.rm-a11y-reading .about-content {
  line-height: 1.85 !important;
  max-width: 860px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* J. READING RULER */
#rm-a11y-ruler {
  position: fixed;
  left: 0;
  width: 100vw;
  height: 38px;
  background: rgba(250, 124, 32, 0.12);
  border-top: 2.5px solid #fa7c20;
  border-bottom: 2.5px solid #fa7c20;
  pointer-events: none;
  z-index: 99997;
  transform: translateY(-50%);
  box-shadow: 0 0 12px rgba(250, 124, 32, 0.25);
  display: none;
}

html.rm-a11y-ruler-active #rm-a11y-ruler {
  display: block;
}

/* K. TEXT ALIGNMENT */
html[data-rm-a11y-align="1"] p,
html[data-rm-a11y-align="1"] span:not(#rm-a11y-container *),
html[data-rm-a11y-align="1"] article,
html[data-rm-a11y-align="1"] .content,
html[data-rm-a11y-align="1"] li {
  text-align: left !important;
}

html[data-rm-a11y-align="2"] p,
html[data-rm-a11y-align="2"] span:not(#rm-a11y-container *),
html[data-rm-a11y-align="2"] article,
html[data-rm-a11y-align="2"] .content,
html[data-rm-a11y-align="2"] li,
html[data-rm-a11y-align="2"] h1,
html[data-rm-a11y-align="2"] h2,
html[data-rm-a11y-align="2"] h3 {
  text-align: center !important;
}

html[data-rm-a11y-align="3"] p,
html[data-rm-a11y-align="3"] span:not(#rm-a11y-container *),
html[data-rm-a11y-align="3"] article,
html[data-rm-a11y-align="3"] .content,
html[data-rm-a11y-align="3"] li {
  text-align: right !important;
}

html[data-rm-a11y-align="4"] p,
html[data-rm-a11y-align="4"] article,
html[data-rm-a11y-align="4"] .content {
  text-align: justify !important;
}

/* L. HIDE IMAGES */
html.rm-a11y-hide-img img:not(#rm-a11y-container *),
html.rm-a11y-hide-img picture:not(#rm-a11y-container *),
html.rm-a11y-hide-img svg:not(#rm-a11y-container *),
html.rm-a11y-hide-img video:not(#rm-a11y-container *) {
  visibility: hidden !important;
  opacity: 0 !important;
}

html.rm-a11y-hide-img [style*="background-image"]:not(#rm-a11y-container *) {
  background-image: none !important;
}

/* M. HIGHLIGHT HEADINGS */
html.rm-a11y-headings h1:not(#rm-a11y-container *),
html.rm-a11y-headings h2:not(#rm-a11y-container *),
html.rm-a11y-headings h3:not(#rm-a11y-container *),
html.rm-a11y-headings h4:not(#rm-a11y-container *),
html.rm-a11y-headings h5:not(#rm-a11y-container *),
html.rm-a11y-headings h6:not(#rm-a11y-container *) {
  outline: 2px dashed #fa7c20 !important;
  outline-offset: 4px !important;
}

/* N. INVERT COLORS (SMART NEGATIVE CONTRAST) */
html.rm-a11y-invert,
html.rm-a11y-invert body {
  background-color: #121212 !important;
}

html.rm-a11y-invert body>*:not(#rm-a11y-container) {
  filter: invert(100%) hue-rotate(180deg) !important;
}

/* Re-invert media inside website content so photos, videos, and backgrounds look natural */
html.rm-a11y-invert body>*:not(#rm-a11y-container) img,
html.rm-a11y-invert body>*:not(#rm-a11y-container) video,
html.rm-a11y-invert body>*:not(#rm-a11y-container) picture,
html.rm-a11y-invert body>*:not(#rm-a11y-container) iframe,
html.rm-a11y-invert body>*:not(#rm-a11y-container) canvas,
html.rm-a11y-invert body>*:not(#rm-a11y-container) [style*="background-image"],
html.rm-a11y-invert body>*:not(#rm-a11y-container) .page-header-vector,
html.rm-a11y-invert body>*:not(#rm-a11y-container) .swiper-slide {
  filter: invert(100%) hue-rotate(180deg) !important;
}

/* Ensure widget container is completely pristine and never affected */
#rm-a11y-container {
  filter: none !important;
}

/* O. SCREEN READER ACTIVE ELEMENT HIGHLIGHT */
[data-rm-speaking="true"] {
  outline: 2px solid #fa7c20 !important;
  background-color: rgba(250, 124, 32, 0.15) !important;
}