div.fields {
	text-align: left;
	label:has(~ textarea),
	span:has(label):has(~ textarea),
	textarea ~ label,
	textarea ~ span:has(label),
	table.field:has(textarea) td:has(label),
	table.lineup td:has(textarea) {
		vertical-align: top;
		/*padding-top: 0.5em;*/
	}
	> p.left {
		text-align: left;
	}
	> p.right {
		text-align: right;
	}
	> p.center {
		text-align: center;
	}
	> p.stretch {
		text-align: left;
		display: flex;
		align-items: center;
		justify-content: space-between;
		:first-child {
			margin-right: 0.5em;
		}
	}
	input[inputmode="numeric"] {
		text-align: right;
	}
	select {
		max-width: 100%;
	}
	table.lineup {
		width: 100%;
		border-collapse: collapse;
		border-spacing: 0;
		margin: 1em 0;

		td {
			padding: 0;
			/*border: 1px solid blue;*/
		}
		td > p {
			margin: 0;
		}
		tr:not(:last-child) > td {
			padding-bottom: 1em;
		}
		tr > td:not(:last-child) {
			padding-right: 0.5em;
		}
		table.field {
			margin: 0;
		} 
	}
	table.field {
		width: 100%;
		border-collapse: collapse;
		border-spacing: 0;
		margin: 1em 0;

		td {
			padding: 0;
			/*border: 1px solid blue;*/
		}
		td > p {
			margin: 0;
		}
		td:has(> p > span) {
			width: 0;
			text-wrap: nowrap;
		}
		tr:not(:last-child) > td {
			padding-bottom: 1em;
		}
		tr > td:not(:last-child) {
			padding-right: 0.5em;
		}
	}
}
