body {
  max-width: 800px;
  margin: auto;
  padding: 1em;
  line-height: 1.5;
}

/* header and footer areas */
.menu { padding: 0; }
.menu li { display: inline-block; }
.article-meta, .menu a {
  text-decoration: none;
  background: #ffffff;
  padding: 5px;
  border-radius: 2px;
  border-width: 2px;
  border-style: solid;
}
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.1em; }
footer a { text-decoration: none; }
hr {
  border-style: dashed;
  color: #ddd;
}
.article-meta h1, .article-meta h2, .article-meta h3 {
  margin: 5px;
}
.article-meta h1 {
  border-bottom: solid;
  border-width: 2px;
}

/* code */
pre {
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px #eee;
  padding: 1em;
  overflow-x: auto;
}
code { background: #f9f9f9; }
pre code { background: none; }

/* misc elements */
img, iframe, video { max-width: 100%; }
main { hyphens: auto; }
blockquote {
  background: #f9f9f9;
  border-left: 5px solid #ccc;
  padding: 3px 1em 3px;
}

table {
  margin: auto;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
}
table thead th { border-bottom: 1px solid #ddd; }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: #eee; }

.footer-credits {
  display: block;
  font-size: 0.8em;
}

p, li {
  text-align: justify;
  hyphens: none;
}

.center-image {
  text-align: center;
}

*:visited, *:link {
  color: inherit;
}

/* Table of Contents */
.toc {
  margin: 0 2px 40px 2px;
  border: 1px solid;
  border-radius: 2px;
  padding: 0.4em 0;
  text-decoration: none;
}

.toc.side {
  font-size: .9em;
}

@media screen and (min-width: 1450px) {
  .toc.side {
      position: fixed;
      top: 100px;
      z-index: 1;
      max-height: calc(100% - 300px);
      overflow: auto;
  }
  .toc.side::-webkit-scrollbar-thumb {
      border: 5px solid;
  }
  .toc.side.left {
      left: 15px;
      width: 300px;
  }
  .toc.side.right {
      right: 15px;
      width: 300px;
  }
}

.toc details summary {
  cursor: pointer;
  margin-inline-start: 15px;
  marker: none;
}

.toc .details {
  display: inline;
  font-weight: 500;
}

.toc .inner {
  padding: 10px 15px 5px 35px;
}

.toc ul {
  margin: 0;
  padding: 0;
}

.toc li {
  display: list-item;
  list-style-type: inherit;
}

.toc li ul {
  margin-inline-start: 20px;
}

.toc li a {
  line-height: 1.5em;
  padding: 3px 5px;
  border-radius: 2px;
  display: inline;
  text-decoration: none;
}

.toc li a.active, .toc li a.active code {
  background-color: black;
  color: white;
}

.toc li a:hover {
  text-decoration: underline;
}

.toc summary:focus {
  outline: 0;
}
