:root {
	font-size: 18px;
}

textarea.box, input.box, #output > label, label:has(#markdown:not(:checked)) + #container {
	color: #f5f5f5;
	box-sizing: border-box;
	font-size: 1rem;
}

body {
	box-sizing: border-box;
	background: #2E3035;
	height: 100vh;
	padding: 1em;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr auto;
	gap: 1em;
	align-items: center;
	justify-content: center;
}

.box {
	background: none;
	padding: 1em;
	border-radius: 5px;
	border: 2px solid #555;
	transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
	outline: 0;
	resize: none;
	height: 100%;
}

.box:focus {
	border-color: #888;
	box-shadow: 0 0 8px #aaf5;
}

#output {
	height: 100%;
	grid-row: 1 / span 2;
	grid-column: 2;
	display: flex;
	flex-direction: column-reverse;
	gap: 0.5em;
}

label:has(#markdown:not(:checked)) + #container {
	white-space: pre-wrap;
	font-family: "Roboto Mono";
}

label:has(#markdown:checked) + #container {
	color: white;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

label:has(#markdown:checked) + #container > :first-child {
	margin-top: 0;
}

textarea.box, input.box, #output > label, pre, code {
	font-family: "Roboto Mono";
}