/*
 * /quiz (page-quiz.php) on FUSS light, over the page frame (css/frame.css) and /contact's fields,
 * labels, errors and button (css/contact.css). Figma: FUSS file, page "Quiz" (4503:2).
 * Content at most 980px wide; the top bar and footer run the full width. One question per screen
 * with js/quiz.js (.is-stepped); without it the whole form shows at once.
 */

/* Over v2.css's white page, so the bounce at either end stays FUSS light. */
html:has(body.fuss-quiz),
html.is-v2:has(body.fuss-quiz),
html.is-v2 body.fuss-v2.fuss-quiz {
	background: #e7e9e0;
}

.fqPage {
	/* Where the second of four columns starts: the answers, fields and buttons line up on it. */
	--c2: calc((100% - 3 * var(--m)) / 4 + var(--m));
	--line: clamp(22px, 2.5vw, 36px);
}

.fqForm {
	max-width: calc(980px + 2 * var(--m));
	margin: 0 auto;
	padding: 0 var(--m) 168px;
	box-sizing: border-box;
}

.fqPage .fqSr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Intro ---------- */

.fqIntro {
	padding-top: 72px;
}

.fqPage .fqGiant {
	margin: 0 0 0 -.045em;
	padding: 0;
	font-size: min(12.6vw, 120px);
	line-height: .86;
	font-weight: 400;
	letter-spacing: -.035em;
	text-wrap: balance;
}

