html {
	overflow-y: scroll;
}

.mqf-quiz-app {
	max-width: 900px;
	margin: 20px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---- Breadcrumb: Home > All Quizzes > Quiz Title ---- */
.mqf-breadcrumb {
	max-width: 900px;
	margin: 0 auto 14px;
	font-size: 13px;
	color: #777;
}

.mqf-breadcrumb a {
	color: #16233f;
	text-decoration: none;
}

.mqf-breadcrumb a:hover {
	text-decoration: underline;
}

.mqf-breadcrumb-sep {
	margin: 0 6px;
	color: #bbb;
}

.mqf-breadcrumb-current {
	color: #888;
}

/* ---- Start Screen (cover page shown before quiz begins) ---- */
.mqf-start-screen {
	max-width: 900px;
	margin: 0 auto;
	min-height: 420px;
	border-radius: 10px;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-color: #dbe1eb; /* fallback if no featured image set */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	box-shadow: 0 6px 20px rgba(22, 35, 63, 0.10);
}

.mqf-start-card {
	background: #fff;
	border-radius: 10px;
	padding: 36px 40px;
	max-width: 420px;
	width: 100%;
	text-align: center;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.mqf-start-title {
	font-size: 26px;
	font-weight: 800;
	color: #16233f;
	margin: 0 0 24px;
	line-height: 1.3;
}

.mqf-start-btn {
	display: block;
	width: 100%;
	padding: 14px;
	background: #16233f;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	margin-bottom: 22px;
}

.mqf-start-btn:hover {
	background: #223257;
}

.mqf-start-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
	color: #555;
}

.mqf-start-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.mqf-toggle-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}

.mqf-toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.mqf-toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: 0.2s;
	border-radius: 22px;
}

.mqf-toggle-slider::before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background-color: #fff;
	transition: 0.2s;
	border-radius: 50%;
}

.mqf-toggle-switch input:checked + .mqf-toggle-slider {
	background-color: #16233f;
}

.mqf-toggle-switch input:checked + .mqf-toggle-slider::before {
	transform: translateX(18px);
}

@media (max-width: 480px) {
	.mqf-start-screen {
		min-height: 320px;
		padding: 20px;
	}
	.mqf-start-card {
		padding: 26px 22px;
	}
}

.mqf-quiz-description {
	max-width: 900px;
	margin: 0 auto 16px;
	font-size: 15px;
	line-height: 1.6;
	color: #555;
	text-align: center;
}

.mqf-quiz-card {
	border: 1px solid #b9c2d0;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 6px 20px rgba(22, 35, 63, 0.10);
}

.mqf-quiz-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid #eee;
}

.mqf-quiz-title-small {
	font-size: 16px;
	font-weight: 700;
	color: #16233f;
}

a.mqf-quiz-title-small {
	text-decoration: none;
	text-underline-offset: 3px;
}

a.mqf-quiz-title-small:hover {
	color: #16233f;
	/* text-decoration: underline; */
	text-decoration-color: #16233f;
	box-shadow: none;
}

/* Theme's big default post title, hidden once our small title takes over */
.mqf-hidden-title {
	display: none !important;
}

.mqf-quiz-meta {
	display: flex;
	align-items: center;
	gap: 14px;
}

.mqf-quiz-bonus {
	display: none;
	color: #1a8a4a;
	font-weight: 700;
	font-size: 14px;
}

.mqf-quiz-bonus.mqf-bonus-negative {
	color: #d33;
}

.mqf-quiz-timeup {
	color: #d33;
	font-weight: 700;
	font-size: 13px;
	background: #fdecec;
	padding: 5px 12px;
	border-radius: 20px;
	white-space: nowrap;
}

.mqf-quiz-timer {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 3px solid #16233f;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
	flex-shrink: 0;
	transition: border-color 0.2s ease;
}

.mqf-quiz-timer.mqf-timer-danger {
	border-color: #d33;
	color: #d33;
}

