:root {
  color-scheme: light;
  --page: #fcfaf1;
  --paper: #fffdf7;
  --ink: #092e4c;
  --body-ink: #263745;
  --red: #a01b19;
  --muted: #51657a;
  --rule: #ccd3d8;
  --reading-size: 20px;
  --ui: system-ui, sans-serif;
  --book: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--page);
  background-image: linear-gradient(#3b60851a 1px, transparent 1px), linear-gradient(90deg, #3b60851a 1px, transparent 1px);
  background-size: 24px 24px;
  font: 16px/1.5 var(--ui);
}
a { color: var(--ink); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 8px; padding: 8px 12px; background: var(--paper); z-index: 5; }
.skip-link:not(:focus) { clip-path: inset(50%); }
.site-header { background: var(--page); border-bottom: 1px solid var(--rule); }
.site-header-inner {
  max-width: 1192px;
  min-height: 66px;
  margin-inline: auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand img { display: block; width: 132px; height: auto; }
.profile-link { text-decoration: none; font-weight: 650; font-size: .92rem; padding: 8px 0; }
.reading-layout {
  width: min(100% - 48px, 1144px);
  margin: 36px auto 64px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(20px, 3.1vw, 44px);
  align-items: start;
}
.contents {
  position: sticky;
  top: 16px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
}
summary { cursor: pointer; }
.contents summary {
  font-weight: 740;
  padding: 16px;
  line-height: 1.35;
  list-style-position: inside;
}
.contents-count { float: right; color: var(--muted); font-weight: 500; font-size: .74rem; margin-top: 2px; }
.contents ol { list-style: none; padding: 0 8px 8px; margin: 0; }
.contents nav a {
  display: block;
  padding: 7px 8px;
  border-left: 2px solid transparent;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contents nav a:hover { background: #f2eee1; }
.contents nav [aria-current="location"] { border-color: var(--red); color: var(--red); background: #f8eee3; font-weight: 700; }
.contents .subsection a { padding-left: 23px; font-size: .89rem; }
.pdf-link { display: block; border-top: 1px solid var(--rule); padding: 12px 16px; font-size: .89rem; font-weight: 650; }
.reader { min-width: 0; }
.reader-toolbar {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  padding: 6px 9px 6px 14px;
  margin-bottom: 12px;
}
.reader-position { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; font-size: .78rem; color: var(--muted); font-weight: 650; }
.reader-position progress { width: 78px; height: 6px; accent-color: var(--red); }
.reader-actions { display: flex; gap: 4px; }
.reader-actions a, .reader-actions button {
  display: grid;
  place-items: center;
  min-width: 35px;
  min-height: 34px;
  padding: 0 4px;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--paper);
  font: 650 .88rem/1 var(--ui);
  text-decoration: none;
  cursor: pointer;
}
.reader-actions :is(a, button):hover { border-color: var(--ink); }
.reader-actions [aria-disabled="true"], .reader-actions :disabled { opacity: .42; cursor: default; }
.mobile-contents { display: none; }
.paper {
  background: var(--paper);
  padding: clamp(26px, 5vw, 68px);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--ink);
  color: var(--body-ink);
  margin-bottom: 22px;
  font: var(--reading-size)/1.68 var(--book);
  overflow-wrap: anywhere;
  scroll-margin-top: 67px;
  hyphens: auto;
}
.paper:focus:not(:focus-visible) { outline: none; }
.paper h1, .paper h2, .paper h3 { color: var(--ink); text-wrap: pretty; hyphens: manual; }
.paper h1 { font-size: clamp(30px, 4.7vw, 57px); line-height: 1.08; margin: .42em 0 .55em; letter-spacing: -.025em; }
.paper h2 { margin: 0 0 .9em; font-size: 1.65em; line-height: 1.17; }
.paper h3 { margin: 1.7em 0 .6em; font-size: 1.22em; line-height: 1.25; }
.paper p { margin: 0 0 .88em; }
.paper :is(ul, ol) { margin: 0 0 1em; padding-left: 1.6em; }
.paper li { margin-bottom: .4em; }
.paper .list-upper-roman { list-style-type: upper-roman; }
.paper .list-upper-alpha { list-style-type: upper-alpha; }
.paper sup { line-height: 0; margin-inline: .15em; }
.paper sup a { color: var(--red); text-decoration: none; font: 700 .9em var(--ui); }
.paper [id] { scroll-margin-top: 75px; }
.book-cover {
  position: relative;
  border-left: 3px solid var(--red);
  padding: 4px 0 4px clamp(14px, 3.2vw, 40px);
}
.book-cover .eyebrow { margin: 0; color: var(--red); font: 680 .78rem/1.5 var(--ui); letter-spacing: .075em; text-transform: uppercase; }
.book-cover .author { margin: 0; color: var(--ink); font-size: 1.06em; }
.paper .verse { margin: 0; }
.stanza-break { height: .8em; }
.turn { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 30px; }
.turn a { font: 650 .88rem/1.45 var(--ui); text-decoration: none; max-width: 48%; }
.turn a[rel="next"], .turn a:last-child { margin-left: auto; text-align: right; }
.cover .turn { justify-content: flex-start; border-top: 0; padding-top: 0; }
.cover .turn a { margin-left: 0; max-width: none; color: var(--paper); background: var(--ink); padding: 10px 16px; }
.cover .turn a:hover { background: var(--red); }
.original { border-top: 1px solid var(--rule); margin-top: 22px; padding-top: 14px; font-size: .85em; }
.original summary { font: 620 .86rem/1.5 var(--ui); color: var(--muted); }
.original[open] summary { margin-bottom: 17px; }
.original-title-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.original-title-table td { padding: .4em; vertical-align: top; }
.original-title-table td:empty { width: 10%; }
.original-contents { margin-top: 1em; }
.paper figure { margin: 1.5em 0; }
.paper figure > a { display: block; width: fit-content; max-width: 100%; margin-inline: auto; }
.paper figure img { display: block; max-width: 100%; height: auto; background: white; }
.paper figcaption, .paper p.caption { margin-top: .55em; font-size: .85em; line-height: 1.45; }
.paper figcaption { text-align: center; }
.figure-labels { margin-top: 8px; font-size: .85em; }
.paper .table-hint { display: none; }
.table-scroll { overflow: auto; margin: .75em 0 1em; }
.table-scroll table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: .82em; line-height: 1.36; hyphens: auto; overflow-wrap: normal; }
.table-scroll :is(th, td) { padding: .55em; border: 1px solid var(--rule); }
.table-scroll th { background: #f4f0e6; text-align: left; }
.table-scroll td { text-align: center; }
.table-scroll p { margin: 0; }
.footnotes li + li { padding-top: .65em; border-top: 1px solid var(--rule); margin-top: .95em; }
.footnotes a[href^="#snoska-v-"] { font: 640 .78rem/1.5 var(--ui); }
:is(.footnotes li, .paper sup a):target { background: #f7e8ba; }

@media (max-width: 820px) {
  .reading-layout { display: block; width: min(100% - 24px, 690px); margin-top: 14px; }
  .paper .table-hint { display: block; color: var(--muted); font: 600 .79rem/1.45 var(--ui); }
  .contents { position: static; max-height: none; margin-bottom: 10px; overflow: visible; }
  .contents .pdf-link { padding-block: 9px; }
  .mobile-contents { display: inline; font-weight: 720; }
  .reader-position { flex-direction: column; align-items: flex-start; gap: 1px; }
  .reader-position progress { display: none; }
}
@media (max-width: 440px) {
  .site-header-inner { padding-inline: 14px; min-height: 53px; }
  .brand img { width: 111px; }
  .profile-link { font-size: .81rem; }
  .paper { padding: 23px 19px; }
  .reader-toolbar { padding-left: 10px; }
  .reader-actions a, .reader-actions button { min-width: 40px; min-height: 39px; }
}
@media print {
  body, .paper { background: white; color: black; }
  .site-header, .contents, .reader-toolbar, .turn, .skip-link { display: none !important; }
  .reading-layout { display: block; width: 100%; margin: 0; }
  .paper { border: 0; margin: 0; padding: 0; font-size: 12pt; }
  .paper + .paper { break-before: page; }
  .paper figure, .paper table { break-inside: avoid; }
  .paper img { max-height: 16cm; object-fit: contain; }
}
