/* A quiet reading edition, layered over the site's existing institutional shell. */
/* Jump directly between long chapters instead of animating across the manuscript. */
html { scroll-padding-top: 0; scroll-behavior: auto; }
.reading-page {
  --reader-ink: #e2e8ec;
  --reader-muted: #aebbc4;
  --reader-quiet: #87949d;
  --reader-line: rgba(222, 237, 247, .2);
  --reader-paper: #cbd5dc;
  --reader-serif: ui-serif, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  overflow-x: clip;
}

.reader-header {
  position: sticky;
  z-index: 30;
  top: 0;
  width: 100%;
  border-bottom: 1px solid var(--reader-line);
  background: rgba(5, 8, 12, .96);
  backdrop-filter: blur(14px);
}

.reader-header-top {
  width: min(100% - 3rem, 1120px);
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-inline: auto;
}

.reader-brand { flex: 0 0 auto; }
.reader-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #c1cbd1;
  font-size: .67rem;
  font-weight: 450;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.reader-back span { color: var(--reader-quiet); font-size: 1rem; }
.reader-back:hover, .reader-footer a:hover { color: var(--reader-ink); }

.reader-nav {
  min-height: 46px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid rgba(222, 237, 247, .08);
}
.reader-nav a {
  position: relative;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  color: #aebbc4;
  font-size: .64rem;
  font-weight: 450;
  letter-spacing: .19em;
  text-transform: uppercase;
  transition: color .2s ease;
}
.reader-nav a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  background: #d5e4ec;
  opacity: 0;
  transform: scaleX(.4);
  transition: opacity .2s ease, transform .2s ease;
}
.reader-nav a:hover, .reader-nav a[aria-current="location"] { color: var(--reader-ink); }
.reader-nav a[aria-current="location"]::after { opacity: .7; transform: scaleX(1); }

