/* ---------- Audio strip ---------- */
.audio-strip{flex:0 0 auto;display:flex;align-items:center;gap:12px;background:#FFFFFF;border:1px solid #DFE2E6;border-radius:12px;padding:6px 12px;margin-bottom:8px}
.audio-ic{width:34px;height:34px;min-width:34px;border-radius:9px;background:#343B46;color:#fff;display:grid;place-items:center;font-size:17px}
.audio-label{font-size:13px;font-weight:800;white-space:nowrap}
.audio-strip audio{flex:1;min-width:0;height:38px}
.speed-label{font-size:12px;color:#5F6872;white-space:nowrap}
.speed-select{border:1px solid #DFE2E6;border-radius:8px;padding:6px 8px;background:#fff;font-size:13px;font-weight:700}
.audio-status{font-size:12px;color:#5F6872;white-space:nowrap;min-width:86px}
.audio-defect-note{font-size:13px;line-height:1.5;color:#6B4E16;background:#FFF8E1;border:1px solid #F0D9A0;border-radius:10px;padding:8px 12px;margin-bottom:8px}

/* ---------- Lesson layout ---------- */
.lesson-layout{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1.2fr;gap:12px;align-items:stretch}
.source-col{min-width:0;min-height:0;overflow-y:auto;padding-right:4px;scrollbar-width:thin;scrollbar-color:#DFE2E6 transparent}
.function-col{min-width:0;min-height:0;overflow-y:auto;padding-right:4px;scrollbar-width:thin;scrollbar-color:#DFE2E6 transparent}
.doc-head{padding:2px 2px 10px;border-bottom:1px solid #DFE2E6;margin-bottom:12px}
.doc-head h2{margin:0;font-size:19px;line-height:1.25;letter-spacing:-.01em}
.doc-head .doc-inst{margin-top:4px;font-size:13px;color:#5F6872}

/* ---------- Right panel ---------- */
.sv-panel{background:#fff;border:1px solid #DFE2E6;border-radius:18px;padding:12px;min-height:390px}
.thinking-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.step-pill{font-size:11px;font-weight:900;letter-spacing:.08em;background:#343B46;color:#fff;border-radius:999px;padding:5px 11px;white-space:nowrap}
.step-pill.done-pill{background:#27624F}
.thinking-head .qpos{font-size:12px;font-weight:800;color:#5F6872;letter-spacing:.05em;white-space:nowrap}
.ed-index{display:grid;grid-template-columns:84px 1fr;gap:12px;padding:10px 2px 12px;border-top:3px solid #171717;border-bottom:1px solid #DFE2E6;margin-bottom:12px}
.ed-num{font-size:56px;line-height:1;font-weight:700;letter-spacing:-.03em}
.ed-of{font-size:12px;color:#5F6872;margin-top:4px;font-weight:600}
.ed-type{font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#5F6872}
.ed-stem{font-size:20px;line-height:1.3;font-weight:700;margin-top:3px;overflow-wrap:break-word}
.ed-inst{font-size:13px;color:#5F6872;margin-top:4px}
.sv-body h3{margin:2px 0 4px;font-size:17px;line-height:1.3}
.sv-help{font-size:13.5px;color:#5F6872;margin:0 0 12px}
.sv-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.sv-btn{border-radius:999px;min-height:40px;padding:8px 18px;font-size:13.5px;font-weight:800;border:1px solid #DFE2E6;background:#fff;color:#171717}
.sv-btn.primary{background:#343B46;border-color:#343B46;color:#fff}
.sv-btn.primary:hover{background:#272D35}
.sv-btn:disabled{opacity:.45;cursor:default}
.fb{margin-top:12px;padding:10px 12px;border-radius:10px;font-size:13.5px;line-height:1.5}
.fb.ok{background:#E6F1EB;color:#27624F}
.fb.bad{background:#F9EBEC;color:#9F3134}
.fb.info{background:#EAF1F6;color:#294E6B}
.fb.warn{background:#F8F0E4;color:#825D26}
.fb b{font-weight:900}
.hint-box{margin-top:10px;padding:10px 12px;border-left:3px solid #294E6B;background:#EAF1F6;color:#294E6B;font-size:13.5px;border-radius:0 10px 10px 0}
.ref-box{margin-top:10px;padding:12px;border:1px solid #DFE2E6;border-radius:12px;background:#F3F4F5;font-size:13.5px}
.ref-box h4{margin:0 0 6px;font-size:13px;text-transform:uppercase;letter-spacing:.08em}
details.principle{margin-top:16px;border-top:1px solid #DFE2E6;padding-top:10px}
details.principle summary{font-size:13px;font-weight:800;cursor:pointer;color:#343B46}
details.principle p{font-size:13px;color:#5F6872;margin:6px 0 2px}

/* ---------- Fields ---------- */
.field{margin-bottom:12px}
.field label{display:block;font-size:13.5px;font-weight:700;margin-bottom:5px}
.field textarea{width:100%;border:1px solid #DFE2E6;border-radius:8px;padding:9px 10px;font-size:14px;line-height:1.5;resize:vertical;min-height:44px;background:#fff;color:#171717}
.field textarea:focus{border-color:#343B46}
.radio-row{display:flex;gap:8px;flex-wrap:wrap}
.radio-chip{border:1px solid #DFE2E6;background:#fff;border-radius:999px;padding:8px 14px;font-size:13.5px;font-weight:700}
.radio-chip.selected{background:#343B46;border-color:#343B46;color:#fff}
.check-line{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:600;margin-bottom:10px}
.check-line input{width:18px;height:18px;accent-color:#343B46}

/* ---------- Answer options ---------- */
.opt-list{display:grid;gap:8px}
.opt-btn{display:flex;gap:10px;align-items:flex-start;text-align:left;width:100%;border:1px solid #DFE2E6;background:#fff;border-radius:12px;padding:11px 13px;font-size:15px;line-height:1.45;color:#171717}
.opt-btn:hover{border-color:#343B46}
.opt-btn .opt-key{font-weight:900;flex:0 0 auto}
.opt-btn.selected{border:2px solid #343B46;background:#F3F4F5;padding:10px 12px}
.opt-btn:disabled{cursor:default}
.letter-row{display:flex;gap:12px;flex-wrap:wrap}
.letter-btn{width:58px;height:58px;border-radius:14px;border:1px solid #DFE2E6;background:#fff;font-size:22px;font-weight:900;color:#171717}
.letter-btn:hover{border-color:#343B46}
.letter-btn.selected{background:#343B46;border-color:#343B46;color:#fff}

/* ---------- Source column: photos / questions / passage ---------- */
.photo{border:1px solid #DFE2E6;border-radius:12px;overflow:hidden;margin-bottom:12px;background:#fff}
.photo img{display:block;width:100%;height:auto}
.photo.active{outline:3px solid #343B46;outline-offset:1px}
.photo-label{padding:6px 10px;font-size:12px;font-weight:800;background:#F3F4F5;color:#343B46}
.listen-card{border:1px solid #DFE2E6;border-radius:12px;padding:26px 18px;text-align:center;background:#fff}
.listen-card .big-note{font-size:40px;color:#343B46}
.listen-card p{color:#5F6872;font-size:14px;margin:10px 0 0}
.pq{border:1px solid #DFE2E6;border-radius:12px;padding:10px 12px;margin-bottom:8px;background:#fff}
.pq.active{border-color:#343B46;box-shadow:inset 3px 0 0 #343B46}
.pq .pq-stem{font-size:14.5px;font-weight:700;line-height:1.4}
.pq .pq-opts{margin:7px 0 0;padding:0;list-style:none;font-size:13.5px;color:#343B46;line-height:1.6}
.pq .pq-opts b{font-weight:900}
.graphic{border:1px solid #DFE2E6;border-radius:12px;padding:12px 14px;margin-bottom:12px;background:#fff}
.graphic table{width:100%;border-collapse:collapse;font-size:13.5px}
.graphic th,.graphic td{border:1px solid #DFE2E6;padding:6px 9px;text-align:left;vertical-align:top}
.graphic th{background:#F3F4F5}
.graphic .g-foot{margin-top:8px;font-size:13px;color:#5F6872}
/* ---------- Tai lieu (doc-render, 18/11) ---------- */
.graphic .doc-title{font-weight:900;font-size:15px;line-height:1.35;margin-bottom:6px;white-space:pre-line}
.graphic .doc-sub{font-size:13.5px;color:#5F6872;line-height:1.45;margin-bottom:2px;white-space:pre-line}
.graphic .doc-sub.doc-banner{display:inline-block;background:#FDE9E1;color:#D93F1C;font-weight:800;padding:3px 10px;border-radius:999px;margin:2px 0 4px}
.graphic .doc-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.graphic .doc-chip{display:inline-block;background:#F3F4F5;border:1px solid #DFE2E6;border-radius:8px;padding:4px 9px;font-size:13px;font-weight:700;line-height:1.35;white-space:pre-line}
.graphic table.doc-table tbody tr:nth-child(even) td{background:#FAFAF8}
.graphic td.doc-col-time,.graphic th.doc-col-time{font-weight:700;white-space:nowrap}
.graphic td.doc-col-cur,.graphic th.doc-col-cur{text-align:right;font-variant-numeric:tabular-nums}
.graphic td.doc-col-code,.graphic th.doc-col-code{font-weight:700;letter-spacing:.04em;white-space:nowrap}
.g-list .kv-k{font-weight:800}
.g-list li.doc-axis{color:#5F6872;font-size:12.5px}
.g-list.L-steps{counter-reset:docstep;list-style:none;padding-left:0}
.g-list.L-steps li{padding-left:26px}
.g-list.L-steps li.doc-step{counter-increment:docstep}
.g-list.L-steps li.doc-step::before{content:counter(docstep) ".";position:absolute;left:0;font-weight:800}
.g-list.L-steps li{position:relative}
.g-list li.doc-total{font-weight:800;border-top:1px solid #DFE2E6;padding-top:4px;margin-top:4px}
.doc-map{display:grid;gap:6px;margin-bottom:10px}
.doc-box{border:1px solid #DFE2E6;border-radius:8px;background:#F8F9F9;padding:8px 10px;font-size:13px;font-weight:700;line-height:1.4;text-align:center;min-width:0}
.doc-box.title{background:#343B46;color:#fff;border-color:#343B46;font-size:14px;font-weight:900}
.doc-box.road{background:#EAF1F6;border-style:dashed}
.doc-box.dashed{border-style:dashed}
.doc-box.oval{border-radius:50%}
.doc-box.avail{background:#EAF1F6}
.doc-box.ring{width:56px;height:56px;justify-self:center;align-self:center;border:2px solid #343B46;border-radius:50%;background:transparent;padding:0}
.doc-box.x{position:relative}
.doc-box.x::after{content:"✕";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:900;color:#D93F1C;pointer-events:none}


/* ---------- Repair ---------- */
.repair{border-top:3px solid #171717;margin-top:16px;padding-top:12px}
.repair h4{margin:0 0 4px;font-size:16px}
.repair .rep-sub{font-size:13px;color:#5F6872;margin:0 0 12px}
.trap-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:12px}
.trap-item{display:flex;gap:8px;align-items:center;border:1px solid #DFE2E6;border-radius:9px;padding:8px 10px;font-size:13.5px;font-weight:600;cursor:pointer}
.trap-item input{width:16px;height:16px;accent-color:#343B46;flex:0 0 auto}
.trap-item.checked{border-color:#343B46;background:#F3F4F5}
.repair select{width:100%;border:1px solid #DFE2E6;border-radius:8px;padding:9px 10px;background:#fff;font-size:14px;margin-bottom:12px}
.repair .rep-note label{font-size:13px;font-weight:700}
.repair .rep-note textarea{width:100%;border:1px solid #DFE2E6;border-radius:8px;padding:8px 10px;font-size:13.5px;resize:vertical;min-height:40px;margin:4px 0 10px}
#gate-banner{position:fixed;top:0;left:0;right:0;z-index:300;background:#9F3134;color:#fff;text-align:center;padding:9px 14px;font-size:13.5px;font-weight:800}
.retry-status{font-size:13px;color:#5F6872;margin:8px 0 0}
.retry-status b{color:#171717}

/* ---------- Done screen ---------- */
.done-block h3{font-size:19px;margin:2px 0 10px}
.answer-line{margin:0 0 4px;font-size:13px;color:#5F6872;font-weight:700;letter-spacing:.05em;text-transform:uppercase}
.answer-value{font-size:22px;font-weight:700;color:#27624F;line-height:1.3;margin:0 0 14px}
.proc-line{font-size:13.5px;color:#5F6872;margin:0 0 16px}
.proc-line b{color:#171717}

/* ---------- Bottom nav ---------- */
.bottom-nav{position:fixed;left:0;right:0;bottom:0;height:40px;z-index:120;background:#FFFFFF;border-top:1px solid #DFE2E6}
.bottom-nav-inner{height:100%;margin:0 auto;padding:6px 14px;display:flex;align-items:center}
.bottom-question-strip{display:flex;align-items:center;gap:3px;width:100%;min-width:0;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.bottom-q{width:25px;height:25px;min-width:25px;flex:0 0 auto;border-radius:50%;border:1px solid #DFE2E6;background:#F3F4F5;color:#171717;font-size:8px;font-weight:900;display:grid;place-items:center;padding:0}
.bottom-q:hover{border-color:#343B46}
.bottom-q.done{background:#FFFFFF;border-color:#343B46;color:#343B46}
.bottom-q.wrong{background:#FFFFFF;border-color:#9F3134;color:#9F3134}
.bottom-q.active{background:#343B46;border-color:#343B46;color:#fff}

/* ---------- Bang loi thoai (chi sua loi thi thu) ---------- */
.spoken-panel{border:1px solid #DFE2E6;border-radius:12px;background:#fff;padding:12px 14px;margin-top:12px}
.spoken-panel h4{margin:0 0 4px;font-size:15px}
.spoken-note{margin:0 0 10px;font-size:13px;color:#5F6872;line-height:1.55}
.spoken-text{font-size:14.5px;line-height:1.7;color:#171717}

/* ---------- Thi thu ---------- */
.ex-start{width:min(720px,calc(100% - 64px));margin:0 auto;padding:28px 0 40px}
.ex-start h1{font-size:clamp(30px,4vw,44px);line-height:1.1;letter-spacing:-.03em;margin:0 0 10px}
.ex-meta{font-size:14px;color:#5F6872;margin:0 0 18px}
.ex-copy{font-size:16px;line-height:1.7;color:#343B46;max-width:600px}
.ex-save-note{font-size:13px;color:#5F6872;margin:0 0 14px}
.ex-actions{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0 8px}
.ex-btn{border:1px solid #DFE2E6;background:#fff;border-radius:999px;padding:10px 20px;min-height:44px;font-size:14px;font-weight:800;color:#171717}
.ex-btn:hover{border-color:#343B46}
.ex-btn:disabled{opacity:.45;cursor:default}
.ex-btn-primary{background:#343B46;border-color:#343B46;color:#fff}
.ex-btn-primary:hover{background:#272D35}
.ex-btn-big{padding:12px 26px;font-size:15px}
.ex-entry-error{background:#F9EBEC;color:#9F3134;border-radius:10px;padding:10px 14px;font-size:14px;font-weight:700;margin:0 0 12px}
.ex-warn{background:#F8F0E4;color:#825D26;border-radius:10px;padding:10px 14px;font-size:14px;margin:0 0 12px}
.ex-start-picker{margin-bottom:18px}
.ex-picker{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:700;color:#5F6872}
.ex-picker select{padding:9px 12px;min-height:42px;border:1px solid #DFE2E6;border-radius:9px;background:#fff;color:#171717;font-size:14px}
.ex-reset-inline{border:1px solid #DFE2E6;border-radius:12px;padding:14px 16px;margin-top:18px;background:#fff}
.ex-reset-inline p{margin:0 0 4px;font-size:14px;line-height:1.6}
.ex-back-row{margin-top:26px}
.ex-shell{flex:1;min-height:0;display:flex;flex-direction:column}
.ex-head{flex:0 0 auto;display:flex;align-items:center;gap:14px;background:#FFFFFF;border:1px solid #DFE2E6;border-radius:12px;padding:7px 12px;margin-bottom:8px;flex-wrap:wrap}
.ex-head-left{display:flex;align-items:center;gap:10px;min-width:0}
.ex-head-mid{flex:0 0 auto}
.ex-head-right{display:flex;align-items:center;gap:8px;margin-left:auto}
.ex-head-btn{border:1px solid #DFE2E6;background:#fff;border-radius:999px;padding:7px 14px;font-size:13px;font-weight:800;color:#171717;white-space:nowrap}
.ex-head-btn:hover{border-color:#343B46}
.ex-head-btn:disabled{opacity:.45;cursor:default}
.ex-notes-count{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:#9F3134;color:#fff;font-size:11px;font-weight:900;margin-left:3px}
.ex-player{flex:1;min-width:220px;display:flex;align-items:center;gap:12px}
.ex-progress{flex:1;min-width:80px;height:8px;border-radius:999px;background:#F3F4F5;border:1px solid #DFE2E6;overflow:hidden}
.ex-progress-fill{height:100%;background:#343B46;width:0%}
.ex-pos{font-size:13px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.ex-countdown{font-size:14px;font-weight:900;white-space:nowrap;font-variant-numeric:tabular-nums;color:#294E6B}
.ex-vol{display:flex;align-items:center;gap:7px;font-size:12px;color:#5F6872;white-space:nowrap;font-weight:700}
.ex-vol input{width:90px;accent-color:#343B46}
.ex-review-label{font-size:13px;font-weight:800;color:#5F6872;white-space:nowrap}
.ex-score-pill{font-size:13px;font-weight:900;background:#343B46;color:#fff;border-radius:999px;padding:6px 13px;white-space:nowrap}
.ex-banner{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px;background:#F9EBEC;color:#9F3134;border-radius:10px;padding:10px 14px;font-size:13.5px;line-height:1.55;margin-bottom:8px;flex-wrap:wrap}
.ex-banner-actions{display:flex;gap:8px;flex-wrap:wrap}
.ex-pane-wrap{flex:1;min-height:0;position:relative;display:flex}
.ex-pane{flex:1;min-width:0;overflow-y:auto;padding:4px 2px 64px 2px;scrollbar-width:thin;scrollbar-color:#DFE2E6 transparent}
.ex-part-head{padding:4px 2px 8px;border-bottom:3px solid #171717;margin-bottom:10px}
.ex-part-head h2{margin:0;font-size:22px;letter-spacing:-.01em}
.ex-part-head p{margin:4px 0 0;font-size:13px;color:#5F6872}
.ex-group{margin-bottom:14px}
.ex-graphic{margin-bottom:12px}
.ex-q{border:1px solid #DFE2E6;border-radius:14px;padding:10px 14px;margin-bottom:8px;background:#fff}
.ex-q .photo img{width:auto;max-width:100%;max-height:min(320px, calc(100vh - 439px));margin:0 auto;object-fit:contain}
.ex-q.current{border-color:#343B46;box-shadow:inset 3px 0 0 #343B46}
.ex-qhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.ex-qnum{font:inherit;font-size:13px;font-weight:900;letter-spacing:.05em;color:#5F6872;background:none;border:0;padding:0;cursor:pointer;text-align:left}
.ex-qnum:hover{color:#171717;text-decoration:underline}
.ex-bm{border:0;background:none;font-size:18px;color:#9BA1A8;padding:2px 6px;line-height:1}
.ex-bm.on{color:#343B46}
.ex-bm:disabled{cursor:default;opacity:.6}
.ex-stem{font-size:16px;font-weight:700;line-height:1.45;margin-bottom:12px;overflow-wrap:break-word}
.ex-q .letter-row{margin-top:2px}
.ex-q .listen-card{margin-bottom:12px}
.ex-review{display:flex;gap:18px;flex-wrap:wrap;margin-top:12px;padding:10px 12px;border-radius:10px;font-size:14px}
.ex-review-ok{background:#E6F1EB;color:#27624F}
.ex-review-bad{background:#F9EBEC;color:#9F3134}
.ex-review-skip{background:#EAF1F6;color:#294E6B}
.ex-opt-right{border:2px solid #27624F !important;background:#E6F1EB}
.ex-opt-wrong{border:2px solid #9F3134 !important;background:#F9EBEC}
.ex-floatnav{position:absolute;right:14px;bottom:14px;display:flex;gap:8px;z-index:5}
.ex-float-btn{width:44px;height:44px;border-radius:50%;border:1px solid #DFE2E6;background:#fff;font-size:18px;font-weight:900;color:#171717;box-shadow:0 4px 14px rgba(23,23,23,.14)}
.ex-float-btn:hover{border-color:#343B46}
.ex-palette{flex:0 0 auto;display:flex;align-items:center;gap:12px;background:#FFFFFF;border:1px solid #DFE2E6;border-radius:12px;padding:7px 12px;margin-top:8px}
.ex-pal-row{flex:1;min-width:0;display:flex;align-items:center;gap:4px;overflow-x:auto;scrollbar-width:none;padding:2px 0}
.ex-pal-part{font-size:12px;font-weight:900;color:#5F6872;white-space:nowrap;margin-right:6px}
.ex-pal-q{width:30px;height:30px;min-width:30px;flex:0 0 auto;border-radius:50%;border:1px solid #DFE2E6;background:#F3F4F5;color:#171717;font-size:12px;font-weight:900;display:grid;place-items:center;padding:0}
.ex-pal-q:hover{border-color:#343B46}
.ex-pal-q.answered{background:#FFFFFF;border-color:#343B46;color:#343B46}
.ex-pal-q.bookmarked{box-shadow:inset 0 -3px 0 #343B46}
.ex-pal-q.current{background:#343B46;border-color:#343B46;color:#fff}
.ex-pal-q.correct{background:#E6F1EB;border-color:#27624F;color:#27624F}
.ex-pal-q.wrong{background:#F9EBEC;border-color:#9F3134;color:#9F3134}
.ex-pal-q.skipped{background:#EAF1F6;border-color:#294E6B;color:#294E6B}
.ex-part-tab{flex:0 0 auto;border:1px solid #DFE2E6;background:#fff;border-radius:999px;padding:7px 14px;font-size:13px;font-weight:800;color:#171717;white-space:nowrap}
.ex-part-tab:hover{border-color:#343B46}
.ex-submit{flex:0 0 auto;border:0;border-radius:999px;background:#343B46;color:#fff;padding:10px 20px;min-height:42px;font-size:14px;font-weight:900;white-space:nowrap}
.ex-submit:hover{background:#272D35}
.ex-submit:disabled{opacity:.45;cursor:default}
.ex-dialog-backdrop{position:fixed;inset:0;z-index:320;background:rgba(23,23,23,.45);display:grid;place-items:center;padding:20px}
.ex-dialog{background:#fff;border-radius:16px;padding:22px 24px;max-width:440px;width:100%}
.ex-dialog h3{margin:0 0 8px;font-size:19px}
.ex-dialog p{margin:0 0 8px;font-size:14.5px;color:#343B46;line-height:1.6}
.ex-dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px;flex-wrap:wrap}
.ex-menu{position:fixed;z-index:330;display:flex;gap:4px;background:#343B46;border-radius:10px;padding:5px;box-shadow:0 6px 20px rgba(23,23,23,.25)}
.ex-menu[hidden]{display:none}
.ex-menu button{border:0;background:none;color:#fff;font-size:13.5px;font-weight:800;padding:7px 12px;border-radius:7px;white-space:nowrap}
.ex-menu button:hover{background:#272D35}
.ex-ann-highlight{background:#FFF3B0}
.ex-ann-note{background:#EAF1F6;border-bottom:2px solid #294E6B;cursor:pointer}
.ex-drawer{position:fixed;top:0;right:0;bottom:0;width:min(360px,92vw);z-index:210;background:#fff;border-left:1px solid #DFE2E6;box-shadow:-8px 0 28px rgba(23,23,23,.12);overflow-y:auto;padding:16px}
.ex-drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px}
.ex-drawer-head h3{margin:0;font-size:18px}
.ex-drawer-sub{margin:3px 0 0;font-size:12.5px;font-weight:700;color:#5F6872}
.ex-drawer-empty{font-size:13.5px;color:#5F6872;line-height:1.6}
.ex-note-card{border:1px solid #DFE2E6;border-radius:12px;padding:12px 14px;margin-bottom:10px}
.ex-note-card.active{border-color:#343B46;box-shadow:inset 3px 0 0 #343B46}
.ex-note-part{font-size:11px;font-weight:900;letter-spacing:.08em;color:#5F6872;margin:0 0 6px;text-transform:uppercase}
.ex-note-quote{font-size:14px;line-height:1.55;margin:0 0 10px;font-style:italic}
.ex-note-card textarea{width:100%;border:1px solid #DFE2E6;border-radius:8px;padding:8px 10px;font-size:13.5px;line-height:1.5;resize:vertical;background:#fff;color:#171717}
.ex-note-actions{margin-top:8px}
.ex-report{width:min(860px,calc(100% - 64px));margin:0 auto;padding:16px 0 40px}
.ex-report-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.ex-hero{border-top:3px solid #171717;padding-top:14px;margin-bottom:16px}
.ex-hero h1{font-size:clamp(26px,3.4vw,36px);letter-spacing:-.02em;margin:0 0 6px}
.ex-big{font-size:34px;font-weight:900;letter-spacing:-.02em;margin:10px 0 0}
.ex-scaled{font-size:19px;font-weight:800;margin:12px 0 0}
.ex-scaled b{font-size:24px;font-weight:900}
.ex-scaled-note{font-size:13px;color:#5F6872;line-height:1.6;margin:6px 0 0;max-width:640px}
.ex-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}
.ex-metric{border:1px solid #DFE2E6;border-radius:12px;padding:14px;background:#fff}
.ex-metric b{display:block;font-size:22px;letter-spacing:-.01em}
.ex-metric span{font-size:12.5px;color:#5F6872;font-weight:700}
.ex-bars{border:1px solid #DFE2E6;border-radius:12px;padding:14px 16px;margin-bottom:18px;background:#fff;display:grid;gap:12px}
.ex-bar-row{display:grid;grid-template-columns:64px 1fr 52px;align-items:center;gap:12px}
.ex-bar-label{font-size:13px;font-weight:800}
.ex-bar{height:10px;border-radius:999px;background:#F3F4F5;border:1px solid #DFE2E6;overflow:hidden}
.ex-bar-fill{height:100%;background:#27624F}
.ex-bar-num{font-size:13px;font-weight:800;text-align:right;font-variant-numeric:tabular-nums}
.ex-sec-title{font-size:19px;margin:0 0 12px}
.ex-errcards{display:grid;gap:10px;margin-bottom:18px}
.ex-errcard{border:1px solid #DFE2E6;border-radius:12px;padding:12px 14px;background:#fff}
.ex-errcard p{margin:2px 0;font-size:14px;color:#343B46}
.ex-errcard-title{font-weight:900 !important;color:#171717 !important}
.ex-all-ok{font-size:15px;color:#27624F;font-weight:700;margin:0 0 26px}
.ex-history{display:grid;gap:8px}
.ex-history-row{display:flex;justify-content:space-between;gap:14px;text-align:left;border:1px solid #DFE2E6;background:#fff;border-radius:10px;padding:11px 14px;font-size:14px;font-weight:700;color:#171717}
.ex-history-row:hover{border-color:#343B46}
.ex-history-row.current{border-color:#343B46;background:#F3F4F5}
.ex-cause-note{font-size:13.5px;color:#5F6872;line-height:1.6;margin:0 0 12px}
.ex-causes{display:grid;gap:8px;margin-bottom:18px}
.ex-cause-row{display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center;border:1px solid #DFE2E6;border-radius:10px;padding:10px 14px;background:#fff}
.ex-cause-label{font-size:14px;font-weight:700}
.ex-cause-count{font-size:13px;font-weight:800;color:#5F6872;white-space:nowrap;font-variant-numeric:tabular-nums}
.ex-cause-row.undiagnosed{background:#F3F4F5}
.ex-plan-grid{display:grid;gap:10px;margin-bottom:18px}
.ex-plan{display:grid;grid-template-columns:34px 1fr;gap:12px;border:1px solid #DFE2E6;border-radius:12px;padding:12px 14px;background:#fff}
.ex-plan-no{font-size:15px;font-weight:900;color:#5F6872}
.ex-plan strong{display:block;font-size:14.5px;line-height:1.45}
.ex-plan p{margin:4px 0;font-size:13.5px;color:#343B46;line-height:1.55}
.ex-plan small{font-size:12.5px;color:#5F6872}
.ex-plan-empty{font-size:14px;color:#27624F;font-weight:700;margin:0 0 18px}
.ex-chart{display:flex;align-items:flex-end;gap:8px;height:132px;border:1px solid #DFE2E6;border-radius:12px;padding:14px 16px 8px;background:#fff;margin-bottom:8px}
.ex-chart-col{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px}
.ex-chart-val{font-size:11.5px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.ex-chart-track{flex:1;min-height:0;width:100%;display:flex;align-items:flex-end;justify-content:center}
.ex-chart-fill{width:100%;max-width:34px;background:#27624F;border-radius:4px 4px 0 0;min-height:10px}
.ex-chart-fill.current{background:#343B46}
.ex-chart-lab{font-size:11px;font-weight:700;color:#5F6872;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.ex-chart-note{font-size:13px;color:#5F6872;line-height:1.6;margin:0 0 14px}
.ex-xhistory{display:grid;gap:8px}
.ex-xhistory-row{display:flex;justify-content:space-between;gap:14px;text-align:left;border:1px solid #DFE2E6;background:#fff;border-radius:10px;padding:11px 14px;font-size:14px;font-weight:700;color:#171717}
.ex-xhistory-row:hover{border-color:#343B46}
.ex-xhistory-row.current{border-color:#343B46;background:#F3F4F5}
.ex-xhistory-row small{display:block;font-size:12.5px;font-weight:700;color:#5F6872}
.ex-tag{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.05em;background:#EAF1F6;color:#294E6B;padding:3px 8px;border-radius:999px;vertical-align:2px;margin-left:6px}
.ex-remind{font-size:13.5px;line-height:1.6;color:#294E6B;background:#EAF1F6;border-radius:10px;padding:8px 12px;margin-top:8px}
#ex-remind-home{margin-top:14px}

/* ---------- Bo cuc Exam Mode v3 (18/11) ---------- */
/* Luoi chia doi (P1, P3, P4): cot trai + thanh keo + cot phai.
   --ex-split la % chieu rong cot trai. Moi cau la mot hang luoi
   nen stem luon ngang hang voi khoi dap an cua no; #ex-pane la
   vung cuon duy nhat, ca nhom cuon chung mot nhip. */
.ex-split{display:grid;grid-template-columns:calc(var(--ex-split,60)*1%) 8px minmax(0,1fr);align-items:start}
.ex-cell{min-width:0;padding:6px 10px 16px}
.ex-cell-l{grid-column:1}
.ex-cell-r{grid-column:3}
.ex-cell .ex-q{margin-bottom:0}
.ex-cell .ex-stem{margin-bottom:0}
.ex-cell .graphic{overflow-x:auto}
.ex-divider{grid-column:2;align-self:stretch;cursor:col-resize;position:relative;touch-action:none;background:transparent;min-height:48px}
.ex-divider::after{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;background:#DFE2E6;border-radius:2px}
.ex-divider:hover::after,.ex-divider:focus-visible::after{background:#343B46}
.ex-divider:focus-visible{outline:none}
.ex-p1photo{margin:0}
.ex-p1photo img{display:block;width:100%;height:auto;max-height:min(600px,calc(100vh - 347px));object-fit:contain;margin:0 auto}
.ex-p2grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px;align-items:start}
.ex-p2col{display:grid;gap:8px}
.ex-p2row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:0;padding:8px 14px}
.ex-p2row .ex-qnum{flex:0 0 auto;font-size:14px}
.ex-p2row .letter-row{flex-wrap:nowrap}
.ex-p2row .letter-btn{width:46px;height:46px;font-size:19px;border-radius:12px}
.ex-p2row .ex-review{flex:1 1 100%;margin-top:2px}
@media(max-width:720px){
  .ex-split{grid-template-columns:minmax(0,1fr)}
  .ex-cell{grid-column:1 !important;grid-row:auto !important;padding:6px 2px 12px}
  .ex-divider{display:none}
  .ex-p1photo img{max-height:none}
  .ex-p2grid{grid-template-columns:1fr}
  .ex-pane-wrap{flex-direction:column}
  .ex-floatnav{position:static;align-self:flex-end;margin-top:8px}
}

