/* Markaz Test Tizimi — test oynasi */

html.mt-lock, html.mt-lock body { overflow: hidden !important; }

#mt-app {
	--ink: #17213B;
	--paper: #F2F4F7;
	--surface: #FFFFFF;
	--line: #D8DDE6;
	--muted: #5A6377;
	--primary: #1C4CA0;
	--primary-ink: #133874;
	--spec: #1C4CA0;
	--ped: #B0670F;
	--man: #2D7653;
	--danger: #BF3A2B;
	--radius: 10px;

	position: fixed;
	inset: 0;
	z-index: 2147483000;
	overflow: auto;
	background: var(--paper);
	color: var(--ink);
	font-family: "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.5;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}
#mt-app *, #mt-app *::before, #mt-app *::after { box-sizing: border-box; }
#mt-app h1, #mt-app h2, #mt-app h3, #mt-app p, #mt-app ul, #mt-app ol, #mt-app dl, #mt-app figure { margin: 0; padding: 0; }
#mt-app h1, #mt-app h2, #mt-app h3 { font-family: inherit; color: var(--ink); letter-spacing: -0.01em; text-transform: none; }
#mt-app ul, #mt-app ol { list-style: none; }
#mt-app img { max-width: 100%; height: auto; }
#mt-app .mt-boot { padding: 40px; color: var(--muted); }

/* Bloklar ranglari */
#mt-app .mt-c-mutaxassislik { --c: var(--spec); }
#mt-app .mt-c-pedagogik { --c: var(--ped); }
#mt-app .mt-c-manaviy { --c: var(--man); }
#mt-app .mt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

/* Tugmalar va maydonlar */
#mt-app .mt-btn {
	appearance: none; border: 1px solid transparent; border-radius: 8px;
	padding: 12px 22px; font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
	cursor: pointer; text-decoration: none; box-shadow: none; text-transform: none; letter-spacing: 0;
	transition: background-color .15s, border-color .15s, color .15s;
}
#mt-app .mt-btn:disabled { opacity: .5; cursor: default; }
#mt-app .mt-btn-primary { background: var(--primary); color: #fff; }
#mt-app .mt-btn-primary:hover:not(:disabled) { background: var(--primary-ink); }
#mt-app .mt-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
#mt-app .mt-btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
#mt-app .mt-btn:focus-visible, #mt-app .mt-opt:focus-visible, #mt-app .mt-cell:focus-visible,
#mt-app input:focus-visible, #mt-app select:focus-visible { outline: 3px solid #8FB0EA; outline-offset: 2px; }

#mt-app label { display: block; font-size: 15px; font-weight: 500; color: var(--muted); margin: 18px 0 6px; }
#mt-app input[type="text"], #mt-app input[type="password"], #mt-app select {
	display: block; width: 100%; height: 50px; padding: 0 14px; margin: 0;
	font: inherit; font-size: 18px; color: var(--ink); background: #fff;
	border: 1px solid var(--line); border-radius: 8px; box-shadow: none;
}
#mt-app input:focus, #mt-app select:focus { border-color: var(--primary); outline: none; }
#mt-app .mt-err { min-height: 24px; margin-top: 12px; color: var(--danger); font-size: 15px; }
#mt-app .mt-muted { color: var(--muted); font-size: 15px; }
#mt-app .mt-row { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

#mt-app .mt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }

/* ---------------- Kirish ---------------- */
#mt-app .mt-back { position: absolute; top: 18px; left: 24px; color: var(--muted); font-size: 15px; text-decoration: none; }
#mt-app .mt-back:hover { color: var(--ink); text-decoration: underline; }

#mt-app .mt-entry {
	min-height: 100%; max-width: 1080px; margin: 0 auto; padding: 72px 32px 40px;
	display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center;
}
#mt-app .mt-site { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
#mt-app .mt-intro h1 { font-size: 40px; line-height: 1.12; font-weight: 700; margin-bottom: 32px; max-width: 16ch; }

