/* ── Global preference effects ─────────────────────────────────────────────── */
html[data-a11y-contrast="high"] body>*:not(#a11y-widget){filter:contrast(1.6)!important}
html[data-a11y-contrast="inverted"] body{filter:invert(1) hue-rotate(180deg)}
html[data-a11y-contrast="inverted"] #a11y-widget{filter:invert(1) hue-rotate(180deg)}
html[data-a11y-contrast="inverted"] img,html[data-a11y-contrast="inverted"] video{filter:invert(1) hue-rotate(180deg)}
html[data-a11y-text="lg"]  {font-size:112.5%!important}
html[data-a11y-text="xl"]  {font-size:125%!important}
html[data-a11y-text="xxl"] {font-size:150%!important}
html[data-a11y-spacing="relaxed"] *:not(#a11y-widget):not(#a11y-widget *){line-height:1.9!important;letter-spacing:.05em!important;word-spacing:.1em!important}
html[data-a11y-spacing="loose"]   *:not(#a11y-widget):not(#a11y-widget *){line-height:2.5!important;letter-spacing:.1em!important;word-spacing:.16em!important}
html[data-a11y-cursor="large"],html[data-a11y-cursor="large"] *{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M6 2 L6 38 L15 29 L23 46 L29 43 L21 26 L36 26 Z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 2,auto!important}
html[data-a11y-motion="reduced"] *:not(#a11y-widget):not(#a11y-widget *)      {animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
html[data-a11y-motion="reduced"] *:not(#a11y-widget):not(#a11y-widget *)::before,
html[data-a11y-motion="reduced"] *:not(#a11y-widget):not(#a11y-widget *)::after {animation-duration:.001ms!important;transition-duration:.001ms!important}
:focus-visible{outline:3px solid #005fcc!important;outline-offset:3px!important}

/* ── Widget shell ──────────────────────────────────────────────────────────── */
#a11y-widget{position:fixed;bottom:24px;left:24px;z-index:99999;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;direction:rtl}
#a11y-trigger{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:50%;border:2px solid #fff;background:#1a56db;color:#fff;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.35);transition:background 160ms,transform 120ms;padding:0}
#a11y-trigger:hover{background:#1241a3}
#a11y-trigger:active{transform:scale(.94)}
#a11y-trigger svg{width:26px;height:26px;pointer-events:none}
#a11y-panel{position:absolute;bottom:calc(100% + 12px);left:0;width:300px;max-height:80vh;overflow-y:auto;background:#111827;color:#f3f4f6;border:1px solid #374151;border-radius:12px;box-shadow:0 8px 40px rgba(0,0,0,.6);animation:a11yIn 180ms cubic-bezier(.23,1,.32,1) both}
#a11y-panel[hidden]{display:none!important}
@keyframes a11yIn{from{opacity:0;transform:scale(.9) translateY(8px)}to{opacity:1;transform:none}}
.aw-hdr{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #374151}
.aw-title{font-size:15px;font-weight:700;color:#f9fafb;margin:0}
.aw-kb{font-size:11px;color:#6b7280;background:#1f2937;border:1px solid #374151;border-radius:4px;padding:1px 6px;margin-top:4px;display:inline-block;font-family:monospace}
.aw-close{width:32px;height:32px;min-width:32px;border-radius:6px;border:1px solid #4b5563;background:transparent;color:#9ca3af;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;transition:background 120ms,color 120ms;flex-shrink:0;font-family:inherit}
.aw-close:hover{background:#1f2937;color:#f3f4f6}
.aw-body{padding:12px 20px 16px;display:flex;flex-direction:column;gap:14px}
.aw-sec-lbl{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#9ca3af;margin-bottom:8px;display:flex;align-items:center;gap:6px}
.aw-opts{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.aw-btn{padding:6px 12px;border-radius:6px;border:1.5px solid #374151;background:#1f2937;color:#d1d5db;font-size:13px;font-weight:500;cursor:pointer;transition:border-color 120ms,background 120ms,color 120ms;font-family:inherit}
.aw-btn:hover{border-color:#60a5fa;background:#1e3a5f;color:#f3f4f6}
.aw-btn[aria-checked="true"]{border-color:#3b82f6;background:#1d4ed8;color:#fff;font-weight:700}
.aw-row{display:flex;align-items:center;justify-content:space-between}
.aw-row-lbl{font-size:14px;color:#d1d5db}
.aw-toggle{position:relative;width:44px;height:24px;border-radius:12px;border:none;background:#374151;cursor:pointer;transition:background 200ms;flex-shrink:0;padding:0}
.aw-toggle::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#9ca3af;transition:transform 200ms,background 200ms}
.aw-toggle[aria-checked="true"]{background:#2563eb}
.aw-toggle[aria-checked="true"]::after{transform:translateX(20px);background:#fff}
.aw-div{height:1px;background:#1f2937;border:none;margin:0}
.aw-reset{width:100%;padding:10px;border-radius:8px;border:1px solid #374151;background:transparent;color:#6b7280;font-size:13px;cursor:pointer;transition:background 120ms,color 120ms,border-color 120ms;font-family:inherit}
.aw-reset:hover{background:#1f2937;color:#ef4444;border-color:#ef4444}
.aw-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#a11y-widget :focus-visible{outline:2px solid #60a5fa!important;outline-offset:2px!important}
@media (forced-colors:active){#a11y-trigger{forced-color-adjust:none;background:Highlight;color:HighlightText}#a11y-panel{forced-color-adjust:none;background:Canvas;color:CanvasText;border-color:ButtonBorder}.aw-btn[aria-checked="true"]{forced-color-adjust:none;background:Highlight;color:HighlightText}}
