/* F. D. Maurice — site styles
   Warm paper, iron-gall ink, and the rubric red of a Victorian prayer book. */

:root {
  --paper: #f7f2e8;
  --paper-2: #efe7d7;
  --paper-3: #e5d9c3;
  --ink: #241d16;
  --ink-2: #4f4337;
  --ink-3: #7c6e5f;
  --rule: #d8cab0;
  --accent: #8b2d22;
  --accent-ink: #fff8ef;
  --gilt: #dcbc72;
  --mark: #f3dc93;
  --shadow: 0 1px 2px rgb(60 40 20 / .08), 0 10px 30px -8px rgb(60 40 20 / .18);

  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --display: "Cormorant Garamond", "EB Garamond", "Palatino Linotype", Palatino, Georgia, serif;

  --text-size: 1.4375rem;
  --measure: 43.75rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16130f; --paper-2: #1e1a15; --paper-3: #2a241d;
    --ink: #ece4d4; --ink-2: #c8bba6; --ink-3: #978a77;
    --rule: #3b332a; --accent: #e3907c; --accent-ink: #1a120d;
    --gilt: #d9b96a; --mark: #6a5320;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 30px -8px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16130f; --paper-2: #1e1a15; --paper-3: #2a241d;
  --ink: #ece4d4; --ink-2: #c8bba6; --ink-3: #978a77;
  --rule: #3b332a; --accent: #e3907c; --accent-ink: #1a120d;
  --gilt: #d9b96a; --mark: #6a5320;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 30px -8px rgb(0 0 0 / .6);
  color-scheme: dark;
}

/* Reading text sizes, stepped through by the A buttons (site.js). With no
   size chosen the default is step 2, or step 1 on phones, where the column
   is narrow. */
@media (max-width: 40rem) { :root { --text-size: 1.25rem; } }
:root[data-size="0"] { --text-size: 1.0625rem; }
:root[data-size="1"] { --text-size: 1.25rem; }
:root[data-size="2"] { --text-size: 1.4375rem; }
:root[data-size="3"] { --text-size: 1.625rem; }
:root[data-size="4"] { --text-size: 1.8125rem; }
:root[data-size="5"] { --text-size: 2rem; }
:root[data-size="6"] { --text-size: 2.1875rem; }

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
/* Garamond has a small x-height, so everything is set a little larger than
   the browser default; all sizes are in rem and scale together. */
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (max-width: 40rem) { html { font-size: 106.25%; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--mark); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; }
button { font: inherit; color: inherit; }
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: 42rem; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.i { width: 1.2em; height: 1.2em; flex: none; }
.orn { width: 7.5rem; height: auto; margin: .9rem auto; color: var(--accent); opacity: .85; }
.smallcaps { font-variant-caps: small-caps; letter-spacing: .03em; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.1rem .6rem;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--paper);
  color: var(--ink); text-decoration: none;
  font-variant-caps: all-small-caps; letter-spacing: .08em; font-size: 1.15rem; line-height: 1.2;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--ink-3); background: var(--paper-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.08); }
.btn .i { width: 1.05em; height: 1.05em; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 0; }
.more { display: inline-flex; align-items: center; gap: .25rem; font-variant-caps: all-small-caps; letter-spacing: .08em; font-size: 1.15rem; text-decoration: none; }
.more .i { width: .95em; height: .95em; transition: transform .15s; }
.more:hover .i { transform: translateX(3px); }

/* ---------------------------------------------------------------- header / footer */

.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: relative; z-index: 5; }
.bar { display: flex; align-items: center; gap: 1rem; min-height: 3.75rem; }
.wordmark {
  font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap;
}
.wm-initials { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: .15rem; }
.site-nav a, .nav-icon {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .65rem; border-radius: 999px; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); text-decoration: none;
  font-variant-caps: all-small-caps; letter-spacing: .09em; font-size: 1.2rem; white-space: nowrap;
}
.site-nav a:hover, .nav-icon:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current] { color: var(--accent); }
.nav-icon .i { width: 1.15rem; height: 1.15rem; }
@media (max-width: 40rem) {
  .nav-icon-label { display: none; }
  .site-header .bar { gap: .4rem; }
  .site-nav { gap: 0; }
  .site-nav a, .nav-icon { padding: .4rem .4rem; font-size: 1.1rem; }
  .wordmark { font-size: 1.35rem; }
}
@media (max-width: 26rem) {
  .site-nav a[href$="about.html"] { display: none; }
}
@media (max-width: 24rem) {
  /* the wordmark already leads to the library */
  .site-nav a[href$="#library"] { display: none; }
}