#mt-app .mt-comp .mt-strip { display: flex; gap: 4px; height: 14px; margin-bottom: 18px; }
#mt-app .mt-comp .mt-seg { background: var(--c); border-radius: 3px; }
#mt-app .mt-comp li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
#mt-app .mt-comp li:last-child { border-bottom: 0; }
#mt-app .mt-comp-name { font-weight: 600; flex: 1; }
#mt-app .mt-comp-meta { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
#mt-app .mt-comp-sum { display: flex; gap: 36px; margin-top: 22px; }
#mt-app .mt-comp-sum b { display: block; font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
#mt-app .mt-comp-sum span { color: var(--muted); font-size: 14px; }
#mt-app .mt-instr { margin-top: 26px; padding-left: 14px; border-left: 3px solid var(--line); color: var(--muted); font-size: 15px; max-width: 60ch; }

#mt-app .mt-form h2, #mt-app .mt-pass h2 { font-size: 24px; font-weight: 700; }
#mt-app .mt-form .mt-btn { width: 100%; margin-top: 4px; padding: 15px; font-size: 17px; }

/* ---------------- Parol / davom ettirish ---------------- */
#mt-app .mt-center { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 32px; }
#mt-app .mt-pass { width: 100%; max-width: 480px; }
#mt-app .mt-pass h2 { margin: 22px 0 8px; }
#mt-app .mt-pass input { margin-top: 20px; height: 58px; font-size: 22px; letter-spacing: .08em; text-align: center; }
#mt-app .mt-pass .mt-row { margin-top: 8px; }
#mt-app .mt-pass .mt-go { width: 100%; margin-top: 24px; padding: 15px; }
#mt-app .mt-who { display: flex; flex-direction: column; gap: 2px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
#mt-app .mt-who b { font-size: 19px; font-weight: 600; }
#mt-app .mt-who span { color: var(--muted); font-size: 15px; }

/* ---------------- Test ---------------- */
#mt-app.mt-testing { display: flex; flex-direction: column; overflow: hidden; user-select: none; -webkit-user-select: none; }
#mt-app .mt-top {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
	padding: 12px 28px; background: var(--surface); flex: none;
}
#mt-app .mt-top-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
#mt-app .mt-top-who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mt-app .mt-top-who span { color: var(--muted); font-size: 14px; }
#mt-app .mt-top-progress { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
#mt-app .mt-top-progress span { color: var(--ink); font-weight: 700; }
#mt-app .mt-timer { justify-self: end; display: flex; align-items: baseline; gap: 12px; }
#mt-app .mt-timer-label { color: var(--muted); font-size: 14px; }
#mt-app .mt-timer-val { font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
#mt-app .mt-timer.is-low .mt-timer-val { color: var(--danger); }
#mt-app .mt-timer.is-crit .mt-timer-val { animation: mt-blink 1s steps(1) infinite; }
@keyframes mt-blink { 50% { opacity: .35; } }

/* Uch qismli tasma: yo'nalishlar bo'yicha javoblar to'lishi */
#mt-app .mt-band { display: flex; gap: 3px; height: 8px; background: var(--surface); padding: 0 0 0; flex: none; }
#mt-app .mt-band-seg { position: relative; background: color-mix(in srgb, var(--c) 18%, #fff); overflow: hidden; }
#mt-app .mt-band-seg i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--c); transition: width .3s ease; }

