:root {
	--navy: #162640;
	--navy-accent: #1e4f7a;
	--ink: #0f172a;
	--ink-muted: #475569;
	--ink-subtle: #64748b;
	--canvas: #f6f8fb;
	--surface: #ffffff;
	--hairline: rgba(15, 23, 42, 0.08);
	--shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
	--shadow-pop: 0 12px 28px rgba(15, 23, 42, 0.14);
	--state-green: #16a34a;
	--state-amber: #d97706;
	--state-red: #dc2626;
	--state-slate: #64748b;
	color-scheme: light;
	font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
	font-size: 16px;
}

* {
	box-sizing: border-box;
}

body {
	background-color: var(--canvas);
	background-image: radial-gradient(rgba(22, 38, 64, 0.05) 1px, transparent 1px);
	background-size: 7px 7px;
	color: var(--ink);
	display: flex;
	flex-direction: column;
	margin: 0;
	min-height: 100vh;
}

.site-header {
	align-items: center;
	background: var(--surface);
	border-bottom: 1px solid var(--hairline);
	display: flex;
	justify-content: space-between;
	margin-bottom: 1rem;
	padding: 0.5rem 1rem;
}

.brand {
	align-items: center;
	color: var(--navy);
	cursor: pointer;
	display: inline-flex;
	font-weight: bold;
	gap: 0.5rem;
}

.brand-name {
	font-size: 1.25rem;
}

.menu {
	position: relative;
}

.menu-toggle {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 0.5rem;
	color: var(--navy);
	cursor: pointer;
	display: inline-flex;
	height: 2.5rem;
	justify-content: center;
	padding: 0;
	width: 2.5rem;
}

.menu-toggle:hover {
	background: rgba(22, 38, 64, 0.06);
}

.menu-panel {
	background: var(--surface);
	border: 1px solid var(--hairline);
	border-radius: 0.75rem;
	box-shadow: var(--shadow-pop);
	display: flex;
	flex-direction: column;
	min-width: 300px;
	padding: 0.25rem;
	position: absolute;
	right: 0;
	top: calc(100% + 0.5rem);
	z-index: 99;
}

.menu-panel[hidden] {
	display: none;
}

.menu-item {
	align-items: center;
	border-radius: 0.5rem;
	color: var(--ink);
	display: flex;
	font-size: 0.86rem;
	gap: 0.5rem;
	padding: 0.75rem;
	text-decoration: none;
}

.menu-item:hover {
	background: rgba(22, 38, 64, 0.06);
}

.menu-item svg,
.menu-item img {
	flex-shrink: 0;
	height: 25px;
	width: 25px;
}

.menu-item svg {
	color: var(--navy);
}

.content {
	align-items: center;
	display: flex;
	flex: 1;
	justify-content: center;
}

.card {
	background: var(--surface);
	border: 1px solid var(--hairline);
	border-radius: 0.5rem;
	box-shadow: var(--shadow-card);
	padding: 2rem;
	text-align: center;
	width: min(768px, 92vw);
}

h1 {
	color: var(--navy);
	font-size: 2rem;
	margin: 0;
}

.subtitle {
	color: var(--ink-muted);
	font-size: 1.1rem;
	margin: 0.5rem 0 1.5rem 0;
}

.intro {
	color: var(--ink-muted);
	line-height: 1.5;
	text-align: left;
}

.start-btn {
	align-items: center;
	background: linear-gradient(90deg, #13243d, #1e4f7a);
	border: 0;
	border-radius: 0.75rem;
	color: white;
	cursor: pointer;
	display: flex;
	font-size: 1rem;
	font-weight: bold;
	gap: 1rem;
	justify-content: center;
	margin: 1.5rem auto;
	max-width: 420px;
	padding: 1rem;
	width: 100%;
}

.start-btn::before {
	align-items: center;
	background: linear-gradient(45deg, #c8511c, #ff9900);
	border-radius: 0.25rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
	color: #ffffff;
	content: "λ";
	display: inline-flex;
	font-size: 1.5rem;
	font-weight: bold;
	height: 2rem;
	justify-content: center;
	width: 2rem;
}

.start-btn:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.status-pill {
	align-items: center;
	background: rgba(100, 116, 139, 0.1);
	border: 1px solid rgba(100, 116, 139, 0.25);
	border-radius: 999px;
	color: var(--state-slate);
	display: inline-flex;
	font-size: 0.86rem;
	font-weight: bold;
	gap: 0.75rem;
	padding: 0.5rem 1rem;
}

.status-dot {
	background: currentColor;
	border-radius: 50%;
	flex-shrink: 0;
	height: 0.5rem;
	width: 0.5rem;
}

.status-label {
	color: var(--ink);
}

.status-pill[data-state="running"] {
	background: rgba(22, 163, 74, 0.12);
	border-color: rgba(22, 163, 74, 0.3);
	color: var(--state-green);
}

.status-pill[data-state="pending"] {
	background: rgba(217, 119, 6, 0.12);
	border-color: rgba(217, 119, 6, 0.3);
	color: var(--state-amber);
}

.status-pill[data-state="stopped"],
.status-pill[data-state="stopping"],
.status-pill[data-state="error"] {
	background: rgba(220, 38, 38, 0.1);
	border-color: rgba(220, 38, 38, 0.28);
	color: var(--state-red);
}

.status-pill[data-state="pending"] .status-dot,
.status-pill[data-state="stopping"] .status-dot {
	animation: status-pulse 1.8s ease-out infinite;
}

/*
 * The pulse is a box-shadow ring on the dot itself: it paints above the card
 * background but behind the dot, so it reads as a halo emanating from the dot.
 * A child pseudo-element with z-index: -1 escapes the dot's non-stacking context
 * and renders behind the opaque card, which is why it was invisible.
*/
@keyframes status-pulse {
	0% {
		box-shadow: 0 0 0 0 currentColor;
	}

	100% {
		box-shadow: 0 0 0 0.5rem transparent;
	}
}

.window {
	color: var(--ink-subtle);
	font-size: 0.85rem;
	margin: 0.65rem 0 0;
	min-height: 1.1rem;
}

.site-footer {
	background-color: var(--surface);
	border-top: 1px solid var(--hairline);
	color: var(--ink-subtle);
	font-size: 0.86rem;
	margin-top: 1rem;
	padding: 1rem;
	text-align: center;
}

.menu-toggle:focus-visible,
.menu-item:focus-visible,
.start-btn:focus-visible {
	outline: 2px solid var(--navy-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.status-pill[data-state="pending"] .status-dot,
	.status-pill[data-state="stopping"] .status-dot {
		animation: none;
	}
}
