@viewport {
	width: device-width;
}

@-ms-viewport {
	width: device-width;
}

html {
	-ms-touch-action: manipulation;
	touch-action: manipulation;
}

body {
	margin: 0;
	font-size: 18px;
	text-size-adjust: none;
	-o-text-size-adjust: none;
	-ms-text-size-adjust: none;
	-webkit-text-size-adjust: none;
	-moz-text-size-adjust: none;
	background-color: #F4f4f4;
	color: #444;
}

* {
	line-height: 1.6;
}

body a {
	color: #004bae;
	text-decoration: underline;
	font-weight: normal;
}

body a:hover,
body a:focus {
    color: #0866e6;
	text-decoration: underline;
	outline: none;
}

body>header {
	background-color: #000;
	color: #FFF;
	position: relative;
	font-family:serif;
}

body>header:before,
body>header:after {
	content: " ";
	display: table;
	clear: both;
}

body>header h1 {
    font-family: 'Rock Salt', cursive;
	font-weight: 400;
    font-style: normal;
    font-size: 1.75em;
}
body>header h1 a {
	color: #FFF;
	text-decoration: none;
	font-weight: inherit;
}
body>header h1 a:hover,
body>header h1 a:focus {
	text-decoration: underline;
}

body>header p {
	font-size: 0.7em;
	font-family: sans-serif;
}

.all-caps {
	text-transform: uppercase;
}

main {
	font-family: sans-serif;
}

main>article div.video {
	position: relative;
}

main>article div.video:before {
	display: block;
	content: " ";
	padding-bottom: 56%;
}

main>article div.video iframe,
main>article div.video video {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background-color: #000;
}

footer {
	font-family: sans-serif;
	font-size: 12px;
	color: #515151;
}

main>article h1,
main>article h2,
main>article h3,
main>article h4,
main>article h5,
main>article h6 {
    font-family: 'Rock Salt', cursive;
    font-weight: 400;
	color: #AA5800;
	line-height: 1.2;
	scroll-margin-top: 1em;
}

main>article h1 {
	color: #000;
	font-size: 2em;
    text-align: center;
    margin-top: 2em;
}

main>article h2 {
	font-size: 1.7em; 
	margin-top: 2.5em; 
	margin-bottom: 0em; 
	border-bottom: 1px solid rgba(0,0,0,0.25);
	padding-bottom:0.3em;
}

main>article h3 {
	font-size: 1.35em;
	margin-top: 2.5em;
	margin-bottom: 0em;
}

code {
	background-color: #FFF;
	font-size: 0.7em;
	padding: 0.5em 0.75em;
	font-family: monospace;
	color: #4735c6;
	font-weight: 700;
	border-radius: 5px;
	margin: 0em 0.5em;
	white-space: nowrap;
}
pre>code {
	display: block;
	box-shadow: 0px 2px 7px rgba(0,0,0,0.5) inset;
	width: 100%;
	overflow-x: auto;
	box-sizing: border-box;
	padding: 1.5em;
	margin: 0;
	white-space: inherit;;
}

main>article ul {
	list-style-type: none;
    padding-left: 2em;
}
main>article ul li:before {
	display: inline-block;
	content: "•";
	position: absolute;
	font-size: 1em;
	margin-left: -1em;
	margin-top: 0em;
	color: #333;
}


main>article table {
	border-collapse: collapse;
	width: 100%;
	margin: 1em auto;
	background-color: #FFF;
	border: 1em solid #FFF;
}

main>article table td {
	font-style: italic;
}

main>article table thead tr th {
	border-bottom: 1px solid rgba(0,0,0, 0.25);
}

#TOCHolder {
	position: fixed;
	right: 0;
	top: 0;
	width: 400px;
	background-color: #EEE;
	box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
	height: 48px;
	overflow-y: auto;
}

#TOCHolder>.header {
	background-color: #333;
	color: #FFF;
	padding: 12px 8px;
	font-family: sans-serif;
	cursor: pointer;
	height: 24px;
	display: block;
	font-weight: 300;
}

#TOCHolder>.header:focus,
#TOCHolder>.header:hover {
	text-decoration: underline;
}

