:root {
	font-family: sans-serif, sans-serif;
	/** Dark theme primary colors */
	--clr-primary-a0: #813d9c;
	--clr-primary-a10: #9052a7;
	--clr-primary-a20: #9e68b2;
	--clr-primary-a30: #ac7cbd;
	--clr-primary-a40: #ba92c8;
	--clr-primary-a50: #c8a7d3;

	/** Dark theme surface colors */
	--clr-surface-a0: #000000;
	--clr-surface-a10: #1e1e1e;
	--clr-surface-a20: #353535;
	--clr-surface-a30: #4e4e4e;
	--clr-surface-a40: #696969;
	--clr-surface-a50: #858585;

	/** Dark theme tonal surface colors */
	--clr-surface-tonal-a0: #130b15;
	--clr-surface-tonal-a10: #28232a;
	--clr-surface-tonal-a20: #3f3a41;
	--clr-surface-tonal-a30: #585359;
	--clr-surface-tonal-a40: #716d72;
	--clr-surface-tonal-a50: #8c888d;

	--clr-txt-on-dark: #fff;
	--clr-txt-on-light: #000;

	--clr-error-primary-0: #c71216;
	--clr-error-primary-40: #ec8b77;
	--clr-error-surface: #2b1108;

	font-size: 1.2em;
	color: var(--clr-txt-on-dark);
	background-color: var(--clr-surface-tonal-a0);
}

* {
	box-sizing: border-box;
}

.b {
	font-weight: bold;
}

.center {
	text-align: center;
}

picture.block {
	display: block;
}

picture.block>img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

body {
	margin: 0 auto 2em auto;
	max-width: 700px;
}

ul,
ol {
	padding-left: 2ch;
}

h1>a {
	text-decoration: none;
	color: var(--clr-txt-on-dark);
}

a {
	color: var(--clr-error-primary-40);
}

input,
select,
button,
textarea,
.btn {
	border: 2pt solid var(--clr-surface-tonal-a50);
	border-radius: 4pt;
	padding: 4pt 8pt;
	background-color: var(--clr-surface-tonal-a10);
}

input,
select,
button,
textarea,
.btn,
.btn a {
	color: var(--clr-txt-on-dark);
	text-decoration: none;
}

p.btn {
	display: inline-block;
}

input:hover,
select:hover,
button:hover,
textarea:hover,
button:hover,
.btn:hover {
	border-color: var(--clr-primary-a0);
}

textarea {
	resize: vertical;
	font-size: 1em;
}

input[type=checkbox],
label.checkbox {
	display: inline-block;
}

header.padded,
main {
	padding-left: 1em;
	padding-right: 1em;
	align-items: center;
}

header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

section {
	margin-top: 2em;
}

p.form-error,
div.form-error,
a.error {
	background-color: var(--clr-error-surface);
	border: 2pt solid var(--clr-error-primary-0);
	color: var(--clr-error-primary-40);
	border-radius: 4pt;
	padding: .5em 1em;
}

p.note {
	font-size: .8em;
}

.form-error>h4 {
	margin: 0;
	margin-top: .5em;
}

p.field-error {
	margin: .2em 0 0 0;
	font-size: .8em;
	color: var(--clr-error-primary-40);
}

.split {
	display: flex;
	flex-direction: row;
	text-align: center;
	align-items: center;
}

.split>* {
	flex: 1;
	padding-left: 2em;
	padding-right: 2em;
}

.split.bordered>*:not(:first-child) {
	border-left: 2pt solid var(--clr-primary-a0);
}

div.dual-fields {
	display: flex;
	width: 100%;
}

.dual-fields.vcenter {
	align-items: baseline;
}

.dual-fields>* {
	flex: 1;
}

.dual-fields>*:first-child {
	margin-right: 1em;
}

.dual-fields>*:last-child {
	margin-left: 1em;
}

p.subnav {
	display: flex;
	gap: 10pt;
}

p.heading {
	margin-top: 0;
}

.raised {
	background-color: var(--clr-surface-tonal-a10);
	padding: 1em;
	border-radius: 4pt;
}

.fields:not(:last-of-type) {
	margin-bottom: 1em;
}

.fields *:not(:last-child) {
	margin-bottom: 1em;
	/* margin-top: 1em; */
}

.fields * * {
	display: block;
	width: 100%
}

.fields label {
	font-weight: bold;
	margin-bottom: 4pt;
}

.checkbox>* {
	display: inline-block;
	width: unset;
}

input.pronoun {
	display: inline-block;
	width: 10ch;
}

p.note {
	margin: 2pt 0 0 0;
	font-size: .9em;
}

button.submit {
	margin: 2em auto;
	font-size: 1.2em;
	display: block;
}

#stray-form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1em;
}

#stray-form>h2 {
	margin-bottom: 0;
}

input#ident,
input#microchip_id {
	font-family: monospace;
	font-size: 1.6em;
	box-sizing: content-box;
}

input#ident {
	width: 6ch;
}


#pregen_ids>button {
	font-family: monospace;
	font-size: 1.6em;
	margin: 2pt;
}

#stray-form>button {
	font-size: 1em;
}

.profile p,
.profile h2,
.profile h3 {
	margin: 0;
}

.profile h2 {
	margin-bottom: .8em;
	text-align: center;
}

.ident,
.handler {
	text-transform: uppercase;
	font-size: .8em;
	color: var(--clr-primary-a50);
}

.profile>div.header {
	padding-bottom: .5em;
}

.profile .subnav {
	margin-top: .5em;
	font-size: .9em;
}

.profile .subnav a:not(:first-of-type) {
	margin-left: 4pt;
}

.profile:not(:first-of-type) {
	margin-top: 2em;
}

.label {
	text-transform: uppercase;
	color: var(--clr-primary-a50);
}

.id {
	font-family: monospace, monospace;
	font-size: 1.1em;
	font-weight: bold;
	color: var(--clr-txt-on-dark);
}

.handler-info {
	color: var(--clr-txt-on-dark);
}

.pronouns {
	text-transform: uppercase;
	font-size: .8em;
	letter-spacing: .1ch;
}

.pronoun_fragment {
	font-weight: bold;
}

.profile h2 {
	font-size: 2em;
}

@media screen and (max-width: 400px) {
	header.padded>nav {
		display: flex;
		gap: 4pt;
		flex-direction: column;
	}

	p.subnav {
		flex-direction: column;
	}
}

@media screen and (max-width: 700px) {
	div.dual-fields {
		flex-direction: column;
	}

	.dual-fields>*:first-child,
	.dual-fields>*:last-child {
		margin-right: 0;
		margin-left: 0;
	}

	.dual-fields>* {
		margin-top: 1em;
	}

	button.submit {
		margin-top: 1em;
	}

	div.fields.submit {
		align-items: center;
	}
}