/* ============================================================
   רכיב נגישות ← תקן ישראלי 5568 / WCAG 2.0 AA
   כלי העדפות של המשתמש בלבד: מחליף מחלקות על <html> ולא נוגע ב-DOM
   של התוכן, לא ממציא alt ולא כותב ARIA. זה הקו שמפריד בין רכיב תקין
   לבין overlay (ה-FTC קנס את accessiBe במיליון דולר באפריל 2025).

   העיצוב ממשיך את מוטיב המשושה של המותג ← אותו clip-path של
   ‎.post-sign-mark‏, אותו צהוב ‎--yellow‏, אותו Rubik.
   הפלטה כאן היא לא הפלטה של האתר: טורקיז המותג נכשל בניגודיות
   ‏(2.32:1 על לבן), ורכיב נגישות שנופל בבדיקה שלו עצמו הוא בדיחה.
   ============================================================ */

#a11y{
  --ink:#1F2323;      /* על לבן ← 15.3:1 */
  --face:#FFFFFF;
  --soft:#F1F8F9;
  --line:#C9DFE1;
  --on:#0A6B6E;       /* טורקיז מוכהה. לבן עליו ← 6.1:1 */
  --hexy:#FFC95B;
  font-family:Rubik,sans-serif;
}

/* ---------- הכפתור הצף ---------- */
/* Kuttin theme: bottom RIGHT (the WhatsApp bubble sits bottom left on desktop, a full-width bar on mobile) */
.a11y-trigger{
  position:fixed;bottom:20px;right:20px;z-index:60;
  width:56px;height:58px;padding:0;border:0;background:none;cursor:pointer;
  filter:drop-shadow(0 3px 10px rgba(0,0,0,.28));
  transition:transform .14s var(--ease-out);
}
@media (hover:hover) and (pointer:fine){.a11y-trigger:hover{transform:scale(1.06)}}
.a11y-trigger:active{transform:scale(.96)}
/* המשושה המוטה של המותג: ‎18.5°, יחס 0.968 ← זהה ל-‎.post-sign-mark */
.a11y-hex{
  display:grid;place-items:center;width:100%;height:100%;
  clip-path:polygon(10.516% 16.196%,60.51% 0%,100% 33.809%,89.491% 83.814%,39.488% 100%,0% 66.186%);
  background:var(--hexy);
}
.a11y-hex svg{width:28px;height:28px;display:block;fill:#3A3A3A}  /* 7.2:1 על הצהוב */
/* Focus ring: the clip-path sits on the inner .a11y-hex, so the button's own outline (#a11y :focus-visible below) is
   never clipped. The old drop-shadow "ring" had a spread value drop-shadow() does not accept (audit 18.10): removed. */
.k-calm .a11y-trigger{transition:none}
.k-calm .a11y-trigger:hover,.k-calm .a11y-trigger:active{transform:none}

/* ---------- הפאנל ---------- */
.a11y-panel{
  position:fixed;bottom:88px;right:20px;z-index:61;
  width:min(320px,calc(100vw - 40px));max-height:min(74vh,620px);
  display:flex;flex-direction:column;
  background:var(--face);color:var(--ink);border:1px solid var(--line);
  border-radius:5px;box-shadow:0 18px 50px rgba(0,0,0,.26);
}
.a11y-panel[hidden]{display:none}
.a11y-head{
  display:flex;align-items:center;gap:10px;
  padding:14px 16px;border-bottom:1px solid var(--line);
}
.a11y-head h2{margin:0;font-size:18px;font-weight:600;color:var(--ink);flex:1}
/* משושה קטן לפני הכותרת ← אותו סמן שמופיע לפני כותרות המשנה בפוסטים */
.a11y-head h2::before{
  content:"";display:inline-block;width:15px;height:16px;vertical-align:-1px;margin-inline-end:9px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 968 1000'%3E%3Cpath d='M102 162 586 0 968 338 866 838 382 1000 0 662Z' fill='%23FFC95B'/%3E%3C/svg%3E") center/contain no-repeat;
}
.a11y-close{
  width:44px;height:44px;flex:0 0 auto;padding:0;border:1px solid var(--line);
  border-radius:5px;background:var(--face);color:var(--ink);
  font-size:20px;line-height:1;cursor:pointer;
}
.a11y-close:hover{background:var(--soft)}

.a11y-list{overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:6px}
.a11y-opt{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:10px 12px;border:1px solid var(--line);border-radius:5px;
  background:var(--face);color:var(--ink);cursor:pointer;text-align:start;
  font-family:inherit;font-size:16px;line-height:1.25;
}
.a11y-opt:hover{background:var(--soft)}
.a11y-opt-label{flex:1;font-weight:500}
.a11y-opt-val{font-size:14px;font-weight:400;opacity:.75}
/* מצב פעיל לא מסומן בצבע בלבד: מילוי המשושה + מסגרת + הערך בטקסט */
.a11y-opt[aria-pressed="true"],.a11y-opt.is-on{border-color:var(--on);box-shadow:inset 0 0 0 1px var(--on)}
.a11y-mark{
  flex:0 0 auto;width:22px;height:23px;
  clip-path:polygon(10.516% 16.196%,60.51% 0%,100% 33.809%,89.491% 83.814%,39.488% 100%,0% 66.186%);
  background:var(--line);
}
.a11y-opt[aria-pressed="true"] .a11y-mark,.a11y-opt.is-on .a11y-mark{background:var(--hexy)}

.a11y-reset{
  margin:2px 10px 12px;padding:11px;border:1px solid var(--on);border-radius:5px;
  background:var(--on);color:#fff;font-family:inherit;font-size:16px;font-weight:500;cursor:pointer;
}
.a11y-reset:hover{background:#08585B}
.a11y-foot{margin:0;padding:0 16px 14px;font-size:14px;line-height:1.45;opacity:.8}
.a11y-foot a{color:var(--on);text-decoration:underline}

#a11y :focus-visible{outline:3px solid var(--ink);outline-offset:2px}

/* Mobile (Sprint 4, Kop 18.10: the 56px button above the bar covered body text while scrolling): the trigger sits
   INSIDE the WhatsApp bar's right corner, so it never covers anything the bar does not already cover. 44px target,
   36px dark hex (the bar is the same yellow, a yellow hex would vanish); the bar's centred text clears it at 320px. */
@media(max-width:767px){
  .a11y-trigger{bottom:calc(6px + env(safe-area-inset-bottom));right:6px;width:44px;height:44px;display:grid;place-items:center;filter:none}
  .a11y-trigger .a11y-hex{width:36px;height:37px;background:var(--ink)}
  .a11y-trigger .a11y-hex svg{width:20px;height:20px;fill:var(--hexy)}  /* #FFC95B on #1F2323: 10.4:1 */
  .a11y-panel{bottom:calc(64px + env(safe-area-inset-bottom));right:12px}
}

/* ============================================================
   ההעדפות עצמן ← מחלקות על <html>, משפיעות רק על ‎.wp-site-blocks
   ============================================================ */

/* גודל טקסט. כל המידות באתר ב-px (שכפול של Elementor), ולכן font-size
   על השורש לא עושה כלום. ‎zoom מזרים מחדש את הפריסה ← אין גלישה אופקית. */
html.a11y-text-115 .wp-site-blocks{zoom:1.15}
html.a11y-text-130 .wp-site-blocks{zoom:1.3}
html.a11y-text-150 .wp-site-blocks{zoom:1.5}

/* ריווח שורות */
html.a11y-lines-16 .wp-site-blocks *{line-height:1.6!important}
html.a11y-lines-20 .wp-site-blocks *{line-height:2!important}

/* ניגודיות גבוהה. מאז 14/09 פלטת המותג עצמה עוברת AA, ולכן המצב הזה כבר
   אינו ״תיקון״ אלא העצמה למי שצריך יותר: כמעט שחור על לבן, בלי דקורציה.
   ‏59 שימושי var() ב-styles.css ← דריסת טוקנים אחת מכסה כמעט את כל האתר. */
/* Kuttin theme tokens (style.css :root) */
html.a11y-contrast-high .wp-site-blocks{
  --ink:#1A1A1A;--muted:#1A1A1A;--faint:#555;--accent-ink:#0A5F62;--accent:#0A5F62;
  --accent-wash:#FFFFFF;--accent-wash-2:#FFFFFF;--paper:#FFFFFF;
  background:#fff;
}
html.a11y-contrast-high .wp-site-blocks a{text-decoration:underline}

/* היפוך וגווני אפור. המסנן יושב על ‎.wp-site-blocks ולא על ‎html או ‎body, כי filter
   על אב הופך כל ‎position:fixed שבתוכו לממוקם יחסית אליו ← ההדר הדביק
   והכפתורים הצפים היו מפסיקים להיות צפים. המחיר: רקע האקווה והכוורת
   של ‎body נמצא *מאחורי* ‎.wp-site-blocks ולכן לא נכנס למסנן, ובלי לנטרל אותו חצי
   מהעמוד נשאר בהיר. לכן ‎.wp-site-blocks מקבל קנבס אטום משלו. */
html.a11y-contrast-invert body,html.a11y-contrast-mono body{background-image:none}
html.a11y-contrast-invert body{background-color:#111}
html.a11y-contrast-invert .wp-site-blocks{background:#fff;filter:invert(1) hue-rotate(180deg)}
/* התמונות מוחזרות, אחרת הן נראות כתשליל */
html.a11y-contrast-invert .wp-site-blocks :is(img,iframe,video){filter:invert(1) hue-rotate(180deg)}
html.a11y-contrast-mono body{background-color:#EFEFEF}
html.a11y-contrast-mono .wp-site-blocks{filter:grayscale(1) contrast(1.1)}

/* הדגשת קישורים */
html.a11y-links .wp-site-blocks a{
  text-decoration:underline!important;text-decoration-thickness:2px;text-underline-offset:.18em;
}
/* הדגשת כותרות */
html.a11y-heads .wp-site-blocks :is(h1,h2,h3,h4,h5,h6){
  outline:2px dashed currentColor;outline-offset:4px;
}
/* גופן קריא ← מחסנית מערכת בלבד, בלי webfont שמזיז את הפריסה.
   אייקוני Font Awesome ו-eicons מוחרגים, אחרת הם הופכים לריבועים. */
html.a11y-font .wp-site-blocks *:not(.fas):not(.far):not(.fab):not(.eicon){
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif!important;
}
/* סמן גדול */
html.a11y-cursor,html.a11y-cursor .wp-site-blocks *{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'%3E%3Cpath d='M6 2l20 14-9 1.5 5 9-4 2-5-9L6 26z' fill='%23fff' stroke='%23000' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 3 2,auto;
}
html.a11y-cursor .wp-site-blocks :is(a,button,[role=button],input,select,textarea,label){
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'%3E%3Cpath d='M11 3a3 3 0 016 0v10h1a3 3 0 013-3 3 3 0 013 3v9a7 7 0 01-7 7h-4a7 7 0 01-7-7v-8a3 3 0 016 0z' fill='%23fff' stroke='%23000' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 12 3,pointer;
}
/* Stop animations: a11y-motion feeds html.k-calm (functions.php head script), the same class the OS reduced-motion
   setting sets. style.css gives each moving part a calm state that keeps its state change (lit cell, marked step),
   and site.js stops the hero rotation, the clips and the strip mid-session. No blanket kill (audit 18.10). */
html.a11y-motion{scroll-behavior:auto!important}

/* הרכיב עצמו יושב מחוץ ל-‎.wp-site-blocks ← לא מתהפך ולא מוגדל, ותמיד אפשר לכבות ממנו */

/* הדפסה: אף העדפת מסך לא עוברת לנייר */
@media print{
  #a11y{display:none}
  html[class*="a11y-"] .wp-site-blocks{filter:none!important;zoom:1!important}
  html[class*="a11y-lines-"] .wp-site-blocks *{line-height:normal!important}
}
