::selection {
  background: rgba(182, 106, 54, 0.18);
  color: #132029;
}

:root {
  --paper: #efe5d1;
  --paper-deep: #e5d3b2;
  --ink: #132029;
  --ink-soft: #30424a;
  --teal: #2b5e67;
  --teal-bright: #4d7f88;
  --rust: #9b5235;
  --gold: #c69755;
  --line: rgba(23, 38, 46, 0.14);
  --card: rgba(255, 250, 243, 0.72);
  --shadow: 0 24px 60px rgba(18, 31, 40, 0.16);
  --max: 1420px;
  --network-max: 1740px;
  --stage-width: 1360px;
  --stage-height: 1000px;
  --zoom: 1;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(77, 127, 136, 0.18), transparent 32%),
    radial-gradient(circle at 85% 18%, rgba(198, 151, 85, 0.2), transparent 24%),
    linear-gradient(180deg, #f8f1e4 0%, var(--paper) 38%, #ebdfc8 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.04));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent clamp(14px, 3.7vw, 42px),
      rgba(19, 32, 41, 0.24) clamp(14px, 3.7vw, 42px),
      rgba(19, 32, 41, 0.24) calc(clamp(14px, 3.7vw, 42px) + 1px),
      transparent calc(clamp(14px, 3.7vw, 42px) + 1px),
      transparent calc(100% - clamp(14px, 3.7vw, 42px) - 1px),
      rgba(19, 32, 41, 0.24) calc(100% - clamp(14px, 3.7vw, 42px) - 1px),
      rgba(19, 32, 41, 0.24) calc(100% - clamp(14px, 3.7vw, 42px)),
      transparent calc(100% - clamp(14px, 3.7vw, 42px))
    );
  opacity: 0.78;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.hero {
  position: relative;
  padding: 6rem 1.5rem 4rem;
  isolation: isolate;
}

.hero__veil {
  position: absolute;
  inset: 1.5rem;
  border-radius: 40px;
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.85), rgba(255, 244, 229, 0.52)),
    radial-gradient(circle at top right, rgba(43, 94, 103, 0.22), transparent 30%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(19, 32, 41, 0.08);
}

.hero__content {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.2rem;
}

.eyebrow,
.section__kicker,
.network-board__eyebrow,
.detail-panel__eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--teal);
  margin: 0 0 0.9rem;
}

.hero h1,
.section h2,
.network-board h3,
.detail-panel h3 {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: -0.02em;
}

.hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.92;
  font-weight: 700;
}

.hero h1 span {
  display: block;
  color: var(--rust);
}

.hero__lead {
  max-width: 58rem;
  margin: 1.4rem 0 0;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.meta-card,
.network-board,
.detail-panel,
.timeline__item,
.mechanism-card,
.source-ribbon__card,
.note-card,
.footer-note {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(19, 32, 41, 0.08);
  box-shadow: var(--shadow);
}

.meta-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
}

.meta-card p {
  margin: 0;
  line-height: 1.62;
  color: var(--ink-soft);
}

.meta-card__label {
  display: block;
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.chapter-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto;
  width: min(calc(100% - 2rem), var(--max));
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.72);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(19, 32, 41, 0.08);
  box-shadow: 0 12px 28px rgba(19, 32, 41, 0.08);
}

.chapter-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.chapter-nav a:hover,
.chapter-nav a:focus-visible {
  background: rgba(43, 94, 103, 0.11);
  outline: none;
}

.section {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 5rem 0;
}

.section--network {
  width: min(calc(100% - 2rem), var(--network-max));
}

.section__intro {
  max-width: 58rem;
  margin-bottom: 2rem;
}

.section h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 0.95;
}

.section__intro p:last-child {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.note-card {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
}

.note-card__eyebrow {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--teal);
}

.note-card h3 {
  margin: 0 0 0.8rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 0.95;
}

.note-card p:last-child {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.66;
}

