:root{font-family:Inter,"Segoe UI",system-ui,Arial,sans-serif;color:#f0f1ec;background:#101114;font-synthesis:none;--yellow:#f3d84c;--paper:#f0f1ec;--muted:#929499;--border:#2a2d31;--panel:#1b1d21}
*{box-sizing:border-box}html,body{height:100%;margin:0}button,select,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}
.shell{height:100dvh;min-height:340px;display:flex;flex-direction:column;padding:clamp(12px,2vw,32px);gap:12px;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#22231c 0%,#121315 44%,#0f1012 100%)}
.top,.foot{display:flex;justify-content:space-between;align-items:center;gap:18px;flex:none}.top{border-bottom:1px solid var(--border);padding-bottom:14px}.brand{display:flex;align-items:center;gap:10px}.brand strong{font-size:clamp(15px,1.5vw,20px);letter-spacing:-.045em}.brand small{display:block;font-size:9px;letter-spacing:.1em;color:var(--muted);padding-top:3px}.mark{display:flex;align-items:end;gap:4px;background:var(--yellow);color:#0b0c0e;border-radius:11px;padding:10px 9px;font-weight:900;font-size:19px;line-height:1}.mark span{font-size:12px;letter-spacing:0;transform:skew(-5deg);margin-bottom:2px}.header-actions{display:flex;align-items:center;gap:12px}.conn{color:#98cfb6;font-size:12px}.conn.off{color:#e6ac80}select{background:#25272a;border:1px solid #36383c;color:var(--paper);border-radius:9px;padding:9px 11px;max-width:170px}
.app{min-height:0;flex:1;display:grid;place-items:center;overflow:hidden}.center{width:min(100%,760px);max-height:100%;overflow:auto;overscroll-behavior:contain;padding:clamp(16px,3vw,36px);scrollbar-color:#555 transparent}
.eyebrow{font-size:11px;font-weight:700;color:var(--yellow);letter-spacing:.2em;text-transform:uppercase;margin:0 0 16px}.hero{font-size:clamp(36px,5.5vw,76px);letter-spacing:-.075em;line-height:1.04;margin:0 0 18px;font-weight:650}.sub{max-width:540px;color:#b5b7b7;font-size:clamp(13px,1.7vw,17px);line-height:1.55;margin:0 0 26px}.actions{display:flex;gap:12px;flex-wrap:wrap}.btn{background:var(--yellow);color:#111214;border:1px solid var(--yellow);border-radius:11px;padding:13px 21px;min-height:46px;font-weight:700}.btn.secondary{background:transparent;color:var(--paper);border:1px solid #46494d}.btn.small{padding:9px 13px;min-height:38px;font-size:13px}.btn:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffe37a;outline-offset:3px}
.panel{background:#1a1c1fdb;border:1px solid var(--border);border-radius:20px;padding:clamp(18px,3vw,32px);box-shadow:0 18px 100px #0004}.panel h1{font-size:clamp(24px,3vw,38px);line-height:1.15;letter-spacing:-.045em;margin:4px 0 12px}.panel h2{font-size:clamp(19px,2.5vw,25px);letter-spacing:-.04em}.field{display:grid;gap:7px;margin-bottom:14px}.field label{font-size:12px;color:#dadcda}.field input,.field select{width:100%;background:#111215;border:1px solid #404248;border-radius:9px;min-height:43px;color:white;padding:10px 12px}.field input[readonly]{color:#b0b2b6}.field .hint{color:var(--muted);font-size:12px}
.muted{color:var(--muted)}.notice{border-inline-start:3px solid #f3d84c;background:#282719;padding:13px 16px;border-radius:5px;color:#e8ddab;font-size:13px;line-height:1.5}.error{border-inline-start:3px solid #e9948d;background:#341e22;padding:13px 16px;border-radius:5px;color:#ffd0c8;font-size:13px;margin-bottom:14px}.radio{display:flex;align-items:center;gap:9px;line-height:1.4;color:var(--paper);font-size:13px;margin:15px 0}.radio input{accent-color:var(--yellow);width:17px;height:17px;flex:none}
.progress{display:flex;gap:5px;margin-bottom:19px}.progress span{background:#3d3f40;height:5px;border-radius:9px;flex:1}.progress span.on{background:var(--yellow)}.qprompt{font-weight:650;font-size:clamp(20px,2.8vw,30px);letter-spacing:-.035em;line-height:1.25;margin:14px 0 21px}.options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.option{border:1px solid #3c3e42;border-radius:12px;padding:13px 15px;min-height:54px;text-align:start;background:#222428;color:var(--paper)}.option:hover{border-color:#a49a5d}.option.selected{border-color:var(--yellow);background:#35321f}.qhead{display:flex;justify-content:space-between;gap:15px;align-items:center}.tag{border:1px solid #464747;border-radius:50px;padding:6px 11px;font-size:11px;color:#c4c5c2}.reading{max-height:150px;overflow:auto;border-inline-start:2px solid #646557;padding:14px 18px;background:#151719;white-space:pre-wrap;line-height:1.6;font-size:14px}.foot{border-top:1px solid var(--border);padding-top:12px;font-size:10px;color:#707477}.spinner{border:3px solid #393a35;border-top-color:var(--yellow);width:28px;height:28px;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
[dir="rtl"] .eyebrow{letter-spacing:0}[dir="rtl"] .qprompt,[dir="rtl"] .reading{direction:ltr;text-align:left}[dir="rtl"] .field input[type="tel"]{direction:ltr;text-align:left}
@media(max-width:600px){.shell{padding:10px}.top{padding-bottom:10px}.conn{font-size:0}.conn span{display:none}.brand small{font-size:7px}.brand strong{font-size:15px}.center{padding:9px}.panel{padding:17px}.options{grid-template-columns:1fr}.hero{font-size:45px}.qprompt{margin:10px 0}.option{padding:10px;min-height:42px}.app{overflow:hidden}}
@media(max-height:590px){.center{padding:6px}.hero{font-size:clamp(26px,4vw,43px)}.sub{margin-bottom:12px}.panel{padding:14px}.qprompt{font-size:20px;margin:8px 0}.option{min-height:35px;padding:8px}.options{gap:5px}.progress{margin-bottom:10px}.field{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* Private Writing pilot: one-screen editor, never claim locally buffered text is saved. */
.writing-shell{display:flex;flex-direction:column;gap:12px;max-height:min(78dvh,840px);min-height:340px;}
.writing-head{display:flex;justify-content:space-between;gap:12px;align-items:center;}
.writing-body{display:flex;flex-direction:column;flex:1;min-height:0;gap:10px;}
.writing-editor{display:block;box-sizing:border-box;width:100%;flex:1;min-height:150px;resize:none;border:1px solid #444;border-radius:14px;padding:16px;background:#191a1d;color:#f5f5f5;font:inherit;line-height:1.55;direction:ltr;text-align:left;}
.writing-editor:focus{outline:2px solid #f3c948;outline-offset:2px;}
.writing-status{color:#d5d6da;font-size:.9rem;min-height:1.3em;}
.writing-prompts{display:grid;gap:8px;}
.writing-prompt{background:#242528;border:1px solid #424244;border-radius:10px;padding:10px;color:#fff;cursor:pointer;text-align:left;}
.writing-prompt:focus-visible{outline:2px solid #f3c948;}
.writing-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.writing-actions button{flex:1;min-width:110px;}
@media(max-height:600px){.writing-shell{max-height:75dvh;gap:6px;}.writing-editor{min-height:85px;}}
/* Phase 4B: bounded audio controls and word-level Reading highlighting. */
.listening-box{display:grid;gap:10px;border:1px solid var(--border);border-radius:12px;padding:12px 15px;background:#16181b;margin:5px 0 13px}
.listening-box p{font-size:12px;color:#d1d3d4;margin:0;line-height:1.4}
.listening-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.listen-timer{font-variant-numeric:tabular-nums;color:#f4d86b}
.reading-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px;max-height:calc(100dvh - 210px);min-height:0}
.reading-layout .reading{min-height:0;max-height:none;height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:15px}
.reading-layout .reading-question{min-width:0;min-height:0;display:flex;flex-direction:column;gap:8px}
.reading-layout .qprompt{font-size:clamp(16px,2vw,24px);margin:2px 0 7px}
.reading-layout .options{grid-template-columns:1fr;gap:7px}
.reading-layout .option{min-height:36px;padding:8px 10px;font-size:clamp(12px,1.3vw,14px)}
.reading-layout .actions{margin-top:auto!important;justify-content:flex-end}
.highlight-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin-bottom:6px}
.reading-word{cursor:pointer;border-radius:2px;outline-offset:2px}
.reading-word:focus-visible{outline:2px solid #f3d84c}
.reading-word.hi-yellow{background:#e3cc50;color:#151515}
.reading-word.hi-blue{background:#80b8e6;color:#151515}
.reading-word:hover{box-shadow:inset 0 -1px 0 #e3cc50}
@media(max-width:650px){.reading-layout{grid-template-columns:1fr;grid-template-rows:minmax(95px,1fr) minmax(235px,1.3fr);max-height:calc(100dvh - 185px)}.reading-layout .reading{font-size:12px;padding:10px}.reading-layout .reading-question{overflow:auto}.reading-layout .option{padding:6px;min-height:30px}}

.center:has(.reading-panel){width:min(100%,1190px);max-width:1190px;overflow:hidden}
.reading-panel{max-height:100%;overflow:hidden;display:flex;flex-direction:column}
.reading-container{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.reading-container .reading{flex:1;min-height:0}
/* Phase 4C: real microphone capture, no illustrative fake waveform. */
.speaking-shell{width:min(100%,750px);display:flex;flex-direction:column;gap:10px;max-height:calc(100dvh - 195px);overflow:auto}
.speaking-shell .sub{margin-bottom:5px}.speaking-shell .qprompt{margin:7px 0;font-size:clamp(18px,2.5vw,26px)}
.speaking-count{font-variant-numeric:tabular-nums;color:var(--yellow)}
.speaking-player{width:100%;height:44px}.speaking-shell .actions{gap:8px}
.speaking-shell .btn{padding:9px 12px;font-size:13px}
/* Approved Listening: dark graphite, monochrome controls and restrained signature yellow. */
.center:has(.listening-panel){width:min(100%,1080px);max-width:1080px;overflow:auto}
.listening-panel{width:100%;max-height:100%;overflow:auto}
.lm-listen-shell{border:1px solid #3a3c40;border-radius:17px;background:radial-gradient(circle at 78% 3%,#292819 0%,#161719 48%,#141518 100%);display:flex;flex-direction:column;gap:0;padding:18px 20px;margin:4px 0 16px;position:relative;isolation:isolate;min-height:238px}
.lm-listen-head{display:flex;justify-content:space-between;gap:15px;align-items:center;border-bottom:1px solid #303134;padding-bottom:12px}
.lm-listen-accent{display:inline-flex;align-items:center;border:1px solid #4d4c3c;border-radius:9px;padding:7px 12px;font-size:13px;color:#f5e99a;font-weight:680;background:#2d2b20}
.lm-listen-attempt{font-size:11px;color:#b0b1b4;letter-spacing:.09em;font-variant-numeric:tabular-nums}
.lm-listen-center{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:170px;padding:15px 5px;text-align:center}
.lm-listen-overline{font-size:10px;font-weight:800;letter-spacing:.16em;color:#e0cb48}
.lm-listen-title{font-size:clamp(17px,2.4vw,22px);font-weight:720;letter-spacing:-.045em;color:#faf9f1}
.lm-listen-note{font-size:12px;line-height:1.5;color:#adb0af;max-width:400px;margin:0 0 5px}
.lm-listen-ring{width:93px;height:93px;border-radius:50%;border:1px solid #6d6534;box-shadow:0 0 0 10px #d8c13b0a,0 0 0 19px #d8c13b06;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#252419}
.lm-listen-seconds{color:#fbe358;font-size:39px;line-height:1;font-weight:780;font-variant-numeric:tabular-nums}
.lm-listen-seclabel{font-size:9px;letter-spacing:.14em;color:#b1ac83}
.lm-gold-btn,.lm-secondary-btn{border-radius:10px;padding:10px 17px;min-height:43px;font-weight:750;font-size:13px;cursor:pointer;max-width:100%}
.lm-gold-btn{border:1px solid #f2d740;background:#f2d740;color:#161616}
.lm-gold-btn:hover{background:#ffea6b}.lm-secondary-btn{border:1px solid #5c5d60;background:#262729;color:#f6f5f1}
.lm-secondary-btn:hover{background:#36373a}
.lm-listen-choices{display:flex;gap:9px;justify-content:center;flex-wrap:wrap;margin-top:3px}
.lm-listen-check{color:#f2d740;font-size:38px;font-weight:700}
.lm-listen-wave{display:flex;align-items:center;justify-content:center;gap:3px;height:70px;width:min(100%,290px)}
.lm-listen-wave span{width:4px;border-radius:8px;background:#f7dc4e;animation:lm-wave-pulse 1.2s ease-in-out infinite alternate}
.lm-listen-wave span:nth-child(3n){animation-delay:-.8s}.lm-listen-wave span:nth-child(4n){animation-delay:-.4s}
@keyframes lm-wave-pulse{from{transform:scaleY(.5)}to{transform:scaleY(1.1)}}
.lm-listen-error{font-size:12px;color:#ffe0d0;border:1px solid #9b5656;background:#432c2c;border-radius:8px;padding:9px 12px}
.lm-listen-foot{padding:11px 0 0;border-top:1px solid #303134;font-size:10px;color:#939393;text-align:center;min-height:24px}
@media(max-height:640px){.lm-listen-shell{min-height:180px;padding:10px 12px}.lm-listen-center{min-height:105px;padding:8px}.lm-listen-ring{width:60px;height:60px}.lm-listen-seconds{font-size:28px}.lm-listen-wave{height:35px}}
@media(prefers-reduced-motion:reduce){.lm-listen-wave span{animation:none}}
/* Landscape tablet: reserve separate readable surfaces for question and live audio. */
.listening-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.92fr);gap:17px;align-items:stretch;min-height:0}
.listen-question-col{display:flex;flex-direction:column;min-width:0;gap:10px}
.listen-question-col .qprompt{font-size:clamp(17px,2vw,25px);margin:2px 0 8px}
.listen-question-col .options{display:flex;flex-direction:column;gap:8px}
.listen-question-col .option{min-height:47px}
.listen-question-col .actions{margin-top:auto}
.listen-question-col .actions .btn{width:100%}
.listening-grid .lm-listen-shell{margin:0;min-height:330px;justify-content:space-between}
@media(max-width:730px){.listening-grid{grid-template-columns:1fr}.listening-grid .lm-listen-shell{min-height:245px;grid-row:1}.listen-question-col{grid-row:2}.listening-panel{overflow-y:auto}}
@media(max-height:650px) and (min-width:731px){.listening-grid .lm-listen-shell{min-height:220px}.listen-question-col .option{min-height:35px;padding:7px}}

.brand-official{object-fit:cover;display:block;padding:0;border-radius:11px;width:41px;height:41px;flex:none;background:#ffe000}

/* Phase 6A.6.2A — full-tablet workspace, legibility and honest activity feedback. */
.center:has(.speaking-panel),.center:has(.writing-panel),.center:has(.listening-panel),.center:has(.reading-panel){width:min(100%,1440px);max-width:1440px;padding:clamp(9px,1.5vw,18px);}
.speaking-panel,.writing-panel,.listening-panel,.reading-panel{width:100%;max-height:100%;min-width:0;overflow:hidden;}
.speaking-shell{width:100%;max-height:100%;overflow:hidden;gap:clamp(5px,1vw,10px)}
.speaking-shell>.sub{max-width:100%;font-size:clamp(13px,1.25vw,17px);margin-bottom:4px}
.speaking-shell>.notice{margin:0;font-size:11px}
.speaking-shell h1{font-size:clamp(24px,2.5vw,34px);margin:0}
.speaking-shell>.eyebrow{margin:0}
.speaking-workspace{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(345px,0.9fr);gap:clamp(12px,2vw,28px);min-height:0;flex:1}
.speaking-prompt-pane,.speaking-record-pane{min-width:0;border-radius:18px;border:1px solid #34363b;background:#17191c;padding:clamp(14px,2vw,26px);display:flex;flex-direction:column;gap:12px;justify-content:center}
.speaking-prompt-pane .eyebrow{margin:0}.speaking-prompt-pane .qprompt{font-size:clamp(24px,3vw,40px);line-height:1.24;max-width:40ch;font-weight:650}
.speaking-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.speaking-actions .btn{min-height:44px;font-size:clamp(12px,1.1vw,15px);white-space:normal}
.speaking-actions .btn:nth-last-child(2){grid-column:1/-1}
.speaking-play-label{display:flex;flex-direction:column;gap:5px;color:#e8e8ea;font-weight:650;font-size:13px}
.speaking-player{width:100%;height:46px}
.speaking-rec-indicator{display:flex;justify-content:center;align-items:center;gap:12px;min-height:65px;background:#202126;border:1px solid #34363c;border-radius:12px}
.speaking-rec-dot{width:11px;height:11px;border-radius:50%;background:#777;box-shadow:0 0 0 4px #6662}
.speaking-rec-indicator:has(.is-recording) .speaking-rec-dot{background:#f55;box-shadow:0 0 0 5px #ff4c4c26;animation:lm-record-dot 1.2s ease-in-out infinite}
.speaking-wave{height:49px;display:flex;align-items:center;justify-content:center;gap:4px}
.speaking-wave span{display:block;width:5px;height:var(--base);border-radius:6px;background:#74777c;transform:scaleY(.35);transition:transform 105ms ease,background 130ms ease}
.speaking-wave.is-recording span{background:#f7d94a;transform:scaleY(calc(.38 + var(--signal)*.16))}
.speaking-wave.is-recording span:nth-child(3n){transform:scaleY(calc(.22 + var(--signal)*.22))}
@keyframes lm-record-dot{50%{opacity:.3}}
.writing-shell{max-height:100%;min-height:0;gap:clamp(8px,1.2vh,16px)}
.writing-panel{display:flex;flex-direction:column;height:min(100%,880px)}
.writing-panel .eyebrow{margin:0}.writing-panel h1{margin:0}
.writing-prompt-text{font-size:clamp(18px,2vw,25px);line-height:1.48;color:#f7f6ee;margin:0;max-height:30%;overflow:auto;flex:none}
.writing-editor{font-family:Inter,"Segoe UI",system-ui,Arial,sans-serif;font-size:clamp(19px,2.05vw,25px);line-height:1.62;letter-spacing:.005em;padding:clamp(16px,2vw,25px);min-height:210px;max-height:none}
.writing-status{font-size:clamp(12px,1.2vw,15px)}
.lm-listen-live-indicator{display:inline-flex;align-items:center;justify-content:center;gap:10px;font-size:clamp(12px,1.5vw,16px);font-weight:780;letter-spacing:.1em;color:#f3e376}
.lm-live-dot{display:inline-block;width:12px;height:12px;border-radius:50%;background:#f3d84c;box-shadow:0 0 0 5px #f3d84c22;animation:lm-record-dot 1s ease-in-out infinite}
.lm-listen-wave.is-paused span{animation-play-state:paused;opacity:.55}
.lm-listen-wave.is-playing span{animation-duration:.7s}
@media(max-width:740px){.speaking-workspace{grid-template-columns:1fr}.speaking-panel{overflow:auto}.speaking-shell{overflow:visible;max-height:none}.speaking-prompt-pane,.speaking-record-pane{padding:15px}.speaking-prompt-pane .qprompt{font-size:clamp(21px,4vw,30px)}.writing-editor{font-size:19px}.writing-prompt-text{font-size:18px}}
@media(max-height:590px) and (min-width:741px){.speaking-shell>.sub{display:none}.speaking-shell>.notice{display:none}.speaking-workspace{gap:10px}.speaking-prompt-pane,.speaking-record-pane{padding:10px;gap:5px}.speaking-actions .btn{min-height:35px;padding:6px}.speaking-rec-indicator{min-height:40px}.speaking-wave{height:38px}.writing-editor{min-height:110px}}
@media(prefers-reduced-motion:reduce){.speaking-wave span,.speaking-rec-dot,.lm-live-dot{animation:none!important;transition:none!important}}

/* Reading word highlights: small, accessible six-color palette in a local-only popover. */
:root{--highlight-yellow:#f8da59;--highlight-blue:#8ed0f6;--highlight-green:#85dfa2;--highlight-pink:#f4a0c7;--highlight-orange:#f9b36b;--highlight-violet:#c1adff}
.reading-word.hi-yellow{background:var(--highlight-yellow)}.reading-word.hi-blue{background:var(--highlight-blue)}
.reading-word.hi-green{background:var(--highlight-green);color:#111}.reading-word.hi-pink{background:var(--highlight-pink);color:#111}.reading-word.hi-orange{background:var(--highlight-orange);color:#111}.reading-word.hi-violet{background:var(--highlight-violet);color:#111}
.reading-palette-host{position:relative;display:inline-flex;align-items:center}
.highlight-trigger{display:inline-flex;align-items:center;gap:8px}
.highlight-trigger:before{content:'';display:inline-block;width:14px;height:14px;background:var(--selected-highlight,var(--highlight-yellow));border-radius:50%;border:1px solid #fff6}
.reading-color-palette{position:absolute;z-index:12;top:calc(100% + 6px);inset-inline-start:0;display:grid;grid-template-columns:repeat(3,minmax(56px,1fr));gap:7px;background:#242629;border:1px solid #64666a;padding:10px;border-radius:12px;box-shadow:0 16px 40px #0008;min-width:210px}
.reading-color-palette[hidden]{display:none}
.reading-color-swatch{background:var(--highlight-yellow);border:2px solid transparent;border-radius:8px;height:43px;color:#141414;cursor:pointer;font-size:10px;font-weight:700}
.reading-color-swatch[aria-pressed=true]{outline:2px solid #f4d54b;outline-offset:2px}
.reading-color-swatch.swatch-yellow{background:var(--highlight-yellow)}.reading-color-swatch.swatch-blue{background:var(--highlight-blue)}.reading-color-swatch.swatch-green{background:var(--highlight-green)}.reading-color-swatch.swatch-pink{background:var(--highlight-pink)}.reading-color-swatch.swatch-orange{background:var(--highlight-orange)}.reading-color-swatch.swatch-violet{background:var(--highlight-violet)}
/* Only display actions that apply to the current recording step. */
.speaking-actions .btn[hidden]{display:none}
.speaking-panel{padding:clamp(12px,1.5vw,18px)}
.speaking-workspace{flex:initial}
.speaking-shell>.notice{font-size:10px;padding:5px 10px;min-height:0}
.speaking-shell>.sub{font-size:13px;line-height:1.2;margin:0}
.speaking-panel .speaking-prompt-pane,.speaking-panel .speaking-record-pane{padding:clamp(12px,1.3vw,18px)}
.speaking-rec-indicator{min-height:53px}
.speaking-record-pane{gap:8px}
.speaking-actions .btn{min-height:44px}
.speaking-actions .btn:last-child{grid-column:1/-1}

/* Phase 6A.6.2B: locally bundled image flags and accessible premium locale switcher. */
.language-picker{position:relative;isolation:isolate;flex:none}
.language-trigger{display:inline-flex;align-items:center;gap:10px;justify-content:space-between;min-width:154px;max-width:230px;min-height:47px;padding:8px 11px;background:linear-gradient(145deg,#292b2b,#1d1e21);border:1px solid #4d4e43;border-radius:13px;color:#f2f2ed;box-shadow:inset 0 1px 0 #ffffff14,0 5px 15px #0003;font-size:14px;font-weight:680;letter-spacing:.015em;transition:border-color .2s,background .2s,transform .2s}
.language-trigger:hover{border-color:#e1c450;background:#2c2d2c}.language-trigger:active{transform:translateY(1px)}
.language-trigger:focus-visible,.language-option:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}
.language-flag{display:block;width:29px;height:20px;object-fit:cover;flex:none;border-radius:3px;box-shadow:0 0 0 1px #ffffff35}
.language-chevron{color:#f3d84c;margin-inline-start:auto;font-weight:700;font-size:18px}
.language-menu{position:absolute;z-index:50;inset-block-start:calc(100% + 9px);inset-inline-end:0;width:min(242px,calc(100vw - 26px));border:1px solid #45473f;border-radius:15px;padding:7px;background:#202225;box-shadow:0 22px 60px #000a,0 0 0 1px #ffffff0c;max-height:min(340px,65dvh);overflow:auto}
.language-menu[hidden]{display:none!important}
.language-option{display:flex;align-items:center;gap:12px;width:100%;min-height:47px;padding:9px 11px;border:0;border-radius:9px;background:transparent;color:#f1f0ec;font-size:15px;line-height:1.3;font-weight:620;text-align:start;transition:background .15s}
.language-option:hover,.language-option:focus-visible{background:#36372e}
.language-option[aria-checked="true"]{background:#353321;color:#ffe78b}
.language-selected{margin-inline-start:auto;opacity:0;color:#f4d84c;font-size:17px}
.language-option[aria-checked="true"] .language-selected{opacity:1}
.language-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;clip-path:inset(50%)!important;overflow:hidden!important;inset:0 auto auto 0!important}
[dir="rtl"] .language-option{direction:auto;text-align:start}
[dir="rtl"] .language-menu{inset-inline-end:0}
[dir="rtl"] .qprompt[lang="en"],[dir="rtl"] .writing-prompt-text,[dir="rtl"] .reading-text{direction:ltr;text-align:left}
@media (max-width:520px){.language-trigger{min-width:112px;gap:7px;padding:7px 9px;font-size:12px}.language-flag{width:27px;height:18px}.header-actions{gap:8px}}
@media(prefers-reduced-motion:reduce){.language-trigger,.language-option{transition:none!important}}

/* Keep all assessment items in their source language while RTL interface chrome flips. */
[dir="rtl"] .options,[dir="rtl"] .reading-question,[dir="rtl"] .listen-question-col .options{direction:ltr;text-align:left}
[dir="rtl"] .option[lang="en"]{text-align:left}
[lang="ar"] .language-option,[lang="ar"] .language-trigger,[lang="fa"] .language-option,[lang="fa"] .language-trigger{font-family:"Noto Sans Arabic","Noto Naskh Arabic",Tahoma,sans-serif;font-weight:650}

/* 6A.6.2C: fixed tablet geometry; bidi applies to interface copy only. */
html[data-ui-direction="rtl"] .panel :is(h1, .eyebrow, .sub, .notice, .field label, .writing-status, .writing-shell .muted, .speaking-shell .muted, .speaking-shell .sub, .highlight-tools, .error),
html[data-ui-direction="rtl"] .center > :is(.hero, .eyebrow, .sub, .notice) {direction:rtl;text-align:right;unicode-bidi:plaintext}
html[data-ui-direction="rtl"] :is(.language-trigger, .language-option) > span:not(.language-chevron):not(.language-selected) {direction:rtl;unicode-bidi:plaintext;text-align:right}
/* Brand, progress, buttons, controls, questions, timestamps and grid columns stay anchored. */
.language-trigger {direction:ltr;justify-content:flex-start;align-items:center}
.language-chevron {display:block;flex:none;box-sizing:border-box;width:8px;height:8px;border-right:2px solid #f3d84c;border-bottom:2px solid #f3d84c;transform:rotate(45deg) translateY(-2px);margin-inline-start:auto;margin-inline-end:5px;line-height:0;font-size:0}
.language-option {direction:ltr;align-items:center}
.language-option>span:first-of-type {min-width:0;flex:1}
.language-selected {margin-inline-start:auto;flex:none}
.language-flag {object-fit:contain;aspect-ratio:7/4;width:29px;height:20px;background:transparent}
html[data-ui-direction="rtl"] .field input:not([type="checkbox"]),html[data-ui-direction="rtl"] .field select {direction:ltr;text-align:left}
html[data-ui-direction="rtl"] .field input[readonly] {unicode-bidi:isolate}
.lm-listen-seconds,.speaking-count,.listen-timer,.qhead,.lm-listen-attempt {font-variant-numeric:lining-nums tabular-nums}
