@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/cormorant-garamond-medium-ver-0001-rev-0001.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/cormorant-garamond-semibold-ver-0001-rev-0001.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans KR";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/noto-sans-kr-regular-ver-0001-rev-0001.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans KR";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/noto-sans-kr-medium-ver-0001-rev-0001.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans KR";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/noto-sans-kr-semibold-ver-0001-rev-0001.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Serif KR";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/noto-serif-kr-regular-ver-0001-rev-0001.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Serif KR";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/noto-serif-kr-medium-ver-0001-rev-0001.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Serif KR";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/noto-serif-kr-semibold-ver-0001-rev-0001.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Serif KR";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("web-assets-ver-0001-rev-0007/fonts-ver-0001-rev-0001/noto-serif-kr-bold-ver-0001-rev-0001.woff2") format("woff2");
}

:root {
  --paper: #f4ecdd;
  --paper-deep: #e9ddc8;
  --paper-pale: #fbf7ee;
  --ink: #26231f;
  --soft-ink: #665d50;
  --blueprint: #123b4a;
  --blueprint-2: #285d68;
  --night: #0d2631;
  --night-2: #123440;
  --copper: #934f31;
  --brass: #bd7e27;
  --rule: #b8a783;
  --pale-blue: #dfe9e8;
  --pale-copper: #efe1d4;
  --serif: "Noto Serif KR", "Iowan Old Style", "AppleMyungjo", serif;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --display: "Cormorant Garamond", "Noto Serif KR", serif;
  --sidebar-width: 19rem;
  --topbar-height: 4.25rem;
  --reader-scale: 1;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 20rem;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 10%, rgba(183, 123, 45, 0.08), transparent 24rem),
    radial-gradient(circle at 87% 38%, rgba(40, 93, 104, 0.06), transparent 32rem),
    var(--paper);
  font-family: var(--serif);
  line-height: 1.78;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.85rem;
  color: var(--paper-pale);
  background: var(--blueprint);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--copper);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.topbar {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr auto;
  align-items: center;
  padding: 0 1.35rem 0 0;
  color: var(--paper-pale);
  background: rgba(13, 38, 49, 0.97);
  border-bottom: 1px solid rgba(230, 200, 141, 0.24);
  backdrop-filter: blur(14px);
}

.topbar__progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  overflow: hidden;
}

.topbar__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 80ms linear;
}

.brand {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  color: var(--night);
  background: var(--brass);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.25;
}

.brand strong {
  font-size: 0.86rem;
  letter-spacing: -0.01em;
}

.brand small {
  margin-top: 0.1rem;
  color: #d4c5aa;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.17em;
}

.topbar__actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-button {
  min-width: 2.7rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.65rem;
  color: currentColor;
  background: transparent;
  border: 1px solid rgba(230, 200, 141, 0.3);
  border-radius: 99px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.icon-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  padding-top: var(--topbar-height);
}

.sidebar {
  position: fixed;
  z-index: 60;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  color: #e8dfcf;
  background:
    linear-gradient(rgba(18, 59, 74, 0.92), rgba(9, 31, 41, 0.98)),
    radial-gradient(circle at 30% 0, rgba(189, 126, 39, 0.35), transparent 16rem);
  border-right: 1px solid rgba(184, 167, 131, 0.35);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(189, 126, 39, 0.45) transparent;
  scrollbar-width: thin;
}

.sidebar__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.sidebar__head {
  position: relative;
  padding: 2.2rem 1.55rem 1.5rem;
  border-bottom: 1px solid rgba(184, 167, 131, 0.22);
}

.sidebar__head .eyebrow {
  color: #d7a864;
}

.sidebar__head h2 {
  margin: 0;
  color: #f2e7d2;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.035em;
}

#table-of-contents {
  padding: 1.1rem 0 1.7rem;
}

.toc-link,
.toc-part__head {
  text-decoration: none;
}

.toc-link {
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.25rem;
  align-items: baseline;
  padding: 0.47rem 1.2rem 0.47rem 1.45rem;
  color: #cfc5b4;
  font-size: 0.74rem;
  line-height: 1.45;
}

.toc-link::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: var(--brass);
  transform: scaleY(0);
  transition: transform 150ms ease;
}

.toc-link span {
  color: #a9977f;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
}

.toc-link strong {
  font-weight: 400;
}

.toc-link:hover,
.toc-link.is-active {
  color: #fff7e7;
  background: rgba(255, 255, 255, 0.055);
}

.toc-link.is-active::before {
  transform: scaleY(1);
}

.toc-link--home {
  margin-bottom: 0.25rem;
  color: #efd6a3;
}

.toc-link--utility {
  margin-top: 0.35rem;
  color: #b8d5d4;
}

.toc-part {
  padding: 0.7rem 0 0.45rem;
  border-top: 1px solid rgba(184, 167, 131, 0.16);
}

.toc-part__head {
  display: block;
  padding: 0.35rem 1.45rem 0.45rem;
  color: #e5c28b;
}

.toc-part__head small,
.toc-part__head strong {
  display: block;
}

.toc-part__head small {
  color: #a9977f;
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
}

.toc-part__head strong {
  margin-top: 0.1rem;
  font-size: 0.83rem;
  font-weight: 500;
}

.sidebar__footer {
  margin-top: auto;
  padding: 1.25rem 1.45rem 1.7rem;
  border-top: 1px solid rgba(184, 167, 131, 0.2);
}

.sidebar__footer p {
  margin: 1rem 0 0;
  color: #918678;
  font-family: var(--sans);
  font-size: 0.56rem;
  line-height: 1.65;
  letter-spacing: 0.04em;
}

.continue-button {
  width: 100%;
  padding: 0.7rem 0.9rem;
  color: #f5e9d3;
  background: rgba(189, 126, 39, 0.14);
  border: 1px solid rgba(189, 126, 39, 0.56);
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.7rem;
}

#reader {
  grid-column: 2;
  min-width: 0;
  min-height: calc(100vh - var(--topbar-height));
  outline: none;
}

.loading-state {
  min-height: calc(100vh - var(--topbar-height));
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.2rem;
  color: var(--blueprint);
  font-size: 0.85rem;
}

