/* CO-CHU-0311 */
/* Phòng thi ảo RQX */
.exam-body { background: #EEF2F9; }
.exam-body footer.site { display: none; }
.spin { width: 42px; height: 42px; border-radius: 50%; border: 4px solid #CBD5E1; border-top-color: var(--blue2); margin: 0 auto 14px; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.xbar { position: sticky; top: var(--nav-h, 46px); z-index: 40; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.xbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.xbar .ttl { font-weight: 800; color: var(--navy); font-size: 16px; margin-right: auto; }
.xbar .ttl small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 19px; color: var(--navy); background: var(--sky); padding: 6px 12px; border-radius: 10px; }
.timer.low { background: #E2EEFE; color: var(--red); }
.secs { display: flex; gap: 6px; flex-wrap: wrap; }
.secs button { border: 0; background: #F1F5F9; padding: 8px 12px; border-radius: 10px; font-weight: 700; cursor: pointer; font-family: inherit; color: #334155; font-size: 14px; }
.secs button.on { background: var(--navy); color: #fff; }

.xmain { display: grid; grid-template-columns: 1fr 260px; gap: 20px; padding: 22px 0 80px; align-items: start; }
@media (max-width: 960px) { .xmain { grid-template-columns: 1fr; } .palette { order: -1; } }
.palette { position: sticky; top: 140px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 16px; }
.palette h4 { margin: 0 0 10px; color: var(--navy); font-size: 15px; }
.pgrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
@media (max-width: 960px) { .palette { position: static; } .pgrid { grid-template-columns: repeat(12, 1fr); } }
@media (max-width: 520px) { .pgrid { grid-template-columns: repeat(10, 1fr); } }
.pgrid a { display: grid; place-items: center; height: 28px; border-radius: 7px; background: #F1F5F9; color: #475569; font-size: 12.5px; font-weight: 700; }
.pgrid a.done { background: var(--blue); color: #fff; }
.pgrid a.ok { background: var(--green); color: #fff; }
.pgrid a.bad { background: var(--red); color: #fff; }
.pgrid a.flag { box-shadow: inset 0 0 0 2px var(--gold); }
.pgrid .sep { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: 6px; }

.part { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px; }
.part .ph { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; border-bottom: 2px solid var(--sky); padding-bottom: 10px; margin-bottom: 16px; }
.part .ph b { color: var(--red); font-size: 15px; white-space: nowrap; }
.part .ph .izh { font-family: var(--zh); color: var(--navy); font-weight: 700; }
.part .ph .ivi { color: var(--muted); font-size: 14px; width: 100%; }
.shared { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
.shared .so { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; background: #FBFCFE; }
.shared .so .lb { font-weight: 800; color: var(--blue); }
.shared .so .em { font-size: 37.5px; line-height: 1.2; }
.shared .so .tz { font-family: var(--zh); font-size: 18px; }
.passage { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 12px; padding: 14px 16px; margin: 6px 0 14px; font-family: var(--zh); font-size: 18px; line-height: 1.9; white-space: pre-line; }
.passage .py { font-family: inherit; font-size: 13px; color: #1E40AF; display: block; }
.q { padding: 14px 0; border-bottom: 1px dashed var(--line); scroll-margin-top: 140px; }
.q:last-child { border-bottom: 0; }
.q .qh { display: flex; gap: 10px; align-items: flex-start; }
.q .qn { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.q .qb { flex: 1; min-width: 0; }
.q .stem { font-family: var(--zh); font-size: 18px; line-height: 1.8; white-space: pre-line; color: #0F172A; }
.q .spy { font-size: 13px; color: var(--blue2); margin-top: -2px; }
.q .img { font-size: 47.5px; line-height: 1.2; margin: 4px 0; }
.q .flag { margin-left: auto; background: none; border: 0; cursor: pointer; font-size: 18px; opacity: .35; }
.q .flag.on { opacity: 1; }
.opts { display: grid; gap: 8px; margin-top: 10px; }
.opts.row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; transition: border-color .12s, background .12s; text-align: left; font-family: inherit; font-size: 16px; width: 100%; }
.opt:hover { border-color: #A5B8E8; }
.opt .lb { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: #F1F5F9; display: grid; place-items: center; font-weight: 800; color: var(--navy); }
.opt .tz { font-family: var(--zh); font-size: 18px; }
.opt .py { display: block; font-size: 12.5px; color: var(--blue2); }
.opt .em { font-size: 29px; }
.opt.sel { border-color: var(--blue2); background: #EEF3FF; }
.opt.sel .lb { background: var(--blue2); color: #fff; }
.opt.right { border-color: var(--green); background: #E9F9EF; }
.opt.right .lb { background: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red); background: #ECF3FD; }
.opt.wrong .lb { background: var(--red); color: #fff; }
.lbls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lbls .opt { width: auto; padding: 6px; }
.audio { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.audio button { border: 0; background: var(--red); color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 14px; }
.audio button:disabled { background: #CBD5E1; cursor: default; }
.audio span { font-size: 13px; color: var(--muted); }
.ordbox { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips button { font-family: var(--zh); font-size: 18px; border: 1.5px solid #C7D5F5; background: #fff; border-radius: 10px; padding: 6px 12px; cursor: pointer; }
.chips button.used { opacity: .3; }
.built { min-height: 46px; border: 2px dashed #C7D5F5; border-radius: 12px; padding: 8px 12px; font-family: var(--zh); font-size: 19px; background: #FBFCFE; }
.inp { font-family: var(--zh); font-size: 19px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; width: 100%; max-width: 420px; }
.inp.one { width: 70px; text-align: center; }
textarea.inp { max-width: none; min-height: 140px; font-size: 18px; line-height: 1.7; }
.explain { margin-top: 10px; background: #F0F6FF; border-left: 4px solid var(--blue2); padding: 10px 14px; border-radius: 0 10px 10px 0; font-size: 15px; }
.explain .zhs { font-family: var(--zh); font-size: 17.5px; white-space: pre-line; }
.example { background: #F8FAFC; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; color: #475569; }
.example b { color: var(--green); }
.submitbar { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100vw; box-sizing: border-box; background: rgba(255, 255, 255, .98); border-top: 1px solid var(--line); z-index: 60; }
.submitbar .wrap { display: flex; gap: 10px; align-items: center; height: 64px; max-width: 100%; box-sizing: border-box; }
.submitbar .prog { margin-right: auto; font-weight: 700; color: var(--navy); min-width: 0; }
.submitbar #submit { flex-shrink: 0; }
.result { background: linear-gradient(150deg, var(--navy), var(--blue)); color: #fff; border-radius: 22px; padding: 30px; margin: 22px 0; text-align: center; }
.result .big { font-size: 54.5px; font-weight: 900; line-height: 1; }
.result .big small { font-size: 21px; color: #BFD0FF; }
.result .verdict { display: inline-block; margin-top: 12px; padding: 6px 18px; border-radius: 999px; font-weight: 800; }
.result .verdict.pass { background: var(--green); } .result .verdict.fail { background: var(--red); }
.result .secs2 { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.result .secs2 div { background: rgba(255, 255, 255, .12); padding: 10px 16px; border-radius: 12px; min-width: 120px; }
.result .secs2 b { display: block; font-size: 20.5px; }
.lock { max-width: 560px; margin: 50px auto; text-align: center; }
.selfscore { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.selfscore select { padding: 6px 10px; border-radius: 8px; border: 1.5px solid var(--line); font-size: 15px; }
.pytoggle { font-size: 13px; }

.exam-body { padding-bottom: 84px; }
@media (max-width: 600px) { .submitbar .wrap { height: auto; min-height: 64px; padding-top: 8px; padding-bottom: 8px; } .submitbar .prog { font-size: 14px; } }

/* Màn hình chọn chế độ: Thi thử / Luyện tập */
.xintro { max-width: 720px; margin: 28px auto; }
.xintro h1 { font-size: 24px; margin: 4px 0 6px; }
.xsec { margin: 8px 0 0; padding-left: 20px; color: var(--ink); font-size: 15px; line-height: 1.7; }
.xmodes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xmode { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 16px 18px; cursor: pointer; font-family: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.xmode b { display: block; font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.xmode span { display: block; font-size: 14px; color: var(--muted); line-height: 1.55; }
.xmode:hover { border-color: var(--blue2); box-shadow: var(--shadow); transform: translateY(-1px); }
.xmode[data-mode="practice"] { border-color: rgba(18, 161, 80, .45); }
.xmode[data-mode="practice"]:hover { border-color: var(--green); }
@media (max-width: 600px) { .xmodes { grid-template-columns: 1fr; } .xintro h1 { font-size: 20.5px; } }

/* 26/10/2026 (A22): bảng câu hỏi tự chia cột theo bề rộng, không tràn ngang trên điện thoại */
.xmain > * { min-width: 0; }
@media (max-width: 960px) { .pgrid { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; } }
@media (max-width: 520px) { .pgrid a { height: 36px; font-size: 13.5px; } }

/* 26/10/2026 (Học hỏi Edmicro theo chuẩn riêng RQX): Lọc câu, Tra từ trong câu, Ghi chú câu, Cô Quỳnh Như góp ý bài viết, Tổng kết kỹ năng */
.pfilter { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.pfilter button { border: 1px solid var(--line); background: #F8FAFC; color: #334155; font-size: 12.5px; font-weight: 700; padding: 5px 9px; border-radius: 999px; cursor: pointer; font-family: inherit; transition: all .12s; }
.pfilter button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pgrid a.noted { position: relative; }
.pgrid a.noted::after { content: ""; position: absolute; right: 2px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: #3B82F6; }
.filter-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #DBEAFE; border: 1.5px solid #93C5FD; color: #1E40AF; padding: 10px 14px; border-radius: 14px; margin-bottom: 16px; font-size: 14.5px; font-weight: 600; }
.q.q-hidden { display: none !important; }
.part.part-hidden { display: none !important; }
.qtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.qtool-btn { border: 1px solid #CBD5E1; background: #F8FAFC; color: var(--navy); font-size: 13.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; cursor: pointer; font-family: inherit; transition: all .12s; }
.qtool-btn:hover, .qtool-btn.on { background: #EEF3FF; border-color: var(--blue2); color: var(--blue2); }
.qtool-btn.ai { background: #FFF7ED; border-color: #FDBA74; color: #124B9A; }
.qtool-btn.ai:hover { background: #FFEDD5; border-color: #0C68EA; }
.qvocab-box { margin-top: 10px; background: #F8FAFC; border: 1.5px solid #DCE6F7; border-radius: 12px; padding: 10px 12px; }
.qvocab-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.qvocab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.qvocab-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.qvocab-item .top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.qvocab-item .hz { font-family: var(--zh); font-size: 18px; font-weight: 700; color: var(--navy); }
.qvocab-item .py { color: var(--blue2); font-size: 13.5px; }
.qvocab-item .lv { margin-left: auto; font-size: 12px; font-weight: 700; background: #EEF2FF; color: var(--blue); padding: 1px 6px; border-radius: 99px; }
.qvocab-item .vi { color: #1E293B; font-weight: 600; }
.qvocab-item .act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.qvocab-item .act a, .qvocab-item .act button { font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; border: 1px solid #CBD5E1; background: #F8FAFC; color: var(--navy); cursor: pointer; text-decoration: none; font-family: inherit; }
.qvocab-item .act button.saved { background: #DBEAFE; border-color: #86EFAC; color: #1E40AF; }
.qnote-box { margin-top: 10px; background: #EFF6FF; border: 1.5px solid #BFDBFE; border-radius: 12px; padding: 10px 12px; }
.qnote-box label { display: block; font-size: 13px; font-weight: 700; color: #1E40AF; margin-bottom: 5px; }
.qnote-box textarea { width: 100%; min-height: 58px; border: 1px solid #93C5FD; border-radius: 8px; padding: 7px 10px; font-family: inherit; font-size: 14.5px; background: #fff; box-sizing: border-box; resize: vertical; }
.qai-box { margin-top: 10px; background: #FFF7ED; border-left: 4px solid #0C68EA; border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: 15px; color: #1E293B; line-height: 1.6; }
.qai-box b.hd { display: block; color: #124B9A; margin-bottom: 4px; font-size: 15px; }
.res-skills { margin: 18px auto 0; max-width: 680px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 16px; padding: 16px 18px; text-align: left; }
.res-skill-row { display: grid; grid-template-columns: 110px 1fr 110px; gap: 10px; align-items: center; margin: 8px 0; font-size: 14.5px; }
.res-skill-bar { height: 10px; background: rgba(255, 255, 255, .18); border-radius: 99px; overflow: hidden; }
.res-skill-bar i { display: block; height: 100%; border-radius: 99px; background: #34D399; }
.res-skill-bar i.mid { background: #60A5FA; }
.res-skill-bar i.low { background: #71A9F8; }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.res-actions a, .res-actions button { font-size: 14px; font-weight: 700; padding: 8px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; cursor: pointer; font-family: inherit; }
.res-actions a:hover, .res-actions button:hover { background: rgba(255, 255, 255, .26); }
.xintro-plan { background: #F8FAFC; border: 1.5px solid #DCE6F7; border-radius: 14px; padding: 12px 16px; margin: 12px 0 6px; font-size: 14.5px; }
.xintro-plan h4 { margin: 0 0 6px; font-size: 15px; color: var(--navy); }
@media (max-width: 600px) { .res-skill-row { grid-template-columns: 90px 1fr 86px; font-size: 13.5px; } }
