:root {
	--page: #f8fafc;
	--surface: #ffffff;
	--text: #172033;
	--muted: #5d687b;
	--line: #dbe2ea;
	--accent: #2563eb;
	--accent_soft: #eff6ff;
	--radius: 0.75rem;
	--shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

* {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	overflow-x: hidden;
}

body {
	max-width: 72rem;
	margin: 0 auto;
	min-height: 100vh;
	padding: 1rem 0.75rem 0;
	background: var(--page);
	color: var(--text);
	display: flex;
	flex-direction: column;
	font:
		1rem/1.6 system-ui,
		sans-serif;
}

main,
.content-container,
body > section,
body > aside,
body > nav,
body > div {
	max-width: 72rem;
	margin: 0 auto 2rem;
	min-width: 0;
}

body > footer {
	width: 100%;
	margin-top: auto;
	padding: 1.5rem 0.75rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
}

body > footer p {
	margin: 0;
}

body > footer p + p {
	margin-top: 0.5rem;
}

h1,
h2,
h3 {
	line-height: 1.2;
}

h1 {
	font-size: clamp(2rem, 5vw, 3rem);
	margin: 0 0 1rem;
}

h2 {
	margin-top: 2.5rem;
	font-size: clamp(1.35rem, 3vw, 2rem);
}

a {
	color: var(--accent);
}

.calculator_step,
.output_card,
.option_group,
aside,
nav {
	margin: 1rem 0;
	min-width: 0;
	padding: 0.875rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.option_card {
	margin-top: 0.75rem;
	border: 1px solid var(--line);
	border-radius: 0.5rem;
}

.option_card label {
	display: grid;
	grid-template-columns: min-content minmax(0, 1fr);
	gap: 0.25rem 0.75rem;
	align-items: start;
	padding: 0.9rem;
	cursor: pointer;
}

.option_card input {
	grid-row: 1 / span 3;
	margin-top: 0.3rem;
	accent-color: var(--accent);
}

.option_title {
	min-width: 0;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.option_price {
	grid-column: 2;
	min-width: 0;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.inline_context {
	display: block;
	grid-column: 2;
	min-width: 0;
	color: var(--muted);
	font-size: 0.9rem;
	overflow-wrap: anywhere;
}

.highlight_standalone {
	background: var(--accent_soft);
	border-color: #93c5fd;
}

.option_card:has(input:checked) {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgb(37 99 235 / 12%);
}

.option_card:has(input:disabled) {
	opacity: 0.55;
}

input[type='number'] {
	max-width: 100%;
	margin: 0.5rem 0;
	font: inherit;
	width: min(100%, 10rem);
}

.calculate_button {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: 0.5rem;
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.calculate_button:hover,
.calculate_button:focus-visible {
	background: #1d4ed8;
}

:focus-visible {
	outline: 3px solid #f59e0b;
	outline-offset: 3px;
}

.metrics_table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	width: 100%;
	border-collapse: collapse;
}

.metrics_table th,
.metrics_table td {
	min-width: 8rem;
	padding: 0.65rem;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

table:not(.metrics_table) {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.cap_note,
.inline_notice {
	color: var(--muted);
	font-size: 0.9rem;
}

@media (min-width: 40rem) {
	body {
		padding: 2rem 1rem 0;
	}

	body > footer {
		padding: 1.5rem 1rem;
	}

	.calculator_step,
	.output_card,
	.option_group,
	aside,
	nav {
		padding: 1.25rem;
	}
}
