:root {
  color-scheme: light;
  --paper: #faf6e9;
  --ink: #36382e;
  --rust: #86432e;
  --display: "IM FELL English", Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  font: 100%/1.6 var(--display);
}
body { margin: 0; }
.reader-nav {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between;
  padding: .65rem max(1.2rem, calc((100% - 38rem) / 2)); background: var(--paper);
  border-bottom: 1px solid #cfc2a4; font: 1.05rem/1.3 var(--display);
}
article :is(h2, h3) { scroll-margin-top: 3.25rem; }
main {
  max-width: 38rem;
  margin: auto;
  padding: clamp(1.25rem, 5vw, 4rem) max(1.2rem, 4vw) 5rem;
  font-size: clamp(1.15rem, 1.06rem + .32vw, 1.32rem);
}
header { display: flow-root; margin-bottom: 3rem; }
header > a, summary { font: 1rem/1.5 var(--display); }
.author { margin: 3rem 0 .2rem; font: italic 1.4rem var(--display); }
h1, h2, h3 { font-family: var(--display); font-weight: normal; text-wrap: balance; }
h1 { margin: 0 0 2.2rem; font-size: clamp(3rem, 8vw, 5rem); line-height: 1; }
h2 { margin: 3.5rem 0 1.2rem; font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.12; clear: both; }
h3 {
  clear: both; margin: 2.1rem 0 .75rem; padding-top: .8rem;
  border-top: 1px solid #cfc2a4; color: #574736;
  font-size: clamp(1.15rem, 2.5vw, 1.42rem); line-height: 1.28; letter-spacing: .055em;
}
p { margin: 0 0 .9em; }
.epigraph { font-style: italic; padding-top: .65rem; }
.motto { font-size: .84rem; letter-spacing: .045em; }
.ebook-download { margin: -1rem 0 2rem; font-size: 1rem; }
.ebook-download small { display: block; margin-top: .3rem; color: #6c6754; font-size: .85rem; }
.inset { margin: .4em 0 .4em 1.35em; font-size: .95em; }
a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: .14em; }
.place { text-decoration-color: #b79b82; }
.passage-map { display: block; width: fit-content; margin-top: .4em; font: italic 1rem/1.4 var(--display); }
a:hover, a:focus-visible { color: #652b19; text-decoration-color: currentColor; }
figure { margin: .3rem 0 1rem; clear: both; }
figure.left, figure.right { width: 39%; max-width: 17rem; }
figure.left { float: left; margin-right: 1.35rem; }
figure.right { float: right; margin-left: 1.35rem; }
figure.wide { margin: 1.6rem auto; text-align: center; }
figure img { display: block; max-width: 100%; height: auto; margin: auto; mix-blend-mode: multiply; }
figure:not(.wide) img { max-height: 21rem; width: auto; object-fit: contain; }
article { display: flow-root; }
[id^="passage-"] { scroll-margin-top: 18vh; }
p:has(:target) { outline: 1px solid transparent; border-inline-start: 2px solid #b4996d; padding-inline-start: .8em; }
details { margin-top: 3rem; padding-top: .8rem; border-top: 1px solid #cfc2a4; }
summary { color: var(--rust); cursor: pointer; }
.contents h1 { margin-top: 2.25rem; margin-bottom: 1rem; }
.contents header { margin-bottom: 1rem; }
.contents nav > a { display: inline-block; margin-bottom: 1rem; font: italic 1.3rem var(--display); }
.contents details { margin: 0; padding: 0; }
.contents details:last-child { border-bottom: 1px solid #cfc2a4; }
.contents summary { padding: .75rem 0; font-size: 1.45rem; color: var(--ink); }
.contents summary::marker { color: var(--rust); font-size: .7em; }
.contents ol { margin: 0 0 1.1rem; padding: 0; list-style: none; columns: 2; column-gap: 1.6rem; }
.contents li { break-inside: avoid; }
.contents li a { display: block; padding: .3em .2em; font-size: 1rem; line-height: 1.4; text-decoration-color: #cbb99f; }
.contents a:target { background: #eee3c8; outline: 1px solid #cbb99f; }
@media (max-width: 36rem) { .contents ol { columns: 1; } }
pre { font: 1em/1.6 var(--display); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 34rem) {
  figure.left, figure.right { float: none; width: fit-content; max-width: 90%; margin: 1.2rem auto; }
  header figure.left { max-width: 9rem; }
  .author { margin-top: 2rem; }
}
