/* ============================================================
   Redesigned chapter — Signal Band · Growth Ledger ·
   Build Index · The Chronicle
   ============================================================ */

:root {
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-inout-strong: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ════════════════ 1. SIGNAL BAND ════════════════ */
.signal-band {
  position: relative;
  margin-top: 15vh;
  padding: clamp(1.2rem, 3vh, 2.2rem) 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(201, 168, 107, 0.05), transparent 30%, transparent 70%, rgba(201, 168, 107, 0.04)),
    var(--bg-deep);
}

/* Survey tick strips — endless measuring-tape slide */
.sb-ticks {
  position: relative;
  height: 14px;
  overflow: hidden;
  opacity: 0.5;
}
.sb-ticks::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 200%;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(201, 168, 107, 0.55) 0 1px,
    transparent 1px 12px,
    rgba(201, 168, 107, 0.28) 12px 13px,
    transparent 13px 24px,
    rgba(201, 168, 107, 0.28) 24px 25px,
    transparent 25px 36px,
    rgba(201, 168, 107, 0.28) 36px 37px,
    transparent 37px 48px
  );
  background-size: 48px 100%;
  mask-image: linear-gradient(180deg, transparent, #000 40%);
  animation: sbTicksSlide 14s linear infinite;
}
.sb-ticks-bottom::before {
  mask-image: linear-gradient(0deg, transparent, #000 40%);
  animation-direction: reverse;
}
@keyframes sbTicksSlide {
  to { transform: translateX(-48px); }
}

.sb-tilt {
  will-change: transform;
  padding: clamp(1.4rem, 4vh, 3rem) 0;
}

.sb-row {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.sb-track {
  display: inline-flex;
  align-items: center;
  gap: clamp(1.6rem, 3.5vw, 3.2rem);
  will-change: transform;
}

/* Main row — alternating sans caps / gold serif italic */
.sb-row-main .sb-track {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(2.6rem, 7.5vw, 6.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-light);
}
.sb-word {
  display: inline-block;
}
.sb-word.sb-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(100deg, var(--accent-gold) 20%, var(--accent-cream) 50%, var(--accent-gold) 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sbShimmer 6s linear infinite;
}
@keyframes sbShimmer {
  to { background-position: -200% 0; }
}

/* Rotating four-point star separators */
.sb-star {
  width: clamp(16px, 2.2vw, 26px);
  height: clamp(16px, 2.2vw, 26px);
  flex: none;
  fill: var(--accent-gold);
  opacity: 0.85;
  animation: sbSpin 9s linear infinite;
}
@keyframes sbSpin {
  to { transform: rotate(360deg); }
}

/* Ghost row — hollow counter-current */
.sb-row-ghost {
  margin-top: clamp(0.6rem, 1.6vh, 1.2rem);
}
.sb-row-ghost .sb-track {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.6vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 241, 234, 0.22);
}
.sb-slash {
  -webkit-text-stroke: 0;
  color: rgba(201, 168, 107, 0.5);
  font-weight: 400;
}

/* Rotating seal — build · ship · scale · repeat */
.sb-seal {
  position: absolute;
  top: 50%;
  right: clamp(1rem, 6vw, 6rem);
  width: clamp(88px, 10vw, 130px);
  height: clamp(88px, 10vw, 130px);
  transform: translateY(-50%);
  z-index: 3;
  border-radius: 50%;
  background: rgba(10, 15, 13, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(201, 168, 107, 0.12);
}
.sb-seal svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.sb-seal-ring {
  fill: none;
  stroke: rgba(201, 168, 107, 0.35);
  stroke-width: 1;
}
.sb-seal-ring-inner {
  stroke: rgba(201, 168, 107, 0.18);
  stroke-dasharray: 3 5;
}
.sb-seal-spin {
  transform-origin: 60px 60px;
  animation: sbSpin 26s linear infinite;
}
.sb-seal-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  fill: var(--accent-gold);
}
.sb-seal-star {
  fill: var(--accent-cream);
  transform-origin: 60px 60px;
  animation: sbSpin 26s linear infinite reverse;
}

/* ════════════════ 2. GROWTH LEDGER ════════════════ */
.growth-ledger {
  padding: clamp(6rem, 14vh, 12rem) var(--pad-x);
  border-top: 1px solid var(--line);
  position: relative;
}
.gl-head {
  margin-bottom: clamp(3.5rem, 7vh, 6rem);
}
.gl-lede-row {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(220px, 300px);
  gap: 2rem 4rem;
  align-items: end;
}
.gl-lede {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text-dim);
  border-left: 2px solid var(--accent-gold);
  padding-left: 1.5rem;
}
.gl-lede-spark {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-bottom: 0.2rem;
}
.gl-sparkline {
  width: 100%;
  height: 64px;
  overflow: visible;
}
.gl-spark-grid {
  stroke: rgba(244, 241, 234, 0.08);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.gl-spark-path {
  stroke: var(--accent-gold);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.gl-spark-dot {
  fill: var(--accent-cream);
  filter: drop-shadow(0 0 6px rgba(201, 168, 107, 0.9));
  animation: glEndPulse 2.4s ease-in-out infinite;
}
.gl-spark-caption {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

/* — Plates — */
.gl-plates {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vh, 2.5rem);
}
.gl-plate {
  --mx: 70%;
  --my: 30%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(244, 241, 234, 0.1);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 23, 21, 0.92), rgba(9, 13, 12, 0.96));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  transition:
    border-color 0.5s var(--ease-out-strong),
    transform 0.5s var(--ease-out-strong),
    box-shadow 0.5s var(--ease-out-strong);
}
.gl-plate::before {
  /* pointer-tracked aurora */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(560px circle at var(--mx) var(--my), rgba(201, 168, 107, 0.09), transparent 55%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}
@media (hover: hover) and (pointer: fine) {
  .gl-plate:hover {
    transform: translateY(-6px);
    border-color: rgba(201, 168, 107, 0.45);
    box-shadow:
      0 34px 70px rgba(0, 0, 0, 0.65),
      0 0 46px rgba(201, 168, 107, 0.1);
  }
  .gl-plate:hover::before {
    opacity: 1;
  }
}

.gl-plate-chart {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.gl-plate-chart svg {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(72%, 720px);
  height: 100%;
  opacity: 0.9;
  transition: opacity 0.6s ease;
  mask-image: linear-gradient(90deg, transparent, #000 30%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
}
.gl-chart-grid path {
  stroke: rgba(244, 241, 234, 0.06);
  stroke-width: 1;
}
.gl-chart-line {
  stroke: var(--accent-gold);
  stroke-width: 2.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px rgba(201, 168, 107, 0.35));
}
.gl-chart-area {
  opacity: 0;
}
.gl-chart-crash {
  stroke: rgba(255, 122, 100, 0.85);
  stroke-width: 2;
  stroke-dasharray: 5 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.gl-chart-end {
  fill: var(--accent-cream);
  filter: drop-shadow(0 0 8px rgba(201, 168, 107, 1));
  animation: glEndPulse 2.4s ease-in-out infinite;
}
.gl-chart-end-crash {
  fill: rgba(255, 122, 100, 0.95);
  filter: drop-shadow(0 0 8px rgba(255, 122, 100, 0.8));
}
@keyframes glEndPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.gl-crash-note {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: 16%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  text-align: right;
}
.gl-chart-note {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: rgba(255, 160, 140, 0.9);
}
.gl-chart-note-2 {
  color: rgba(201, 168, 107, 0.9);
}

.gl-plate-inner {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 3.5vw, 3.25rem);
  max-width: 640px;
}
.gl-plate-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 1.4rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px dashed rgba(201, 168, 107, 0.2);
}
.gl-idx {
  color: var(--accent-gold);
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(201, 168, 107, 0.3);
  border-radius: 50px;
}
.gl-year { color: var(--text-dim); }
.gl-badge { color: var(--text-faint); margin-left: auto; }

.gl-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-light);
  margin-bottom: 1.6rem;
}
.gl-title em {
  font-style: italic;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-cream), var(--accent-gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sbShimmer 5s linear infinite;
}
.gl-metric {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 1.6rem;
}
.gl-metric-value {
  font-family: var(--font-serif);
  font-size: clamp(3.6rem, 6.5vw, 6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--text-light);
}
.gl-unit { color: var(--accent-gold); }
.gl-metric-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.gl-body {
  color: var(--text-dim);
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 1.8rem;
  max-width: 56ch;
}
.gl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.gl-chips span {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(244, 241, 234, 0.12);
  border-radius: 50px;
  transition: border-color 0.35s ease, color 0.35s ease;
}
.gl-plate:hover .gl-chips span {
  border-color: rgba(201, 168, 107, 0.4);
  color: var(--accent-cream);
}

