:root {
  --mm-a11y-text-scale: 1;
  --mm-a11y-blue: #2563eb;
  --mm-a11y-blue-dark: #1d4ed8;
  --mm-a11y-text: #111827;
  --mm-a11y-muted: #4b5563;
  --mm-a11y-border: #d8e0ec;
  --mm-a11y-soft: #f8fafc;
  --mm-a11y-focus: #f59e0b;
  --mm-a11y-danger: #dc2626;
  --mm-a11y-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

body,
button,
input,
select,
textarea,
table,
.mm-a11y-panel {
  font-size: calc(1rem * var(--mm-a11y-text-scale));
}

.layout {
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: clip;
}

html[data-mm-a11y-text-adjusted="true"],
html[data-mm-a11y-high-contrast="true"],
html[data-mm-a11y-highlight-links="true"],
html[data-mm-a11y-readable-font="true"],
html[data-mm-a11y-keyboard-assist="true"] {
  overflow-x: clip;
}

html[data-mm-a11y-text-adjusted="true"] body,
html[data-mm-a11y-high-contrast="true"] body,
html[data-mm-a11y-highlight-links="true"] body,
html[data-mm-a11y-readable-font="true"] body,
html[data-mm-a11y-keyboard-assist="true"] body,
html[data-mm-a11y-text-adjusted="true"] .layout,
html[data-mm-a11y-high-contrast="true"] .layout,
html[data-mm-a11y-highlight-links="true"] .layout,
html[data-mm-a11y-readable-font="true"] .layout,
html[data-mm-a11y-keyboard-assist="true"] .layout,
html[data-mm-a11y-text-adjusted="true"] main,
html[data-mm-a11y-high-contrast="true"] main,
html[data-mm-a11y-highlight-links="true"] main,
html[data-mm-a11y-readable-font="true"] main,
html[data-mm-a11y-keyboard-assist="true"] main {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

html[data-mm-a11y-text-adjusted="true"] .layout,
html[data-mm-a11y-high-contrast="true"] .layout,
html[data-mm-a11y-highlight-links="true"] .layout,
html[data-mm-a11y-readable-font="true"] .layout,
html[data-mm-a11y-keyboard-assist="true"] .layout {
  max-width: 100vw !important;
}

.mm-a11y-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2147483647;
  transform: translateY(-170%);
  padding: 10px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--mm-a11y-blue-dark);
  border: 3px solid var(--mm-a11y-blue);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.28);
}

.mm-a11y-skip-link:focus,
.mm-a11y-skip-link:focus-visible {
  transform: translateY(0);
  outline: 4px solid var(--mm-a11y-focus);
  outline-offset: 3px;
}

.mm-a11y-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 3px solid var(--mm-a11y-blue);
  border-radius: 999px;
  background: #ffffff;
  color: var(--mm-a11y-blue);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.26);
  cursor: pointer;
}

.mm-a11y-button svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mm-a11y-button .mm-a11y-icon-monitor,
.mm-a11y-button .mm-a11y-icon-cursor {
  fill: currentColor;
}

.mm-a11y-button .mm-a11y-icon-screen {
  fill: #ffffff;
}

.mm-a11y-button .mm-a11y-icon-button-dot {
  fill: #ffffff;
  stroke: #ffffff;
}

.mm-a11y-button .mm-a11y-icon-person,
.mm-a11y-button .mm-a11y-icon-wheel {
  stroke-width: 1.65;
}

.mm-a11y-panel {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  display: none;
  align-items: center;
  justify-content: flex-end;
  padding: 16px;
  background: rgba(15, 23, 42, 0.4);
}

.mm-a11y-panel[aria-hidden="false"] {
  display: flex;
}

.mm-a11y-panel__surface {
  display: flex;
  flex-direction: column;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid var(--mm-a11y-border);
  border-radius: 24px;
  background: #ffffff;
  color: var(--mm-a11y-text);
  box-shadow: var(--mm-a11y-shadow);
}

.mm-a11y-panel__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--mm-a11y-border);
  background: #ffffff;
}

.mm-a11y-panel__header h2 {
  margin: 0;
  color: var(--mm-a11y-text);
  font-size: 1.55rem;
  line-height: 1.2;
}

.mm-a11y-close {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--mm-a11y-border);
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.mm-a11y-panel__scroll {
  overflow: auto;
  padding: 24px;
}

.mm-a11y-options {
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid var(--mm-a11y-border);
  border-radius: 22px;
  background: #ffffff;
}

.mm-a11y-options h3,
.mm-a11y-statement h3,
.mm-a11y-statement h4 {
  margin: 0;
  color: #111827;
  line-height: 1.25;
}

.mm-a11y-scale-status {
  margin: 10px 0 14px;
  color: var(--mm-a11y-muted);
  font-weight: 700;
}

.mm-a11y-options-list {
  display: grid;
  gap: 10px;
}

.mm-a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border: 1px solid var(--mm-a11y-border);
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.mm-a11y-option::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid #9ca3af;
  border-radius: 999px;
  background: #ffffff;
}

