@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Silkscreen:wght@400;700&display=swap');

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

body {
	font-family: Inter,sans-serif;
	font-size: 16px;
	background-color: #f3f3fe;
	color: #2c3345;
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

header {
	margin: 32px 0;
}

main {
	border-radius: 3px;
	box-shadow: 0 4px 4px rgba(87,100,126,.21);
	background-color: #fff;
	width: 100%;
	max-width: 752px;
	font-size: .9375em;
}

section {
	display: none;
	padding: 0 38px;

	&.current {
		display: block;
	}
}

h1 {
	font-size: 2rem;
}

.required {
	color: red;
}

.sr-only {
	position:absolute;
	left:-10000px;
	top:auto;
	width:1px;
	height:1px;
	overflow:hidden;
}

input[type="text"], input[type="email"], select {
	border: 1px solid #b8bdc9;
	border-radius: 4px;
	padding: 0 .625em;
	height: 2.5em;
	color: #2c3345;
	font-family: inherit;
	font-size: 1em;
	display: block;
	width: min(300px, 100%);

	&:hover {
		border: 2px solid rgba(46,105,255,.5);
		box-shadow: 0 0 0 2px rgba(46,105,255,.25);
	}

	&:focus {
		border: 2px solid #2e69ff;
		box-shadow: 0 0 0 3px rgba(46,105,255,.25);
	}
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.question:has(:focus), .question-wrapper:has(:focus) {
	background-color: #f1f5ff;
}

.question:has(.validation-failed:invalid), .question-wrapper:has(.validation-failed:invalid) {
	background-color: #ffeded;

	.validation-failed:invalid {
		border-color: red;
	}
}

.buttons {
	display: flex;
	justify-content: space-between;
	margin: 2em 0;

	button {
		background-color: #e1e5f0;
		color: #2c3345;
		border: none;
		border-radius: 4px;
		padding: .5em 1em;
		font-size: 1.125em;
		cursor: pointer;
		height: 3em;
		width: auto;
		min-width: 128px;

		&:hover {
			background-color: #ced0da;
		}

		&.next {
			color: #fff;
			background-color: #2e69ff;
		}

		&.submit {
			color: #fff;
			background-color: #16aa52;
		}
	}
}

.progress {
	margin: 1em 0;

	ul {
		display: flex;
		justify-content: center;
		gap: 1ch;

		button {
			border-radius: 50%;
			height: 1em;
			width: 1em;
			background-color: #e1e5f0;
			border: none;
			cursor: pointer;

			&.current {
				background-color: #2e69ff;
			}
		}
	}
}

.copyright {
	text-align: right;
}

.question-wrapper {
	padding: 12px 12px;
	margin: 12px -12px;

	& > .question {
		font-weight: bold;
	}
}

.two-questions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em;

	.question {
		display: grid;
		grid-template-columns: subgrid;

		input {
			grid-row: 1;
		}

		label {
			font-size: .75em;
			margin-top: 11px;
			margin-left: 2px;
			color: #57647e;
		}
	}
}