.site-footer { border-top: 1px solid var(--rule); margin-top: 5rem; padding: 2.5rem 0 3rem; text-align: center; color: var(--ink-3); font-size: 1rem; }
.site-footer p { margin: .35rem 0; }
.footer-title { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.footer-title a { color: var(--ink); text-decoration: none; }
.footer-links a { color: var(--ink-2); }
.footer-note { font-size: .9rem; margin-top: 1rem !important; }

/* ---------------------------------------------------------------- home: hero */

.hero { padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--rule); background:
  radial-gradient(60rem 30rem at 85% 110%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
  var(--paper); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: end; }
.eyebrow { margin: 0 0 .4rem; font-variant-caps: all-small-caps; letter-spacing: .18em; color: var(--accent); font-size: 1.2rem; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.02; }
.hero-dates { font-family: var(--display); font-size: 1.5rem; color: var(--ink-3); margin: .6rem 0 0; letter-spacing: .08em; }
.lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink-2); margin: 1.3rem 0 0; max-width: 34rem; }

.hero-shelf { display: flex; flex-direction: column; min-width: 0; }
.shelf-books {
  display: flex; align-items: flex-end; justify-content: center; gap: 2px;
  height: 17rem; padding: 0 .4rem;
}
.spine {
  --w: 2.4rem; --h: 92%;
  --band-top: 1.55rem; --band-bottom: 1.8rem;   /* the gilt rules near each end */
  flex: 0 1 var(--w); min-width: 1.3rem; height: var(--h);
  container-type: inline-size;
  position: relative; display: block;
  border-radius: 3px 3px 1px 1px;
  background:
    linear-gradient(90deg, rgb(0 0 0 / .35), rgb(255 255 255 / .10) 18%, rgb(255 255 255 / 0) 40%, rgb(0 0 0 / .08) 70%, rgb(0 0 0 / .38)),
    repeating-linear-gradient(0deg, rgb(255 255 255 / .025) 0 2px, transparent 2px 4px),
    var(--cloth);
  box-shadow: inset 0 1.1rem 0 -1rem var(--gilt), inset 0 -1.1rem 0 -1rem var(--gilt), 0 1px 0 rgb(0 0 0 / .2);
  color: var(--gilt); text-decoration: none;
  transition: transform .2s ease, filter .2s;
}
.spine::before, .spine::after {
  content: ""; position: absolute; left: 12%; right: 12%; height: 1px; background: var(--gilt); opacity: .7;
}
.spine::before { top: var(--band-top); }
.spine::after { bottom: var(--band-bottom); }
.spine:hover, .spine:focus-visible { transform: translateY(-.6rem); filter: brightness(1.12); }
/* The title sits between the two gilt rules, a fixed gap from each, at every
   width; it reads bottom to top and is set against the upper rule. */
