:root {
  --header-width: 300px;
  --vertical-padding: 20px;
  --content-width: 760px;
}

body {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

a {
  color: red;
}

header ol a {
  text-decoration: none;
}

#toc ul {
  list-style: lower-alpha;
}

li.active > a {
  text-decoration: underline;
}

.container {
  max-width: calc(var(--header-width) + var(--content-width));
  margin: 40px auto;
}

header {
  position: fixed;
  width: var(--header-width);
}

main {
  margin-left: var(--header-width);
  padding: 0px 40px;
}

img {
  width: 100%;
}

h1,
h2,
h3,
h4,
h5 {
  /* margin-top: 0; */
  margin: var(--vertical-padding) 0px;
  font-weight: normal;
}

h1 {
  font-size: 45px;
}

h2 {
  font-size: 39px;
}

h3 {
  font-size: 33px;
}

h4 {
  font-size: 27px;
}

h5 {
  font-size: 21px;
}

hr {
  border: none;
  border-bottom: 2px dashed #ccc;
  margin: 40px 0px;
}

ol {
  margin: 0;
  margin-top: 10px;
}

section {
  border-bottom: 1px solid #000;
  padding-bottom: var(--vertical-padding);
  margin-top: var(--vertical-padding);
}

.embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.embed iframe,
.embed object,
.embed embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

code {
  white-space: pre-wrap;
  overflow: auto;
  background-color: #eee;
  word-wrap: break-word;
}

.codehilite {
  font-size: 0.9em;
  padding: 1px 0px 1px 6px;
  margin-bottom: 16px;
  position: relative;
}

.extended,
.codehilite {
  margin-right: calc(
    -0.5 * (100vw - var(--header-width) - var(--content-width))
  );
}

.codehilite pre {
  counter-reset: linecounter;
  padding-left: 1em;
}

.codehilite pre span.code-line {
  counter-increment: linecounter;
  padding-left: 1em;
  text-indent: -1em;
  display: inline-block;
}

.codehilite pre span.code-line:before {
  content: counter(linecounter);
  padding-right: 1em;
  display: inline-block;
  color: #bbb;
  text-align: right;
}

@media (max-width: 850px) {
  header {
    position: static;
  }
  main {
    margin: 0;
    padding: 20px;
  }
  .codehilite {
    margin-right: 0;
  }
}
