html {
  font: 16px/1.25 Lato, sans-serif;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body, h1, h2, h3, p, ol, ul, li, th, td, address, blockquote, figure {
  margin: 0;
  padding: 0;
  font-weight: normal;
}

a {
  text-decoration: none;
}



/* COVER */

#cover {
  position: relative;
  width: 100%;
  height: 100vh; /* Fallback for older browsers prior to svh. */
  height: 100svh;
  background-size: cover;
  cursor: pointer;
}



/* HEADER */

header {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 5%;
}

h1 {
  margin-top: 1.5em;
  font-size: 1.66em;
}

@media (min-width: 500px) {
  h1 {
    font-size: 2em;
  }
}

#cover h1 {
  position: absolute;
  bottom: 1em;
  color: white;
  text-shadow: black 0 0 10px;
}

#cover h1.black {
  color: black;
  text-shadow: white 0 0 10px;
}



/* GENERAL TYPOGRAPHY */

h2, h3, p, ol, ul, address, blockquote, figure, figure img {
  margin-bottom: 0.66rem;
}

h2 {
  font-size: 1.66em;
  font-weight: bold;
  text-indent: -1px;
}

h3 {
  font-size: 1.33em;
  font-weight: bold;
}

:not(h2) + h3 {
  margin-top: 1.5rem;
}

p, li, address, blockquote {
  line-height: 1.5;
}

blockquote {
  font-style: italic;
}



/* TABLES */

table {
  border-collapse: collapse;
  margin-bottom: 1em;
  font-size: 0.8em;
}

table caption {
  caption-side: bottom;
  text-align: left;
}

th {
  text-align: left;
  font-weight: bold;
}

th, td {
  padding: 0.5em 1em 0.5em 0;
  border-bottom: 1px solid silver;
  vertical-align: top;
}

tr:last-child th, tr:last-child td {
  border-bottom: none;
}

.last-row-bold tr:last-child th, .last-row-bold tr:last-child td {
  font-weight: bold;
}



/* CONTENTS */

#contents {
  max-width: 500px;
  padding: 0 5%;
  margin: 2em auto;
}

#contents li {
  margin-bottom: 0.66em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#contents a {
  border-bottom: 1px solid #ddd;
  color: black;
}

#contents a:hover {
  border-bottom-color: #bbb;
  color: #666;
}



/* ARTICLES */

article {
  max-width: 500px;
  padding: 0 5%;
  margin: 3em auto;
}

address {
  font-size: 0.9em;
  font-style: normal;
  font-weight: bold;
  text-transform: uppercase;
}

address a {
  text-transform: none;
}

article ol {
  margin-left: 2.5em;
}

article ul {
  margin-left: 1.2em;
}

article li {
  margin-bottom: 0.33em;
}

article a {
  border-bottom: 1px solid #999;
  color: black;
}

article a:hover {
  border-bottom-color: #666;
  color: #666;
}

figure img {
  display: block;
  max-width: 100%;
  border-radius: 7px;
}

figcaption {
  font-size: 0.8em;
}

.can-scroll-sideways {
  overflow-x: auto;
}



/* DIRECT LINK ICONS */

h2 a.direct-link {
  position: absolute;
  margin-left: 0.33em;
  border-bottom: none;
  opacity: 0;
  transition: opacity 0.25s;
}

h2:hover a.direct-link {
  opacity: 0.5;
}

h2 a.direct-link img {
  width: 0.75em;
}



/* "BACKGROUND" AND "FAST FORWARD" */

aside {
  margin: 1.25em 0;
  border-radius: 5px;
  border-left: 15px solid #ddd;
  background: #eee;
  padding: 18px 10px 15px;
}

aside h3 {
  text-transform: uppercase;
  font-size: 0.9em;
}

aside p {
  font-size: 0.9em;
}

aside p:last-child {
  margin-bottom: 0;
}



/* FOOTER */

footer {
  margin: 2em auto 0;
  background: #444;
}

footer div {
  max-width: 500px;
  margin: auto;
  padding: 2em 5% 2em;
  line-height: 1.5;
  color: #ddd;
}

footer ul {
  margin-top: 0.66em;
  list-style-type: none;
}

footer li {
  display: inline;
  margin-right: 1.33em;
}

footer a {
  border-bottom: 1px solid #999;
  color: #ddd;
}

footer a:hover {
  border-bottom-color: #bbb;
  color: white;
}