:root {
	font-family:
		Inter,
		ui-sans-serif,
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		sans-serif;

	color-scheme: dark;

	--background: #0a0c0f;
	--surface: #11151a;
	--surface-raised: #171c22;
	--border: #29313a;

	--text: #eef2f6;
	--muted: #98a2ad;
	--subtle: #68737f;

	--blue: #5f8dd3;
	--blue-hover: #78a6e8;
	--cyan: #7dd3fc;

	--pass: #3fb950;
	--warn: #d29922;
	--fail: #f85149;

	--grid-line: rgba(180, 195, 210, 0.045);

	--content-width: 1080px;
}

html[data-theme="light"] {
	color-scheme: light;

	--background: #f4f5f7;
	--surface: #ffffff;
	--surface-raised: #f8f9fa;
	--border: #d7dce2;

	--text: #171b20;
	--muted: #5f6974;
	--subtle: #7c8691;

	--blue: #2867b2;
	--blue-hover: #1f5697;
	--cyan: #087990;

	--pass: #238636;
	--warn: #9a6700;
	--fail: #cf222e;

	--grid-line: rgba(40, 55, 70, 0.055);
}

body {
	margin: 0;
	min-height: 100vh;

	background-color: var(--background);

	background-image:
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);

	background-size: 24px 24px;

	color: var(--text);

	transition:
		background-color 160ms ease,
		color 160ms ease;
}

button,
input {
	font: inherit;
}

a {
	color: inherit;
}

.site-shell {
	width: min(var(--content-width), calc(100% - 2rem));
	min-height: 100vh;
	margin: 0 auto;

	display: flex;
	flex-direction: column;
}

.site-header {
	min-height: 76px;

	display: flex;
	align-items: center;
	justify-content: space-between;

	border-bottom: 1px solid var(--border);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;

	color: var(--cyan);

	font-family: monospace;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.14em;

	text-decoration: none;
}

.brand-mark {
	color: var(--blue);
	font-size: 0.7rem;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.site-nav a {
	color: var(--muted);
	font-size: 0.9rem;
	text-decoration: none;
}

.site-nav a:hover {
	color: var(--text);
}

.landing-main {
	flex: 1;

	display: flex;
	flex-direction: column;
	justify-content: center;

	padding: 6rem 0 4rem;
}

.hero {
	width: min(820px, 100%);
	margin: 0 auto;
	text-align: center;
}

.eyebrow {
	margin: 0 0 1rem;

	color: var(--cyan);

	font-family: monospace;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.16em;
}

.hero h1,
.report-heading h1,
.error-panel h1 {
	margin: 0;

	font-size: clamp(2.7rem, 7vw, 5rem);
	line-height: 1.02;
	letter-spacing: -0.045em;
}

.hero-copy {
	max-width: 680px;
	margin: 1.5rem auto 2.75rem;

	color: var(--muted);

	font-size: 1.08rem;
	line-height: 1.7;
}

.check-form,
.report-form {
	display: flex;
	gap: 0.7rem;
}

.check-form {
	width: min(700px, 100%);
	margin: 0 auto;
}

.input-shell {
	flex: 1;
	min-width: 0;

	display: flex;
	align-items: center;

	border: 1px solid var(--border);
	border-radius: 9px;

	background: var(--surface);

	transition:
		border-color 120ms ease,
		box-shadow 120ms ease;
}

.input-shell:focus-within {
	border-color: var(--blue);

	box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.12);
}

.input-prompt {
	padding-left: 1rem;

	color: var(--cyan);

	font-family: monospace;
	font-weight: 700;
}

.input-shell input {
	width: 100%;
	min-width: 0;

	padding: 1rem;

	border: 0;
	outline: none;

	background: transparent;
	color: var(--text);

	font-family: monospace;
	font-size: 1rem;
}

.check-form button,
.report-form button {
	padding: 0 1.35rem;

	border: 0;
	border-radius: 9px;

	background: var(--blue);
	color: #07111f;

	cursor: pointer;

	font-weight: 800;

	transition: background 120ms ease;
}

