@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/alegreya.woff2") format("woff2");
}

@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/alegreya-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/caveat.woff2") format("woff2");
}

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

body {
  margin: 0;
  background: #e6edf1;
  color: #2d2a32;
  font-family: Alegreya, Georgia, serif;
  line-height: 1.6;
}

a {
  color: #2a4a8a;
  text-underline-offset: 0.15em;
}

a:hover {
  color: #b23a3a;
}

a:focus-visible {
  outline: 2px solid #2a4a8a;
  outline-offset: 2px;
}

.wrap {
  max-width: 62em;
  margin: 2.5em auto;
  background: #fffdf8;
  box-shadow: 0 1px 2px rgba(40, 50, 70, 0.12), 0 8px 24px rgba(40, 50, 70, 0.08);
}

/* the airmail edge */

.wrap::before {
  content: "";
  display: block;
  height: 9px;
  background: repeating-linear-gradient(135deg, #c8483f 0 14px, #fffdf8 14px 22px, #2d58a6 22px 36px, #fffdf8 36px 44px);
}

.masthead {
  padding: 2.2em 3em 1.4em;
  border-bottom: 1px solid #e7e1d4;
}

.name {
  font-family: Caveat, cursive;
  font-size: 3.2em;
  font-weight: 700;
  line-height: 1;
  color: #2a4a8a;
  text-decoration: none;
}

.tagline {
  margin: 0.3em 0 1em;
  font-style: italic;
  color: #6f6873;
}

.links a {
  margin-right: 1.4em;
  font-family: Caveat, cursive;
  font-size: 1.35em;
  color: #6f6873;
  text-decoration: none;
}

.links a:hover,
.links a[aria-current] {
  color: #2a4a8a;
  text-decoration: underline;
}

.body-and-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15em;
  gap: 3em;
  padding: 2.4em 3em 3em;
}

main {
  min-width: 0;
}

/*
  A post's text sits on ruled paper. Its lines and the gaps between paragraphs keep to the rule, 1.6rem, so the text
  stays on the lines however long the post runs; a paragraph skips a line, as it would in a letter.
*/

.leaf-text {
  line-height: 1.6rem;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 calc(1.6rem - 1px),
    rgba(45, 88, 166, 0.11) calc(1.6rem - 1px) 1.6rem
  );
}

.leaf-title {
  margin: 0;
  font-size: 1.7em;
  line-height: 1.2;
}

.leaf-title a {
  color: #2d2a32;
  text-decoration: none;
}

.leaf-title a:hover {
  color: #2a4a8a;
}

.leaf-day {
  margin: 0.15em 0 1.2em;
  font-family: Caveat, cursive;
  font-size: 1.3em;
  line-height: 1.3;
  color: #b23a3a;
}

.leaf-text p,
.leaf-text ul,
.leaf-text ol,
.leaf-text blockquote {
  margin: 0 0 1.6rem;
}

.leaf-text p:last-child {
  margin-bottom: 0;
}

.leaf blockquote {
  padding-left: 1em;
  border-left: 3px solid #d8cfbd;
  font-style: italic;
}

.leaf blockquote p:last-child {
  margin-bottom: 0;
}

.leaf-foot {
  margin: 1.2em 0 0;
}

.leaf-foot a {
  font-family: Caveat, cursive;
  font-size: 1.2em;
}

.latest .leaf + .leaf {
  margin-top: 2.8em;
  padding-top: 2.4em;
  border-top: 1px dashed #d8cfbd;
}

/* comments, each on its own slip */

.responses {
  margin-top: 2em;
  padding-top: 1.4em;
  border-top: 1px dashed #d8cfbd;
}

.responses h2 {
  margin: 0 0 0.8em;
  font-family: Caveat, cursive;
  font-size: 1.6em;
  color: #2a4a8a;
}

.responses ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.response {
  margin-bottom: 1em;
  padding: 0.9em 1.1em 0.2em;
  background: #f7f2e7;
  border-radius: 3px;
}

.response p {
  margin: 0 0 0.7em;
}

.response-by a {
  margin-left: 0.4em;
  font-size: 0.85em;
  color: #6c6570;
  text-decoration: none;
}

.response-by a:hover {
  text-decoration: underline;
}

.shut {
  font-style: italic;
  color: #6c6570;
}

.turn {
  display: flex;
  justify-content: space-between;
  gap: 1.5em;
  margin-top: 2.6em;
}

.turn-back::before {
  content: "\2190\00a0";
}

.turn-on {
  margin-left: auto;
  text-align: right;
}

.turn-on::after {
  content: "\00a0\2192";
}

.archive h1,
.page h1 {
  margin: 0 0 0.8em;
  font-size: 1.7em;
  line-height: 1.2;
}

.archive h2 {
  margin: 0 0 0.3em;
  font-family: Caveat, cursive;
  font-size: 1.8em;
  color: #2a4a8a;
}

.shelf {
  margin: 0 0 2em;
  padding: 0;
  list-style: none;
}

.shelf time {
  display: inline-block;
  min-width: 4.8em;
  color: #6c6570;
}

/* the sidebar, like notes left on the desk */

.side-box {
  margin-bottom: 1.6em;
  padding: 1em 1.1em;
  background: #fbf7ec;
  border: 1px solid #ece4d2;
  font-size: 0.9em;
}

.side-box:nth-child(odd) {
  transform: rotate(-0.6deg);
}

.side-box:nth-child(even) {
  transform: rotate(0.5deg);
}

.side-box h2 {
  margin: 0 0 0.4em;
  font-family: Caveat, cursive;
  font-size: 1.6em;
  line-height: 1.1;
  color: #b23a3a;
}

.side-box p,
.side-box ul {
  margin: 0;
}

.side-box ul {
  padding-left: 1.1em;
}

.years ul {
  padding: 0;
  list-style: none;
  columns: 2;
}

.colophon {
  padding: 1.2em 3em 1.6em;
  border-top: 1px solid #e7e1d4;
  font-size: 0.8em;
  color: #6c6570;
}

.colophon p {
  margin: 0;
}

@media (max-width: 760px) {
  html {
    font-size: 100%;
  }

  .wrap {
    margin: 0;
  }

  .masthead,
  .body-and-side,
  .colophon {
    padding-left: 1.2em;
    padding-right: 1.2em;
  }

  .name {
    font-size: 2.8em;
  }

  .body-and-side {
    grid-template-columns: minmax(0, 1fr);
    gap: 2em;
  }

  .side-box:nth-child(odd),
  .side-box:nth-child(even) {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .side-box {
    transition: transform 0.2s ease;
  }

  .side-box:hover {
    transform: none;
  }
}
