:root {
  --font-ui: "Funnel Display", Arial, sans-serif;
  --font-body: "Funnel Display", Arial, sans-serif;
  --background: #ffffff;
  --foreground: #000000;
  --muted: #6f6f6f;
  --panel: rgba(0, 0, 0, 0.86);
  --panel-text: #ffffff;
  --corner: 8px;
  --header-height: 64px;
  --footer-height: 54px;
  --reading-width: 760px;
  --reader-x: max(72px, calc((100vw - var(--reading-width)) / 2));
  --reader-top: 56px;
  --reader-bottom: 76px;
  --body-size: 16px;
  --body-leading: 1.68;
  --transition: 0.36s cubic-bezier(.22,.72,.23,1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--background); }
body {
  margin: 0;
  overflow: hidden;
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-body);
  font-weight: 300;
}
button, input { font: inherit; }
button { color: inherit; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 var(--reader-x);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  z-index: 1000;
}
.site-title {
  max-width: min(var(--reading-width), calc(100vw - var(--reader-x) - var(--reader-x)));
  overflow: visible;
  white-space: normal;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #000;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}
.site-title:hover, .site-title:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

.viewport { position: fixed; inset: var(--header-height) 0 0; overflow: hidden; }
.title-page-active .site-header { display: none; }
.title-page-active .viewport { inset: 0; }
.screen-track {
  height: 100%;
  width: 400%;
  display: flex;
  transform: translate3d(-25%,0,0);
  transition: transform var(--transition);
  will-change: transform;
}
.screen { position: relative; width: 25%; height: 100%; flex: 0 0 25%; overflow: hidden; background: var(--background); }
.litgraph-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; touch-action: auto; }
.side-panel-scroll, .reader-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.side-panel-scroll::-webkit-scrollbar, .reader-scroll::-webkit-scrollbar { width: 0; height: 0; }
.side-panel-scroll { padding: 70px var(--reader-x) 100px; }
.side-panel-scroll > h1, .bibliography-content > h1 { width: min(var(--reading-width), 100%); margin: 0 auto 32px; font-size: clamp(30px, 4vw, 58px); font-weight: 300; line-height: 1.04; }

.toc-nav { width: min(var(--reading-width), 100%); margin: 0 auto; }
.toc-group { margin: 0 0 34px; }
.toc-part { margin: 0 0 14px; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: uppercase; }
.toc-item {
  display: block;
  width: 100%;
  border: 0;
  padding: 8px 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  text-underline-offset: 4px;
}
.toc-item:hover, .toc-item:focus-visible, .toc-item.active { text-decoration: underline; }