/* ════════════════ 4. THE CHRONICLE ════════════════ */
.chronicle {
  padding: clamp(7rem, 15vh, 14rem) var(--pad-x);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.chronicle .story-head {
  max-width: 720px;
  margin-bottom: clamp(4rem, 9vh, 8rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.chronicle .story-quote {
  margin-top: 2rem;
  display: inline-flex;
  gap: 0.85rem;
  align-items: center;
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
}

.chron {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
}

/* center rail + scroll-scrubbed fill + runner */
.chron-rail {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(244, 241, 234, 0.14) 6%, rgba(244, 241, 234, 0.14) 94%, transparent);
}
.chron-rail-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--accent-gold), rgba(201, 168, 107, 0.25));
  transform: scaleY(0);
  transform-origin: top center;
  box-shadow: 0 0 12px rgba(201, 168, 107, 0.5);
}
.chron-runner {
  position: absolute;
  top: 0;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  margin-top: -13px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 168, 107, 0.6);
  display: grid;
  place-items: center;
  background: rgba(10, 15, 13, 0.85);
  animation: chronRunnerSpin 10s linear infinite;
  will-change: transform;
  z-index: 3;
}
.chron-runner-core {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cream);
  box-shadow: 0 0 10px rgba(201, 168, 107, 1);
}
@keyframes chronRunnerSpin {
  to { rotate: 360deg; }
}

