:root {
  --blue: #193c66;
  --deep: #122e50;
  --ink: #253343;
  --muted: #576879;
  --paper: #f6f8fb;
  --line: #d9e1e9;
  --gold: #b28b36;
  --white: #fff;
  font-family: Optima, Candara, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--blue);
  text-underline-offset: 4px;
}
a:hover {
  color: #845f14;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
}
button:hover,
.button:hover {
  background: var(--deep);
  color: white;
}
.button.secondary {
  color: var(--blue);
  background: white;
}
input,
select {
  border: 1px solid #a8b8c8;
  background: white;
  border-radius: 4px;
  color: var(--ink);
  padding: 12px;
  min-width: 0;
}
select {
  padding: 8px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: var(--blue);
  margin-top: 0;
}
h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 24px;
}
h2 {
  font-size: 1.4rem;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
p {
  line-height: 1.65;
  max-width: 68ch;
}
svg {
  display: block;
}
.masthead {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: white;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 1.65rem;
  letter-spacing: -0.7px;
  white-space: nowrap;
}
.brand-last {
  font-weight: bold;
}
.mark {
  width: 32px;
  height: 38px;
  color: var(--blue);
}
.shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
  max-width: 1680px;
  margin: auto;
}
.sidebar {
  background: var(--blue);
  color: #e2eaf4;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar a {
  color: #e2eaf4;
  text-decoration: none;
}
.sidebar nav a {
  padding: 13px 18px;
  border-radius: 4px;
}
.sidebar nav a:hover,
.sidebar nav a[aria-current] {
  background: #ffffff16;
  color: white;
}
.sidebar nav a[aria-current] {
  box-shadow: inset 3px 0 var(--gold);
}
.sidebar-bottom {
  padding: 32px 18px 5px;
  font-size: 0.9rem;
}
.sidebar-bottom a {
  display: block;
  margin: 16px 0;
}
main {
  padding: 32px clamp(24px, 4vw, 56px);
  min-width: 0;
}
.search-panel {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 28px;
}
.search-panel > label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
}
.search-line {
  display: flex;
  gap: 10px;
}
.search-line input {
  flex: 1;
}
.filters {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 18px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.filters label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}
.section-heading h2 {
  margin-bottom: 20px;
}
.section-heading > span {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}
.empty-state {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.empty-state p {
  margin: 0 0 12px;
  color: var(--muted);
}
.empty-state a {
  font-size: 0.95rem;
}
.page-heading {
  margin-bottom: 24px;
  max-width: 75ch;
}
.page-heading p {
  color: var(--muted);
  font-size: 1.1rem;
}
.work-row {
  display: flex;
  gap: 22px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.work-summary {
  flex: 1;
  min-width: 0;
}
.work-summary h3 {
  margin: 6px 0 8px;
}
.work-summary h3 a {
  text-decoration: none;
}
.work-summary p {
  margin: 8px 0;
  color: var(--muted);
}
.work-summary .author {
  color: var(--ink);
}
.metadata {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tags a {
  padding: 5px 10px;
  border-radius: 3px;
  background: #e7edf4;
  font-size: 0.8rem;
  text-decoration: none;
}
.row-formats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
  white-space: nowrap;
  padding-top: 5px;
}
.row-formats span {
  color: var(--muted);
  font-size: 0.75rem;
}
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 28px;
}
.year-filter {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 32px;
}
.year-filter select {
  margin-left: 12px;
}
.year-section {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.year-section > h2 {
  font-size: 2.4rem;
}
.volume-section {
  margin-bottom: 28px;
}
.issue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.issue-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: white;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 20px;
  text-decoration: none;
  border-radius: 3px;
}
.journal-row {
  display: flex;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 30px 0;
}
.journal-row h2 {
  margin-bottom: 12px;
}
.journal-row p {
  color: var(--muted);
}
.topic-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.topic-index > a {
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  text-decoration: none;
  border-radius: 4px;
}
.topic-index > a h2 {
  margin-bottom: 12px;
  font-size: 1.5rem;
}
.topic-index .empty-state {
  grid-column: 1/-1;
}
.prose {
  max-width: 68ch;
}
.prose h2 {
  margin: 36px 0 14px;
}
.prose p {
  color: var(--muted);
}
.reading-heading {
  max-width: 900px;
}
.reading-heading h1 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin: 18px 0;
}
.byline {
  font-family: Georgia, serif;
  font-size: 1.4rem;
}
.reading-toolbar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  margin: 32px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.85rem;
}
.reading-toolbar > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.reading-toolbar .button {
  font-size: 0.8rem;
  padding: 10px 14px;
}
.reading-body {
  position: relative;
  max-width: 74ch;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(18, 46, 80, 0.05);
  border-radius: 2px;
  font-family: "Latin Modern Roman", "Computer Modern Roman", "TeX Gyre Pagella", "Libertinus Serif", "Nimbus Roman", "Times New Roman", Times, Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #111;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: anywhere;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* LaTeX Paragraph Indentation */
.reading-body p {
  margin: 0;
  padding: 0;
  text-indent: 1.5em;
  line-height: 1.6;
}
.reading-body h1 + p,
.reading-body h2 + p,
.reading-body h3 + p,
.reading-body h4 + p,
.reading-body h5 + p,
.reading-body h6 + p,
.reading-body .center + p,
.reading-body .flushright + p,
.reading-body .flushleft + p,
.reading-body blockquote + p,
.reading-body .verse + p,
.reading-body .quotation + p,
.reading-body table + p,
.reading-body .pagebreak + p,
.reading-body .titlepage + p,
.reading-body .maketitle + p,
.reading-body .runin-para + p,
.reading-body > p:first-child,
.reading-body .noindent,
.reading-body .noindent p,
.reading-body p.noindent {
  text-indent: 0;
}

/* LaTeX Sectioning Hierarchy */
.reading-body h1.part,
.reading-body h2.part {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin: 3.5em 0 1.8em;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-indent: 0;
}
.reading-body h2.chapter {
  font-size: 1.65rem;
  font-weight: bold;
  margin: 2.8em 0 1.2em;
  line-height: 1.3;
  border-bottom: 0.5pt solid var(--line);
  padding-bottom: 0.3em;
  text-indent: 0;
}
.reading-body h2,
.reading-body h3.section {
  font-size: 1.35rem;
  font-weight: bold;
  margin: 2.2em 0 0.8em;
  line-height: 1.3;
  text-indent: 0;
}
.reading-body h3,
.reading-body h4.subsection {
  font-size: 1.15rem;
  font-weight: bold;
  margin: 1.7em 0 0.6em;
  line-height: 1.35;
  text-indent: 0;
}
.reading-body h4,
.reading-body h5.subsubsection {
  font-size: 1.05rem;
  font-weight: bold;
  font-style: italic;
  margin: 1.3em 0 0.5em;
  line-height: 1.4;
  text-indent: 0;
}
.reading-body .header-section-number {
  margin-right: 0.5em;
  font-weight: inherit;
}

/* Run-in Paragraph Headings (\paragraph*) */
.reading-body .runin-para {
  margin: 0;
  padding: 0;
}
.reading-body .runin {
  margin-right: 0.5em;
  text-indent: 0;
}
.reading-body .runin.paragraph {
  font-weight: bold;
  font-style: normal;
}
.reading-body .runin.subparagraph {
  font-weight: bold;
  font-style: italic;
}

/* LaTeX Font Sizes */
.reading-body .tiny { font-size: 0.65em; line-height: 1.3; }
.reading-body .scriptsize { font-size: 0.75em; line-height: 1.35; }
.reading-body .footnotesize { font-size: 0.85em; line-height: 1.4; }
.reading-body .small { font-size: 0.92em; line-height: 1.45; }
.reading-body .normalsize { font-size: 1em; line-height: 1.6; }
.reading-body .large { font-size: 1.15em; line-height: 1.5; }
.reading-body .Large { font-size: 1.35em; line-height: 1.4; }
.reading-body .LARGE { font-size: 1.6em; line-height: 1.3; }
.reading-body .huge { font-size: 1.9em; line-height: 1.25; }
.reading-body .Huge { font-size: 2.3em; line-height: 1.2; }

/* LaTeX Font Styles & Shapes */
.reading-body .itshape, .reading-body em { font-style: italic; }
.reading-body .bfseries, .reading-body strong { font-weight: bold; }
.reading-body .scshape, .reading-body .smallcaps { font-variant-caps: all-small-caps; letter-spacing: 0.04em; }
.reading-body .slshape { font-style: oblique; }
.reading-body .upshape { font-style: normal; }
.reading-body .mdseries { font-weight: normal; }
.reading-body .ttfamily, .reading-body code { font-family: "Latin Modern Mono", "Courier New", monospace; font-size: 0.9em; }
.reading-body .spaced { letter-spacing: 0.15em; }

/* Alignments */
.reading-body .center, .reading-body .align-centering {
  text-align: center;
  margin: 1.2em 0;
  text-indent: 0;
}
.reading-body .center p, .reading-body .align-centering p {
  text-align: center;
  text-indent: 0;
}
.reading-body .flushright, .reading-body .align-raggedleft {
  text-align: right;
  margin: 1.2em 0;
  text-indent: 0;
}
.reading-body .flushright p, .reading-body .align-raggedleft p {
  text-align: right;
  text-indent: 0;
}
.reading-body .flushleft, .reading-body .align-raggedright {
  text-align: left;
  margin: 1.2em 0;
  text-indent: 0;
}
.reading-body .flushleft p, .reading-body .align-raggedright p {
  text-align: left;
  text-indent: 0;
}

/* Horizontal & Vertical Fills (\hfill, \dotfill, \hrulefill) */
.reading-body .fill-para {
  margin: 0.5em 0;
  text-indent: 0;
}
.reading-body .fill-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin: 0.15em 0;
}
.reading-body .fill-line .seg {
  white-space: nowrap;
}
.reading-body .fill-line .hfill {
  flex-grow: 1;
  min-width: 1em;
}
.reading-body .fill-line .dotfill {
  flex-grow: 1;
  min-width: 1.5em;
  height: 1.1em;
  margin: 0 6px;
  background: radial-gradient(circle, currentColor 0.8px, transparent 1.2px) repeat-x bottom;
  background-size: 8px 3px;
}
.reading-body .fill-line .hrulefill {
  flex-grow: 1;
  min-width: 1.5em;
  margin: 0 6px;
  border-bottom: 0.75pt solid currentColor;
  height: 0.9em;
}
.reading-body .vspace {
  display: block;
  width: 100%;
}
.reading-body .rule {
  display: inline-block;
  background-color: currentColor;
}
.reading-body .pagebreak {
  display: block;
  margin: 3em auto;
  width: 50%;
  border-top: 1px dashed var(--line);
  position: relative;
}
.reading-body .pagebreak::after {
  content: "❦";
  position: absolute;
  top: -0.7em;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.9em;
}