.spine-title {
  position: absolute; left: 50%;
  top: calc(var(--band-top) + .35rem); bottom: calc(var(--band-bottom) + .35rem);
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl; text-align: end;
  font-family: var(--display); font-weight: 600; font-size: clamp(.62rem, 40cqi, .9rem); letter-spacing: .05em;
  font-variant-caps: small-caps;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgb(0 0 0 / .45);
}
.spine-vol {
  position: absolute; left: 0; right: 0; bottom: .6rem; text-align: center; line-height: 1;
  font-family: var(--display); font-size: .8rem; font-weight: 600; text-shadow: 0 1px 0 rgb(0 0 0 / .45);
}
.shelf-plank {
  height: .8rem; margin: 0 -.5rem;
  background: linear-gradient(#8a6a44, #6b4f31 60%, #4a3621);
  border-radius: 2px; box-shadow: 0 8px 16px -6px rgb(40 25 10 / .5);
}
:root[data-theme="dark"] .shelf-plank { background: linear-gradient(#5a4430, #3e2e1f 60%, #2a1f15); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shelf-plank { background: linear-gradient(#5a4430, #3e2e1f 60%, #2a1f15); } }
.shelf-caption { text-align: center; margin: .8rem 0 0; color: var(--ink-3); font-variant-caps: all-small-caps; letter-spacing: .12em; font-size: 1.05rem; }

@media (max-width: 56rem) {
  .hero { padding-top: 2.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .shelf-books { height: 16.5rem; }
  .spine-title { font-size: clamp(.58rem, 40cqi, .9rem); letter-spacing: .02em; }
}

/* ---------------------------------------------------------------- home: quote */

.quote-band { padding: 4rem 0; text-align: center; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.quote { margin: 0 auto; max-width: 48rem; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  margin: 0; font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(1.55rem, 3.2vw, 2.25rem); line-height: 1.3; color: var(--ink);
  text-wrap: balance;
}
.quote blockquote p::before { content: "“"; }
.quote blockquote p::after { content: "”"; }
.quote figcaption .orn { margin: 1.3rem auto .6rem; width: 6rem; }
.quote cite { font-style: normal; font-variant-caps: all-small-caps; letter-spacing: .12em; font-size: 1.15rem; }
.quote cite a { color: var(--ink-2); text-decoration: none; }
.quote cite a:hover { color: var(--accent); }
.quote.is-changing blockquote, .quote.is-changing cite { opacity: 0; }
.quote blockquote, .quote cite { transition: opacity .5s; }

/* ---------------------------------------------------------------- home: library */

.library { padding: 4.5rem 0 1rem; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 1rem; }
.section-head h2, .intro-life h2 { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 500; }
.section-head p { color: var(--ink-2); margin: 0; }
.shelf-group { margin-top: 3.5rem; }
.shelf-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: .6rem; margin-bottom: 1.8rem; }
.shelf-head h3 { font-size: 1.9rem; font-weight: 500; }
.shelf-blurb { margin: 0; color: var(--ink-3); font-style: italic; font-size: 1.05rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 2.5rem 1.6rem; }
.card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.card .cover { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover .cover, .card:focus-visible .cover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 2px 4px rgb(0 0 0 / .15), 0 22px 40px -12px rgb(40 20 5 / .45); }
.card-body { padding-top: 1rem; }
.card-title { font-size: 1.32rem; font-weight: 600; line-height: 1.15; }
.card:hover .card-title { color: var(--accent); }
.card-vol { margin: .1rem 0 0; font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--ink-2); }
.card-year { margin: .35rem 0 0; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent); font-size: 1rem; }
.card-summary { margin: .45rem 0 0; font-size: 1.02rem; line-height: 1.45; color: var(--ink-2); }
.card-formats { margin: .6rem 0 0; font-size: .92rem; color: var(--ink-3); font-variant-caps: all-small-caps; letter-spacing: .1em; }
@media (max-width: 30rem) {
  .cards { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
  .card-title { font-size: 1.2rem; }
  .card-summary { display: none; }
}

/* ---------------------------------------------------------------- covers */

.cover {
  container-type: inline-size;
  position: relative; aspect-ratio: 2 / 3; width: 100%;
  border-radius: 3px 7px 7px 3px;
  background:
    linear-gradient(90deg, rgb(0 0 0 / .32) 0, rgb(0 0 0 / .08) 4%, rgb(255 255 255 / .08) 6%, transparent 12%),
    radial-gradient(120% 90% at 30% 10%, rgb(255 255 255 / .09), transparent 60%),
    repeating-linear-gradient(45deg, rgb(255 255 255 / .022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, rgb(0 0 0 / .05) 0 1px, transparent 1px 3px),
    var(--cloth);
  box-shadow: 0 1px 2px rgb(0 0 0 / .18), 0 14px 28px -12px rgb(40 20 5 / .45);
  color: var(--gilt);
  overflow: hidden;
}
.cover-frame {
  position: absolute; inset: 7cqi 7cqi 7cqi 10cqi;
  border: 1px solid color-mix(in srgb, var(--gilt) 75%, transparent);
  outline: 1px solid color-mix(in srgb, var(--gilt) 45%, transparent); outline-offset: -2.4cqi;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8cqi 6cqi; text-align: center; gap: 1.5cqi;
}
.cover .orn { width: 42cqi; margin: 1cqi auto; color: var(--gilt); opacity: .9; }
.cover-author {
  font-family: var(--display); font-weight: 600; font-variant-caps: all-small-caps;
  letter-spacing: .2em; font-size: 7.2cqi; text-shadow: 0 1px 0 rgb(0 0 0 / .4);
}
.cover-title {
  font-family: var(--display); font-weight: 600; line-height: 1.08; text-wrap: balance;
  text-shadow: 0 1px 0 rgb(0 0 0 / .45);
}
.cover-title-s { font-size: 14cqi; }
.cover-title-m { font-size: 11.5cqi; }
.cover-title-l { font-size: 9.6cqi; }
.cover-vol { font-family: var(--display); font-style: italic; font-size: 7.5cqi; margin-top: 1cqi; text-shadow: 0 1px 0 rgb(0 0 0 / .4); }

/* ---------------------------------------------------------------- home: ways, life */

.ways { padding: 4rem 0; margin-top: 4rem; background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ways-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; }
.way h3 { font-size: 1.55rem; margin: .7rem 0 .4rem; }
.way p { margin: 0; color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; }
.way-i { width: 2rem; height: 2rem; color: var(--accent); }
@media (max-width: 60rem) { .ways-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .ways-grid { grid-template-columns: 1fr; gap: 2rem; } }

.intro-life { padding: 4.5rem 0 0; text-align: center; }
.intro-life p { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); text-align: left; }
.intro-life p:last-child { text-align: center; }

/* ---------------------------------------------------------------- book page */

.book { padding-top: 1.5rem; }
.crumbs { font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: 1.05rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.book-head { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 3rem; align-items: start; margin: 1.5rem 0 3rem; }
.book-cover { position: sticky; top: 1.5rem; }
.book-info h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 500; line-height: 1.05; }
.book-vol { font-family: var(--display); font-style: italic; font-size: 1.7rem; margin: .3rem 0 0; color: var(--ink-2); }
.book-subtitle { font-style: italic; color: var(--ink-2); font-size: 1.25rem; margin: .8rem 0 0; max-width: 40rem; }
.facts { margin: 1.5rem 0 0; display: grid; gap: .45rem; max-width: 40rem; }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; border-top: 1px solid var(--rule); padding-top: .45rem; }
.facts dt { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--ink-3); }
.facts dd { margin: 0; }
.resume { margin: 1rem 0 0; font-style: italic; color: var(--ink-2); }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 3.5rem; align-items: start; }
.book-side { display: grid; gap: 1.5rem; position: sticky; top: 1.5rem; }
.description { font-size: 1.25rem; line-height: 1.6; }
.description p:first-child::first-letter {
  font-family: var(--display); font-weight: 600; color: var(--accent);
  float: left; font-size: 3.6em; line-height: .82; padding: .06em .08em 0 0;
}
@media (max-width: 60rem) {
  .book-head { grid-template-columns: 11rem minmax(0, 1fr); gap: 1.75rem; }
  .book-cover { position: static; }
  .book-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .book-side { position: static; }
}
@media (max-width: 36rem) {
  .book-head { grid-template-columns: 1fr; }
  .book-cover { width: 11rem; }
  .facts div { grid-template-columns: 1fr; gap: 0; }
}

