/* LO Quiz Funnels. Colours and fonts come from CSS variables set per quiz. */
.lo-quiz {
	--lq-font-heading: Georgia, 'Times New Roman', serif;
	--lq-font-body: 'Helvetica Neue', Arial, sans-serif;
	--lq-text: #122E44;
	--lq-accent: #C4B19D;
	--lq-answer-bg: #E8E7E1;
	--lq-panel: rgba(246, 243, 245, 0.92);
	--lq-background: #F6F3F5;
	--lq-background-image: none;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: clamp(16px, 4vw, 56px) clamp(12px, 3vw, 40px);
	background-color: #F6F3F5;
	background-image: var(--lq-background-image), var(--lq-background);
	background-size: cover, cover;
	background-position: center, center;
	color: var(--lq-text);
	font-family: var(--lq-font-body);
	font-size: 16px;
	line-height: 1.6;
}
.lo-quiz *, .lo-quiz *::before, .lo-quiz *::after { box-sizing: border-box; }
/* Full screen: the quiz is the whole page (layout="fullscreen" or a blank template like Elementor Canvas). */
.lo-quiz--fullscreen {
	min-height: 100vh;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}
/* On desktop, pin the pattern to the window, so long pages don't stretch it. Touch
   browsers (iOS especially) handle fixed backgrounds badly, so they keep the default. */