#mt-app .mt-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
#mt-app .mt-qwrap { overflow: auto; padding: 36px 48px 40px; display: flex; flex-direction: column; }
#mt-app .mt-q { max-width: 860px; width: 100%; margin: 0 auto; }
#mt-app .mt-qhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; font-size: 15px; }
#mt-app .mt-tag { color: var(--c); font-weight: 600; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 10%, #fff); }
#mt-app .mt-qpts { color: var(--muted); }
#mt-app .mt-qno { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
#mt-app .mt-qtext { font-size: 22px; line-height: 1.45; font-weight: 500; max-width: 64ch; }
#mt-app .mt-qtext p + p { margin-top: .6em; }
#mt-app .mt-qimg { margin: 20px 0 0; }
#mt-app .mt-qimg img { max-height: 340px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#mt-app .mt-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
#mt-app .mt-opt {
	appearance: none; display: flex; align-items: flex-start; gap: 16px; width: 100%; text-align: left;
	padding: 14px 18px; background: var(--surface); color: var(--ink); font: inherit; font-size: 18px; line-height: 1.45;
	border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: 0;
	transition: border-color .12s, background-color .12s;
}
#mt-app .mt-opt:hover { border-color: #9AA6BC; background: var(--surface); color: var(--ink); }
#mt-app .mt-letter {
	flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--line); font-weight: 700; font-size: 15px; color: var(--muted);
}
#mt-app .mt-otext { padding-top: 3px; }
#mt-app .mt-opt.is-sel { border-color: var(--primary); background: #EEF3FC; }
#mt-app .mt-opt.is-sel .mt-letter { background: var(--primary); border-color: var(--primary); color: #fff; }
#mt-app .mt-qnav { max-width: 860px; width: 100%; margin: 28px auto 0; display: flex; justify-content: space-between; }

#mt-app .mt-side { background: var(--surface); border-left: 1px solid var(--line); overflow: auto; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 20px; }
#mt-app .mt-nav-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
#mt-app .mt-nav-head em { margin-left: auto; font-style: normal; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
#mt-app .mt-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
#mt-app .mt-cell {
	appearance: none; height: 34px; padding: 0; font: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
	color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 6px; cursor: pointer; box-shadow: none;
}
#mt-app .mt-cell:hover { border-color: var(--c); background: #fff; color: var(--ink); }
#mt-app .mt-cell.is-done { background: var(--c); border-color: var(--c); color: #fff; }
#mt-app .mt-cell.is-cur { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
#mt-app .mt-btn-finish { margin-top: auto; background: #fff; color: var(--danger); border-color: var(--danger); padding: 14px; }
#mt-app .mt-btn-finish:hover { background: var(--danger); color: #fff; }
#mt-app .mt-hint { color: var(--muted); font-size: 13px; }

/* Modal */
#mt-app .mt-overlay { position: fixed; inset: 0; background: rgba(23, 33, 59, .55); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 5; }
#mt-app .mt-overlay[hidden] { display: none; }
#mt-app .mt-modal { background: #fff; border-radius: 12px; padding: 30px 32px; width: 100%; max-width: 480px; }
#mt-app .mt-modal h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
#mt-app .mt-modal h3.mt-warn { color: var(--danger); }
#mt-app .mt-modal p { margin-bottom: 10px; }
#mt-app .mt-modal .mt-row { margin-top: 20px; }
#mt-app .mt-modal > .mt-btn { margin-top: 14px; width: 100%; }

/* ---------------- Natija ---------------- */
#mt-app .mt-result-wrap { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; }
#mt-app .mt-res-label { color: var(--muted); margin-top: 24px; font-size: 15px; }
#mt-app .mt-score { display: flex; align-items: baseline; gap: 12px; margin-top: 4px; }
#mt-app .mt-score b { font-size: 76px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
#mt-app .mt-score span { font-size: 24px; color: var(--muted); font-variant-numeric: tabular-nums; }
#mt-app .mt-pbar { height: 10px; background: #E6EAF1; border-radius: 99px; margin-top: 18px; overflow: hidden; }
#mt-app .mt-pbar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
#mt-app .mt-pct { margin-top: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }

