:root {
  --bg: #fbfaf8;
  --text: #1c1b19;
  --muted: #6f6b65;
  --rule: #e2ded7;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --text: #e8e5e0;
    --muted: #918c85;
    --rule: #2b2a28;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.66;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 14vh 1.5rem 22vh;
}

h1 {
  margin: 0 0 2.75rem;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
}

h1::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 1px;
  margin: 1.75rem auto 0;
  background: var(--rule);
}

p {
  margin: 0 0 1.55em;
  hyphens: auto;
}

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

/* Opening line gets a touch of typographic ceremony. */
main > p:first-of-type {
  margin-top: 0;
}

main > p:first-of-type::first-line {
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}

::selection {
  background: rgba(125, 125, 125, 0.24);
}

@media (max-width: 600px) {
  body {
    font-size: 18px;
  }

  main {
    padding: 8vh 1.35rem 14vh;
  }

  h1 {
    font-size: 1.6rem;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  main {
    padding: 0;
    max-width: none;
  }
}
