html {
  font: 16.5px/1.1 "Source Sans Pro", sans-serif;
  text-size-adjust: none;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
}

@media screen and (min-width: 600px) {
  html {
    font-size: 17px;
  }
}



/* RESET */

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

a {
  text-decoration: none;
  color: #2c7325;
}



/* WIDTH */

header div, nav ol, main, div.buy p, footer div {
  width: 90%;
  max-width: 540px;
  margin: auto;
}



/* HEADER */

header {
  padding-top: 2em;
  padding-bottom: 1em;
  background: #3fa535;
}

header a {
  font-size: 0.9em;
  font-weight: 600;
  color: white;
}

header button {
  float: right;
  width: 1em;
  height: 1em;
  padding: 0;
  border: none;
  background: url('../img/menu-open.svg') center / contain no-repeat;
  font-size: 0.9em; /* Match header text. */
  cursor: pointer;
}

header button[aria-expanded='false'] {
  background-image: url('../img/menu-closed.svg');
}

@media (min-width: 480px) {
  header a {
    font-size: 1.25em;
  }
  header button {
    margin-top: -2px;
    font-size: 1.25em; /* Match header text. */
  }
}



/* CHAPTER MENU */

nav {
  display: none;
  padding-top: 0.4em;
  padding-bottom: 0.5em;
  background: #eee;
}

nav ol {
  padding-left: 0;
  list-style: none;
}

nav li {
  font-size: 0.9em;
}

nav a {
  display: inline-block;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

nav a:hover {
  filter: brightness(1.5);
}



/* CONTENT */

main {
  margin-bottom: 1.5em;
}

main h1 {
  margin-top: 1em;
  margin-bottom: 0.75em;
  font-size: 1.9em;
  font-weight: 600;
}

main h2 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: 1.5em;
  font-weight: 600;
}

main h3 {
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  font-size: 1.25em;
  font-weight: 600;
}

main p {
  margin-bottom: 0.9em;
  line-height: 1.5;
}

main p.large {
  font-size: 1.2em;
}

main ol, main ul {
  margin-bottom: 0.9em;
  padding-left: 1.15em;
}

main li {
  line-height: 1.5;
  margin-bottom: 0.5em;
}

main ul.summary {
  font-size: 1.1em;
}

main ol.tight li, main ul.tight li {
  margin-bottom: 0;
}

main a {
  border-bottom: 1px solid #64c35a;
}

main figure {
  margin: 1.5em auto;
}

main figure.narrow {
  max-width: 360px;
}

main figure img {
  width: 100%;
}

main figcaption {
  margin-top: 0.75em;
  font-size: 0.9em;
  line-height: 1.25em;
}

div.next {
  margin-top: 2em;
  margin-bottom: 2.25em;
  text-transform: uppercase;
  font-weight: bold;
}

div.next a {
  border-bottom: none;
}

div.next a:hover {
  filter: brightness(1.5);
}



/* CONTENTS */

ol.contents {
  padding-left: 0;
  list-style: none;
}

ol.contents a {
  display: flex;
  align-items: center; /* Centre text vertically. */
  border-bottom: none;
  color: black;
}

ol.contents img {
  width: 20%;
  transition: filter 0.5s;
}

ol.contents a:hover img {
  filter: brightness(1.2);
}

ol.contents div {
  padding-left: 2.5%;
}

ol.contents h2 {
  transition: color 0.5s;
}

ol.contents p {
  margin: 0;
  line-height: 1.2;
  font-size: 0.9em;
  color: #666;
  transition: color 0.5s;
}

ol.contents a:hover h2,
ol.contents a:hover p {
  color: #2c7325;
}

@media (max-width: 599px) {
  ol.contents h2 {
    margin: 0;
    font-size: 1em;
  }
  ol.contents p {
    display: none; /* Hide descriptions in narrower layout. */
  }
}

@media (min-width: 600px) {
  ol.contents h2 {
    margin: -6px 0 0;
    font-size: 1.25em;
  }
}



/* COFFEE */

div.buy {
  padding-top: 1.5em;
  padding-bottom: 1.5em;
  background: wheat;
}

div.buy p {
  line-height: 1.4;
}

div.buy p a {
  border-bottom: 1px solid tan;
  font-weight: 600;
  color: sienna;
}



/* FOOTER */

footer {
  padding-top: 1.5em;
  padding-bottom: 2.5em;
  background: #eee;
}

footer p {
  margin-bottom: 0.9em;
  line-height: 1.4;
  font-size: 0.9em;
}

footer strong {
  font-weight: 600;
}

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



/* MISC */

p.note {
  position: relative;
  margin: 1.4em 0 1.4em 1.75em;
  font-size: smaller;
}

p.note::before {
  content: url('../img/note.svg');
  position: absolute;
  left: -1.75em;
  top: 1px;
  width: 1.25em;
}

p.url {
  margin-top: 1.1em;
  margin-bottom: 1.1em;
  padding: 7px 15px 5px;
  background-color: #f1f1f1;
  border: 1px solid #bbb;
  border-radius: 9px;
}

p.url strong {
  background-color: #c4e6c0;
}