.loading-state__orbit {
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid var(--brass);
  border-radius: 50%;
  box-shadow: 0 0 0 0.75rem transparent, 0 0 0 0.8rem rgba(189, 126, 39, 0.4);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  50% { transform: scale(0.84); opacity: 0.55; }
}

.primary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button {
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  color: #fff8e9;
  background: var(--copper);
  border: 1px solid var(--copper);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 0.8rem 2rem rgba(58, 32, 22, 0.14);
}

.primary-button:hover {
  background: #7f402a;
}

.text-button {
  gap: 0.55rem;
  color: var(--blueprint);
  font-size: 0.83rem;
}

.text-button span {
  color: var(--brass);
  font-size: 1.25rem;
}

.home-hero {
  min-height: calc(100vh - var(--topbar-height));
  display: grid;
  grid-template-columns: minmax(18rem, 0.78fr) minmax(24rem, 1.22fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  padding: clamp(3rem, 7vw, 7rem) clamp(2.5rem, 8vw, 9rem);
  overflow: hidden;
}

.cover-stage {
  position: relative;
  width: min(25rem, 76%);
  justify-self: end;
  padding: 1.3rem 0 0 1.3rem;
}

.cover-stage::before,
.cover-stage::after {
  position: absolute;
  z-index: -1;
  content: "";
}

.cover-stage::before {
  inset: -2.4rem 3.5rem 2.4rem -2.4rem;
  border: 1px solid rgba(147, 79, 49, 0.42);
}

.cover-stage::after {
  right: -4.2rem;
  bottom: 12%;
  width: 7.5rem;
  height: 1px;
  background: var(--brass);
}

.cover-stage img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  border-radius: 1px;
  box-shadow: 0 2.3rem 4.5rem rgba(32, 31, 27, 0.32), 0 0 0 1px rgba(30, 45, 50, 0.25);
}

.cover-stage p {
  position: absolute;
  right: -3.3rem;
  bottom: 2rem;
  z-index: 3;
  margin: 0;
  color: var(--copper);
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  writing-mode: vertical-rl;
}

.cover-stage__orbit {
  position: absolute;
  z-index: -1;
  display: block;
  border: 1px solid rgba(40, 93, 104, 0.25);
  border-radius: 50%;
}

.orbit-one {
  top: -5rem;
  left: -6rem;
  width: 18rem;
  height: 18rem;
}

.orbit-two {
  top: -2.25rem;
  left: -3.25rem;
  width: 12.5rem;
  height: 12.5rem;
}

.home-hero__copy {
  max-width: 47rem;
}

.home-hero__copy h1 {
  max-width: 9em;
  margin: 0;
  color: var(--blueprint);
  font-size: clamp(3.1rem, 6.2vw, 6.6rem);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -0.075em;
}

.home-hero__subtitle {
  margin: 1.2rem 0 0;
  color: var(--copper);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  letter-spacing: -0.02em;
}

.home-hero__lead {
  max-width: 39rem;
  margin: 2rem 0 0;
  color: var(--soft-ink);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 1.7rem;
  margin: 2.2rem 0 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(5rem, 1fr));
  max-width: 38rem;
  margin: 3.4rem 0 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.hero-stats div {
  padding: 1rem 0.8rem 1rem 0;
  border-right: 1px solid rgba(184, 167, 131, 0.5);
}

