/* IntrestThink Tests — mobile-first quiz UI */

.ith-quiz {
	--ith-primary: #4F46E5;
	--ith-primary-hover: #4338CA;
	--ith-accent: #10B981;
	--ith-bg: #F8FAFC;
	--ith-surface: #FFFFFF;
	--ith-text: #0F172A;
	--ith-text-muted: #64748B;
	--ith-border: #E2E8F0;
	--ith-progress: #4F46E5;
	--ith-progress-track: #E2E8F0;
	--ith-correct: #10B981;
	--ith-incorrect: #EF4444;
	--ith-radius: 16px;
	--ith-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--ith-max-width: 640px;
	--ith-shadow: 0 10px 40px -12px rgba(15, 23, 42, 0.12);

	box-sizing: border-box;
	font-family: var(--ith-font);
	color: var(--ith-text);
	background: var(--ith-bg);
	padding: 1.25rem;
	border-radius: calc(var(--ith-radius) + 4px);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.ith-quiz *,
.ith-quiz *::before,
.ith-quiz *::after {
	box-sizing: border-box;
}

.ith-shell {
	max-width: var(--ith-max-width);
	margin: 0 auto;
	background: var(--ith-surface);
	border: 1px solid var(--ith-border);
	border-radius: var(--ith-radius);
	box-shadow: var(--ith-shadow);
	padding: 1.75rem 1.5rem;
}

.ith-logo {
	text-align: center;
	margin-bottom: 1rem;
}
.ith-logo img {
	max-height: 48px;
	width: auto;
}

.ith-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.ith-desc,
.ith-sub {
	color: var(--ith-text-muted);
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
}

.ith-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	width: 100%;
	padding: 0.85rem 1.25rem;
	font-size: 1rem;
	font-weight: 600;
	font-family: inherit;
	border-radius: calc(var(--ith-radius) - 4px);
	border: 2px solid transparent;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
	text-decoration: none;
	line-height: 1.2;
}

.ith-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ith-btn--primary {
	background: var(--ith-primary);
	color: #fff;
	border-color: var(--ith-primary);
}
.ith-btn--primary:hover:not(:disabled) {
	background: var(--ith-primary-hover);
	border-color: var(--ith-primary-hover);
}
.ith-btn--primary:active:not(:disabled) {
	transform: scale(0.98);
}

.ith-quiz[data-btn="outline"] .ith-btn--primary,
.ith-btn--outline {
	background: transparent;
	color: var(--ith-primary);
	border-color: var(--ith-primary);
}
.ith-quiz[data-btn="soft"] .ith-btn--primary {
	background: color-mix(in srgb, var(--ith-primary) 12%, transparent);
	color: var(--ith-primary);
	border-color: transparent;
}

/* Progress */
.ith-progress {
	margin-bottom: 1.25rem;
}
.ith-progress__steps {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem;
	margin-bottom: 0.55rem;
}
.ith-progress__step {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
	min-width: 0;
	background: none;
	border: 0;
	padding: 0;
	cursor: default;
	font-family: inherit;
	color: var(--ith-text-muted);
}
.ith-progress__icon {
	width: 28px;
	height: 28px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	line-height: 1;
	border: 1.5px solid var(--ith-border);
	background: var(--ith-surface);
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
	overflow: hidden;
}
.ith-progress__icon img {
	width: 16px;
	height: 16px;
	object-fit: contain;
}
.ith-progress__step.is-done .ith-progress__icon {
	background: color-mix(in srgb, var(--ith-primary) 14%, var(--ith-surface));
	border-color: var(--ith-primary);
}
.ith-progress__step.is-current .ith-progress__icon {
	background: var(--ith-primary);
	border-color: var(--ith-primary);
	color: #fff;
	transform: scale(1.12);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ith-primary) 22%, transparent);
}
.ith-progress__step-name {
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ith-progress__step.is-current .ith-progress__step-name {
	color: var(--ith-primary);
}
@media (max-width: 420px) {
	.ith-progress__step-name {
		display: none;
	}
	.ith-progress__icon {
		width: 24px;
		height: 24px;
		font-size: 12px;
	}
}
.ith-progress__track {
	height: 6px;
	background: var(--ith-progress-track);
	border-radius: 999px;
	overflow: hidden;
}
.ith-progress__bar {
	height: 100%;
	width: 0;
	background: var(--ith-progress);
	border-radius: 999px;
	transition: width 0.35s ease;
}
.ith-progress__label {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.8rem;
	color: var(--ith-text-muted);
	font-weight: 500;
}

/* Question + options */
.ith-question {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0 0 1rem;
	line-height: 1.4;
}
.ith-progress__ellipsis {
	flex: 0 0 auto;
	color: var(--ith-text-muted);
	font-weight: 700;
	padding: 0 0.15rem;
	align-self: center;
}
.ith-question img {
	display: block;
	max-width: 100%;
	max-height: 280px;
	width: auto;
	margin: 0.75rem auto;
	border-radius: calc(var(--ith-radius) - 4px);
}
.ith-options--images {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem;
}
.ith-option--image {
	padding: 0.45rem 0.5rem 0.6rem;
	text-align: center;
}
.ith-option--image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 160px;
	object-fit: contain;
	border-radius: 8px;
	background: #F8FAFC;
}
.ith-option-letter {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--ith-text-muted);
	margin-bottom: 0.25rem;
}
.ith-option-text {
	display: block;
}