@media (min-width: 481px) and (hover: hover) and (pointer: fine) {
	.lo-quiz[data-source="page"] { background-attachment: fixed, fixed; }
}
.lo-quiz__panel {
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(24px, 5vw, 56px);
	background: var(--lq-panel);
	border-radius: 12px;
}
/* Doubled class beats theme rules like ".elementor-kit-9 h2". */
.lo-quiz .lo-quiz__title {
	margin: 0 0 12px;
	font-family: var(--lq-font-heading);
	font-size: clamp(26px, 4.2vw, 36px);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	color: var(--lq-text);
}
.lo-quiz .lo-quiz__title:focus { outline: none; }
.lo-quiz__subtitle { margin: 0 0 24px; text-align: center; font-size: 17px; opacity: 0.85; }
.lo-quiz__eyebrow { margin: 0 0 8px; text-align: center; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.lo-quiz__body p, .lo-quiz__page-intro p { margin: 0 0 14px; }
.lo-quiz__intro .lo-quiz__body { text-align: center; margin-bottom: 28px; }
.lo-quiz__intro, .lo-quiz__pdf { text-align: center; }
.lo-quiz__page-intro:focus, .lo-quiz__eyebrow:focus { outline: none; }
.lo-quiz__page-intro p { text-align: center; }

.lo-quiz__progress { margin-bottom: 24px; }
.lo-quiz__progress-track { height: 4px; background: rgba(18, 46, 68, 0.12); border-radius: 4px; overflow: hidden; }
.lo-quiz__progress-bar { height: 100%; background: var(--lq-accent); transition: width 0.45s ease; }
/* 0.75 keeps this 12px text above the 4.5:1 contrast guideline (0.65 was about 4.4:1). */
.lo-quiz__progress-text { margin: 6px 0 0; font-size: 12px; text-align: right; opacity: 0.75; }

.lo-quiz__question { border: 0; margin: 0 0 32px; padding: 0; min-width: 0; }
.lo-quiz .lo-quiz__question-text {
	display: block;
	width: 100%;
	margin: 0 0 14px;
	padding: 0;
	font-family: var(--lq-font-heading);
	font-size: clamp(20px, 3vw, 24px);
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
	color: var(--lq-text);
}
.lo-quiz__question { scroll-margin-top: 16px; }
.lo-quiz__question.is-missing .lo-quiz__question-text { text-decoration: underline wavy rgba(160, 60, 60, 0.6); text-underline-offset: 6px; }
.lo-quiz__missing { display: none; margin: -4px 0 12px; text-align: center; font-size: 14px; color: #8a2b2b; }
.lo-quiz__question.is-missing .lo-quiz__missing { display: block; }
.lo-quiz__help { margin: -6px 0 12px; text-align: center; font-size: 14px; opacity: 0.8; }
.lo-quiz__answers { display: grid; gap: 10px; }
.lo-quiz__answer {
	position: relative;
	display: block;
	margin: 0;
	padding: 14px 18px;
	background: var(--lq-answer-bg);
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	font-size: 15px;
	line-height: 1.45;
	color: #000;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.lo-quiz__answer:active { transform: scale(0.985); }
@media (hover: hover) {
	.lo-quiz__answer:hover { border-color: var(--lq-accent); }
}
.lo-quiz__answer input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.lo-quiz__answer.is-selected,
.lo-quiz__answer:has(input:checked) { background: var(--lq-accent); border-color: var(--lq-accent); }
.lo-quiz__answer:has(input:focus-visible) { outline: 2px solid var(--lq-text); outline-offset: 2px; }

.lo-quiz__nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.lo-quiz .lo-quiz-button,
.lo-quiz__after .lo-quiz-button {
	display: inline-block;
	margin: 4px 0;
	padding: 13px 28px;
	background: var(--lq-accent);
	border: 1px solid var(--lq-accent);
	border-radius: 8px;
	color: #000;
	font-family: var(--lq-font-body);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: none;
}
/* Themes often colour focused and hovered buttons (Hello Elementor: pink with white
   text). A tapped button keeps focus on phones, so pin every state, more specifically
   than any theme rule, whatever order the stylesheets load in. */
.lo-quiz .lo-quiz-button:is(:hover, :focus, :active) { background-color: var(--lq-accent); border-color: var(--lq-accent); color: #000; text-decoration: none; }
@media (hover: hover) {
	.lo-quiz .lo-quiz-button:hover { filter: brightness(0.95); }
}
.lo-quiz .lo-quiz-button:focus-visible { outline: 2px solid var(--lq-text); outline-offset: 2px; }
.lo-quiz .lo-quiz-button[disabled] { opacity: 0.6; cursor: wait; }
.lo-quiz .lo-quiz-button.is-waiting, .lo-quiz .lo-quiz-button.is-waiting:hover, .lo-quiz .lo-quiz-button.is-waiting:focus { opacity: 0.45; cursor: not-allowed; filter: none; }
.lo-quiz .lo-quiz-button--ghost,
.lo-quiz .lo-quiz-button--secondary,
.lo-quiz .lo-quiz-button.lo-quiz-button--ghost:is(:hover, :focus, :active),
.lo-quiz .lo-quiz-button.lo-quiz-button--secondary:is(:hover, :focus, :active) { background-color: transparent; color: var(--lq-text); }
.lo-quiz .lo-quiz-button--ghost,
.lo-quiz .lo-quiz-button.lo-quiz-button--ghost:is(:hover, :focus, :active) { border-color: transparent; }
.lo-quiz .lo-quiz-button--ghost { text-transform: none; letter-spacing: 0; padding-left: 0; }

.lo-quiz__error { min-height: 1.4em; margin: 0 0 8px; color: #8a2b2b; font-size: 14px; text-align: center; }
.lo-quiz__error:empty { min-height: 0; }

.lo-quiz__form { max-width: 460px; margin: 0 auto; }
.lo-quiz__field { margin: 0 0 14px; }
/* ".lo-quiz .lo-quiz__field" outranks theme rules like input[type="email"] and label. */
.lo-quiz .lo-quiz__field label { display: block; margin-bottom: 4px; font-size: 14px; line-height: 1.4; }
.lo-quiz .lo-quiz__field input {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 14px;
	line-height: 1.4;
	box-shadow: none;
	border: 1px solid rgba(18, 46, 68, 0.25);
	border-radius: 8px;
	background: #fff;
	color: var(--lq-text);
	font-family: var(--lq-font-body);
	font-size: 16px;
}
.lo-quiz .lo-quiz__field input:focus { outline: 2px solid var(--lq-accent); outline-offset: 1px; border-color: var(--lq-accent); box-shadow: none; }
/* The quiz shows its own selected and pressed states, so skip the browser's tap flash. */
.lo-quiz__answer, .lo-quiz .lo-quiz-button, .lo-quiz__consent label { -webkit-tap-highlight-color: transparent; }
.lo-quiz__consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 14px; }
.lo-quiz .lo-quiz__consent label { display: block; line-height: 1.45; cursor: pointer; }
.lo-quiz__consent input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--lq-text); }
.lo-quiz__privacy { font-size: 13px; opacity: 0.8; }
.lo-quiz .lo-quiz__privacy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lo-quiz__hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Result heading as three labelled lines: a small label over each value. */
.lo-quiz .lo-quiz__title--lines { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.lo-quiz__title-line { display: block; }
.lo-quiz .lo-quiz__title-label {
	display: block;
	margin-bottom: 2px;
	font-family: var(--lq-font-body);
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.75;
}
.lo-quiz .lo-quiz__title-value { display: block; font-size: clamp(24px, 3.8vw, 32px); }
.lo-quiz .lo-quiz__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lo-quiz__result-body { margin: 24px 0; }
.lo-quiz__result-body ul { margin: 0 0 16px 1.2em; padding: 0; }
.lo-quiz__result-body li { margin-bottom: 6px; }
.lo-quiz__after { margin-top: 36px; padding-top: 28px; border-top: 1px solid rgba(18, 46, 68, 0.15); }
.lo-quiz .lo-quiz__after h3 { font-family: var(--lq-font-heading); font-size: 22px; font-weight: 400; letter-spacing: normal; text-transform: none; text-align: center; margin: 0 0 20px; color: var(--lq-text); }
.lo-quiz .lo-quiz__after h4 { font-family: var(--lq-font-body); font-size: 17px; font-weight: 700; letter-spacing: normal; text-transform: none; margin: 0 0 6px; color: var(--lq-text); }
.lo-quiz-cta { margin-bottom: 22px; }
.lo-quiz-cta p { margin: 0 0 8px; }

@media (max-width: 480px) {
	.lo-quiz { padding: 0; background-image: var(--lq-background); }
	.lo-quiz__panel { border-radius: 0; padding: 24px 18px; }
	/* Full screen on a phone: the panel fills the screen top to bottom. */
	.lo-quiz--fullscreen { display: flex; flex-direction: column; }
	.lo-quiz--fullscreen .lo-quiz__panel { flex: 1 0 auto; width: 100%; }
	/* Centred paragraphs are hard to read on a narrow screen: the intro's headline stays
	   centred, its paragraphs go left-aligned (decided 25 Nov). */
	.lo-quiz__intro .lo-quiz__body { text-align: left; }
	/* Main button full width, Back underneath it. */
	.lo-quiz__nav { flex-direction: column-reverse; align-items: stretch; gap: 2px; }
	.lo-quiz__nav > span:empty { display: none; }
	.lo-quiz .lo-quiz__nav .lo-quiz-button { width: 100%; text-align: center; }
	.lo-quiz .lo-quiz__nav .lo-quiz-button--ghost { padding-left: 28px; }
	/* Result: the PDF and call-to-action buttons full width too, so they line up. */
	.lo-quiz .lo-quiz__pdf .lo-quiz-button,
	.lo-quiz .lo-quiz__after .lo-quiz-button { display: block; width: 100%; text-align: center; }
}
/* Phones and short screens: the intro is longer than the screen, so the start button
   stays pinned to the bottom while people read, then settles at the end of the intro.
   The halo in the panel colour keeps text from running into it. */
@media (max-width: 480px), (max-height: 500px) {
	.lo-quiz .lo-quiz__intro .lo-quiz-button {
		position: sticky;
		bottom: 14px;
		z-index: 1;
		display: block;
		width: 100%;
		max-width: 420px;
		margin: 0 auto;
		padding-top: 15px;
		padding-bottom: 15px;
		box-shadow: 0 0 0 12px #F6F3F5, 0 10px 28px rgba(18, 46, 68, 0.2);
	}
}
/* Logo above the intro and the result, linked to the homepage by default (style.logo.link). */
.lo-quiz .lo-quiz__logo { display: block; width: 176px; max-width: 60%; height: auto; margin: 0 auto 22px; }
.lo-quiz .lo-quiz__logo-link { display: block; width: fit-content; max-width: 60%; margin: 0 auto 22px; border-radius: 4px; -webkit-tap-highlight-color: transparent; }
.lo-quiz .lo-quiz__logo-link .lo-quiz__logo { max-width: 100%; margin: 0; }
.lo-quiz .lo-quiz__logo-link:focus-visible { outline: 2px solid var(--lq-text); outline-offset: 6px; }
@media (min-width: 481px) {
	.lo-quiz .lo-quiz__logo { width: 210px; margin-bottom: 30px; }
	.lo-quiz .lo-quiz__logo-link { margin-bottom: 30px; }
	.lo-quiz .lo-quiz__logo-link .lo-quiz__logo { margin: 0; }
}

/* Light motion: each step fades and rises in; the result takes a little longer. */
@keyframes lo-quiz-enter {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}
.lo-quiz__intro, .lo-quiz__page, .lo-quiz__lead { animation: lo-quiz-enter 0.22s ease-out both; }
.lo-quiz__result { animation: lo-quiz-enter 0.45s ease-out both; }
.lo-quiz__result .lo-quiz__result-body, .lo-quiz__result .lo-quiz__pdf, .lo-quiz__result .lo-quiz__after { animation: lo-quiz-enter 0.45s ease-out 0.15s both; }

@media (prefers-reduced-motion: reduce) {
	.lo-quiz__progress-bar, .lo-quiz__answer { transition: none; }
	.lo-quiz__intro, .lo-quiz__page, .lo-quiz__lead, .lo-quiz__result,
	.lo-quiz__result .lo-quiz__result-body, .lo-quiz__result .lo-quiz__pdf, .lo-quiz__result .lo-quiz__after { animation: none; }
	.lo-quiz__answer:active { transform: none; }
}