/* eras */
.chron-era {
  position: relative;
  width: 50%;
  padding: 0 clamp(2.4rem, 5vw, 4.5rem) clamp(3.5rem, 8vh, 6.5rem) 0;
}
.chron-era[data-side="left"] {
  margin-right: auto;
}
.chron-era[data-side="right"] {
  margin-left: auto;
  padding: 0 0 clamp(3.5rem, 8vh, 6.5rem) clamp(2.4rem, 5vw, 4.5rem);
}
.chron-era[data-side="center"] {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 3.5rem 0 0;
  text-align: center;
}

/* node dots on the rail */
.chron-node {
  position: absolute;
  top: 2.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow:
    0 0 0 4px var(--bg-deep),
    0 0 0 5px rgba(244, 241, 234, 0.18);
  z-index: 2;
}
.chron-era[data-side="left"] .chron-node { right: -4.5px; }
.chron-era[data-side="right"] .chron-node { left: -4.5px; }
.chron-era[data-side="center"] .chron-node {
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
}
.chron-node-live::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--accent-gold);
  animation: chronPulse 2.2s ease-out infinite;
}
@keyframes chronPulse {
  0% { transform: scale(0.45); opacity: 1; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ghost year numerals */
.chron-ghost {
  position: absolute;
  top: -1.2rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(5.5rem, 13vw, 11rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(201, 168, 107, 0.16);
  letter-spacing: -0.02em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  will-change: transform;
}
.chron-era[data-side="left"] .chron-ghost { left: clamp(-2rem, -1vw, 0rem); }
.chron-era[data-side="right"] .chron-ghost { right: clamp(-2rem, -1vw, 0rem); }
.chron-era[data-side="center"] .chron-ghost {
  left: 50%;
  transform: translateX(-50%);
  top: -3rem;
  -webkit-text-stroke: 1px rgba(201, 168, 107, 0.22);
}

/* chapter cards */
.chron-card {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(17, 24, 22, 0.94), rgba(9, 13, 12, 0.97));
  border: 1px solid rgba(244, 241, 234, 0.08);
  border-radius: 10px;
  padding: 2.2rem 2.2rem 2.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  transition:
    border-color 0.45s var(--ease-out-strong),
    transform 0.45s var(--ease-out-strong),
    box-shadow 0.45s var(--ease-out-strong);
}
.chron-card::before {
  /* gold keyline that ignites on hover */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 107, 0.75), transparent);
  opacity: 0.5;
  transition: opacity 0.45s ease;
}
@media (hover: hover) and (pointer: fine) {
  .chron-card:hover {
    transform: translateY(-5px);
    border-color: rgba(201, 168, 107, 0.4);
    box-shadow:
      0 26px 60px rgba(0, 0, 0, 0.7),
      0 0 34px rgba(201, 168, 107, 0.08);
  }
  .chron-card:hover::before { opacity: 1; }
}

