:root {
  color-scheme: light;
  --paper: #f6f1e7;
  --ink: #29251f;
  --muted: #645a4f;
  --accent: #7a3525;
  --rule: #a99c89;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 100%;
  background: var(--paper);
  color: var(--ink);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #211e1a;
  --ink: #eee5d6;
  --muted: #c2b6a5;
  --accent: #edb49d;
  --rule: #8a7d6b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #211e1a;
    --ink: #eee5d6;
    --muted: #c2b6a5;
    --accent: #edb49d;
    --rule: #8a7d6b;
  }
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.site-header, main, .site-footer {
  width: min(68ch, calc(100% - 2.5rem));
  margin-inline: auto;
}
.site-header { padding-top: 1.25rem; border-bottom: 1px solid var(--rule); }
.book-name { display: inline-flex; align-items: baseline; gap: .5rem; min-height: 44px; color: var(--ink); font-size: 1.5rem; text-decoration: none; }
.book-name span { font-size: 1rem; color: var(--muted); }
.reading-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; font-size: .95rem; }
.reading-tools a, .site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
button { min-height: 44px; padding: .4rem .75rem; border: 1px solid var(--muted); border-radius: 2px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.book-menu { margin-block: .5rem; }
summary { width: fit-content; min-height: 44px; padding-block: .65rem; cursor: pointer; }
.book-menu ol { list-style: none; margin: 0 0 1rem; padding: 0; }
.book-menu li + li { margin-top: .25rem; }
.book-menu a { display: block; min-height: 44px; padding-block: .5rem; line-height: 1.45; }
[aria-current="page"] { color: var(--ink); font-weight: bold; text-decoration-style: double; }
main { padding-block: clamp(1.75rem, 5vw, 3.75rem); }
.prose { font-size: clamp(1.0625rem, 1rem + .2vw, 1.1875rem); line-height: 1.8; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { margin: 0 0 1.5em; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.65rem); font-weight: normal; }
h2 { margin-top: 2.25em; font-size: 1.5em; }
h3 { margin-top: 2em; font-size: 1.15em; }
p { margin-block: 1.1em; }
ul, ol { padding-left: 1.4em; }
li { margin-block: .35em; }
blockquote { margin-inline: 1em 0; padding-left: 1em; border-left: 1px solid var(--rule); }
hr { margin-block: 2.5rem; border: 0; border-top: 1px solid var(--rule); }
img { max-width: 100%; height: auto; vertical-align: middle; }
.original-image { display: block; width: fit-content; max-width: 100%; margin-block: 1.75rem; }
.original-image img { display: block; }
pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--rule); }
.table-scroll { max-width: 100%; overflow-x: auto; margin-block: 1.75rem; padding-bottom: .75rem; }
table { width: 100%; border-collapse: collapse; font-size: .85em; line-height: 1.5; overflow-wrap: normal; }
th, td { padding: .55em .7em; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; min-width: 7ch; }
th { border-block: 1px solid var(--ink); }
.footnotes { margin-top: 3rem; font-size: .9em; }
.footnote-ref, .footnote-backref { padding: .15em; }
:target { scroll-margin-top: 1.5rem; }
.chapter-navigation { display: grid; gap: 1.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); line-height: 1.5; }
.chapter-navigation a { display: block; min-height: 44px; }
.chapter-navigation span { display: block; color: var(--muted); font-size: .85rem; margin-bottom: .4rem; }
.site-footer { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-bottom: 2rem; font-size: .9rem; }
.skip-link { position: absolute; top: .5rem; left: 1rem; padding: .75rem; background: var(--paper); z-index: 1; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
@media (min-width: 42rem) {
  .site-header { padding-top: 2.5rem; }
  .reading-tools { float: right; }
  .book-menu { clear: both; }
  .chapter-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}
@media print {
  :root, :root[data-theme], :root:not([data-theme="light"]) { --paper: white; --ink: black; --muted: #333; --accent: black; --rule: #777; color-scheme: light; }
  .site-header, .site-footer, .chapter-navigation, .skip-link { display: none; }
  main { width: auto; padding: 0; }
  .prose { font-size: 11pt; line-height: 1.5; }
  h1, h2, h3 { break-after: avoid; }
  img, tr { break-inside: avoid; }
  .table-scroll { overflow: visible; }
  table { font-size: 8pt; }
  th, td { min-width: 0; padding: .3em; }
  a { text-decoration: none; }
}
