body {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000000;
  color: #c0c0c0;
  font-family: FreeSans, sans-serif;
}

a {
  color: #499bc9;
  font-weight: 700;
  text-decoration: none;
}

code {
  border: 1px solid #404040;
  overflow-x: auto;
  display: inline-block;
  vertical-align: bottom;
  text-align: left;
  font-family: Inconsolata, monospace;
  background: #2b2b2b;
  color: #d0d0d0;
}

pre code {
  width: calc(100% - 1em);
  overflow-x: auto;
  padding: 0.3em 0.5em !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #d8d8d8;
}

h1 {
  font-weight: 700;
  font-size: 1.6rem;
  padding: 6pt 0;
  margin: 0;
}

h2 {
  font-weight: 700;
  font-size: 1.3rem;
  padding: 3pt 0;
  margin: 0;
}

h3 {
  font-weight: bold;
  font-size: 1.15rem;
  padding: 3pt 0;
  margin: 0;
}

p {
  white-space: pre-wrap;
  line-height: 1.20em;
  line-break: strict;
  margin: 0.7rem 0;
}

ul li {
  margin-top: 0.1rem;
}

ul {
  padding-left: 20px;
}

.hljs {
  background: black;
  color: #d0d0d0;
  font-family: Inconsolata, monospace;
}

.site-main img {
  max-width: min(100%, 400px);
}

.site-main video {
  max-width: min(100%, 400px);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  /* must match .site-main top */
  height: 60px;
  max-height: 60px;
  background: #303030;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 1000;

  font-size: 130%;
  font-weight: 700;

  overflow: hidden;
}

.site-header .site-header-items {
  display: flex;
  align-items: center;
  height: 60px;
  position: relative;
  width: 100%;
}

.site-header-items .site-icon {
  height: 60px;
}

.site-header-items img {
  height: 60px;
  flex: 0 0 auto;
}

.site-header-items .site-title {
  flex: 1;
  padding: 0 0.5em;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.site-header-items .site-spacer {
  width: 60px;
  flex-shrink: 0;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  /* must match .site-main bottom */
  height: 1.5rem;
  background: #303030;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 1000;
}

.site-main {
  position: absolute;

  /* must match .site-header/footer heights */
  top: 60px;
  bottom: 1.5rem;

  left: 0;
  right: 0;
  overflow-y: auto;
}

.layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  padding: 0 1rem;

  /* This is important to avoid long words causing the whole page (including
   * header/footer) to want to scroll */
  overflow-x: auto;
}

.left-sidebar {
  flex: 0 0 15em;
  max-width: 15em;
  margin-right: 1.5rem;
  padding-top: 1em;
}

.content {
  padding: 1em 0;
  flex: 0 1 45rem;
  max-width: 45rem;
  text-align: justify;
}

.right-sidebar {
  flex: 0 1 15em;
  max-width: 15em;
  margin-left: 1.5rem;
}

.nav {
  font-size: 80%;
  padding: 0.2rem 0;
}

.nav ul {
  margin: 0.2rem 0;
}

.nav li.current {
  font-weight: 700;
  color: white;
}

@media (max-width:60em) {
  html {
    font-size: 0.9rem;
  }

  code {
    font-size: 0.8rem;
  }

  .layout {
    flex-direction: column;
    align-items: stretch;
    justify-content: initial;
    gap: 0;
  }

  .left-sidebar {
    flex: auto;
    order: 0;
    margin: 0;
    max-width: 100%;
  }

  .content {
    flex: auto;
    order: 1;
    max-width: 100%;
    padding: 0.5em 0;
  }

  .right-sidebar {
    display: none;
  }

  .site-footer {
    font-size: 0.65rem;
  }
}
