/* Generic settings */
* {
  font-family: sans-serif;
  color: white;
  margin: 0px;
}
body {
  background-image: url(images/bg.png);
  }
div {
  margin: 10px 10px 0px 10px;
  padding: 10px;
}
p {
  margin-bottom: 0.4em;
}
table {
  border-collapse: collapse;
  border: 2px solid black;
}
th {
  font-size: 90%;
  text-align: left;
}
td, th {
  vertical-align: top;
  border: 2px solid black;
  padding: 5px;
}
.overview {
  border: 0px;
}
.overview tr td {
  border: 0px;
  vertical-align: middle;
}
.overview tr td:first-child {
  width: 75%;
  padding-bottom: 0.4em;
}
ol#toc {
  counter-reset: item
}
ol#toc * ol {
  counter-reset: item
}
ol#toc li {
  display: block
}
ol#toc * ol li {
  display: block
}
ol#toc li:before {
  content: counters(item, ".") " ";
  counter-increment: item
}
ol#toc * ol li:before {
  content: counters(item, ".") " ";
  counter-increment: item
}
code {
  font-family: monospace;
  font-size: 120%;
}

/* Title */
#title {
  background-color: #333333dd;
  width: calc(100% - 60px);
  display: grid;
  grid-template-columns: min-content auto auto;
  font-size: 190%;
  padding: 20px;
}
#title img {
  width: 128px;
}
#title h1, #title p {
  display: inline;
  margin-top: auto;
  margin-bottom: auto;
  padding-left: 15px;
}
#title p {
  font-size: 100%
}

/* Navigation */
#nav {
  background-color: #888888dd;
  float: left;
  width: calc(100% - 40px);
  padding-bottom: 0px;
}
#nav ul {
  list-style-type: none;
  padding: 0px;
}
#nav ul ul {
  display: none;
  margin-left: 20px;
}
#nav li {
  margin-bottom: 10px;
  padding: 15px;
  font-size: 180%;
  background-color: #444444dd;
}
#nav li:hover {
  background-color: white;
}
#nav li:hover a {
  color: black;
}
#currentNavParent {
  border: 5px dashed white;
}
#currentNavItem {
  border: 5px solid white;
}

/* Main content */
#main {
  background-color: #bbbbbbdd;
  color: black;
  float: left;
  width: calc(100% - 40px);
  font-size: 200%;
}
#main * {
  color: black;
}
#main h2 {
  margin-bottom: 10px;
}
#main h3 {
  margin-top: 10px;
  margin-bottom: 10px;
}
#main img {
  max-width: calc(100% - 30px);
  height: auto;
  margin: 15px;
}
#main ul, #main ol {
  list-style-position: inside;
  margin-top: 5px;
  margin-bottom: 5px;
}
#main li {
  margin-left: -40px;
}
#main table {
  font-size: 120%;
}
#main pre {
  background-color: lightblue;
  border: 1px solid black;
  margin: 15px;
  padding: 0px 20px;
  overflow: auto;
}
#main hr {
  height:2px;
  border-width:0;
  color:black;
  background-color:black;
}
#main iframe {
  width: 100%;
  height: 42em;
}

/* Footer */
#footer {
  background-color: #333333dd;
  float: left;
  width: calc(100% - 40px);
  display: grid;
  grid-template-columns: auto auto auto;
  font-size: 180%;
  margin-bottom: 10px;
}
#footer a {
  margin-left: auto;
}

/* Layout for non-mobile devices */
@media only screen and (min-width: 1000px) {
  .overview tr td img {
    max-height: 100px;
  }
  
  /* Navigation (non-mobile) */
  #nav {
    width: 200px;
  }
  #nav ul ul {
    display: block;
  }
  #nav li {
    padding: 5px;
    font-size: 100%;
  }
  #currentNavParent {
    border: none;
  }
  #currentNavItem {
    border: 2px solid white;
  }
  
  /* Title (non-mobile) */
  #title {
    font-size: 100%;
    width: calc(100% - 40px);
    padding: 10px;
  }
  #title img {
    width: auto;
  }
  #title p {
    font-size: 100%;
  }
  
  /* Main content (non-mobile) */
  #main {
    margin-left: 0px;
    width: calc(100% - 270px);
    font-size: 100%;
  }
  #main h2 {
    font-size: 170%;
  }
  #main h3 {
    font-size: 140%;
  }
  #main table {
    font-size: 100%;
  }
  
  /* Footer (non-mobile) */
  #footer {
    font-size: 100%;
  }
}
