:root {
	color-scheme: dark;
	font-family: Inter, system-ui, sans-serif;
	background: #090d18;
	color: #eef3ff;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1180px; margin: 0 auto; padding: 32px 20px 56px; }
header { margin-bottom: 24px; }
.page-navigation {
	display: flex;
	justify-content: flex-end;
	position: sticky;
	top: 8px;
	z-index: 20;
	width: fit-content;
	margin: 0 0 16px auto;
	padding: 4px;
	border-radius: 12px;
	background: #090d18e8;
	backdrop-filter: blur(8px);
}
.page-navigation a,
.page-navigation button { text-decoration: none; }
#jumpResults,
#jumpTop { width: 130px; text-align: center; }
.eyebrow { color: #8ea6ff; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
h1 { margin: 4px 0 8px; font-size: clamp(2rem, 5vw, 3.6rem); }
header p:last-child { color: #aeb8d0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));  grid-template-rows: 1fr; gap: 16px; margin-bottom: 16px; }
fieldset { border: 1px solid #27324a; border-radius: 16px; background: #11172a; padding: 16px; }
legend { padding: 0 8px; color: #bfcbef; font-weight: 800; }
label { display: grid; gap: 6px; margin-bottom: 12px; color: #cbd4ed; }
input { width: 100%; border: 1px solid #394761; border-radius: 9px; background: #090d18; color: white; padding: 10px 12px; }
.building-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 1fr; gap: 8px 12px; }
.building-grid .check { display: grid; grid-template-columns: 1fr;  grid-template-rows: 1fr; }
.building-grid .check input {
	width: 100%;
	max-width: 260px;
	height: 38px;
	font-size: 1rem;
	margin: 0;
}
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));  grid-template-rows: 1fr; gap: 8px; max-height: 420px; overflow: auto; }
.check { display: flex; grid-template-columns: auto 1fr;  grid-template-rows: 1fr; align-items: start; gap: 8px; margin: 0; }
.check input { width: 18px; height: 18px; margin-top: 2px; }
.check small { color: #8f9aba; }
.primary { width: 100%; border: 0; border-radius: 12px; background: #607cff; color: white; font-size: 1rem; font-weight: 800; padding: 14px; cursor: pointer; }
.primary:hover { background: #738cff; }
.calculation-actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	margin-bottom: 16px;
}
.calculation-actions .primary { margin-bottom: 0; }
.calculation-actions #resetState { min-height: 44px; }
.secondary { border: 1px solid #394761; border-radius: 9px; background: #1a2440; color: white; padding: 10px 12px; cursor: pointer; }
.reminder-grid { grid-template-columns: 1fr;  grid-template-rows: 1fr; }
.reminder-actions { display: flex; gap: 8px; }
.reminder-status { min-height: 20px; color: #b7c5ff; }
#results { display: grid; gap: 16px; margin-top: 20px; }
#results,
#calculate { scroll-margin-top: 72px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr);  grid-template-rows: 1fr; gap: 12px; }
.card, .candidate { border: 1px solid #27324a; border-radius: 14px; background: #11172a; padding: 16px; }
.card h2, .candidate h3 { margin-top: 0; }
.metric { color: #8ea6ff; font-weight: 800; }
.candidates { display: grid; grid-template-columns: 1fr;  grid-template-rows: 1fr; gap: 12px; max-height: 520px; overflow-y: auto; padding-right: 6px; }
#results > .card,
.grid > .card {
	max-height: 620px;
	overflow-y: auto;
}
.candidate { min-width: 0; }
.candidate p { color: #aeb8d0; }
.candidate-buy { display: block; margin-top: 12px; }
.candidate-buy:disabled {
	cursor: default;
	opacity: .72;
}
.candidate.purchased { border-style: dashed; }
.tag { display: inline-block; border-radius: 999px; background: #1e2b4f; color: #b7c5ff; padding: 4px 8px; font-size: .78rem; }
.target { border-color: #607cff; box-shadow: 0 0 0 1px #607cff33; }
@media (max-width: 760px) {
	.grid, .summary, .candidates, .building-grid, .checkbox-grid { grid-template-columns: 1fr; grid-template-rows: 1fr; }
	main { padding-right: 20px; }
	.calculation-actions { grid-template-columns: 1fr; }
	.page-navigation {
		position: sticky;
		top: 8px;
		justify-content: stretch;
		width: calc(100% + 16px);
		margin: 0 -8px 16px;
	}
	#jumpResults,
	#jumpTop { width: 100%; }
}
