:root {
	--bg: #0b0e14;
	--panel: #161b22;
	--border: #30363d;
	--text: #e6edf3;
	--muted: #8b949e;

	/* Stock-map palette: solid, saturated fills per status. */
	--up: #2f9e44;
	--up-hi: #40c057;
	--degraded: #c2900a;
	--degraded-hi: #f0b429;
	--down: #c92a2a;
	--down-hi: #fa5252;
	--unknown: #495057;

	--grid-bg: #05070b;
}

/* Light theme: override the chrome (status fills stay the same). */
:root[data-theme="light"] {
	--bg: #f5f7fa;
	--panel: #ffffff;
	--border: #d0d7de;
	--text: #1f2328;
	--muted: #59636e;
	--grid-bg: #d8dee6;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh; /* track the dynamic viewport so mobile browser chrome doesn't clip */
	overflow: hidden;
}

/* --- Domain migration banner --- */
.domain-banner {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.45rem 2.5rem 0.45rem 1rem;
	background: #c2900a;
	color: #0b0e14;
	font-size: 0.875rem;
	font-weight: 500;
	position: relative;
}

.domain-banner__link {
	color: #0b0e14;
	font-weight: 700;
	text-underline-offset: 2px;
}

.domain-banner__close {
	position: absolute;
	right: 0.6rem;
	background: none;
	border: none;
	color: #0b0e14;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.2rem 0.4rem;
	opacity: 0.7;
}

.domain-banner__close:hover { opacity: 1; }

/* --- Header --- */
.header {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 1rem;
	border-bottom: 1px solid var(--border);
}

.header__brand {
	display: flex;
	align-items: center;
}

.header__logo {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.header__search {
	justify-self: center;
	width: 100%;
	max-width: 480px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.42rem 0.75rem;
	cursor: pointer;
	color: var(--muted);
	font-size: 0.85rem;
	transition: border-color 0.15s, color 0.15s;
	text-align: left;
}

.header__search:hover {
	border-color: var(--muted);
	color: var(--text);
}

.header__search svg,
.header__search i[data-lucide] {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	stroke-width: 2;
}

.header__search-placeholder {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* --- Statusbar (legend + last-updated) --- */
.statusbar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.28rem 1rem;
	border-bottom: 1px solid var(--border);
	background: var(--bg);
}

.updated {
	color: var(--muted);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.legend {
	display: flex;
	gap: 0.8rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.74rem;
	color: var(--muted);
}

.legend li {
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.swatch {
	width: 0.65rem;
	height: 0.65rem;
	border-radius: 2px;
	display: inline-block;
}

.swatch.is-up {
	background: var(--up-hi);
}
.swatch.is-degraded {
	background: var(--degraded-hi);
}
.swatch.is-down {
	background: var(--down-hi);
}
.swatch.is-unknown {
	background: var(--unknown);
}

.toolbar {
	display: flex;
	gap: 0.3rem;
	align-items: center;
}

.tbar-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	background: var(--panel);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 0.28rem 0.6rem;
	font-size: 0.78rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.tbar-btn:hover {
	border-color: var(--muted);
}

/* Lucide icons render as inline SVGs; keep them sized to the button text. */
.tbar-btn svg,
.tbar-btn i[data-lucide] {
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
	stroke-width: 2;
}

.tbar-btn.is-active {
	background: var(--degraded);
	border-color: var(--degraded-hi);
	color: #fff;
}

.kbd {
	font-size: 0.68rem;
	font-weight: 600;
	color: var(--muted);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 0 0.3rem;
	line-height: 1.4;
}

/* --- Command palette --- */
.palette {
	position: fixed;
	inset: 0;
	z-index: 80;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 12vh;
}

.palette[hidden] {
	display: none;
}

.palette__box {
	width: min(560px, calc(100vw - 2rem));
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
	overflow: hidden;
}

.palette__input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.9rem 1rem;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--border);
	color: var(--text);
	font-size: 1rem;
	outline: none;
}

.palette__results {
	list-style: none;
	margin: 0;
	padding: 0.35rem;
	max-height: 50vh;
	overflow-y: auto;
}

.palette__item {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 0.6rem;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.88rem;
}

.palette__item.is-active {
	background: rgba(127, 127, 127, 0.18);
}

.palette__cmd {
	color: var(--muted);
	width: 0.6rem;
	text-align: center;
}

.palette__label {
	font-weight: 600;
}

.palette__hint {
	margin-left: auto;
	color: var(--muted);
	font-size: 0.74rem;
}

.palette__empty {
	padding: 1rem;
	text-align: center;
	color: var(--muted);
	list-style: none;
}

/* --- Customize panel extras --- */
.panel__sub {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 1rem;
	border-bottom: 1px solid var(--border);
	font-size: 0.8rem;
	color: var(--muted);
}

.link-btn {
	background: none;
	border: none;
	color: var(--down-hi);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
}

.cz-group {
	margin-bottom: 0.75rem;
}

.cz-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.3rem 0.2rem;
	font-size: 0.85rem;
	cursor: pointer;
}

