/* =========================================================
   Accessibility toolbar — UI + page-level adjustments
   ========================================================= */

/* ---------- toolbar UI ---------- */
.a11y-root { font-family: 'Google Sans', 'Heebo', Arial, sans-serif; font-size: 16px; line-height: 1.5; color: #14202b; direction: rtl; }
.a11y-root *, .a11y-root *::before, .a11y-root *::after { box-sizing: border-box; }
.a11y-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.a11y-fab {
  position: fixed; left: 16px; bottom: 24px; z-index: 9000;
  display: inline-flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 18px 0 16px; border-radius: 999px; border: 2px solid #fff;
  background: #0B78B3; color: #fff; cursor: pointer;
  font: 600 15px/1 'Google Sans', 'Heebo', Arial, sans-serif;
  box-shadow: 0 10px 28px rgba(8, 30, 48, .35);
  transition: transform .2s ease, background .2s ease;
}
.a11y-fab:hover { background: #09679A; transform: translateY(-2px); }
.a11y-fab:focus-visible { outline: 4px solid #ffeb3b; outline-offset: 3px; }
@media (max-width: 767px) {
  .a11y-fab { bottom: 84px; left: 12px; height: 52px; width: 52px; padding: 0; justify-content: center; }
  .a11y-fab-label { display: none; }
}

.a11y-backdrop { position: fixed; inset: 0; z-index: 9001; background: rgba(8, 22, 34, .45); }
.a11y-backdrop[hidden], .a11y-panel[hidden] { display: none !important; }

.a11y-panel {
  position: fixed; z-index: 9002; top: 0; bottom: 0; left: 0;
  width: min(440px, 100vw);
  display: flex; flex-direction: column;
  background: #fff; color: #14202b;
  box-shadow: 24px 0 60px rgba(8, 22, 34, .35);
  animation: a11yIn .25s ease;
}
@keyframes a11yIn { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }

.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; background: #0E1A24; color: #fff; }
.a11y-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.a11y-close { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5); background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.a11y-close:hover { background: rgba(255,255,255,.14); }
.a11y-hint { margin: 0; padding: 10px 20px; font-size: 14px; background: #F4F1EA; color: #3a4650; }
.a11y-hint kbd { display: inline-block; padding: 1px 8px; border: 1px solid #9aa5ae; border-radius: 6px; background: #fff; font: 600 13px/1.5 inherit; }

.a11y-body { flex: 1; overflow-y: auto; padding: 8px 20px 20px; }
.a11y-sec { margin-top: 18px; }
.a11y-sec h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #0B78B3; letter-spacing: .02em; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a11y-grid-profiles { grid-template-columns: 1fr 1fr; }

.a11y-opt {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px;
  min-height: 78px; padding: 12px 14px; text-align: start;
  border: 1.5px solid #D6DCE1; border-radius: 14px; background: #fff; color: #14202b; cursor: pointer;
  font: 600 14.5px/1.25 'Google Sans', 'Heebo', Arial, sans-serif;
  transition: border-color .15s, background .15s;
}
.a11y-opt svg { color: #0B78B3; flex-shrink: 0; }
.a11y-opt:hover { border-color: #0B78B3; background: #F3F9FC; }
.a11y-opt.on, .a11y-opt[aria-pressed="true"] { border-color: #0B78B3; background: #0B78B3; color: #fff; }
.a11y-opt.on svg, .a11y-opt[aria-pressed="true"] svg { color: #fff; }
.a11y-opt:focus-visible, .a11y-step:focus-visible, .a11y-reset:focus-visible, .a11y-close:focus-visible, .a11y-links a:focus-visible { outline: 3px solid #0B78B3; outline-offset: 2px; }

.a11y-stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.a11y-step { flex: 1; min-height: 52px; border: 1.5px solid #0B78B3; border-radius: 14px; background: #fff; color: #0B78B3; font: 700 20px/1 inherit; cursor: pointer; }
.a11y-step:hover { background: #0B78B3; color: #fff; }
.a11y-step-val { min-width: 70px; text-align: center; font-weight: 700; font-size: 18px; }

.a11y-foot { padding: 14px 20px 18px; border-top: 1px solid #E3E7EA; background: #fff; display: grid; gap: 12px; }
.a11y-reset { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border-radius: 14px; border: 1.5px solid #14202b; background: #fff; color: #14202b; font: 700 15px/1 inherit; cursor: pointer; }
.a11y-reset:hover { background: #14202b; color: #fff; }
.a11y-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 14px; }
.a11y-links a { color: #0B78B3; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* ---------- reading tools ---------- */
.a11y-tool { position: fixed; left: 0; right: 0; z-index: 8000; pointer-events: none; }
.a11y-guide { height: 6px; background: #ffeb3b; box-shadow: 0 0 0 2px #000; }
.a11y-mask { background: rgba(0, 0, 0, .72); }
.a11y-mask-top { top: 0; height: 40vh; }
.a11y-mask-bottom { bottom: 0; top: 60vh; }

/* ---------- page-level adjustments (never applied to the toolbar itself) ---------- */
html.a11y-c-dark :where(body *):not(.a11y-root):not(.a11y-root *):not(.a11y-tool) {
  background-color: #000 !important; background-image: none !important; color: #fff !important;
  border-color: #fff !important; box-shadow: none !important; text-shadow: none !important;
  -webkit-text-fill-color: #fff !important;
}
html.a11y-c-dark a:not(.a11y-root *) , html.a11y-c-dark a:not(.a11y-root *) * { color: #ffeb3b !important; -webkit-text-fill-color: #ffeb3b !important; }
html.a11y-c-dark svg *:not(.a11y-root *) { stroke: #fff !important; }
html.a11y-c-dark .btn, html.a11y-c-dark .pc-btn { border: 2px solid #fff !important; }
html.a11y-c-dark img { filter: none !important; }

html.a11y-c-light :where(body *):not(.a11y-root):not(.a11y-root *):not(.a11y-tool) {
  background-color: #fff !important; background-image: none !important; color: #000 !important;
  border-color: #000 !important; box-shadow: none !important; text-shadow: none !important;
  -webkit-text-fill-color: #000 !important;
}
html.a11y-c-light a:not(.a11y-root *), html.a11y-c-light a:not(.a11y-root *) * { color: #0000c8 !important; -webkit-text-fill-color: #0000c8 !important; text-decoration: underline !important; }
html.a11y-c-light svg *:not(.a11y-root *) { stroke: #000 !important; }
html.a11y-c-light .btn, html.a11y-c-light .pc-btn { border: 2px solid #000 !important; }

html.a11y-c-invert body > *:not(.a11y-root):not(.a11y-tool) { filter: invert(1) hue-rotate(180deg); }
html.a11y-c-invert img, html.a11y-c-invert .tile, html.a11y-c-invert video { filter: invert(1) hue-rotate(180deg); }
html.a11y-gray body > *:not(.a11y-root):not(.a11y-tool) { filter: grayscale(1); }
html.a11y-c-invert.a11y-gray body > *:not(.a11y-root):not(.a11y-tool) { filter: invert(1) hue-rotate(180deg) grayscale(1); }

html.a11y-no-img img { visibility: hidden !important; }
html.a11y-no-img .tile, html.a11y-no-img .puz-stage::before { background-image: none !important; }

html.a11y-no-motion *, html.a11y-no-motion *::before, html.a11y-no-motion *::after {
  animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}
html.a11y-no-motion .rv { opacity: 1 !important; transform: none !important; }
html.a11y-no-motion .hero h1 .ln > span { transform: none !important; }
html.a11y-no-motion .hero-sub, html.a11y-no-motion .glass, html.a11y-no-motion .bub { opacity: 1 !important; transform: none !important; }

html.a11y-font :where(body *):not(.a11y-root):not(.a11y-root *) { font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif !important; }
html.a11y-ls :where(body *):not(.a11y-root):not(.a11y-root *) { letter-spacing: .1em !important; }
html.a11y-lh :where(body *):not(.a11y-root):not(.a11y-root *) { line-height: 2 !important; }
html.a11y-ws :where(body *):not(.a11y-root):not(.a11y-root *) { word-spacing: .3em !important; }
html.a11y-ar :where(body *):not(.a11y-root):not(.a11y-root *) { text-align: right !important; }

html.a11y-hh :where(h1, h2, h3, h4):not(.a11y-root *) { outline: 3px solid #0B78B3 !important; outline-offset: 5px; background-color: rgba(255, 235, 59, .28) !important; }
html.a11y-hl a:not(.a11y-root *):not(.wa-float) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 4px; background-color: rgba(255, 235, 59, .4) !important; outline: 2px solid transparent; }

html.a11y-focus *:focus, html.a11y-focus *:focus-visible { outline: 4px solid #ffeb3b !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #000 !important; }

html.a11y-targets :where(button, input, select, textarea, summary, [role="button"]):not(.a11y-root *) { min-height: 48px !important; min-width: 48px; }
html.a11y-targets a:not(.a11y-root *) { padding-block: 8px; }

html.a11y-cur-black, html.a11y-cur-black * { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'><path d='M4 2l16 9-7 2 4 8-3 1.5-4-8-5 4z' fill='black' stroke='white' stroke-width='1.3' stroke-linejoin='round'/></svg>") 4 2, auto !important; }
html.a11y-cur-white, html.a11y-cur-white * { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'><path d='M4 2l16 9-7 2 4 8-3 1.5-4-8-5 4z' fill='white' stroke='black' stroke-width='1.3' stroke-linejoin='round'/></svg>") 4 2, auto !important; }


/* keep the toolbar button clear of other bottom overlays on phones */
@media (max-width: 767px) {
  html.consent-open .a11y-fab { bottom: calc(var(--consent-h, 150px) + 90px); }
  html:has(.tray.show) .a11y-fab { bottom: 168px; }
}
