/* ============================================================
   נגישות — תקן ישראלי 5568 / WCAG 2.1 AA
   ============================================================ */

/* --- סרגל נגישות --- */
.a11y-fab{
  position:fixed;bottom:calc(var(--nav-h) + 80px);inset-inline-end:14px;z-index:86;
  width:46px;height:46px;border-radius:50%;background:#1a5fb4;color:#fff;
  display:grid;place-items:center;box-shadow:0 6px 18px rgba(0,0,0,.4);font-size:1.2rem;
}
.a11y-panel{
  position:fixed;bottom:calc(var(--nav-h) + 12px);inset-inline-end:12px;z-index:310;
  width:min(300px,calc(100vw - 24px));background:var(--bg-2);border:1px solid var(--border);
  border-radius:18px;padding:14px;box-shadow:var(--shadow);display:none;max-height:70vh;overflow-y:auto;
}
.a11y-panel.open{display:block}
.a11y-panel h3{font-size:1rem;display:flex;align-items:center;gap:8px}
.a11y-panel h3 .x{margin-inline-start:auto;width:30px;height:30px;border-radius:9px;background:var(--surface-2);display:grid;place-items:center}
.a11y-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}
.a11y-btn{
  border:1px solid var(--border-soft);background:var(--surface);border-radius:12px;
  padding:9px 6px;font-size:.75rem;font-weight:800;color:var(--text);display:flex;
  flex-direction:column;align-items:center;gap:4px;text-align:center;
}
.a11y-btn[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.a11y-btn .e{font-size:1.15rem}
.a11y-reset{margin-top:9px;width:100%;border:1px solid var(--border);border-radius:12px;padding:8px;font-weight:800;font-size:.8rem;color:var(--text)}

/* --- ניגודיות גבוהה --- */
html[data-contrast="high"]{
  --bg:#000;--bg-2:#000;--surface:#000;--surface-2:#111;
  --text:#fff;--text-2:#fff;--text-3:#e8e8e8;
  --border:#ffee00;--border-soft:#ffee00;--accent:#ffee00;--accent-soft:#332e00;
}
html[data-contrast="high"] .btn-gold,
html[data-contrast="high"] .nav-item[aria-current="page"]::before,
html[data-contrast="high"] .chip[aria-pressed="true"],
html[data-contrast="high"] .ask-cta{background:#ffee00!important;color:#000!important}
html[data-contrast="high"] *{text-shadow:none!important;box-shadow:none!important}
html[data-contrast="high"] .tile .ico,
html[data-contrast="high"] .stat .v,
html[data-contrast="light"] .brand-name{color:#ffee00!important}
html[data-contrast="high"] .brand-name{background:none;-webkit-text-fill-color:#ffee00;color:#ffee00}

/* --- ניגודיות הפוכה --- */
html[data-contrast="invert"]{filter:invert(1) hue-rotate(180deg)}
html[data-contrast="invert"] img,html[data-contrast="invert"] canvas{filter:invert(1) hue-rotate(180deg)}

/* --- גווני אפור --- */
html[data-sat="gray"]{filter:grayscale(1)}

/* --- הדגשת קישורים --- */
html[data-links="on"] a,html[data-links="on"] .tile,html[data-links="on"] .btn{
  text-decoration:underline!important;outline:2px dashed var(--accent);outline-offset:2px;
}

/* --- פונט קריא --- */
html[data-font="readable"]{--font:"Arial","Segoe UI",sans-serif}
html[data-font="readable"] *{letter-spacing:.6px!important;word-spacing:2px!important;line-height:1.9!important;font-weight:600}

/* --- עצירת אנימציות --- */
html[data-motion="off"] *{animation:none!important;transition:none!important;scroll-behavior:auto!important}

/* --- סמן גדול --- */
html[data-cursor="big"],html[data-cursor="big"] *{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M6 2 L6 34 L14 26 L20 40 L26 37 L20 24 L32 24 Z' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") 4 2,auto!important;
}

/* --- שורת קריאה --- */
html[data-guide="on"]::after{
  content:"";position:fixed;inset-inline:0;top:var(--guide-y,50%);height:38px;
  background:rgba(255,238,0,.16);border-block:2px solid rgba(255,238,0,.6);
  pointer-events:none;z-index:9998;
}

/* --- מדרג גודל טקסט --- */
html[data-fs="1"]{--fs:17px}
html[data-fs="2"]{--fs:18.5px}
html[data-fs="3"]{--fs:20px}
html[data-fs="4"]{--fs:22px}
html[data-fs="-1"]{--fs:14.5px}

@media (prefers-contrast:more){
  :root{--border-soft:rgba(255,255,255,.28);--text-3:#c3cbdb}
}
