/* Important user preferences take priority over legacy unlayered theme rules. */
@layer merkaz-accessibility {
/* Controls share the existing menu's light/dark palette. */
.mt-a11y-panel { color:inherit; width:100%; min-width:0; padding:4px 2px 24px; box-sizing:border-box; text-align:start; }
.mt-a11y-panel[hidden] { display:none!important; }
.mt-a11y-panel h2 { font-size:1.35rem; margin:0 0 10px; line-height:1.4; }
.mt-a11y-panel p { line-height:1.65; margin:8px 0 16px; }
.mt-a11y-field { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin:20px 0 8px; }
.mt-a11y-field label { font-weight:700; }
.mt-a11y-panel select,.mt-a11y-reset { font:inherit; color:inherit; background:var(--drawer-bg,#fff9ef); border:2px solid currentColor; border-radius:10px; min-height:44px; padding:9px 12px; max-width:100%; }
.mt-a11y-panel select { min-width:9rem; }
.mt-a11y-panel fieldset { min-width:0; margin:24px 0; padding:10px 14px; border:1px solid currentColor; border-radius:14px; }
.mt-a11y-panel legend { padding:0 7px; font-weight:700; }
.mt-a11y-toggle { display:flex; align-items:flex-start; gap:12px; padding:14px 0; cursor:pointer; line-height:1.5; min-height:44px; box-sizing:border-box; }
.mt-a11y-toggle input { appearance:auto!important; display:block!important; position:static!important; opacity:1!important; width:22px!important; height:22px!important; flex:0 0 22px; margin:3px 0 0; accent-color:#386049; }
.mt-a11y-toggle span { min-width:0; }
.mt-a11y-toggle strong,.mt-a11y-toggle small { display:block; }
.mt-a11y-toggle small,.mt-a11y-note { font-size:.9rem; }
.mt-a11y-status { min-height:1.6em; font-size:.9rem; }
.mt-a11y-reset { cursor:pointer; white-space:normal; }
.mt-a11y-skip { position:fixed; inset-inline-start:16px; top:12px; z-index:200000; transform:translateY(-200%); padding:14px 20px; border-radius:8px; background:#fff!important; color:#000!important; font-weight:700; }
.mt-a11y-skip:focus { transform:none; }
html body :is(a,button,input,select,textarea,[tabindex],[role="button"]):focus-visible { outline:3px solid #0765d6!important; outline-offset:3px!important; box-shadow:0 0 0 5px #fff!important; }
html[data-a11y-links="true"] a[href] { text-decoration:underline!important; text-decoration-thickness:2px!important; text-underline-offset:.2em; }
html[data-a11y-spacing="true"] body :is(p,li,label,button,a,h1,h2,h3,h4,legend,small,strong,span,input,select,textarea,td,th,div.question-content) { line-height:1.6!important; letter-spacing:.12em!important; word-spacing:.16em!important; }
html[data-a11y-spacing="true"] p { margin-block-end:2em!important; }
html:is([data-a11y-spacing="true"],[data-a11y-text]:not([data-a11y-text="100"])) :is(.site-menu-link,.site-menu-action,.site-menu-sound,.topic-card,.answer-option,.answer-button,.card-button,.primary-button,.secondary-button,.menu-main,.menu-kicker,.menu-main-copy,.card-meta,.question-text,.question-panel,.mode-intro-card) { height:auto!important; max-height:none!important; white-space:normal!important; overflow-wrap:anywhere; min-width:0; }
html:is([data-a11y-spacing="true"],[data-a11y-text]:not([data-a11y-text="100"])) :is(.exam-mode-buttons,.card-meta,.intro-actions,.quiz-actions,.mode-topbar,.quiz-header,.games-header-row,.site-menu-header) { flex-wrap:wrap; }
html[data-a11y-text]:not([data-a11y-text="100"]) :is(.exam-grid,.topic-grid) { grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr))!important; }
html:is([data-a11y-spacing="true"],[data-a11y-text]:not([data-a11y-text="100"])) :is(.quiz-shell,.question-panel,.site-shell,.games-shell) { max-height:none!important; }
html[data-a11y-text]:not([data-a11y-text="100"]) .site-menu-drawer { overflow-y:auto!important; }

html[data-a11y-contrast="true"] { --a11y-bg:#fff; --a11y-ink:#111; --a11y-link:#003c9e; --a11y-selected:#d9eaff; }
html[data-a11y-contrast="true"][data-theme="dark"] { --a11y-bg:#080808; --a11y-ink:#fff; --a11y-link:#8dc5ff; --a11y-selected:#243b55; }
html[data-a11y-contrast="true"] body,
html[data-a11y-contrast="true"] body :is(main,header,footer,nav,section,article,aside,dialog,.site-menu-view,.site-menu-ranks,.cloud-modal,.cloud-modal-wrap,.question-panel,.answer-explanation,.answer-feedback,.quiz-shell,.quiz-header,.mode-intro-card,.hero,.stats-strip,.meter-card,.result-card,.results-hero,.games-shell,.game-panel,.game-card,.bottom-nav,.site-bottom-nav) { background:var(--a11y-bg)!important; color:var(--a11y-ink)!important; background-image:none!important; border-color:var(--a11y-ink)!important; }
html[data-a11y-contrast="true"] body :is(h1,h2,h3,h4,p,label,legend,small,strong,b,em,span,li,td,th) { color:var(--a11y-ink)!important; text-shadow:none!important; -webkit-text-fill-color:currentColor!important; }
html[data-a11y-contrast="true"] body :is(button,a,input,select,textarea,[role="button"]) { color:var(--a11y-ink)!important; background:var(--a11y-bg)!important; background-image:none!important; border-color:var(--a11y-ink)!important; text-shadow:none!important; }
html[data-a11y-contrast="true"] body a[href] { color:var(--a11y-link)!important; text-decoration:underline!important; }
html[data-a11y-contrast="true"] body :is(button,input,select,textarea,[role="button"]) { border-width:2px!important; border-style:solid!important; }
html[data-a11y-contrast="true"] body :is([aria-pressed="true"],[aria-selected="true"],.answer-option.selected,.answer-button.selected,.topic-card.active) { background:var(--a11y-selected)!important; outline:2px solid var(--a11y-ink); }
html[data-a11y-contrast="true"] body :is(.correct,.is-correct,.answer-correct) { border:3px solid #168342!important; }
html[data-a11y-contrast="true"] body :is(.wrong,.incorrect,.is-wrong,.answer-incorrect) { border:3px dashed #cf4040!important; }
html[data-a11y-contrast="true"] body :disabled { opacity:.7!important; border-style:dashed!important; }
html[data-a11y-contrast="true"] input::placeholder,html[data-a11y-contrast="true"] textarea::placeholder { color:var(--a11y-ink)!important; opacity:1!important; }
html[data-a11y-contrast="true"] body :is(.answer-feedback-v60-19,.feedback-box,.feedback-symbol,.answer-letter,.question-tag,.status-pill,.question-unverified-v60-19,.regulations-review-warning,.menu-main-copy,.menu-icon,.topic-icon) { background:var(--a11y-bg)!important; color:var(--a11y-ink)!important; border-color:var(--a11y-ink)!important; }

html[data-a11y-motion="true"] *,html[data-a11y-motion="true"] *::before,html[data-a11y-motion="true"] *::after { animation-duration:.01ms!important; animation-iteration-count:1!important; animation-delay:0ms!important; transition-duration:.01ms!important; transition-delay:0ms!important; scroll-behavior:auto!important; }
html[data-a11y-motion="true"] :is(.record-fireworks,.confetti,.record-burst) { display:none!important; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; animation-delay:0ms!important; transition-duration:.01ms!important; scroll-behavior:auto!important; } }
@media(max-width:480px) { .mt-a11y-panel fieldset { padding:8px; } .mt-a11y-field { align-items:stretch; flex-direction:column; } .mt-a11y-field select { width:100%; } }
}
