/* Tomten.se Julquiz: keep the accessible legend inside the question card. */
.tomten-opt-quiz .tomten-opt-quiz-form,
.tomten-opt-quiz .tomten-opt-question {
	min-width: 0;
	min-inline-size: 0;
}

.tomten-opt-quiz .tomten-opt-question {
	display: flow-root;
	padding: clamp(1rem, 3vw, 1.6rem);
	color: #2d2926;
	background: #fff;
}

.tomten-opt-quiz .tomten-opt-question > legend {
	/* A floated legend participates in normal layout instead of cutting the
	   fieldset border. Keep fieldset/legend semantics and native radio groups. */
	float: left;
	display: flex;
	align-items: flex-start;
	gap: .7rem;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1rem;
	padding: 0;
	color: #2d2926;
	font-size: 1.08rem;
	font-weight: 750;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.tomten-opt-quiz .tomten-opt-question > legend > span {
	flex: 0 0 1.8rem;
	align-self: flex-start;
}

.tomten-opt-quiz .tomten-opt-question > legend + * {
	clear: both;
}

.tomten-opt-quiz .tomten-opt-answer {
	min-width: 0;
	min-height: 48px;
	color: #2d2926;
	line-height: 1.5;
}

.tomten-opt-quiz .tomten-opt-answer > input[type="radio"] {
	flex: 0 0 1rem;
	width: 1rem;
	height: 1rem;
	margin: .25em 0 0;
}

.tomten-opt-quiz .tomten-opt-answer > span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.tomten-opt-quiz .tomten-opt-answer:has(input:checked):not(.is-correct):not(.is-wrong) {
	border-color: #8f1d2c;
	background: #fff1e7;
}

.tomten-opt-quiz .tomten-opt-answer:focus-within {
	outline: 2px solid #8f1d2c;
	outline-offset: 2px;
}

.tomten-opt-quiz .tomten-opt-button:focus-visible {
	outline: 2px solid #8f1d2c;
	outline-offset: 4px;
}

@media (max-width: 620px) {
	.tomten-opt-quiz .tomten-opt-intro {
		padding: 1.1rem;
	}

	.tomten-opt-quiz .tomten-opt-button {
		width: 100%;
		min-height: 48px;
	}
}