.contents { margin-top: 3rem; }
.contents h2, .edition-notes h2 { font-size: 2rem; font-weight: 500; margin-bottom: 1rem; }
.toc, .toc ol { list-style: none; margin: 0; padding: 0; }
.toc > li { border-top: 1px solid var(--rule); }
.toc > li > a { display: block; padding: .55rem 0; font-size: 1.15rem; }
.toc ol { padding: 0 0 .5rem 1.4rem; }
.toc ol a { display: block; padding: .15rem 0; font-size: 1.02rem; }
.toc ol ol a { font-size: .98rem; color: var(--ink-2); }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.panel { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 10px; padding: 1.4rem 1.4rem 1.2rem; }
.panel-title { font-size: 1.5rem; font-weight: 600; margin-bottom: .6rem; }
.panel-title:not(:first-child) { margin-top: 1.4rem; }
.downloads { list-style: none; margin: 0; padding: 0; }
.downloads li { border-top: 1px solid var(--rule); padding: .55rem 0; }
.downloads li:first-child { border-top: 0; }
.downloads a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.downloads a:hover .dl-name { color: var(--accent); text-decoration: underline; }
.downloads .i { color: var(--accent); width: 1.1rem; height: 1.1rem; }
.dl-name { font-weight: 500; }
.dl-meta { font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.downloads p { margin: .1rem 0 0 1.65rem; font-size: .92rem; color: var(--ink-3); line-height: 1.35; }
.modern-panel .prose { font-size: 1.02rem; }

.edition-notes { margin-top: 4rem; border-top: 1px solid var(--rule); }
.edition-notes summary { cursor: pointer; list-style: none; padding: 1.4rem 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.2rem; }
.edition-notes summary::-webkit-details-marker { display: none; }
.edition-notes summary h2 { margin: 0; display: inline; }
.edition-notes summary h2::before { content: "▸ "; color: var(--accent); font-size: .7em; vertical-align: .15em; }
.edition-notes details[open] summary h2::before { content: "▾ "; }
.summary-hint { color: var(--ink-3); font-style: italic; }
.edition-notes .prose { max-width: 44rem; padding-bottom: 1rem; }

/* ---------------------------------------------------------------- prose pages */

.prose { line-height: 1.6; }
.page .prose { font-size: 1.2rem; }
.prose p { margin: 0 0 1em; }
.prose h2 { font-size: 1.9rem; font-weight: 500; margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: 1.45rem; margin: 1.8rem 0 .6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .25rem 0; }
.prose blockquote { margin: 1.4rem 0; padding: 0 0 0 1.2rem; border-left: 2px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose.small { font-size: 1.05rem; }
.prose.small h3 { font-size: 1.3rem; }
.page { padding-top: 3rem; }
.page-head { text-align: center; margin-bottom: 2rem; }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 3.6rem); font-weight: 500; }
.life-page .prose > p:first-of-type, .about-page .prose > p:first-of-type { font-size: 1.3rem; color: var(--ink-2); }

