/* Giao bài tập online — trang HỌC SINH (không nạp teacher.css). Dùng font hệ thống, ưu tiên điện thoại. */
body.hs { margin: 0; background: #f3f5f8; color: #1f2430; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
body.hs .bv-hp, body.hs .bv-hp * { display: none !important; }
body.hs [hidden] { display: none !important; }
.hs-wrap { max-width: 760px; margin: 0 auto; padding: 16px 14px 48px; box-sizing: border-box; }
@media (min-width: 700px) { .hs-wrap { padding: 28px 20px 64px; } }
.hs-card { background: #fff; border: 1px solid #e3e6eb; border-radius: 16px; padding: 16px; margin-top: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); box-sizing: border-box; }
@media (min-width: 700px) { .hs-card { padding: 22px; } }
.hs-hero { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; border-radius: 16px; padding: 20px 18px; margin-top: 14px; }
.hs-hero__kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.hs-hero__title { margin: 0; font-size: clamp(1.25rem, 5vw, 1.75rem); line-height: 1.3; overflow-wrap: anywhere; }
.hs-hero__meta { margin: 8px 0 0; font-size: 14px; opacity: .92; }
.hs-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
@media (min-width: 700px) { .hs-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hs-fact { background: #f5f7fa; border-radius: 12px; padding: 10px 12px; }
.hs-fact__n { font-size: 20px; font-weight: 700; line-height: 1.2; }
.hs-fact__l { font-size: 12px; color: #6b7280; }
.hs-types { margin: 10px 0 0; font-size: 13px; color: #4b5563; line-height: 1.6; }
.hs-block__title { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.hs-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.65; }
.hs-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hs-files__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e3e6eb; border-radius: 10px; background: #f8fafc; font-size: 14px; overflow-wrap: anywhere; }
.hs-files__item a { color: #1d4ed8; font-weight: 600; text-decoration: none; flex: 1; min-width: 0; }
.hs-files__size { color: #6b7280; font-size: 12px; white-space: nowrap; }
.hs-form label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.hs-form label:first-of-type { margin-top: 0; }
.hs-input { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 11px 12px; border: 1.5px solid #cfd5de; border-radius: 12px; background: #fff; color: inherit; margin-top: 4px; }
.hs-form .hs-input { margin-top: 0; }
.hs-input:focus, .hs-essay:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.hs-btn, .hs-btn--primary, .hs-btn--ghost, .hs-btn--danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 16px; padding: 12px 20px; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.3; box-sizing: border-box; }
.hs-form .hs-btn { margin-top: 12px; }
.hs-btn--primary, .hs-btn.hs-btn--primary { background: #2563eb; color: #fff; }
.hs-btn--primary:hover { background: #1d4ed8; }
.hs-btn--ghost, .hs-btn.hs-btn--ghost { background: #fff; color: #1f2430; border-color: #cfd5de; }
.hs-btn--danger, .hs-btn.hs-btn--danger { background: #fff; color: #b91c1c; border-color: #fca5a5; }
.hs-btn[disabled] { opacity: .6; cursor: not-allowed; }
.hs-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.hs-foot { margin-top: 18px; font-size: 12px; color: #6b7280; text-align: center; }
.hs-msg__badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #eef2ff; color: #3730a3; }
.hs-msg__title { margin: 12px 0 8px; font-size: clamp(1.15rem, 5vw, 1.5rem); line-height: 1.3; }
.hs-msg__text { margin: 0; font-size: 15px; color: #4b5563; }
.hs-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 200px; color: #6b7280; font-size: 14px; }
.hs-spinner { width: 22px; height: 22px; border: 3px solid rgba(37, 99, 235, .2); border-top-color: #2563eb; border-radius: 50%; animation: hs-spin .8s linear infinite; flex: none; }
@keyframes hs-spin { to { transform: rotate(360deg); } }
.hs-note { font-size: 15px; line-height: 1.6; }
.hs-note--err { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.hs-hint { margin: 8px 0 0; font-size: 13px; color: #6b7280; line-height: 1.5; }
.hs-math .katex { font-size: 1.06em; }
.hs-math { overflow-wrap: anywhere; }

/* Trang làm bài */
.hs-bar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #e3e6eb; padding: 8px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hs-bar__text { min-width: 0; flex: 1 1 140px; }
.hs-bar__title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-bar__name { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-bar__clock { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; background: #f1f5f9; border-radius: 10px; padding: 4px 10px; color: #1e293b; }
.hs-bar__clock.is-low { background: #fef2f2; color: #dc2626; animation: hs-pulse 1s ease-in-out infinite; }
@keyframes hs-pulse { 50% { opacity: .55; } }
.hs-state { font-size: 12px; color: #6b7280; white-space: nowrap; }
.hs-offline { position: sticky; top: 49px; z-index: 19; background: #fef3c7; color: #92400e; font-size: 13px; font-weight: 600; padding: 8px 14px; text-align: center; border-bottom: 1px solid #fde68a; }
.hs-jumps { display: flex; gap: 6px; overflow-x: auto; padding: 12px 14px 4px; scrollbar-width: thin; }
.hs-jump { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #cfd5de; background: #fff; color: #4b5563; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.hs-jump.is-answered { background: #16a34a; border-color: #16a34a; color: #fff; }
.hs-list { padding: 6px 14px 0; }
.hs-q { background: #fff; border: 1px solid #e3e6eb; border-radius: 16px; padding: 16px; margin-top: 12px; scroll-margin-top: 110px; }
.hs-q__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.hs-q__num { font-weight: 700; color: #1d4ed8; }
.hs-q__pts { margin-left: auto; color: #6b7280; font-size: 13px; }
.hs-q__text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.hs-q__imgbox { margin-top: 10px; overflow: hidden; border-radius: 10px; border: 1px solid #e3e6eb; }
.hs-q__imgbox img { display: block; max-width: 100%; height: auto; }
.hs-opts { display: grid; gap: 8px; margin-top: 12px; }
.hs-opt { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1.5px solid #d7dce3; border-radius: 12px; cursor: pointer; background: #fff; }
.hs-opt.is-on { border-color: #2563eb; background: #eff6ff; }
.hs-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hs-opt__box { flex: none; width: 20px; height: 20px; border: 1.5px solid #9ca3af; border-radius: 50%; margin-top: 2px; position: relative; background: #fff; box-sizing: border-box; }
.hs-opt input[type="checkbox"] + .hs-opt__box { border-radius: 6px; }
.hs-opt.is-on .hs-opt__box { border-color: #2563eb; }
.hs-opt.is-on .hs-opt__box::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #2563eb; }
.hs-opt input[type="checkbox"] + .hs-opt__box::after { border-radius: 2px; }
.hs-opt__letter { flex: none; font-weight: 700; font-size: 14px; color: #4b5563; padding-top: 2px; }
.hs-opt__text { flex: 1; min-width: 0; line-height: 1.55; overflow-wrap: anywhere; }
.hs-sts { display: grid; gap: 8px; margin-top: 12px; }
.hs-st { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #e3e6eb; border-radius: 12px; flex-wrap: wrap; background: #f8fafc; }
.hs-st__num { font-weight: 700; flex: none; }
.hs-st__text { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.hs-seg { display: inline-flex; border: 1px solid #cfd5de; border-radius: 10px; overflow: hidden; background: #fff; }
.hs-seg__btn { border: 0; background: #fff; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; cursor: pointer; color: #4b5563; min-width: 52px; }
.hs-seg__btn + .hs-seg__btn { border-left: 1px solid #cfd5de; }
.hs-seg__btn:first-child.is-on { background: #16a34a; color: #fff; }
.hs-seg__btn:last-child.is-on { background: #dc2626; color: #fff; }
.hs-q .hs-input { margin-top: 12px; }
.hs-essay { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 1.6; padding: 11px 12px; border: 1.5px solid #cfd5de; border-radius: 12px; background: #fff; color: inherit; margin-top: 12px; resize: vertical; min-height: 150px; }
.hs-upload.is-busy { opacity: .6; }
.hs-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 10px; }
.hs-photo { position: relative; display: block; border: 1px solid #e3e6eb; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 4; background: #f1f5f9; }
.hs-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-photo__del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(17, 24, 39, .75); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.hs-drop { display: flex; align-items: center; justify-content: center; min-height: 56px; margin-top: 10px; border: 1.5px dashed #9ca3af; border-radius: 12px; background: #f8fafc; font-weight: 600; font-size: 15px; color: #1d4ed8; cursor: pointer; padding: 0 12px; }
.hs-drop:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.hs-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hs-bottom { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid #e3e6eb; }
.hs-bottom__note { flex: 1; font-size: 12px; color: #6b7280; min-width: 0; }
.hs-bottom__btn { flex: none; }
.hs-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); box-sizing: border-box; }
.hs-modal__box { background: #fff; border-radius: 16px; padding: 20px; max-width: 420px; width: 100%; box-sizing: border-box; box-shadow: 0 20px 50px rgba(15, 23, 42, .3); }
.hs-modal__title { margin: 0 0 8px; font-size: 18px; }
.hs-modal__text { margin: 0; font-size: 15px; color: #4b5563; line-height: 1.55; }
.hs-modal__actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.hs-modal__actions .hs-btn { flex: 1; min-width: 130px; }
.hs-toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); z-index: 60; max-width: calc(100% - 28px); box-sizing: border-box; background: #1f2937; color: #fff; font-size: 14px; line-height: 1.45; padding: 10px 14px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.hs-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Trang kết quả */
.hs-score { text-align: center; padding: 22px 16px; }
.hs-score__num { font-size: clamp(2.6rem, 12vw, 4rem); font-weight: 800; line-height: 1.1; color: #1d4ed8; }
.hs-score__num.is-pending { font-size: clamp(1.4rem, 6vw, 2rem); color: #92400e; }
.hs-score__label { font-size: 14px; color: #4b5563; font-weight: 600; }
.hs-score__sub { font-size: 14px; color: #6b7280; margin-top: 4px; }
.hs-item__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin-bottom: 8px; }
.hs-item__num { font-weight: 700; }
.hs-item__verdict { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid #e3e6eb; background: #f1f5f9; color: #475569; }
.hs-item__verdict--correct, .hs-item__verdict--graded { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.hs-item__verdict--partial, .hs-item__verdict--review, .hs-item__verdict--pending { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.hs-item__verdict--wrong { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.hs-item__pts { margin-left: auto; font-weight: 700; }
.hs-item__text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.hs-item__ans { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; font-size: 15px; line-height: 1.6; }
.hs-item__row { white-space: pre-wrap; overflow-wrap: anywhere; }
.hs-item__row + .hs-item__row { margin-top: 4px; }
.hs-item__lab { font-weight: 600; color: #374151; }
.hs-item__sol { margin-top: 10px; font-size: 14px; color: #4b5563; }
.hs-item__sol .hs-pre { font-size: 14px; }
