@font-face {
  font-family: "InterRand";
  src: local("Inter"), src("./inter.woff2") format("woff2");
  font-display: swap;
}
:root {
  --highlight-bg-green: #2b714f;
  --highlight: #333d4c;
  --article: #a572ad;
  --article2: #f2dea3;
  --gray05: rgba(128,128,128,0.5);
  --gray01: rgba(128,128,128,0.1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --highlight: #aaccff;
    --article: #dcc2dd;
  }
  body {
    color: #fff;
    background: #1c1c1c;
  }
  a.thisPage {
    color: #fff;
  }
}

* {
  box-sizing: border-box;
}
body {
    display: flex;
    flex-wrap: wrap;
    font-family: sans-serif;
}
header {
    flex-basis: 100%;
    flex-shrink: 0;
}
article {
    flex-basis: 60%;
    padding-left: 1em;
}
@media only screen and (max-width: 600px) {
  article {
    flex-basis: 99%;
    padding-left: 1em;
    padding-right: 1em;
  }
}
footer {
    flex-basis: 100%;
    flex-shrink: 0;
}
header nav {
    display: flex;
    justify-content: space-between;
}
header a,
nav a {
    text-decoration: none;
    color: inherit;
}
header h1 span {
    margin-left: 1em;
    font-size: 50%;
    font-style: italic;
}
body > nav {
    height: auto !important;
    flex-basis: content;
    padding-right: 1vw;
    min-width: 16em;
    height: 2em;
}
nav ul {
    display: flex;
    flex-direction: column;
    list-style-type: none;
    list-style-position: outside;
    padding-left: 0;
}
nav li ul {
    padding-left: 0.6em;
}
footer {
    display: flex;
    justify-content: space-between;
}

/* cut here to leave vanity behind */

body {
    margin: 0;
    padding: 0;
    font-size: 84%;
    font-family: InterRand, Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif;
    /*padding-top: 7em;*/
    padding-bottom: 3em;
}
a {
    text-decoration: none;
    color: var(--highlight);
}
a:hover {
    text-decoration: underline;
}
.thisPage {
    color: black;
}

/* header and top bar */
header {
    position: sticky;
    top: 0;
    width: 100%;
}
header nav {
    background-color: var(--highlight-bg-green);
    color: white;
    padding: 0.3em;
    border-bottom: 2px solid black;
    font-size: 91%;
}
header h1 {
    background-color: var(--article2);
    color: black;
    margin: 0;
    border-bottom: 2px solid black;
    font-weight: normal;
    padding: 0.25ex;
    font-size: 233%;
}
header a:hover {
    text-decoration: none;
}

/* sidebar */
body > nav {
    border-right: 1px solid #ddd;
    padding: 0;
}
body > nav > div {
    border-bottom: 1px solid #ddd;
}
body > nav > div a {
    color: var(--article);
    display: block;
    text-transform: capitalize;
    font-weight: bold;
    padding: 0.25em 1ex 0.25em 2mm;
    font-size: 102%;
}
body > nav > div a:hover {
    color: white;
    background-color: var(--article2);
    border-left: black solid 0.2em;
    text-decoration: none;
}
body > nav > div p {
    font-weight: bold;
    margin: 0 0 0.5em 2mm;
    padding: 1em 0 0;
}

/* main copy */
article {
    padding: 0.5ex 0 5vh 1vw;
}
article h1,
article h2 {
    color: var(--article);
    font-weight: bold;
    margin: 2em 0 0;
    border-bottom: 2px solid var(--article);
}
article h3,
article h4,
article h5 {
    color: var(--article);
    font-weight: bold;
    margin: 2em 0 0;
}
article h6,
article h7,
article h8 {
    color: var(--article);
    font-weight: bold;
    margin: 2em 0 0;
}
article a {
    color: var(--article);
}
article a:hover {
    color: var(--article2);
}
article pre {
    font-size: 1.2em;
}

/* footer */
footer {
    color: white;
    background-color: var(--article2);
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 3em;
}
footer a {
    color: darksalmon;
}
footer div {
    padding: 1em;
}

/* tables */
table {
    border: 1px solid var(--gray05);
    padding: 0;
}
th {
    color: white;
    background-color: var(--article2);
}
tr:nth-child(odd) {
    background-color: var(--gray01);
}

