@charset "UTF-8";

html {
  font-size: 15px;
}

body {
  width: 87.5%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12.5%;
  font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua",
    Georgia, serif;
  background-color: #fffff8;
  color: #111;
  max-width: 1400px;
  counter-reset: sidenote-counter;
}

/* Adds dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #151515;
    color: #ddd;
  }
}

h1 {
  font-weight: 400;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  font-size: 3.2rem;
  line-height: 1;
}

h2 {
  /* font-style: italic; */
  font-weight: 400;
  margin-top: 2.1rem;
  margin-bottom: 1.4rem;
  font-size: 2.2rem;
  line-height: 1;
}

h3 {
  /* font-style: italic; */
  font-weight: 400;
  font-size: 1.7rem;
  margin-top: 2rem;
  margin-bottom: 1.4rem;
  line-height: 1;
}

hr {
  display: block;
  height: 1px;
  width: 55%;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

p.subtitle {
  font-style: italic;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  display: block;
  line-height: 1;
}

.numeral {
  font-family: et-book-roman-old-style;
}

.danger {
  color: red;
}

article {
  padding: 5rem 0rem;
}

section {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

p,
dl,
ol,
ul {
  font-size: 1.4rem;
  line-height: 2rem;
}

p {
  margin-top: 1.4rem;
  margin-bottom: 1.4rem;
  padding-right: 0;
  vertical-align: baseline;
}

section > p,
section > footer,
section > table {
  width: 55%;
}

/* 50 + 5 == 55, to be the same width as paragraph */
section > dl,
section > ol,
section > ul {
  width: 50%;
  -webkit-padding-start: 5%;
}

dt:not(:first-child),
li:not(:first-child) {
  margin-top: 0.25rem;
}

/* Links: replicate underline that clears descenders */

a {
  text-decoration: #c8c3c8 underline 1px;
  text-underline-offset: 0.3rem;
  transition: all linear .15s;
}

a:hover {
    text-decoration-color: #888;
  }

  @media (prefers-color-scheme: dark) {
    a {
      text-decoration-color: #656;
    }
    
    a:hover {
        text-decoration-color: #888;
      }
  }

a:link,
a:visited {
  color: inherit;
}

@media (max-width: 760px) {
  body {
    width: 84%;
    padding-left: 8%;
    padding-right: 8%;
  }

  hr,
  section > p,
  section > footer,
  section > table {
    width: 100%;
  }

  pre > code {
    width: 97%;
  }

  section > dl,
  section > ol,
  section > ul {
    width: 90%;
  }
}