.hero-stats div + div {
  padding-left: 0.8rem;
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats dt {
  color: var(--blueprint);
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
}

.hero-stats dd {
  margin: 0.35rem 0 0;
  color: var(--soft-ink);
  font-family: var(--sans);
  font-size: 0.62rem;
}

.home-hero__credit {
  margin: 1.25rem 0 0;
  color: #857a6b;
  font-family: var(--sans);
  font-size: 0.62rem;
}

.home-premise {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(3rem, 8vw, 9rem);
  padding: clamp(5rem, 9vw, 9rem) clamp(2.5rem, 9vw, 11rem);
  color: #ede5d5;
  background:
    linear-gradient(110deg, rgba(16, 45, 57, 0.98), rgba(24, 63, 73, 0.95)),
    radial-gradient(circle at 80% 30%, rgba(189, 126, 39, 0.26), transparent 20rem);
}

.home-premise .eyebrow {
  color: #d7a864;
}

.home-premise h2 {
  max-width: 17em;
  margin: 0;
  color: #f2eadc;
  font-size: clamp(1.75rem, 3.2vw, 3.4rem);
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: -0.055em;
}

.home-premise > p {
  align-self: end;
  margin: 0;
  color: #c8c0b2;
  font-size: 0.98rem;
  line-height: 2.1;
}

.journey-section {
  padding: clamp(5rem, 9vw, 9rem) clamp(2.5rem, 9vw, 11rem);
}

.section-heading {
  max-width: 50rem;
  margin: 0 auto 4rem;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: var(--blueprint);
  font-size: clamp(2.2rem, 4.3vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.section-heading > p:last-child {
  max-width: 39rem;
  margin: 1.2rem auto 0;
  color: var(--soft-ink);
}

.part-map {
  max-width: 75rem;
  margin: 0 auto;
  border-top: 1px solid var(--rule);
}

.part-card {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 2.2rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--rule);
}

.part-card__number {
  color: transparent;
  -webkit-text-stroke: 1px var(--brass);
  font-family: var(--display);
  font-size: 7rem;
  line-height: 0.85;
}

.part-card__years {
  margin: 0;
  color: var(--copper);
  font-family: var(--sans);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.part-card h3 {
  margin: 0.45rem 0 0;
  color: var(--blueprint);
  font-size: clamp(1.55rem, 2.6vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.part-card__copy > p:not(.part-card__years) {
  max-width: 48rem;
  margin: 0.75rem 0 1.5rem;
  color: var(--soft-ink);
}

.part-card ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.part-card li a {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0.5rem;
  padding: 0.45rem 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 167, 131, 0.35);
  font-size: 0.82rem;
}

.part-card li span {
  color: var(--brass);
  font-family: var(--sans);
  font-size: 0.63rem;
}

.reading-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0 clamp(2.5rem, 9vw, 11rem) clamp(6rem, 10vw, 10rem);
}

.reading-tools article {
  min-height: 17rem;
  padding: 2rem;
  background: rgba(255, 251, 242, 0.5);
  border: 1px solid var(--rule);
}

.reading-tools article + article {
  border-left: 0;
}

.reading-tools article > span {
  color: var(--brass);
  font-family: var(--display);
  font-size: 1.4rem;
}

.reading-tools h3 {
  margin: 2.5rem 0 0.5rem;
  color: var(--blueprint);
  font-size: 1.35rem;
  font-weight: 500;
}

.reading-tools p {
  min-height: 4rem;
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.82rem;
}

.reading-tools a,
.reading-tools button {
  display: inline-block;
  margin-top: 1.3rem;
  padding: 0;
  color: var(--copper);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  font-size: 0.76rem;
  text-decoration: none;
}

.chapter-view {
  padding-bottom: 7rem;
}

.chapter-hero {
  position: relative;
  min-height: 31rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(4rem, 8vw, 7rem) max(2rem, calc((100vw - var(--sidebar-width) - 64rem) / 2));
  overflow: hidden;
  color: #eee6d7;
  background:
    radial-gradient(circle at 82% 28%, rgba(189, 126, 39, 0.24), transparent 18rem),
    linear-gradient(115deg, #0d2c38, #143f4b 62%, #102d39);
  border-bottom: 1px solid rgba(189, 126, 39, 0.48);
}

.chapter-hero::before {
  position: absolute;
  top: -10rem;
  right: -7rem;
  width: 28rem;
  height: 28rem;
  content: "";
  border: 1px solid rgba(223, 233, 232, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(223, 233, 232, 0.025), 0 0 0 8rem rgba(223, 233, 232, 0.018);
}

.chapter-hero__trail {
  position: absolute;
  top: 2rem;
  left: max(2rem, calc((100vw - var(--sidebar-width) - 64rem) / 2));
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: #aebfbd;
  font-family: var(--sans);
  font-size: 0.65rem;
}

.chapter-hero__trail a {
  color: #d5c39e;
  text-decoration: none;
}

.chapter-hero__trail span::before {
  margin-right: 0.65rem;
  content: "·";
  color: var(--brass);
}

.chapter-hero__number {
  position: absolute;
  right: max(2rem, calc((100vw - var(--sidebar-width) - 64rem) / 2));
  bottom: -0.24em;
  color: transparent;
  opacity: 0.34;
  -webkit-text-stroke: 1px #d4b77b;
  font-family: var(--display);
  font-size: clamp(10rem, 18vw, 18rem);
  line-height: 0.7;
  pointer-events: none;
}

.chapter-hero .eyebrow {
  position: relative;
  color: #d9ad69;
}

.chapter-hero h1 {
  position: relative;
  max-width: 13em;
  margin: 0;
  color: #f4ecdd;
  font-size: clamp(2.4rem, 5.1vw, 5.35rem);
  font-weight: 500;
  line-height: 1.26;
  letter-spacing: -0.065em;
}

.chapter-hero__date {
  position: relative;
  margin: 1.2rem 0 0;
  color: #d0c3ad;
  font-size: 0.88rem;
}

.chapter-hero__thesis {
  position: relative;
  max-width: 42rem;
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  color: #abbcba;
  border-top: 1px solid rgba(189, 126, 39, 0.35);
  font-size: 0.77rem;
  line-height: 1.85;
}

.chapter-illustration {
  max-width: 64rem;
  margin: 0 auto;
  padding: 4.2rem 2rem 0;
}

.chapter-illustration img {
  display: block;
  width: 100%;
  max-height: 42rem;
  object-fit: cover;
  border: 1px solid var(--brass);
  box-shadow: 0 1.8rem 3.4rem rgba(50, 42, 32, 0.18);
}

.chapter-illustration figcaption {
  max-width: 45rem;
  margin: 1rem auto 0;
  color: var(--soft-ink);
  font-size: 0.72rem;
  line-height: 1.8;
  text-align: center;
}

.chapter-layout {
  display: grid;
  grid-template-columns: 9rem minmax(0, 43rem);
  justify-content: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 5rem 2rem 0;
}

.chapter-margin {
  position: sticky;
  top: calc(var(--topbar-height) + 2rem);
  align-self: start;
  padding-top: 0.5rem;
  color: var(--soft-ink);
}

.chapter-margin__line {
  width: 100%;
  height: 1px;
  margin-bottom: 1rem;
  background: var(--brass);
}

.chapter-margin p,
.chapter-margin strong,
.chapter-margin small {
  display: block;
  margin: 0;
}

.chapter-margin p,
.chapter-margin small {
  font-family: var(--sans);
  font-size: 0.59rem;
}

.chapter-margin p {
  color: var(--copper);
}

.chapter-margin strong {
  margin-top: 0.25rem;
  color: var(--blueprint);
  font-size: 0.8rem;
  font-weight: 500;
}

.chapter-margin small {
  margin-top: 0.7rem;
  color: #8d8170;
  line-height: 1.6;
}

.chapter-body {
  min-width: 0;
  font-size: calc(1.02rem * var(--reader-scale));
}

.prose > p,
.prose > ul,
.prose > blockquote,
.prose > h2,
.prose > h3,
.prose > figure,
.prose > aside {
  max-width: 43rem;
}

.prose > p {
  margin: 0 0 1.22em;
  line-height: 2.08;
  letter-spacing: -0.014em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.prose > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--copper);
  font-family: var(--display);
  font-size: 4.2em;
  line-height: 0.82;
}

.chapter-section {
  margin: 3.8rem 0 1.35rem;
  padding-top: 1.4rem;
  color: var(--blueprint);
  border-top: 1px solid var(--rule);
  font-size: calc(1.55rem * var(--reader-scale));
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.045em;
  word-break: keep-all;
}

.prose h3 {
  margin: 2.5rem 0 1rem;
  color: var(--copper);
  font-size: calc(1.08rem * var(--reader-scale));
  font-weight: 600;
  word-break: keep-all;
}

.prose ul {
  margin: 0 0 2rem;
  padding: 1.4rem 1.5rem 1.3rem 2.7rem;
  background: rgba(239, 225, 212, 0.5);
  border-left: 2px solid var(--copper);
}

.prose li {
  padding: 0.24rem 0 0.24rem 0.2rem;
  line-height: 1.85;
  word-break: keep-all;
}

.prose blockquote {
  position: relative;
  margin: 2.3rem 0;
  padding: 1.7rem 2rem 1.7rem 3.2rem;
  color: var(--blueprint);
  background: rgba(223, 233, 232, 0.5);
  border: 0;
  font-size: calc(1.12rem * var(--reader-scale));
  line-height: 1.9;
}

.prose blockquote::before {
  position: absolute;
  top: 0.7rem;
  left: 1rem;
  content: "“";
  color: var(--brass);
  font-family: var(--display);
  font-size: 3.5rem;
}

.section-break {
  width: 5.5rem;
  height: 1px;
  margin: 4rem auto;
  background: var(--brass);
  border: 0;
}

.fact-boundary {
  margin-top: 5rem;
  color: var(--copper);
}

.fact-boundary + ul {
  color: var(--soft-ink);
  background: transparent;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-left: 0;
  font-size: calc(0.83rem * var(--reader-scale));
}

.math-inline {
  display: inline-block;
  margin: 0 0.08em;
  color: var(--blueprint);
  font-size: 1.03em;
  vertical-align: -0.02em;
}

.equation-card {
  position: relative;
  margin: 2.6rem 0;
  padding: 2.3rem 3.2rem 2rem;
  color: #e9e5d9;
  background:
    radial-gradient(circle at 92% 18%, rgba(189, 126, 39, 0.14), transparent 10rem),
    var(--night);
  border: 1px solid #315765;
  overflow-x: auto;
  text-align: center;
  box-shadow: 0 1.1rem 2.4rem rgba(18, 42, 50, 0.12);
}

.equation-card::before,
.equation-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.equation-card::before {
  inset: 0.55rem;
  border: 1px solid rgba(189, 126, 39, 0.22);
}

.equation-card::after {
  top: 0;
  left: 1.2rem;
  width: 3.5rem;
  height: 2px;
  background: var(--brass);
}

.equation-card__label {
  position: absolute;
  top: 0.85rem;
  left: 1.2rem;
  color: #d9ad69;
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.17em;
}

.math-display {
  position: relative;
  z-index: 1;
  min-width: min-content;
  color: #ecf0e8;
  font-size: clamp(0.9rem, 2.2vw, 1.23rem);
}

.copy-formula {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  padding: 0.25rem 0.5rem;
  color: #aabbb9;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #53727b;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.58rem;
}

.diagram-card {
  margin: 2.8rem 0;
  padding: 1.6rem 1.8rem 1.3rem;
  background: rgba(223, 233, 232, 0.66);
  border-top: 1px solid var(--blueprint-2);
  border-bottom: 1px solid var(--blueprint-2);
}

.diagram-card img {
  display: block;
  width: min(100%, 38rem);
  margin: 0 auto;
}

.diagram-card figcaption {
  max-width: 35rem;
  margin: 1rem auto 0;
  color: var(--soft-ink);
  font-size: calc(0.72rem * var(--reader-scale));
  line-height: 1.75;
  text-align: center;
}

.scientist-card {
  margin: 3.2rem 0;
  padding: 0;
  background: rgba(239, 225, 212, 0.68);
  border-top: 2px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  box-shadow: 0 1rem 2rem rgba(76, 62, 45, 0.08);
}

.scientist-card__label {
  padding: 0.65rem 1.2rem 0;
  color: var(--copper);
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-align: right;
}

.scientist-card__head {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 0.65rem 1.2rem 1rem;
}

.scientist-card__head img {
  width: 8.5rem;
  height: 8.5rem;
  object-fit: cover;
  filter: saturate(0.82) sepia(0.05);
  border: 1px solid rgba(147, 79, 49, 0.25);
}

.scientist-card h3 {
  margin: 0;
  color: var(--blueprint);
  font-size: calc(1.04rem * var(--reader-scale));
  font-weight: 600;
  line-height: 1.65;
}

.scientist-card p {
  margin: 0;
}

.scientist-card__meta {
  margin-top: 0.35rem !important;
  color: #736759;
  font-family: var(--sans);
  font-size: 0.62rem;
}

.scientist-card__role {
  margin-top: 0.65rem !important;
  color: var(--blueprint-2);
  font-size: calc(0.76rem * var(--reader-scale));
  line-height: 1.7;
}

.scientist-card > p {
  padding: 1.1rem 1.35rem 0.7rem 1.75rem;
  border-left: 2px solid var(--copper);
  font-size: calc(0.8rem * var(--reader-scale));
  line-height: 1.85;
}

.scientist-card__scene {
  margin: 0 1.35rem 1.15rem 1.75rem;
  padding: 0.7rem 0 0;
  border-top: 1px solid rgba(147, 79, 49, 0.24);
}

.scientist-card__scene summary {
  color: var(--copper);
  cursor: pointer;
  font-size: calc(0.76rem * var(--reader-scale));
  font-weight: 600;
}

.scientist-card__scene p {
  padding: 0.65rem 0 0;
  color: var(--soft-ink);
  font-size: calc(0.76rem * var(--reader-scale));
  line-height: 1.85;
}

.chapter-navigation {
  max-width: 64rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 6rem auto 0;
  padding: 0 2rem;
}

.chapter-navigation a {
  min-height: 7rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.3rem 1.6rem;
  color: #e8dfcf;
  background: var(--night);
  border: 1px solid #355965;
  text-decoration: none;
}

.chapter-navigation a + a {
  border-left: 0;
}

.chapter-navigation__next {
  align-items: flex-end;
  text-align: right;
}

.chapter-navigation span {
  color: #d5a45f;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.chapter-navigation strong {
  margin-top: 0.4rem;
  font-size: 1rem;
  font-weight: 500;
}

.chapter-navigation a:hover {
  background: #163b47;
}

.part-landing {
  min-height: calc(100vh - var(--topbar-height));
  padding: clamp(5rem, 9vw, 9rem) clamp(2.5rem, 10vw, 12rem);
  overflow: hidden;
}

.part-landing__signal {
  float: right;
  width: clamp(11rem, 24vw, 19rem);
  height: clamp(11rem, 24vw, 19rem);
  display: grid;
  place-items: center;
  margin: -1rem 0 2rem 4rem;
  color: var(--brass);
  border: 1px solid var(--brass);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgba(189, 126, 39, 0.07), 0 0 0 5rem rgba(40, 93, 104, 0.04);
}

.part-landing__signal span {
  font-family: var(--display);
  font-size: clamp(5rem, 12vw, 9rem);
}

.part-landing h1 {
  max-width: 10em;
  margin: 0;
  color: var(--blueprint);
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.07em;
}

.part-landing__motif {
  margin: 1rem 0 0;
  color: var(--copper);
  font-size: 1rem;
}

.part-landing__thesis {
  max-width: 45rem;
  margin: 2rem 0 0;
  color: var(--soft-ink);
  font-size: 1.08rem;
  line-height: 2;
}

.part-landing__chapters {
  max-width: 60rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 3.5rem 0 2.5rem;
  border-top: 1px solid var(--rule);
}

.part-landing__chapters a {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 0.5rem;
  padding: 1rem 0.7rem 1rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.part-landing__chapters a:nth-child(odd) {
  padding-right: 1.4rem;
  border-right: 1px solid var(--rule);
}

.part-landing__chapters a:nth-child(even) {
  padding-left: 1.4rem;
}

.part-landing__chapters span {
  grid-row: 1 / 3;
  color: var(--brass);
  font-family: var(--sans);
  font-size: 0.7rem;
}

.part-landing__chapters strong {
  color: var(--blueprint);
  font-size: 0.9rem;
  font-weight: 500;
}

.part-landing__chapters small {
  margin-top: 0.2rem;
  color: var(--soft-ink);
  font-size: 0.63rem;
}

.reference-page {
  max-width: 70rem;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 8rem) 2rem 8rem;
}

.reference-hero {
  max-width: 50rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.reference-hero h1 {
  margin: 0;
  color: var(--blueprint);
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.065em;
}

.reference-hero > p:last-child {
  max-width: 40rem;
  margin: 1.25rem 0 0;
  color: var(--soft-ink);
}

.map-axis {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  margin: 3rem 0;
  color: var(--copper);
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.map-axis i {
  position: relative;
  height: 1px;
  background: var(--brass);
}

.map-axis i::after {
  position: absolute;
  top: -4px;
  right: 0;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--brass);
  border-radius: 50%;
}

.map-part {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem 4rem;
  padding: 2.4rem 0;
  border-top: 1px solid var(--rule);
}

.map-part header {
  display: flex;
  gap: 1.2rem;
}

.map-part header > span {
  color: var(--brass);
  font-family: var(--display);
  font-size: 3.8rem;
  line-height: 0.85;
}

.map-part header p {
  margin: 0;
  color: var(--copper);
  font-family: var(--sans);
  font-size: 0.62rem;
}

.map-part h2 {
  margin: 0.2rem 0 0;
  color: var(--blueprint);
  font-size: 1.4rem;
  font-weight: 500;
}

.map-part > p {
  grid-column: 1;
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.83rem;
}

.map-part ol {
  grid-column: 2;
  grid-row: 1 / 3;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-part li a {
  display: grid;
  grid-template-columns: minmax(12rem, 0.9fr) 1fr;
  gap: 1rem;
  padding: 0.58rem 0;
  border-bottom: 1px solid rgba(184, 167, 131, 0.45);
  text-decoration: none;
}

.map-part li span {
  color: var(--soft-ink);
  font-size: 0.64rem;
}

.map-part li strong {
  color: var(--blueprint);
  font-size: 0.78rem;
  font-weight: 500;
}

.map-method {
  margin-top: 4rem;
  padding: 2.5rem;
  color: #ebe2d2;
  background: var(--night);
}

.map-method h2 {
  margin: 0 0 1.5rem;
  color: #f1e9db;
  font-size: 1.45rem;
  font-weight: 500;
}

.map-method ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-method li {
  padding-top: 1rem;
  border-top: 1px solid #45616a;
}

.map-method strong,
.map-method span {
  display: block;
}

.map-method strong {
  color: #d9ad69;
  font-size: 0.83rem;
}

.map-method span {
  margin-top: 0.45rem;
  color: #adb9b6;
  font-size: 0.7rem;
}

.source-list {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.source-list > li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.2rem;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--rule);
}

.source-list > li > span {
  color: var(--brass);
  font-family: var(--display);
  font-size: 1.35rem;
}

.source-list h2 {
  margin: 0;
  color: var(--blueprint);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

.source-list p {
  margin: 0.4rem 0 0;
  color: var(--soft-ink);
  font-size: 0.76rem;
}

.source-list a {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--copper);
  font-family: var(--sans);
  font-size: 0.66rem;
}

.illustration-note {
  margin-top: 3rem;
  padding: 1.7rem 2rem;
  background: var(--pale-copper);
  border-left: 2px solid var(--copper);
}

.illustration-note h2 {
  margin: 0;
  color: var(--copper);
  font-size: 1rem;
}

.illustration-note p {
  margin: 0.5rem 0 0;
  color: var(--soft-ink);
  font-size: 0.76rem;
}

.search-panel {
  position: fixed;
  z-index: 120;
  inset: 0;
  padding: min(12vh, 7rem) 1rem 1rem;
  background: rgba(4, 19, 25, 0.72);
  backdrop-filter: blur(11px);
}

.search-panel[hidden] {
  display: none;
}

.search-panel__dialog {
  width: min(48rem, 100%);
  max-height: calc(100vh - min(12vh, 7rem) - 2rem);
  margin: 0 auto;
  padding: 2rem;
  background: var(--paper-pale);
  border: 1px solid var(--brass);
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.35);
  overflow: auto;
}

.search-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.search-panel__head h2 {
  margin: 0;
  color: var(--blueprint);
  font-size: 1.8rem;
  font-weight: 500;
}

.search-panel__head .icon-button {
  color: var(--blueprint);
  border-color: var(--rule);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-top: 1.7rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid var(--blueprint);
}

.search-box input {
  min-width: 0;
  padding: 0.6rem 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1.05rem;
}

.search-box kbd {
  padding: 0.2rem 0.4rem;
  color: var(--soft-ink);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.55rem;
}

.search-hint {
  margin: 0.8rem 0 0;
  color: var(--soft-ink);
  font-size: 0.7rem;
}

.search-results {
  margin-top: 1.4rem;
}

.search-result {
  display: block;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}

.search-result > span {
  color: var(--copper);
  font-family: var(--sans);
  font-size: 0.58rem;
}

.search-result strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--blueprint);
  font-size: 0.98rem;
  font-weight: 500;
}

.search-result p {
  margin: 0.35rem 0 0;
  color: var(--soft-ink);
  font-size: 0.72rem;
  line-height: 1.7;
}

.search-result:hover strong {
  color: var(--copper);
}

.search-empty {
  padding: 2.5rem 0;
  color: var(--soft-ink);
  text-align: center;
}

.search-empty p {
  margin: 0.3rem 0 0;
  font-size: 0.74rem;
}

.toast {
  position: fixed;
  z-index: 160;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: 0.65rem 0.9rem;
  color: #f5eddf;
  background: var(--night);
  border: 1px solid var(--brass);
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity 150ms ease, transform 150ms ease;
  font-family: var(--sans);
  font-size: 0.68rem;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript-message {
  position: fixed;
  z-index: 300;
  inset: 1rem;
  padding: 2rem;
  color: white;
  background: var(--night);
}

.mobile-only {
  display: none;
}

.dark-mode {
  --paper: #101e24;
  --paper-deep: #17272d;
  --paper-pale: #17262d;
  --ink: #e9e3d7;
  --soft-ink: #b8b1a4;
  --blueprint: #b7d8d8;
  --blueprint-2: #91bfc0;
  --copper: #d58964;
  --brass: #d5a45f;
  --rule: #52646a;
  --pale-blue: #1b333c;
  --pale-copper: #352a27;
  color-scheme: dark;
  background:
    radial-gradient(circle at 13% 10%, rgba(189, 126, 39, 0.07), transparent 24rem),
    #101e24;
}

/* The reading palette changes in dark mode, but the fixed navigation chrome
   must keep its own high-contrast ink instead of inheriting --paper-pale. */
.dark-mode .topbar,
.dark-mode .topbar .brand strong,
.dark-mode .topbar .icon-button {
  color: #f4ecdd;
}

.dark-mode .topbar .brand small {
  color: #d4c5aa;
}

.dark-mode .topbar .icon-button {
  border-color: rgba(230, 200, 141, 0.42);
}

.dark-mode .home-hero__copy h1,
.dark-mode .section-heading h2,
.dark-mode .part-card h3,
.dark-mode .chapter-margin strong,
.dark-mode .reference-hero h1,
.dark-mode .part-landing h1,
.dark-mode .part-landing__chapters strong,
.dark-mode .map-part h2,
.dark-mode .map-part li strong,
.dark-mode .source-list h2,
.dark-mode .scientist-card h3,
.dark-mode .chapter-section,
.dark-mode .prose blockquote {
  color: var(--blueprint);
}

.dark-mode .cover-stage img,
.dark-mode .chapter-illustration img {
  filter: brightness(0.9) saturate(0.9);
}

.dark-mode .reading-tools article,
.dark-mode .search-panel__dialog {
  background: #17262d;
}

.dark-mode .chapter-illustration figcaption,
.dark-mode .source-list p {
  color: #b8b1a4;
}

.dark-mode .scientist-card {
  background: #302825;
}

.dark-mode .prose ul {
  background: rgba(53, 42, 39, 0.72);
}

.dark-mode .diagram-card {
  background: rgba(27, 51, 60, 0.78);
}

.dark-mode .diagram-card img {
  filter: brightness(0.88) contrast(0.95);
}

@media (max-width: 1100px) {
  :root { --sidebar-width: 16.5rem; }
  .home-hero { gap: 3rem; padding-right: 3.5rem; padding-left: 3.5rem; }
  .chapter-layout { grid-template-columns: 7.5rem minmax(0, 42rem); gap: 2rem; }
  .part-card ol { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --sidebar-width: 19rem; }
  .mobile-only { display: inline-flex; }
  .topbar { grid-template-columns: auto 1fr auto; padding: 0 0.8rem; gap: 0.7rem; }
  .topbar > .mobile-only { grid-column: 1; }
  .brand { grid-column: 2; }
  .topbar__actions { grid-column: 3; }
  .sidebar { top: 0; z-index: 100; width: min(21rem, 88vw); transform: translateX(-105%); transition: transform 190ms ease; }
  .menu-open .sidebar { transform: translateX(0); box-shadow: 2rem 0 5rem rgba(0,0,0,.35); }
  .menu-open::after { position: fixed; z-index: 90; inset: 0; content: ""; background: rgba(4, 19, 25, 0.62); }
  .sidebar__head { padding-top: 1.5rem; }
  .sidebar__close { position: absolute; top: 1.2rem; right: 1rem; padding: .3rem .6rem; color: #eadfcd; background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; font-family: var(--sans); font-size: .62rem; }
  .app-shell { grid-template-columns: 1fr; }
  #reader { grid-column: 1; }
  .home-hero { min-height: auto; grid-template-columns: 1fr; padding-top: 4rem; }
  .cover-stage { width: min(22rem, 68vw); justify-self: center; order: 2; margin-top: 2rem; }
  .home-hero__copy { order: 1; text-align: center; }
  .home-hero__copy h1 { margin: 0 auto; }
  .home-hero__lead { margin-right: auto; margin-left: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { margin-right: auto; margin-left: auto; }
  .home-hero__credit { text-align: center; }
  .home-premise { grid-template-columns: 1fr; }
  .home-premise > p { max-width: 45rem; }
  .part-card { grid-template-columns: 6rem 1fr; }
  .part-card__number { font-size: 5rem; }
  .chapter-layout { display: block; max-width: 47rem; margin: 0 auto; }
  .chapter-margin { position: static; display: none; }
  .chapter-hero { padding-right: 2rem; padding-left: 2rem; }
  .chapter-hero__trail { left: 2rem; }
  .chapter-hero__number { right: 1rem; }
  .map-part { grid-template-columns: 1fr; }
  .map-part ol { grid-column: 1; grid-row: auto; }
}

@media (max-width: 620px) {
  :root { --topbar-height: 3.8rem; }
  .brand__mark { display: none; }
  .brand small { display: none; }
  .brand strong { font-size: 0.72rem; }
  .topbar__actions { gap: 0.25rem; }
  .icon-button { min-width: auto; min-height: 2rem; padding: 0.3rem 0.5rem; font-size: 0.6rem; }
  .home-hero { gap: 1rem; padding: 3.2rem 1.25rem 5rem; }
  .home-hero__copy h1 { font-size: 2.85rem; }
  .home-hero__lead { font-size: 0.9rem; }
  .cover-stage { width: min(19rem, 74vw); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats div:nth-child(2) { border-right: 0; }
  .hero-stats div:nth-child(-n+2) { border-bottom: 1px solid rgba(184,167,131,.5); }
  .home-premise, .journey-section { padding: 4.5rem 1.4rem; }
  .home-premise h2 { font-size: 1.75rem; }
  .part-card { grid-template-columns: 3.3rem 1fr; gap: 1rem; padding: 2.2rem 0; }
  .part-card__number { font-size: 3.4rem; }
  .part-card ol { grid-template-columns: 1fr; }
  .reading-tools { grid-template-columns: 1fr; padding: 0 1.4rem 5rem; }
  .reading-tools article + article { border-top: 0; border-left: 1px solid var(--rule); }
  .chapter-hero { min-height: 27rem; padding: 5rem 1.35rem 3.5rem; }
  .chapter-hero__trail { top: 1.3rem; left: 1.35rem; max-width: calc(100% - 2.7rem); flex-wrap: wrap; }
  .chapter-hero h1 { font-size: 2.65rem; }
  .chapter-hero__number { right: .25rem; font-size: 9rem; }
  .chapter-hero__thesis { font-size: .7rem; }
  .chapter-illustration { padding: 2rem 1rem 0; }
  .chapter-layout { padding: 3rem 1.2rem 0; }
  .chapter-body { font-size: calc(.96rem * var(--reader-scale)); }
  .equation-card { margin-right: -0.4rem; margin-left: -0.4rem; padding: 2.4rem 1.2rem 1.7rem; }
  .diagram-card { margin-right: -0.4rem; margin-left: -0.4rem; padding: 1.2rem .8rem; }
  .scientist-card { margin-right: -0.4rem; margin-left: -0.4rem; }
  .scientist-card__head { grid-template-columns: 5.8rem 1fr; gap: .85rem; }
  .scientist-card__head img { width: 5.8rem; height: 5.8rem; }
  .scientist-card__label { text-align: left; }
  .chapter-navigation { grid-template-columns: 1fr; margin-top: 4rem; padding: 0 1.2rem; }
  .chapter-navigation a + a { border-top: 0; border-left: 1px solid #355965; }
  .part-landing { padding: 4rem 1.4rem 6rem; }
  .part-landing__signal { float: none; width: 8rem; height: 8rem; margin: 0 0 3rem auto; }
  .part-landing h1 { font-size: 3rem; }
  .part-landing__chapters { grid-template-columns: 1fr; }
  .part-landing__chapters a:nth-child(odd) { padding-right: .7rem; border-right: 0; }
  .part-landing__chapters a:nth-child(even) { padding-left: 0; }
  .reference-page { padding: 4rem 1.25rem 6rem; }
  .reference-hero h1 { font-size: 2.6rem; }
  .map-part { gap: 1rem; }
  .map-part li a { grid-template-columns: 1fr; gap: .1rem; }
  .map-method { padding: 1.5rem; }
  .map-method ol { grid-template-columns: 1fr; }
  .search-panel { padding: .6rem; }
  .search-panel__dialog { max-height: calc(100vh - 1.2rem); padding: 1.25rem; }
  .search-panel__head h2 { font-size: 1.35rem; }
}



/* iPhone and iPad reading experience */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --topbar-core-height: 4.25rem;
  --topbar-height: calc(var(--topbar-core-height) + var(--safe-top));
}

html {
  scroll-padding-top: calc(var(--topbar-height) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

.topbar {
  padding-top: var(--safe-top);
  padding-right: calc(1.35rem + var(--safe-right));
  padding-left: var(--safe-left);
}

#reader,
.loading-state,
.part-landing {
  min-height: calc(100dvh - var(--topbar-height));
}

.mobile-reader-bar {
  display: none;
}

.equation-card,
.source-list,
.part-landing__chapters {
  -webkit-overflow-scrolling: touch;
}

@media (hover: none) and (pointer: coarse) {
  .icon-button,
  .continue-button,
  .primary-button,
  .mobile-reader-bar button,
  .sidebar__close,
  .toc-link,
  .toc-part__head,
  .copy-formula,
  .scientist-card__scene summary {
    min-height: 44px;
  }

  .icon-button:hover,
  .chapter-navigation a:hover,
  .toc-link:hover {
    background-color: transparent;
  }
}

@media (max-width: 860px) {
  :root {
    --topbar-core-height: 3.9rem;
    --mobile-dock-height: 4.25rem;
  }

  html {
    scroll-padding-bottom: calc(var(--mobile-dock-height) + var(--safe-bottom) + 1rem);
  }

  body {
    padding-bottom: calc(var(--mobile-dock-height) + var(--safe-bottom) + 1rem);
  }

  body.menu-open,
  body.search-open {
    overflow: hidden;
  }

  .topbar {
    padding-right: calc(.8rem + var(--safe-right));
    padding-left: calc(.8rem + var(--safe-left));
  }

  .icon-button {
    min-width: 44px;
    min-height: 44px;
  }

  .sidebar {
    width: min(24rem, calc(100vw - 2.75rem));
    touch-action: pan-y;
    padding-top: var(--safe-top);
    padding-bottom: calc(var(--safe-bottom) + 1rem);
    overscroll-behavior-y: contain;
  }

  .sidebar__head {
    padding-top: 1.5rem;
  }

  .sidebar__close {
    top: calc(var(--safe-top) + 1rem);
    right: 1rem;
    min-width: 44px;
    min-height: 44px;
  }

  .toc-link {
    min-height: 48px;
    align-items: center;
    padding-top: .65rem;
    padding-bottom: .65rem;
  }

  .toc-part__head {
    display: flex;
    min-height: 48px;
    flex-direction: column;
    justify-content: center;
  }

  .mobile-reader-bar {
    position: fixed;
    z-index: 85;
    right: max(1rem, var(--safe-right));
    bottom: calc(1rem + var(--safe-bottom));
    left: max(1rem, var(--safe-left));
    max-width: 32rem;
    min-height: var(--mobile-dock-height);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 0 auto;
    padding: .34rem;
    color: #f4ecdd;
    background: rgba(13, 38, 49, .96);
    border: 1px solid rgba(189, 126, 39, .52);
    border-radius: 1.1rem;
    box-shadow: 0 .9rem 2.4rem rgba(4, 19, 25, .34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .mobile-reader-bar button {
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .05rem;
    padding: .25rem .1rem;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: .8rem;
    cursor: pointer;
  }

  .mobile-reader-bar button:active {
    background: rgba(255, 255, 255, .1);
    transform: translateY(1px);
  }

  .mobile-reader-bar button:disabled {
    opacity: .3;
  }

  .mobile-reader-bar span {
    color: #e1b66f;
    font-family: var(--sans);
    font-size: 1.05rem;
    line-height: 1;
  }

  .mobile-reader-bar small {
    color: #e8dfcf;
    font-family: var(--sans);
    font-size: .58rem;
    letter-spacing: .04em;
    line-height: 1.25;
  }

  .chapter-view,
  .reference-page,
  .part-landing,
  .journey-section,
  .reading-tools {
    padding-bottom: calc(6rem + var(--safe-bottom));
  }

  .search-panel {
    min-height: 100dvh;
    padding-top: calc(.7rem + var(--safe-top));
    padding-right: calc(.7rem + var(--safe-right));
    padding-bottom: calc(.7rem + var(--safe-bottom));
    padding-left: calc(.7rem + var(--safe-left));
  }

  .search-panel__dialog {
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 1.4rem);
    touch-action: pan-y;
    overscroll-behavior: contain;
  }

  .search-box input {
    font-size: 16px;
  }

  .equation-card {
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }

  .copy-formula {
    padding: .65rem .8rem;
  }

  .scientist-card__scene summary {
    display: flex;
    align-items: center;
  }
}

@media (min-width: 621px) and (max-width: 860px) {
  .chapter-layout {
    padding-right: clamp(2.5rem, 8vw, 5rem);
    padding-left: clamp(2.5rem, 8vw, 5rem);
  }

  .chapter-hero {
    min-height: 30rem;
    padding-right: clamp(3rem, 9vw, 5rem);
    padding-left: clamp(3rem, 9vw, 5rem);
  }

  .chapter-hero__trail {
    left: clamp(3rem, 9vw, 5rem);
  }

  .chapter-illustration {
    padding-right: clamp(2rem, 7vw, 4rem);
    padding-left: clamp(2rem, 7vw, 4rem);
  }

  .chapter-body {
    font-size: calc(1.04rem * var(--reader-scale));
  }

  .prose > p {
    line-height: 2.05;
  }

  .scientist-card__head {
    grid-template-columns: 7.2rem 1fr;
  }

  .scientist-card__head img {
    width: 7.2rem;
    height: 7.2rem;
  }
}

@media (max-width: 620px) {
  :root {
    --topbar-core-height: 3.55rem;
    --mobile-dock-height: 4.15rem;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .35rem;
  }

  #menu-button,
  #search-button,
  #font-button {
    display: none;
  }

  .brand {
    grid-column: 1;
    min-width: 0;
  }

  .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar__actions {
    grid-column: 2;
  }

  .mobile-reader-bar {
    right: 0;
    bottom: 0;
    left: 0;
    max-width: none;
    min-height: calc(var(--mobile-dock-height) + var(--safe-bottom));
    margin: 0;
    padding: .28rem max(.35rem, var(--safe-right)) calc(.28rem + var(--safe-bottom)) max(.35rem, var(--safe-left));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
  }

  .mobile-reader-bar button {
    min-height: 50px;
  }

  .chapter-hero {
    min-height: min(27rem, calc(100dvh - var(--topbar-height)));
    padding-right: max(1.25rem, var(--safe-right));
    padding-left: max(1.25rem, var(--safe-left));
  }

  .chapter-hero__trail {
    left: max(1.25rem, var(--safe-left));
  }

  .chapter-layout {
    padding-right: max(1.15rem, var(--safe-right));
    padding-left: max(1.15rem, var(--safe-left));
  }

  .chapter-body {
    font-size: calc(1rem * var(--reader-scale));
  }

  .prose > p {
    line-height: 1.98;
    letter-spacing: -.018em;
  }

  .prose blockquote {
    padding: 1.45rem 1.15rem 1.45rem 2.6rem;
  }

  .prose ul {
    padding-right: 1rem;
    padding-left: 2.15rem;
  }

  .equation-card {
    margin-right: calc(-1 * max(.4rem, var(--safe-right)));
    margin-left: calc(-1 * max(.4rem, var(--safe-left)));
    padding-right: max(1.1rem, var(--safe-right));
    padding-left: max(1.1rem, var(--safe-left));
  }

  .math-display {
    font-size: clamp(.86rem, 4.15vw, 1.08rem);
  }

  .scientist-card__head {
    grid-template-columns: 5.15rem minmax(0, 1fr);
  }

  .scientist-card__head img {
    width: 5.15rem;
    height: 5.15rem;
  }

  .scientist-card h3 {
    font-size: calc(.94rem * var(--reader-scale));
    line-height: 1.55;
  }

  .search-panel {
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  }

  .search-panel__dialog {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    min-height: 100dvh;
    padding: calc(1rem + var(--safe-top)) 1.1rem calc(1rem + var(--safe-bottom));
    border: 0;
    border-radius: 0;
  }
}

@media (max-width: 620px) and (orientation: landscape) {
  :root {
    --topbar-core-height: 3.2rem;
    --mobile-dock-height: 3.75rem;
  }

  .chapter-hero {
    min-height: 21rem;
  }

  .mobile-reader-bar button {
    min-height: 44px;
  }
}


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  .topbar, .sidebar, .mobile-reader-bar, .chapter-margin, .chapter-navigation, .copy-formula { display: none !important; }
  .app-shell { display: block; padding: 0; }
  #reader { display: block; }
  .chapter-hero { min-height: 0; padding: 2rem 0; color: var(--ink); background: transparent; }
  .chapter-hero h1 { color: var(--ink); }
  .chapter-layout { display: block; padding: 2rem 0; }
  .equation-card { color: var(--ink); background: transparent; border-color: var(--rule); }
  .math-display { color: var(--ink); }
}
