:root {
	--purple: hsl(263, 46%, 51%);
	--purple-light: hsl(263, 71%, 67%);
	--white: hsl(0, 0%, 100%);
	--grey-6: hsl(0, 0%, 6%);
	--grey-12: hsl(0, 0%, 12%);
	--grey-16: hsl(0, 0%, 16%);
	--grey-20: hsl(0, 0%, 20%);
	--logo: url(https://r2.alca.tv/tmijs/site/images/logo.svg);

	--primary-font: 'Roboto', sans-serif;
	--secondary-font: 'Roboto Slab', serif;
	--monospace-font: 'Roboto Mono', monospace;

	--body-font-family: var(--primary-font);
	--body-font-weight: 300;

	/* header */

	--header-size: 1.5em;
	--header-height: 2.625rem;
	--header-button-transition-duration-transform: 200ms;
	--header-button-transition-duration-opacity: 100ms;

	/* hero */

	--hero-grid-gap: 1.5rem;

	--hero-title-size: 2.625rem;
	--hero-title-margin: 0.4em;
	--hero-title-font-family: var(--secondary-font);
	--hero-title-font-weight: 400;

	--hero-text-size: 1.5rem;
	--hero-text-margin: 2em;

	--hero-button-height: 1.5em;
	--hero-button-side-padding: 1em;
	--hero-button-font-size: 1rem;
	--hero-button-font-weight: 700;
	--hero-button-transition-duration-shadow: 200ms;

	/* code */

	--code-font-family: var(--monospace-font);
	--code-font-size: 0.75em;
	--code-line-height: 1.375em;
}

body {
	font-family: var(--body-font-family);
	font-weight: var(--body-font-weight);
	/* background: var(--purple); */
	background: var(--grey-6);
	color: var(--white);
	margin: 0;
}

p,
li {
	line-height: 1.25em;
}

p code,
li code {
	padding: 0.2em 0.25em;
	border-radius: 0.2em;
	background-color: hsla(0, 0%, 0%, 0.8);
	font-size: 1.1em;
}

.header,
.hero,
.page-outer {
	width: 90%;
	max-width: 1280px;
	margin: 0 auto;
}

.hero {
	max-width: 920px;
}

.header .logo, .hero .hero-image {
	background-image: var(--logo);
	background-repeat: no-repeat;
	background-position: center;
}

.header-outer {
	background: var(--purple);
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 10;
}

.header {
	display: flex;
	margin: 0 auto;
	height: var(--header-height);
	line-height: var(--header-height);
	font-size: var(--header-size);
	align-items: center;
	flex-wrap: nowrap;
	justify-content: space-between;
}

.header .logo {
	width: 4.2em;
	height: var(--header-height);
	background-size: 60%;
}

.header .header-buttons {
	display: flex;
}
.header .header-buttons-small {
	display: none;
}

.header .hero-button {
	display: block;
	opacity: 0;
	margin-right: 0.3em;
	pointer-events: none;
	transform: translateY(calc(var(--header-height) * -0.5));
	transition:
		var(--hero-button-transition-duration-shadow) box-shadow,
		var(--header-button-transition-duration-transform) transform,
		var(--header-button-transition-duration-opacity) opacity;
}

.header .hero-button:last-child {
	margin-right: 1em;
}

body.scrolled .header .hero-button {
	opacity: 1;
	pointer-events: all;
	transform: translateY(0);
}

.hero-outer {
	background: var(--purple);
}

.hero {
	display: grid;
	grid-template-columns: auto 40%;
	gap: var(--hero-grid-gap);
	padding: 8.75rem 0;
}

.hero-title {
	font-family: var(--hero-title-font-family);
	font-weight: var(--hero-title-font-weight);
	font-size: var(--hero-title-size);
	margin-bottom: var(--hero-title-margin);
}

.hero-image {
	background-size: contain;
	filter: drop-shadow(0.125rem 0.1875rem 0rem black);
}

.hero-text {
	font-size: var(--hero-text-size);
	margin-bottom: var(--hero-text-margin);
}

.hero-button {
	display: inline-block;
	color: var(--white);
	background: var(--purple);
	border: 0.125rem solid var(--white);
	/* background: var(--hero-button-background); */
	/* color: var(--purple); */
	/* height: var(--hero-button-height); */
	text-decoration: none;
	font-size: var(--hero-button-font-size);
	font-weight: var(--hero-button-font-weight);
	box-sizing: border-box;
	/* padding: 0 var(--hero-button-side-padding); */
	line-height: var(--hero-button-height);
	border-radius: calc(var(--hero-button-height) * 0.5);
	cursor: pointer;
	transition: var(--hero-button-transition-duration-shadow) box-shadow;
	overflow: hidden;
}

.hero-button:hover {
	box-shadow: 0.09375rem 0.1875rem 0.0625rem black, 0.09375rem 0.1875rem 0.0625rem black inset;
}

.hero-button > * {
	display: inline-block;
	height: var(--hero-button-height);
	padding: 0 var(--hero-button-side-padding);
}

.hero-button.version-loaded > :first-child {
	padding-right: calc(var(--hero-button-side-padding) * 0.9);
}

.current-version {
	font-weight: var(--hero-button-font-weight);
	/* margin-left: var(--hero-button-side-padding); */
	padding-left: calc(var(--hero-button-side-padding) * 0.9);
	background: var(--white);
	color: var(--purple);
}

/* h1,
h2,
h3 {
	margin-top: 0;
} */

a[href^="#"] h1:before,
a[href^="#"] h2:before,
a[href^="#"] h3:before {
	content: '#';
	display: inline-block;
	opacity: 0.2;
	margin-right: 0.2em;
}

a[href^="#"],
a[href^="#"]:visited {
	color: inherit;
	text-decoration: none;
}

a[href^="#"]:hover {
	text-decoration: underline;
}

a[href^="#"]:hover h1:before,
a[href^="#"]:hover h2:before,
a[href^="#"]:hover h3:before {
	opacity: 0.8;
}

table, caption, tbody, tfoot, thead, tr, th, td {
	vertical-align: baseline;
	text-align: left;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
	border: 0.125rem solid var(--grey-20);
}
tr {
	background: var(--grey-12);
}
tr:nth-child(even) {
	background: var(--grey-16);
}
thead tr {
	background: var(--purple);
}
th, td {
	padding: 0.5rem;
}
td {
	border-left: 0.125rem solid var(--grey-20);
}

.table-options tr.table-top-level td:first-child {
	border-left-color: var(--purple);
}
.table-options tr.table-indented td:first-child {
	padding: 0;
	min-width: 130px;
}
.table-options tr.table-indented td:first-child > code:first-child {
	display: block;
	border-left: 0.125rem solid var(--grey-20);
	padding: 0.5rem 0.375rem 0.5rem 0.875rem;
	word-break: break-word;
}

.table-options code.item-required:after {
	content: '*';
	font-family: var(--body-font-family);
	font-weight: bold;
	color:hsl(0, 46%, 51%);
	text-shadow: 0 0 0.125rem hsl(0, 46%, 51%);
}
.table-options code.item-optional:after {
	color:hsl(0, 0%, 51%);
	content: '?';
}

.anchor-target {
	position: relative;
	bottom: var(--header-height);
}

.page-outer {
	/* min-height: 80vh; */
}

.page {
	padding: 1.125rem 1rem;
	background: var(--grey-12);
}

.page-nav {
	padding: 1rem 1rem;
	background: var(--grey-16);
	color: var(--purple-light);
	font-weight: 700;
	font-size: 0;
}

.page-nav a {
	text-decoration: underline;
	font-size: 1.5rem;
}

.page-nav a:hover {
	color: var(--white);
}

.page-nav a + a {
	margin-left: 0.5em;
	padding-left: 0.5em;
	border-left: 0.125rem solid var(--purple);
}

section.flash {
	position: relative;
	z-index: 0;
}
section.flash:before {
	content: '';
	display: block;
	border-radius: 0.5rem;
	pointer-events: none;
	animation: 1s flash;
	position: absolute;
	top: -0.625rem;
	left: -0.625rem;
	right: -0.625rem;
	bottom: -0.625rem;
}

pre code {
	font-family: var(--code-font-family);
	font-size: var(--code-font-size);
	line-height: var(--code-line-height);
}

.warning {
	margin: 1em 0;
	background-color: hsla(27, 100%, 62%, 0.05);
	border: 0.125rem solid hsl(27, 84%, 52%);
	padding: 1rem;
	border-radius: 0.25em;
}
.warning h1 {
	margin-top: 0;
}
.warning ul {
	padding-left: 1em;
}
.warning a {
	color: hsl(25, 100%, 91%);
}
.warning svg {
	vertical-align: middle;
	fill: hsl(27, 97%, 61%);
	margin-right: 0.375em;
}

@keyframes flash {
	from {
		background-color: hsl(263deg 46% 51% / 40%);
	}
	to {
		background-color: hsl(263deg 46% 51% / 0%);
	}
}

@media (max-width: 700px) {
	.header, .hero {
		width: 80%;
	}
	.hero {
		display: flex;
		flex-direction: column-reverse;
		padding: 5rem 0;
	}
	.hero-title {
		font-size: 2rem;
	}
	.hero-text {
		font-size: 1.125rem;
	}
	.hero-image {
		height: 100px;
		margin-bottom: 1.5rem;
	}

	.header .header-buttons {
		display: none;
	}
	.header .header-buttons-small {
		display: flex;
	}
}

@media (prefers-reduced-motion) {
	section.flash:before {
		display: none;
	}
}

/*

Atom One Dark by Daniel Gamage
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax

base:    #282c34
mono-1:  #abb2bf
mono-2:  #818896
mono-3:  #5c6370
hue-1:   #56b6c2
hue-2:   #61aeee
hue-3:   #c678dd
hue-4:   #98c379
hue-5:   #e06c75
hue-5-2: #be5046
hue-6:   #d19a66
hue-6-2: #e6c07b

*/

.hljs {
	display: block;
	overflow-x: auto;
	padding: 0.5em 1.5em;
	/* color: #abb2bf; */
	/* background: #282c34; */
	background: var(--grey-16);
	-moz-tab-size: 4;
	tab-size: 4;
}

.hljs-comment,
.hljs-quote {
	color: #5c6370;
	font-style: italic;
}

.hljs-doctag,
.hljs-keyword,
.hljs-formula {
	color: #c678dd;
}

.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
	color: #e06c75;
}

.hljs-literal {
	color: #56b6c2;
}

.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
	color: #98c379;
}

.hljs-built_in,
.hljs-class .hljs-title {
	color: #e6c07b;
}

.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
	color: #d19a66;
}

.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
	color: #61aeee;
}

.hljs-emphasis {
	font-style: italic;
}

.hljs-strong {
	font-weight: bold;
}

.hljs-link {
	text-decoration: underline;
}
