/*
 * Tuottolaskuri Core – A4 print report (browser printing).
 * The report exists only while printing: .tlc-print-root is appended to <body> and
 * body.tlc-printing hides everything else in print.
 */
.tlc-print-root { display: none; }

@media print {
	@page { size: A4; margin: 14mm 14mm 16mm; }

	body.tlc-printing { margin: 0 !important; padding: 0 !important; background: #fff !important; }
	body.tlc-printing > *:not(.tlc-print-root) { display: none !important; }
	body.tlc-printing > .tlc-print-root { display: block !important; }

	.tlc-report {
		color: #17365d;
		font-family: "Inter", "Segoe UI", "Liberation Sans", Arial, sans-serif;
		font-size: 9.5pt;
		line-height: 1.45;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
	.tlc-report * { box-sizing: border-box; }
	.tlc-report h1, .tlc-report h2, .tlc-report h3 { margin: 0; color: #17365d; break-after: avoid; page-break-after: avoid; }
	.tlc-report h1 { font-size: 17pt; line-height: 1.2; }
	.tlc-report h2 { margin: 6mm 0 2.5mm; padding-bottom: 1.2mm; border-bottom: .4mm solid #1769dd; font-size: 12pt; }
	.tlc-report h3 { margin: 3mm 0 1.5mm; font-size: 10pt; }
	.tlc-report p { margin: 0 0 1.5mm; }

	.tlc-report__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; padding-bottom: 4mm; border-bottom: .3mm solid #c9d6e7; }
	.tlc-report__logo { display: block; max-width: 58mm; max-height: 14mm; width: auto; height: auto; }
	.tlc-report__brand { font-size: 14pt; font-weight: 800; color: #17365d; }
	.tlc-report__meta { text-align: right; font-size: 8.5pt; color: #52627a; }
	.tlc-report__meta p { margin: 0; }
	.tlc-report__title { margin-top: 4mm; }
	.tlc-report__lead { margin-top: 1.5mm; color: #2a4365; }

	.tlc-report__highlight { margin: 4mm 0 0; padding: 3mm 4mm; border-radius: 2.5mm; background: #e5f5f0; break-inside: avoid; }
	.tlc-report__highlight strong { display: block; font-size: 11pt; }

	.tlc-report__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3mm; margin-top: 3mm; }
	.tlc-report__cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tlc-report__card { padding: 3mm; border: .3mm solid #dde6f1; border-radius: 2.5mm; break-inside: avoid; page-break-inside: avoid; }
	.tlc-report__card.is-baseline { background: #f5f8fc; }
	.tlc-report__card p { margin: 0; }
	.tlc-report__card-name { font-weight: 700; }
	.tlc-report__card-value { font-size: 14pt; font-weight: 800; }
	.tlc-report__card-sub { color: #52627a; font-size: 8.5pt; }
	.tlc-report__card-diff { margin-top: 1mm !important; font-weight: 700; }
	.tlc-report__card-diff.is-positive { color: #0e7c6b; }
	.tlc-report__card-diff.is-negative { color: #b42318; }

	.tlc-report__scenarios { margin: 0; padding-left: 5mm; }
	.tlc-report__scenarios li { margin-bottom: 1mm; break-inside: avoid; }

	.tlc-report__inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3mm 5mm; }
	.tlc-report__block { break-inside: avoid; page-break-inside: avoid; }

	.tlc-report table { width: 100%; border-collapse: collapse; font-size: 8.5pt; font-variant-numeric: tabular-nums; }
	.tlc-report thead { display: table-header-group; }
	.tlc-report tr { break-inside: avoid; page-break-inside: avoid; }
	.tlc-report th, .tlc-report td { padding: 1.2mm 1.8mm; border-bottom: .2mm solid #dde6f1; text-align: left; vertical-align: top; }
	.tlc-report thead th { background: #eaf2fd; font-weight: 700; }
	.tlc-report .is-num { text-align: right; white-space: nowrap; }
	.tlc-report tr.is-total th, .tlc-report tr.is-total td { font-weight: 800; background: #f1f6fd; }
	.tlc-report th.is-group, .tlc-report th.tlc-ev-table__group { background: #f5f8fc; font-weight: 700; }
	.tlc-report__kv th { width: 62%; font-weight: 400; color: #2a4365; }
	.tlc-report__kv td { font-weight: 600; text-align: right; }
	.tlc-report__table { break-inside: auto; }
	.tlc-report__keep { break-inside: avoid; page-break-inside: avoid; }

	.tlc-report__figure { margin: 2mm 0 4mm; break-inside: avoid; page-break-inside: avoid; }
	.tlc-report__figure svg { display: block; width: 100%; height: auto; }
	.tlc-report__legend { display: flex; flex-wrap: wrap; gap: 1mm 4mm; margin: 1.5mm 0 0; padding: 0; list-style: none; font-size: 8pt; }
	.tlc-report__legend li { display: inline-flex; align-items: center; gap: 1.5mm; }
	.tlc-report__swatch { display: inline-block; width: 3mm; height: 3mm; border-radius: .6mm; }

	.tlc-report__payback { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3mm; }
	.tlc-report__notes { margin: 0; padding-left: 5mm; }
	.tlc-report__notes li { margin-bottom: 1mm; break-inside: avoid; }
	.tlc-report__method h3 { font-size: 9.5pt; }
	.tlc-report__method p { color: #2a4365; }
	.tlc-report__foot { margin-top: 6mm; padding-top: 2.5mm; border-top: .3mm solid #c9d6e7; color: #52627a; font-size: 8pt; break-inside: avoid; }
	.tlc-report__pagebreak { break-before: page; page-break-before: always; }
}
