@font-face {
	font-family: "Twemoji Flags";
	unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
	src: url('https://esm.sh/country-flag-emoji-polyfill/dist/TwemojiCountryFlags.woff2') format('woff2');
	font-display: swap;
}

#marquee-bar {
	background: white;
	color: black;
	overflow: hidden;
	white-space: pre;
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: normal;
	/* break out of body's 1rem padding so the bar spans edge-to-edge */
	margin: -1rem -1rem 0.5rem;
	font-family:
		"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
		monospace;
}

#marquee-text {
	display: inline-block;
	white-space: pre;
	/* 150ms * 9ch -> time to scroll entire string */
	--marquee-duration: 1.35s;
	animation: snapMarquee var(--marquee-duration) linear infinite;
}

@keyframes snapMarquee {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-9ch);
	}
}

body {
	margin: 0;
	padding: 1rem;
	background: black;
	color: white;
	font-family: "Twemoji Flags", "IBM Plex Mono",
		ui-monospace, SFMono-Regular, Menlo, Monaco,
		Consolas, "Liberation Mono", "Courier New", monospace;
}

#header-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	border-bottom: 1px solid white;
	gap: 1rem;
}

#header-wrap h1 {
	text-align: center;
	margin: 0;
}

#header-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

#header-links > * {
	display: inline-block;
	color: white;
	font-size: 1.125rem;
	text-decoration: none;
	border: 1px solid white;
	padding: .25rem .5rem;
}

#upper-flex {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

#lower-flex {
	display: flex;
	gap: 1.25rem;
}

#left-flex {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.stats-card {
	border: 1px solid white;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	column-gap: 2rem;
	row-gap: 0.25rem;
	flex-grow: 1;
	position: relative;
	min-width: 12rem;
}

.stats-card > * { margin: 0; }

.stats-card .sub {
	font-style: italic;
	align-self: start;
}

.stats-card .basic-big {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

#left-flex .stats-card {
	justify-content: center;
}

#cache-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	place-items: center;
	flex: 1;
	align-self: stretch;
}

#cache-grid .sub { align-self: end; }
#cache-grid > * { margin: 0; }

#prop-grid {
	display: grid;
	place-items: center;
	grid-template-columns: auto 1fr;
	gap: 0;
	flex: 1;
}

#prop-grid > p {
	font-size: 0.875rem;
	translate: 0 1.2rem;
}

.card-title {
	font-size: 1rem;
	position: absolute;
	background: black;
	display: inline-block;
	padding: 0 0.375rem;
	top: -.6rem;
	left: .5rem;
	text-wrap: nowrap;
	text-transform: uppercase;
}

.plot-wrap > * {
	font-size: 0.875rem !important;
}

#cluster-status {
	margin-top: 1.25rem;

	& > div {
		display: flex;
		flex-flow: row wrap;
		gap: 0.5rem 1rem;
		justify-content: space-evenly;
		width: 100%;
	}
}

#branch-statuses {
	margin-top: 1.25rem;

	& > div {
		display: flex;
		flex-flow: column wrap;
		gap: 1rem;
		justify-content: space-evenly;
		align-items: left;
		width: 100%;
	}
}

.cluster-node, .branch-status {
	display: inline-block;
	height: 0.8em;
	width: 0.8em;
	border-radius: 100%;
	background: var(--dot-color);
	&.cluster-live, &.cluster-online, &.branch-online {
		--dot-color: #1b9e77;
	}
	&.cluster-offline, &.branch-offline {
		--dot-color: #d22d39;
	}
	&.cluster-unknown, &.branch-unknown {
		--dot-color: #666666;
	}
}

/* the uwu design language does not call for bold text. */
h1, h2 { font-weight: normal; }

@media (max-width: 1024px) {
	#lower-flex { flex-direction: column; }
	#header-wrap { justify-content: center; }
}

figure {
	margin: 0;
}

#branches-layout {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-top: 2rem;
}

.muted {
	color: #cccccc;
}