#modelbackground {
  position: fixed;
  left: 0px;
  right: 0px;
  bottom: 0px;
  top: 0px;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.5);
}

#modelcontainer {
  margin: auto;
  position: fixed;
  top: 15%;
  left: 50%;
  width: 512px;
  padding: 20px;
  margin-left: -256px;
  background-color: white;
}

#modelclose {
  position: relative;
  font-weight: bold;
  float: right;
}

#modelclose:hover {
  text-decoration: underline;
}

@font-face {
  font-family: 'Domine';
  font-style: normal;
  font-weight: 400;
  src: local('Domine'), local('Domine-Regular'),
       url('/Domine.woff2') format('woff2'),
       url('/Domine.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Arimo';
  font-style: normal;
  font-weight: 400;
  src: local('Arimo'), local('Arimo-Regular'),
       url('/Arimo-Regular.woff2') format('woff2'),
       url('/Arimo-Regular.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Layout */
html {
  background-color: #272727;
  font-family: Arimo, sans serif;
  font-size: 17px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Domine;
}

body {
  background-color: white;
  max-width: 860px;
  margin: 12px auto;
  padding: 0 24px;
  
  overflow-y: scroll;
}

/* Navigation */

.nav a, button, input[type=submit], a.button {
  font-family: inherit;
  display: inline-block;
  background-color: white;
  border: 1px solid gray;
  outline: 0;
  vertical-align: middle;
  text-align: center;
  font-size: 16px;
  text-decoration: none;
  color: black;
  margin: 3px;
  padding: 4px 8px;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,14%);
}

button::-moz-focus-inner, input[type=submit]::-moz-focus-inner {
  border: 0;
}

.nav a.current, .nav a:active, button:active, input[type=submit]:active, a.button:active {
  background-color: #ddd;
  box-shadow: 0 1px 4px rgba(0,0,0,14%) inset;
}

.nav a:hover, button:hover, input[type=submit]:hover, a.button:hover {
  border-color: black;
}

.nav a.unavailable, button:disabled, input[type=submit]:disabled, a.button.unavailable {
  box-shadow: none;
  background-color: #bbb;
  color: #444;
  border-color: gray;
}


.system-nav {
  margin: 0 -24px;
  padding: 12px 24px;
  border-bottom: 1px solid black;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  
  background-color: #ddd;
  background-size: cover;
  background-position: center;
  box-shadow: 0 -10px 10px -10px rgba(0,0,0,40%) inset;
  color: black;
}

.system-nav.white-info {
  color: white;
}
.system-nav h4 {
  margin: 0;
  font-style: italic;
}
.system-nav h4 > a {
  color: inherit;
  text-decoration: none;
}
.system-nav .login {
  padding-left: 1em;
  text-align: right;
  flex-grow: 1;
}

.course-nav {
  background-color: #ececec;
  margin: 0 -24px;
  padding: 6px 24px;
}

.top-nav {
  font-size: 0;
}

.top-nav a {
  line-height: 32px;
  min-width: 32px;
  font-size: 18px;
  padding: 2px;
}

.bottom-nav {
  margin-top: 24px;
  overflow: hidden;
}

.next-chapter {
  float: right;
}

/* Content */

hr {
  border: none;
  border-bottom: 1px solid black;
}

table {
  border-collapse: collapse;
  margin: 0.8em 0;
  box-shadow: 0 1px 2px rgba(0,0,0,10%);
}

td, th {
  border: 1px solid #777;
  padding: 2px 6px;
}

th {
  background-color: #ececec;
}

input[type=text], input[type=password] {
  font-family: inherit;
  background-color: white;
  border: 1px solid #00b014;
  outline: 0;
  vertical-align: middle;
  font-size: 16px;
  text-decoration: none;
  color: black;
  margin: 3px;
  padding: 4px 8px;
  border-radius: 2px;
}

input[type=text]:focus, input[type=passowrd]:focus {
  box-shadow: 0 0 4px rgba(0,1,0.1,20%);
}

code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  border: 1px solid #cfcfcf;
  padding: 1px 3px;
}
.example {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  overflow: auto;
}

.editor, .example, .varproblem, pre {
  max-width: 620px;
  box-sizing: border-box;
  border: 1px solid black;
}
.editor {
  line-height: 2ex;
  min-height: 28ex;
  border-color: #00b014;
  box-shadow: 0 0 4px rgba(0,1,0.1,20%);
}

.example, .varproblem {
  padding: 6px;
}

canvas {
  border: 1px solid black;
}

.task-title span {
  float: right;
  display: inline-block;
  vertical-align: middle;
  font-family: Arimo;
  font-size: 14px;
  font-weight: initial;
  text-transform: uppercase;
  background-color: gray;
  color: white;
  padding: 4px 8px;
  border-radius: 2px;
  margin-left: 8px;
}

.task-title span.solved {
  background-color: #549348;
}
.task-title span.unsolved {
  background-color: #c24a4a;
}

.run {
  margin: 0.8em 0;
}

.console {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 11pt;
  max-width: 620px;
  box-sizing: border-box;
  padding: 6px;
  background-color: #f5f4bc;
  max-height: 9em;
  line-height: 1em;
  overflow: auto;
  white-space: pre;
}


.ace_editor .ace_marker-layer .ace_bracket { display: none }


/* Front page */
.course-preview {
  display: block;
  color: white;
  text-decoration: none;
  min-height: 150px;
  box-sizing: border-box;
  background-size: cover;
  background-position-x: center;
  background-repeat: no-repeat;
  padding: 12px 24px;
  margin: 20px 0;
  border: 1px solid black;
  
  box-shadow: 0 0 8px rgba(0,0,0,30%);
  transition: box-shadow 200ms;
}

.course-preview h5 {
  text-decoration: underline;
}

.course-preview:hover, .course-preview:active {
  box-shadow: 0 4px 8px rgba(0,0,0,40%);
}