.cz-row input {
	accent-color: var(--up-hi);
	cursor: pointer;
}

.cz-row--head {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.72rem;
	color: var(--muted);
	border-bottom: 1px solid var(--border);
	margin-bottom: 0.2rem;
}

.cz-row .dot {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
}
.cz-row .dot.is-up {
	background: var(--up-hi);
}
.cz-row .dot.is-degraded {
	background: var(--degraded-hi);
}
.cz-row .dot.is-down {
	background: var(--down-hi);
}
.cz-row .dot.is-unknown {
	background: var(--unknown);
}

/* --- Incidents panel --- */
.panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(380px, 100vw);
	background: var(--panel);
	border-left: 1px solid var(--border);
	box-shadow: -10px 0 30px rgba(0, 0, 0, 0.45);
	z-index: 70;
	display: flex;
	flex-direction: column;
}

.panel[hidden] {
	display: none;
}

.panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.9rem 1rem;
	border-bottom: 1px solid var(--border);
}

.panel__head h2 {
	margin: 0;
	font-size: 1rem;
}

.panel__close {
	background: none;
	border: none;
	color: var(--muted);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 0.25rem;
}
.panel__close:hover {
	color: var(--text);
}

.panel__list {
	overflow-y: auto;
	padding: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.panel__empty {
	color: var(--muted);
	text-align: center;
	padding: 2rem 0;
}

.incident {
	border: 1px solid var(--border);
	border-left-width: 3px;
	border-radius: 6px;
	padding: 0.55rem 0.7rem;
	background: rgba(255, 255, 255, 0.02);
}
.incident.is-down {
	border-left-color: var(--down-hi);
}
.incident.is-degraded {
	border-left-color: var(--degraded-hi);
}
.incident.is-unknown {
	border-left-color: var(--unknown);
}

.incident__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.incident__name {
	font-weight: 600;
	font-size: 0.9rem;
}

.incident__badge {
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.1rem 0.4rem;
	border-radius: 999px;
	color: #fff;
}
.incident__badge.is-down {
	background: var(--down);
}
.incident__badge.is-degraded {
	background: var(--degraded);
}
.incident__badge.is-unknown {
	background: var(--unknown);
}

.incident__desc {
	font-size: 0.78rem;
	color: var(--text);
	margin: 0.3rem 0;
}

.incident__meta {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 0.72rem;
	color: var(--muted);
}

/* --- Treemap canvas --- */
.grid {
	flex: 1 1 auto;
	position: relative;
	overflow: hidden;
	background: var(--grid-bg);
}

.grid__loading,
.grid__error,
.grid__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	margin: 0;
	font-size: 1rem;
	padding: 1rem;
	text-align: center;
}

.grid__error {
	color: var(--down-hi);
}

