.worksheet {

}


.worksheet .field {
	display:flex;
	flex-direction:column;
	gap:0.5em;
	margin-bottom:1.5em;
}

.worksheet .field span:not(.info),
.worksheet > header span {
	border-bottom:1px solid var(--color-dark);
	flex-grow:1;
}

.worksheet > header p {
	display:none;
}

.worksheet .date p {
	display:flex;
	flex-direction:row;
	align-items:baseline;
	margin:0;
	flex-grow:1;
	gap:0.25em;
}

.worksheet .date p label,
.worksheet .date p span {
	font-size:85%;
	vertical-align: baseline;
}

.worksheet .marital-status > .field,
.worksheet .misc > .field {
	margin-bottom:1.5em;
}

.worksheet .children {
	overflow-x:scroll;
}
.worksheet table {
	table-layout: fixed;
	border-collapse: collapse;
	width:99.8%;
	box-sizing:border-box;
}

.worksheet table td,
.worksheet .income-deductions th {
	border:1px solid var(--color-dark);
	width:14.5%;
	min-width:5em;
}

.worksheet .free-text {
	border: 1px solid var(--color-dark);
	min-height: 5em;
}

.worksheet .income-deductions th[scope="row"] {
	font-weight:normal;
}

/* for yes/no options */
.worksheet section.misc p,
.worksheet .meta p {
	margin:0;
}
.worksheet section.misc p label:first-of-type,
.worksheet .meta p label:first-of-type {
	margin-right:1em;
}


@media screen and (min-width:600px), print {
	.worksheet section h4 {
		column-span:all;
	}
	.worksheet section.personal-information,
	.worksheet section.marital-status .meta,
	.worksheet section .gst-farm,
	.worksheet section.misc {
		columns: 2 auto;
	}

/* Removed - Chrome adds page breaks instead of column breaks when printing.
	.personal-information .field:nth-of-type(6),
	.marital-status .field:nth-of-type(2),
	.misc .field:nth-of-type(4),
	.gst-farm .field:nth-of-type(3) {
		break-before:column;
		page-break-before: avoid;
	}
*/

	/** Hack to prevent part of the bottom of the previous column from showing at the top of the next, especially in Chrome */
	.personal-information .field:nth-of-type(5),
	.marital-status .field:nth-of-type(1),
	.misc .field:nth-of-type(3),
	.gst-farm .field:nth-of-type(2) {
		margin-bottom:0.1em;
	}

	.worksheet section:not(.marital-status, .misc) .field:not(.date) label:first-of-type {
		min-width:11em;
	}

	.worksheet section.misc {
		column-gap:3em;
	}
	.worksheet section.misc .field label:first-of-type {
		max-width:12em;
		max-width:calc(100% - 8em);
	}
	.worksheet section.misc .field  {
		margin-bottom:0.5em;
		justify-content:space-between;
		flex-wrap:wrap;
	}




	.worksheet section.marital-status .field {
		margin-bottom:0.5em;
	}

	.worksheet section.misc > div:last-of-type  {
		gap:0;
	}

	.worksheet section.misc .info {
		flex-basis:100%;
	}



	.worksheet section.marital-status .field {
		justify-content:space-between;
	}

	.worksheet section.marital-status .meta {
		display:block;
	}



	.worksheet section.personal-information > div:nth-of-type(n+6) label {
		min-width:5em;
	}

	.worksheet section .field {
		flex-direction:row;
		margin-bottom:0;
	}
	.worksheet .date p {
		flex-grow:1;
	}

	.worksheet section .field.date p label {
		min-width: 0;
	}


}
