/* Brand primary: kurma (date) brown.
   Contrast verified against WCAG 2.2 SC 1.4.3 (AA): --pc on --p = 6.99:1. */
:root {
	--p: 45.67% 0.0856 58.5;
	--pc: 97.96% 0.0158 73.68;
	/* Status text colors; each is at least 4.5:1 on white and on --b2. */
	--text-up: #1a7f37;
	--text-warning: #9a6700;
	--text-down: #cf222e;
	--text-none: #59636e;
	--banner-text: #fff;
	/* Flat design: no rounded corners on DaisyUI components either. */
	--rounded-box: 0;
	--rounded-btn: 0;
	--rounded-badge: 0;
	--tab-radius: 0;
}

/* Minimal reset standing in for Tailwind's preflight.
   One rule per line so the file stays diffable. */
*,
*::before,
*::after {
	box-sizing: border-box;
	border: 0 solid;
}
html {
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	font-family:
		system-ui,
		-apple-system,
		"Segoe UI",
		Roboto,
		sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: oklch(var(--bc));
	background: oklch(var(--b2));
}
h1 {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0;
}
h2 {
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0;
}
p,
ul,
ol,
dl,
dd {
	margin: 0;
}
fieldset {
	margin: 0;
	padding: 0;
}
legend {
	padding: 0;
}
a {
	color: inherit;
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
table {
	border-collapse: collapse;
}
code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

:focus-visible {
	outline: 2px solid oklch(var(--bc) / 0.7);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: oklch(var(--b1));
	padding: 0.5rem 1rem;
	z-index: 10;
}
.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 0.75rem 1rem;
	background: oklch(var(--b1));
	border-bottom: 1px solid oklch(var(--b3));
}
.brand {
	font-size: 1.125rem;
	font-weight: 700;
	text-decoration: none;
}
.navlist {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
}

.page {
	max-width: 56rem;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.pagehead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}
.actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.panel {
	background: oklch(var(--b1));
	border: 1px solid oklch(var(--b3));
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
.card-body {
	gap: 0.75rem;
}

.muted {
	font-size: 0.875rem;
}
.field-error {
	color: #b91c1c;
	font-size: 0.875rem;
	margin-top: 0.25rem;
}
.error-list {
	margin: 0;
	padding-left: 1.25rem;
}

.hb-bar {
	display: flex;
	gap: 2px;
	height: 1.5rem;
	align-items: stretch;
}
.hb {
	flex: 1 1 0;
	min-width: 2px;
}

/* One color per status level, shared by bars, swatches, banners, and status text. */
.is-up {
	--level-color: var(--text-up);
}
.is-warning {
	--level-color: var(--text-warning);
}
.is-down {
	--level-color: var(--text-down);
}
.is-none {
	--level-color: var(--text-none);
}
.hb,
.swatch,
.banner {
	background: var(--level-color);
}
.hb.is-none,
.swatch.is-none {
	background: oklch(var(--bc) / 0.2);
}
.status-text {
	color: var(--level-color);
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
}

.radio-row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}
.table-wrap {
	overflow-x: auto;
}
.code-block {
	display: block;
	background: oklch(var(--b2));
	padding: 0.5rem 0.75rem;
	overflow-wrap: anywhere;
}
.narrow {
	max-width: 26rem;
	margin: 0 auto;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.status-region {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.banner {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	padding: 1rem 1.25rem;
	color: var(--banner-text);
	font-size: 1.125rem;
	font-weight: 600;
}

.panel-head {
	padding: 0.75rem 1.25rem;
	border-bottom: 1px solid oklch(var(--b3));
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-none);
}
.monitor-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem 1.25rem;
}
.monitor-card + .monitor-card {
	border-top: 1px solid oklch(var(--b3));
}
.monitor-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.monitor-card-name {
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	overflow-wrap: anywhere;
}
.subhead {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-none);
}


.day-bar {
	height: 2rem;
}
.bar-scale {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.75rem;
	color: var(--text-none);
}
.bar-scale-mid {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	justify-content: center;
}
.bar-scale-mid::before,
.bar-scale-mid::after {
	content: "";
	flex: 1;
	border-top: 1px solid oklch(var(--b3));
}

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.75rem;
	color: var(--text-none);
}
.legend > span {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
}
.swatch {
	display: inline-block;
	width: 0.625rem;
	height: 0.625rem;
}

.banner-meta {
	font-size: 0.875rem;
	font-weight: 400;
}
.subtitle {
	margin-top: 0.25rem;
	font-size: 0.875rem;
	color: var(--text-none);
	overflow-wrap: anywhere;
}
.panel-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem 1.25rem;
}
.panel-body .muted {
	color: var(--text-none);
}

/* Each tile draws its left divider; the -1px margin pushes the first divider of every row out of view. */
.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	border-top: 1px solid oklch(var(--b3));
	overflow: hidden;
}
.stats > div {
	padding: 0.875rem 1.25rem;
	margin-left: -1px;
	border-left: 1px solid oklch(var(--b3));
}
.stats dt {
	font-size: 0.75rem;
	color: var(--text-none);
}
.stats dd {
	white-space: nowrap;
	font-size: 1.25rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.nowrap {
	white-space: nowrap;
}
.heartbeats th,
.heartbeats td {
	padding-inline: 1.25rem;
	vertical-align: top;
}
.heartbeats .msg {
	min-width: 16rem;
	color: var(--text-none);
	overflow-wrap: anywhere;
}

.monitor-card-side {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.move {
	display: flex;
	gap: 0.25rem;
}
/* The vendored DaisyUI build has no btn-xs or btn-sm, so the compact size is set here. */
.move .btn {
	height: 1.75rem;
	min-height: 0;
	padding: 0 0.5rem;
}
/* Disabled arrows stay in place so both arrows line up on every card; only the glyph fades. */
.move .btn:disabled {
	background: transparent;
}

/* /embed sits inside another site's iframe: let the host page show through and drop the outer spacing. */
.embed body {
	background: transparent;
}

/* Dark theme for /embed only: it follows the visitor's OS unless the host page sets data-theme through postMessage.
   The two blocks must stay identical; CSS cannot OR a media query with an attribute selector.
   Contrast on the --b1 panel: body text 16.1:1, status text 6.4:1 or more; banner text on its level color 7.3:1 or more.
   Grays match the library site's gray-900/800/100, so the panel sits naturally on its gray-950 page.
   color-scheme must match the host page's, or the browser paints an opaque background behind the iframe. */
.embed[data-theme="dark"] {
	color-scheme: dark;
	--b1: 21.01% 0.0318 264.66;
	--b3: 27.81% 0.0296 256.85;
	--bc: 96.7% 0.0029 264.54;
	--text-up: #4ade80;
	--text-warning: #fbbf24;
	--text-down: #f87171;
	--text-none: #9ca3af;
	--banner-text: #030712;
}
@media (prefers-color-scheme: dark) {
	.embed:not([data-theme="light"]) {
		color-scheme: dark;
		--b1: 21.01% 0.0318 264.66;
		--b3: 27.81% 0.0296 256.85;
		--bc: 96.7% 0.0029 264.54;
		--text-up: #4ade80;
		--text-warning: #fbbf24;
		--text-down: #f87171;
		--text-none: #9ca3af;
		--banner-text: #030712;
	}
}
.embed .page {
	max-width: none;
	padding: 0.25rem;
}

/* Beats the larger .stats dd size for the certificate countdown line. */
.stats dd.status-text {
	font-size: 0.875rem;
}