.ith-options {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-bottom: 1.25rem;
}

.ith-option {
	display: block;
	width: 100%;
	text-align: left;
	padding: 0.9rem 1rem;
	font-size: 0.95rem;
	font-family: inherit;
	color: var(--ith-text);
	background: var(--ith-surface);
	border: 1.5px solid var(--ith-border);
	border-radius: calc(var(--ith-radius) - 6px);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
	line-height: 1.35;
}
.ith-option:hover {
	border-color: var(--ith-primary);
}
.ith-option--selected {
	border-color: var(--ith-primary);
	background: color-mix(in srgb, var(--ith-primary) 8%, var(--ith-surface));
	box-shadow: 0 0 0 1px var(--ith-primary);
}
.ith-option:focus-visible {
	outline: 2px solid var(--ith-primary);
	outline-offset: 2px;
}

/* Form */
.ith-form {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}
.ith-input {
	width: 100%;
	padding: 0.85rem 1rem;
	font-size: 1rem;
	font-family: inherit;
	border: 1.5px solid var(--ith-border);
	border-radius: calc(var(--ith-radius) - 6px);
	background: var(--ith-surface);
	color: var(--ith-text);
}
.ith-input:focus {
	outline: none;
	border-color: var(--ith-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ith-primary) 25%, transparent);
}
.ith-check {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-size: 0.875rem;
	color: var(--ith-text-muted);
	cursor: pointer;
}
.ith-check input {
	margin-top: 0.2rem;
	flex-shrink: 0;
}

/* Result */
.ith-score-card {
	text-align: center;
	padding: 1.25rem 0;
}
.ith-score-num {
	font-size: 2.5rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
}
.ith-band {
	display: inline-block;
	margin-top: 0.75rem;
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9rem;
	background: color-mix(in srgb, var(--band, var(--ith-primary)) 15%, transparent);
	color: var(--band, var(--ith-primary));
}
.ith-band-text {
	margin: 0.75rem 0 0;
	color: var(--ith-text-muted);
	font-size: 0.95rem;
}
.ith-percentile {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	color: var(--ith-text-muted);
}
.ith-disclaimer {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ith-border);
	font-size: 0.75rem;
	color: var(--ith-text-muted);
	line-height: 1.45;
}
.ith-badge {
	display: inline-block;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: color-mix(in srgb, var(--ith-accent) 18%, transparent);
	color: var(--ith-accent);
	margin-bottom: 0.75rem;
}

.ith-paywall {
	margin-top: 1.25rem;
	padding: 1.1rem;
	border: 1px dashed var(--ith-border);
	border-radius: calc(var(--ith-radius) - 4px);
	text-align: center;
}
.ith-paywall p {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: var(--ith-text-muted);
}

/* Categories */
.ith-section-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 1.5rem 0 0.75rem;
}
.ith-cats {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ith-cats li {
	margin-bottom: 0.75rem;
}
.ith-cat-name {
	font-weight: 600;
	font-size: 0.9rem;
}
.ith-cat-score {
	float: right;
	font-size: 0.85rem;
	color: var(--ith-text-muted);
}
.ith-cat-bar {
	clear: both;
	height: 6px;
	background: var(--ith-progress-track);
	border-radius: 999px;
	margin-top: 0.35rem;
	overflow: hidden;
}
.ith-cat-bar > div {
	height: 100%;
	background: var(--ith-progress);
	border-radius: 999px;
}

/* Review list */
.ith-review-item {
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--ith-border);
}
.ith-review-item:last-child {
	border-bottom: none;
}
.ith-review-item.is-correct .ith-review-mark {
	color: var(--ith-correct);
}
.ith-review-item.is-wrong .ith-review-mark {
	color: var(--ith-incorrect);
}
.ith-review-mark {
	font-weight: 700;
	font-size: 0.8rem;
	text-transform: uppercase;
}
.ith-review-q {
	font-weight: 600;
	margin: 0.25rem 0;
}
.ith-review-exp {
	font-size: 0.85rem;
	color: var(--ith-text-muted);
	margin: 0.35rem 0 0;
}

/* States */
.ith-error {
	color: var(--ith-incorrect);
	font-size: 0.9rem;
	margin: 0.75rem 0 0;
}
.ith-loading {
	text-align: center;
	color: var(--ith-text-muted);
	padding: 1rem 0;
}

.ith-screen[hidden] {
	display: none !important;
}

/* Dark helper */
.ith-quiz.ith-dark {
	/* vars are set via inline design; class is for any extra tweaks */
}

/* Report standalone page */
.ith-report-page {
	margin: 0;
	background: var(--ith-bg, #F8FAFC);
	padding: 2rem 1rem;
}
.ith-report-standalone {
	max-width: 720px;
	margin: 0 auto;
}

@media (min-width: 480px) {
	.ith-shell {
		padding: 2rem 2rem;
	}
	.ith-title {
		font-size: 1.75rem;
	}
}

/* Screen-reader only */
.ith-quiz .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