.reader-scroll { padding: var(--reader-top) var(--reader-x) calc(var(--footer-height) + var(--reader-bottom)); }
.reader-content { position: relative; width: min(var(--reading-width), 100%); margin: 0 auto; font-size: var(--body-size); font-weight: 300; line-height: var(--body-leading); }
.reader-content > h1 { font-size: clamp(32px, 4vw, 56px); font-weight: 400; line-height: 1.06; letter-spacing: 0; margin: 7vh 0 52px; }
.reader-content h2 { font-size: clamp(23px, 2.3vw, 32px); font-weight: 400; line-height: 1.16; margin: 72px 0 22px; scroll-margin-top: 96px; }
.reader-content h3 { font-size: clamp(18px, 1.7vw, 24px); font-weight: 300; line-height: 1.22; margin: 46px 0 18px; scroll-margin-top: 96px; }
.reader-content p { margin: 0 0 1.25em; text-align: justify; }
.reader-content strong, .reader-content b { font-weight: 400; }
.reader-content blockquote { margin: 40px 0; padding-left: 22px; border-left: 1px solid #000; font-size: 1.04em; }
.reader-content a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.reader-content ul, .reader-content ol { padding-left: 1.4em; }
.reader-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; margin: 36px 0; font-size: .88em; }
.reader-content th, .reader-content td { border: 1px solid #000; padding: 9px 11px; vertical-align: top; }
.appendix-c-table th:nth-child(2), .appendix-c-table td:nth-child(2) { width: 140px; min-width: 140px; }

.reader-content > .title-page-heading {
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.title-page-byline {
  text-align: left;
  font-weight: 400;
}

.title-page-byline a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.title-page-byline a:hover,
.title-page-byline a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.title-page-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 8vh 0; font-size: var(--body-size); font-weight: 300; line-height: var(--body-leading); }
.title-page-meta p { text-align: left; }
.title-page-meta strong { font-weight: 300; }

.abstract-keywords {
  margin-top: 2.5em;
  font-weight: 400;
}

.abstract-committee {
  margin-top: 2.5em;
}

.abstract-committee p {
  margin: 0 0 0.45em;
  text-align: left;
}

.title-page-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.title-page-badges a { display: inline-flex; }
.title-page-shield { display: inline-flex; border: 0; padding: 0; background: transparent; cursor: pointer; }
.title-page-badges img { display: block; height: 20px; width: auto; }
.document-nav-button {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 9px 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.document-nav-button:hover { background: #000; color: #fff; }

.dissertation-figure { margin: 58px 0; }
.dissertation-figure img { display: block; width: 100%; max-height: 78vh; object-fit: contain; background: #f4f4f4; }
.figure-link { display: block; cursor: zoom-in; }
.dissertation-figure figcaption { margin-top: 14px; font-size: .84em; line-height: 1.42; }

.citation-callout {
  border-bottom: 1px dotted #000;
  cursor: pointer;
  white-space: normal;
}
.citation-callout:hover { border-bottom-style: solid; }
.citation-callout:focus { outline: none; }
.citation-callout.selected { border: 2px solid #000; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.citation-popup {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 1800;
  padding: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.25;
  pointer-events: none;
}
.citation-popup.visible { display: block; }
.citation-connector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.citation-connector path { stroke-width: 2; }
.citation-popup button {
  position: absolute;
  width: min(320px, calc(100vw - 32px));
  padding: 7px 12px;
  border: 0;
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.22));
  transition: background-color .16s ease;
}
.citation-popup button:hover { background: #151515; }

.reader-footer {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--footer-height);
  padding: 0 var(--reader-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 300;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 30;
}
.reader-footer.hidden { opacity: 0; transform: translateY(100%); pointer-events: none; }
.footer-chapter, .footer-section {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-underline-offset: 3px;
}
.footer-chapter { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.footer-section { white-space: nowrap; text-align: right; }
.footer-chapter:hover, .footer-chapter:focus-visible, .footer-section:hover, .footer-section:focus-visible { text-decoration: underline; }
.footer-section:disabled { cursor: default; text-decoration: none; }

.progress-control {
  position: absolute;
  left: calc(var(--reader-x) + min(var(--reading-width), calc(100vw - var(--reader-x) - var(--reader-x))) + 24px);
  top: var(--reader-top);
  bottom: calc(var(--footer-height) + var(--reader-bottom));
  width: 24px;
  z-index: 40;
}
.progress-rail { position: absolute; left: 15px; top: 0; width: 2px; height: 100%; background: rgba(0,0,0,.9); cursor: pointer; }
.progress-dot { position: absolute; left: 50%; top: 0; width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%; background: #000; transform: translate(-50%, -50%); cursor: grab; }
.progress-dot:active { cursor: grabbing; }
.progress-control.hidden { opacity: 0; pointer-events: none; }

.screen-arrow {
  position: fixed;
  top: 50%;
  z-index: 1200;
  width: 48px;
  height: 72px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.screen-arrow:hover { transform: translateY(-50%) scale(1.08); }
.screen-arrow-left { left: 8px; }
.screen-arrow-right { right: 52px; }
.screen-arrow.hidden { opacity: 0; pointer-events: none; }

.bibliography-content { width: min(var(--reading-width), 100%); margin: 0 auto; }
.bibliography-entry { padding: 0; margin: 0 0 1.25em; transition: background .2s ease, color .2s ease; }
.bibliography-entry p { margin: 0; line-height: 1.5; text-align: justify; }
.bibliography-entry a, .bibliography-entry a:visited { color: #000; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bibliography-entry a.was-visited { text-decoration-style: solid; }
.bibliography-entry.highlighted { background: transparent; color: #000; outline: 2px solid #000; outline-offset: 5px; }
.bibliography-entry.highlighted a { color: #000; }

.document-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; margin: 72px 0 20px; padding-top: 0; border: 0; }
.document-nav-button {
  width: fit-content;
  max-width: 100%;
  padding: 6px 11px;
  border: 1px solid #000;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.25;
  white-space: normal;
}
.document-nav-button:hover { background: #fff; color: #000; }
.document-nav .previous { justify-self: start; text-align: left; }
.document-nav .next { justify-self: end; text-align: right; }

.figure-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.92); color: #fff; }
.figure-dialog::backdrop { background: transparent; }
.figure-dialog-inner { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 58px; }
.figure-dialog img { max-width: 92vw; max-height: 78vh; object-fit: contain; }
.figure-dialog p { max-width: 920px; margin: 0; text-align: center; font-size: 14px; }
.close-figure { position: fixed; right: 20px; top: 12px; border: 0; background: transparent; color: #fff; font-size: 46px; cursor: pointer; }

@media (max-width: 899px) {
  :root { --header-height: 56px; --reader-x: 48px; --reader-top: 34px; --reader-bottom: 62px; --body-size: 15.5px; --body-leading: 1.62; }
  .site-header { padding: 0 var(--reader-x); }
  .site-title { max-width: calc(100vw - var(--reader-x) - var(--reader-x)); font-size: 10.5px; }
  .reader-scroll { padding: var(--reader-top) var(--reader-x) calc(var(--footer-height) + var(--reader-bottom)); }
  .reader-content > h1 { margin-top: 5vh; }
  .title-page-meta { grid-template-columns: 1fr; gap: 0; margin: 7vh 0; }
  .side-panel-scroll { padding: 52px var(--reader-x) 90px; }
  .side-panel-scroll > h1, .bibliography-content > h1 { font-size: clamp(28px, 8vw, 44px); }
  .dissertation-figure { margin: 48px 0; }
  .progress-control { display: none; }
  .screen-arrow { width: 40px; font-size: 36px; }
  .screen-arrow-left { left: 0; }
  .screen-arrow-right { right: 0; }
  .citation-popup { font-size: 12px; }
  .reader-footer { padding: 0 var(--reader-x); }
  .figure-dialog-inner { padding: 50px 18px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