#mt-app table.mt-blocks { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 16px; border: 0; }
#mt-app .mt-blocks th { text-align: left; font-weight: 500; color: var(--muted); font-size: 14px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; }
#mt-app .mt-blocks td { padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); vertical-align: middle; background: none; }
#mt-app .mt-blocks td:first-child { font-weight: 600; }
#mt-app .mt-blocks td:first-child .mt-dot { margin-right: 10px; vertical-align: 1px; }
#mt-app .mt-blocks .mt-r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#mt-app .mt-blocks td b { font-size: 20px; }
#mt-app .mt-mini { display: block; width: 110px; height: 4px; margin: 6px 0 0 auto; background: #E6EAF1; border-radius: 4px; overflow: hidden; }
#mt-app .mt-mini i { display: block; height: 100%; background: var(--c); }
#mt-app .mt-meta { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 22px; }
#mt-app .mt-meta dt { color: var(--muted); font-size: 14px; }
#mt-app .mt-meta dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
#mt-app .mt-note { margin-top: 18px; padding: 10px 14px; background: #FBF1E6; border-radius: 8px; color: #7A4508; font-size: 15px; }
#mt-app .mt-result .mt-row { margin-top: 28px; }

#mt-app .mt-review { margin-top: 36px; }
#mt-app .mt-review h2 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
#mt-app .mt-rq { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line)); border-radius: 8px; padding: 18px 20px; margin-bottom: 12px; }
#mt-app .mt-rq .mt-qtext { font-size: 17px; }
#mt-app .mt-verdict { font-weight: 600; }
#mt-app .mt-rq.ok .mt-verdict { color: var(--man); }
#mt-app .mt-rq.no .mt-verdict { color: var(--danger); }
#mt-app .mt-rq .mt-qno { margin-left: 0; }
#mt-app .mt-rq .mt-verdict { margin-left: auto; }
#mt-app .mt-ropts { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
#mt-app .mt-ropt { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; padding: 6px 8px; border-radius: 6px; }
#mt-app .mt-ropt .mt-letter { width: 26px; height: 26px; font-size: 13px; }
#mt-app .mt-ropt.is-right { background: #E7F3EC; }
#mt-app .mt-ropt.is-right .mt-letter { background: var(--man); border-color: var(--man); color: #fff; }
#mt-app .mt-ropt.is-wrong { background: #FBEAE7; }
#mt-app .mt-ropt.is-wrong .mt-letter { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---------------- Moslashuvchanlik ---------------- */
@media (max-width: 960px) {
	#mt-app .mt-entry { grid-template-columns: 1fr; gap: 32px; padding-top: 64px; }
	#mt-app .mt-intro h1 { font-size: 32px; max-width: none; }
	#mt-app .mt-body { grid-template-columns: 1fr; overflow: auto; }
	#mt-app.mt-testing { overflow: hidden; }
	#mt-app .mt-qwrap { overflow: visible; padding: 24px 20px; }
	#mt-app .mt-side { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
	#mt-app .mt-cells { grid-template-columns: repeat(10, 1fr); }
	#mt-app .mt-top { grid-template-columns: 1fr auto; padding: 10px 16px; }
	#mt-app .mt-top-progress { display: none; }
	#mt-app .mt-qtext { font-size: 19px; }
	#mt-app .mt-opt { font-size: 17px; }
	#mt-app .mt-timer-label { display: none; }
	#mt-app .mt-timer-val { font-size: 26px; }
}
@media (max-width: 520px) {
	#mt-app .mt-card { padding: 22px; }
	#mt-app .mt-cells { grid-template-columns: repeat(7, 1fr); }
	#mt-app .mt-score b { font-size: 56px; }
	#mt-app .mt-comp-sum { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	#mt-app *, #mt-app *::before, #mt-app *::after { transition: none !important; animation: none !important; }
}

@media print {
	html.mt-lock, html.mt-lock body { overflow: visible !important; }
	body > *:not(#mt-app) { display: none !important; }
	#mt-app { position: static; overflow: visible; background: #fff; }
	#mt-app .mt-noprint { display: none !important; }
	#mt-app .mt-card { border: 0; padding: 0; }
	#mt-app .mt-result-wrap { padding: 0; }
	#mt-app .mt-rq { break-inside: avoid; }
}

#mt-app .mt-closed { padding: 14px 16px; margin-top: 18px; background: #FBF1E6; color: #7A4508; border-radius: 8px; font-size: 15px; }
