:root {
	color-scheme: light;
	--bg: #f3ecdf;
	--card: #fffaf3;
	--ink: #241c14;
	--muted: #65584c;
	--hairline: rgba(60, 40, 20, 0.16);
	--grid: rgba(60, 40, 20, 0.12);
	--shadow: 0 14px 36px rgba(60, 36, 12, 0.06);
	--slippy: #b4531a;
	--munch: #1f6b45;
	--warm-card: rgba(255, 244, 230, 0.94);
	--top-card: rgba(255, 252, 247, 0.9);
	--cool-card: rgba(232, 241, 245, 0.94);
	--cool-ink: #1d4e63;
	--tank-slippy: #f3d8bc;
	--tank-munch: #d5e5da;
	--empty: rgba(255, 250, 243, 0.35);
	--late: #8a4b12;
	--tooltip: #fffaf3;
	--sans: Inter, "Segoe UI", system-ui, sans-serif;
	--serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, "Liberation Serif", serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--bg: #14110e;
		--card: #221c17;
		--ink: #f6efe4;
		--muted: #cbbba6;
		--hairline: rgba(246, 239, 228, 0.16);
		--grid: rgba(246, 239, 228, 0.1);
		--shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
		--slippy: #ff8a4c;
		--munch: #7dcea0;
		--warm-card: rgba(78, 44, 24, 0.78);
		--top-card: rgba(48, 36, 28, 0.78);
		--cool-card: rgba(24, 40, 48, 0.78);
		--cool-ink: #c5e0ea;
		--tank-slippy: #3a2a22;
		--tank-munch: #1c2e26;
		--empty: rgba(255, 250, 243, 0.03);
		--late: #f0b27a;
		--tooltip: #2c241c;
	}
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background:
		radial-gradient(1200px 480px at 10% -10%, rgba(196, 122, 58, 0.16), transparent 55%),
		radial-gradient(900px 420px at 110% 0%, rgba(47, 111, 78, 0.12), transparent 50%),
		var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	line-height: 1.4;
}

.page {
	max-width: 1120px;
	margin: 0 auto;
	padding: 28px 20px 40px;
}

.eyebrow {
	margin: 0 0 4px;
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

h1,
h2,
h3,
p {
	margin: 0;
}

h1,
h2 {
	font-family: var(--serif);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

h1 {
	font-size: clamp(2.4rem, 5vw, 3.4rem);
}

h2 {
	font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.mast {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 18px 32px;
}

.status {
	text-align: right;
	color: var(--muted);
	font-size: 0.92rem;
	font-variant-numeric: tabular-nums;
}

.status p + p {
	margin-top: 2px;
}

.status.late {
	color: var(--late);
}

.enclosures {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin-top: 22px;
}

.enclosure {
	background: var(--card);
	border-radius: 22px;
	padding: 18px 18px 14px;
	box-shadow: var(--shadow);
	border: 1px solid var(--hairline);
	border-top: 4px solid var(--accent);
}

.enclosure.slippy {
	--accent: var(--slippy);
	--line-basking: #c2410c;
	--line-top: #e08a4f;
	--line-bottom: #6d4c41;
	--tank: var(--tank-slippy);
}

.enclosure.munch {
	--accent: var(--munch);
	--line-basking: #1f7a4d;
	--line-top: #5aaa7a;
	--line-bottom: #3d5c68;
	--tank: var(--tank-munch);
}

@media (prefers-color-scheme: dark) {
	.enclosure.slippy {
		--line-basking: #ff8a4c;
		--line-top: #f0b27a;
		--line-bottom: #e2cfc3;
	}

	.enclosure.munch {
		--line-basking: #7dcea0;
		--line-top: #b7e0c4;
		--line-bottom: #c5dde6;
	}
}

.enclosure .eyebrow {
	color: var(--accent);
}

.animal-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px;
	margin-bottom: 14px;
}

.spread {
	margin: 0;
	max-width: 14rem;
	text-align: right;
	color: var(--muted);
	font-size: 0.92rem;
	min-height: 1.2em;
}

.tank {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-areas:
		"tl tr"
		"bl br";
	gap: 10px;
	min-height: 280px;
	padding: 10px;
	border-radius: 18px;
	background:
		linear-gradient(180deg, rgba(255, 214, 160, 0.28), transparent 46%),
		linear-gradient(180deg, transparent 58%, rgba(70, 52, 28, 0.1)),
		var(--tank);
}

.probe {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 124px;
	padding: 12px 14px;
	border-radius: 14px;
	background: var(--top-card);
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.4);
}

.probe[data-slot="tl"] { grid-area: tl; }
.probe[data-slot="tr"] { grid-area: tr; }
.probe[data-slot="bl"] { grid-area: bl; }
.probe[data-slot="br"] { grid-area: br; }

.probe.basking {
	background: var(--warm-card);
	box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent);
}

.probe.bottom {
	background: var(--cool-card);
}

.probe.empty {
	justify-content: flex-end;
	background: var(--empty);
	box-shadow: none;
	border: 1px dashed var(--hairline);
	min-height: 0;
}