/* Margin Notes (\marginpar, \marginnote) */
.reading-body .marginpar {
  font-size: 0.82em;
  font-style: italic;
  color: var(--muted);
  line-height: 1.35;
  text-align: left;
  text-indent: 0;
  hyphens: auto;
}
@media (min-width: 1200px) {
  .reading-body .marginpar {
    float: right;
    clear: right;
    margin-right: -15.5em;
    width: 13.5em;
    padding-left: 0.75em;
    border-left: 2px solid var(--gold);
    display: block;
  }
}
@media (max-width: 1199px) {
  .reading-body .marginpar {
    float: right;
    clear: right;
    margin: 0.4em 0 0.8em 1.2em;
    width: 38%;
    min-width: 160px;
    max-width: 240px;
    padding-left: 0.6em;
    border-left: 2px solid var(--gold);
    background: rgba(178, 139, 54, 0.04);
  }
}

/* Scan-Page Anchors (\quellseite) */
.reading-body .quellseite {
  font-size: 0.75em;
  font-style: normal;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #8a96a3;
  background: #eef2f6;
  padding: 1px 5px;
  border-radius: 3px;
  user-select: none;
  vertical-align: 0.2em;
  margin: 0 4px;
}

/* Verse & Liturgical Poetry (\begin{verse}) */
.reading-body .verse {
  margin: 1.5em 0;
  padding-left: 2.5em;
  border-left: 2px solid var(--gold);
  font-style: italic;
  line-height: 1.7;
  text-indent: 0;
}
.reading-body .verse p {
  text-indent: -1.5em;
  margin: 0.4em 0;
}