.chron-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 168, 107, 0.75);
  padding-bottom: 1rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px dashed rgba(201, 168, 107, 0.18);
}
.chron-meta-tag { color: var(--text-faint); }
.chron-meta-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-cream);
}
.chron-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6acb8f;
  box-shadow: 0 0 8px rgba(106, 203, 143, 0.9);
  animation: glEndPulse 1.8s ease-in-out infinite;
}
.chron-year {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 1.3rem;
}
.chron-icon {
  display: block;
  width: 44px;
  height: 44px;
  color: var(--accent-gold);
  margin-bottom: 1.2rem;
  overflow: visible;
}
.chron-era[data-side="center"] .chron-icon { margin: 0 auto 1.2rem; }
.chron-icon-fill {
  fill: currentColor;
  stroke: none;
}
.chron-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text-light);
  margin-bottom: 0.85rem;
}
.chron-body {
  font-size: 0.96rem;
  line-height: 1.78;
  color: var(--text-dim);
}
.chron-body strong {
  color: var(--text-light);
  font-weight: 600;
}

/* the "now" card gets the gold treatment */
.chron-now .chron-card {
  background: linear-gradient(180deg, rgba(28, 33, 26, 0.95), rgba(12, 16, 13, 0.97));
  border-color: rgba(201, 168, 107, 0.3);
}
.chron-now .chron-card::before { opacity: 1; }

/* ════════════════ RESPONSIVE ════════════════ */
@media (max-width: 1100px) {
  .gl-lede-row {
    grid-template-columns: 1fr;
  }
  .gl-lede-spark { max-width: 320px; }
  .gl-plate-chart svg { width: 100%; opacity: 0.55; }
  .gl-crash-note { display: none; }
}