#TOCHolder>.header:before {
	display: inline-block;
	content: "▶ ";
	margin-right: 0.75em;
}

#TOCHolder.active>.header:before {
	content: "▼ ";
}

#TOCHolder>div {
	overflow-y: auto;
	position: absolute;
	left: 0;
	right: 0;
	top: 48px;
	bottom: 100%;
	font-family: sans-serif;
	font-size: 0.9em;	
	padding: 0em 1em;
}

#TOCHolder>div>ul {
	display: none;
}

#TOCHolder.active>div>ul {
	display: block;
}

#TOCHolder>div>ul {
	list-style-type: none;
	margin: 1em 0em;
	padding: 0em;
}

#TOCHolder>div>ul ul {
	padding-left: 1.5em;
}

#TOCHolder.active {
	height: 100%;
}

#TOCHolder.active>div {
	bottom: 0%;
}

#TOCHolder>div a.active {
	color: #333;
}

@media (min-width: 900px) {
	body>header {
		padding: 1em 0;
	}
	body>header .header-content {
		width: 800px;
		margin: 0px auto;
	}
	body>header h1,
	body>header p {
		margin: 0;
		display: inline-block;
	}
	body>header p {
		margin-left: 1em;
	}
	main>article {
		width: 800px;
		margin: 2em auto;
	}

	main>article img,
	main>article canvas,
	main>article div.video {
		width: 900px;
		height: auto;
		margin: 0em -50px;
	}

	main>article div.video {
		margin-top: 1em;
		margin-bottom: 1em;
	}

	footer {
		width: 800px;
		border-top: 1px solid rgba(0,0,0,0.1);
		margin: 3em auto;
		margin-top: 9em;
	}	

	footer>p:first-child {
		float: right;
	}
}

@media (max-width: 899px) {
	body>header {
		padding: 1em 0;
	}
	body>header .header-content {
		margin: 0.5em 1em;
	}
	body>header h1,
	body>header p {
		margin: 0;
		text-align: center;
	}
	main>article {
		margin: 1em;
	}

	main>article img,
	main>article canvas,
	main>article div.video {
		width: 100vw;
		height: auto;
		margin: 0em -1em;
	}

	main>article div.video {
		margin-top: 1em;
		margin-bottom: 1em;
	}

	footer {
		margin: 1em 1em;
		border-top: 1px solid rgba(0,0,0,0.1);
		padding: 1em;
		margin-top: 6em;
	}

	body {
		overflow-x: hidden;
		font-size: 16px;
	}

	footer>p {
		margin: 0;
	}

	table {
		font-size: 0.9em;
	}

	#TOCHolder	{
		left: 0;
		right: 0;
		top: auto;
		bottom: 0;
		width: auto;
	}

	#TOCHolder.active {
		height: auto;
		top: 33%;
	}

}

@media print {
	body {
		background-color: #FFF;
	}
}

@media (prefers-color-scheme: light) {
    main>article div.video,
    main>article img,
    main>article canvas {
        box-shadow: 0px 5px 10px rgba(0,0,0,0.5);
    }    
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #333;
        color: #DDD;
    }

    footer {
        border-color: rgba(255,255,255,0.1);
		color: #C2C2C2;
    }

    main>article div.video,
    main>article img,
    main>article canvas {
        outline: 1px solid #777;
    }    

    main>article h1 {
        color: #FFF;
    }

    main>article h2 {
        border-color: rgba(255,255,255,0.25);
    }

    main>article h2,
    main>article h3,
    main>article h4,
    main>article h5,
    main>article h6 {
        color: #D99348;
    }

    main>article a {
        color: #9cc4f9;
    }

    main>article a:hover,
    main>article a:focus {
        color: #5299f7;
    }

    main>article ul li:before {
        color: #EEE;
    }
    
    main>article table {
        background-color: #222;
        border: 1em solid #222;
    }
        
    main>article table thead tr th {
        border-color: rgba(255,255,255, 0.25);
    }
    
	code {
		background-color: #202020;
		color: #89bd4a;
	}

}

