body {
    font-family: serif;
}
div.pagecontents {
    counter-reset: figures;
    margin: 30px auto 0px auto;
}
div.pagecontents p, div.pagecontents li {
    line-height: 1.2;
    font-size: 16px;
}
div.pagecontents, code, pre {
    max-width: 650px;
}
div.navbar {
    display: inline-block;
    padding: 10px;
    /* Thanks, oilshell.org, for inspiration. */
    background-color: #DEE;
}
li.post-item {
    display: table;
    width: 100%;
}
a.post-title span {
    float: left;
}
div.post-date i {
    float: right;
}
h1, h2, h2 {
    line-height: 1.2;
}
aside {
/* margin-top: -20px;
    margin-bottom: -10px; */
    margin-left: 20px;
    font-style: italic;
}
pre {
    overflow: auto;
    word-wrap: normal;
    white-space: pre;
    display: block;
    padding: 15px;
}
.newlink:after {
    content: "(new!)";
    padding-left: 5px;
    color: red;
    font-style: italic;
    display: inline-block;
    text-decoration: none;
}
footer hr {
    margin-top: 40px;
}
/* Inline code */
code.highlighter-rouge {
    color: green;
}
table {
  margin: 15px 0;
  padding: 0; }
  table tr {
    border-top: 1px solid #cccccc;
    background-color: white;
    margin: 0;
    padding: 0; }
    table tr:nth-child(2n) {
      background-color: #f8f8f8;
    }
    table tr th {
      font-weight: bold;
      border: 1px solid #cccccc;
      text-align: left;
      margin: 0;
      padding: 6px 13px; }
    table tr td {
      border: 1px solid #cccccc;
      text-align: left;
      margin: 0;
      padding: 6px 13px; }
    table tr th :first-child, table tr td :first-child {
      margin-top: 0; }
    table tr th :last-child, table tr td :last-child {
      margin-bottom: 0; }

/* Thanks to
https://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/
*/
sup, sub {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
}
sub {
  top: 0.4em;
}

@media (prefers-color-scheme: dark) {
  body {
    color: #dfdfdf;
    background: #101010;
  }
  div.navbar {
    background-color: #212121;
  }
  a[href] {
    color: #9e9eff;
  }
  a[href]:visited {
    color: #bebedf;
  }
  code.highlighter-rouge {
    color: #fe8019;
  }
  svg, object.svg, img.svg, img[src$=".svg"] {
    filter: invert(100%);
  }
  table tr {
    border-top: 1px solid #555;
    background-color: #121212;
  }
  table tr:nth-child(2n) {
    background-color: #212121;
  }
  li code, p code {
    color: #fe8019;
  }
}

/* Stuff for posts */
img.post-inline-image {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}
div.post-co-authors {
    padding-top: 10px;
}
/* TODO(max): See https://alexwlchan.net/2021/10/console-copying/ to disable
 * prompt selection in console blocks */

/* Begin: display a small horizontal bar before footnote elements if they
 * exist. */
div.footnotes {
  position: relative;
  display: inline-block;
  margin-top: 20px;
}

div.footnotes:before {
  /* Element only present when there are footnotes. */
  content: '';
  width: 50%;
  left: 25%;
  height: 2px;
  background: #b0b0b0;
  position: absolute;
  top: -1px;
}
/* End horizontal bar. */

a.footnote:before {
 content: "[";
}

a.footnote:after {
    content: "]";
}
figure object, figure svg, figure img {
  max-width: 100%;
  display: block;
  margin: auto;
}
figure figcaption {
  margin-top: 10px;
}
figcaption::before {
    counter-increment: figures;
    content: "Fig. " counter(figures) " - ";
    font-weight: bold;
}

/* gojekyll includes an <hr> in footnotes that we don't want */
div.footnotes hr {
  display: none;
}