.network-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(255, 248, 238, 0.72);
  border: 1px solid rgba(19, 32, 41, 0.08);
  box-shadow: 0 12px 26px rgba(19, 32, 41, 0.08);
}

.network-toolbar__hint {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.zoom-button {
  appearance: none;
  min-width: 3.15rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(19, 32, 41, 0.12);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.94);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.zoom-button:hover,
.zoom-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(43, 94, 103, 0.32);
  background: rgba(255, 255, 255, 0.98);
  outline: none;
}

.network-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 1.2rem;
  align-items: start;
}

.network-board {
  border-radius: var(--radius-xl);
  padding: 1.3rem;
}

.network-board__header {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.network-board__header h3 {
  margin: 0;
  font-size: 2.1rem;
}

.network-board__summary {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.network-scroll {
  overflow: auto;
  width: 100%;
  min-height: var(--stage-height);
  padding: 0 0.75rem 0.75rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(43, 94, 103, 0.5) rgba(19, 32, 41, 0.08);
}

.network-scroll::-webkit-scrollbar {
  width: 13px;
  height: 13px;
}

.network-scroll::-webkit-scrollbar-thumb {
  background: rgba(43, 94, 103, 0.38);
  border-radius: 999px;
  border: 3px solid rgba(255, 249, 239, 0.7);
}

.network-scroll::-webkit-scrollbar-track {
  background: rgba(19, 32, 41, 0.06);
  border-radius: 999px;
}

.network-zoom {
  display: grid;
  justify-items: center;
  align-items: start;
  width: max(100%, calc(var(--stage-width) * var(--zoom)));
  height: max(var(--stage-height), calc(var(--stage-height) * var(--zoom)));
  min-width: 100%;
  min-height: var(--stage-height);
}

.network-stage {
  position: relative;
  width: var(--stage-width);
  height: var(--stage-height);
  border-radius: calc(var(--radius-xl) - 10px);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(77, 127, 136, 0.18), transparent 24%),
    radial-gradient(circle at 83% 22%, rgba(198, 151, 85, 0.2), transparent 20%),
    linear-gradient(180deg, rgba(255, 251, 245, 0.92), rgba(243, 232, 214, 0.72));
  border: 1px solid rgba(19, 32, 41, 0.08);
  transform: scale(var(--zoom));
  transform-origin: top center;
}

.network-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(19, 32, 41, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 32, 41, 0.06) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.4;
}

.network-stage__lines,
.network-stage__nodes {
  position: absolute;
  inset: 0;
}

.network-edge {
  fill: none;
  stroke: rgba(43, 94, 103, 0.4);
  stroke-width: 0.3;
  stroke-linecap: round;
  stroke-dasharray: 0.9 0.65;
  animation: drift 14s linear infinite;
  transition: opacity 220ms ease, stroke 220ms ease, stroke-width 220ms ease;
}

.network-edge.is-dimmed {
  opacity: 0.12;
}

.network-edge.is-active {
  stroke: rgba(155, 82, 53, 0.92);
  stroke-width: 0.48;
  opacity: 1;
}

.network-edge-label {
  fill: rgba(19, 32, 41, 0.88);
  font-size: 1.72px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  paint-order: stroke fill;
  stroke: rgba(251, 247, 239, 0.92);
  stroke-width: 0.55px;
  stroke-linejoin: round;
}

.network-edge-label-bg {
  fill: rgba(251, 247, 239, 0.84);
  stroke: rgba(19, 32, 41, 0.08);
  stroke-width: 0.12px;
}

.network-node {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  width: clamp(152px, 15vw, 214px);
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(19, 32, 41, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 254, 251, 0.94), rgba(248, 238, 224, 0.78));
  box-shadow: 0 14px 32px rgba(19, 32, 41, 0.11);
  cursor: pointer;
  text-align: left;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
}

.network-node::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border-top: 3px solid var(--accent, var(--teal));
  opacity: 0.9;
}