@media (max-width: 768px) {
  .signal-band { margin-top: 10vh; }
  .sb-seal { display: none; }

  .gl-plate-inner { max-width: 100%; }
  .gl-plate-chart svg {
    opacity: 0.32;
    mask-image: linear-gradient(180deg, transparent, #000 40%);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%);
  }


  /* Chronicle collapses to left rail */
  .chron-rail {
    left: 10px;
    transform: none;
  }
  .chron-era,
  .chron-era[data-side="right"],
  .chron-era[data-side="center"] {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 3.2rem 2.4rem;
    text-align: left;
  }
  .chron-era[data-side="left"] .chron-node,
  .chron-era[data-side="right"] .chron-node,
  .chron-era[data-side="center"] .chron-node {
    left: 6px;
    right: auto;
    top: 2.2rem;
    transform: none;
  }
  .chron-ghost,
  .chron-era[data-side="left"] .chron-ghost,
  .chron-era[data-side="right"] .chron-ghost,
  .chron-era[data-side="center"] .chron-ghost {
    left: 1.6rem;
    right: auto;
    top: -2.2rem;
    transform: none;
    font-size: clamp(4rem, 18vw, 6.5rem);
  }
  .chron-era[data-side="center"] .chron-icon { margin: 0 0 1.2rem; }
  .chron-card { padding: 1.8rem 1.5rem 1.9rem; }
}

/* ════════════════ REDUCED MOTION ════════════════ */
@media (prefers-reduced-motion: reduce) {
  .sb-ticks::before,
  .sb-star,
  .sb-seal-spin,
  .sb-seal-star,
  .sb-word.sb-serif,
  .gl-title em,
  .pi-stamp-spin,
  .chron-runner {
    animation: none;
  }
  .gl-chart-end,
  .gl-spark-dot,
  .chron-live-dot {
    animation: none;
    opacity: 1;
  }
  .chron-node-live::after { animation: none; opacity: 0.4; }
}

/* ════════════════ 5. READABILITY SCRIMS (post-MODULE_02 art direction) ════════════════ */
/* Dim the global particle field behind the dark editorial sections so type
   always sits on controlled contrast — particles ghost through at ~10%. */
.growth-ledger {
  background-image:
    repeating-linear-gradient(90deg, rgba(244, 241, 234, 0.02) 0 1px, transparent 1px 140px),
    radial-gradient(1200px 520px at 85% -5%, rgba(201, 168, 107, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(10, 16, 14, 0.93), rgba(10, 16, 14, 0.88) 45%, rgba(11, 17, 14, 0.95));
}
.chronicle {
  background-image:
    repeating-linear-gradient(90deg, rgba(244, 241, 234, 0.02) 0 1px, transparent 1px 140px),
    radial-gradient(1000px 480px at 12% 3%, rgba(201, 168, 107, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(9, 14, 12, 0.95), rgba(12, 18, 15, 0.9) 50%, rgba(9, 14, 12, 0.96));
}

/* ════════════════ 6. THE PRINT INDEX (Also built) ════════════════ */
.print-index {
  margin-top: clamp(4.5rem, 9vh, 7rem);
  perspective: 1400px;
}

/* the paper sheet — fully opaque, ink on cream */
.pi-sheet {
  --ink: #1a231e;
  --ink-soft: rgba(26, 35, 30, 0.62);
  --ink-faint: rgba(26, 35, 30, 0.38);
  --ink-line: rgba(26, 35, 30, 0.16);
  --gold-ink: #8a6a30;
  position: relative;
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(201, 168, 107, 0.14), transparent 55%),
    linear-gradient(180deg, #f7f3e8, #f1ecdd);
  color: var(--ink);
  border-radius: 14px;
  padding: clamp(2rem, 4vw, 3.75rem) clamp(1.4rem, 3.5vw, 3.5rem) clamp(1.6rem, 3vw, 2.5rem);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    0 4px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
  will-change: transform;
}
.pi-sheet::before {
  /* paper grain */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml,%3Csvg viewBox=%220 0 200 200%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22n%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.9%22 numOctaves=%222%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22 opacity=%220.05%22/%3E%3C/svg%3E');
  pointer-events: none;
}
.pi-sheet::after {
  /* punched binding holes down the left margin */
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: clamp(0.5rem, 1.2vw, 1.2rem);
  width: 5px;
  background-image: radial-gradient(circle 2.5px, rgba(26, 35, 30, 0.18) 100%, transparent 100%);
  background-size: 5px 34px;
  background-repeat: repeat-y;
  pointer-events: none;
}

/* gold print-head bar that sweeps down while rows print */
.pi-printhead {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-ink), transparent);
  box-shadow: 0 0 14px rgba(138, 106, 48, 0.5);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

/* masthead */
.pi-masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 1.8rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 1;
}
.pi-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-ink);
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(138, 106, 48, 0.45);
  border-radius: 50px;
  margin-bottom: 1.1rem;
}
.pi-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.8rem;
}
.pi-heading em {
  font-style: italic;
  color: var(--gold-ink);
}
.pi-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.98rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0;
}

