/* Values mirror frontend/src/app.css v2 tokens. */
@font-face {
	font-family: 'DM Sans';
	src: url('/static/dm-sans-latin-normal.woff2') format('woff2');
	font-weight: 100 1000;
	font-style: normal;
	font-display: swap;
}

:root {
	color-scheme: dark;
	--base: #00031b;
	--fill: #14172d;
	--child: #24263b;
	--stroke: #1f2136;
	--text: #91939d;
	--white: #fff;
	--primary: #00b3e4;
	--success: #00e47d;
	--danger: #e40000;
	--orange: #e44c00;
}

* {
	box-sizing: border-box;
}

html {
	background: var(--base);
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--base);
	color: var(--text);
	font: 400 15px/22px 'DM Sans', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

main {
	max-width: 850px;
	margin: 0 auto;
	padding: 40px 16px 64px;
}

h1,
h2 {
	margin: 0;
	font-weight: 600;
}

p {
	margin: 0;
}

a {
	color: inherit;
}

a:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Header */
.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 40px;
}

.logo img {
	display: block;
	height: 28px;
	width: auto;
}

.top-link {
	font-size: 14px;
	text-decoration: none;
}

.top-link:hover {
	color: var(--white);
}

/* Banner */
.banner {
	padding: 16px 20px;
	border-radius: 4px;
	background: var(--success);
	color: var(--base);
}

.banner h1 {
	font-size: 20px;
	line-height: 28px;
}

.banner-partial {
	background: var(--orange);
	color: var(--white);
}

.banner-major {
	background: var(--danger);
	color: var(--white);
}

.banner-maintenance {
	background: var(--primary);
}

.banner-unknown {
	background: var(--child);
	color: var(--white);
}

/* Notice */
.notice {
	margin-top: 24px;
	border: 1px solid var(--stroke);
	border-radius: 4px;
	overflow: hidden;
}

.notice h2 {
	padding: 10px 20px;
	background: var(--primary);
	color: var(--base);
	font-size: 15px;
	line-height: 22px;
}

.notice-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 20px;
	background: var(--fill);
}

.notice time {
	color: var(--white);
	font-weight: 600;
}

/* Systems */
.systems-head {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 40px 0 8px;
	font-size: 13px;
	line-height: 19px;
}

.systems {
	border: 1px solid var(--stroke);
	border-radius: 4px;
	background: var(--fill);
}

.system {
	padding: 20px;
}

.system + .system {
	border-top: 1px solid var(--stroke);
}

.system-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	margin-bottom: 12px;
}

.system h2 {
	color: var(--white);
	font-size: 16px;
	line-height: 22px;
}

.desc {
	margin-left: 6px;
	color: var(--text);
	font-size: 13px;
	font-weight: 400;
}

.state {
	flex-shrink: 0;
	color: var(--success);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

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

.state-maintenance {
	color: var(--primary);
}

.state-unknown {
	color: var(--text);
}

.bars {
	display: flex;
	gap: 2px;
	height: 34px;
}

.bar {
	flex: 1;
	min-width: 0;
	border-radius: 1px;
	background: var(--success);
}

.bars .bar:hover,
.bars .bar.active {
	opacity: 0.6;
}

.bar-minor {
	background: var(--orange);
}

.bar-major {
	background: var(--danger);
}

.bar-maint {
	background: var(--primary);
}

.bar-none {
	background: var(--child);
}

.system-foot {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
	font-size: 13px;
	line-height: 19px;
	white-space: nowrap;
}

.rule {
	flex: 1;
	height: 1px;
	background: var(--stroke);
}

.range-short {
	display: none;
}

/* Under 600px the oldest 60 days drop, so each bar stays wide enough to tap. */
@media (width < 600px) {
	main {
		padding-top: 24px;
	}

	.top {
		margin-bottom: 24px;
	}

	.bars .bar:nth-child(-n + 60) {
		display: none;
	}

	.range-long {
		display: none;
	}

	.range-short {
		display: inline;
	}

	.system {
		padding: 16px;
	}

	.desc {
		display: block;
		margin: 2px 0 0;
		line-height: 19px;
	}
}

/* Footer */
.foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: 32px;
	font-size: 13px;
	line-height: 19px;
	text-align: center;
}

.foot a {
	text-decoration: none;
}

.foot a:hover {
	color: var(--white);
}

/* Tooltip */
.tip {
	position: fixed;
	z-index: 10;
	max-width: calc(100vw - 32px);
	padding: 6px 10px;
	border: 1px solid var(--stroke);
	border-radius: 4px;
	background: var(--child);
	color: var(--white);
	font-size: 13px;
	line-height: 19px;
	white-space: nowrap;
	pointer-events: none;
}