.network-node:hover,
.network-node:focus-visible {
  transform: translate(-50%, -54%);
  box-shadow: 0 22px 38px rgba(19, 32, 41, 0.18);
  border-color: rgba(43, 94, 103, 0.28);
  outline: none;
}

.network-node.is-selected {
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(254, 241, 222, 0.92));
  border-color: rgba(155, 82, 53, 0.34);
  box-shadow: 0 26px 44px rgba(155, 82, 53, 0.14);
}

.network-node__type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--teal);
}

.network-node__type::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent, var(--teal));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--teal)) 16%, transparent);
}

.network-node__title {
  margin: 0.45rem 0 0.25rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  line-height: 0.94;
}

.network-node__note {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.detail-panel {
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.3rem;
  min-height: calc(var(--stage-height) - 16px);
}

.detail-panel h3 {
  margin: 0 0 0.65rem;
  font-size: 2.25rem;
  line-height: 0.94;
}

.detail-panel__text {
  margin: 0 0 1rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

.detail-panel__facts {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.7rem;
}

.detail-panel__facts li {
  line-height: 1.58;
}

.detail-panel__links {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(19, 32, 41, 0.1);
  padding-top: 1rem;
}

.detail-panel__links span {
  display: block;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--teal);
}

.detail-link {
  display: inline-flex;
  margin: 0 0.45rem 0.45rem 0;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(43, 94, 103, 0.09);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.detail-panel__link-row {
  display: flex;
  flex-wrap: wrap;
}

.network-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.legend-dot {
  display: inline-block;
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 999px;
  margin-right: 0.35rem;
}

.legend-dot--actor {
  background: var(--teal);
}

.legend-dot--institution {
  background: var(--rust);
}

.legend-dot--child {
  background: var(--gold);
}

.mechanism-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mechanism-card {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
}

.mechanism-card__eyebrow {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--teal);
}

.mechanism-card h3,
.source-ribbon__card h3 {
  margin: 0 0 0.8rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 0.95;
}

.mechanism-card p,
.source-ribbon__card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.66;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.timeline__item {
  position: relative;
  padding: 1.25rem 1rem 1rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.timeline__item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--rust), var(--gold));
}

.timeline__date {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(43, 94, 103, 0.1);
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline__item h3 {
  margin: 0 0 0.6rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  line-height: 0.98;
}

.timeline__item p {
  margin: 0;
  line-height: 1.66;
  color: var(--ink-soft);
}

.mechanism-card {
  min-height: 250px;
}

.mechanism-card ul {
  margin: 1rem 0 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.55rem;
}

.mechanism-card li {
  line-height: 1.52;
}

.source-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.source-ribbon__card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.source-list {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.7rem;
  color: var(--ink-soft);
}

.source-list li {
  line-height: 1.58;
}

.source-list a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.section--footer {
  padding-top: 1rem;
  padding-bottom: 5rem;
}

.footer-note {
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

.source-ribbon__card span {
  display: inline-flex;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--teal);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

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

@keyframes drift {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -12;
  }
}

@media (max-width: 1080px) {
  .hero__meta,
  .source-ribbon,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .mechanism-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .network-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 4rem;
  }

  .hero__veil {
    inset: 1rem;
  }

  .network-board__header {
    grid-template-columns: 1fr;
  }

  .network-toolbar {
    align-items: stretch;
  }

  .zoom-controls {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  :root {
    --stage-width: 1120px;
    --stage-height: 860px;
  }

  .section,
  .hero {
    width: calc(100% - 1rem);
    padding-left: 0;
    padding-right: 0;
  }

  .hero__content {
    padding: 1.2rem;
  }

  .chapter-nav {
    width: calc(100% - 1rem);
    border-radius: 28px;
    justify-content: flex-start;
  }

  .chapter-nav a {
    font-size: 0.84rem;
  }

  .network-board,
  .detail-panel,
  .timeline__item,
  .mechanism-card,
  .source-ribbon__card {
    padding: 1rem;
  }

  body::after {
    opacity: 0.45;
  }
}
