/* ===== v3 · תפריט נגישות (בבית, בלי סקריפט צד שלישי — החלטה סופית) + מצבי הנגישות =====
   ui-v3.js בונה את הכפתור והחלון. הקובץ נטען באפליקציה (index.html), בעמודי המסמכים ובעמודי המחירים.
   משתמש רק בטוקנים (--surface, --fg, --s*, --r* …) — כל עמוד מגדיר אותם (style.css, או :root של pricing-en.html). */
.a11y-fab {
  position: fixed; z-index: 70; inset-inline-end: var(--s4); bottom: calc(var(--s5) + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%;
  background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line-strong), var(--float-shadow);
}
.a11y-fab:hover { background: var(--panel); }
.a11y-fab svg { width: 28px; height: 28px; --icon-accent: var(--teal-ink); }
.a11y-panel {
  position: fixed; z-index: 80; inset-inline-end: var(--s4); bottom: calc(var(--s5) + 64px + env(safe-area-inset-bottom, 0px));
  width: min(360px, calc(100vw - 2 * var(--s4))); max-height: calc(100svh - 120px); overflow: auto;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); border-radius: var(--r4);
  padding: var(--s4); box-shadow: var(--float-shadow);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel .a11y-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.a11y-panel h2 { font-size: var(--t-lg); margin: 0; }
.a11y-panel .a11y-x { width: var(--tap); height: var(--tap); min-height: var(--tap); padding: 0; background: transparent; color: var(--fg); box-shadow: none; }
.a11y-panel .a11y-x:hover { background: var(--teal-soft); }
.a11y-sec { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.a11y-sec:first-of-type { border-top: 0; }
.a11y-lbl { display: flex; align-items: center; gap: var(--s2); font-weight: 500; font-size: var(--t-sm); margin-bottom: var(--s2); }
.a11y-lbl svg { color: var(--teal-ink); }
.a11y-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s1); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s1); }
.a11y-seg button { min-height: var(--tap); background: transparent; color: var(--fg); box-shadow: none; border-radius: var(--r2); padding: 0 var(--s2); font-weight: 600; }
.a11y-seg button:nth-child(1) { font-size: 1rem; } .a11y-seg button:nth-child(2) { font-size: 1.18rem; } .a11y-seg button:nth-child(3) { font-size: 1.35rem; }
.a11y-seg button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.a11y-sw {
  display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 52px; padding: var(--s2) var(--s1);
  background: transparent; color: var(--fg); box-shadow: none; border-radius: var(--r2); font-weight: 500; font-size: var(--t-md); justify-content: flex-start; text-align: start;
}
.a11y-sw:hover { background: var(--teal-soft); }
.a11y-sw > svg { color: var(--teal-ink); }
.a11y-sw .t { flex: 1; }
.a11y-sw .knob { width: 44px; height: 26px; border-radius: 13px; box-shadow: inset 0 0 0 1.5px var(--field-line); position: relative; flex: 0 0 auto; transition: background-color var(--d1) var(--ease); }
.a11y-sw .knob::after { content: ''; position: absolute; top: 4px; inset-inline-start: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: inset-inline-start var(--d1) var(--ease), background-color var(--d1) var(--ease); }
.a11y-sw[aria-checked="true"] .knob { background: var(--teal); box-shadow: none; }
.a11y-sw[aria-checked="true"] .knob::after { inset-inline-start: 22px; background: var(--on-teal); }
.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); flex-wrap: wrap; }
.a11y-foot a { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--t-sm); }
.a11y-foot button { min-height: var(--tap); font-size: var(--t-sm); padding: 0 var(--s4); }

/* מצבי הנגישות עצמם */
:root[data-links="underline"] a { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; }
:root[data-links="underline"] a.btn, :root[data-links="underline"] .pt-card { text-decoration-line: underline !important; }
:root[data-spacing="readable"] body { line-height: 1.85; letter-spacing: .06em; word-spacing: .16em; }
:root[data-spacing="readable"] p, :root[data-spacing="readable"] li { line-height: 1.9; margin-bottom: .6em; }
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* v4.9 · D1 · הכפתור לא מכסה תוכן לעולם (ביקורת 15.11, עיצוב #1):
   · לפני הכניסה ובדפי התוכן — צף, והדף מקבל ריווח תחתון בגובהו (body.a11y-float, מ-ui-v3.js), כך שהשורה האחרונה נגללת מעליו.
   · בטלפון אחרי הכניסה (body.a11y-hdr) — אייקון בכותרת ליד מתג התצוגה (.a11y-tb, style.css); הצף מוסתר.
   · בדסקטופ — 40px, צמוד לפינה התחתונה. */
body.a11y-float { padding-bottom: calc(52px + var(--s5) + env(safe-area-inset-bottom, 0px)); }
.a11y-tb { display: none; }
@media (min-width: 769px) {
  .a11y-fab { width: 40px; height: 40px; min-height: 40px; bottom: var(--s4); inset-inline-end: var(--s4); }
  .a11y-fab svg { width: 24px; height: 24px; }
  .a11y-panel { bottom: calc(var(--s4) + 40px + var(--s2)); }
  body.a11y-float { padding-bottom: calc(40px + var(--s5)); }
}
@media (max-width: 768px) {
  body.a11y-hdr .a11y-fab { display: none; }
  body.a11y-hdr.a11y-float { padding-bottom: 0; }   /* הסרגל התחתון כבר שומר מקום (#app, style.css) */
  .a11y-panel.from-top { top: calc(60px + var(--s2) + env(safe-area-inset-top, 0px)); bottom: auto; max-height: calc(100svh - 60px - 96px - env(safe-area-inset-bottom, 0px)); }
}

.a11y-seg.two { grid-template-columns: 1fr 1fr; }
.a11y-seg.two button { gap: var(--s2); font-size: var(--t-sm); }
.a11y-foot nav { display: flex; flex-wrap: wrap; gap: 0 var(--s3); flex: 1 1 auto; }
