:root {
  --light-color: #444444;
  --visited-color: #880000;
  --link-color: #000088;
  --rule-color: #44444422;
  --serif: "Iowan Old Style", Charter, Garamond, Georgia, ui-serif, serif;
  --monospace: Consolas, ui-monospace, monospace;
}

* {
  margin: 0;
  padding: 0;
}

body {
  margin: 0 1em;
  font-family: var(--serif);
  font-size: 16px;
}

main {
  margin: 0 auto;
  /* Keep content width reasonable. */
  max-width: 40em;
  min-width: 15em;
}

article {
  margin: 1em auto;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.2;
}

h1 {
  margin-top: 2em;
  margin-bottom: 1.5em;
  font-size: 3em;
}

h1:first-child {
  margin-top: 0;
}

h2,
h3,
h4,
h5,
h6 {
  margin: 1.5em 0 1em 0;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.3em;
}

h4 {
  font-size: 1em;
}

h5 {
  font-size: 1em;
  font-style: italic;
}

h6 {
  font-size: 1em;
  font-weight: normal;
  font-style: italic;
}

p {
  margin: 1em 0;
  hanging-punctuation: first last force-end;
}

p:first-child {
  margin: 0;
}

aside {
  margin: 1em;
  float: right;
  font-size: 0.8em;
}

ul,
ol {
  list-style: outside;
  margin-left: 2em;
}

ul {
  list-style-type: circle;
}

li {
  margin: 0.5em 0;
}

a {
  text-decoration: inherit;
}

a:link {
  color: var(--link-color);
}

a:visited {
  color: var(--visited-color);
}

a:hover {
  text-decoration: none;
}

code {
  font-family: var(--monospace);
  font-size: 90%;
}

pre {
  margin: 1em 0 1em 2em;
  overflow: auto;
}

blockquote {
  margin: 1em 0 1em 2em;
  position: relative; /* To allow positioning of ::before. */
}

blockquote::before {
  content: "“";
  font-size: 4em;
  position: absolute;
  left: -0.5em;
  top: -0.25em;
}

img {
  display: block;
  margin: 1em auto;
  max-width: 90%;
  height: auto;
}

hr {
  border: 1px solid var(--rule-color);
}

table {
  margin: 1em auto;
}

td {
  text-align: left;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid var(--rule-color);
}

th, tr, td {
  border-collapse: collapse;
}

body > header {
  border-bottom: 1px solid var(--rule-color);
  text-align: center;
  font-size: 20px;
}

body > footer {
  border-top: 1px solid var(--rule-color);
  text-align: center;
  color: var(--light-color);
}

body > header ul,
body > footer ul {
  margin: 0;
  display: flex;
  justify-content: center;
  list-style-type: none;
}

body > header ul li {
  padding: 0 0.5em;
}

body > header ul li + li {
  border-left: 1px solid var(--rule-color);
}

body > footer ul li + li::before {
  content: " •";
}
