.a11y {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  color: #f3f0e8;
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: left;
}
.a11y-toggle,
.a11y-close,
.a11y-oversize,
.a11y-grid button,
.a11y-reset {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.a11y-toggle {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(243, 240, 232, 0.45);
  border-radius: 50%;
  background: #070708;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.a11y-toggle svg,
.a11y-grid svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.a11y-grid .a11y-solid { fill: currentColor; stroke: none; }
.a11y-toggle:hover,
.a11y-toggle[aria-expanded="true"] { background: #f3f0e8; color: #141416; }
.a11y-toggle:focus-visible,
.a11y-panel button:focus-visible {
  outline: 2px solid #f3f0e8;
  outline-offset: 3px;
}
.a11y-panel {
  width: min(22.5rem, calc(100vw - 2rem));
  max-height: min(72vh, 38rem);
  overflow: auto;
  padding: 0.85rem;
  background: #101012;
  border: 1px solid rgba(243, 240, 232, 0.18);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.a11y-panel[hidden] { display: none; }
.a11y-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}
.a11y-bar p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.a11y-close {
  border: 0;
  background: transparent;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  min-height: 44px;
  padding: 0 0.2rem;
}
.a11y-oversize,
.a11y-reset {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(243, 240, 232, 0.28);
  background: transparent;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.a11y-oversize { margin-bottom: 0.7rem; }
.a11y-oversize[aria-pressed="true"],
.a11y-grid button[aria-pressed="true"] {
  background: #f3f0e8;
  color: #141416;
  border-color: #f3f0e8;
}
.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.a11y-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 5.6rem;
  padding: 0.7rem 0.45rem;
  border: 1px solid rgba(243, 240, 232, 0.18);
  background: transparent;
  text-align: center;
}
.a11y-grid button:hover { border-color: rgba(243, 240, 232, 0.5); }
.a11y-name { font-size: 0.78rem; line-height: 1.25; }
.a11y-state {
  min-height: 0.9rem;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9b968d;
}
.a11y-grid button[aria-pressed="true"] .a11y-state { color: #5c584f; }
.a11y-reset { margin-top: 0.7rem; }
.a11y-reset:hover { background: #a11f1f; border-color: #a11f1f; color: #fff; }
.a11y-hint {
  margin: 0.55rem 0 0;
  color: #9b968d;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-align: center;
}
html[data-a11y-large="1"] .a11y-toggle { width: 68px; height: 68px; }
html[data-a11y-large="1"] .a11y-toggle svg { width: 30px; height: 30px; }
html[data-a11y-large="1"] .a11y-panel { width: min(28rem, calc(100vw - 1.5rem)); }
html[data-a11y-large="1"] .a11y-grid button { min-height: 7rem; }
html[data-a11y-large="1"] .a11y-name { font-size: 0.95rem; }

html[data-a11y-contrast="dark"] {
  --bg: #000;
  --ink: #fff;
  --muted: #eeeae2;
  --line: rgba(255, 255, 255, 0.45);
}
html[data-a11y-contrast="dark"] .bar { background: #000; color: #fff; }
html[data-a11y-contrast="light"] {
  --bg: #f4f1ea;
  --ink: #161513;
  --muted: #3a3732;
  --line: rgba(22, 21, 19, 0.2);
}
html[data-a11y-contrast="light"] .bar { background: #f4f1ea; color: #161513; }
html[data-a11y-contrast="high"] {
  --bg: #000;
  --ink: #ffe14a;
  --muted: #ffe14a;
  --line: #ffe14a;
}
html[data-a11y-contrast="high"] .bar {
  background: #000;
  color: #ffe14a;
  border-bottom-color: #ffe14a;
}
html[data-a11y-contrast="high"] a { text-decoration: underline; text-underline-offset: 0.15em; }

html[data-a11y-links="1"] a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
html[data-a11y-text="1"] { font-size: 18px; }
html[data-a11y-text="2"] { font-size: 20px; }
html[data-a11y-text="3"] { font-size: 23px; }
html[data-a11y-spacing="1"] body {
  letter-spacing: 0.06em;
  word-spacing: 0.16em;
}
html[data-a11y-leading="1"] body { line-height: 1.9; }
html[data-a11y-align="left"] body { text-align: left; }
html[data-a11y-align="center"] body { text-align: center; }
html[data-a11y-align="right"] body { text-align: right; }
html[data-a11y-font="1"] body,
html[data-a11y-font="1"] h1,
html[data-a11y-font="1"] h2,
html[data-a11y-font="1"] h3,
html[data-a11y-font="1"] button,
html[data-a11y-font="1"] input,
html[data-a11y-font="1"] textarea,
html[data-a11y-font="1"] select {
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}
html[data-a11y-motion="1"] *,
html[data-a11y-motion="1"] *::before,
html[data-a11y-motion="1"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html[data-a11y-images="1"] img { opacity: 0 !important; }
html[data-a11y-sat="gray"] { filter: grayscale(1); }
html[data-a11y-sat="low"] { filter: saturate(0.35); }
html[data-a11y-sat="vivid"] { filter: saturate(1.8); }
html[data-a11y-cursor="1"] body,
html[data-a11y-cursor="1"] body * { cursor: none !important; }
html[data-a11y-cursor="1"] input,
html[data-a11y-cursor="1"] textarea,
html[data-a11y-cursor="1"] select { cursor: text !important; }
.a11y-cursor {
  position: fixed;
  z-index: 80;
  width: 34px;
  height: 34px;
  margin: -4px 0 0 -4px;
  border: 2px solid #f3f0e8;
  border-radius: 50%;
  background: rgba(7, 7, 8, 0.35);
  pointer-events: none;
  mix-blend-mode: difference;
}
.a11y-cursor[hidden],
.a11y-tip[hidden] { display: none; }
.a11y-tip {
  position: fixed;
  z-index: 70;
  max-width: 16rem;
  padding: 0.35rem 0.55rem;
  background: #f3f0e8;
  color: #141416;
  font-size: 0.78rem;
  line-height: 1.35;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .a11y-panel { scroll-behavior: auto; }
}