.timeline { margin: 1.5rem 0 2rem; border-left: 1px solid var(--rule); padding-left: 1.4rem; }
.timeline p { position: relative; margin: 0 0 .85rem; }
.timeline p::before { content: ""; position: absolute; left: -1.72rem; top: .6em; width: .6rem; height: .6rem; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.timeline strong { font-family: var(--display); font-size: 1.2em; color: var(--accent); margin-right: .35rem; font-variant-numeric: oldstyle-nums; }

.works { margin-top: 3rem; border-top: 1px solid var(--rule); padding-top: 2rem; }
.works h2 { font-size: 1.9rem; font-weight: 500; margin-bottom: 1rem; }
.works-list { list-style: none; margin: 0; padding: 0; }
.works-list li { display: grid; grid-template-columns: 3.5rem 1fr; gap: .8rem; padding: .35rem 0; border-top: 1px dotted var(--rule); }
.w-year { color: var(--ink-3); font-variant-numeric: oldstyle-nums tabular-nums; }

/* ---------------------------------------------------------------- search */

.search-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.search-box { flex: 1 1 18rem; display: flex; align-items: center; gap: .5rem; border: 1px solid var(--rule); background: var(--paper-2); border-radius: 999px; padding: 0 1rem; }
.search-box:focus-within { border-color: var(--accent); }
.search-box .i { color: var(--ink-3); }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1.2rem; padding: .65rem 0; color: var(--ink); outline: none; }
.search-form select { flex: 0 1 14rem; min-width: 0; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px; padding: .6rem 1rem; }
.search-help { color: var(--ink-3); font-size: .98rem; font-style: italic; margin: .8rem 0 2rem; }
.results-summary { color: var(--ink-3); font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: 1.05rem; border-bottom: 1px solid var(--rule); padding-bottom: .5rem; }
.result-book { margin-top: 2rem; }
.result-book h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: .4rem; }
.result-book h2 span { font-family: var(--serif); font-size: .95rem; font-weight: 400; color: var(--ink-3); margin-left: .4rem; }
.result { display: block; padding: .8rem 0; border-top: 1px dotted var(--rule); color: var(--ink); text-decoration: none; }
.result:hover .result-where { color: var(--accent); }
.result-where { display: block; font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--ink-3); font-size: 1rem; }
.result-text { display: block; line-height: 1.5; margin-top: .15rem; }
mark { background: var(--mark); color: inherit; padding: 0 .08em; border-radius: 2px; }
.more-results { margin-top: .8rem; }
.more-results button { background: none; border: 1px solid var(--rule); border-radius: 999px; padding: .35rem 1rem; cursor: pointer; font-variant-caps: all-small-caps; letter-spacing: .08em; }

/* ---------------------------------------------------------------- reader */

