body {
	font: 1.1rem serif;
	line-height: 1.6;
	background: #d0ddee;
}

h1 {
	font-size: 2em;
	font-weight: normal;
	margin: 0 0 8px;
	text-align: center;
	text-shadow: 0 2px 4px #00000033;
}

form {
	margin: 8px auto;
	padding: 8px;
	box-shadow:
		0 0 0 1px #00000066,
		0 4px 8px #00000011;
	border-radius: 2px;
	background: #ffffff;
	display: flex;
	max-width: 400px;
	flex-flow: column;
	gap: 8px;
}

details {
	border: 1px solid #ddddee;
	border-radius: 8px;
	margin-top: 8px;

	summary {
		padding-left: 8px;
		cursor: pointer;
	}

	& > div {
		padding: 8px;
		display: flex;
		flex-flow: column;
		gap: 8px;
	}
}

input[type='number'] {
	width: 5em;
	font-size: 1rem;
}

label:not([hidden]):has(select) {
	display: flex;
	flex-flow: column;
	margin-top: 8px;
}

.aligner {
	display: inline-block;
	min-width: 7.5em;
	text-align: right;
	margin-right: 4px;
}

select {
	align-self: stretch;
	font-size: 1rem;
}

#result {
	margin: 16px 0;
	padding: 16px;
	background: #ffffff;
	box-shadow:
		0 0 0 1px #00000066,
		0 4px 8px #00000011;
}

.vis {
	max-width: calc(100% - 4px);
	background: #ffffff;
	border: 2px solid #000000;
}

abbr {
	text-decoration: underline dotted #8080cc;
}

h2 {
	font-size: 1.5em;
	font-weight: normal;
	margin: 16px 0 8px;

	&:first-child {
		margin-top: 0;
	}
}

.instructions {
	font-size: 1.2em;
	display: grid;
	grid-template-columns: max-content auto minmax(max-content, 1fr);
	gap: 0 8px;

	& .num {
		grid-column: 1;
		font-size: 1em;
		font-weight: normal;
		margin: 0;
	}

	& .text {
		grid-column: 2;
	}

	& .total {
		grid-column: 3;
		opacity: 0.8;
		align-self: end;
	}
}