.probe-label {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.probe.basking .probe-label {
	padding-right: 22px;
}

.place {
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.role {
	font-size: 0.98rem;
	font-weight: 650;
}

.probe.basking .role {
	color: var(--accent);
}

.probe.bottom .role,
.probe.bottom .reading {
	color: var(--cool-ink);
}

.reading {
	margin-top: 10px;
	font-size: 1.7rem;
	font-weight: 650;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.probe.basking .reading {
	font-size: 2.45rem;
	color: var(--accent);
}

.unit {
	margin-left: 0.12em;
	font-size: 0.42em;
	font-weight: 650;
	letter-spacing: 0;
	color: var(--muted);
}

.probe.offline .reading,
.probe.offline .role {
	color: var(--muted);
}

.probe.offline .reading,
.probe.basking.offline .reading {
	font-size: 1.45rem;
}

.probe.offline {
	background: color-mix(in srgb, var(--card) 70%, var(--muted));
	box-shadow: none;
}

.lamp {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 28%, transparent);
}

.chart-block {
	margin-top: 16px;
}

.chart-head h3 {
	font-family: var(--sans);
	font-size: 0.95rem;
	font-weight: 650;
	letter-spacing: 0;
}

figure {
	position: relative;
	margin: 8px 0 0;
	touch-action: manipulation;
}

.chart {
	display: block;
	width: 100%;
	height: 220px;
}

.chart text {
	fill: var(--muted);
	font-size: 11px;
	font-family: var(--sans);
}

.chart .grid {
	stroke: var(--grid);
	stroke-width: 1;
}

.chart .axis-line {
	stroke: var(--hairline);
	stroke-width: 1;
}

.chart .line {
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.chart .line.basking {
	stroke: var(--line-basking);
	stroke-width: 2.75;
}

.chart .line.top {
	stroke: var(--line-top);
	stroke-width: 1.6;
}

.chart .line.bottom {
	stroke: var(--line-bottom);
	stroke-width: 1.75;
	stroke-dasharray: 7 5;
}

.chart .hover-line {
	stroke: var(--muted);
	stroke-width: 1;
	stroke-dasharray: 2 3;
}

.chart .hover-dot,
.chart .point {
	stroke: var(--card);
	stroke-width: 1.5;
}

.chart .hover-dot.basking,
.chart .point.basking { fill: var(--line-basking); }

.chart .hover-dot.top,
.chart .point.top { fill: var(--line-top); }

.chart .hover-dot.bottom,
.chart .point.bottom { fill: var(--line-bottom); }

.chart .empty-label {
	fill: var(--muted);
	font-size: 13px;
}

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

.legend li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.swatch {
	width: 22px;
	height: 3px;
	border-radius: 99px;
}

.swatch.basking { background: var(--line-basking); height: 4px; }
.swatch.top { background: var(--line-top); }
.swatch.bottom {
	height: 0;
	border-top: 2px dashed var(--line-bottom);
	background: none;
}

.range {
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

.tooltip {
	position: absolute;
	z-index: 2;
	pointer-events: none;
	min-width: 148px;
	padding: 8px 10px;
	border-radius: 10px;
	background: var(--tooltip);
	border: 1px solid var(--hairline);
	box-shadow: var(--shadow);
	font-size: 0.8rem;
}

.tooltip[hidden] {
	display: none;
}

.tooltip-time {
	margin-bottom: 4px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.tooltip-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-variant-numeric: tabular-nums;
}

.tooltip-row strong {
	font-weight: 650;
}

.tooltip-row.basking strong { color: var(--accent); }

.chart-note {
	min-height: 1.2em;
	margin-top: 14px;
	color: var(--muted);
	font-size: 0.92rem;
}

footer {
	margin-top: 28px;
	padding-top: 16px;
	border-top: 1px solid var(--hairline);
	color: var(--muted);
	font-size: 0.88rem;
}

.foot-note {
	margin: 0;
}

.alerts {
	margin-top: 10px;
}

.alerts-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--muted);
	padding: 0;
	font: inherit;
	font-size: 0.88rem;
	text-decoration: underline;
	text-decoration-color: var(--hairline);
	text-underline-offset: 0.18em;
	cursor: pointer;
}

.alerts-btn:hover,
.alerts-btn:focus-visible {
	color: var(--ink);
	text-decoration-color: currentColor;
}

.alerts-btn:disabled {
	opacity: 0.7;
	cursor: default;
	text-decoration: none;
}

.alerts-status {
	margin: 6px 0 0;
	font-size: 0.84rem;
	line-height: 1.35;
	color: var(--muted);
}

noscript {
	display: block;
	max-width: 1120px;
	margin: 12px auto;
	padding: 0 20px;
}

@media (max-width: 800px) {
	.page {
		padding: 20px 14px 32px;
	}

	.enclosures {
		grid-template-columns: 1fr;
	}

	.mast,
	.animal-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.status,
	.spread {
		text-align: left;
	}

	.tank {
		min-height: 0;
	}

	.probe {
		min-height: 108px;
	}

	.probe.basking .reading {
		font-size: 2.1rem;
	}
}