/* --- Sectors --- */
.sector {
	position: absolute;
	overflow: hidden;
}

.sector__label {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 22px;
	display: flex;
	align-items: center;
	padding: 0 0.4rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* --- Tiles --- */
.tile {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.1rem;
	padding: 2px;
	border-radius: 2px;
	color: #fff;
	overflow: hidden;
	text-align: center;
	line-height: 1.05;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.tile.is-up {
	background: var(--up);
}
.tile.is-degraded {
	background: var(--degraded);
}
.tile.is-down {
	background: var(--down);
}
.tile.is-unknown {
	background: var(--unknown);
}

/* Flash a tile when it's picked from the command palette. */
.tile--flash {
	outline: 3px solid #fff;
	outline-offset: -3px;
	z-index: 5;
	animation: tile-flash 0.8s ease-in-out 0s 3;
}

@keyframes tile-flash {
	0%,
	100% {
		outline-color: rgba(255, 255, 255, 0.25);
	}
	50% {
		outline-color: rgba(255, 255, 255, 0.95);
	}
}

.tile__logo {
	flex: 0 0 auto;
	margin-bottom: 0.25rem;
	border-radius: 7px;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 72%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tile__name {
	font-weight: 700;
	letter-spacing: -0.01em;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tile__status {
	opacity: 0.9;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* --- Hover card --- */
.tooltip {
	position: fixed;
	z-index: 60;
	max-width: 320px;
	padding: 0.6rem 0.7rem;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
	color: var(--text);
	font-size: 0.8rem;
	line-height: 1.4;
	pointer-events: none;
	backdrop-filter: blur(2px);
}

.tooltip[hidden] {
	display: none;
}

.tooltip__head {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.3rem;
}

.tooltip .dot {
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	flex: 0 0 auto;
}
.tooltip .dot.is-up {
	background: var(--up-hi);
}
.tooltip .dot.is-degraded {
	background: var(--degraded-hi);
}
.tooltip .dot.is-down {
	background: var(--down-hi);
}
.tooltip .dot.is-unknown {
	background: var(--unknown);
}

.tooltip__name {
	font-weight: 700;
	font-size: 0.92rem;
}

.tooltip__badge {
	margin-left: auto;
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.1rem 0.4rem;
	border-radius: 999px;
	color: #fff;
}
.tooltip__badge.is-up {
	background: var(--up);
}
.tooltip__badge.is-degraded {
	background: var(--degraded);
}
.tooltip__badge.is-down {
	background: var(--down);
}
.tooltip__badge.is-unknown {
	background: var(--unknown);
}

.tooltip__desc {
	color: var(--text);
	margin-bottom: 0.35rem;
}

.tooltip__row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	color: var(--muted);
}
.tooltip__row strong {
	color: var(--text);
	font-weight: 600;
}

.tooltip__impacted {
	margin: 0.15rem 0 0.35rem;
	color: var(--degraded-hi);
	font-size: 0.75rem;
}

.tooltip__incident {
	margin: 0.3rem 0;
	padding: 0.35rem 0.45rem;
	background: rgba(250, 82, 82, 0.12);
	border-left: 3px solid var(--down-hi);
	border-radius: 3px;
	color: var(--text);
	font-size: 0.76rem;
}
.tooltip__incident em {
	color: var(--muted);
	font-style: normal;
}

.tooltip__note {
	color: var(--muted);
}

.tooltip__link {
	margin-top: 0.4rem;
	padding-top: 0.35rem;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.72rem;
}

/* --- Toasts --- */
.toasts {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	z-index: 50;
	max-width: min(360px, calc(100vw - 2rem));
}

.toast {
	background: var(--panel);
	border: 1px solid var(--border);
	border-left-width: 4px;
	border-radius: 6px;
	padding: 0.7rem 0.9rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	animation: toast-in 0.2s ease;
}

.toast.toast--down {
	border-left-color: var(--down-hi);
}
.toast.toast--up {
	border-left-color: var(--up-hi);
}
.toast.toast--degraded {
	border-left-color: var(--degraded-hi);
}

.toast__title {
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.15rem;
}

.toast__body {
	font-size: 0.8rem;
	color: var(--muted);
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateX(12px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.toast,
	.modal__box {
		animation: none;
	}
}

/* --- Mobile / small screens --- */
@media (max-width: 640px) {
	.header {
		grid-template-columns: auto 1fr auto;
		gap: 0.4rem 0.5rem;
		padding: 0.4rem 0.6rem;
	}
	.header__search {
		padding: 0.38rem 0.6rem;
		font-size: 0.8rem;
	}
	.header__search-placeholder {
		display: none;
	}
	.statusbar {
		padding: 0.25rem 0.6rem;
	}
	.legend {
		display: none; /* status colors shown in detail sheet */
	}
	.toolbar {
		flex-wrap: wrap;
		gap: 0.3rem;
	}
	.tbar-btn {
		padding: 0.28rem 0.5rem;
		font-size: 0.74rem;
	}
	.kbd {
		display: none; /* keyboard shortcut not relevant on touch */
	}

	/* Detail "info" becomes a bottom sheet. */
	.modal {
		align-items: flex-end;
		padding: 0;
	}
	.modal__box {
		width: 100%;
		max-width: none;
		max-height: 88vh;
		max-height: 88dvh;
		border-radius: 16px 16px 0 0;
		padding-top: 1.5rem;
		animation: sheet-up 0.22s ease;
	}
	.modal__box::before {
		content: "";
		position: absolute;
		top: 0.55rem;
		left: 50%;
		transform: translateX(-50%);
		width: 40px;
		height: 4px;
		border-radius: 2px;
		background: var(--border);
	}
	.detail__actions {
		flex-direction: column;
	}
	.detail__visit,
	.detail__copy-btn {
		justify-content: center;
	}
}

@keyframes sheet-up {
	from {
		transform: translateY(100%);
	}
	to {
		transform: translateY(0);
	}
}

/* --- Icon-only toolbar buttons --- */
.tbar-btn--icon {
	padding: 0.28rem 0.42rem;
	line-height: 1;
	position: relative;
}

.tbar-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	min-width: 15px;
	height: 15px;
	border-radius: 999px;
	background: var(--down-hi);
	color: #fff;
	font-size: 0.58rem;
	font-weight: 700;
	line-height: 15px;
	text-align: center;
	padding: 0 3px;
	pointer-events: none;
}

.tbar-badge[hidden] {
	display: none;
}

.cz-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1rem;
	border-bottom: 1px solid var(--border);
	font-size: 0.82rem;
	cursor: pointer;
}
.cz-toggle input {
	accent-color: var(--up-hi);
	cursor: pointer;
}

/* --- Service detail modal --- */
.modal {
	position: fixed;
	inset: 0;
	z-index: 85;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}
.modal[hidden] {
	display: none;
}

.modal__box {
	position: relative;
	width: min(520px, 100%);
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--panel);
	border: 1px solid var(--border);
	border-top: 3px solid transparent;
	border-radius: 12px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.modal__box.is-up      { border-top-color: var(--up-hi); }
.modal__box.is-degraded { border-top-color: var(--degraded-hi); }
.modal__box.is-down    { border-top-color: var(--down-hi); }
.modal__box.is-unknown { border-top-color: var(--unknown); }

.modal__body {
	overflow-y: auto;
	flex: 1 1 auto;
}

.modal__close {
	position: absolute;
	top: 0.65rem;
	right: 0.7rem;
	z-index: 1;
	background: none;
	border: none;
	color: var(--muted);
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem;
	display: flex;
	align-items: center;
	border-radius: 4px;
}
.modal__close svg { width: 17px; height: 17px; }
.modal__close:hover {
	color: var(--text);
	background: rgba(127, 127, 127, 0.12);
}

.detail__head {
	display: flex;
	align-items: flex-start;
	gap: 0.9rem;
	padding: 1.1rem 3rem 1rem 1.3rem;
}

.detail__logo {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 9px;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 72%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.detail__head-body {
	flex: 1;
	min-width: 0;
}

.detail__name-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 0.2rem;
}

.detail__name {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
}

.detail__badge {
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	color: #fff;
}
.detail__badge.is-up       { background: var(--up); }
.detail__badge.is-degraded { background: var(--degraded); }
.detail__badge.is-down     { background: var(--down); }
.detail__badge.is-unknown  { background: var(--unknown); }

.detail__desc {
	margin: 0;
	color: var(--muted);
	font-size: 0.83rem;
	line-height: 1.4;
}

.detail__metrics {
	display: flex;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.detail__metric {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.7rem 0.5rem;
	text-align: center;
	border-right: 1px solid var(--border);
}
.detail__metric:last-child { border-right: none; }

.detail__metric-label {
	font-size: 0.62rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
	margin-bottom: 0.2rem;
	white-space: nowrap;
}

.detail__metric-value {
	font-size: 1.1rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.detail__actions {
	display: flex;
	gap: 0.5rem;
	padding: 0.85rem 1.3rem;
}

.detail__visit {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	background: rgba(127, 127, 127, 0.08);
	border: 1px solid var(--border);
	border-radius: 7px;
	padding: 0.5rem 0.9rem;
	color: var(--text);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
	transition: background 0.12s, border-color 0.12s;
}
.detail__visit svg { width: 14px; height: 14px; flex: 0 0 auto; stroke-width: 2; }
.detail__visit:hover { background: rgba(127, 127, 127, 0.15); border-color: var(--muted); }

.detail__copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: none;
	border: 1px solid var(--border);
	border-radius: 7px;
	padding: 0.5rem 0.8rem;
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.12s, border-color 0.12s;
}
.detail__copy-btn svg { width: 14px; height: 14px; flex: 0 0 auto; stroke-width: 2; }
.detail__copy-btn:hover { color: var(--text); border-color: var(--muted); }

.detail__host {
	margin: 0;
	padding: 0 1.3rem 0.75rem;
	color: var(--muted);
	font-size: 0.72rem;
}

.detail__section-head {
	display: flex;
	align-items: center;
	padding: 0.55rem 1.3rem 0.4rem;
	border-top: 1px solid var(--border);
}

.detail__subhead {
	margin: 0;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--muted);
}

.detail__incidents {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.3rem 1rem 1.2rem;
}

/* --- Detail incident cards --- */
.detail-inc {
	padding: 0.55rem 0.7rem;
	border-radius: 6px;
	border: 1px solid var(--border);
	border-left: 3px solid var(--unknown);
	background: rgba(127, 127, 127, 0.04);
}
.detail-inc.is-down     { border-left-color: var(--down-hi); }
.detail-inc.is-degraded { border-left-color: var(--degraded-hi); }

.detail-inc__top {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 0.2rem;
}

.detail-inc__badge {
	font-size: 0.58rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.1rem 0.4rem;
	border-radius: 999px;
	color: #fff;
}
.detail-inc__badge.is-down     { background: var(--down); }
.detail-inc__badge.is-degraded { background: var(--degraded); }
.detail-inc__badge.is-unknown  { background: var(--unknown); }

.detail-inc__dur {
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	color: var(--text);
	font-weight: 600;
}

.detail-inc__state {
	margin-left: auto;
	font-size: 0.7rem;
	color: var(--muted);
}

.detail-inc__state--live {
	color: var(--down-hi);
	font-weight: 700;
}

.detail-inc__desc {
	margin: 0 0 0.2rem;
	font-size: 0.8rem;
	color: var(--text);
	line-height: 1.4;
}

.detail-inc__date {
	font-size: 0.7rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