/* Quotations (\begin{quote}, \begin{quotation}) */
.reading-body blockquote,
.reading-body .quotation {
  margin: 1.6em 2em;
  padding: 0.4em 1.2em;
  border-left: 3px solid var(--gold);
  color: #333;
  font-size: 0.96em;
  line-height: 1.65;
  text-indent: 0;
}
.reading-body blockquote p,
.reading-body .quotation p {
  text-indent: 1.2em;
  margin: 0;
}
.reading-body blockquote > p:first-child,
.reading-body .quotation > p:first-child {
  text-indent: 0;
}

/* Booktabs Tables (\begin{longtable}, \begin{tabular}) */
.reading-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.2em 0;
  font-size: 0.92em;
  border-top: 2pt solid #111;
  border-bottom: 2pt solid #111;
  display: table;
  overflow-x: auto;
}
.reading-body thead th {
  border-bottom: 1pt solid #111;
  padding: 8px 10px;
  font-weight: bold;
  vertical-align: bottom;
}
.reading-body tbody td,
.reading-body tbody th {
  padding: 6px 10px;
  border: none;
  border-bottom: 0.5pt solid #ddd;
  vertical-align: top;
}
.reading-body tbody tr:last-child td {
  border-bottom: none;
}

/* Scholarly Footnotes */
.reading-body .footnotes {
  margin-top: 3.5em;
  padding-top: 1.2em;
  border-top: 0.75pt solid #111;
  width: 45%;
  min-width: 250px;
  font-size: 0.85em;
  line-height: 1.5;
  color: #333;
}
.reading-body .footnotes hr {
  display: none;
}
.reading-body .footnotes ol {
  padding-left: 1.5em;
  margin: 0;
}
.reading-body .footnotes li {
  margin-bottom: 0.6em;
  text-indent: 0;
}
.reading-body .footnotes p {
  text-indent: 0;
}
.reading-body .footnote-ref {
  font-size: 0.75em;
  vertical-align: super;
  text-decoration: none;
  padding: 0 1px;
  color: var(--blue);
  font-weight: bold;
}
.reading-body .footnote-back {
  text-decoration: none;
  margin-left: 0.3em;
  color: var(--gold);
}