.mqf-quiz-timer.mqf-timer-up {
	border-color: #d33;
	background: #fdecec;
	color: #d33;
}

.mqf-quiz-progress {
	font-size: 15px;
	color: #555;
	background: #f2f2f2;
	padding: 6px 12px;
	border-radius: 20px;
	white-space: nowrap;
}

.mqf-quiz-score {
	font-size: 15px;
	font-weight: 600;
	color: #16233f;
	background: #eef1f8;
	padding: 6px 12px;
	border-radius: 20px;
	white-space: nowrap;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.mqf-quiz-score.mqf-score-negative {
	color: #d33;
	background: #fdecec;
}

.mqf-quiz-body {
	padding: 24px 20px 28px;
}

.mqf-quiz-question {
	font-size: 18px;
	font-weight: 600;
	color: #16233f;
	text-align: center;
	margin: 0 0 28px !important;
	line-height: 1.4;
}

/* ---- Responsive image: not too big, not too small, on mobile or desktop ---- */
.mqf-quiz-image-wrap {
	width: 100%;
	max-width: 350px;
	margin: 0 auto 24px;
	aspect-ratio: 16 / 9;
	background: #f5f5f5;
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mqf-quiz-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.mqf-options-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	max-width: 680px;
	margin: 0 auto;
}

@media (max-width: 480px) {
	.mqf-options-grid {
		grid-template-columns: 1fr;
	}
	.mqf-quiz-image-wrap {
		max-width: 100%;
	}
}

.mqf-option {
	position: relative;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 500;
	text-align: center;
	border: 2px solid #9aa9c2;
	border-radius: 6px;
	background: #fff;
	color: #16233f;
	cursor: pointer;
	transition: all 0.15s ease;
}

.mqf-option:hover:not(:disabled) {
	background: #f0f7fd;
	border-color: #14599D;
	color: #000;
	box-shadow: none;
}

.mqf-option:disabled {
	cursor: default;
	background: transparent;
	color: #000;
	box-shadow: none;
}

.mqf-option.mqf-correct {
	border-color: #1a8a4a;
	background: #eaf7ef;
	color: #1a8a4a;
	font-weight: 700;
	opacity: 1;
}

.mqf-option.mqf-incorrect {
	border-color: #d33;
	background: #fdecec;
	color: #d33;
	font-weight: 700;
	opacity: 1;
}

.mqf-option.mqf-dim {
	opacity: 0.45;
}

/* Tick / cross badge shown top-right of the answer once revealed */
/* Correct / incorrect icon badge */
.mqf-answer-icon {
	position: absolute;
	top: -9px;
	right: -9px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mqf-answer-icon svg {
	width: 14px;
	height: 14px;
	display: block;
	fill: currentColor;
}

.mqf-icon-correct {
	background: #1a8a4a;
}

.mqf-icon-wrong {
	background: #d33;
}

.mqf-quiz-explanation {
	margin-top: 18px;
	padding: 14px 16px;
	background: #f7f8fb;
	border-left: 4px solid #16233f;
	font-size: 14px;
	line-height: 1.6;
	color: #333;
	border-radius: 4px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.mqf-explanation-icon {
	flex: 0 0 auto;
	font-size: 18px;
	line-height: 1.6;
}

.mqf-explanation-text {
	min-width: 0;
}

.mqf-next-btn {
	display: block;
	margin: 24px auto 0;
	padding: 12px 32px;
	background: #16233f;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.mqf-next-btn:hover:not(:disabled) {
	background: #223257;
}

.mqf-next-btn:disabled {
	background: #c7ccd6;
	cursor: not-allowed;
}

.mqf-results {
	text-align: center;
	padding: 20px 0;
}

.mqf-results-label {
	font-size: 14px;
	font-weight: 600;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0 0 4px;
}

.mqf-results-score {
	font-size: 42px;
	font-weight: 800;
	color: #16233f;
}

.mqf-results-sub {
	color: #666;
	margin-top: 6px;
}

.mqf-results-breakdown {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 12px;
	margin-top: 14px;
}

.mqf-results-correct,
.mqf-results-wrong,
.mqf-results-missed {
	font-size: 14px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 20px;
}

.mqf-results-correct {
	color: #1a8a4a;
	background: #eaf7ef;
}

.mqf-results-wrong {
	color: #d33;
	background: #fdecec;
}

.mqf-results-missed {
	color: #8a6d1a;
	background: #fbf3df;
}

.mqf-quiz-empty,
.mqf-quiz-loading {
	text-align: center;
	color: #888;
	padding: 40px 0;
}

/* ---- Archive page (/quiz/) - grid of all quizzes ---- */
.mqf-quiz-archive {
	max-width: 1100px;
	margin: 30px auto;
	padding: 0 20px;
}

.mqf-quiz-archive-title {
	font-size: 28px;
	font-weight: 800;
	color: #16233f;
	margin-bottom: 24px;
}

.mqf-quiz-archive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.mqf-quiz-archive-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #d8dde5;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 4px 14px rgba(22, 35, 63, 0.08);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mqf-quiz-archive-card:hover {
	transform: translateY(-3px);
	/* box-shadow: 0 8px 22px rgba(22, 35, 63, 0.14); */
}

.mqf-quiz-archive-thumb {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #f0f2f6;
	overflow: hidden;
}

.mqf-quiz-archive-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mqf-quiz-archive-card-body {
	padding: 16px 18px 20px;
}

.mqf-quiz-archive-card-title {
	font-size: 17px;
	font-weight: 700;
	color: #16233f;
	margin: 0 0 8px;
}

.mqf-quiz-archive-desc {
	font-size: 14px;
	color: #666;
	line-height: 1.5;
	margin: 0;
}

.mqf-quiz-archive-empty {
	color: #888;
	padding: 20px 0;
}

.mqf-quiz-archive-pagination {
	margin-top: 30px;
	text-align: center;
}

@media (max-width: 600px) {

	/* =========================
	   QUIZ HEADER
	   ========================= */

	.mqf-quiz-header {
		display: block;
		padding: 14px 12px;
		position: relative;
	}

	/* Quiz title — first row */
	.mqf-quiz-title-small {
		display: block;
		width: 100%;
		text-align: center;
		font-size: 15px;
		font-weight: 700;
		line-height: 1.35;
		margin: 0 0 12px;
	}

	/* =========================
	   META ROW
	   Timer | Questions | Score
	   ========================= */

	.mqf-quiz-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 8px;
	flex-wrap: nowrap;
	position: relative;
}

	/* Timer — LEFT */
.mqf-quiz-timer {
	width: 40px;
	height: 40px;
	min-width: 40px;
	flex: 0 0 40px;
	font-size: 14px;
	border-width: 3px;
	position: relative;
	z-index: 2;
}

	/* Questions — CENTER */
	.mqf-quiz-progress {
		flex: 0 0 auto;
		width: auto;
		min-width: 58px;
		text-align: center;
		font-size: 15px;
		padding: 6px 10px;
		white-space: nowrap;
	}

	/* Score — RIGHT */
	.mqf-quiz-score {
		flex: 0 0 auto;
		font-size: 15px;
		padding: 6px 10px;
		white-space: nowrap;
	}

	/* Bonus must not create a 4th item in the mobile header */
	.mqf-quiz-bonus {
		display: none !important;
	}

	/* Time's Up message is NOT part of the 3-column header */
.mqf-quiz-timeup {
	position: absolute;
	left: 40px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;

	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	color: #d33;
	background: #fdecec;

	padding: 6px 8px 6px 10px;
	border-radius: 16px;
	white-space: nowrap;

	pointer-events: none;
}

}