/* /status — DepthField Cloud and the AI providers. Level colors are told apart by
   lightness and hue (teal / amber / rose / slate), never red vs green, and every
   level is also spelled out in text. */

.st-main {
	--st-operational: var(--ok);
	--st-degraded: var(--warn);
	--st-outage: #ef6a9a;
	--st-maintenance: #8fa3cc;
	--st-unknown: var(--text-dim);
	--st-none: rgba(243, 236, 224, 0.07);

	padding-block: clamp(40px, 7vw, 84px) clamp(64px, 9vw, 108px);
	max-width: var(--maxw-narrow);
}

[data-level='operational'] {
	--st-c: var(--st-operational);
}
[data-level='degraded'] {
	--st-c: var(--st-degraded);
}
[data-level='outage'] {
	--st-c: var(--st-outage);
}
[data-level='maintenance'] {
	--st-c: var(--st-maintenance);
}
[data-level='unknown'] {
	--st-c: var(--st-unknown);
}
[data-level='none'] {
	--st-c: var(--st-none);
}

.st-dot {
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: var(--st-c);
	box-shadow: 0 0 0 0.22em color-mix(in oklch, var(--st-c) 22%, transparent);
	flex: none;
}
[data-level='outage'] > .st-dot,
[data-level='outage'] .st-pill .st-dot {
	animation: st-pulse 1.6s var(--ease-in-out) infinite;
}
@keyframes st-pulse {
	50% {
		box-shadow: 0 0 0 0.4em color-mix(in oklch, var(--st-c) 8%, transparent);
	}
}
@media (prefers-reduced-motion: reduce) {
	.st-dot {
		animation: none !important;
	}
}

/* ── Hero ── */

.st-hero {
	margin-bottom: clamp(40px, 6vw, 64px);
}
.st-headline {
	display: flex;
	align-items: center;
	gap: 0.42em;
}
.st-headline .st-dot {
	width: 0.32em;
	height: 0.32em;
}
.st-checked {
	margin: 18px 0 0;
	font-family: var(--font-mono);
	font-size: 12.5px;
	letter-spacing: 0.02em;
	color: var(--text-dim);
}

/* ── Services ── */

.st-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--border-strong);
}
.st-service {
	padding-block: 22px;
	border-bottom: 1px solid var(--border);
}
.st-service:last-child {
	border-bottom: 0;
}

.st-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.st-name {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-size: 17px;
	font-weight: 500;
	color: var(--text-strong);
	margin: 0;
}
.st-logo {
	flex: none;
	width: 22px;
	height: 22px;
}
.st-logo-mask {
	background: currentColor;
	mask: var(--logo) center / contain no-repeat;
	opacity: 0.92;
}
.st-name a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s var(--ease);
}
.st-name a:hover {
	color: var(--amber);
}
.st-ext {
	margin-left: 0.3em;
	font-size: 0.75em;
	color: var(--text-dim);
}
.st-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--st-c);
}
.st-uptime {
	margin-left: auto;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-muted);
}

/* ── Uptime bars ──
   A fixed track of --slots days (STATUS_HISTORY_DAYS), filled from the right
   (today) back to the day the history began; --empty is the slots before it.
   The axis starts its date under the first bar. */

.st-bars {
	--slot: calc((100% - (var(--slots, 30) - 1) * 2px) / var(--slots, 30));
	display: flex;
	justify-content: flex-end;
	gap: 2px;
	height: 30px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
.st-bars li {
	flex: 0 0 var(--slot);
	min-width: 0;
	background: var(--st-c);
	border-radius: 1px;
	transition:
		transform 0.15s var(--ease),
		opacity 0.15s var(--ease);
}
.st-bars li[data-level='operational'] {
	opacity: 0.78;
}
.st-bars li:hover {
	opacity: 1;
	transform: scaleY(1.12);
}
.st-axis {
	display: flex;
	justify-content: space-between;
	padding-left: calc(
		var(--empty, 0) * ((100% - (var(--slots, 30) - 1) * 2px) / var(--slots, 30) + 2px)
	);
	margin-top: 6px;
	font-family: var(--font-mono);
	font-size: 10.5px;
	color: var(--text-dim);
}

/* ── Incidents ── */

.st-incidents {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
}
.st-incidents li {
	padding: 10px 12px;
	border-left: 2px solid var(--st-c);
	background: color-mix(in oklch, var(--st-c) 7%, transparent);
	font-size: 14.5px;
	line-height: 1.45;
}
.st-incidents a {
	color: var(--text-strong);
	text-decoration: underline;
	text-decoration-color: var(--border-strong);
	text-underline-offset: 3px;
}
.st-incidents a:hover {
	text-decoration-color: currentColor;
}
.st-since {
	margin-left: 8px;
	font-family: var(--font-mono);
	font-size: 11.5px;
	color: var(--text-dim);
}
.st-error {
	margin: 10px 0 0;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-muted);
}

.st-footnote {
	margin: clamp(40px, 6vw, 56px) 0 0;
	padding-top: 22px;
	border-top: 1px solid var(--border);
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--text-dim);
}
.st-footnote a {
	color: var(--amber);
	text-decoration: underline;
	text-decoration-color: var(--amber-border);
	text-underline-offset: 3px;
}

@media (max-width: 560px) {
	.st-uptime {
		margin-left: 0;
		flex-basis: 100%;
	}
	.st-bars {
		gap: 1px;
		height: 26px;
	}
}