.reading { background: var(--paper); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.reader-bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.reader-bar .bar { min-height: 3.25rem; gap: .4rem; padding: 0 .75rem; max-width: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none;
  border: 0; border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; background: none; }
.icon-btn .i { width: 1.25rem; height: 1.25rem; }
.aa { font-family: var(--display); font-weight: 600; line-height: 1; }
.aa-s { font-size: 1rem; } .aa-l { font-size: 1.4rem; }
.reader-home { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.reader-book {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-2); text-decoration: none; font-style: italic; font-size: 1.1rem;
  padding-left: .6rem; margin-left: .2rem; border-left: 1px solid var(--rule);
}
.reader-book span { font-style: normal; color: var(--ink-3); }
.reader-book:hover { color: var(--accent); }
.reader-tools { display: flex; align-items: center; gap: .1rem; }
.version { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; margin-right: .35rem; }
.version > * {
  padding: .15rem .7rem .2rem; border-radius: 999px; text-decoration: none; color: var(--ink-2);
  font-variant-caps: all-small-caps; letter-spacing: .08em; font-size: 1.05rem; line-height: 1.3;
}
.version a:hover { background: var(--paper-2); color: var(--ink); }
.version [aria-current] { background: var(--ink); color: var(--paper); }
.version .disabled { color: var(--ink-3); opacity: .6; cursor: not-allowed; }
@media (max-width: 36rem) {
  .reader-home { display: none; }
  .reader-book { border-left: 0; padding-left: .2rem; font-size: 1rem; }
  .version > * { padding: .1rem .5rem .15rem; font-size: .98rem; }
  .icon-btn { width: 2.1rem; height: 2.1rem; }
  .reader-tools [data-step="-1"] { display: none; }
}

.drawer {
  position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(24rem, 88vw);
  background: var(--paper); border-right: 1px solid var(--rule); box-shadow: var(--shadow);
  overflow-y: auto; padding: 0 0 2rem;
  transform: translateX(-102%); transition: transform .22s ease;
}
.drawer.open { transform: none; }
.drawer[hidden] { display: block; visibility: hidden; }
.drawer.open[hidden] { visibility: visible; }
.drawer-head { position: sticky; top: 0; background: var(--paper); display: flex; align-items: center; gap: .5rem; padding: .6rem .6rem .6rem 1.2rem; border-bottom: 1px solid var(--rule); }
.drawer-book { flex: 1; font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; color: var(--ink); text-decoration: none; }
.drawer-book span { display: block; font-style: italic; font-weight: 500; font-size: 1rem; color: var(--ink-3); }
.drawer-ed { margin: .8rem 1.2rem 0; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent); }
.drawer-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.drawer-list li > * { display: block; padding: .38rem 1.2rem; line-height: 1.3; color: var(--ink); text-decoration: none; font-size: 1.02rem; border-left: 3px solid transparent; }
.drawer-list a:hover { background: var(--paper-2); }
.drawer-list a.current { border-left-color: var(--accent); background: var(--paper-2); color: var(--accent); }
.drawer-list .d1 > * { padding-left: 2.1rem; font-size: .98rem; }
.drawer-list .d2 > * { padding-left: 3rem; font-size: .95rem; color: var(--ink-2); }
.drawer-list .d3 > * { padding-left: 3.8rem; font-size: .92rem; color: var(--ink-2); }
.drawer-list .missing > * { color: var(--ink-3); font-style: italic; }
.drawer-foot { margin: 1.2rem 1.2rem 0; font-size: .95rem; color: var(--ink-3); }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgb(20 12 5 / .35); }
.scrim[hidden] { display: none; }

.reader { max-width: calc(var(--measure) + 2.5rem); margin: 0 auto; padding: 3.5rem 1.25rem 2rem; }
.chapter-head { text-align: center; margin-bottom: 2.2rem; }
.page-crumbs { margin: 0 0 .8rem; font-variant-caps: all-small-caps; letter-spacing: .12em; color: var(--ink-3); font-size: 1.05rem; }
.chapter-head h1 { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 500; line-height: 1.12; text-wrap: balance; }
.chapter-head h1.long { font-size: clamp(1.55rem, 3.4vw, 2.05rem); line-height: 1.2; }
.chapter-head .orn { margin-top: 1.3rem; }
.modern-note { background: var(--paper-2); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 6px; padding: .8rem 1rem; margin: 0 0 2rem; font-size: 1rem; color: var(--ink-2); line-height: 1.45; }

