:root {
  /* compliance tokens: International Typographic Style** filtered lens IntersectionObserver when into `ease-in-out` timing. Interstitial Diagrams:** Between panels */
  --bg-mist: #f4f5f7;
  --text-graphite: #2c3340;
  --text-slate: #5c6678;
  --accent-cobalt: #4a7cbe;
  --muted-harbor: #8e9aab;
  --stroke-steel: #b0b8c4;
  --field-ice: #e8edf4;
  --deep-monopole: #2b4a7a;
  --font-display: 'Nunito', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;
  --font-mono: 'Azeret Mono', monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-mist);
  color: var(--text-graphite);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  line-height: 1.72;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(176, 184, 196, 0.16) 1px, transparent 1px);
  background-size: calc(100vw / 12) 100%;
  opacity: 0.28;
  z-index: 0;
}

.monograph {
  position: relative;
  z-index: 1;
}

.progress-field {
  position: fixed;
  right: 1.5rem;
  top: 20vh;
  width: 1px;
  height: 60vh;
  background: var(--stroke-steel);
  z-index: 20;
}

#progressDot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cobalt);
  box-shadow: 0 0 8px rgba(74, 124, 190, 0.3);
  transform: translate(-50%, 0);
}

.opening-field {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2rem;
}

.hero-field {
  position: absolute;
  inset: -5vh -4vw;
  width: 108vw;
  height: 110vh;
  pointer-events: none;
}

.field-svg path,
.field-svg circle,
.field-svg rect,
.colophon svg path,
.colophon svg circle {
  fill: none;
  stroke: var(--stroke-steel);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.hero-lines path {
  stroke: var(--accent-cobalt);
  stroke-width: 1.15;
  opacity: 0.72;
  stroke-dasharray: var(--path-length, 1000);
  stroke-dashoffset: var(--path-length, 1000);
  transition: stroke-dashoffset 1.8s ease-in-out, stroke 1.8s ease-out;
}

body.loaded .hero-lines path {
  stroke-dashoffset: 0;
}

.source-ring {
  stroke: var(--deep-monopole) !important;
  stroke-width: 1.4 !important;
  opacity: 0;
  transition: opacity 600ms ease-out 900ms;
}

body.loaded .source-ring {
  opacity: 1;
}

.hero-copy {
  position: relative;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease-out 150ms, transform 600ms ease-out 150ms;
}

body.loaded .hero-copy {
  opacity: 1;
  transform: translateY(0);
}

.kicker,
.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-harbor);
}

h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  line-height: 1.12;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: 800;
}

h1 span {
  color: var(--text-graphite);
}

h1 em {
  color: var(--text-slate);
  font-style: normal;
}

.subtitle {
  margin: 1.1rem 0 0;
  color: var(--text-slate);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease-out 400ms, transform 600ms ease-out 400ms;
}

body.loaded .subtitle {
  opacity: 1;
  transform: translateY(0);
}

.chapter {
  position: relative;
  min-height: 80vh;
  padding: clamp(3rem, 8vw, 6rem) 8vw;
}

.chapter-copy {
  max-width: 42rem;
  position: relative;
}

.chapter-left .chapter-copy {
  margin-left: 0;
  margin-right: auto;
}

.chapter-right .chapter-copy {
  margin-left: auto;
  margin-right: 0;
}

.chapter-number {
  position: absolute;
  top: clamp(2rem, 7vw, 5rem);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(6rem, 17vw, 14rem);
  line-height: 0.8;
  color: var(--field-ice);
  z-index: -1;
}

.chapter-left .chapter-number {
  left: 5vw;
}

.chapter-right .chapter-number {
  right: 5vw;
}

h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text-graphite);
}

p {
  margin: 0 0 1.25rem;
}

sup {
  color: var(--accent-cobalt);
  font-family: var(--font-mono);
  font-size: 0.68em;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--deep-monopole);
}

.dropcap {
  float: left;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.6em;
  line-height: 0.85;
  margin-right: 0.08em;
  color: var(--accent-cobalt);
}

blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 1px solid var(--accent-cobalt);
  color: var(--text-graphite);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.38;
}

hr {
  border: 0;
  height: 1px;
  background: var(--stroke-steel);
  margin: 2rem 0;
}

.definition {
  color: var(--text-slate);
}

