:root {
  --bg: #ebe5ce;
  --fg: #2e3037;
}

* {
  box-sizing: border-box;
  color: inherit;
  margin: 0;
  list-style: square;
}

html {
  font-size: 16px;
}

body {
  padding: 2.5rem;
  max-width: 45rem;
  background: var(--bg);
  color: var(--fg);
  font-family: serif;
  line-height: 1.55;
}

a {
  text-decoration: underline;
}

header {
  display: inline-block;
  vertical-align: top;
  width: 9rem;
  height: 10rem;
  margin: 0 1rem 1rem 0;
}

header .brand {
  display: block;
  text-decoration: none;
}

header .brand:hover h1 {
  text-decoration: underline;
}

header .brand img {
  display: block;
  height: 6rem;
  margin-bottom: 0.25rem;
}

header .brand h1 {
  font-size: 1.3rem;
  font-weight: normal;
  letter-spacing: 0.06em;
}

header .brand .tagline {
  font-style: italic;
}

.tagline {
  margin: 0;
}

nav {
  display: inline-block;
  width: 30rem;
  min-height: 10rem;
  margin: 0 0 1rem 0;
}

nav ul.buttons {
  display: inline-block;
  vertical-align: top;
  margin: 0 1rem 0 0;
  padding: 0;
}

nav ul.buttons > li {
  position: relative;
  margin: 0 0 0.4rem;
  list-style: none;
}

nav a.btn {
  display: block;
  width: 6rem;
  padding: 0 0.5rem;
  font-weight: bold;
  border-width: 1px 2px 2px 1px;
  border-style: solid;
  border-color: var(--fg);
  font-size: 0.8rem;
  text-decoration: none;
}

nav a.btn:hover {
  border-width: 2px 1px 1px 2px;
  text-decoration: none;
}

nav a.btn.active {
  border-width: 2px 1px 1px 2px;
  background: var(--fg);
  color: var(--bg);
}

nav a.btn.active::after {
  content: "▪";
  float: right;
}

nav .tree {
  margin-top: 0;
  width: 100%;
  max-width: 23rem;
  padding: 0.5rem;
  list-style: none;
  font-family: monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre;
  border: 1px dotted var(--fg);
  display: inline-block;
  vertical-align: top;
  /*overflow: scroll;*/
  /*scrollbar-color: var(--fg) var(--bg);*/
  /*scrollbar-width: thin;*/
}

nav .tree li {
  display: block;
}

nav .tree li a {
  text-decoration: none;
}

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

nav .tree li.active > a {
  font-weight: bold;
  text-decoration: underline;
}

main {
  clear: both;
  margin-top: 1rem;
  border-top: 1px solid var(--fg);
  padding-top: 2rem;
}

main h1,
main h2,
main h3 {
  font-weight: bold;
  line-height: 1.2;
}

main h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

main h3 {
  font-size: 1.1rem;
}

main a:hover {
  background: var(--fg);
  color: var(--bg);
}

a[target="_blank"] {
  text-decoration-style: dotted;
}

a[target="_blank"]::after {
  content: "↗";
}

a[target="_blank"]:hover {
  text-decoration: none;
}

.meta {
  text-align: right;
  margin-top: -0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
}

p,
ul,
ol {
  margin: 1rem 0;
}

hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px dashed var(--fg);
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--fg);
}

code {
  font-family: monospace;
  font-size: 0.9em;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  background: var(--fg);
}

pre code {
  color: var(--bg);
  font-size: 0.85rem;
}

img {
  max-width: 100%;
  height: auto;
}

figure {
  display: inline-block;
  margin: 0 0 2rem;
}

figure img {
  display: block;
}

figcaption {
  margin-top: 0.4rem;
  font-size: 0.8rem;
}

figcaption .original {
  float: right;
  text-decoration: underline;
  text-decoration-style: dotted;
}

figcaption .original::after {
  content: none;
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--fg);
  font-size: 0.85rem;
}