html, body, main, article, div, h2, span, input, label, textarea, dl, dt, dd, code {
	margin: 0;
	padding: 0;
	border: 0;
	font: inherit;
	vertical-align: baseline;
}
:root {
	font-size: 14px;
	font-family: sans-serif;
	--font-size-h2: 1.3rem; /* font-size of h2 and button */
	--font-size-tablet: 16px; /* font-size of textarea on tablet */
	--height-editor: 500px; /* height of textarea and editor */
	--max-height-editor: 95vh; /* max-height of textarea and editor */
	--color-input: #72777d; /* border-color of input */
	--color-checked: #36c; /* color of checked checkbox */
	--color-hover: #447ff5; /* color of hovered checkbox */
	--color-active: #2a4b8d; /* color of active checkbox */
	--color-background: #fff; /* background-color of main */
}
body {
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: #f0f0f0;
	line-height: 1.6;
}
main {
	display: flex;
	width: 90vw;
	max-width: 1200px;
	margin: 3rem 0;
	background-color: var(--color-background);
	box-shadow: 0 0 .5rem rgb(0, 0, 0, .1);
	border-radius: .5rem;
}
article {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 1rem 2rem 2rem;
}
h2 {
	font-size: var(--font-size-h2);
	margin: .5rem 0;
	font-weight: bold;
}
.fieldLayout {
	display: table;
	padding: .5em 0;
}
.field, .header {
	display: table-cell;
	vertical-align: middle;
}
.field, .header, input, input + span, label {
	cursor: pointer;
}
.field {
	position: relative;
}
.field > input[type="checkbox"] {
	position: relative;
	z-index: 1;
	opacity: 0;
}
input + span {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	display: inline-block;
	width: 1em;
	height: 1em;
	background-color: var(--color-background);
	border: 1px solid var(--color-input);
	border-radius: 2px;
}
input:focus + span {
	border-color: var(--color-checked);
	box-shadow: inset 0 0 0 1px var(--color-checked);
	outline: none;
}
input:checked + span {
	background-color: var(--color-checked);
	border-color: var(--color-checked);
	background-size: 1em 1em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Cg fill=%22%23fff%22%3E%3Ctitle xmlns:default=%22http://www.w3.org/2000/svg%22%3Echeck%3C/title%3E%3Cpath xmlns:default=%22http://www.w3.org/2000/svg%22 d=%22M7 14.17L2.83 10l-1.41 1.41L7 17 19 5l-1.41-1.42L7 14.17z%22/%3E%3C/g%3E%3C/svg%3E");
}
input:hover + span {
	border-color: var(--color-hover);
}
input:active + span {
	background-color: var(--color-active);
	border-color: var(--color-active);
}
.header > label {
	padding-left: .7em;
}
textarea {
	width: 100%;
	height: var(--height-editor);
	max-height: var(--max-height-editor);
}
#editor > .wikiparser {
	border-radius: .3em;
}

#ast {
	height: var(--height-editor);
	max-height: var(--max-height-editor);
	overflow: auto;
	padding: 0 .5rem;
}
dt {
	color: #2b91af;
	cursor: pointer;
	white-space: nowrap;
}
dt:hover {
	color: #1b43d4;
	text-decoration: underline;
}
dt::before {
	content: "-";
	font-family: monospace;
	display: inline-block;
	width: 1em;
}
dt.inactive::before {
	content: "+";
}
dd {
	margin-left: 1em;
	color: #d00;
	white-space: nowrap;
}
dt.inactive ~ *,
dt:not(.inactive) > :nth-child(n+2) {
	display: none;
}
dl > span, dt > span {
	color: initial;
}
dt > :nth-child(2) {
	color: #080;
}
.string {
	color: #a31515;
	display: inline-flex;
	white-space: pre-wrap;
}
.number {
	color: #098658;
}
.boolean {
	color: #00f;
}
span.hover {
	background-color: rgb(108, 108, 108, .2);
}
dl.hover {
	background-color: rgb(108, 108, 108, .1);
}

@media screen and (min-width: 1200px) {
	#editor > .wikiparse-container {
		width: 70%;
		float: left;
		margin-right: .5rem;
	}
	#ast {
		padding-right: 0;
	}
}

@media screen and (max-width: 1200px) {
	#editor > .wikiparse-container {
		max-height: 60vh;
		margin-bottom: .5rem;
	}
}

@media screen and (max-width: 720px) {
	main {
		width: 100%;
		margin: 0;
		border-radius: 0;
	}
	article {
		padding: 1rem;
	}
	#editor > .wikiparse-container {
		font-size: var(--font-size-tablet);
	}
}