.margin-note {
  position: absolute;
  width: 200px;
  color: var(--muted-harbor);
  font-size: 0.82rem;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(20px);
}

.margin-note::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  width: 76px;
  border-top: 1px dashed var(--stroke-steel);
}

.margin-note span {
  display: inline-block;
  color: var(--accent-cobalt);
  font-family: var(--font-mono);
  margin-right: 0.3rem;
}

.note-right {
  right: 5vw;
  top: 43%;
}

.note-right::before {
  right: calc(100% + 1rem);
}

.note-left {
  left: 5vw;
  top: 43%;
}

.note-left::before {
  left: calc(100% + 1rem);
}

.diagram-band {
  width: 100vw;
  height: 30vh;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.diagram {
  width: 100vw;
  height: 100%;
}

.diagram-lines path,
.diagram-lines circle,
.diagram-lines rect {
  stroke-dasharray: var(--path-length, 1000);
  stroke-dashoffset: var(--path-length, 1000);
  transition: stroke-dashoffset 1.2s ease-in-out;
}

.diagram-lines .accent-path {
  stroke: var(--accent-cobalt);
}

.diagram-labels {
  opacity: 0;
  transition: opacity 400ms ease-out 1.2s;
}

.diagram-labels text {
  fill: var(--muted-harbor);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.diagram-band.in-view .diagram-lines path,
.diagram-band.in-view .diagram-lines circle,
.diagram-band.in-view .diagram-lines rect {
  stroke-dashoffset: 0;
}

.diagram-band.in-view .diagram-labels {
  opacity: 1;
}

.chapter .eyebrow,
.chapter h2,
.chapter p,
.chapter blockquote,
.chapter hr,
.chapter .chapter-number {
  opacity: 0;
  transform: translateY(20px);
}

.chapter.in-view .eyebrow,
.chapter.in-view h2,
.chapter.in-view p,
.chapter.in-view blockquote,
.chapter.in-view hr,
.chapter.in-view .chapter-number,
.chapter.in-view .margin-note {
  animation: bounceEnter 720ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.chapter.in-view .chapter-number { animation-delay: 0ms; }
.chapter.in-view .eyebrow { animation-delay: 60ms; }
.chapter.in-view h2 { animation-delay: 120ms; }
.chapter.in-view p:nth-of-type(1) { animation-delay: 180ms; }
.chapter.in-view p:nth-of-type(2) { animation-delay: 240ms; }
.chapter.in-view blockquote,
.chapter.in-view hr { animation-delay: 300ms; }
.chapter.in-view .definition { animation-delay: 360ms; }
.chapter.in-view .margin-note { animation-delay: 420ms; }

@keyframes bounceEnter {
  0% { opacity: 0; transform: translateY(20px); }
  70% { opacity: 1; transform: translateY(-2px); }
  100% { opacity: 1; transform: translateY(0); }
}

.colophon {
  max-width: 36rem;
  margin: 3rem auto 0;
  padding: 4rem 2rem 5rem;
  text-align: center;
  color: var(--text-slate);
  border-top: 1px solid var(--stroke-steel);
}

.colophon svg {
  width: 160px;
  height: 80px;
  margin-bottom: 1rem;
}

.colophon svg circle {
  stroke: var(--deep-monopole);
}

.colophon p {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--deep-monopole);
}

.colophon small {
  display: block;
  font-size: 0.82rem;
  line-height: 1.55;
}

@media (min-width: 1201px) {
  .chapter-right .chapter-copy {
    margin-left: calc(100vw - 42rem - 16vw);
  }
}

@media (max-width: 1200px) {
  .chapter,
  .chapter-left .chapter-copy,
  .chapter-right .chapter-copy {
    margin: 0;
  }

  .chapter-copy {
    max-width: 44rem;
  }

  .margin-note {
    position: relative;
    inset: auto;
    width: auto;
    margin: 1.5rem 0 0;
    padding: 1rem 1rem 1rem 1.15rem;
    background: var(--field-ice);
    border-left: 2px solid var(--accent-cobalt);
  }

  .margin-note::before {
    display: none;
  }
}

@media (max-width: 700px) {
  .progress-field {
    right: 0.75rem;
  }

  .chapter {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .chapter-number {
    font-size: 5rem;
  }
}
