@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --a11y-font-scale: 1;
  --a11y-line-scale: 1;
  --a11y-letter-scale: 1;
  --a11y-accent: #7b1f5c;
  --a11y-accent-strong: #4d0f38;
  --a11y-accent-soft: #edd9e8;
  --a11y-bg: #ffffff;
  --a11y-panel: #f3f5f8;
  --a11y-card: #ffffff;
  --a11y-text: #0f172a;
  --a11y-muted: #64748b;
  --a11y-page-filter: none;
}

body > *:not(.a11y-widget):not(.a11y-reading-line):not(.a11y-reading-mask) {
  filter: var(--a11y-page-filter);
  transition: filter 0.18s ease;
}

body.a11y-dyslexia {
  font-family: "OpenDyslexic", "Comic Sans MS", "Arial", sans-serif;
}

body.a11y-seizure * {
  animation: none !important;
  transition: none !important;
}

body.a11y-seizure *::before,
body.a11y-seizure *::after {
  animation: none !important;
  transition: none !important;
}

body.a11y-seizure *,
body.a11y-seizure *::before,
body.a11y-seizure *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

body.a11y-links a {
  color: #ffffff !important;
  background: #000000 !important;
  text-decoration: underline !important;
  text-decoration-color: #ffffff !important;
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
  padding: 0.04em 0.18em;
  border-radius: 0.16em;
  box-shadow: 0 0 0 1px #000000;
}

body.a11y-headings h1,
body.a11y-headings h2,
body.a11y-headings h3,
body.a11y-headings h4,
body.a11y-headings h5,
body.a11y-headings h6 {
  color: #ffffff !important;
  background: #000000 !important;
  padding: 0.08em 0.24em;
  border-radius: 0.18em;
  box-shadow: 0 0 0 1px #000000;
}

body.a11y-bold {
  font-weight: 700;
}

body.a11y-cursor,
body.a11y-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><path d='M6 4l12 33l6-10l10 6l4-7l-10-6l8-6z' fill='%23ffffff' stroke='%23000000' stroke-width='3' stroke-linejoin='round'/></svg>") 6 4, auto !important;
}

body.a11y-nav :not(.a11y-widget *):focus-visible {
  outline: 3px solid var(--a11y-accent);
  outline-offset: 2px;
}

body.a11y-nav :where(
  a,
  button,
  input,
  select,
  textarea,
  summary,
  [role="button"],
  [tabindex]:not([tabindex="-1"])
):not(.a11y-widget *) {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.75) inset;
}

body.a11y-nav :not(.a11y-widget *):focus,
body.a11y-nav :not(.a11y-widget *):focus-visible {
  outline: 3px solid var(--a11y-accent-strong) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 5px rgba(0, 0, 0, 0.75) !important;
}

.a11y-reading-line {
  position: fixed;
  left: 0;
  right: 0;
  height: 2px;
  background: #000000;
  z-index: 9998;
  pointer-events: none;
}

.a11y-reading-mask {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 9997;
  pointer-events: none;
}

.a11y-reading-mask .a11y-mask-top,
.a11y-reading-mask .a11y-mask-bottom {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(18, 10, 21, 0.44);
}

.a11y-widget {
  position: fixed;
  z-index: 10000;
  bottom: 24px;
}

.a11y-widget[data-a11y-position="left"] {
  left: 24px;
}

.a11y-widget[data-a11y-position="right"] {
  right: 24px;
}

.a11y-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--a11y-accent);
  background: #120a15;
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(45, 11, 35, 0.35);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.a11y-fab-svg {
  width: 30px;
  height: 30px;
  display: block;
  filter: brightness(0) invert(1);
  transition: transform 0.18s ease;
}

.a11y-fab:hover,
.a11y-fab:focus-visible {
  transform: scale(1.08);
  border-color: #a13a79;
  box-shadow: 0 14px 34px rgba(45, 11, 35, 0.5);
}

.a11y-fab:hover .a11y-fab-svg,
.a11y-fab:focus-visible .a11y-fab-svg {
  transform: scale(1.08);
}

.a11y-panel {
  position: absolute;
  bottom: 72px;
  width: 380px;
  max-height: 80vh;
  background: var(--a11y-panel);
  color: var(--a11y-text);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(34, 13, 28, 0.24);
  border: 1px solid rgba(55, 17, 42, 0.15);
  overflow: hidden;
}

.a11y-panel[hidden] {
  display: none !important;
}

.a11y-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
}

.a11y-widget[data-a11y-position="left"] .a11y-panel {
  left: 0;
}

.a11y-widget[data-a11y-position="right"] .a11y-panel {
  right: 0;
}

.a11y-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(145deg, #8f2a68 0%, #5a1543 45%, #3b0a2d 100%);
  color: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.a11y-header h2 {
  margin: 0;
  font-size: 18px;
}

.a11y-header-actions {
  display: flex;
  gap: 10px;
}

.a11y-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--a11y-accent);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.a11y-body {
  padding: 18px 18px 20px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.a11y-language {
  position: relative;
}

.a11y-select {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--a11y-card);
  border: 1px solid #e5e8ef;
  color: var(--a11y-text);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.a11y-language-menu {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #ffffff;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(33, 12, 27, 0.16);
  padding: 6px;
}

.a11y-language-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--a11y-text);
}

