:root {
  --content-width: 700px;
  --footer-height: 80px;
  --background: #e4ffe4;
  --high-contrast: black;
  --lower-contrast: #464;
  --bright-transparent: #0f04;
  --faint: #aaa;
  --link-text: #948;
  --link-highlight: #fff8;
}

body {
  font-family: Verdana, sans-serif;
  background: url('/static/images/ferns.png');
  min-height: 100vh;
  font-size: 14px;
  color: var(--high-contrast);
  background-position: center bottom;
  background-repeat: repeat-x;
}

footer {
  height: var(--footer-height);
}

.page {
  background: var(--background);
  box-shadow: 0 0 10px black;
  border-bottom: 1px solid var(--lower-contrast);
  min-height: calc(100vh - var(--footer-height) - 2px);
}

nav {
  font-size: 90%;
  background: #eee8dd;
  padding: 0.9em 0;
  border-bottom: 2px solid #eee8dd;
  box-shadow: 0 1px 0 #ddd7cc, inset 0 -1px 0 #fff9dd;
}

nav ul {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

nav li {
  display: inline-block;
  margin: 0 0.2em;
}

a, a:visited {
  text-decoration: none;
  color: var(--link-text);
}

a:hover {
  background: var(--link-highlight);
}

article a {
  box-shadow: inset 0 -1px 0 #9484;
}

article p, blockquote {
  line-height: 130%;
}

nav li:before {
  content: '[';
  color: var(--faint);
  font-size: 0.75em;
}

nav li:after {
  content: ']';
  color: var(--faint);
  font-size: 0.75em;
}

article {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 3% 5rem 3%;
}

h1 {
  font-size: 200%;
  padding: 0.2rem 0;
  margin: 0 auto 2rem auto;
  max-width: 400px;
  color: var(--lower-contrast);
  border-bottom: 1px solid #888;
  text-align: center;
}

h2 {
  font-size: 150%;
  padding: 0.2rem 0;
  margin: 2rem 0 1rem 0;
  color: var(--lower-contrast);
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: bold;
}

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

h3 {
  font-size: 125%;
  margin: 2em auto 1em auto;
}

hr {
  clear: both;
  background-color: #888;
  height: 1px;
  border: none;
  margin: 1.5rem 0;
}

.clear-float {
  height: 0;
  clear: both;
}

blockquote {
  font-family: 'Georgia';
  font-size: 15px;
  font-style: italic;
  background: var(--bright-transparent);
  padding: 0 2em;
  color: #444;
}

blockquote cite {
  width: 100%;
  display: block;
  text-align: right;
}

blockquote cite:before {
  content: '—';
}

q:before {
  content: '“'
}

q:after {
  content: '”'
}

p {
  margin: 1em 0;
}

img {
  max-width: 100%;
}

article ul > li {
  list-style-type: disc;
  margin-left: 2em;
  margin-top: 0.5em;
}

article ol > li {
  list-style-type: arabic;
  margin-left: 2em;
  margin-top: 0.5em;
}

b, strong {
  font-weight: bold;
}

i, em {
  font-style: italic;
}

/*
 * The <x> tag is a hack to add custom styling to
 * Markdown elements. Next-sibling selectors are used so
 * that the element *after* the <x> tag is styled.
 */

.x {
  display: none;
}

@media (min-width: 600px) {
  .x.float-left+*, .x.frame.float-left+* {
    float: left;
    width: 50%;
    margin-left: 0;
    margin-top: 5px;
  }

  .x.float-right+*, .x.frame.float-right+* {
    float: right;
    width: 50%;
    margin-left: 0;
    margin-top: 5px;
  }
}

.x.frame+*, .frame {
  border: 2px solid white;
  box-shadow: -1px -1px 0 #666, 1px 1px 0 #666, -1px 1px 0 #666, 1px -1px 0 #666;
  margin: 0.5rem 2rem;
}

.x.center-block+* {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.x.center-table+* {
  display: table;
  margin-left: auto;
  margin-right: auto;
}

.x.center-text+* {
  text-align: center;
}

.x.no-list-markers+* > li {
  list-style-type: none;
  margin-left: 0;
}

.x.narrow-column+* {
  max-width: 150px;
}
