*, ::before, ::after {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, outline 0.1s ease;
}

@keyframes fade-in {
	from {
		opacity: 0;
	} to {
		opacity: 1;
	}
}

body {
	animation: fade-in 0.75s ease;
	min-height: 100vh;
	background: #f3f3f3;
	font-family: 'Segoe UI', sans-serif;
	color: #111;
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	grid-template-rows: max-content 1fr;
	gap: 1rem 1.5rem;
	padding: 1rem 1.5rem;
}

button, textarea, input {
	font-family: inherit;
}

.button-bar {
	grid-column: 1 / 3;
	background: #fff;
	box-shadow: 0 2px 8px #b1b1b180;
	border-radius: 7.5px;
	user-select: none;
	display: grid;
	grid-auto-columns: max-content;
	grid-template-rows: max-content;
}

.button-bar > button {
	padding: 0.25rem 0.5rem;
	border: none;
	color: #111;
	background: #fff0;
	cursor: pointer;
	outline: 0 solid #cdcdcd;
	outline-offset: 0;
	font-size: calc(40px / 3);
	width: max-content;
	height: max-content;
	display: inline-block;
}

.button-bar > *:first-child {
	border-top-left-radius: 7.5px;
	border-bottom-left-radius: 7.5px;
}

.button-bar > *:last-child {
	border-top-right-radius: 7.5px;
	border-bottom-right-radius: 7.5px;
}

.button-bar > *:last-child > div {
	border-top-right-radius: 7.5px;
	border-bottom-right-radius: 7.5px;
}

.button-bar > button:hover {
	background: #f0f0f0;
}

.button-bar > button:focus {
	background: #f0f0f0;
	outline: 2px solid #cdcdcd;
	outline-offset: 5px;
}

.button-bar > button:active {
	background: #ebebeb;
}

.button-bar > *:not(:last-child) {
	border-right: 1px solid #ebebeb;
}

.katex-textarea {
	resize: none;
	background: #fff;
	box-shadow: 0 2px 8px #b1b1b180;
	border-radius: 7.5px;
	border: none;
	color: #111;
	font-family: 'Consolas', monospace;
	padding: 0.75rem 1.25rem;
	outline: 0 solid #cdcdcd;
	outline-offset: 0;
}

.katex-textarea:hover {
	background: #fbfbfb;
}

.katex-textarea:focus {
	background: #fff;
	outline: 2px solid #cdcdcd;
	outline-offset: 5px;
}

.katex-textarea:active {
	background: #f8f8f8;
}

.select {
	overflow: hidden;
	background: #fff;
	border: none;
	color: #111;
	cursor: pointer;
	font-size: calc(40px / 3);
	height: calc(17px + (0.25rem * 2));
	display: inline-block;
	position: relative;
}

.select.active {
	overflow: visible;
}

.select > div {
	background: #fff;
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	box-shadow: 0 2px 8px #b1b1b180;
}

.select.active > div {
	border-radius: 7.5px;
}

.select .option, .select .default {
	padding: 0.25rem 0.5rem;
}

.select .option:hover, .select .default:hover {
	background: #f0f0f0;
}

.select .option:focus, .select .default:focus {
	background: #f0f0f0;
}

.select .option:active, .select .default:active {
	background: #ebebeb;
}

.button-bar > .delimiters {
	grid-column: 2;
}