/* Self-hosted accessibility menu and helpers (IS 5568 / WCAG 2.0–2.1 AA). */
/* Physical left/right only. Logical inset-inline-* flipped these corners
   on dir=rtl and stacked the menu on top of .wa-float (which uses
   inset-inline-end, i.e. the physical left in Hebrew). JS decidePosition()
   also reports physical sides via getBoundingClientRect. */
.a11y-root {
  position: fixed;
  z-index: 9999;
  bottom: 1rem;
  left: auto;
  right: 1rem;
  font-family: Arial, "Noto Sans Hebrew", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #111;
  letter-spacing: 0;
}
.a11y-root[data-corner="left"] {
  left: 1rem;
  right: auto;
}
.a11y-root[data-corner="right"] {
  left: auto;
  right: 1rem;
}
.a11y-root[data-lift="true"] { bottom: 6.2rem; }
@media (max-width: 420px) {
  .a11y-root[data-lift="true"] { bottom: 5.6rem; }
}

.a11y-toggle {
  appearance: none;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #005cbc;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.a11y-toggle:hover { background: #004799; }
.a11y-toggle:focus-visible {
  outline: 3px solid #ffd000;
  outline-offset: 3px;
}
.a11y-toggle svg { width: 1.85rem; height: 1.85rem; display: block; fill: currentColor; }

.a11y-panel {
  position: absolute;
  bottom: calc(100% + 0.65rem);
  width: min(20.5rem, calc(100vw - 1.6rem));
  max-height: min(70vh, 32rem);
  overflow: auto;
  background: #fff;
  color: #111;
  border: 2px solid #111;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  padding: 0.85rem 0.85rem 0.7rem;
}
.a11y-root[data-corner="left"] .a11y-panel { left: 0; right: auto; }
.a11y-root[data-corner="right"] .a11y-panel { right: 0; left: auto; }
.a11y-panel[hidden] { display: none !important; }

.a11y-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.a11y-panel-head h2 {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: #111;
  letter-spacing: 0;
  line-height: 1.2;
}
.a11y-close {
  appearance: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #222;
  border-radius: 8px;
  background: #f4f4f4;
  color: #111;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.a11y-close:hover { background: #e8e8e8; }
.a11y-close:focus-visible,
.a11y-btn:focus-visible,
.a11y-statement:focus-visible {
  outline: 3px solid #005cbc;
  outline-offset: 2px;
}

.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.a11y-btn {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 4.4rem;
  padding: 0.45rem 0.35rem;
  border: 1px solid #c8c8c8;
  border-radius: 12px;
  background: #f7f7f7;
  color: #111;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.a11y-btn svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a11y-btn:hover { background: #ececec; }
.a11y-btn[aria-pressed="true"] {
  background: #003d82;
  color: #fff;
  border-color: #003d82;
}
.a11y-btn.a11y-span { grid-column: 1 / -1; min-height: 3.1rem; flex-direction: row; }
.a11y-statement {
  display: inline-block;
  margin-top: 0.65rem;
  color: #003d82;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Page adjustments driven by the menu (and prefers-reduced-motion). */
html.a11y-scale-1 { font-size: 115%; }
html.a11y-scale-2 { font-size: 130%; }
html.a11y-scale-3 { font-size: 150%; }

html.a11y-readable,
html.a11y-readable body {
  font-family: Arial, "Noto Sans Hebrew", Tahoma, Geneva, sans-serif !important;
  letter-spacing: 0.02em;
  word-spacing: 0.04em;
  line-height: 1.7 !important;
}
html.a11y-readable h1,
html.a11y-readable h2,
html.a11y-readable h3,
html.a11y-readable h4,
html.a11y-readable button,
html.a11y-readable input,
html.a11y-readable select,
html.a11y-readable textarea {
  font-family: Arial, "Noto Sans Hebrew", Tahoma, Geneva, sans-serif !important;
}

html.a11y-links a[href] {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  background-color: #fff3a3 !important;
  color: #000 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html.a11y-links .a11y-root a[href] {
  background-color: transparent !important;
  color: #003d82 !important;
}

html.a11y-gray body > *:not(.a11y-root):not(.wa-float):not(.drw-root) {
  filter: grayscale(1);
}

html.a11y-contrast,
html.a11y-contrast body {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-contrast body *:not(.a11y-root):not(.a11y-root *) {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  fill: currentColor;
}
html.a11y-contrast a:not(.a11y-root a) {
  color: #ffff00 !important;
  text-decoration: underline !important;
}
html.a11y-contrast button:not(.a11y-root button),
html.a11y-contrast .btn:not(.a11y-root .btn) {
  background: #000 !important;
  color: #ffff00 !important;
  border: 2px solid #ffff00 !important;
}
html.a11y-contrast :focus-visible {
  outline: 3px solid #ffff00 !important;
  outline-offset: 3px !important;
}

html.a11y-stop-anim,
html.a11y-stop-anim * ,
html.a11y-stop-anim *::before,
html.a11y-stop-anim *::after {
  animation: none !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.a11y-stop-anim #hero-particles,
html.a11y-stop-anim .hero-particles,
html.a11y-stop-anim .aurora {
  display: none !important;
}
html.a11y-stop-anim .marquee-track {
  animation: none !important;
  transform: none !important;
}

.a11y-statement-page {
  padding: calc(var(--header, 4.4rem) + 2.5rem) 0 4rem;
}
.a11y-statement-page h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 0 0 1rem;
}
.a11y-statement-page h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.7rem;
}
.a11y-statement-page p,
.a11y-statement-page li {
  font-size: 1.05rem;
  max-width: 46rem;
}
.a11y-statement-page ul {
  list-style: disc;
  padding-inline-start: 1.3rem;
  display: grid;
  gap: 0.4rem;
  margin: 0.4rem 0 1rem;
}
.a11y-statement-page a {
  color: var(--gold-soft, #d4b06a);
  text-decoration: underline;
  text-underline-offset: 3px;
}
