body{
	margin: 0;
	font-size: 16px;
	color: #444;
	font-family: sans-serif;
}

#mobile_menu{
	display: none;
	position: fixed;
	top: 1em;
	right: 1em;
	width: 3.7em;
	height: 3.7em;
	border-radius: 3.7em;
	background: #f0f0f0 url('/assets/common/menu.svg');
	background-size: 40%;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 1001;
	cursor: pointer;
}

#mobile_menu_toggle{
	display: none;
}

#mobile_menu_overlay{
	position: fixed;
	left: -100%;
	top: 0;
	width: 100%;
	bottom: 0;
	background-color: rgba(0,0,0,0);
	transition: background-color 200ms ease-in-out;
}

#container{
	display: flex;
}

section{
	padding: 2em;
	min-width: 0;
}

h1,h2,h3,h4{
	margin-block-start: 2em;
	margin-block-end: 1em;
}

h1:first-child,h2:first-child,h3:first-child,h4:first-child{
	margin-block-start: 0;
}

h1{
	font-size: 1.75em;
	font-weight: bold;
}

h2{
	font-size: 1.4em;
	font-weight: bold;
}

h3{
	font-size: 1.12em;
	font-weight: bold;
}

article ul,ol{
	line-height: 1.5em;
}

hr{
	border: none;
	border-top: 1px solid #ccc;
	margin: 2em 1em;
}

#article{
	flex-grow: 1;
}

#summary{
	background-color: #f0f0f0;
	flex-basis: 19em;
	flex-shrink: 0;
	line-height: 1.5em;
	max-height: 100vh;
	overflow: auto;
	box-sizing: border-box;
	position: sticky;
	top: 0;
	outline: 800px solid rgba(0,0,0,0);
}

#summary img{
	margin: 0;
}

#summary h1{
	display: none;
}

#summary p:first-of-type{
	margin-top: 0;
}

#summary ul{
	padding-left: 0;
	padding-bottom: .5em;
}

#summary > ul > li{
	padding-bottom: 1em;
}

#summary ul ul{
	padding-left: 1.25em;
}

#summary li{
	list-style: none;
}

#summary > ul{
	counter-reset: top-level;
}

#summary ul a{
	margin-left: 2em;
	display: inline-block;
}

#summary > ul > li a::before{
	counter-increment: top-level;
	content: counter(top-level) ". ";
	font-weight: bold;
	margin-left: -2em;
}

#summary > ul > li > ul{
	counter-reset: sub-level;
}
#summary > ul > li > ul > li a::before{
	counter-increment: sub-level;
	content: counter(top-level) "." counter(sub-level) ". ";
	font-weight: bold;
	margin-left: -2em;
}

#summary ul:last-child,
#summary ul:last-child li:last-child{
	padding-bottom: 0;
}

a{
	text-decoration: none;
	color: #07a;
}

a:hover{
	text-decoration: underline;
}

#summary a{
	color: #000;
	display: block;
}

#summary a:hover,
#summary a.selected{
	color: #07a;
	text-decoration: none;
}

#summary a[href=""],
a[href="#TODO"]{
	opacity: .25;
	pointer-events: none;
	color: inherit;
}

p{
	line-height: 1.5em;
}

p img{
	display: block;
	max-width: 80%;
	margin: 0 auto;
}

p code,
li > code,
blockquote code,
table code{
	border: 1px solid #ccc;
	border-radius: .2em;
	padding: 1px;
	margin: -1px 1px;
	background-color: #f0f0f0;
}

sup{
	line-height: 0;
}

.code{
	position: relative;
	width: 100%;
}

.code .buttons{
	position: absolute;
	top: 1em;
	right: 1em;
	background-color: #f5f2f0;
}

.code .buttons button{
	background: transparent;
	border: none;
	cursor: pointer;
	margin: 0;
	padding: 0;
	margin-left: .5em;
	width: 2em;
	height: 2em;
	position: relative;
	background-size: contain;
	background-repeat: no-repeat;
	opacity: .75;
}

.code .buttons button.copy{
	background-image: url('/assets/common/copy.svg');
	transform: scaleX(-1);
}

.code .buttons button.reset{
	background-image: url('/assets/common/refresh.svg');
}

.code .buttons button.play{
	background-image: url('/assets/common/play.svg');
}

.code .buttons button.share{
	background-image: url('/assets/common/export.svg');
}

.code .buttons button:hover{
	opacity: 1;
}

.code .result:not(:empty){
	background-color: #f5f2f0;
	padding: 1em;
}

.code .result .event{
	display: block;
	position: relative;
	padding-left: 5em;
}

.code .result .event::before{
	content: attr(data-topic) " #" attr(data-index);
	position: absolute;
	left: 0;
	top: 0;
	font-size: .65em;
	padding: .2em 0 0 .2em;
	width: 6em;
	overflow: hidden;
	background-color: #fff;
	border-radius: 1em;
	border: 1px solid #ccc;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
	text-transform: uppercase;
	text-align: center;
	color: #666;
}

.code .result .event.stx_transfer .sender{
	padding-left: 1em;
}

.code .result .event.stx_transfer .sender::after{
	content: '\002192';
	display: inline-block;
	padding: 0 1em;
}

.footnote{
	font-size: .9em;
	opacity: .5;
}

.footnote:first-of-type,
.prevnext + .footnote{
	margin-top: 2.5em;
	padding-top: 2.5em;
	border-top: 1px solid #ccc;
}