/* Table of Contents (\tableofcontents) */
.reading-body .toc {
  margin: 2.5em 0;
  padding: 1.5em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.reading-body .toc-heading {
  font-size: 1.3rem;
  text-align: center;
  margin: 0 0 1em;
  text-indent: 0;
}
.reading-body .toc-entries {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}
.reading-body .toc-part {
  font-weight: bold;
  margin-top: 0.8em;
}
.reading-body .toc-section {
  padding-left: 1.2em;
}
.reading-body .toc-subsection {
  padding-left: 2.4em;
  font-size: 0.9em;
}
.reading-body .toc a {
  color: var(--ink);
  text-decoration: none;
}
.reading-body .toc a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* Titlepage / Maketitle (\begin{titlepage}, \maketitle) */
.reading-body .titlepage,
.reading-body .maketitle {
  text-align: center;
  margin: 2em 0 4em;
  padding: 3em 1em;
  border-bottom: 1px solid var(--line);
  text-indent: 0;
}
.reading-body .titlepage p,
.reading-body .maketitle p {
  text-align: center;
  text-indent: 0;
  margin: 0.6em 0;
}
.edition-note {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 60px;
}
.edition-note h2 {
  font-size: 1.4rem;
}
.edition-note p {
  font-size: 0.9rem;
  color: var(--muted);
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 32px 0;
  font-size: 0.9rem;
}
.muted {
  color: var(--muted);
}
.skip {
  position: absolute;
  top: -100px;
  left: 10px;
  background: white;
  padding: 16px;
  z-index: 2;
}
.skip:focus {
  top: 10px;
}
@media (min-width: 1680px) {
  .sidebar {
    border-radius: 0 0 0 8px;
  }
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .masthead {
    padding: 0 28px;
  }
  .sidebar {
    padding: 30px 12px;
  }
  main {
    padding: 32px 30px;
  }
  .reading-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .row-formats {
    display: none;
  }
  .filters {
    gap: 14px;
  }
  .search-line button {
    padding: 12px 16px;
  }
}
@media (max-width: 700px) {
  .masthead {
    height: 72px;
    padding: 0 20px;
  }
  .brand {
    font-size: 1.3rem;
    gap: 10px;
  }
  .mark {
    width: 32px;
    height: 38px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    padding: 0 12px;
  }
  .sidebar nav {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
  }
  .sidebar nav a {
    font-size: 0.85rem;
    padding: 17px 12px;
    white-space: nowrap;
    border-radius: 0;
  }
  .sidebar nav a[aria-current] {
    box-shadow: inset 0 -3px var(--gold);
  }
  .sidebar-bottom {
    display: none;
  }
  main {
    padding: 24px 20px;
  }
  .search-panel {
    padding: 18px;
    margin-bottom: 32px;
  }
  .search-line {
    flex-direction: column;
  }
  .filters {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .filters label {
    justify-content: space-between;
  }
  .filters select {
    max-width: 65%;
    flex: 1;
  }
  .section-heading h2 {
    font-size: 1.5rem;
  }
  .work-row {
    gap: 16px;
  }
  .year-section {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .year-section > h2 {
    font-size: 2rem;
  }
  .topic-index {
    grid-template-columns: 1fr;
  }
  .reading-body {
    font-size: 1.06rem;
  }
  .reading-toolbar {
    margin-bottom: 32px;
  }
  .reading-toolbar > div {
    gap: 12px;
  }
  .reading-heading h1 {
    overflow-wrap: anywhere;
  }
  .breadcrumbs {
    overflow-wrap: anywhere;
  }
  .journal-row {
    gap: 16px;
  }
  .journal-row h2 {
    font-size: 1.5rem;
  }
}
@media print {
  .masthead,
  .sidebar,
  .reading-toolbar,
  .breadcrumbs,
  .skip {
    display: none;
  }
  .shell {
    display: block;
  }
  main {
    padding: 0;
  }
  .reading-body {
    max-width: none;
  }
  .reading-heading h1 {
    font-size: 28pt;
  }
  a {
    color: inherit;
  }
  .edition-note {
    break-inside: avoid;
  }
}
