/* A11Y-MENU-1: round accessibility button + panel on every page (see static/js/a11y-menu.js).
   Bottom corner on the reading-start side (left in English, right in Arabic): the primary actions
   (Next, Submit, chat send) sit at the end side. Colours follow the October palette, dark and light. */
.oa11y-root{position:fixed;inset-inline-start:16px;bottom:16px;z-index:9990;font-family:Inter,Tajawal,system-ui,sans-serif;
  bottom:calc(16px + env(safe-area-inset-bottom,0px))}
.oa11y-button{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;
  background:#1b1e2b;color:#c9cfff;border:1px solid rgba(124,140,255,.45);box-shadow:0 6px 18px rgba(0,0,0,.35);padding:0}
.oa11y-button:hover{background:#252a3d;color:#fff}
.oa11y-button:focus-visible,.oa11y-panel button:focus-visible,.oa11y-panel a:focus-visible,.oa11y-switch:focus-visible{outline:2px solid #9da9ff;outline-offset:2px}
.oa11y-panel{position:absolute;bottom:56px;inset-inline-start:0;width:300px;max-width:calc(100vw - 32px);max-height:calc(100vh - 96px);overflow:auto;
  background:#141722;color:#eef0ff;border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:16px;box-shadow:0 18px 48px rgba(0,0,0,.45);text-align:start}
.oa11y-panel[hidden]{display:none}
.oa11y-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.oa11y-title{font-size:16px !important;font-weight:700;margin:0;color:inherit;line-height:1.3}
.oa11y-close{background:none;border:0;color:inherit;opacity:.7;cursor:pointer;font-size:16px !important;width:32px;height:32px;border-radius:8px}
.oa11y-close:hover{opacity:1;background:rgba(255,255,255,.08)}
.oa11y-row{padding:10px 0;border-top:1px solid rgba(255,255,255,.08)}
.oa11y-row-inline{display:flex;align-items:center;justify-content:space-between;gap:12px}
.oa11y-row-inline label{font-size:14px !important;cursor:pointer;color:inherit}
.oa11y-label{font-size:12px !important;font-weight:600;opacity:.75;margin-bottom:8px;letter-spacing:.3px}
.oa11y-group{display:flex;gap:4px;padding:3px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.03)}
.oa11y-pill{flex:1;background:transparent;border:0;color:rgba(255,255,255,.75);padding:7px 8px;border-radius:999px;font-family:inherit;font-weight:600;font-size:13px !important;line-height:1.2;cursor:pointer;white-space:nowrap}
.oa11y-pill[aria-checked=true]{background:linear-gradient(135deg,#7c8cff,#9da9ff);color:#0a0d12}
.oa11y-switch{appearance:none;-webkit-appearance:none;position:relative;width:44px;height:24px;border-radius:24px;cursor:pointer;flex-shrink:0;margin:0;
  background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.2)}
.oa11y-switch::before{content:'';position:absolute;top:2px;left:2px;right:auto;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .2s}
.oa11y-switch:checked{background:linear-gradient(135deg,#7c8cff,#9da9ff)}
.oa11y-switch:checked::before{transform:translateX(20px)}
[dir=rtl] .oa11y-switch::before{left:auto;right:2px}
[dir=rtl] .oa11y-switch:checked::before{transform:translateX(-20px)}
.oa11y-report{display:block;margin-top:6px;padding:10px 12px;border-radius:10px;text-align:center;text-decoration:none !important;
  font-size:14px !important;font-weight:600;color:#c9cfff !important;border:1px solid rgba(124,140,255,.4)}
.oa11y-report:hover{background:rgba(124,140,255,.1)}
.oa11y-status{font-size:12px !important;opacity:.8;margin:8px 0 0;min-height:1em}
/* Light theme */
html body.light-mode .oa11y-button{background:#fff;color:#4f46e5;border-color:#c7cbe0;box-shadow:0 6px 18px rgba(16,20,38,.15)}
html body.light-mode .oa11y-panel{background:#fff;color:#101426;border-color:#d7dae3;box-shadow:0 18px 48px rgba(16,20,38,.18)}
html body.light-mode .oa11y-row{border-color:#eceef4}
html body.light-mode .oa11y-group{border-color:#d7dae3;background:#f5f7fa}
html body.light-mode .oa11y-pill{color:#5b6072;-webkit-text-fill-color:currentColor}
html body.light-mode .oa11y-pill[aria-checked=true]{background:#4f46e5;color:#fff}
html body.light-mode .oa11y-switch{background:#cfd4e2;border-color:#b9bfce}
html body.light-mode .oa11y-switch:checked{background:#4f46e5}
html body.light-mode .oa11y-report{color:#4f46e5 !important;border-color:#c7cbe0}
html body.light-mode .oa11y-close:hover{background:#f1f2f7}
/* The menu itself keeps a fixed size so it never overflows when Large text is on. */
/* Site-wide effect of the preferences, for pages that had no rules of their own (absolute values identical to
   the dashboard's, so pages that already have them are unchanged). */
body.font-small{font-size:13px !important}
body.font-small :is(p,li,td,label,input,textarea,.sub){font-size:13px !important}
body.font-large{font-size:17px !important}
body.font-large :is(p,li,td,label,input,textarea,.sub){font-size:17px !important}
body.high-contrast :is(.card,.panel,[class*=card]){border:2px solid rgba(255,255,255,.5) !important}
html body.light-mode.high-contrast :is(.card,.panel,[class*=card]){border:2px solid #101426 !important}
body.reduce-motion,body.reduce-motion *,body.reduce-motion *::before,body.reduce-motion *::after{animation:none !important;transition:none !important}
@media print{.oa11y-root{display:none}}
/* The menu keeps its own sizes whatever the page's text-size rules say (they use body.font-large h2 {…!important},
   which would otherwise blow the panel title up to 28px). #oa11y-root out-ranks those selectors. */
#oa11y-root .oa11y-title{font-size:16px !important;line-height:1.3 !important;letter-spacing:0 !important}
#oa11y-root .oa11y-close{font-size:16px !important}
#oa11y-root .oa11y-row-inline label{font-size:14px !important}
#oa11y-root .oa11y-label{font-size:12px !important}
#oa11y-root .oa11y-pill{font-size:13px !important}
#oa11y-root .oa11y-report{font-size:14px !important}
#oa11y-root .oa11y-status{font-size:12px !important}
/* A11Y-MENU-2: opened from the student header icon. The panel drops under the icon (end side) instead of floating. */
.oa11y-root.oa11y-root-header{position:absolute;bottom:auto;inset-inline-start:auto;inset-inline-end:max(16px,calc((100vw - 1280px)/2));z-index:9990}
.oa11y-root-header .oa11y-panel{position:static;max-height:none}
