/* נגישות — תוסף צף לכל דף (ת"י 5568 / WCAG 2.1 AA) */
.a11y-btn {
  position: fixed; inset-block-end: 18px; inset-inline-end: 18px; z-index: 9990;
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff;
  background: #12224f; color: #fff; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px -8px rgba(10,20,50,.55);
  transition: transform .18s ease, background .18s ease;
}
.a11y-btn:hover { background: #1b3a7a; transform: translateY(-2px); }
.a11y-btn:focus-visible { outline: 3px solid #f2b33d; outline-offset: 3px; }
.a11y-btn svg { width: 28px; height: 28px; fill: currentColor; }

.a11y-panel {
  position: fixed; inset-block-end: 80px; inset-inline-end: 18px; z-index: 9991;
  width: 320px; max-width: calc(100vw - 24px);
  background: #fff; color: #16162e; border-radius: 18px;
  border: 1px solid rgba(18,34,79,.14);
  box-shadow: 0 26px 60px -18px rgba(10,20,50,.5);
  padding: 14px; direction: rtl;
  font-family: "Heebo", Arial, sans-serif;
  display: none;
}
.a11y-panel.is-open { display: block; animation: a11yIn .18s ease; }
@keyframes a11yIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 10px; }
.a11y-head b { font-size: 15px; }
.a11y-x { border: 0; background: #eef1f8; color: #16162e; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.a11y-row { display: flex; gap: 6px; margin-block-end: 10px; }
.a11y-row button, .a11y-item {
  font-family: inherit; cursor: pointer; border: 1px solid rgba(18,34,79,.16);
  background: #f7f9fd; color: #16162e; border-radius: 10px; padding: 9px 10px;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px;
}
.a11y-row button { flex: 1; justify-content: center; }
.a11y-row button:hover, .a11y-item:hover { background: #eaf0fb; border-color: #12224f; }
.a11y-item { width: 100%; margin-block-end: 6px; justify-content: flex-start; }
.a11y-item[aria-pressed="true"] { background: #12224f; color: #fff; border-color: #12224f; }
.a11y-item[aria-pressed="true"] .tick { opacity: 1; }
.a11y-item .tick { margin-inline-start: auto; opacity: 0; font-weight: 900; }
.a11y-foot { display: flex; gap: 6px; margin-block-start: 8px; }
.a11y-foot a, .a11y-foot button {
  flex: 1; text-align: center; font-size: 12.5px; padding: 8px; border-radius: 10px;
  text-decoration: none; border: 1px solid rgba(18,34,79,.16); background: #fff; color: #12224f; font-weight: 700; cursor: pointer; font-family: inherit;
}
.a11y-foot a:hover, .a11y-foot button:hover { background: #eaf0fb; }
.a11y-hint { font-size: 11.5px; color: #5b6480; margin-block-start: 8px; line-height: 1.5; }

/* ---------- מצבים ---------- */
html[data-a11y-size="1"] { font-size: 108%; }
html[data-a11y-size="2"] { font-size: 116%; }
html[data-a11y-size="3"] { font-size: 124%; }

/* גווני אפור: רק על מדיה, כדי לא להכביד על הדפדפן */
html[data-a11y-gray="1"] img,
html[data-a11y-gray="1"] video,
html[data-a11y-gray="1"] picture {
  filter: grayscale(1) !important;
}

/* ניגודיות גבוהה: החלפת משתני צבע בלבד, בלי פילטרים ובלי סלקטורים גלובליים */
html[data-a11y-contrast="1"] {
  --navy: #000000; --ink: #000000; --ink-2: #0a0a0a; --muted: #1a1a1a;
  --line: #4a4a4a; --paper: #ffffff; --cream: #ffffff;
  --text: #000000; --card: #ffffff; --bg: #ffffff;
  --amber-soft: #ffffff; --mint-soft: #ffffff;
}
html[data-a11y-contrast="1"] a { text-decoration: underline !important; }
html[data-a11y-contrast="1"] .soft-band { background: #ffffff !important; }

html[data-a11y-links="1"] a { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px dashed currentColor; outline-offset: 2px; border-radius: 3px; }

html[data-a11y-nomotion="1"] *,
html[data-a11y-nomotion="1"] *::before,
html[data-a11y-nomotion="1"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

html[data-a11y-read="1"] body,
html[data-a11y-read="1"] body *:not(svg):not(path):not(use) {
  font-family: Arial, "Segoe UI", "Heebo", sans-serif !important;
  letter-spacing: .012em !important;
  line-height: 1.75 !important;
}

html[data-a11y-cursor="1"], html[data-a11y-cursor="1"] body,
html[data-a11y-cursor="1"] a, html[data-a11y-cursor="1"] button {
  cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M6 4 L6 32 L14 24 L20 38 L26 35 L20 21 L31 21 Z' fill='%23ffffff' stroke='%23000000' stroke-width='2.5'/%3E%3C/svg%3E") 4 3, auto !important;
}

@media (max-width: 480px) {
  .a11y-btn { width: 46px; height: 46px; inset-block-end: 14px; inset-inline-end: 14px; }
  .a11y-panel { inset-block-end: 70px; inset-inline-end: 12px; width: calc(100vw - 24px); }
}
