:root {
  --paper: #f3f1eb;
  --ink: #171714;
  --measure: 46rem;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Monaco,
    Consolas, "Liberation Mono", "Noto Sans Mono CJK JP", "BIZ UDGothic",
    "Yu Gothic", "Hiragino Kaku Gothic ProN", monospace;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

::selection {
  background: color-mix(in srgb, var(--ink) 14%, transparent);
}

.masthead {
  width: min(var(--measure), calc(100% - 2 * var(--pad)));
  margin: 0 auto;
  padding-top: clamp(4rem, 14vh, 9rem);
  padding-bottom: clamp(6rem, 18vh, 12rem);
}

.masthead h1,
.masthead p {
  margin: 0;
  font: inherit;
  font-weight: 400;
}

.masthead h1 {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  letter-spacing: 0.08em;
}

.masthead p {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

.poem {
  width: min(var(--measure), calc(100% - 2 * var(--pad)));
  margin: 0 auto;
}

.stanza {
  margin: 0 0 clamp(5rem, 11vh, 8rem);
}

.stanza.is-solitary {
  margin-top: clamp(8rem, 18vh, 13rem);
  margin-bottom: clamp(9rem, 22vh, 15rem);
}

.stanza.is-solitary:last-child {
  margin-top: clamp(12rem, 28vh, 20rem);
  margin-bottom: 0;
}

.stanza pre {
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.stanza code {
  display: block;
  min-width: max-content;
  font: inherit;
  font-size: clamp(0.78rem, 1.15vw, 0.92rem);
  line-height: 1.86;
  letter-spacing: -0.012em;
  white-space: pre;
  tab-size: 2;
}

.stanza:first-child {
  margin-top: 0;
}

.after {
  height: 100svh;
  min-height: 36rem;
}

@media (max-width: 640px) {
  .masthead {
    padding-top: 3.5rem;
    padding-bottom: 6.5rem;
  }

  .stanza {
    margin-bottom: 4.75rem;
  }

  .stanza.is-solitary {
    margin-top: 7rem;
    margin-bottom: 8rem;
  }

  .stanza.is-solitary:last-child {
    margin-top: 10rem;
  }

  .stanza code {
    font-size: 0.84rem;
    line-height: 1.8;
  }

  .after {
    height: 92svh;
    min-height: 28rem;
  }
}
