
/* ---- global accessibility helpers (all pages) ---- */
.skip-link { position:absolute; inset-inline-start:12px; top:-80px; background:#1f2a44; color:#fff !important;
             padding:10px 16px; border-radius:10px; z-index:10001; font-weight:700; text-decoration:none; }
.skip-link:focus { top:12px; }
.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
           clip:rect(0,0,0,0); white-space:nowrap; border:0; }
:where(a,button,input,select,textarea,summary,[tabindex],[role=button]):focus-visible {
    outline:3px solid #1a66cc !important; outline-offset:2px !important; }

/* ---- panel ---- */
#a11y-root { position:fixed; inset-block-end:16px; inset-inline-end:16px; z-index:10000;
             font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif; direction:rtl; }
#a11y-toggle { width:52px; height:52px; border-radius:50%; border:2px solid #fff; background:#1a4fb8; color:#fff;
               box-shadow:0 6px 18px rgba(15,23,42,.28); cursor:pointer; display:grid; place-items:center; padding:0; }
#a11y-toggle svg { width:30px; height:30px; }
#a11y-panel { position:absolute; inset-block-end:64px; inset-inline-end:0; width:min(320px, calc(100vw - 32px));
              max-height:min(560px, calc(100vh - 100px)); overflow:auto; background:#fff; color:#1f2a44;
              border:1px solid #cfd6e6; border-radius:16px; box-shadow:0 16px 40px rgba(15,23,42,.25); padding:14px; }
#a11y-panel[hidden] { display:none; }
#a11y-panel h2 { font-size:18px; margin:0 0 10px; display:flex; justify-content:space-between; align-items:center; }
#a11y-panel .a11y-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
#a11y-panel button.a11y-opt { min-height:56px; padding:8px; border-radius:12px; border:2px solid #cfd6e6;
              background:#f5f7ff; color:#1f2a44; font-size:14px; font-weight:700; cursor:pointer; line-height:1.3; }
#a11y-panel button.a11y-opt[aria-pressed="true"] { background:#1a4fb8; border-color:#1a4fb8; color:#fff; }
#a11y-panel .a11y-close { border:0; background:transparent; font-size:24px; line-height:1; cursor:pointer;
              color:#1f2a44; width:40px; height:40px; border-radius:10px; }
#a11y-panel .a11y-wide { grid-column:1 / -1; }
#a11y-panel .a11y-links { margin-top:12px; display:flex; gap:14px; flex-wrap:wrap; font-size:14px; }
#a11y-panel .a11y-links a { color:#1a66cc; font-weight:700; }
#a11y-panel .a11y-size { display:flex; align-items:center; justify-content:space-between; gap:6px; }
#a11y-panel .a11y-size output { font-weight:800; min-width:52px; text-align:center; }

/* ---- modes (classes on <html>) ---- */
html.a11y-font-1 body > :not(#a11y-root) { zoom:1.15; }
html.a11y-font-2 body > :not(#a11y-root) { zoom:1.3; }
html.a11y-font-3 body > :not(#a11y-root) { zoom:1.5; }
html.a11y-grayscale { filter:grayscale(1); }
html.a11y-contrast, html.a11y-contrast body { background:#000 !important; }
html.a11y-contrast body *:not(#a11y-root):not(#a11y-root *):not(svg):not(svg *):not(img):not(video):not(canvas) {
    background:#000 !important; background-image:none !important; color:#fff !important;
    border-color:#fff !important; box-shadow:none !important; text-shadow:none !important; }
html.a11y-contrast body a:not(#a11y-root *) { color:#ffeb3b !important; }
html.a11y-contrast body button:not(#a11y-root *) { border:2px solid #fff !important; }
html.a11y-links a:not(#a11y-root *), html.a11y-links button:not(#a11y-root *) {
    text-decoration:underline !important; text-underline-offset:3px; outline:2px dashed currentColor; outline-offset:2px; }
html.a11y-readable body *:not(#a11y-root *) { font-family:Arial,"Segoe UI",sans-serif !important; }
html.a11y-spacing body *:not(#a11y-root *) { line-height:1.8 !important; letter-spacing:.06em !important; word-spacing:.12em !important; }
html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after {
    animation-duration:.001s !important; animation-iteration-count:1 !important; transition:none !important; scroll-behavior:auto !important; }
html.a11y-cursor, html.a11y-cursor * {
    cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 4l30 18-13 3 8 15-6 3-8-15-11 9z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto !important; }

@media (max-width:600px) {
  #a11y-root { inset-block-end:12px; inset-inline-end:12px; }
  #a11y-toggle { width:48px; height:48px; }
}
@media print { #a11y-root, .skip-link { display:none !important; } }
