/*
 * Weights & Measures — tool-specific rules only. The card, fields, buttons,
 * result panel and table come from the shared cs-tools.css (a dependency).
 */
.cornerstone-wm .cs-wm-rules {
	margin: 0 0 20px;
	padding: 16px 18px;
	border-radius: var(--cst-radius-sm);
	background: var(--cst-surface-2);
	font-size: .875rem;
	line-height: 1.6;
	color: var(--cst-ink);
}

.cornerstone-wm .cs-wm-rules p {
	margin: 0 0 8px;
}

.cornerstone-wm .cs-wm-rules ul {
	margin: 0;
	/* app.css ships Tailwind preflight, which strips list markers site-wide. */
	list-style: disc outside;
	padding-left: 20px;
}

.cornerstone-wm .cs-wm-rules li {
	margin: 0 0 6px;
}

.cornerstone-wm .cs-wm-rules li:last-child {
	margin-bottom: 0;
}

.cornerstone-wm .cs-field .cs-wm-meta {
	margin: 6px 0 0;
	font-size: .8125rem;
}

.cornerstone-wm .cs-wm-checkout {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--cst-line);
}

.cornerstone-wm .cs-wm-check-status {
	margin: 0 0 14px;
	font-weight: 700;
}

.cornerstone-wm .cs-wm-check-hint,
.cornerstone-wm .cs-wm-check-value {
	font-weight: 400;
	color: var(--cst-muted);
}

.cornerstone-wm .cs-wm-bar {
	position: relative;
	display: flex;
	width: 100%;
	height: 14px;
	border-radius: var(--cst-pill);
	background: var(--cst-line);
}

.cornerstone-wm .cs-wm-seg {
	height: 100%;
}

.cornerstone-wm .cs-wm-seg:first-child {
	border-radius: var(--cst-pill) 0 0 var(--cst-pill);
}

.cornerstone-wm .cs-wm-seg:nth-child(4) {
	border-radius: 0 var(--cst-pill) var(--cst-pill) 0;
}

.cornerstone-wm .cs-wm-seg.is-fail {
	background: var(--cst-fail);
}

.cornerstone-wm .cs-wm-seg.is-warn {
	background: var(--cst-warn);
}

.cornerstone-wm .cs-wm-seg.is-margin {
	background: rgba(180, 83, 9, .35);
}

.cornerstone-wm .cs-wm-seg.is-pass {
	background: var(--cst-pass);
}

.cornerstone-wm .cs-wm-marker {
	position: absolute;
	top: -6px;
	bottom: -6px;
	width: 2px;
	background: var(--cst-ink);
	transform: translateX(-1px);
}

.cornerstone-wm .cs-wm-marker::after {
	content: '';
	position: absolute;
	top: -7px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-bottom: 7px solid var(--cst-ink);
}

.cornerstone-wm .cs-wm-tone-pass {
	color: var(--cst-pass);
}

.cornerstone-wm .cs-wm-tone-warn {
	color: var(--cst-warn-text);
}

.cornerstone-wm .cs-wm-tone-fail {
	color: var(--cst-fail);
}

.cornerstone-wm .cs-wm-actions .cs-wm-meta {
	margin: 0;
}

/* Check + safety-margin row: the margin help text must not push the check field down. */
.cs-tool-section .cornerstone-wm .cs-row:has(.cs-wm-margin),
.cornerstone-wm .cs-row:has(.cs-wm-margin) {
	align-items: flex-start;
}
