@font-face {
  font-family: "PT Serif Caption";
  font-style: normal;
  font-display: swap;
  src: url('./PTSerifCaption-Regular.ttf') format('truetype');
}
@font-face {
  font-family: "PT Serif Caption";
  font-style: italic;
  font-display: swap;
  src: url('./PTSerifCaption-Italic.ttf') format('truetype');
}
@font-face {
  font-family: "Merriweather";
  font-style: italic;
  font-display: swap;
  src: url('./Merriweather-BoldItalic.ttf') format('truetype');
}
:root {
  --title-size: clamp(1.7500rem, 1.2386rem + 2.2727vw, 3.0000rem);
  color-scheme: light dark;
  --section-space: clamp(2.5000rem, 1.8864rem + 2.7273vw, 4.0000rem);
  --space: clamp(1.0000rem, 0.6932rem + 1.3636vw, 1.7500rem);
  --body-size: clamp(1.1250rem, 1.0483rem + 0.3409vw, 1.3125rem);
  --red: light-dark(#b80f35, #e31646);
  --ink: light-dark(#29251f, #e5e7eb);
  --heading-size: clamp(1.3125rem, 1.1335rem + 0.7955vw, 1.7500rem);
  --paper: light-dark(#faf7ef, #111);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'PT Serif Caption', Georgia, serif;
  font-size: var(--body-size);
  line-height: 1.6;
}
main {
  max-width: 48rem;
  margin-inline: auto;
  padding: var(--space) max(1.25rem, env(safe-area-inset-left)) var(--section-space);
  &.home {
    max-width: 76rem;
  }
  &:has(> .title-imprint) {
    padding-top: var(--section-space);
  }
}
h1, h2, h3 {
  text-align: center;
  text-wrap: balance;
}
h1 {
  font-family: Merriweather, Georgia, serif;
  font-style: italic;
  font-size: var(--title-size);
  font-weight: 700;
  color: var(--red);
  line-height: 1.3;
  margin-block: var(--section-space) var(--space);
}
h2 {
  font-size: var(--heading-size);
  line-height: 1.4;
  margin-block: var(--section-space) var(--space);
  &:has(+ .sub-red) {
    margin-bottom: 0;
  }
  & + .sub-red {
    margin-top: 0.35em;
  }
  & .heading-small {
    font-size: 0.8em;
  }
  & .heading-initial {
    font-size: 1.2em;
  }
  & .heading-note {
    color: var(--red);
    font-size: 0.6em;
  }
}
p {
  margin-block: var(--space) 0;
  text-wrap: pretty;
  hanging-punctuation: first last;
}
.reading > p:not([class]), .notes > p:not([class]) {
  text-align: justify;
  text-align-last: start;
  hyphens: auto;
  hyphenate-limit-chars: 7 3 3;
}
.sub-red {
  color: var(--red);
  text-align: center;
  font-weight: bold;
  text-wrap: balance;
}
span.sub-red {
  font-size: 0.8em;
}
.stanza {
  font-style: italic;
  text-align: center;
  & > span {
    display: block;
    text-wrap: balance;
    margin-top: 0.35em;
  }
}
.epigraph {
  margin: var(--space) 0;
  padding: 0;
  text-align: right;
  font-style: italic;
  text-wrap: balance;
}
cite {
  display: block;
  font-style: italic;
}
.attribution {
  text-align: right;
}
.center {
  text-align: center;
}
a {
  color: var(--red);
  text-underline-offset: 0.15em;
}
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
img {
  max-width: 100%;
  height: auto;
}
.title-imprint {
  display: block;
  width: 50px;
  height: auto;
  margin-inline: auto;
  & + .date-title {
    margin-top: calc(var(--section-space) - 0.22em);
  }
  @media (prefers-color-scheme: dark) {
    filter: invert(1);
  }
}
.four-dot {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  color: var(--red);
  vertical-align: -0.05em;
  margin-inline: 0.2em;
}
.date-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28em;
  & .date-divider {
    width: 0.38em;
    height: 0.38em;
    flex-shrink: 0;
    margin: 0;
  }
}
.hymn-divider {
  text-align: center;
  margin-block: var(--space);
}
.book-title {
  text-align: center;
  margin-bottom: var(--section-space);
  & > img {
    display: block;
    width: clamp(13.7500rem, 8.9943rem + 21.1364vw, 25.3750rem);
    margin-inline: auto;
  }
  & .subtitle {
    font-weight: bold;
    text-transform: uppercase;
    text-wrap: balance;
  }
  & .author {
    font-weight: bold;
    margin-top: var(--section-space);
  }
}
.calendar {
  font-family: system-ui, sans-serif;
  margin-block: var(--section-space);
  max-width: 28rem;
  margin-inline: auto;
}
.today-link {
  text-align: center;
  text-wrap: balance;
  margin: 0 0 var(--section-space);
}
table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
caption {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
th {
  font-size: 0.875rem;
  font-weight: 500;
}
td {
  text-align: center;
  padding: 0.125rem;
  & a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    text-decoration: none;
    border-radius: 0.25rem;
    color: inherit;
    &:hover {
      background: light-dark(#eddfd6, #333);
    }
  }
}
a[aria-current=date] {
  background: #b80f35;
  color: white;
  font-weight: 700;
}
.notes {
  max-width: 44rem;
  margin-inline: auto;
}
.footnotes {
  font-size: 0.85em;
  line-height: 1.5;
  margin-top: var(--space);
  & hr {
    margin-block: var(--space) 1rem;
  }
  & ol {
    margin: 0;
    padding-inline-start: 1.5em;
  }
  & li + li {
    margin-top: 0.75em;
  }
  & p {
    margin: 0.35em 0 0;
  }
}
.footnote-back {
  font-family: system-ui, sans-serif;
  font-size: 0.8em;
  white-space: nowrap;
}
[id^=fnref-] {
  scroll-margin-top: 2rem;
}
hr {
  border: 0;
  border-top: 1px solid light-dark(#ccc, #555);
  margin-block: var(--space);
}