/* Quiz / hard-test / easy-test fallback */
.topic-categories {
	background: var(--card, #fff);
	border-bottom: 1px solid var(--line, #e6e9ef);
	padding: 12px 0;
	margin-bottom: 20px;
}
.topic-categories__wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}
.topic-categories__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #eef1f6;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink, #11141a);
	cursor: default;
	border: 2px solid transparent;
}
.topic-categories__item.is-active {
	background: #eaf0fb;
	border-color: var(--accent, #4f7bd6);
	color: var(--accent, #4f7bd6);
}
.topic-categories__item-icon { font-size: 16px; line-height: 1; }

.quiz__container { padding-bottom: 40px; }

.quiz-timer {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 24px;
	padding: 20px 24px !important;
}
.quiz-timer__counter { flex: 0 0 auto; }
.quiz-timer__inner-text {
	font-size: 18px;
	font-weight: 800;
	fill: #e03939;
}
.quiz-timer__title { font-weight: 600; font-size: 16px; }
.quiz-timer__display { display: block; font-size: 28px; font-weight: 800; margin-top: 4px; }
.quiz-timer__display span { font-size: 14px; font-weight: 600; margin-left: 6px; }
.quiz-timer__subtitle { margin-top: 8px; color: var(--muted, #6b7280); font-size: 14px; }
.test-hard { color: #c23a3a; font-weight: 700; }

.quiz__header { margin-bottom: 24px; }
.quiz__progress-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 10px;
	font-weight: 600;
}
.quiz__counter-active { color: var(--accent, #4f7bd6); font-size: 20px; }
.quiz__percentage { color: var(--muted, #6b7280); font-size: 14px; }
.quiz__progress-bar {
	height: 6px;
	background: #e8eaf4;
	border-radius: 99px;
	overflow: hidden;
}
.quiz__progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--accent, #4f7bd6), var(--green, #3ec37a));
	border-radius: 99px;
	transition: width 0.25s ease;
}

/* Только одно задание видимо (пока работает fallback-JS) */
.quiz__item {
	display: none;
	margin-bottom: 32px;
	padding: 24px;
	background: var(--card, #fff);
	border-radius: var(--radius, 16px);
	box-shadow: var(--shadow, 0 8px 24px -12px rgba(17, 20, 26, 0.12));
	border: 1px solid var(--line, #e6e9ef);
}
.quiz__item.active { display: block; }

.quiz__title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 20px;
}
.quiz__title-number { color: var(--accent, #4f7bd6); margin-right: 6px; }

.quiz__list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.quiz__list.is-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}
.quiz__list li, .quiz-statements__item {
	padding: 12px 14px;
	background: #f7f8fb;
	border-radius: 12px;
	font-size: 14px;
}
.quiz-number, .quiz__option-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 6px;
	border-radius: 8px;
	background: var(--accent, #4f7bd6);
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	margin-right: 10px;
}

.quiz__options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.quiz__options--radio .quiz-option { border-radius: 12px; }
.quiz-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1.5px solid var(--line, #e6e9ef);
	border-radius: 12px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.quiz-option:hover { border-color: var(--accent, #4f7bd6); background: #fafbff; }
.quiz-option:has(:checked) {
	border-color: var(--green, #3ec37a);
	background: #f0fdf6;
}
.quiz-option__radio, .quiz-option__checkbox { margin-top: 3px; flex: 0 0 auto; }
.quiz-option__text { font-size: 15px; line-height: 1.45; }

/* easy-test: варианты с картинками */
.quiz__option-content {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}
.quiz__option-icon {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 10px;
	flex-shrink: 0;
}
.quiz__option-text { font-size: 15px; font-weight: 500; }
.quiz__input { margin-top: 6px; flex-shrink: 0; }

.quiz__images-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}
.quiz__image-item {
	text-align: center;
}
.quiz-image {
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--line, #e6e9ef);
	background: #f7f8fb;
}
.quiz-image img { display: block; width: 100%; height: auto; }

.info-msg {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 24px;
	padding: 16px 18px;
	background: #eaf3fb;
	border-radius: 12px;
	font-size: 14px;
	color: #2a4a6e;
}

/* Навигация (добавляется скриптом) */
.quiz-nav-fallback {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	align-items: center;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--line, #e6e9ef);
}
.quiz-nav-fallback button {
	font: inherit;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	background: linear-gradient(180deg, #5a8ae8, #4f7bd6);
	color: #fff;
}
.quiz-nav-fallback button[disabled] { opacity: 0.45; cursor: not-allowed; }
.quiz-nav-fallback .quiz-nav-fallback__ghost {
	background: var(--card, #fff);
	color: var(--ink);
	border: 1.5px solid var(--line, #e6e9ef);
}

.quiz-loading { display: none !important; }

.popup-result, .quiz__popup { /* попап результатов */ }
.open-modal { cursor: pointer; }