.mm-a11y-option[aria-pressed="true"] {
  border-color: var(--mm-a11y-blue);
  background: #eff6ff;
  color: var(--mm-a11y-blue-dark);
}

.mm-a11y-option[aria-pressed="true"]::after {
  border-color: var(--mm-a11y-blue);
  background: var(--mm-a11y-blue);
  box-shadow: inset 0 0 0 3px #ffffff;
}

.mm-a11y-statement-wrap {
  padding: 20px;
  border: 1px solid var(--mm-a11y-border);
  border-radius: 22px;
  background: #ffffff;
}

.mm-a11y-statement {
  display: grid;
  gap: 18px;
  color: #111827;
  line-height: 1.7;
}

.mm-a11y-statement h2,
.mm-a11y-statement h3 {
  margin: 0 0 8px;
}

.mm-a11y-statement p,
.mm-a11y-statement ul {
  margin: 0;
}

.mm-a11y-statement ul {
  padding-left: 22px;
}

.mm-a11y-statement li + li {
  margin-top: 6px;
}

.mm-a11y-statement__section {
  display: grid;
  gap: 10px;
}

.mm-a11y-email-link {
  color: var(--mm-a11y-blue-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

.mm-a11y-settings-card,
.mm-a11y-public-statement-card {
  margin: 24px auto;
  padding: 24px;
  border: 1px solid var(--mm-a11y-border);
  border-radius: 22px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.mm-a11y-public-statement-card {
  width: min(960px, calc(100% - 32px));
}

html[data-mm-a11y-highlight-links="true"] a:not(.btn):not(.button):not([role="button"]) {
  color: var(--mm-a11y-blue-dark) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 0.16em !important;
  text-underline-offset: 0.18em !important;
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: 2px;
}

html[data-mm-a11y-readable-font="true"] body,
html[data-mm-a11y-readable-font="true"] button,
html[data-mm-a11y-readable-font="true"] input,
html[data-mm-a11y-readable-font="true"] textarea,
html[data-mm-a11y-readable-font="true"] select,
html[data-mm-a11y-readable-font="true"] .mm-a11y-panel {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

html[data-mm-a11y-high-contrast="true"] body {
  background: #000000 !important;
  color: #ffffff !important;
}

html[data-mm-a11y-high-contrast="true"] a {
  color: #ffff00 !important;
}

html[data-mm-a11y-high-contrast="true"] input,
html[data-mm-a11y-high-contrast="true"] select,
html[data-mm-a11y-high-contrast="true"] textarea,
html[data-mm-a11y-high-contrast="true"] table,
html[data-mm-a11y-high-contrast="true"] .card,
html[data-mm-a11y-high-contrast="true"] .settings-panel,
html[data-mm-a11y-high-contrast="true"] .mm-sidebar,
html[data-mm-a11y-high-contrast="true"] .mm-a11y-panel__surface,
html[data-mm-a11y-high-contrast="true"] .mm-a11y-options,
html[data-mm-a11y-high-contrast="true"] .mm-a11y-statement-wrap,
html[data-mm-a11y-high-contrast="true"] .mm-a11y-option {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

html[data-mm-a11y-high-contrast="true"] .success,
html[data-mm-a11y-high-contrast="true"] .profit,
html[data-mm-a11y-high-contrast="true"] [class*="success"] {
  color: #22c55e !important;
}

html[data-mm-a11y-high-contrast="true"] .warning,
html[data-mm-a11y-high-contrast="true"] [class*="warning"] {
  color: #facc15 !important;
}

html[data-mm-a11y-high-contrast="true"] .error,
html[data-mm-a11y-high-contrast="true"] .danger,
html[data-mm-a11y-high-contrast="true"] [class*="error"],
html[data-mm-a11y-high-contrast="true"] [class*="danger"] {
  color: #f87171 !important;
}

html[data-mm-a11y-keyboard-assist="true"] :focus-visible,
.mm-a11y-button:focus-visible,
.mm-a11y-panel button:focus-visible,
.mm-a11y-panel a:focus-visible {
  outline: 4px solid var(--mm-a11y-focus) !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.22) !important;
}

html[data-mm-a11y-reduced-motion="true"] *,
html[data-mm-a11y-reduced-motion="true"] *::before,
html[data-mm-a11y-reduced-motion="true"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 760px) {
  .mm-a11y-panel {
    align-items: center;
    justify-content: center;
    padding: 10px;
  }

  .mm-a11y-panel__surface {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  .mm-a11y-panel__header,
  .mm-a11y-panel__scroll {
    padding: 16px;
  }

  .mm-a11y-options,
  .mm-a11y-statement-wrap {
    padding: 16px;
    border-radius: 18px;
  }
}

@media (max-height: 520px) {
  .mm-a11y-panel {
    align-items: stretch;
  }

  .mm-a11y-panel__surface {
    max-height: calc(100dvh - 12px);
  }

  .mm-a11y-panel__header {
    padding-block: 12px;
  }

  .mm-a11y-panel__scroll {
    padding-block: 12px;
  }
}
