:root {
	color-scheme: dark;

	--font-body: Inter, system-ui, sans-serif;

	--canvas: #111111;
	--surface-raised: #17191c;
	--border: #2a2f37;
	--border-muted: #1e2126;
	--text: #ffffff;
	--text-muted: #94a3b8;

	--success: #16a34a;
	--danger: #ef4444;
	--warning: #d29922;

	--radius-lg: 0.5rem;

	--text-xs: 0.75rem;
	--text-sm: 0.875rem;
	--text-xl: 1.25rem;

	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.25rem;
	--space-6: 1.5rem;
	--space-8: 2rem;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: var(--space-8) var(--space-4);
	background: var(--canvas);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.5;
}

main {
	max-width: 64rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
}

.card {
	background: var(--surface-raised);
	border: 1px solid var(--border-muted);
	border-radius: var(--radius-lg);
	box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
}

.banner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-4);
	align-items: center;
	justify-content: space-between;
	padding: var(--space-5);
}

.brand {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-width: 0;
}

.brand img {
	width: 1.75rem;
	height: 1.75rem;
	flex: none;
}

h1 {
	font-size: var(--text-xl);
	font-weight: 600;
	margin: 0;
}

.state {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}

.state strong {
	font-size: var(--text-sm);
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
}

.state strong::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--border);
	flex: none;
}

.banner.ok .state strong::before {
	background: var(--success);
	box-shadow: 0 0 0 3px rgb(22 163 74 / 20%);
}

.banner.warn .state strong::before {
	background: var(--warning);
	box-shadow: 0 0 0 3px rgb(210 153 34 / 20%);
}

.banner.unknown .state strong::before {
	background: var(--danger);
	box-shadow: 0 0 0 3px rgb(239 68 68 / 20%);
}

.state span {
	color: var(--text-muted);
	font-size: var(--text-xs);
}

h2 {
	font-size: var(--text-xs);
	font-weight: 600;
	color: var(--text-muted);
	margin: 0 0 var(--space-3);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.scroll {
	overflow-x: auto;
	background: var(--surface-raised);
	border: 1px solid var(--border-muted);
	border-radius: var(--radius-lg);
	box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--text-sm);
}

th,
td {
	padding: var(--space-3) var(--space-2);
	text-align: center;
	white-space: nowrap;
}

thead th {
	font-weight: 600;
	color: var(--text-muted);
	font-size: var(--text-xs);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 1px solid var(--border-muted);
}

tbody tr + tr td {
	border-top: 1px solid var(--border-muted);
}

tbody tr:hover td {
	background: rgb(255 255 255 / 4%);
}

.name {
	width: 100%;
	text-align: left;
	padding-left: var(--space-5);
}

.visit {
	display: inline-flex;
	align-items: center;
	vertical-align: text-bottom;
	margin-left: var(--space-2);
	color: var(--text-muted);
	opacity: 0;
	transition: opacity 0.12s ease, color 0.12s ease;
}

.visit svg {
	width: 0.875em;
	height: 0.875em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

tbody tr:hover .visit,
.visit:focus-visible {
	opacity: 1;
}

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

.visit:focus-visible {
	outline: 2px solid var(--text-muted);
	outline-offset: 2px;
	border-radius: 2px;
}

@media (hover: none) {
	.visit {
		opacity: 1;
	}
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.uptime {
	width: 5.5rem;
	text-align: right;
	padding-right: var(--space-4);
	color: var(--text-muted);
	font-variant-numeric: tabular-nums;
}

.day {
	width: 3rem;
	font-weight: 700;
}

th.day:last-child,
td.day:last-child {
	padding-right: var(--space-5);
}

td.up {
	color: var(--success);
}

td.partial {
	color: var(--warning);
}

td.down {
	color: var(--danger);
}

td.none {
	color: var(--border);
}

td.none::after {
	content: "\2013";
}

.foot {
	color: var(--text-muted);
	font-size: var(--text-xs);
	margin: 0;
	text-align: right;
}