.reader-tools {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  border-top: 1px solid rgba(222, 237, 247, .08);
}
.reader-tools[hidden] { display: none; }
.reader-tools-label {
  margin-right: .3rem;
  color: var(--reader-quiet);
  font-size: .61rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.reader-size-buttons { display: flex; gap: .35rem; }
.reader-size-buttons button {
  width: 44px;
  min-height: 44px;
  border: 1px solid rgba(222, 237, 247, .24);
  border-radius: 0;
  color: #d7e1e7;
  background: transparent;
  font: 500 .79rem/1 var(--font-sans);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.reader-size-buttons button:hover:not(:disabled) {
  border-color: rgba(222, 237, 247, .65);
  color: #f0f5f7;
  background: rgba(222, 237, 247, .06);
}
.reader-size-buttons button:disabled { opacity: .4; cursor: not-allowed; }
.reader-size-buttons button:focus-visible,
.reader-nav a:focus-visible,
.reader-back:focus-visible,
.chapter-transition a:focus-visible,
.reader-footer a:focus-visible { outline: 2px solid #d9eaf2; outline-offset: 4px; }

.reader-main {
  width: min(100% - 2.5rem, 760px);
  margin-inline: auto;
  padding: clamp(4.8rem, 10vw, 8.5rem) 0 5rem;
}
.reader-title-block {
  margin: 0 auto clamp(5.5rem, 12vw, 9rem);
  text-align: center;
}
.reader-eyebrow, .reader-state, .chapter-number, .chapter-subtitle,
.transition-label {
  color: var(--reader-muted);
  font-family: var(--font-sans);
  font-weight: 450;
  text-transform: uppercase;
}
.reader-eyebrow {
  margin: 0 0 1.2rem;
  font-size: .67rem;
  letter-spacing: .29em;
}
.reader-title-block h1 {
  margin: 0;
  color: #e9eff2;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 300;
  letter-spacing: -.045em;
  line-height: 1.08;
}
.reader-state {
  margin: 1.35rem 0 0;
  color: #aebbc4;
  font-size: .68rem;
  letter-spacing: .19em;
}
.reader-rule {
  width: 42px;
  height: 1px;
  display: block;
  margin: 2.2rem auto 0;
  background: rgba(222, 237, 247, .52);
}

.reader-book { --manuscript-size: 1.17rem; }
.reading-page .reader-main,
.reading-page .reader-chapter {
  scroll-margin-top: 12rem;
}
.reader-chapter-next { margin-top: clamp(6.5rem, 14vw, 11rem); }
.chapter-heading {
  margin: 0 0 clamp(2.4rem, 6vw, 4rem);
  text-align: center;
}
.chapter-number {
  margin: 0 0 1.1rem;
  color: #84919a;
  font-size: .61rem;
  letter-spacing: .25em;
}
.chapter-heading h2 {
  margin: 0;
  color: var(--reader-ink);
  font-family: var(--font-sans);
  font-size: clamp(2.1rem, 5.5vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.chapter-subtitle {
  margin: 1.2rem 0 0;
  color: #aebbc4;
  font-size: .62rem;
  letter-spacing: .22em;
  line-height: 1.6;
}
.manuscript-content {
  max-width: 65ch;
  margin-inline: auto;
  color: var(--reader-paper);
  font-family: var(--reader-serif);
  font-size: var(--manuscript-size);
  font-weight: 400;
  line-height: 1.88;
  letter-spacing: .006em;
  overflow-wrap: anywhere;
}
.manuscript-content p {
  margin: 0 0 1.05em;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-indent: 0;
}
.manuscript-content p:last-child { margin-bottom: 0; }
.manuscript-content br + br { line-height: 1.4; }
.scene-break {
  width: 3.5rem;
  height: 1px;
  margin: 2.5em auto;
  border: 0;
  background: var(--reader-line);
}

.chapter-transition {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.55rem;
  margin-top: clamp(3.5rem, 8vw, 5.5rem);
  padding-top: 1.7rem;
  border-top: 1px solid var(--reader-line);
}
.chapter-next {
  min-width: min(100%, 19rem);
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .2rem 0;
}
.transition-label {
  color: var(--reader-quiet);
  font-size: .59rem;
  letter-spacing: .19em;
}
.transition-title {
  color: #e1e9ed;
  font-size: .9rem;
  font-weight: 450;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.transition-title span { padding-left: .45rem; color: var(--reader-muted); }
.chapter-next:hover .transition-title,
.chapter-previous:hover,
.back-to-top:hover { color: #fff; }
.chapter-ending {
  align-items: flex-start;
  gap: 1.7rem;
  margin-top: clamp(3.5rem, 8vw, 5.5rem);
}
.chapter-previous, .back-to-top {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #aebbc4;
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.chapter-ending .chapter-next { margin-top: .1rem; }
.back-to-top { align-self: flex-end; color: #87949d; font-size: .59rem; }

.reader-footer {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem max(1.25rem, calc((100vw - 1120px) / 2));
  border-top: 1px solid var(--reader-line);
  color: #87949d;
  font-size: .61rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.reader-footer a { min-height: 44px; display: inline-flex; align-items: center; color: #b8c4cb; }

@media (max-width: 600px) {
  .reader-header-top {
    width: calc(100% - 2rem);
    min-height: 58px;
  }
  .reader-brand { gap: .55rem; }
  .reader-brand .brand-word { font-size: .59rem; letter-spacing: .3em; }
  .reader-brand .brand-glyph { width: 20px; height: 20px; }
  .reader-back { gap: .38rem; font-size: .56rem; letter-spacing: .1em; }
  .reader-nav { justify-content: space-evenly; gap: .5rem; }
  .reader-nav a { font-size: .59rem; letter-spacing: .15em; }
  .reader-tools { min-height: 44px; }
  .reader-main { width: calc(100% - 2.5rem); padding-top: 4rem; }
  .reader-title-block { margin-bottom: 5.2rem; }
  .reader-eyebrow { font-size: .61rem; letter-spacing: .23em; }
  .reader-state { font-size: .61rem; letter-spacing: .14em; }
  .reading-page .reader-main,
  .reading-page .reader-chapter { scroll-margin-top: 11.5rem; }
  .chapter-heading { margin-bottom: 2.35rem; }
  .chapter-subtitle { max-width: 30ch; margin-inline: auto; }
  .reader-book { --manuscript-size: 1.1rem; }
  .manuscript-content { line-height: 1.82; }
  .reader-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: .15rem; }
}

@media (max-width: 360px) {
  .reader-header-top { width: calc(100% - 1.4rem); }
  .reader-back { font-size: .52rem; }
  .reader-nav a { font-size: .55rem; letter-spacing: .12em; }
  .reader-main { width: calc(100% - 2rem); }
}

@media (prefers-reduced-motion: reduce) {
  .reader-nav a, .reader-nav a::after, .reader-size-buttons button { transition: none; }
}
