/* ==========================================================================
   Diagrams: numbered technical plates (theme/parts/diagrams/*.php).
   The SVG carries only numbered cobalt markers and tiny mono values; the
   meaning lives in the HTML key below it, so every plate reads at 390px.
   Mobile first. Figures are numbered automatically, in page order.
   ========================================================================== */

body { counter-reset: dgm-fig; }

.dgm {
	counter-increment: dgm-fig;
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin: 32px auto;
	padding: 12px 12px 18px;
	background: #FFFFFF;
	border: 1px solid #DDE1E6;
	border-radius: 4px;
	color: #1D2126;
	min-width: 0;
}

.dgm svg {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

.dgm figcaption {
	margin: 12px 0 0;
	padding-top: 12px;
	border-top: 1px solid #DDE1E6;
	color: #4A525C;
	font-size: .875rem;
	line-height: 1.5;
}

.dgm__no {
	font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #0847BE;
	margin-right: .35em;
	white-space: nowrap;
}
.dgm__no::after { content: " " counter(dgm-fig); }

/* Key: numbered to match the markers. One column, two from ~600px. */
.dgm-key {
	list-style: none;
	counter-reset: dgm-key;
	margin: 14px 0 0;
	padding: 0;
	font-size: .875rem;
	line-height: 1.5;
	color: #1D2126;
}
.dgm-key li {
	counter-increment: dgm-key;
	position: relative;
	margin: 0 0 10px;
	padding-left: 30px;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
}
.dgm-key li::marker { content: none; }
.dgm-key li::before {
	content: counter(dgm-key);
	position: absolute;
	left: 0;
	top: .12em;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #0847BE;
	color: #FFFFFF;
	font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
	font-size: .6875rem;
	font-weight: 500;
	line-height: 20px;
	text-align: center;
}
.dgm-key b { font-weight: 600; }

@media (min-width: 480px) {
	.dgm { padding: 20px 20px 22px; }
}

@media (min-width: 600px) {
	.dgm { padding: 28px 32px 26px; margin: 48px auto; }
	.dgm-key { columns: 2 260px; column-gap: 32px; }
}

/* Small screens: grow the markers so the numerals stay legible when the
   640-unit drawing is scaled to ~340px. */
@media (max-width: 599px) {
	.dgm .dgm-m circle { r: 14.5px; }
	.dgm .dgm-m text { font-size: 16px; transform: translateY(1.5px); transform-box: fill-box; }
	.dgm svg > text { font-size: 14px; }
}
