::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.82);
  --shadow: 0 24px 60px rgba(18, 31, 40, 0.16);
  --max: 1420px;
  --network-max: 1560px;
  --stage-height: 410px;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  position: relative;
  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;
  z-index: 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: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  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.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--teal);
  margin: 0 0 0.55rem;
}

.hero h1,
.section h2,
.network-board h3,
.detail-panel h3 {
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: 0;
}

.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;
}

.archive-visual {
  position: relative;
  margin: 2rem 0 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(19, 32, 41, 0.1);
  box-shadow: var(--shadow);
  background: rgba(255, 250, 243, 0.72);
}

.archive-visual img {
  display: block;
  width: 100%;
  height: clamp(250px, 32vw, 430px);
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}

.archive-visual--hero img {
  object-position: 50% 42%;
}

.archive-visual--wide {
  margin: 0;
}

.archive-visual--wide img {
  height: clamp(240px, 28vw, 380px);
  object-position: 50% 43%;
}

.archive-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(19, 32, 41, 0.45));
}

.archive-visual figcaption {
  position: absolute;
  z-index: 1;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 62rem;
  margin: 0;
  padding: 0.62rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.86);
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.42;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(19, 32, 41, 0.08);
}

.archive-visual a {
  color: var(--teal);
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.section-divider {
  width: min(calc(100% - 2rem), var(--max));
  height: 22px;
  margin: -0.8rem auto 1.2rem;
  overflow: hidden;
  opacity: 0.82;
}

.section-divider::before {
  content: "";
  display: block;
  width: calc(100% + 80px);
  height: 1px;
  margin-left: -80px;
  background: repeating-linear-gradient(
    90deg,
    rgba(43, 94, 103, 0.46) 0 12px,
    transparent 12px 24px,
    rgba(155, 82, 53, 0.34) 24px 36px,
    transparent 36px 52px
  );
  transform: translateX(0);
  animation: dividerDrift 24s linear infinite;
}

.section-divider--tight {
  margin-top: 0.2rem;
  margin-bottom: -0.2rem;
}

@keyframes dividerDrift {
  to {
    transform: translateX(80px);
  }
}

.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: 4.1rem 0;
}

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

.section--visual-context {
  padding-top: 1.1rem;
  padding-bottom: 1.4rem;
}

.section__intro {
  max-width: 68rem;
  margin-bottom: 1.45rem;
}

.section h2 {
  max-width: 24ch;
  margin: 0 0 0.7rem;
  font-size: clamp(1.85rem, 3vw, 2.85rem);
  line-height: 1.08;
  font-weight: 700;
}

.section__intro p:last-child {
  max-width: 78rem;
  margin: 0;
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  line-height: 1.62;
  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: "Source Serif 4", Georgia, serif;
  font-size: 2rem;
  line-height: 1.05;
}

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

.network-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(244, 235, 218, 0.78);
  border: 1px solid rgba(19, 32, 41, 0.1);
}

.network-toolbar__hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 700;
}

.network-layout {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) minmax(320px, 370px);
  gap: 1.2rem;
  align-items: stretch;
}

.network-layout > * {
  min-width: 0;
}

.network-board {
  border-radius: var(--radius-xl);
  padding: 1rem;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.9), rgba(246, 236, 220, 0.84));
}

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

.network-board__header h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.08;
}

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

.network-scroll {
  overflow: hidden;
  width: 100%;
  min-width: 0;
  height: var(--stage-height);
  min-height: 0;
  padding: 0.7rem;
  border-radius: calc(var(--radius-xl) - 6px);
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.76), rgba(238, 226, 205, 0.64));
  border: 1px solid rgba(19, 32, 41, 0.1);
  overscroll-behavior: none;
}

.network-zoom {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
}

.network-stage {
  position: relative;
  width: 100%;
  height: 100%;
  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.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 18px 34px rgba(19, 32, 41, 0.12);
}

.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-stage__lines {
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.network-stage__nodes {
  width: 100%;
  height: 100%;
  z-index: 2;
}

.network-edge {
  fill: none;
  stroke: rgba(43, 94, 103, 0.46);
  stroke-width: 0.42;
  stroke-linecap: round;
  transition: opacity 220ms ease, stroke 220ms ease, stroke-width 220ms ease;
}

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

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

.network-relation-label {
  position: absolute;
  z-index: 4;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.94);
  border: 1px solid rgba(19, 32, 41, 0.13);
  box-shadow:
    0 8px 18px rgba(19, 32, 41, 0.12),
    0 0 0 3px rgba(255, 251, 245, 0.5);
  color: rgba(19, 32, 41, 0.9);
  font-size: clamp(0.78rem, 0.82vw, 0.88rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.network-node {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  width: 136px;
  min-height: 70px;
  padding: 0.58rem 0.62rem;
  border-radius: 13px;
  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;
  z-index: 3;
  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%, -52%);
  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);
  z-index: 5;
}

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

.network-node__type::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  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: "Source Serif 4", Georgia, serif;
  font-size: 0.92rem;
  line-height: 1.08;
}

.network-node--child {
  width: 168px;
  min-height: 92px;
}

.network-node__note {
  display: none;
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  line-height: 1.38;
  color: var(--ink-soft);
}

.network-node.is-selected .network-node__note {
  display: none;
}

.detail-panel {
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.3rem;
  min-height: 100%;
  position: sticky;
  top: 5.2rem;
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.92), rgba(246, 236, 220, 0.84));
}

.detail-panel h3 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 2vw, 2.1rem);
  line-height: 1.06;
}

.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: 0.85rem;
  padding: 0 0.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: "Source Serif 4", Georgia, serif;
  font-size: 2rem;
  line-height: 1.06;
}

.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: "Source Serif 4", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.08;
}

.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);
}

@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;
    position: static;
  }
}

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

  .hero__veil {
    inset: 1rem;
  }

  .archive-visual figcaption {
    max-width: none;
    border-radius: var(--radius-md);
  }

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

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

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

  .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;
  }

  .network-scroll {
    height: auto;
    overflow: visible;
  }

  .network-zoom,
  .network-stage {
    height: auto;
    min-height: 0;
  }

  .network-stage {
    padding: 0.7rem;
    overflow: visible;
  }

  .network-stage::before,
  .network-stage__lines,
  .network-relation-label {
    display: none;
  }

  .network-stage__nodes {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.58rem;
  }

  .archive-visual img {
    height: 260px;
  }

  .archive-visual figcaption {
    position: static;
    border-radius: 0;
    background: rgba(255, 251, 245, 0.92);
  }

  .archive-visual::after {
    content: none;
  }

  .network-node {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    min-height: 0;
    padding: 0.5rem 0.52rem;
  }

  .network-node--child {
    width: 100%;
    min-height: 0;
  }

  .network-node__type {
    font-size: 0.55rem;
  }

  .network-node__title {
    margin-top: 0.32rem;
    font-size: 0.74rem;
  }

  .network-node.is-selected .network-node__note {
    display: none;
  }

  .network-node:hover,
  .network-node:focus-visible {
    transform: none;
  }
}
