* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	background: #1c1c1c;
	color: #ccc;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 13px;
	padding: 20px;
	line-height: 1.4;
}

.wrap {
	max-width: 760px;
	margin: 0 auto;
}

h1 {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #eee;
	margin-bottom: 2px;
}

.subtitle {
	font-size: 11px;
	color: #777;
	margin-bottom: 16px;
}

.panel-group {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.panel {
	background: #252525;
	border-radius: 3px;
	padding: 14px;
}

.panel-title, .metric-label {
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #888;
	font-weight: 700;
	margin-bottom: 8px;
}

select, input[type="text"] {
	background: #2e2e2e;
	border: none;
	border-radius: 3px;
	color: #eee;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 14px;
	padding: 8px 10px;
	outline: none;
	width: 100%;
}

input[type="text"]:focus {
	box-shadow: 0 0 0 1px #4e9fd4;
}

input[type="checkbox"] {
	accent-color: #4e9fd4;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	vertical-align: middle;
}

.io-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 2px;
}

.metric-tile {
	background: #252525;
	border-top: 2px solid #4e9fd4;
	border-radius: 3px;
	padding: 14px;
}

.field-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.field-row input {
	text-align: right;
	min-width: 0;
}

.field-row .unit {
	font-size: 11px;
	color: #777;
	white-space: nowrap;
}

.tm-note {
	font-size: 10px;
	color: #666;
	margin-top: 6px;
}

.controls-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.checkbox-label {
	font-size: 12px;
	color: #aaa;
	display: flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

#lock {
	display: inline-block;
	background: #2e2e2e;
	color: #4e9fd4;
	border: none;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 9px 20px;
	cursor: pointer;
	user-select: none;
}

#lock:hover {
	background: #333;
}

#lock.active {
	background: #4e9fd4;
	color: #1c1c1c;
}

.result-panel {
	background: #252525;
	border-left: 2px solid #4e9fd4;
	border-radius: 3px;
	padding: 14px 16px;
}

.result-value {
	font-size: 20px;
	font-weight: 700;
	color: #4e9fd4;
	font-variant-numeric: tabular-nums;
}

.result-desc {
	display: block;
	font-size: 12px;
	color: #999;
	margin-top: 6px;
}

.result-input {
	background: transparent;
	border: none;
	border-bottom: 1px solid transparent;
	color: #4e9fd4;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 20px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	padding: 0;
	width: 90px;
	outline: none;
}

.result-input:focus {
	border-bottom-color: #4e9fd4;
}

.notes {
	font-size: 11px;
	color: #888;
}

.notes ul {
	margin: 6px 0 0 16px;
}

.notes li {
	margin-bottom: 5px;
}

.notes code {
	color: #4e9fd4;
	background: #1c1c1c;
	padding: 1px 5px;
	border-radius: 2px;
	font-family: Menlo, Consolas, monospace;
	font-size: 10px;
}

.notes a {
	color: #4e9fd4;
	text-decoration: none;
}

.notes a:hover {
	text-decoration: underline;
}

.key {
	text-decoration: underline;
}

footer {
	margin-top: 16px;
	font-size: 10px;
	color: #555;
	text-align: center;
}

footer a {
	color: #666;
	text-decoration: none;
}

footer a:hover {
	color: #888;
}