.mf-language-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--mf-line,#dbe6f0);font-size:13px;font-weight:700}.mf-language-setting select{font:inherit;border:1px solid var(--mf-line,#dbe6f0);background:var(--mf-surface,#fff);color:inherit;border-radius:9px;padding:8px 12px;min-width:116px}.mf-header-language{font-size:11px;border:1px solid #dbe6f0;border-radius:8px;padding:5px;background:transparent;color:inherit;max-width:105px}[data-theme=dark] .mf-language-setting select{background:#172b43;border-color:#35506e;color:#e2e8f0}
/* Keep source content and geometry in its original coordinate system. */
#cardQuestionText,#cardAnswerMain,#cardDiagramBox,.mf-personal-card summary>span,.mf-personal-card>p,.mf-card-row>div:first-child>strong,.mf-card-row>div:first-child>p,#newCardQuestion,#newCardAnswerMain,#mfPdfAnswer{direction:rtl;unicode-bidi:plaintext}#mfPdfScroll,#mfPdfStage{direction:ltr}#mfPdfWords{direction:rtl}
html[dir=ltr] body{text-align:left}html[dir=ltr] .text-right{text-align:left}html[dir=ltr] .text-left{text-align:right}html[dir=ltr] .mf-table th,html[dir=ltr] .mf-table td{text-align:left}html[dir=ltr] .mf-dialog-close{float:right}
html[dir=ltr] #mfStudentDrawer{margin:0 auto 0 0;left:0;right:auto;border-radius:0 22px 22px 0}html[dir=ltr] .mf-drawer-brand-copy{text-align:left}html[dir=ltr] .mf-drawer-brand-lockup{direction:ltr}html[dir=ltr] .mf-drawer nav button{text-align:left}html[dir=ltr] #mfConnection{left:auto;right:12px}
html[dir=ltr] #topAppHeader.mf-has-menu{padding-right:0;padding-left:0}html[dir=ltr] #mfMenuButton{right:auto}html[dir=ltr] #topAppHeader.mf-has-menu>div:first-of-type{padding-right:0;padding-left:48px}
html[dir=ltr] [dir=rtl]:not([data-no-translate]):not([translate=no]){direction:ltr}html[dir=ltr] .mf-personal-card summary b{text-align:right}html[dir=ltr] .mf-pdf-toolbar{direction:ltr}html[dir=ltr] .mf-drawer-account{text-align:left}
html[dir=ltr] .right-0{right:auto;left:0}html[dir=ltr] .left-0{left:auto;right:0}html[dir=ltr] .right-3{right:auto;left:.75rem}html[dir=ltr] .left-3{left:auto;right:.75rem}html[dir=ltr] .border-r{border-right-width:0;border-left-width:1px}
@media(max-width:480px){.mf-header-language{max-width:85px;font-size:10px}html[dir=ltr] #topAppHeader.mf-has-menu>div:first-of-type{padding-left:42px}}

html[dir=ltr] body{direction:ltr}html[dir=rtl] body{direction:rtl}#topAppHeader.mf-has-menu .mf-header-language{display:none}
/* One-click language toggle: a pill button that switches language directly. */
button.mf-language-toggle{min-height:32px;padding:4px 12px;border:1px solid var(--mf-border,#c9d7e4);border-radius:999px;background:var(--mf-panel,#fff);color:var(--mf-ink,#12304e);font:inherit;font-size:12px;font-weight:800;line-height:1.4;cursor:pointer;white-space:nowrap}
button.mf-language-toggle:hover{border-color:var(--mf-accent,#1974c9);color:var(--mf-accent,#1974c9)}
button.mf-language-toggle:focus-visible{outline:3px solid #378ae6;outline-offset:2px}
