/**
 * Spec sheet.
 *
 * A document, not a page. Sized to A4 on screen so what a buyer sees is what
 * comes out of the printer, and laid out so a two-page sheet breaks between
 * sections rather than through a table row.
 *
 * Loaded only on the spec-sheet endpoint. It relies on the design tokens for
 * colour and type, so the sheet and the site cannot drift apart.
 */

.mv-sheet {
	background: var(--co-stone-200);
	padding: var(--co-space-6) var(--co-space-4);
}

.mv-sheet__page {
	width: 210mm;
	max-width: 100%;
	min-height: 297mm;
	margin-inline: auto;
	padding: 16mm 15mm 14mm;
	background: var(--co-white);
	box-shadow: var(--co-shadow-lg);
	display: flex;
	flex-direction: column;
	gap: var(--co-space-6);
}

/* Head ------------------------------------------------------------------ */

.mv-sheet__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--co-space-5);
	padding-block-end: var(--co-space-4);
	border-block-end: var(--co-border-width-thick) solid var(--co-color-text);
}

.mv-sheet__logo {
	height: 30px;
	width: auto;
	color: var(--co-color-text);
}

.mv-sheet__meta {
	text-align: end;
	font-size: var(--co-text-2xs);
	color: var(--co-color-text-muted);
	line-height: var(--co-leading-snug);
}

.mv-sheet__meta p:first-child {
	font-weight: var(--co-weight-semibold);
	color: var(--co-color-text);
	text-transform: uppercase;
	letter-spacing: var(--co-tracking-wide);
}

/* Title ----------------------------------------------------------------- */

.mv-sheet__eyebrow {
	font-size: var(--co-text-2xs);
	font-weight: var(--co-weight-semibold);
	text-transform: uppercase;
	letter-spacing: var(--co-tracking-wide);
	color: var(--co-color-action);
	margin-block-end: var(--co-space-1);
}

.mv-sheet__title h1 {
	font-size: 24pt;
	line-height: var(--co-leading-tight);
	letter-spacing: var(--co-tracking-tight);
}

.mv-sheet__lede {
	margin-block-start: var(--co-space-3);
	font-size: var(--co-text-sm);
	color: var(--co-color-text-muted);
	max-width: 60ch;
}

/* Body ------------------------------------------------------------------ */

.mv-sheet__cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--co-space-6);
}

@media (min-width: 700px) {
	.mv-sheet__cols {
		grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
		align-items: start;
	}
}

.mv-sheet h2 {
	font-size: var(--co-text-sm);
	text-transform: uppercase;
	letter-spacing: var(--co-tracking-wide);
	color: var(--co-color-text-muted);
	padding-block-end: var(--co-space-2);
	border-block-end: var(--co-border-width) solid var(--co-color-border);
	margin-block-end: var(--co-space-3);
}

.mv-sheet h2:not(:first-child) {
	margin-block-start: var(--co-space-5);
}

.mv-sheet__table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--co-text-xs);
}

.mv-sheet__table th,
.mv-sheet__table td {
	text-align: start;
	vertical-align: top;
	padding: 5px 8px 5px 0;
	border-block-end: var(--co-border-width) solid var(--co-color-border);
}

.mv-sheet__table th {
	width: 38%;
	font-weight: var(--co-weight-medium);
	color: var(--co-color-text-muted);
}

.mv-sheet__table td {
	font-family: var(--co-font-mono);
}

.mv-sheet__group th {
	width: auto;
	background: var(--co-color-surface-sunken);
	font-size: var(--co-text-2xs);
	text-transform: uppercase;
	letter-spacing: var(--co-tracking-wide);
	color: var(--co-color-text);
	padding-inline: 8px;
}

.mv-sheet__table--data {
	white-space: nowrap;
}

.mv-sheet__table--data th {
	width: auto;
	font-size: var(--co-text-2xs);
	text-transform: uppercase;
	letter-spacing: var(--co-tracking-wide);
	color: var(--co-color-text);
	border-block-end-width: var(--co-border-width-thick);
	padding-inline-end: 12px;
}

.mv-sheet__table--data td {
	padding-inline-end: 12px;
}

.mv-sheet__figure {
	border: var(--co-border-width) solid var(--co-color-border);
	border-radius: var(--co-radius-sm);
	padding: var(--co-space-3);
}

.mv-sheet__list {
	margin: 0;
	padding-inline-start: var(--co-space-5);
	font-size: var(--co-text-xs);
}

.mv-sheet__note {
	margin-block-start: var(--co-space-3);
	font-size: var(--co-text-2xs);
	color: var(--co-color-text-subtle);
	line-height: var(--co-leading-normal);
}

/* Foot ------------------------------------------------------------------ */

.mv-sheet__foot {
	display: flex;
	justify-content: space-between;
	gap: var(--co-space-5);
	margin-block-start: auto;
	padding-block-start: var(--co-space-4);
	border-block-start: var(--co-border-width) solid var(--co-color-border);
	font-size: var(--co-text-2xs);
	color: var(--co-color-text-muted);
	line-height: var(--co-leading-snug);
}

.mv-sheet__foot-right {
	text-align: end;
	max-width: 46%;
}

.mv-sheet__actions {
	display: flex;
	gap: var(--co-space-3);
	justify-content: center;
	padding-block-start: var(--co-space-5);
	border-block-start: var(--co-border-width) solid var(--co-color-border);
}

/* Print ----------------------------------------------------------------- */

@page {
	size: A4;
	margin: 14mm 13mm;
}

@media print {
	.mv-sheet {
		background: none;
		padding: 0;
	}

	.mv-sheet__page {
		width: auto;
		min-height: 0;
		margin: 0;
		padding: 0;
		box-shadow: none;
		gap: 8mm;
	}

	/* A table row split across a page break is unreadable, and a heading
	   stranded at the foot of a page is worse. */
	.mv-sheet__table tr,
	.mv-sheet__figure {
		break-inside: avoid;
	}

	.mv-sheet h2 {
		break-after: avoid;
	}

	.mv-sheet__variants {
		break-before: auto;
	}

	.mv-sheet__foot {
		break-inside: avoid;
	}

	/* Long variant tables must be allowed to wrap on paper even though they
	   scroll on screen. */
	.mv-sheet__table--data {
		white-space: normal;
	}
}
