:root {
	--bg: #0c0f12;
	--panel: #12161a;
	--line: #232a31;
	--text: #eef1f3;
	--dim: #7d8791;
	--faint: #4a535b;
	--warn: #ffb000;
	--warn-bg: #2a1f00;
	--font: "Barlow Semi Condensed", "Bahnschrift", "Arial Narrow", system-ui, sans-serif;
	box-sizing: border-box;
	padding-top: env(safe-area-inset-top, 0px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
	scroll-padding-top: env(safe-area-inset-top, 0px)
}
*, *::before, *::after {
	box-sizing: inherit
}
html, body {
	height: 100%;
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-variant-numeric: tabular-nums
}
body {
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden
}
button {
	font: inherit;
	color: inherit;
	cursor: pointer
}
:focus-visible {
	outline: 3px solid var(--text);
	outline-offset: 2px
}
/* Header: one sentence that answers "do I need to do anything?" */

header {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 14px 24px;
	border-bottom: 1px solid var(--line)
}
.logo {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    height: 2rem;
}
#verdict {
	font-size: clamp(28px, 4.2vw, 64px);
	font-weight: 700;
	line-height: 1;
	margin: 0;
	flex: 1;
	display: flex;
	align-items: center;
	gap: 16px
}
#verdict.warn {
	color: var(--warn)
}
#verdict.warn::before {
	content: "";
	width: .7em;
	height: .7em;
	background: var(--text);
	clip-path: polygon(50% 0, 100% 100%, 0 100%)
}
#verdict.ok {
	color: var(--text)
}
.tally {
	display: flex;
	gap: 22px;
	color: var(--dim);
	font-size: clamp(14px, 1.3vw, 20px)
}
.tally b {
	color: var(--text);
	font-weight: 500;
	margin-right: 6px
}
#clock {
	font-size: clamp(18px, 2vw, 30px);
	color: var(--dim)
}
#sim {
	background: none;
	border: 1px solid var(--faint);
	color: var(--dim);
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 14px
}
#sim:hover {
	border-color: var(--dim);
	color: var(--text)
}
main {
	display: grid;
	grid-template-columns: minmax(300px, 27%) 1fr minmax(300px, 29%);
	min-height: 0
}
section {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border-right: 1px solid var(--line)
}
section:last-child {
	border-right: 0
}
h2 {
	margin: 0;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 500;
	color: var(--dim);
	border-bottom: 1px solid var(--line)
}
.scroll {
	overflow-y: auto;
	flex: 1;
	min-height: 0
}
/* Fleet list: size follows urgency */

#fleet {
	list-style: none;
	margin: 0;
	padding: 0
}
.bot {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 2px 12px;
	padding: 8px 20px;
	border-bottom: 1px solid var(--line);
	cursor: pointer;
	border-left: 6px solid transparent
}
.bot .id {
	font-size: 17px;
	color: var(--text)
}
.bot .what {
	font-size: 14px;
	color: var(--dim);
	grid-column: 1
}
.bot .bat {
	font-size: 15px;
	color: var(--dim);
	grid-row: 1;
	grid-column: 2
}
.bot.sel {
	background: #181d22
}
.bot.u {
	border-left-color: var(--warn);
	background: var(--warn-bg);
	padding: 16px 20px
}
.bot.u .id {
	font-size: clamp(30px, 3vw, 46px);
	font-weight: 700;
	color: var(--warn);
	line-height: 1
}
.bot.u .what {
	font-size: clamp(18px, 1.7vw, 26px);
	color: var(--text);
	margin-top: 4px
}
.bot.u .bat {
	font-size: clamp(18px, 1.7vw, 26px);
	color: var(--warn)
}
.bot .go {
	grid-column: 1/3;
	margin-top: 10px;
	background: var(--warn);
	color: #1a1200;
	border: 0;
	border-radius: 4px;
	font-weight: 700;
	font-size: clamp(18px, 1.6vw, 24px);
	padding: 10px 14px;
	text-align: left
}
.bot.u .go:hover {
	filter: brightness(1.1)
}
.bot.mid .id {
	font-size: 20px
}
.bot.low .id, .bot.low .what, .bot.low .bat {
	opacity: .9
}
/* Map */

#mapwrap {
	flex: 1;
	min-height: 0;
	display: flex;
	padding: 12px
}
svg {
	width: 100%;
	height: 100%
}
.shelf {
	fill: #171c21;
	stroke: #232a31
}
.lane {
	stroke: #1c2228;
	stroke-width: 1;
	stroke-dasharray: 3 7
}
.dock {
	fill: none;
	stroke: var(--faint);
	stroke-dasharray: 4 4
}
.dockt {
	fill: var(--faint);
	font-size: 13px;
	font-family: var(--font)
}
.r {
	fill: #c9d0d6
}
.rl {
	fill: var(--dim);
	font: 500 12px var(--font)
}
.rg.u .r {
	fill: var(--warn)
}
.rg.u .rl {
	fill: var(--warn);
	font: 700 22px var(--font)
}
.rg .ring {
	fill: none;
	stroke: var(--warn);
	stroke-width: 3;
	opacity: 0
}
.rg.u .ring {
	opacity: 1;
	animation: pulse 1.6s ease-out infinite;
	transform-box: fill-box;
	transform-origin: center
}
.rg.sel .r {
	stroke: var(--text);
	stroke-width: 2
}
.rg.charge .r {
	fill: #6c7882
}
@keyframes pulse {
	0% {
		transform: scale(.8);
		opacity: 1
	}
	100% {
		transform: scale(2.6);
		opacity: 0
	}
}
/* Event log: size follows urgency */

#log {
	list-style: none;
	margin: 0;
	padding: 0
}
#log li {
	padding: 7px 20px;
	border-bottom: 1px solid var(--line);
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0 12px;
	color: var(--dim);
	font-size: 14px
}
#log time {
	color: var(--faint)
}
#log li.w {
	padding: 14px 20px;
	background: var(--warn-bg);
	border-left: 6px solid var(--warn);
	color: var(--warn);
	font-size: clamp(20px, 1.9vw, 30px);
	font-weight: 700;
	line-height: 1.1
}
#log li.w time {
	font-size: 15px;
	font-weight: 400;
	color: var(--warn);
	align-self: center
}
#log li.w span::before {
	content: "\25B2  ";
	font-size: .7em
}
#log li.done {
	font-size: 16px;
	color: var(--text)
}
@media (prefers-reduced-motion:reduce) {
	.rg.u .ring {
		animation: none;
		opacity: .6
	}
}
@media (max-width:1100px) {
	main {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: minmax(0, 52%) minmax(0, 1fr)
	}
	#map {
		grid-column: 1/3;
		grid-row: 1;
		border-right: 0;
		border-bottom: 1px solid var(--line)
	}
	#fleetp {
		grid-row: 2
	}
	.tally {
		display: none
	}
}
@media (max-width:700px) {
	body {
		overflow: auto;
		display: block
	}
	main {
		display: block
	}
	section {
		border-right: 0;
		border-bottom: 1px solid var(--line)
	}
	#mapwrap {
		height: 60vw
	}
	.scroll {
		max-height: 70vh
	}
	header {
		padding: 12px 16px
	}
	#sim {
		display: none
	}
}