/* rotating verification stamp */
.pi-stamp {
  flex: none;
  width: clamp(86px, 9vw, 118px);
  height: clamp(86px, 9vw, 118px);
  transform: rotate(8deg);
}
.pi-stamp svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.pi-stamp-ring {
  fill: none;
  stroke: rgba(138, 106, 48, 0.75);
  stroke-width: 1.5;
}
.pi-stamp-ring-2 {
  stroke-width: 1;
  stroke-dasharray: 3 4;
  stroke: rgba(138, 106, 48, 0.5);
}
.pi-stamp-spin {
  transform-origin: 60px 60px;
  animation: sbSpin 30s linear infinite;
}
.pi-stamp-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  fill: var(--gold-ink);
}
.pi-stamp-check {
  fill: none;
  stroke: var(--gold-ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the index rows — printed catalog entries */
.pi-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}
.pi-row {
  position: relative;
  display: grid;
  grid-template-columns: 3.2rem 2.6rem minmax(0, 1fr) 4.2rem;
  align-items: start;
  gap: 1.1rem;
  padding: 1.45rem 0.4rem 1.4rem;
  border-bottom: 1px solid var(--ink-line);
}
.pi-row:last-child {
  border-bottom: none;
}
.pi-row::before {
  /* ink-wash hover sweep */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(138, 106, 48, 0.1), rgba(138, 106, 48, 0.03) 60%, transparent);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.55s var(--ease-out-strong);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .pi-row:hover::before {
    clip-path: inset(0 0 0 0);
  }
}
.pi-num {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1;
  color: var(--ink-faint);
  padding-top: 0.15rem;
  transition: color 0.35s ease;
  font-variant-numeric: tabular-nums;
}
.pi-row:hover .pi-num {
  color: var(--gold-ink);
}
.pi-ico {
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid rgba(26, 35, 30, 0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.1rem;
  transition:
    background-color 0.4s var(--ease-out-strong),
    color 0.4s var(--ease-out-strong),
    border-color 0.4s var(--ease-out-strong),
    transform 0.4s var(--ease-out-strong);
}
.pi-row:hover .pi-ico {
  background: var(--ink);
  border-color: var(--ink);
  color: #f5f0e2;
  transform: rotate(-8deg) scale(1.06);
}
.pi-main {
  min-width: 0;
}
.pi-titleline {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.pi-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  transition: color 0.35s ease;
}
.pi-row:hover .pi-title {
  color: var(--gold-ink);
}
.pi-leader {
  /* table-of-contents dotted leader */
  flex: 1 1 3rem;
  min-width: 3rem;
  border-bottom: 2px dotted rgba(26, 35, 30, 0.28);
  transform: translateY(-0.35em);
}
.pi-metric {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.pi-metric em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-left: 0.3rem;
}
.pi-desc {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
}
.pi-year {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-align: right;
  padding-top: 0.45rem;
  white-space: nowrap;
}
.pi-flag {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-ink);
  border: 1px solid rgba(138, 106, 48, 0.5);
  border-radius: 50px;
  padding: 0.22rem 0.6rem;
  transform: translateY(-0.15em);
}
.pi-featured .pi-title {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-style: italic;
}

/* colophon */
.pi-colophon {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 0.4rem;
  padding-top: 1.3rem;
  border-top: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  position: relative;
  z-index: 1;
}
.pi-marks {
  width: 74px;
  height: 12px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px, transparent 2px 5px,
    var(--ink) 5px 6px, transparent 6px 11px,
    var(--ink) 11px 14px, transparent 14px 17px
  );
  opacity: 0.55;
}
.pi-page {
  margin-left: auto;
  color: var(--gold-ink);
}

