:root {
	--bg: #f6f7f8;
	--surface: #ffffff;
	--text: #1f2328;
	--muted: #656d76;
	--border: #d8dee4;
	--brand: #ee3b37;
	--ok: #1a7f37;
	--warn: #bf8700;
	--bad: #cf222e;
	--none: #e3e6ea;
	--link: #0969da;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0d1117;
		--surface: #161b22;
		--text: #e6edf3;
		--muted: #8d96a0;
		--border: #30363d;
		--ok: #3fb950;
		--warn: #d29922;
		--bad: #f85149;
		--none: #262c33;
		--link: #4493f8;
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	padding: 12px max(16px, calc((100% - 1080px) / 2));
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}
.brand { font-weight: 650; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 14px; }
.top nav a { color: var(--muted); }
.top nav a.current { color: var(--text); font-weight: 600; }
.who { color: var(--muted); }

main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }
footer { max-width: 1080px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: 13px; }

h1 { font-size: 24px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 32px 0 12px; }
.lead { font-size: 17px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.text-bad { color: var(--bad); }
.crumbs { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.narrow { max-width: 480px; margin: 48px auto; }
.signin .button { margin-top: 8px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--border); }
.flash-error { border-color: var(--bad); color: var(--bad); }

.banner {
	display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px;
	padding: 16px 20px; border-radius: 10px; color: #fff; font-size: 17px;
}
.banner .muted { color: rgba(255, 255, 255, .8); font-size: 13px; }
.banner-ok { background: var(--ok); }
.banner-warning { background: var(--warn); }
.banner-critical { background: var(--bad); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--none); }
.dot-ok { background: var(--ok); }
.dot-fail { background: var(--bad); }

.pill {
	display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
	text-transform: uppercase; letter-spacing: .03em; color: #fff; background: var(--muted);
}
.pill-critical { background: var(--bad); }
.pill-warning { background: var(--warn); }
.pill-resolved { background: var(--ok); }

.open-incidents { margin-top: 16px; }
.incident-row {
	display: grid; grid-template-columns: auto auto 1fr auto; align-items: baseline; gap: 4px 12px;
	padding: 12px 16px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--border);
	border-radius: 10px; color: var(--text);
}
.incident-row:hover { text-decoration: none; border-color: var(--muted); }
.incident-title { font-weight: 600; }
@media (max-width: 640px) {
	.incident-row { grid-template-columns: auto 1fr; }
	.incident-summary { grid-column: 1 / -1; }
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.card {
	display: block; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--border);
	border-radius: 10px; color: var(--text); min-width: 0;
}
.card:hover { text-decoration: none; border-color: var(--muted); }
.card-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.card-head { display: flex; align-items: center; gap: 8px; }
.card-name { font-weight: 600; flex: 1; min-width: 0; }
.card-summary { margin: 6px 0 12px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

.uptime { display: flex; gap: 1px; height: 24px; }
.uptime i { flex: 1; border-radius: 1px; background: var(--none); }
.uptime i.up { background: var(--ok); }
.uptime i.degraded { background: var(--warn); }
.uptime i.down { background: var(--bad); }
.uptime-legend { display: flex; justify-content: space-between; margin-top: 4px; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.table th, .table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: 14px; }
.table th { font-weight: 600; color: var(--muted); font-size: 13px; }
.table tr:last-child td { border-bottom: 0; }
.table td .dot { margin-right: 6px; }

.details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; overflow-x: auto; font-size: 13px; }

.button {
	display: inline-block; padding: 8px 16px; border-radius: 8px; border: 0; cursor: pointer;
	background: var(--text); color: var(--bg); font: inherit; font-weight: 600;
}
.button:hover { text-decoration: none; opacity: .9; }
.button-quiet { background: transparent; color: var(--text); border: 1px solid var(--border); }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0; }
