.sd_page {
	font-family: var(--font_family);
	line-height: var(--lineheight_large);
	color: var(--font, black);
	
	--m_top: 18mm;
	--m_right: 22mm;
	--m_bottom: 16mm;
	--m_left: 22mm;
	
	--h_half: calc(var(--pd_width) / 2);
	--v_third: calc(var(--pd_height) / 3);

	--fw_regular: 400;
	--fw_medium: 500;
	--fw_bold: 600;
	--fw_heavy: 600;

	--tiny_fontsize: 7pt;
	--small_fontsize: 8pt;
	--medium_fontsize: 9pt;
	--large_fontsize: 10pt;
	--title_fontsize: 12.5pt;
	
	--lineheight_small: 1.4;
	--lineheight_medium: 1.5;
	--lineheight_large: 1.6;
	--title_lineheight: 0.8;
	
	--v_offset_small: 2.5mm;
	--v_offset_address: 5mm;
	--v_offset_medium: 6mm;
	--v_offset_large: 7mm;
	
	--v_offest_divider: 1.5mm;
	--v_offest_items: 1mm;
	
	--item_detail_padding: 0.25em;
	--item_detail_lineheight: 1.1;
}
.sd_container > * {
	position: absolute;
}
.sd_accent {
	color: var(--accent, var(--prim));
}
.sd_soft {
	color: var(--soft);
}
.sd_tiny {
	font-size: var(--tiny_fontsize);
}
.sd_small {
	font-size: var(--small_fontsize);
}
.sd_medium {
	font-size: var(--medium_fontsize);
}
.sd_large {
	font-size: var(--large_fontsize);
}
.sd_title {
	font-size: var(--title_fontsize);
}
.sd_fw_regular {
	font-weight: var(--fw_regular);
}
.sd_fw_medium {
	font-weight: var(--fw_medium);
}
.sd_fw_bold {
	font-weight: var(--fw_bold);
}
.sd_fw_heavy {
	font-weight: var(--fw_heavy);
}
.sd_lh_small {
	line-height: var(--lineheight_small);
}
.sd_lh_medium {
	line-height: var(--lineheight_medium);
}
.sd_lh_large {
	line-height: var(--lineheight_large);
}
.sd_container:after {
	content: "";
	pointer-events: none;
	position: absolute;
	inset: var(--m_top) var(--m_right) var(--m_bottom) var(--m_left);
	border: var(--guidelines_border, 1px solid pink);
	display: var(--guidelines_display, none);
}
.invoice b {
	font-weight: var(--fw_bold);
}
.sd_header {
	top: var(--m_top);
	left: var(--m_left);
	right: var(--m_right);
	display: flex;
	justify-content: right;
	align-items: center;
}
.sd_logo {
	position: absolute;
	width: var(--logo_width);
	left: 0;
}
.sd_logo:only-child {
	position: relative;
}
.sd_logo > svg {
	display: block;
	width: 100%;
	height: auto;
}
.sd_logo > img {
	display: block;
	width: 100%;
	height: auto;
}
.sd_meta {
	position: relative;
}
.sd_meta:before,
.sd_backdrop:before,
[data-design="2"] .sd_items > table > thead:before,
[data-design="3"] .sd_items > table > thead:before,
[data-design="4"] .sd_items > table > thead:before {
	content: "";
	position: absolute;
	inset: calc(var(--backdrop_padding) * -0.9) calc(var(--backdrop_padding) * -1);
	background-color: var(--soft_bg);
	border-radius: var(--br);
	corner-shape: unset;
}
.sd_backdrop.sd_backdrop_vlow:before,
[data-design="2"] .sd_items > table > thead:before,
[data-design="3"] .sd_items > table > thead:before,
[data-design="4"] .sd_items > table > thead:before {
	inset: calc(var(--backdrop_padding) * -0.4) calc(var(--backdrop_padding) * -1);
}
.sd_backdrop > * {
	position: relative;
}
.sd_meta > dl,
.sd_summary > dl {
	position: relative;
	display: grid;
	grid-template-columns: 1fr max-content;
	column-gap: 2.5em;
	row-gap: 0;
	align-items: baseline;
}
.sd_meta > dl > dd,
.sd_summary > dl > dd {
	text-align: right;
	margin: 0;
}
.sd_meta dt {
	font-weight: var(--fw_medium);
}
.sd_address {
	top: 46mm;
	right: var(--h_half);
	left: var(--m_left);
	display: flex;
	flex-direction: column;
	gap: var(--v_offset_address);
}
[data-design="1"] .sd_address,
[data-design="2"] .sd_address {
	gap: var(--v_offset_large);
}
.sd_sender {
	position: relative;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
}
.sd_sender > :nth-child(2):before {
	content: "·";
	display: inline-block;
	width: 1em;
	text-align: center;
	font-weight: var(--fw_bold);
}
.sd_sender.sd_sender_wrap {
	flex-direction: column;
}
.sd_sender.sd_sender_wrap > :nth-child(2):before {
	display: none;
}
.sd_recipient {
	width: 100%;
	display: flex;
	flex-direction: column;
}
.sd_title {
	bottom: calc(var(--v_third) * 2 + var(--v_offset_medium));
	left: var(--m_left);
	line-height: var(--title_lineheight);
}
.sd_items {
	left: var(--m_left);
	right: var(--m_right);
	bottom: calc(var(--v_third) + var(--v_offset_medium));
}
.sd_items_short {
	top: calc(var(--v_third) + var(--v_offset_medium));
}
.sd_items_long {
	top: 50mm;
}
.sd_items_overflowting {
	overflow: hidden;
}
.sd_items_overflowting:after {
	content: "";
	position: absolute;
	inset: auto 0 -2mm 0;
	height: 5mm;
	background-color: var(--pd_bg, white);
	box-shadow: 0 0 10mm 10mm var(--pd_bg, white);
}
.sd_item_row_overflowting div:after {
	content: " · overflow";
	color: var(--overflow_color, red);
}
.sd_items > table {
	width: 100%;
	border-collapse: collapse;
}
.sd_items > table > thead,
.sd_items > table > thead > tr {
	position: relative;
}
.sd_items > table th {
	font-weight: var(--fw_bold);
}
.sd_items > table th:first-child,
.sd_items > table td:first-child {
	text-align: left;
	width: auto;
}
.sd_items > table th,
.sd_items > table td {
	text-align: right;
	width: 22mm;
}
.sd_items > table,
.sd_items > table * {
	margin: 0;
	padding: 0;
}
.sd_items > table tr {
	vertical-align: top;
}
.sd_items > table tbody tr td {
	padding: var(--v_offest_items) 0;
	border-top: none;
}
.sd_items > table tbody tr:last-child td {
	padding-bottom: 0;
}
.sd_items > table tbody tr:first-child td {
	padding-top: var(--v_offset_medium);
	border: none;
}
.sd_items > table td > ul {
	color: var(--soft);
	font-weight: inherit;
	list-style-type: none;
	padding-top: 0.75mm;
}
.sd_items > table td > ul > li {
	padding: var(--item_detail_padding) 0;
	line-height: var(--item_detail_lineheight);
}
.sd_summary_container {
	top: calc(2 * var(--v_third) + var(--v_offset_medium));
	left: var(--m_left);
	right: var(--m_right);
	display: flex;
	align-items: center;
	justify-content: right;
}
.sd_summary {
	position: relative;
	width: 50%;
}
.sd_summary > dl > dt:nth-last-of-type(2),
.sd_summary > dl > dd:nth-last-of-type(2) {
	margin-bottom: var(--v_offset_small);
}
.sd_summary > dl > dt:last-of-type,
.sd_summary > dl > dd:last-of-type {
	font-weight: var(--fw_bold);
}
.sd_info_text {
	inset: 230mm var(--m_left) 45mm var(--m_right);
	display: flex;
	align-items: center;
}
.sd_summary_container > svg {
	position: absolute;
	left: 0;
	height: 100%;
	width: auto;
	aspect-ratio: 1 / 1;
}
.sd_summary_container > svg path,
.sd_summary_container > svg ellipse,
.sd_summary_container > svg circle,
.sd_summary_container > svg rect {
	fill: var(--qr_color, black);
}
.sd_th_service > span:before {
	content: "(";
}
.sd_th_service > span:after {
	content: ")";
}
.sd_footer {
	left: var(--m_left);
	right: var(--m_right);
	bottom: var(--m_bottom);
}
.sd_footer > .sd_imprint {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: var(--imprint_gap, 14mm);
	color: var(--soft);
	line-height: var(--lineheight_small);
}
.sd_footer > .sd_imprint > div {
	display: flex;
	flex-direction: column;
}
.sd_badges {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	gap: var(--badges_gap, 4mm);
}
.sd_badges:first-child {
	position: relative;
}
.sd_badges > div {
	height: var(--badges_height, 8mm);
	aspect-ratio: var(--badges_ratio, 1 / 1);
	background-color: var(--soft_bg);
	border-radius: var(--br);
	corner-shape: unset;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sd_badges > div > img {
	display: block;
	width: var(--badge_image_size, 70%);
	height: var(--badge_image_size, 70%);
	object-fit: contain;
}
.sd_pagination {
	position: absolute;
	bottom: 0;
	right: 0;
}
.sd_pagination:only-child {
	position: relative;
	text-align: right;
}
[data-tabular_nums="true"] .sd_items td:not(.sd_td_service),
[data-tabular_nums="true"] .sd_meta dd,
[data-tabular_nums="true"] .sd_summary {
	font-variant-numeric: tabular-nums;
}
.sd_v_center_third_boundingbox {
	inset: var(--v_third) 0;
	display: flex;
	justify-content: center;
	align-items: center;
}
.sd_divider {
	position: absolute;
	width: 100%;
	max-width: none;
	height: 1px;
	stroke: none;
	border-top: 1px solid var(--divider_color);
}
.sd_divider_top {
	top: calc(var(--v_offest_divider) * -1);
}
.sd_divider_bottom {
	bottom: calc(var(--v_offest_divider) * -1);
}
.sd_divider.sd_foldmark_top {
	top: 0;
	border-top: 1px dashed var(--foldmark_color);
}
.sd_divider.sd_foldmark_bottom {
	bottom: 0;
	border-top: none;
	border-bottom: 1px dashed var(--foldmark_color);
}
[data-foldmarks="1"] .sd_v_center_third_boundingbox:after,
[data-foldmarks="2"] .sd_v_center_third_boundingbox:after {
	content: "";
	position: absolute;
	width: 195mm;
	height: 105%;
	background-color: var(--pd_bg, white);
}
[data-foldmarks="2"][data-p="1"] .sd_v_center_third_boundingbox:after {
	display: none;
}
[data-foldmarks="2"]:not([data-p="1"]) .sd_v_center_third_boundingbox:after {
	height: 4mm;
	top: -2mm;
}
[data-foldmarks="3"] .sd_foldmark,
[data-foldmarks="4"] .sd_foldmark_bottom {
	width: calc(100% - var(--m_left) - var(--m_right));
}
[data-foldmarks="3"]:not([data-p="1"]) .sd_foldmark_top,
[data-foldmarks="4"] .sd_foldmark_top {
	display: none;
}

@media print {
.invoice {
	break-after: page;
	aspect-ratio: auto;
}
.sd_container {
	z-index: 1;
}
.sd_divider {
	border-top: none;
	stroke: var(--divider_color);
	stroke-width: var(--divider_print_width, 1);
	shape-rendering: crispEdges;
}
.sd_divider.sd_foldmark_top,
.sd_divider.sd_foldmark_bottom {
	border-top: none;
	border-bottom: none;
	stroke: var(--foldmark_color);
	stroke-width: var(--foldmark_print_width, 0.5pt);
	stroke-dasharray: 0.5mm 0.5mm;
	stroke-dashoffset: 0.25mm;
}
}