/* Printing — Slice 12.
 *
 * The office prints two things: a filtered position list to take to a meeting, and a
 * position's detail with its report history to settle a question with a client. Both
 * were printing the navigation, the filter bar and every button, and cutting the wide
 * tables off at the page edge (28 Aug 2026).
 *
 * Last in the cascade so it can undo what the screen rules set, and scoped to
 * `@media print` so nothing here is ever seen on a screen.
 */

@media print {

	/* --- what does not belong on paper ---------------------------------- */

	.site-nav,
	.site-header__inner .account,
	.filters,
	.bulk-bar,
	.row-actions,
	.form-actions,
	.pagination,
	.messages,
	.btn,
	.skip-link,
	dialog,
	[data-opens-dialog],
	[data-closes-dialog] {
		display: none !important;
	}

	/* The brand stays: a printed list handed across a table should say whose it is. */
	.site-header {
		border-bottom: 1px solid #000;
		background: none;
		color: #000;
		padding: 0 0 0.4rem;
		margin-bottom: 0.8rem;
	}
	.site-header__brand img {
		max-height: 1.6rem;
		filter: grayscale(100%) contrast(200%);
	}

	/* --- the page itself ------------------------------------------------- */

	@page {
		margin: 14mm 12mm;
	}

	html, body {
		background: #fff !important;
		color: #000;
		font-size: 10pt;
	}

	.page,
	.page--wide,
	main {
		max-width: none;
		padding: 0;
		margin: 0;
	}

	/* Horizontal scrolling is a screen affordance. On paper it is a table with its
	   right-hand columns missing, which is worse than a small font. */
	.table-scroll {
		overflow: visible !important;
	}

	table {
		width: 100%;
		font-size: 9pt;
		border-collapse: collapse;
	}
	th, td {
		padding: 3pt 4pt;
	}

	/* Repeat the header on every page — a four-page position list whose columns are
	   named only on page one is four pages of unlabelled numbers. */
	thead {
		display: table-header-group;
	}
	tr, .card, .counter {
		break-inside: avoid;
	}

	/* --- ink ------------------------------------------------------------- */

	/* Solid status badges eat a cartridge and print as dark grey blocks with the text
	   invisible inside them. On paper the word is the whole signal. */
	.badge,
	.badge--quiet,
	.state {
		background: none !important;
		color: #000 !important;
		border: 1px solid #666;
		padding: 0 2pt;
		font-weight: 600;
	}

	.card,
	.counter,
	.table-scroll {
		box-shadow: none !important;
		border: 1px solid #999;
	}

	a {
		color: #000;
		text-decoration: none;
	}

	/* The map and photo links on a position carry the whole address in them, which on
	   paper is three lines of query string. The ID beside them is what somebody types
	   back into the app. */
	a[href^="http"]::after {
		content: "";
	}

	/* --- the field app --------------------------------------------------- */

	/* Not printed, and not designed to be: it is a phone screen, and a Monteur with a
	   printout has already lost the thing the app is for. Left legible rather than
	   styled. */
	.wheel-picker,
	.sheet,
	.pull-to-refresh {
		display: none !important;
	}
}
