*{box-sizing:border-box}body{font-family:Arial, sans-serif;background:#f4f6fa;color:#18243b;margin:0}main{max-width:980px;margin:0 auto;padding:22px 16px 70px}.hero{background:#273b65;color:white;text-align:center;border-radius:13px;padding:25px}.hero h1{font-size:24px;margin:0 0 10px}.hero h2{font-size:17px;margin:0 0 8px}.note{padding:14px;background:#fff7e6;border-left:4px solid #e6ad35;margin:18px 0;border-radius:6px}.section{font-size:18px;margin:32px 0 14px}.question{background:white;border:1px solid #d6deea;border-radius:12px;margin:12px 0;padding:18px 20px}.stem{font-size:17px;line-height:2.05;margin:10px 0 14px}.options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.option{border:1px solid #dce3ee;border-radius:9px;padding:12px 14px;line-height:2;display:flex;align-items:center;gap:12px;min-height:60px}.letter{font-weight:700;flex-shrink:0}.frac{display:inline-flex;vertical-align:middle;flex-direction:column;text-align:center;line-height:1.12;white-space:nowrap;font-family:Georgia,serif;margin:0 .13em;font-size:.96em}.frac>span:first-child{border-bottom:1.4px solid currentColor;padding:0 .18em .08em}.frac>span:last-child{padding:.09em .18em 0}.stem sup,.option sup{font-size:.7em;vertical-align:super}.diagram{display:block;max-width:100%;width:auto;max-height:360px;object-fit:contain;margin:10px auto 18px}.statement{padding:9px 4px;line-height:1.8}.input-demo{padding:12px;border:1px dashed #b7c5d8;color:#66758a;border-radius:7px}.footer{color:#65758a;font-size:13px;text-align:center;margin:24px 0}@media(max-width:600px){.options{grid-template-columns:1fr}.hero h2{font-size:15px}.question{padding:14px}.stem{font-size:16px}}
/* V3.1: MathML native fractions + angle-hat school notation */
math.math-frac{display:inline-block;vertical-align:middle;font-size:1.1em;line-height:normal;margin:0 .16em;font-family:"Cambria Math","STIX Two Math",serif;}
.option math.math-frac{font-size:1.18em;}
.hat{position:relative;display:inline-block;margin-top:.38em;line-height:1;white-space:nowrap;}
.hat::before{content:"⌢";position:absolute;left:50%;transform:translateX(-50%);top:-.67em;font-size:.82em;font-weight:600;}
.hat sub{font-size:.7em;}

.option:has(input:checked){background:#eaf4ff;border-color:#2769a6}.option input{width:auto;flex-shrink:0}.option-content{min-width:0}.tf-choice{display:inline-flex;gap:5px;align-items:center;margin-right:18px}.tf-choice input{width:auto}.question{margin:16px 0}.exam-timer{position:sticky;top:0;background:#fff5d6;border:1px solid #edce7c;padding:12px;border-radius:10px;z-index:3;font-weight:700}.hidden{display:none!important}input[type=text]{padding:10px;border:1px solid #bbc6d7;border-radius:8px;max-width:340px;width:100%;font-size:16px}button{background:#1c5e9e;color:white;border:0;padding:12px 17px;border-radius:9px;cursor:pointer}button:disabled{opacity:.55}.error{color:#b22}.question h3{margin-top:0}.section{font-weight:700}.tf-row{padding:12px 0;border-bottom:1px solid #e4e9f2}.tf-statement{line-height:1.9}.meta{margin:12px 0}.score{font-size:32px;font-weight:700;color:#175c99}a{color:#175c99}

body{background:#f4f6fa}.welcome{display:flex;align-items:center;gap:18px;background:#fff;border:1px solid #d6deea;border-radius:12px;padding:15px;margin:18px 0}.welcome img{width:180px;max-width:42%;border-radius:10px}.welcome strong{font-size:20px}.progress{background:#e2e9f2;height:10px;border-radius:8px;overflow:hidden;margin:12px 0}.progress>div{height:100%;width:0;background:#2d79b4;transition:width .2s}.progress-label{font-size:14px;color:#425b75}.short-fields{display:flex;flex-wrap:wrap;gap:12px}.short-fields label{display:flex;flex-direction:column;gap:5px}.short-fields input{max-width:160px}.tf-choice{padding:5px 8px;border-radius:7px}.tf-choice:has(input:checked){background:#eaf4ff}.qimg{display:block;max-width:100%;max-height:320px;object-fit:contain;margin:12px auto}.opt{display:flex;align-items:center;gap:10px}.error{color:#b22}.complete-illustration{max-width:280px;width:100%;display:block;margin:12px auto;border-radius:12px}@media(max-width:600px){.welcome img{width:110px}.welcome strong{font-size:16px}.short-fields input{max-width:130px}}

/* V2 – đồng bộ giao diện mẫu Toán lớp 6 */
body{background:#f4f6fb;color:#081e40}.topbar{background:#213b68;color:#fff;padding:26px 0 25px}.topbar-inner{max-width:880px;margin:auto;padding:0 16px}.topbar h1{font-size:25px;line-height:1.2;margin:0;font-weight:750}.topbar p{font-size:14px;margin:3px 0 0}main{max-width:912px;padding:20px 16px 65px}.welcome{background:linear-gradient(110deg,#eaf6ff 0%,#fffaf0 100%);border:1px solid #d2e5fa;border-radius:17px;display:flex;justify-content:space-between;min-height:142px;gap:20px;padding:15px 16px;margin:0 0 18px;box-shadow:none}.welcome>div{align-self:center}.welcome strong{font-size:18px;color:#153e75}.welcome p{font-size:14px;line-height:1.5;color:#31537a;margin:10px 0 0}.welcome img{height:112px;width:146px;max-width:38%;object-fit:cover;object-position:center;border-radius:17px}.note{background:#fff;border:0;border-radius:14px;padding:22px;margin:0 0 16px;box-shadow:0 3px 12px #1c38511b;color:#173154}.question{border:1px solid #dae3ee;border-radius:14px;box-shadow:0 3px 12px #1c38511b;padding:22px 20px;margin:0 0 16px}#login h2{font-size:20px;margin:15px 0 20px}.form-line{display:flex;align-items:center;gap:8px;margin:12px 0}.form-line label{font-size:15px;font-weight:700;white-space:nowrap}.form-line input,.form-line select{height:42px;padding:9px 12px;border:1px solid #aebfd7;border-radius:7px;font-size:15px;max-width:360px;width:100%}.form-line select{max-width:190px;background:#fff}button{background:#2b5898;color:#fff;border-radius:7px;padding:11px 18px;font-weight:600}button:hover:not(:disabled){background:#204579}.footer{text-align:left;color:#587095;font-size:13px;margin:17px 0}#exam .question{margin:14px 0}@media(max-width:640px){.topbar{padding:20px 0}.topbar h1{font-size:21px}.welcome{min-height:110px}.welcome img{width:104px;height:98px}.welcome strong{font-size:15px}.welcome p{font-size:12px}.form-line{align-items:flex-start;flex-direction:column;gap:5px}.form-line input{max-width:100%}}
