@import 'https://fonts.googleapis.com/css?family=Roboto:500,700|Source+Code+Pro:500|Source+Serif+Pro:400,700';

html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:0 0}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:0 0}ins{text-decoration:none}ins,mark{background-color:#ff9;color:#000}mark{font-style:italic;font-weight:700}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-collapse:collapse;border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}input,select{vertical-align:middle}

body {
  font-family: 'Source Serif Pro', serif;
  font-weight: lighter;
  width: 100%; height: 100;
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Roboto, sans-serif;
}

header {
  background: white;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5rem;
  border-bottom: 1px solid black;
  z-index: 9999;
}

header h1 {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 5rem;
  margin-left: 2rem;
}

.nav-toggle {
  display: inline-block;
  position: relative;
  top: 0.05rem;
  margin-right: 0.5rem;
  height: 1rem;
  width: 1.55rem;
  background: #fff;
}

.nav-toggle .notch {
  position: absolute;
  left: 0; right: 0;
  height: 0.25rem;
  background: #000;
  transform: translate(0, 0);
  transition: transform 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-toggle .notch.bot {
  bottom: 0;
}
.nav-toggle .notch.mid {
  top: 50%;
  margin-top: -0.125rem;
}
.nav-enabled .nav-toggle .notch.bot {
  transform: translate(0, +0.125rem);
}
.nav-enabled .nav-toggle .notch.top {
  transform: translate(0, -0.125rem);
}

nav {
  position: fixed;
  top: 5rem; left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin-top: 1px;
  bottom: 0;
  width: 20rem;
  background: #fff;
  z-index: 99999;
  border-right: 1px solid #000;
  transform: translate(-21rem, 0);
  transition: transform 0.25s;
}

.nav-enabled nav {
  transform: translate(0, 0);
}

nav ul li a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  font-family: Roboto, sans-serif;
  padding: 1rem 1rem;
  border-bottom: 1px solid #000;
  display: block;
  transition: color 0.1s, background-color 0.1s;
}
nav ul li a.faded {
  color: #aaa;
}
nav ul li a.faded:hover,
nav ul li a:hover {
  font-weight: 700;
  background: #000;
  color: #fff;
}

nav ul li a .done-mark:before {
  color: #92EB34;
  content: ' ';
  display: inline-block;
  width: 1rem;
  text-align: center;
  text-shadow: 0 +1px #000,
               0 -1px #000,
               +1px 0 #000,
               -1px 0 #000;
}
nav ul li a:hover .done-mark:before {
  font-weight: 500;
  color: #fff;
}
nav ul li a .done-mark.is-done:before {
  content: '✓';
}

main {
  padding: 2rem;
  line-height: 1.7em;
  font-size: 1rem;
  /*text-align: justify;*/
}

main > :first-child {
  margin-top: 0;
}

main h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  margin-top: 2rem;
}

main p {
  margin-bottom: 1rem;
}

figure.canvas {
  position: fixed;
  border: 1px solid #000;
  border-radius: 0.2rem;
  background: white;
  left: 35rem;
  top: 8rem;
  width: 400px; height: 400px;
  padding: 3px;
  transform: perspective(1300px) rotateY(0deg);
  transform-style: preserve-3d;
  transform-origin: 0% 50%;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backface-visibility: hidden;
}

figure.canvas canvas {
  backface-visibility: hidden;
}

figure.canvas figcaption {
  font-size: 0.7rem;
  line-height: 1.5em;
  margin-top: 1rem;
  font-style: italic;
  backface-visibility: hidden;
}

.canvas-hidden figure.canvas {
  transform-style: preserve-3d;
  transform-origin: 0% 50%;
  transform: perspective(1300px) rotateY(90deg);
}

.CodeMirror, pre, code {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.85rem;
}

.CodeMirror {
  height: 100%;
  width: 100%;
  margin-bottom: 1.5rem;
  line-height: 1.6em;
  font-size: 0.75rem;
  font-weight: 500;
  background-image: none!important;
}

.CodeMirror-gutters {
  background: transparent;
  border: none;
  padding-right: 0.5rem;
}

.CodeMirror-linenumber {
  color: #d5d5d5;
}

.mainui {
  position: absolute;
  display: flex;
  top: 5rem;
  bottom: 0;
  overflow: hidden;
  left: 0; right: 0;
  box-sizing: border-box;
  align-items: stretch;
  justify-content: space-between;
}

.mainui .text {
  border-left: 1px solid #000;
  padding-left: 2rem;
  width: 25rem;
  overflow-y: auto;
}

.mainui .canvas {
  position: relative;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #000;
  min-width: 20vw;
}

.mainui .label {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(0,0,0,0.75);
  color: #fff;
  z-index: 5;
  font-size: 0.9rem;
  font-family: Roboto, sans-serif;
  padding: 0.5rem 0.65rem;
  border-radius: 0.25rem;
}

.mainui #canvas-us,
.mainui #canvas-them {
  flex: 1;
  position: relative;
  background: #888;
  overflow: hidden;
}

.mainui #canvas-us {
  border-bottom: 1px solid #000;
}

.mainui .editor {
  flex: 1;
  position: relative;
  padding: 2rem;
  padding-bottom: 4rem;
}

.mainui .checker {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  background: #fff;
  transition: background 0.5s;
  border-top: 1px solid #000;
  height: 2rem;
  display: flex;
  text-align: center;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-family: Roboto, sans-serif;
}

.mainui .editor-container {
  position: relative;
}

main iframe {
  max-width: 100%;
  margin: 1rem 0;
}

main ul {
  margin: 1rem;
  margin-left: 2rem;
}

main a {
  color: #0080FF;
  border-bottom: 1px solid #0080FF;
  text-decoration: none;
}

main h3 {
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

main pre {
  line-height: 1.5em;
}
main pre code {
  font-size: 0.75rem;
  font-weight: 300;
  color: #555;
}