.fqPage .fqLine {
	margin-top: 36px;
	font-size: var(--line);
	line-height: 1.2;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.fqPage .fqStart {
	margin-top: 48px;
}

.fqPage .fqInfo {
	padding: 128px 0 0;
	gap: 28px var(--m);
}

.fqPage .fqInfo .fcLabel + p a {
	display: inline-block;
	margin-top: 0;
}

.fqGiant:focus,
.fqAsk:focus {
	outline: none;
}

/* ---------- A question: the line, then the answers on thin ink rules ---------- */

.fqPage .fqQuestion {
	min-width: 0;
	margin: 0;
	padding: 72px 0 0;
	border: 0;
}

.fqPage .fqProgress {
	opacity: .6;
}

/* Floated, so the legend lays out like any block. */
.fqPage .fqAsk {
	float: left;
	width: 100%;
	margin: 24px 0 0 -.03em;
	padding: 0;
	font-size: min(6.1vw, 88px);
	line-height: .955;
	font-weight: 400;
	letter-spacing: -.03em;
	text-wrap: balance;
}

.fqAnswers {
	clear: both;
	padding-top: 64px;
}

.fqAnswer {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: var(--m);
	padding: 14px 0;
	border-bottom: 1px solid var(--ink);
	cursor: pointer;
}

.fqAnswer input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.fqPage .fqKey {
	grid-column: 1;
	align-self: start;
	padding-top: calc((var(--line) * 1.2 - 16.8px) / 2);
	opacity: .5;
}

/* Hover and chosen: the MONEY pill behind the words. */
.fqWords {
	grid-column: 2 / -1;
	justify-self: start;
	margin: -7px -20px;
	padding: 7px 20px;
	border-radius: 29px;
	font-size: var(--line);
	line-height: 1.2;
	letter-spacing: -.01em;
	transition: background-color .15s;
	pointer-events: none;
}

@media (hover: hover) {
	.fqAnswer:hover .fqWords {
		background: var(--green);
	}
}

.fqAnswer input:checked ~ .fqWords {
	background: var(--green);
}

.fqAnswer input:focus-visible ~ .fqWords {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

.fqQuestion.is-invalid .fqAnswer {
	border-bottom-color: var(--red);
}

.fqQuestion > .fcError {
	margin-left: var(--c2);
}

.fqNav {
	padding: 48px 0;
}

.fqPage .fqBack {
	font-size: 15px;
	line-height: 20px;
	opacity: .6;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.fqPage .fqBack:hover {
	opacity: 1;
}

.fqPage .fqBack:focus-visible,
.fqPage .fqPill:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
	border-radius: 2px;
}

/* ---------- One more: "Somewhere else" opens a line in place ---------- */

.fqElse {
	padding-top: 28px;
}

.fqNext {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 24px 0 0 var(--c2);
}

.fqPage .fqPill {
	height: 36px;
	padding: 0 16px;
	border: 1px solid var(--ink);
	border-radius: 18px;
	font-size: 15px;
	line-height: 20px;
	transition: background-color .2s;
}

.fqPage .fqPill:hover {
	background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.fqHint {
	font-size: 15px;
	line-height: 20px;
	color: color-mix(in srgb, var(--ink) 62%, var(--light));
}

/* ---------- Last step ---------- */

.fqSend {
	padding-top: 72px;
}

.fqSendHead .fqAsk {
	float: none;
}

.fqPage .fqSendHead .fqLine {
	margin-top: 24px;
}

.fqFields {
	padding-top: 96px;
}

.fqSend.has-summary .fqSendHead {
	display: none;
}

.fqSend.has-summary .fqFields {
	padding-top: 0;
}

.fqSummary[hidden],
.fqPage .fcError[hidden] {
	display: none;
}

.fqSendRow {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: var(--m);
	align-items: center;
	margin-top: 56px;
}

.fqSendRow > .fqBack {
	grid-column: 1;
	justify-self: start;
}

.fqSendGo {
	grid-column: 2 / -1;
	display: flex;
	align-items: center;
	gap: 24px;
}

.fqPage .fqPriv {
	font-size: 15px;
	line-height: 20px;
	color: color-mix(in srgb, var(--ink) 62%, var(--light));
}

.fqPriv a {
	color: var(--ink);
}

.fqPage .fqSendBtn[aria-busy="true"] {
	cursor: progress;
}

/* ---------- One screen at a time (js/quiz.js) ---------- */

.fqPage.is-stepped .fqStep,
.fqPage.is-stepped .fqElse {
	display: none;
}

.fqPage.is-stepped .fqStep.is-on,
.fqPage.is-stepped .fqElse.is-open {
	display: block;
}

.fqPage.is-stepped .fqForm {
	padding-bottom: 0;
	min-height: calc(100vh - 48px);
	min-height: calc(100svh - 48px);
}

.fqPage.is-stepped .fqIntro {
	padding-bottom: 168px;
}

/* The questions and the last step stop 60px short of the footer (the intro has its own room). */
.fqPage.is-stepped:not(.at-intro) .fqForm {
	padding-bottom: 60px;
}

/* Without the script nothing steps: no Start, Back or Next. */
.fqPage:not(.is-stepped) [data-go] {
	display: none;
}

.fqPage:not(.is-stepped) .fqNav,
.fqPage:not(.is-stepped) .fqNext {
	display: none;
}

/* Screen to screen: a short slide, like the Hum hero picker. */
@keyframes fqInNext {
	from {
		opacity: 0;
		transform: translateX(32px);
	}
}

@keyframes fqInBack {
	from {
		opacity: 0;
		transform: translateX(-32px);
	}
}

.fqStep.is-in-next {
	animation: fqInNext .22s cubic-bezier(.3, .6, .2, 1);
}

.fqStep.is-in-back {
	animation: fqInBack .22s cubic-bezier(.3, .6, .2, 1);
}

/* ---------- The result: the whole window FUSS green ---------- */

html.is-v2:has(body.fuss-quiz-result),
html.is-v2 body.fuss-v2.fuss-quiz-result,
body.fuss-page.fuss-quiz-result {
	--page-ground: #1ae32f;
	background: #1ae32f;
}

.fqResultPage {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	container-type: inline-size;
}

.fqResult {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: flex-end;
	padding: 48px var(--m) 60px;
}

/* The longest band, "Time to hand it off", is 7.73em of Faktum: all three set at the size that fits it. */
.fqPage .fqBand {
	margin: 0 0 0 -.031em;
	padding: 0;
	font-size: min(calc((100cqw - 2 * var(--m)) / 7.85), calc((100svh - 330px) / .78));
	line-height: .78;
	font-weight: 400;
	letter-spacing: -.035em;
	white-space: nowrap;
}

.fqPage .fqResultLine {
	max-width: 980px;
	margin-top: 32px;
	font-size: var(--line);
	line-height: 1.2;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.fqPage .fqResultNext {
	max-width: 980px;
	margin-top: 16px;
	font-size: var(--line);
	line-height: 1.2;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.fqPage .fqResultNext + .fqResultNext {
	margin-top: 24px;
}

.fqResult a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.fqFlood {
	transition-duration: .8s;
}

/* ---------- Narrower ---------- */

@media (max-width: 767px) {
	.fqIntro {
		padding-top: 40px;
	}

	.fqPage .fqGiant {
		font-size: 17vw;
		line-height: .92;
	}

	.fqPage .fqLine {
		margin-top: 20px;
	}

	.fqPage .fqStart {
		margin-top: 32px;
	}

	.fqPage .fqInfo {
		padding-top: 80px;
	}

	.fqPage.is-stepped .fqIntro {
		padding-bottom: 120px;
	}

	.fqPage .fqQuestion,
	.fqSend {
		padding-top: 40px;
	}

	.fqPage .fqAsk {
		margin-top: 16px;
		font-size: 34px;
		line-height: 36px;
	}

	.fqAnswers {
		padding-top: 40px;
	}

	.fqAnswer {
		grid-template-columns: minmax(0, 1fr);
	}

	.fqPage .fqKey {
		display: none;
	}

	.fqWords {
		grid-column: 1;
		margin: -6px -12px;
		padding: 6px 12px;
		border-radius: 20px;
	}

	.fqQuestion > .fcError,
	.fqNext {
		margin-left: 0;
	}

	.fqElse {
		padding-top: 20px;
	}

	.fqNext {
		margin-top: 20px;
	}

	.fqHint {
		display: none;
	}

	.fqNav {
		padding: 40px 0;
	}

	.fqPage .fqSendHead .fqLine {
		margin-top: 16px;
	}

	.fqFields {
		padding-top: 64px;
	}

	.fqSendRow {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		margin-top: 44px;
	}

	.fqSendRow > .fqBack {
		order: 2;
		margin: 40px 0 48px;
	}

	.fqSendGo {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.fqResult {
		padding-bottom: 60px;
	}

	/* On a phone each band breaks in two, all three at the size that fits "hand it off" (4.30em). */
	.fqPage .fqBand {
		font-size: min(calc((100cqw - 2 * var(--m)) / 4.37), calc((100svh - 300px) / 1.72));
		line-height: .86;
	}

	.fqBand span {
		display: block;
	}

	.fqPage .fqResultLine {
		margin-top: 20px;
	}

	.fqPage .fqResultNext {
		margin-top: 12px;
	}

	.fqPage .fqResultNext + .fqResultNext {
		margin-top: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fqStep.is-in-next,
	.fqStep.is-in-back {
		animation: none;
	}

	.fqWords {
		transition: none;
	}
}