.text { font-size: var(--text-size); line-height: 1.62; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (min-width: 40rem) { .text { text-align: justify; } }
.text p { margin: 0; text-indent: 1.4em; position: relative; }
.text :is(h2, h3, h4, h5, h6, blockquote, .center, ol, ul, hr, div) + p,
.text > p:first-child, .text blockquote p, .text li p, .text .center p { text-indent: 0; }
.text :is(h2, h3, h4, h5, h6, blockquote, .center, ol, ul, div) + p { margin-top: .9em; }
.text h2 { font-size: 1.45em; font-weight: 500; text-align: center; margin: 2.4em 0 1em; text-wrap: balance; }
.text h3 { font-size: 1.2em; font-weight: 600; text-align: center; margin: 2em 0 .8em; font-variant-caps: small-caps; letter-spacing: .03em; }
.text h4, .text h5, .text h6 { font-size: 1.05em; font-style: italic; font-weight: 600; text-align: center; margin: 1.8em 0 .7em; }
.text blockquote { margin: 1.1em 0 1.1em 1.4em; font-size: .93em; color: var(--ink-2); text-align: left; }
.text blockquote p + p { margin-top: .5em; }
.text .center { text-align: center; margin: .6em 0; }
.text .center + .center { margin-top: 0; }
.text ol, .text ul { margin: .9em 0; padding-left: 1.6em; }
.text li { margin: .35em 0; }
.text ol li p, .text ul li p { margin: 0; }
.text hr { border: 0; text-align: center; margin: 1.6em 0; }
.text hr::after { content: "⁂"; color: var(--ink-3); }
.text .smallcaps { letter-spacing: .04em; }
.text .footnote-ref { text-decoration: none; font-size: .7em; vertical-align: super; line-height: 0; padding: 0 .1em; font-weight: 600; }
.text .footnote-ref sup { font-size: inherit; vertical-align: baseline; }
.text .footnotes { margin-top: 3em; padding-top: 1em; border-top: 1px solid var(--rule); font-size: .85em; text-align: left; }
.footnotes-title { font-size: 1.2em !important; margin: 0 0 .6em !important; text-align: left !important; font-variant-caps: all-small-caps; letter-spacing: .1em; font-weight: 600; }
.text .footnotes ol { padding-left: 1.4em; }
.text .footnotes li p { text-indent: 0; }
.text .footnote-back { text-decoration: none; margin-left: .3em; }
.text p:target, .text li:target { background: color-mix(in srgb, var(--mark) 28%, transparent); border-radius: 3px; box-shadow: 0 0 0 .35em color-mix(in srgb, var(--mark) 28%, transparent), -.9em 0 0 -.6em var(--accent); }
.pl {
  position: absolute; left: -1.6em; top: 0; width: 1.2em; text-indent: 0; text-align: center;
  color: var(--ink-3); text-decoration: none; opacity: 0; transition: opacity .15s; font-size: .8em; line-height: 2;
}
@media (hover: hover) { .text p:hover > .pl { opacity: .7; } .pl:hover { opacity: 1 !important; color: var(--accent); } }

.titlepage { text-align: center !important; padding: 2rem 0 1rem; }
.titlepage p { text-indent: 0 !important; margin: .5em 0 !important; letter-spacing: .03em; }
.titlepage h1 { font-size: 2.2em; font-weight: 500; margin: 0 0 1em; text-wrap: balance; }
.titlepage blockquote { text-align: left; margin: 2em auto; max-width: 30em; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 4rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.pager a { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s; }
.pager a:hover { border-color: var(--ink-3); background: var(--paper-2); }
.pager-next { text-align: right; align-items: flex-end; grid-column: 2; }
.pager-dir { display: inline-flex; align-items: center; gap: .2rem; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent); font-size: 1rem; }
.pager-dir .i { width: .95rem; height: .95rem; }
.pager-title { font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.reader-foot { text-align: center; margin: 2.5rem 0 0; color: var(--ink-3); font-style: italic; }
.reader-foot a { color: var(--ink-3); }

.note-pop {
  position: absolute; z-index: 25; max-width: min(28rem, calc(100vw - 2rem));
  background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow);
  padding: .8rem 1rem; font-size: 1.08rem; line-height: 1.5; color: var(--ink-2);
}
.note-pop p { margin: 0 0 .5em; text-indent: 0; }
.note-pop p:last-child { margin: 0; }

@media print {
  .reader-bar, .drawer, .scrim, .progress, .pager, .site-header, .site-footer, .pl { display: none !important; }
  .reader { padding-top: 0; }
  body { background: #fff; color: #000; }
}
