:root {
	color-scheme: dark;
	font-family:
		Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-synthesis: none;
	--background: #070b14;
	--surface: #0f1729;
	--surface-strong: #151f35;
	--line: #2a3854;
	--text: #f7f9ff;
	--muted: #aebbd2;
	--blue: #3f82ff;
	--blue-strong: #2563eb;
	--green: #38d6a0;
	--focus: #8eb8ff;
	--esp-tools-button-color: var(--blue-strong);
	--esp-tools-button-text-color: #ffffff;
	--esp-tools-button-border-radius: 0.9rem;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-width: 320px;
	background:
		radial-gradient(circle at 80% 5%, rgb(37 99 235 / 22%), transparent 26rem),
		var(--background);
	color: var(--text);
}

a {
	color: inherit;
}

button,
select {
	font: inherit;
}

.skip-link {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 10;
	padding: 0.75rem 1rem;
	border-radius: 0.65rem;
	background: var(--text);
	color: var(--background);
	transform: translateY(-180%);
}

.skip-link:focus {
	transform: translateY(0);
}

.page-shell {
	width: min(1120px, calc(100% - 2rem));
	margin: 0 auto;
}

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 5rem;
	border-bottom: 1px solid rgb(174 187 210 / 22%);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 750;
	text-decoration: none;
}

.brand-mark {
	width: 1.85rem;
	aspect-ratio: 1;
	border-radius: 0.45rem 0.45rem 0.45rem 0.1rem;
	background: linear-gradient(145deg, #66a2ff, var(--blue-strong));
	box-shadow: 0 0 0 0.32rem rgb(63 130 255 / 14%);
}

.header-link,
footer a {
	color: #c6d7ff;
	font-weight: 650;
	text-underline-offset: 0.25rem;
}

.hero {
	max-width: 780px;
	padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem);
}

.eyebrow,
.step-label {
	margin: 0 0 0.85rem;
	color: #78a7ff;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

h1,
h2,
p {
	margin-top: 0;
}

h1 {
	max-width: 700px;
	margin-bottom: 1.5rem;
	font-size: clamp(3rem, 7vw, 6.3rem);
	line-height: 0.94;
	letter-spacing: -0.065em;
}

h2 {
	margin-bottom: 0;
	font-size: clamp(1.35rem, 2vw, 1.85rem);
	letter-spacing: -0.025em;
}

.hero-copy {
	max-width: 650px;
	margin-bottom: 0;
	color: var(--muted);
	font-size: clamp(1.08rem, 2vw, 1.3rem);
	line-height: 1.65;
}

.installer-card {
	padding: clamp(1.35rem, 4vw, 3rem);
	border: 1px solid var(--line);
	border-radius: 1.6rem;
	background: linear-gradient(145deg, rgb(21 31 53 / 98%), rgb(11 18 33 / 98%));
	box-shadow: 0 2rem 5rem rgb(0 0 0 / 28%);
}

.card-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2rem;
}

.status-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid rgb(56 214 160 / 35%);
	border-radius: 999px;
	background: rgb(56 214 160 / 10%);
	color: #79efc5;
	font-size: 0.78rem;
	font-weight: 750;
}

.status-pill::before {
	width: 0.48rem;
	aspect-ratio: 1;
	border-radius: 50%;
	background: currentcolor;
	content: "";
}

.field-label {
	display: block;
	margin-bottom: 0.65rem;
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 700;
}

.select-wrap {
	position: relative;
}

.select-wrap::after {
	position: absolute;
	top: 50%;
	right: 1.2rem;
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	content: "";
	pointer-events: none;
	transform: translateY(-70%) rotate(45deg);
}

select {
	width: 100%;
	min-height: 3.65rem;
	padding: 0 3rem 0 1rem;
	appearance: none;
	border: 1px solid #425477;
	border-radius: 0.9rem;
	background: #0a1120;
	color: var(--text);
}

select:disabled {
	cursor: wait;
	opacity: 0.65;
}

select:focus-visible,
button:focus-visible,
a:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

.firmware-summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	margin: 1rem 0 0;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 0.9rem;
	background: var(--line);
}

.firmware-summary > div {
	display: grid;
	gap: 0.35rem;
	padding: 1rem;
	background: #111a2c;
}

.firmware-summary span {
	color: var(--muted);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.firmware-description {
	margin: 1.25rem 0 0;
	color: var(--muted);
	line-height: 1.65;
}

.install-section {
	display: grid;
	grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1fr) minmax(260px, 1.1fr);
	align-items: center;
	gap: 1.5rem;
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}

esp-web-install-button {
	display: block;
}

.primary-button {
	width: 100%;
	min-height: 3.65rem;
	padding: 0.75rem 1.2rem;
	border: 0;
	border-radius: 0.9rem;
	background: linear-gradient(135deg, var(--blue-strong), var(--blue));
	box-shadow: 0 0.85rem 1.8rem rgb(37 99 235 / 24%);
	color: #fff;
	cursor: pointer;
	font-weight: 800;
}

.primary-button:hover:not(:disabled) {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

.primary-button:disabled {
	cursor: wait;
	opacity: 0.55;
}

.compatibility-message,
.install-warning,
.error-message {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
}

.install-warning {
	color: var(--muted);
}

.install-warning strong {
	color: var(--text);
}

.error-message {
	margin-top: 1.25rem;
	padding: 1rem;
	border: 1px solid #85454d;
	border-radius: 0.8rem;
	background: rgb(177 53 66 / 12%);
	color: #ffbfc5;
}

.requirements {
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	gap: clamp(2rem, 7vw, 6rem);
	padding: clamp(5rem, 10vw, 8rem) 0;
}

.requirements-list {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.requirements-list li {
	display: grid;
	grid-template-columns: 2.5rem 1fr;
	gap: 1rem;
	padding: 1.15rem 0;
	border-bottom: 1px solid var(--line);
}

.requirements-list li:first-child {
	border-top: 1px solid var(--line);
}

.requirements-list > li > span {
	color: #78a7ff;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.82rem;
}

.requirements-list div {
	display: grid;
	gap: 0.32rem;
}

.requirements-list small {
	color: var(--muted);
	font-size: 0.94rem;
	line-height: 1.5;
}

footer {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 2rem 0 3rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9rem;
}

footer p {
	margin-bottom: 0;
}

@media (max-width: 800px) {
	.install-section,
	.requirements {
		grid-template-columns: 1fr;
	}

	.install-section {
		align-items: start;
	}
}

@media (max-width: 560px) {
	.page-shell {
		width: min(100% - 1.25rem, 1120px);
	}

	.site-header {
		min-height: 4.5rem;
	}

	.header-link {
		font-size: 0.88rem;
	}

	.hero {
		padding-top: 4rem;
	}

	.card-heading,
	footer {
		align-items: flex-start;
		flex-direction: column;
	}

	.firmware-summary {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