.check-form button:hover,
.report-form button:hover {
	background: var(--blue-hover);
}

.try-row {
	margin-top: 1.2rem;

	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.55rem;

	color: var(--subtle);

	font-size: 0.82rem;
}

.example-host {
	padding: 0;

	border: 0;

	background: transparent;
	color: var(--muted);

	cursor: pointer;

	font-family: monospace;
	font-size: inherit;
}

.example-host:hover {
	color: var(--cyan);
}

.capability-grid {
	margin-top: 5rem;

	display: grid;
	grid-template-columns: repeat(4, 1fr);

	border: 1px solid var(--border);
	border-radius: 10px;

	overflow: hidden;

	background: var(--surface);
}

.capability {
	min-height: 132px;
	padding: 1.35rem;

	display: flex;
	flex-direction: column;
	align-items: flex-start;

	border-right: 1px solid var(--border);
}

.capability:last-child {
	border-right: 0;
}

.capability-dot {
	width: 7px;
	height: 7px;
	margin-bottom: 1.1rem;

	border-radius: 50%;

	background: var(--cyan);

	box-shadow: 0 0 12px rgba(126, 231, 255, 0.55);
}

.capability-name {
	color: var(--text);

	font-family: monospace;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.capability-copy {
	margin-top: 0.55rem;

	color: var(--muted);

	font-size: 0.84rem;
	line-height: 1.45;
	text-align: left;
}

.trust-strip {
	margin-top: 1.1rem;

	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.8rem 1.6rem;

	color: var(--subtle);

	font-family: monospace;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
}

.site-footer {
	padding: 2rem 0;

	display: flex;
	justify-content: space-between;
	gap: 1.5rem;

	border-top: 1px solid var(--border);

	color: var(--subtle);

	font-size: 0.78rem;
}

.site-footer p {
	margin: 0;
}

.site-footer a {
	color: var(--muted);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--cyan);
}

.report-main {
	flex: 1;
	padding: 2.5rem 0 5rem;
}

.report-form {
	width: min(680px, 100%);
	margin-left: auto;
}