.a11y-language-menu button:hover,
.a11y-language-menu button.active {
  background: #f8edf4;
  color: var(--a11y-accent-strong);
}

.a11y-section-title {
  margin: 16px 4px 10px;
  color: var(--a11y-muted);
  font-size: 14px;
  text-transform: none;
}

.a11y-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.a11y-tile {
  background: var(--a11y-card);
  border: 2px solid transparent;
  color: var(--a11y-text);
  padding: 12px 10px;
  border-radius: 14px;
  min-height: 88px;
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  font-weight: 700;
}

.a11y-tile span {
  display: block;
  width: 100%;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.a11y-tile.active {
  border-color: var(--a11y-accent);
  box-shadow: 0 0 0 2px rgba(123, 31, 92, 0.2), 0 8px 16px rgba(15, 23, 42, 0.06);
}

.a11y-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}

.a11y-control-group {
  margin: 12px 0;
  padding: 4px 14px;
  border-radius: 16px;
  background: var(--a11y-card);
  border: 1px solid #e4e8ef;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.a11y-control-row {
  margin: 0;
  padding: 8px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.a11y-control-row + .a11y-control-row {
  border-top: 1px solid #e4e8ef;
}

.a11y-control-block {
  background: var(--a11y-card);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.a11y-control-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.a11y-control-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.a11y-control-group .a11y-control-title {
  color: var(--a11y-text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a11y-control-help {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #eceff5;
  color: #66748b;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}

.a11y-control-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.a11y-step {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(145deg, #8f2a68 0%, #5a1543 100%);
  color: #ffffff;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.a11y-value {
  min-width: 56px;
  text-align: center;
  font-weight: 700;
  color: var(--a11y-text);
  font-size: 14px;
}

.a11y-wide {
  width: 100%;
  background: var(--a11y-card);
  color: var(--a11y-text);
  border: 2px solid transparent;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: center;
  margin-top: 12px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.a11y-instant {
  margin-top: 0;
  margin-bottom: 6px;
  border-color: #d8deea;
}

.a11y-instant.active {
  border-color: var(--a11y-accent);
  box-shadow: 0 0 0 2px rgba(123, 31, 92, 0.2), 0 8px 16px rgba(15, 23, 42, 0.06);
  color: var(--a11y-accent-strong);
}

.a11y-reset {
  background: linear-gradient(145deg, #8f2a68 0%, #5a1543 100%);
  color: #fff;
}

.a11y-footer {
  position: relative;
  padding: 10px 16px 16px;
  color: var(--a11y-muted);
  text-align: center;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
}

.a11y-powered-link {
  color: var(--a11y-muted);
  text-decoration: none;
}

.a11y-powered-prefix {
  margin-right: 4px;
}

.a11y-powered-link:hover {
  color: var(--a11y-accent-strong);
}

.a11y-tooltip {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: #edd9e8;
  color: var(--a11y-accent);
  font-size: 12px;
  margin-left: 6px;
  cursor: pointer;
}

.a11y-tooltip-pop {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  background: #2a1522;
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: min(320px, 86vw);
  white-space: normal;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(20, 6, 15, 0.35);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.a11y-icon-svg {
  width: 24px;
  height: 24px;
  display: block;
  transition: transform 0.18s ease;
}

.a11y-tile:hover .a11y-icon-svg,
.a11y-tile:focus-visible .a11y-icon-svg {
  transform: scale(1.12);
}

@media (max-width: 540px) {
  .a11y-panel {
    width: 92vw;
  }

  .a11y-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .a11y-control-group {
    padding: 4px 10px;
  }

  .a11y-control-group .a11y-control-title {
    font-size: 13px;
  }

  .a11y-step {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .a11y-value {
    min-width: 50px;
    font-size: 13px;
  }
}

/* Hard UI lock against theme overrides inside the widget and FAB */
.a11y-widget,
.a11y-widget :where(*, *::before, *::after) {
  box-sizing: border-box !important;
  text-shadow: none !important;
  animation: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  outline-color: transparent !important;
}

.a11y-widget {
  position: fixed !important;
  z-index: 10000 !important;
  bottom: 24px !important;
}

.a11y-widget .a11y-fab {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  border: 3px solid var(--a11y-accent) !important;
  background: #120a15 !important;
  color: #ffffff !important;
  display: grid !important;
  place-items: center !important;
}

.a11y-widget .a11y-fab-svg {
  width: 48px !important;
  height: 48px !important;
  display: block !important;
  filter: brightness(0) invert(1) !important;
  object-fit: contain !important;
}

.a11y-widget .a11y-panel {
  background: var(--a11y-panel) !important;
  color: var(--a11y-text) !important;
  border-radius: 18px !important;
  border: 1px solid rgba(55, 17, 42, 0.15) !important;
}

.a11y-widget .a11y-header {
  background: linear-gradient(145deg, #8f2a68 0%, #5a1543 45%, #3b0a2d 100%) !important;
  color: #ffffff !important;
}

.a11y-widget .a11y-header h2,
.a11y-widget [data-a11y-i18n="title"] {
  color: #ffffff !important;
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-shadow: none !important;
}

.a11y-widget .a11y-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #ffffff !important;
  color: var(--a11y-accent) !important;
  font-size: 18px !important;
  line-height: 1 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.a11y-widget .a11y-body {
  background: var(--a11y-panel) !important;
  color: var(--a11y-text) !important;
}

.a11y-widget .a11y-section-title {
  color: var(--a11y-muted) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: none !important;
}

.a11y-widget .a11y-select,
.a11y-widget .a11y-language-menu,
.a11y-widget .a11y-language-menu button,
.a11y-widget .a11y-control-group,
.a11y-widget .a11y-tile,
.a11y-widget .a11y-wide,
.a11y-widget .a11y-footer {
  color: var(--a11y-text) !important;
  font-family: inherit !important;
  text-transform: none !important;
  background-image: none !important;
  mix-blend-mode: normal !important;
}

.a11y-widget button {
  font-family: inherit !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.a11y-widget .a11y-tile span,
.a11y-widget .a11y-control-title,
.a11y-widget .a11y-value,
.a11y-widget .a11y-powered-prefix,
.a11y-widget .a11y-powered-link {
  color: inherit !important;
  font-family: inherit !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.a11y-widget .a11y-tile {
  display: grid !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 8px !important;
  background: var(--a11y-card) !important;
  color: var(--a11y-text) !important;
  border: 2px solid transparent !important;
}

.a11y-widget .a11y-icon-svg {
  width: 30px !important;
  height: 30px !important;
  display: block !important;
  object-fit: contain !important;
}

.a11y-widget .a11y-tile:hover,
.a11y-widget .a11y-tile:focus-visible {
  background: var(--a11y-card) !important;
  color: var(--a11y-text) !important;
  border-color: var(--a11y-accent) !important;
  box-shadow: 0 0 0 2px rgba(123, 31, 92, 0.2), 0 8px 16px rgba(15, 23, 42, 0.06) !important;
}

.a11y-widget .a11y-tile.active {
  background: var(--a11y-card) !important;
  color: var(--a11y-text) !important;
  border-color: var(--a11y-accent) !important;
  box-shadow: 0 0 0 2px rgba(123, 31, 92, 0.2), 0 8px 16px rgba(15, 23, 42, 0.06) !important;
}

.a11y-widget .a11y-language-menu button.active,
.a11y-widget .a11y-language-menu button:hover {
  background: #f8edf4 !important;
  color: var(--a11y-accent-strong) !important;
}

.a11y-widget .a11y-tile:hover .a11y-icon-svg,
.a11y-widget .a11y-tile:focus-visible .a11y-icon-svg {
  transform: scale(1.12) !important;
}

.a11y-widget .a11y-step {
  background: linear-gradient(145deg, #8f2a68 0%, #5a1543 100%) !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  padding: 0 !important;
  font-weight: 700 !important;
  font-size: 0 !important;
}

.a11y-widget .a11y-step[data-a11y-dir="-1"] {
  transform: none !important;
}

.a11y-widget .a11y-step[data-a11y-dir="-1"]::before {
  content: "−" !important;
  display: inline-block !important;
  width: 1em !important;
  text-align: center !important;
  font-size: 22px !important;
  line-height: 1 !important;
  color: #ffffff !important;
  transform: translateY(-0.5px) !important;
}

.a11y-widget .a11y-step[data-a11y-dir="1"] {
  transform: none !important;
}

.a11y-widget .a11y-step[data-a11y-dir="1"]::before {
  content: "+" !important;
  display: inline-block !important;
  width: 1em !important;
  text-align: center !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: #ffffff !important;
  transform: translateY(-0.5px) !important;
}

.a11y-widget .a11y-wide {
  background: var(--a11y-card) !important;
  color: var(--a11y-text) !important;
  border: 2px solid transparent !important;
}

.a11y-widget .a11y-wide:hover,
.a11y-widget .a11y-wide:focus-visible {
  background: #f7ebf2 !important;
  color: var(--a11y-accent-strong) !important;
  border-color: #d8deea !important;
}

.a11y-widget .a11y-reset {
  background: linear-gradient(145deg, #8f2a68 0%, #5a1543 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.a11y-widget .a11y-reset:hover,
.a11y-widget .a11y-reset:focus-visible {
  background: linear-gradient(145deg, #a23376 0%, #6a1d4f 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.a11y-widget .a11y-tooltip {
  width: 22px !important;
  height: 22px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: 6px !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  background: #ecd2e6 !important;
  color: var(--a11y-accent) !important;
  border: 1px solid #e2c1d8 !important;
}

.a11y-widget .a11y-tooltip:hover,
.a11y-widget .a11y-tooltip:focus-visible {
  background: #f7ebf2 !important;
  color: var(--a11y-accent-strong) !important;
  border-color: #dcb8d0 !important;
}
