:root {
  /* Design language terms preserved: Interactions flipping pages bound someone has annotated Interactive System:** System:* System: System:::::::::::::::: IntersectionObserver (threshold: 0.15 states uses (300ms heading (weight (small (Google These reference paginated academic texts. */
  --fired-terracotta: #c4654a;
  --spray-amber: #d4943c;
  --bone-chalk: #f2ebe0;
  --warm-graphite: #3d3432;
  --deep-kiln: #2a2226;
  --sienna-dust: #b87861;
  --concrete-cream: #e8ddd0;
  --charcoal-rust: #5c3d36;
  --book-edge: #c4a882;
  --faded-slate: #8a7e76;
  --old-sienna: #8b6848;
  --hero-gradient: linear-gradient(160deg, #2a2226 0%, #5c3d36 100%);
  --ease-heavy: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bone-chalk);
  color: var(--warm-graphite);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.72;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

.filter-bank {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.spine-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 48px;
  min-height: 100vh;
  background: var(--deep-kiln);
  border-right: 1px solid rgba(196, 168, 130, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: clamp(28px, 7vh, 72px) 0;
}

.spine-label,
.mobile-label {
  border: 0;
  background: transparent;
  color: var(--faded-slate);
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  font-variant: all-small-caps;
  cursor: pointer;
  transition: color 300ms ease, text-shadow 300ms ease, background 300ms ease;
}

.spine-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 12px 6px;
}

.spine-label.active,
.mobile-label.active {
  color: var(--fired-terracotta);
  text-shadow: 0 0 12px rgba(196, 101, 74, 0.3);
}

.spine-label:hover,
.mobile-label:hover { color: var(--spray-amber); }

.mobile-spine {
  display: none;
  position: fixed;
  z-index: 35;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: var(--deep-kiln);
  border-top: 1px solid rgba(196, 168, 130, 0.24);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 8px;
  gap: 8px;
}

.mobile-label {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 9px 14px;
}

.volume-stack { margin-left: 48px; }

.volume {
  position: relative;
  min-height: 100vh;
  padding: clamp(80px, 12vh, 160px) clamp(22px, 6vw, 96px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--book-edge);
  filter: url(#paper-noise);
}

.hero-volume {
  background: var(--hero-gradient);
  color: var(--bone-chalk);
}

.light-volume { background: var(--bone-chalk); }
.cream-volume { background: var(--concrete-cream); }
.dark-volume { background: var(--deep-kiln); color: var(--bone-chalk); }
.final-volume { min-height: 92vh; }

.transition-zone {
  position: relative;
  height: 24px;
  background: var(--concrete-cream);
  overflow: visible;
  border-block: 1px solid rgba(139, 104, 72, 0.32);
}

.transition-zone.sienna { background: rgba(196, 168, 130, 0.42); }

.ink-content {
  width: min(720px, 100%);
  position: relative;
  z-index: 4;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease-in, transform 500ms ease-in;
}

.volume.revealed .ink-content {
  opacity: 1;
  transform: translateY(0);
}

.hero-ink { text-align: center; }

.ruled { border-left: 1px solid rgba(184, 120, 97, 0.4); padding-left: clamp(18px, 3vw, 34px); }

.system-line,
.folio {
  margin: 0 0 18px;
  color: var(--faded-slate);
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  font-variant: all-small-caps;
}

.hero-volume .system-line { color: var(--book-edge); }

h1,
h2 {
  margin: 0 0 24px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(4rem, 8vw, 9.4rem);
  letter-spacing: -0.03em;
  color: var(--bone-chalk);
}

h2 {
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  color: var(--fired-terracotta);
}

.dark-volume h2 { color: var(--bone-chalk); }

p { margin: 0 0 1.35rem; }

em { color: var(--fired-terracotta); }

.hand-note,
.margin-graffiti,
blockquote,
.closing-note {
  font-family: "Caveat", cursive;
  color: var(--spray-amber);
}

.title-note {
  margin: -10px 0 0;
  font-size: clamp(1.3rem, 3vw, 2.3rem);
  transform: rotate(-1deg);
}

.wobble-line {
  width: min(360px, 72vw);
  height: 30px;
  margin: 0 auto 34px;
}

.wobble-line path {
  fill: none;
  stroke: var(--spray-amber);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
}

.hero-volume.revealed .wobble-line path { animation: drawUnderline 600ms ease-out 260ms forwards; }

@keyframes drawUnderline { to { stroke-dashoffset: 0; } }

.margin-graffiti {
  position: absolute;
  width: 155px;
  left: -190px;
  top: 92px;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  transform: rotate(-2deg) translateX(-16px);
  opacity: 0;
  transition: opacity 420ms ease 200ms, transform 420ms ease 200ms;
}

.volume.revealed .margin-graffiti { opacity: 1; transform: rotate(-2deg) translateX(0); }
.volume.revealed .margin-graffiti.rotate-plus { transform: rotate(2deg) translateX(0); }

blockquote {
  margin: 34px 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.95;
  color: var(--fired-terracotta);
  transform: rotate(-1deg);
}

.closing-note {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid rgba(184, 120, 97, 0.38);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.page-number {
  position: absolute;
  right: clamp(20px, 4vw, 54px);
  bottom: clamp(24px, 5vw, 58px);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--faded-slate);
  color: var(--faded-slate);
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 0.75rem;
}

.skeleton-set {
  position: absolute;
  z-index: 6;
  width: min(720px, calc(100% - 44px));
  display: grid;
  gap: 14px;
  opacity: 0;
}

.skeleton-set span {
  display: block;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(90deg, #e8ddd0 25%, #f2ebe0 50%, #e8ddd0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-set.dark span { background: linear-gradient(90deg, rgba(92,61,54,0.95) 25%, rgba(196,168,130,0.35) 50%, rgba(92,61,54,0.95) 75%); background-size: 200% 100%; }
.hero-skeleton span { background: linear-gradient(90deg, rgba(196,168,130,0.2) 25%, rgba(242,235,224,0.72) 50%, rgba(196,168,130,0.2) 75%); background-size: 200% 100%; }

.volume.loading .skeleton-set { opacity: 1; }
.volume.revealing .skeleton-set { animation: skeletonOut 400ms ease-out forwards; }

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes skeletonOut { to { opacity: 0; } }

sup.footnote-trigger {
  color: var(--fired-terracotta);
  cursor: pointer;
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 0.72em;
  padding-inline: 2px;
}

.footnote-tooltip {
  position: fixed;
  z-index: 60;
  max-width: 300px;
  padding: 11px 14px;
  border-radius: 2px;
  background: rgba(212, 148, 60, 0.95);
  color: var(--deep-kiln);
  font-family: "Caveat", cursive;
  font-size: 0.95rem;
  line-height: 1.25;
  box-shadow: 0 4px 16px rgba(42, 34, 38, 0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms cubic-bezier(0.34, 1.56, 0.64, 1), transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footnote-tooltip.visible { opacity: 1; transform: translateY(0); }

.redaction-volume {
  padding: 40px clamp(22px, 6vw, 96px);
  background: var(--concrete-cream);
  border-block: 1px solid rgba(139, 104, 72, 0.32);
}

.redaction-volume.rust { background: var(--bone-chalk); }

.redaction-bars {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 6px;
}

.redaction-bars span {
  display: block;
  height: 14px;
  background: var(--charcoal-rust);
  opacity: 0;
  transform: translateX(-30px);
  transition: background 150ms ease;
}

.redaction-volume.revealed .redaction-bars span { animation: redactionIn 600ms ease forwards; }
.redaction-volume.revealed .redaction-bars span:nth-child(2) { animation-delay: 80ms; }
.redaction-volume.revealed .redaction-bars span:nth-child(3) { animation-delay: 160ms; }
.redaction-volume.revealed .redaction-bars span:nth-child(4) { animation-delay: 240ms; }
.redaction-volume.revealed .redaction-bars span:nth-child(5) { animation-delay: 320ms; }
.redaction-volume.revealed .redaction-bars span:nth-child(6) { animation-delay: 400ms; }
.redaction-bars span:hover { background: var(--fired-terracotta); }

@keyframes redactionIn { to { opacity: 1; transform: translateX(0); } }

.blob-field,
.transition-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.blob-field i,
.transition-blobs i {
  position: absolute;
  display: block;
  width: var(--size, 130px);
  height: var(--size, 130px);
  filter: blur(2px);
  opacity: 0.1;
  background: var(--blob-color, #c4654a);
  clip-path: path("M68 4 C101 -4 130 20 137 53 C146 92 118 121 83 133 C45 146 9 126 3 88 C-5 50 29 11 68 4 Z");
  transform: translateY(var(--drift, 0px));
}

.blob-field i:nth-child(1) { --size: 190px; --blob-color: #c4654a; top: 12%; right: 8%; }
.blob-field i:nth-child(2) { --size: 120px; --blob-color: #d4943c; bottom: 17%; left: 9%; }
.blob-field i:nth-child(3) { --size: 88px; --blob-color: #b87861; top: 55%; right: 22%; }
.blob-field i:nth-child(4) { --size: 155px; --blob-color: #8b6848; bottom: 4%; right: 36%; opacity: 0.06; }
.blob-field i:nth-child(5) { --size: 68px; --blob-color: #c4654a; top: 32%; left: 24%; }
.blob-field.side i:nth-child(1) { left: auto; right: 5%; top: 24%; }
.blob-field.side i:nth-child(2) { left: 13%; top: 64%; }
.blob-field.side i:nth-child(3) { right: 18%; bottom: 12%; }

.transition-blobs i { opacity: 0.08; top: -70px; }
.transition-blobs i:nth-child(1) { --size: 145px; --blob-color: #c4654a; left: 6%; }
.transition-blobs i:nth-child(2) { --size: 92px; --blob-color: #d4943c; left: 24%; top: -34px; }
.transition-blobs i:nth-child(3) { --size: 174px; --blob-color: #b87861; left: 46%; }
.transition-blobs i:nth-child(4) { --size: 110px; --blob-color: #8b6848; left: 68%; top: -48px; }
.transition-blobs i:nth-child(5) { --size: 160px; --blob-color: #c4654a; left: 82%; }
.transition-blobs i:nth-child(6) { --size: 78px; --blob-color: #d4943c; left: 36%; top: -26px; }

@media (max-width: 900px) {
  .margin-graffiti {
    position: static;
    width: auto;
    margin-bottom: 16px;
    transform: rotate(-1deg) translateX(-16px);
  }
}

@media (max-width: 768px) {
  .spine-nav { display: none; }
  .mobile-spine { display: flex; }
  .volume-stack { margin-left: 0; padding-bottom: 48px; }
  .volume { min-height: 92vh; padding: clamp(64px, 10vh, 118px) 22px; }
  .ruled { padding-left: 18px; }
  h1 { font-size: clamp(3.2rem, 16vw, 5.4rem); }
  h2 { font-size: clamp(2.2rem, 12vw, 3.6rem); }
  .page-number { right: 18px; bottom: 18px; }
}
