/* Reading progress bar — CSS scroll-driven animation on the page scroll.
   The bar is scaled, not resized, so the browser only composites it.
   No support: the bar stays hidden. prefers-reduced-motion: it stays, because it does
   not move on its own — it mirrors the scroll the reader is already doing. */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: 4px;
  background: var(--accent, #ff6a3d);
  transform-origin: 0 50%;
  transform: scaleX(0);
  display: none;
}

@supports (animation-timeline: scroll()) {
  .progress {
    display: block;
    animation: progress linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes progress {
  to { transform: scaleX(1); }
}

/* demo layout */
.sp-article { max-width: 680px; margin: 0 auto; padding: 120px 28px 30vh; color: #d7cfc3; font-size: 19px; line-height: 1.7; }
.sp-article h1 { margin: 12px 0 16px; color: var(--text, #f0ebe2); font: 700 clamp(44px, 7vw, 80px)/1 var(--font-display, system-ui, sans-serif); letter-spacing: -0.035em; }
.sp-lede { color: var(--muted, #9c9488); font-size: 21px; }
.sp-article h2 { margin: 56px 0 12px; color: var(--text, #f0ebe2); font: 600 28px/1.2 var(--font-display, system-ui, sans-serif); letter-spacing: -0.015em; }
