/* Security & operations: accessibility, dark mode, right-to-left, report charts. */
.skip-link{position:absolute;left:12px;top:-60px;z-index:200;background:var(--brand);color:var(--brand-ink);padding:10px 16px;border-radius:10px;font-weight:700}
.skip-link:focus{top:12px;text-decoration:none;color:var(--brand-ink)}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:4px}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
.a11y-dock{position:fixed;right:14px;bottom:14px;z-index:70;display:flex;gap:6px}
.a11y-dock a{display:grid;place-items:center;min-width:40px;height:40px;padding:0 10px;border-radius:999px;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow);color:var(--ink);font-weight:700;font-size:15px}
.a11y-dock a:hover{text-decoration:none;border-color:var(--brand)}
.push-banner~.a11y-dock,.a11y-dock{bottom:14px}

/* Dark theme: the whole site follows the colour variables. 5.8: :where() keeps this palette a fallback — a kit's or the
   site's own dark tokens (bld-tokens, kit schemes) win, so every design kit keeps its own colours in dark mode. */
html[data-theme=dark]{color-scheme:dark}
:where(html[data-theme=dark]){--paper:#121815;--paper-2:#1a221e;--card:#1e2723;--ink:#e9efe9;--ink-2:#c3cec7;--muted:#93a198;--brand:#6cc3a2;--brand-2:#8fd6ba;--brand-ink:#0f1a15;--accent:#f0b65a;--accent-2:#5a4523;--line:#2e3a34;--line-2:#3a4841;--shadow:0 1px 0 rgba(0,0,0,.3),0 8px 24px -12px rgba(0,0,0,.6)}
@media (prefers-color-scheme:dark){html[data-theme=auto]{color-scheme:dark}:where(html[data-theme=auto]){--paper:#121815;--paper-2:#1a221e;--card:#1e2723;--ink:#e9efe9;--ink-2:#c3cec7;--muted:#93a198;--brand:#6cc3a2;--brand-2:#8fd6ba;--brand-ink:#0f1a15;--accent:#f0b65a;--accent-2:#5a4523;--line:#2e3a34;--line-2:#3a4841}}
html[data-theme=dark] img:not([src$=".svg"]){filter:brightness(.92)}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:var(--paper-2);color:var(--ink);border-color:var(--line-2)}
html[data-theme=dark] .badge-ok{background:#1f3d2e;color:#9fe0bd}html[data-theme=dark] .badge-warn{background:#3d3220;color:#f3cf8c}html[data-theme=dark] .badge-bad{background:#45231f;color:#f2a49b}
html[data-theme=dark] .note-warn{background:#3d3220;border-color:#5a4523;color:#f3dfb4}html[data-theme=dark] .note-ok{background:#1f3d2e;border-color:#2c5641}
html[data-theme=dark] .cal-class{background:#1f3d2e;color:#bfead3}html[data-theme=dark] .cal-exam{background:#3d3220;color:#f3dfb4}html[data-theme=dark] .cal-due{background:#45231f;color:#f6c3bc}html[data-theme=dark] .cal-board{background:#1f2c45;color:#c3d3f3}

/* Right-to-left (Urdu / Arabic) */
html[lang=ur] body{font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq",var(--sans);line-height:2.1}
html[lang=ar] body{font-family:"Noto Naskh Arabic",var(--sans);line-height:1.9}
html[lang=ur] h1,html[lang=ur] h2,html[lang=ur] h3,html[lang=ur] h4{font-family:"Noto Nastaliq Urdu",var(--serif);line-height:1.9;letter-spacing:0}
[dir=rtl] .prose ul,[dir=rtl] .prose ol{padding-right:1.4em;padding-left:0}
[dir=rtl] blockquote{border-left:0;border-right:4px solid var(--accent);padding-right:16px;padding-left:0}
[dir=rtl] .a11y-dock{right:auto;left:14px}
[dir=rtl] code,[dir=rtl] pre,[dir=rtl] .mono,[dir=rtl] .katex{direction:ltr;unicode-bidi:isolate}

/* Reports */
.spark{display:flex;align-items:flex-end;gap:3px;height:140px;padding-top:8px}
.spark span{flex:1;min-width:3px;background:linear-gradient(var(--brand-2),var(--brand));border-radius:4px 4px 0 0}
.funnel{display:grid;grid-template-columns:150px 1fr 70px;gap:10px;align-items:center;margin:8px 0;font-size:.92rem}
.funnel div{background:var(--paper-2);border-radius:999px;height:12px;overflow:hidden}.funnel i{display:block;height:100%;background:var(--accent);border-radius:999px}.funnel b{text-align:right}
.qr-box{display:inline-block;background:#fff;padding:8px;border-radius:12px;border:1px solid var(--line);line-height:0}
.or-sep{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.85rem;margin:14px 0}.or-sep::before,.or-sep::after{content:"";flex:1;height:1px;background:var(--line)}
.google-btn{display:flex;gap:10px;align-items:center;justify-content:center}