/* print index — responsive */
@media (max-width: 900px) {
  .pi-masthead {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1.2rem;
  }
  .pi-stamp {
    align-self: flex-end;
    margin-bottom: -1.5rem;
  }
}
@media (max-width: 700px) {
  .pi-row {
    grid-template-columns: 2rem 2.1rem minmax(0, 1fr);
    gap: 0.75rem;
    padding-left: 0.9rem;
  }
  .pi-year {
    display: none;
  }
  .pi-leader {
    display: none;
  }
  .pi-titleline {
    gap: 0.5rem 0.9rem;
  }
  .pi-metric {
    flex-basis: 100%;
  }
  .pi-sheet {
    border-radius: 12px;
  }
  .pi-sheet::after {
    display: none;
  }
}

/* ════════════════ 7. MASTERPIECE LAYER — global feel ════════════════ */

/* — Cinematic film grain over everything (cursor stays above) — */
body::after {
  content: "";
  position: fixed;
  inset: -60%;
  width: 220%;
  height: 220%;
  background-image: url('data:image/svg+xml,%3Csvg viewBox=%220 0 240 240%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22g%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.8%22 numOctaves=%222%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23g)%22 opacity=%220.5%22/%3E%3C/svg%3E');
  opacity: 0.05;
  pointer-events: none;
  z-index: 2500;
  animation: filmGrain 0.9s steps(5) infinite;
}
@keyframes filmGrain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1.6%); }
  40% { transform: translate(1.4%, -2.2%); }
  60% { transform: translate(-1.2%, -1%); }
  80% { transform: translate(2%, 1.2%); }
  100% { transform: translate(0, 0); }
}

/* Deliberately no custom scrollbar CSS (::-webkit-scrollbar or
   scrollbar-color/-width). Any of these push Chromium/Edge out of its
   default slim auto-hiding overlay scrollbar into a classic always-on
   gutter with arrow buttons, which reads as a stray bar over dark
   sections. The native default looks better there than anything drawn. */

/* — Editorial typographic hygiene for the Fraunces display voice — */
.section-title,
.gl-title,
.chron-title,
.pi-heading,
.hcc-title,
.block-title {
  text-wrap: balance;
}
.section-title {
  letter-spacing: -0.025em;
}

/* — Chapter rail: fixed act navigation on the right edge — */
.chapter-rail {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 460;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s var(--ease-out-strong), visibility 0.7s;
}
body.loading .chapter-rail,
body.hide-nav .chapter-rail {
  opacity: 0;
  visibility: hidden;
}
.cr-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  height: 16px;
  cursor: none;
}
.cr-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-cream);
  white-space: nowrap;
  padding: 0.3rem 0.65rem;
  border-radius: 50px;
  background: rgba(10, 15, 13, 0.82);
  border: 1px solid rgba(201, 168, 107, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.35s var(--ease-out-strong), transform 0.45s var(--ease-out-strong);
  pointer-events: none;
}
.cr-label .cr-num {
  color: var(--accent-gold);
}
.cr-tick {
  width: 16px;
  height: 2px;
  background: rgba(244, 241, 234, 0.28);
  transition:
    width 0.45s var(--ease-out-strong),
    background-color 0.35s ease,
    box-shadow 0.35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .cr-item:hover .cr-tick {
    width: 26px;
    background: rgba(244, 241, 234, 0.6);
  }
  .cr-item:hover .cr-label {
    opacity: 1;
    transform: translateX(0);
  }
}
.cr-item.is-active .cr-tick {
  width: 34px;
  background: var(--accent-gold);
  box-shadow: 0 0 10px rgba(201, 168, 107, 0.7);
}
.cr-item.is-active .cr-label {
  opacity: 1;
  transform: translateX(0);
}
/* on light-theme sections, ink the rail instead of cream */
body[data-theme="light"] .cr-tick {
  background: rgba(20, 28, 26, 0.3);
}
body[data-theme="light"] .cr-item.is-active .cr-tick {
  background: var(--accent-rust);
  box-shadow: 0 0 10px rgba(138, 106, 48, 0.45);
}
@media (max-width: 1220px) {
  .chapter-rail {
    display: none;
  }
}

/* — Magnetic CTAs — */
.btn,
.nav-cta {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    animation: none;
  }
}