.report-form .input-shell input {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

.report-heading {
	margin-top: 4.5rem;
}

.report-heading h1 {
	font-size: clamp(2.5rem, 6vw, 4.2rem);
}

.scan-meta {
	margin: 1rem 0 0;

	color: var(--subtle);

	font-family: monospace;
	font-size: 0.78rem;
}

.health-panel {
	margin-top: 2.5rem;
	padding: 1.5rem 1.75rem;

	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"heading scores"
		"summary scores";
	gap: 0.55rem 2rem;

	border: 1px solid var(--border);
	border-radius: 10px;

	background: var(--surface);
}

.health-heading {
	grid-area: heading;

	display: flex;
	align-items: center;
	gap: 0.7rem;

	font-family: monospace;
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.1em;
}

.health-dot {
	width: 9px;
	height: 9px;

	border-radius: 50%;
}

.health-panel.healthy .health-dot {
	background: var(--pass);
	box-shadow: 0 0 14px rgba(63, 185, 80, 0.45);
}

.health-panel.attention .health-dot {
	background: var(--warn);
	box-shadow: 0 0 14px rgba(210, 153, 34, 0.45);
}

.health-panel.issues .health-dot {
	background: var(--fail);
	box-shadow: 0 0 14px rgba(248, 81, 73, 0.45);
}

.health-summary {
	grid-area: summary;

	margin: 0;

	color: var(--muted);

	font-size: 0.92rem;
}

.scoreboard {
	grid-area: scores;

	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.score {
	min-width: 52px;

	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.score-value {
	font-family: monospace;
	font-size: 1.25rem;
	font-weight: 800;
}

.score-label {
	margin-top: 0.15rem;

	color: var(--subtle);

	font-family: monospace;
	font-size: 0.65rem;
	letter-spacing: 0.08em;
}

.pass-text {
	color: var(--pass);
}

.warn-text {
	color: var(--warn);
}

.fail-text {
	color: var(--fail);
}

.result-groups {
	margin-top: 3.5rem;

	display: grid;
	gap: 3.5rem;
}

.group-header {
	padding-bottom: 0.8rem;

	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;

	border-bottom: 1px solid var(--border);
}

.group-header h2 {
	margin: 0;

	color: var(--cyan);

	font-family: monospace;
	font-size: 0.86rem;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.group-counts {
	display: flex;
	gap: 0.8rem;

	font-family: monospace;
	font-size: 0.7rem;
	font-weight: 700;
}

.result-list {
	display: grid;
}

.result-row {
	padding: 1rem 0;

	border-bottom: 1px solid rgba(48, 54, 61, 0.7);
}

.result-main {
	display: flex;
	align-items: flex-start;
	gap: 0.9rem;
}

.status-icon {
	flex: 0 0 1.5rem;

	width: 1.5rem;
	height: 1.5rem;

	display: grid;
	place-items: center;

	border-radius: 50%;

	font-family: monospace;
	font-size: 0.78rem;
	font-weight: 800;
}

.result-row.pass .status-icon {
	background: rgba(63, 185, 80, 0.14);
	color: var(--pass);
}

.result-row.warn .status-icon {
	background: rgba(210, 153, 34, 0.14);
	color: var(--warn);
}

.result-row.fail .status-icon {
	background: rgba(248, 81, 73, 0.14);
	color: var(--fail);
}

.result-copy h3 {
	margin: 0;

	font-size: 0.95rem;
	font-weight: 650;
}

.result-copy p {
	margin: 0.3rem 0 0;

	color: var(--muted);

	font-size: 0.88rem;
	line-height: 1.5;
}

.result-details {
	margin: 0.65rem 0 0 2.4rem;
}

.result-details summary {
	width: fit-content;

	color: var(--blue);

	cursor: pointer;

	font-family: monospace;
	font-size: 0.74rem;
}

.result-details summary:hover {
	color: var(--cyan);
}

.result-detail {
	margin-top: 0.75rem;
	padding: 0.8rem 1rem;

	border: 1px solid rgba(48, 54, 61, 0.75);
	border-radius: 7px;

	background: var(--surface);

	color: var(--muted);

	overflow-wrap: anywhere;

	font-family: monospace;
	font-size: 0.76rem;
	line-height: 1.55;
}

.error-panel {
	margin-top: 4rem;
	padding: 2rem;

	border: 1px solid rgba(248, 81, 73, 0.65);
	border-radius: 10px;

	background: var(--surface);
}

.error-panel h1 {
	margin-top: 0.5rem;
	font-size: clamp(2rem, 6vw, 3.5rem);
}

.error-copy {
	max-width: 700px;

	color: var(--muted);
	line-height: 1.65;
}

.text-link {
	color: var(--blue);
	text-decoration: none;
}

.text-link:hover {
	color: var(--cyan);
}

.loading-overlay {
	position: fixed;
	inset: 0;

	z-index: 100;

	display: none;
	place-items: center;

	background: rgba(13, 17, 23, 0.92);
	backdrop-filter: blur(4px);
}

.loading-overlay.active {
	display: grid;
}

.loading-panel {
	text-align: center;
}

.scanner-ring {
	width: 42px;
	height: 42px;
	margin: 0 auto 1.4rem;

	border: 2px solid var(--border);
	border-top-color: var(--cyan);
	border-radius: 50%;

	animation: spin 0.8s linear infinite;
}

.loading-label {
	margin: 0;

	color: var(--cyan);

	font-family: monospace;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.13em;
}

.loading-stage {
	margin: 0.7rem 0 0;

	color: var(--muted);

	font-family: monospace;
	font-size: 0.78rem;
}

.sr-only {
	position: absolute;

	width: 1px;
	height: 1px;

	padding: 0;
	margin: -1px;

	overflow: hidden;

	clip: rect(0, 0, 0, 0);
	white-space: nowrap;

	border: 0;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 820px) {
	.capability-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.capability:nth-child(2) {
		border-right: 0;
	}

	.capability:nth-child(-n + 2) {
		border-bottom: 1px solid var(--border);
	}

	.health-panel {
		grid-template-columns: 1fr;
		grid-template-areas:
			"heading"
			"summary"
			"scores";
	}

	.scoreboard {
		margin-top: 0.75rem;
	}

	.score {
		align-items: flex-start;
	}
}

@media (max-width: 620px) {
	.site-shell {
		width: min(var(--content-width), calc(100% - 1.25rem));
	}

	.site-header {
		min-height: 64px;
	}

	.site-nav {
		gap: 0.9rem;
	}

	.landing-main {
		padding-top: 4rem;
	}

	.check-form,
	.report-form {
		flex-direction: column;
	}

	.check-form button,
	.report-form button {
		min-height: 48px;
	}

	.capability-grid {
		grid-template-columns: 1fr;
	}

	.capability {
		border-right: 0;
		border-bottom: 1px solid var(--border);
	}

	.capability:last-child {
		border-bottom: 0;
	}

	.site-footer {
		flex-direction: column;
	}

	.report-form {
		margin-left: 0;
	}

	.report-heading {
		margin-top: 3rem;
	}

	.group-header {
		align-items: flex-start;
		flex-direction: column;
	}
}

.report-controls {
	margin-top: 2rem;
	padding: 1.2rem 0;

	display: flex;
	justify-content: space-between;
	gap: 2rem;

	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.control-group {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.control-label {
	color: var(--subtle);

	font-family: monospace;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;

	white-space: nowrap;
}

.control-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.control-button,
.filter-button {
	min-height: 34px;
	padding: 0.4rem 0.7rem;

	display: inline-flex;
	align-items: center;
	gap: 0.45rem;

	border: 1px solid var(--border);
	border-radius: 6px;

	background: var(--surface);
	color: var(--muted);

	cursor: pointer;

	font-family: monospace;
	font-size: 0.72rem;
	font-weight: 700;

	text-decoration: none;

	transition:
		border-color 120ms ease,
		background 120ms ease,
		color 120ms ease;
}

.control-button:hover,
.filter-button:hover {
	border-color: var(--blue);
	color: var(--text);
}

.filter-button.active {
	border-color: var(--blue);

	background: rgba(88, 166, 255, 0.12);
	color: var(--cyan);
}

.filter-button span {
	color: var(--subtle);
	font-size: 0.65rem;
}

.result-group {
	scroll-margin-top: 1.5rem;
}

.result-row[hidden] {
	display: none;
}

.no-results {
	margin: 0;
	padding: 1.2rem 0;

	color: var(--subtle);

	font-family: monospace;
	font-size: 0.78rem;
}

html {
	scroll-behavior: smooth;
}

@media (max-width: 820px) {
	.report-controls {
		flex-direction: column;
		gap: 1.2rem;
	}
}

@media (max-width: 620px) {
	.control-group {
		align-items: flex-start;
		flex-direction: column;
	}

	.control-buttons {
		width: 100%;
	}

	.control-button,
	.filter-button {
		flex: 1;
		justify-content: center;
	}
}

.section-footer {
	padding-top: 1rem;

	display: flex;
	justify-content: flex-end;
}

.back-to-top {
	color: var(--subtle);

	font-family: monospace;
	font-size: 0.72rem;
	font-weight: 700;

	text-decoration: none;

	transition: color 120ms ease;
}

.back-to-top:hover {
	color: var(--cyan);
}

.theme-toggle {
	padding: 0.4rem 0.65rem;

	display: inline-flex;
	align-items: center;
	gap: 0.45rem;

	border: 1px solid var(--border);
	border-radius: 6px;

	background: var(--surface);
	color: var(--muted);

	cursor: pointer;

	font-family: monospace;
	font-size: 0.75rem;
	font-weight: 700;

	transition:
		border-color 120ms ease,
		background 120ms ease,
		color 120ms ease;
}

.theme-toggle:hover {
	border-color: var(--blue);
	color: var(--text);
}
