.quiz-app {
	--quiz-app-accent: #1b1f3b;
	--quiz-app-accent-light: #2e335c;
	--quiz-app-bg: #ffffff;
	--quiz-app-border: #e3e5ec;
	--quiz-app-text: #1d2027;
	--quiz-app-heading: #1d2027;
	--quiz-app-muted: #6b7080;
	--quiz-app-radius: 10px;
	--quiz-app-width: 680px;

	width: var( --quiz-app-width );
	margin: 0 auto;
	background: var( --quiz-app-bg );
	border: 1px solid var( --quiz-app-border );
	border-radius: var( --quiz-app-radius );
	padding: 40px;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.04 );
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var( --quiz-app-text );
	box-sizing: border-box;
}

.quiz-app * {
	box-sizing: border-box;
}

.quiz-app-progress {
	height: 6px;
	background: var( --quiz-app-border );
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 32px;
}

.quiz-app-progress-bar {
	height: 100%;
	width: 0;
	background: var( --quiz-app-accent );
	transition: width 0.3s ease;
}

.quiz-app-step {
	display: none;
}

.quiz-app-step.active {
	display: block;
	animation: quiz-app-fade-in 0.25s ease;
}

@keyframes quiz-app-fade-in {
	from {
		opacity: 0;
		transform: translateY( 6px );
	}
	to {
		opacity: 1;
		transform: translateY( 0 );
	}
}

.quiz-app-title {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 16px;
	letter-spacing: -0.01em;
	color: var( --quiz-app-heading );
}

.quiz-app-intro-text {
	color: var( --quiz-app-muted );
	font-size: 16px;
	line-height: 1.6;
	margin-bottom: 28px;
}

.quiz-app-question-number {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var( --quiz-app-muted );
	margin-bottom: 10px;
}

.quiz-app-question-text {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 24px;
	line-height: 1.35;
	color: var( --quiz-app-heading );
}

.quiz-app-answers {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 28px;
}

.quiz-app-answer-option {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1.5px solid var( --quiz-app-border );
	border-radius: 8px;
	padding: 14px 16px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	font-size: 15px;
}

.quiz-app-answer-option:hover {
	border-color: var( --quiz-app-accent-light );
}

.quiz-app-answer-option input[type="radio"] {
	accent-color: var( --quiz-app-accent );
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.quiz-app-answer-option:has( input:checked ),
.quiz-app-answer-option.is-selected {
	border-color: var( --quiz-app-accent );
	background: #f5f6fb;
}

.quiz-app-step-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.quiz-app-btn {
	appearance: none;
	border: none;
	border-radius: 6px;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	background: var( --quiz-app-accent );
	color: #fff;
	transition: opacity 0.15s ease;
}

.quiz-app-btn:hover {
	opacity: 0.9;
}

.quiz-app-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.quiz-app-btn-secondary {
	background: transparent;
	color: var( --quiz-app-text );
	border: 1.5px solid var( --quiz-app-border );
}

.quiz-app-start-btn {
	width: 100%;
}

.quiz-app-next-btn,
.quiz-app-submit-btn {
	margin-left: auto;
}

.quiz-app-field {
	margin-bottom: 16px;
}

.quiz-app-field label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
}

.quiz-app-field input[type="text"],
.quiz-app-field input[type="email"] {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var( --quiz-app-border );
	border-radius: 6px;
	font-size: 15px;
}

.quiz-app-field input[type="text"]:focus,
.quiz-app-field input[type="email"]:focus {
	outline: none;
	border-color: var( --quiz-app-accent );
}

.quiz-app-optin-field label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 14px;
	color: var( --quiz-app-muted );
}

.quiz-app-honeypot {
	display: none !important;
}

.quiz-app-step-error {
	color: #b32d2e;
	font-size: 14px;
	margin-top: 10px;
}

.quiz-app-loading {
	text-align: center;
	color: var( --quiz-app-muted );
	padding: 20px 0;
}

.quiz-app-error {
	background: #fcf0f1;
	color: #b32d2e;
	padding: 12px 16px;
	border-radius: 6px;
	margin-top: 16px;
}

/* Results — score gauge */
.quiz-app-scoreboard {
	margin: 0 0 32px;
}

.quiz-app-gauge {
	position: relative;
	width: 100%;
	max-width: 380px;
	margin: 0 auto;
	aspect-ratio: 1 / 1;
}

.quiz-app-gauge-svg {
	width: 100%;
	height: 100%;
	display: block;
}

.quiz-app-gauge-track {
	fill: none;
	stroke: var( --quiz-app-border );
	stroke-width: 14;
}