.footnote sup::before{
	content: '';
	display: block;
}

.prevnext{
	margin-top: 3em;
	display: flex;
	justify-content: space-between;
	width: 100%;
}

.prevnext a{
	display: block;
	font-size: 2em;
	width: 1.5em;
	height: 1.5em;
	line-height: 1.5em;
	text-align: center;
	background-color: #f0f0f0;
	border-radius: .1em;
	color: #ccc;
}

.prevnext a:hover{
	text-decoration: none;
	color: #000;
}

.prevnext a.prev::before{
	content: '\002039';
}

.prevnext a.next::before{
	content: '\00203a';
}

pre[class*="language-"],
.code .result:not(:empty){
	border: 1px solid #ccc;
	border-radius: .2em;
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
	box-sizing: border-box;
	width: 100%;
}

code[class*="language-"],
pre[class*="language-"],
.code .result,
.code .result code,
.code .validation_code{
	color: #000;
	background: none;
	text-shadow: 0 1px #fff;
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 1em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;
	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;
	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
}

.code.exercise::before{
	content: 'Exercise: ' attr(data-hint);
	white-space: pre-wrap;
	font-weight: bold;
	background-color: #ddd;
	border: 1px solid #ccc;
	border-radius: .2em;
	display: block;
	/* position: absolute;
	top: -2em;
	left: 0;
	right: 0;
	height: 1.1em; */
	padding: .5em 6.5em .5em .5em;
	margin-bottom: -.61em;
	min-height: 2.2em;
}

.code.exercise .buttons{
	background-color: transparent;
}

.code .result.pass{
	border-color: #0f0;
	background-color: #dfd;
}

.code .result.fail{
	border-color: #f00;
	background-color: #fdd;
}

.code .result.pass,
.code .result.fail{
	padding-left: 3em;
	position: relative;
}

.code .result.pass::before,
.code .result.fail::before{
	content: '';
	width: 1em;
	height: 1em;
	display: inline-block;
	position: absolute;
	left: 1.25em;
	top: 1.25em;
	background-image: url('/assets/common/pass.svg');
	background-size: contain;
}

.code .result.fail::before{
	background-image: url('/assets/common/fail.svg');
}

.code .result.fail[data-expected_output]::after{
	content: 'Expected: ' attr(data-expected_output);
	display: block;
	color: #f00;
}

body.playground{
	display: flex;
	height: 100%;
}

body.playground .code{
	display: flex;
	align-items: stretch;
	margin: 0;
}

body.playground .code pre{
	margin: 0;
	border-radius: 0;
	border: none;
}

body.playground .code .result{
	background-color: #e3ddd9;
	padding: 1em;
	border: none;
	border-left: 1px solid #ccc;
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
	box-sizing: border-box;
	width: 100%;
	flex-basis: 40%;
	margin: 0;
	white-space: pre-wrap;
}

body.playground .buttons{
	right: 30%;
}

pre[class*="language-clarity"]{
	padding-right: 5em !important;
}

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
	text-shadow: none;
	background: #b3d4fc;
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
	text-shadow: none;
	background: #b3d4fc;
}

@media print {
	code[class*="language-"],
	pre[class*="language-"] {
		text-shadow: none;
	}
}

:not(pre) > code[class*="language-"],
pre[class*="language-"],
.code .validation_code{
	background: #f5f2f0;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;
	white-space: normal;
}

pre code{
	display: block;
}

/* .code .result .error{
	color: #f00;
} */

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: slategray;
}

.token.punctuation {
	color: #999;
}

.token.namespace {
	opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
	color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: #690;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
	color: #9a6e3a;
}

.token.atrule,
.token.attr-value,
.token.keyword {
	color: #07a;
}

.token.function,
.token.class-name {
	color: #DD4A68;
}

.token.regex,
.token.important,
.token.variable {
	color: #e90;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}

blockquote{
	border-left: .25em solid #ccc;
	margin-left: 0;
	padding-left: 1em;
}

table{
	border-collapse: collapse;
	width: 100%;
	font: inherit;
	/* font-size: .95em; */
}

table thead{
	border-bottom: 1px solid #ccc;
}

table thead tr,
table tbody tr:nth-child(even){
	background-color: #f4f4f4;
}

table th,
table td{
	text-align: left;
	padding: .5em;
	border: 1px solid #ccc;
	line-height: 1.5em;
}

table th{
	font-weight: bold;
}

table tr td:first-child{
	white-space: nowrap;
}

pre,
[contenteditable]{
	border-style: transparent;
	outline: none;
}

@media all and (max-width: 900px){
	body{
		font-size: 14px;
	}
	#mobile_menu{
		display: block;
	}
	#summary{
		position: fixed;
		top: 0;
		left: -70%;
		bottom: 0;
		width: 70%;
		overflow: auto;
		z-index: 1000;
		transition: left 200ms ease-in-out, outline 200ms ease-in-out;
		outline: 800px solid rgba(0,0,0,0);
	}
	#mobile_menu_toggle:checked ~ #summary{
		left: 0%;
		outline: 800px solid rgba(0,0,0,.5);
	}
	#mobile_menu_toggle:checked ~ #mobile_menu_overlay{
		left: 0%;
		z-index: 999;
	}
	body.playground .buttons{
		right: 35%;
	}
	body.playground .code .result{
		flex-basis: 50%;
	}
}