.progress {
  position: fixed;
  top: 0;
  left: 0;
  inline-size: 100%;
  block-size: 0.375rem;
  background-color: tomato;
  transform-origin: left;
  scale: 0 1;
}

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

@keyframes grow {
  to {
    scale: 1 1;
  }
}

.text {
  max-inline-size: 30rem;
  font: 1rem/1.6 system-ui, sans-serif;
}

.text h1 {
  font-size: 1.25rem;
}