body, html { height: 100% /* keep footer at bottom on short pages */; }
body {
  /* https://www.grputland.com/2012/08/font-stacks-that-look-similar-in.html#geo20120806 */
  font-family: Georgia, "Bitstream Charter", "Charis SIL", Utopia, "URW Bookman L", serif;
  color: black /* just for good measure */;
  background-color: white /* not always white on kde Firefox */;
  margin: 0;
}
body > div {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

a {
  color: #138;
  text-decoration-style: dotted;
}
a:visited { color: #511; }
a:active { text-decoration-style: solid; }

details { cursor: pointer; }

div.figure > img { /* should target <figure> when switching to html 5 #f7b84c */
  margin-bottom: 0;
}
div.figure > p {
  margin-bottom: 10px;
  font-style: italic;
}

hr {
  border: none;
  height: 2px;
  background: radial-gradient(black, transparent 70%);
}

h1 { font-size: 32px; }
h1:first-child { margin-top: 0; }

iframe[src*=youtube],
iframe[src*=vimeo] {
  background: white;
  width: 599px;
  height: 337px;
  border: 10px inset #eee;
  margin-left: -10px;
  margin-bottom: -4px
}

img {
  max-width: 100%;
  border: 1px solid #ddd;
  margin: 10px 0;
}

table {
  border-collapse: collapse; box-sizing: border-box;  /* align with paragraph left margin */
  margin: 10px 0 5px 0;
  padding: 0;
}
table, th, td { border: none; }
th, td {
  text-align: left;
  padding: 0 10px 5px 0;
}

pre {
  overflow: auto;
  font-size: smaller;
}
tt { white-space: pre; } /* inline code maybe something else in html 5 ticket #f7b84c0a40188a13 */

sup { line-height: 0 /* avoids footnotes adding line height */; }

:target {
  padding-left: 10px;
  margin-left: -10px;
  background-color: #fff8d3;
  border-left: 1px solid #ddd;
}
table:target td:first-child { /* footnotes */
  padding-left: 10px;
}

/* Sphinx image alignment classes */
.align-left  { float: left ; margin-right: 10px; }
.align-right { float: right; margin-left : 10px; }

ul.articles {
  padding: 0;
  list-style: none;
}
ul.articles li {
  /* Only Firefox implements ``text-indent: hanging;`` */
  text-indent: -16px;
  margin-left: 16px;
}
p.attribution { font-style: italic; font-size: small; }

body > div > header {
  position: relative;
  width: 100%;
  margin-left: 0;
  font-family:
    /* https://www.grputland.com/2012/08/font-stacks-that-look-similar-in.html#helv20120806 */
    Tahoma, "Droid Sans", Verdana, sans-serif;
  text-shadow:
    2px 2px 2px rgba(255,255,255,0.2),
    -2px 2px 2px rgba(255,255,255,0.2),
    2px -2px 2px rgba(255,255,255,0.2),
    -2px -2px 2px rgba(255,255,255,0.2);
  box-shadow: 0 -10px 10px white inset;
}
body > div:not([data-path="index.html"]) > header {
  background-image: url("/images/scream.jpg");
}
/* A little treat for those who have these fonts */
body > div:not([data-path="index.html"]) > header > hgroup > p {
  font-family: wingdings, Tahoma, "Droid Sans", Verdana, monospace;
}
body > div[data-path^="tag/"] > header > hgroup > p {
  font-family: webdings, Tahoma, "Droid Sans", Verdana, monospace;
}

body > div > header {
  display: flex;
  align-items: top;
}
body > div > header > hgroup {
  max-width: 300px;
  text-align: right;
  flex-grow: 1;
}
body > div > header > hgroup h1 {
  margin: 0;
  letter-spacing: -2px;
}
body > div > header a,
body > div > header a:visited {
  color: black;
  text-decoration-thickness: 1px;
}
body > div > header > hgroup h1 + p {
  margin-top: 0;
  font-size: small;
}

body > div > header > nav {
  text-align: right;
  flex-grow: 1;
  flex-shrink: 1;
  padding-top: 16px;
  margin-right: 10px;
}

body > div > main {
  width: 600px;
  max-width: calc(100% - 35px);
  margin: auto;
  flex-grow: 1;
  padding-left: 70px; /* enough space for the hanging h1, for narrow screens */;
}

body > div > footer {
  padding-bottom: 10px;
  text-align: center;
}

article h1,
article h2,
article h3,
article h4,
article h5 {
  margin-left: -2em;
  overflow: visible;
  white-space: nowrap;
  text-shadow: 2px 2px 2px white /* invisible except when section is highlighted via :target */;
}
@media (max-width: 700px) {
  article h1,
  article h2,
  article h3,
  article h4,
  article h5 {
    margin-left: -1em;
  }
  body > div > main { padding-left: 35px; }
}
article > header { margin-top: 40px; }
article > header > * {
  margin-top: 0;
  margin-bottom: 0;
}
article > header > small {
  font-style: italic;
  color: gray;
}
article > header { margin-bottom: 10px; }
article > header + p { text-indent: 0; }

article p { margin: 0; }
article p + p { text-indent: 40px; }
article footer p,
article table p,
article blockquote p {
  text-indent: 0;
  margin-bottom: 3px;
}
article h2 { margin-bottom: 5px; }

article blockquote {
  margin-left: -13px;
  padding-left: 10px;
  border-left: 3px solid black;
  font-style: italic;
}
article blockquote em { font-style: normal; }
article blockquote blockquote {
  margin-left: 0;
  border: none;
}
article details { margin: 10px -10px 10px 10px; }
article > footer hr {
  margin-left: -150px;
  padding-left: 150px;
  padding-right: 50px;
}
article > footer > details { margin: 15px 0; }
article > footer > details > p { margin-top: 10px; }
article > footer blockquote {
  border: none;
  padding: 5px 0;
  margin: 5px 0;
  font-style: unset;
}
article > footer > details > p:last-child { font-style: italic; }
article > footer > details > p:last-child em { font-style: normal; }


[data-path="pages/about.html"] p {
  text-indent: 0;
  margin-bottom: 5px;
}

[data-path="pages/reading-list.html"] td > p { width: 200px; }
[data-path="pages/reading-list.html"] td:first-child { text-align: left; }
[data-path="pages/reading-list.html"] td { text-align: center; }
[data-path="pages/reading-list.html"] td:last-child { text-align: right; }

[data-path="tags.html"] > main h1 { text-align: center; }
[data-path="tags.html"] > main {
  padding: 0;
  width: 700px;
}
[data-path="tags.html"] ul {
  padding: 0;
  text-align: center;
}
[data-path="tags.html"] li {
  display: inline-block;
  white-space: nowrap;
  margin-left: 10px;
  margin-top: 10px;
}