.quiz-app-gauge-progress {
	fill: none;
	stroke: var( --quiz-app-score-color, var( --quiz-app-accent ) );
	stroke-width: 14;
	stroke-linecap: round;
	transition: stroke-dasharray 0.9s ease;
}

.quiz-app-gauge-dots {
	fill: none;
	stroke: var( --quiz-app-border );
	stroke-width: 2;
	stroke-dasharray: 1 7;
	stroke-linecap: round;
}

.quiz-app-gauge-knob {
	fill: var( --quiz-app-bg );
	stroke: var( --quiz-app-score-color, var( --quiz-app-accent ) );
	stroke-width: 5;
}

.quiz-app-gauge-inner {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0 25%;
}

.quiz-app-gauge-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	line-height: 1.35;
	color: var( --quiz-app-heading );
	margin-bottom: 4px;
}

.quiz-app-gauge-value {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 2px;
	color: var( --quiz-app-heading );
}

.quiz-app-gauge-number {
	font-size: 46px;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.quiz-app-gauge-max {
	font-size: 20px;
	font-weight: 600;
	opacity: 0.75;
}

.quiz-app-gauge-rule {
	width: 46px;
	height: 2px;
	border-radius: 2px;
	background: var( --quiz-app-score-color, var( --quiz-app-accent ) );
	margin: 7px 0 5px;
}

.quiz-app-gauge-level {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	line-height: 1.3;
	color: var( --quiz-app-score-color, var( --quiz-app-accent ) );
}

.quiz-app-gauge-sublevel {
	font-size: 11px;
	line-height: 1.35;
	color: var( --quiz-app-muted );
	margin-top: 3px;
}

/* Results — score range bar */
.quiz-app-scale {
	display: flex;
	gap: 10px;
	margin: 22px auto 0;
	padding: 16px 18px;
	border: 1px solid var( --quiz-app-border );
	border-radius: 999px;
	max-width: 560px;
}

.quiz-app-scale-segment {
	flex: 1;
	text-align: center;
	min-width: 0;
}

.quiz-app-scale-bar {
	position: relative;
	height: 6px;
	border-radius: 999px;
	background: var( --seg-color );
	opacity: 0.45;
	margin-bottom: 9px;
}

.quiz-app-scale-segment.is-active .quiz-app-scale-bar {
	opacity: 1;
}

.quiz-app-scale-dot {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 12px;
	transform: translate( -50%, -50% );
	border-radius: 50%;
	background: var( --quiz-app-bg );
	border: 3px solid var( --seg-color );
}

.quiz-app-scale-range {
	font-size: 13px;
	font-weight: 700;
	color: var( --quiz-app-heading );
	line-height: 1.3;
}

.quiz-app-scale-name {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	line-height: 1.35;
	color: var( --seg-color );
	margin-top: 2px;
	opacity: 0.75;
}

.quiz-app-scale-segment.is-active .quiz-app-scale-name {
	opacity: 1;
}

/* Results */
.quiz-app-result-category {
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 6px;
	color: var( --quiz-app-heading );
}


.quiz-app-result-summary {
	font-size: 16px;
	line-height: 1.6;
	margin-bottom: 24px;
}

.quiz-app-result-block h4 {
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var( --quiz-app-muted );
	margin: 24px 0 10px;
	font-weight: 700;
}

.quiz-app-result-block ul {
	margin: 0;
	padding-left: 20px;
	line-height: 1.7;
}

.quiz-app-result-note {
	margin-top: 20px;
	font-size: 13px;
	color: var( --quiz-app-muted );
}

.quiz-app-cta {
	text-align: center;
	margin: 32px 0 8px;
}

.quiz-app-cta a {
	display: inline-block;
	background: var( --quiz-app-accent );
	color: #fff !important;
	padding: 15px 32px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
}



@media ( max-width: 768px ) {
	.quiz-app {
		padding: 24px 20px;
		width:100%;
	}

	.quiz-app-title {
		font-size: 22px;
	}

	.quiz-app-question-text {
		font-size: 19px;
	}

	.quiz-app-gauge {
		max-width: 250px;
	}

	.quiz-app-gauge-number {
		font-size: 38px;
	}

	.quiz-app-gauge-max {
		font-size: 17px;
	}

	.quiz-app-scale {
		gap: 8px;
		padding: 14px 12px;
		border-radius: 14px;
	}

	.quiz-app-scale-range {
		font-size: 11px;
	}

	.quiz-app-scale-name {
		font-size: 9px;
		letter-spacing: 0.03em;
	}
}
