/* Accessibility widget — self-contained, no external dependencies */
#a11y-root, #a11y-root * { box-sizing: border-box; font-family: Arial, "Segoe UI", sans-serif !important; letter-spacing: normal !important; line-height: 1.4 !important; }
#a11y-toggle {
  position: fixed; bottom: 20px; left: 20px; z-index: 2147483000;
  width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff;
  background: #1a4f8b; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.35); padding: 0; transition: transform .15s ease;
}
#a11y-toggle:hover { transform: scale(1.06); }
#a11y-toggle:focus-visible, #a11y-panel button:focus-visible, #a11y-panel a:focus-visible { outline: 3px solid #ffbf00 !important; outline-offset: 2px; }
#a11y-toggle svg { width: 32px; height: 32px; }
#a11y-panel {
  position: fixed; bottom: 86px; left: 20px; z-index: 2147483001; direction: rtl; text-align: right;
  width: 340px; max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); overflow-y: auto;
  background: #fff; color: #1c1c1c; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.3);
  display: none; font-size: 15px !important;
}
#a11y-panel.a11y-open { display: block; }
#a11y-panel .a11y-head { display: flex; justify-content: space-between; align-items: center; background: #1a4f8b; color: #fff; padding: 12px 16px; border-radius: 14px 14px 0 0; position: sticky; top: 0; }
#a11y-panel .a11y-head h2 { margin: 0; font-size: 18px !important; color: #fff !important; font-weight: 700; }
#a11y-panel .a11y-close { background: transparent; border: 0; color: #fff; font-size: 26px !important; cursor: pointer; width: 36px; height: 36px; border-radius: 6px; }
#a11y-panel .a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
#a11y-panel .a11y-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px;
  background: #f3f5f8; color: #1c1c1c !important; border: 2px solid transparent; border-radius: 10px; cursor: pointer;
  font-size: 13.5px !important; padding: 8px; text-align: center;
}
#a11y-panel .a11y-btn:hover { border-color: #1a4f8b; }
#a11y-panel .a11y-btn[aria-pressed="true"] { background: #1a4f8b; color: #fff !important; }
#a11y-panel .a11y-btn svg { width: 24px; height: 24px; }
#a11y-panel .a11y-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 14px 14px; }
#a11y-panel .a11y-foot a { color: #1a4f8b !important; text-decoration: underline !important; font-size: 14px !important; }
#a11y-panel .a11y-reset { background: #fff; color: #1a4f8b; border: 2px solid #1a4f8b; border-radius: 8px; padding: 7px 14px; cursor: pointer; font-size: 14px !important; }
.a11y-skip { position: absolute; top: -100px; right: 10px; z-index: 2147483002; background: #1a4f8b; color: #fff !important; padding: 10px 16px; border-radius: 0 0 8px 8px; font-size: 16px; }
.a11y-skip:focus { top: 0; }

/* ---- effects ---- */
html.a11y-contrast body, html.a11y-contrast body *:not(#a11y-root):not(#a11y-root *) { background-color: #000 !important; color: #fff !important; border-color: #fff !important; background-image: none !important; }
html.a11y-contrast body a:not(#a11y-root *) { color: #ff0 !important; }
html.a11y-contrast img, html.a11y-contrast video { filter: none; }
html.a11y-invert body > *:not(#a11y-root) { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert body img, html.a11y-invert body video { filter: invert(1) hue-rotate(180deg); }
html.a11y-gray body > *:not(#a11y-root) { filter: grayscale(1); }
html.a11y-links a:not(#a11y-root *) { text-decoration: underline !important; outline: 2px solid #ffbf00 !important; outline-offset: 1px; }
html.a11y-headings :is(h1,h2,h3,h4,h5,h6):not(#a11y-root *) { outline: 2px dashed #d0021b !important; outline-offset: 3px; }
html.a11y-font body *:not(#a11y-root *):not(i):not([class*="icon"]) { font-family: Arial, Helvetica, sans-serif !important; }
html.a11y-spacing body *:not(#a11y-root *) { line-height: 1.9 !important; letter-spacing: .06em !important; word-spacing: .12em !important; }
html.a11y-stop *, html.a11y-stop *::before, html.a11y-stop *::after { animation: none !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 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1.5' d='M5 3l14 11-6 2 4 6-3 1-4-6-5 4z'/%3E%3C/svg%3E") 4 2, auto !important; }
html.a11y-focus *:focus { outline: 3px solid #ffbf00 !important; outline-offset: 2px !important; }
html.a11y-noimg body img:not(#a11y-root *) { opacity: .08 !important; }

/* reading mask */
#a11y-mask-top, #a11y-mask-bottom { position: fixed; left: 0; right: 0; background: rgba(0,0,0,.6); z-index: 2147482999; pointer-events: none; display: none; }
#a11y-mask-top { top: 0; } #a11y-mask-bottom { bottom: 0; }
html.a11y-mask #a11y-mask-top, html.a11y-mask #a11y-mask-bottom { display: block; }

@media (max-width: 480px) {
  #a11y-toggle { width: 48px; height: 48px; bottom: 14px; left: 14px; }
  #a11y-panel { left: 16px; bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) { #a11y-toggle { transition: none; } }
