@media (prefers-reduced-motion: no-preference) {
  .journey-events [data-ambient-motion] {
    --history-step: 0ms;
    --history-axis: scaleX(0);
  }
  .journey-events [data-ambient-motion]:nth-child(3n + 2) { --history-step: 280ms; }
  .journey-events [data-ambient-motion]:nth-child(3n + 3) { --history-step: 560ms; }
  .journey-events [data-ambient-motion]:nth-child(n + 4) { --row-delay: 260ms; }
  .journey-events [data-ambient-motion]::after {
    content: "";
    position: absolute;
    inset: -1px 0 auto;
    height: 2px;
    background: linear-gradient(90deg,#4ecfff,#a1faff);
    box-shadow: 0 0 8px #24d6ff82;
    transform-origin: left center;
    pointer-events: none;
    animation: history-trace 5s ease-out calc(var(--history-step) + var(--row-delay, 0ms)) infinite both paused;
  }
  .journey-events [data-ambient-motion]::before {
    animation: history-marker 5s ease-out calc(var(--history-step) + var(--row-delay, 0ms) + 100ms) infinite both paused;
  }
  .journey-events [data-motion-visible="true"]::before,
  .journey-events [data-motion-visible="true"]::after { animation-play-state: running; }
  @keyframes history-trace {
    0% { transform: var(--history-axis); opacity: 0; }
    10% { transform: none; opacity: .9; }
    21%,100% { transform: none; opacity: 0; }
  }
  @keyframes history-marker {
    4% { transform: scale(1.24); filter: brightness(1.16); }
    9%,100% { transform: none; filter: none; }
  }

  :is(#guides,#downloads):target .section-heading { position: relative; }
  :is(#guides,#downloads):target .section-heading::after {
    content: "";
    position: absolute;
    inset: auto 30% -7px;
    height: 2px;
    background: linear-gradient(90deg,transparent,#77efff,transparent);
    pointer-events: none;
    animation: support-destination 5s ease-out infinite both paused;
  }
  :is(#guides,#downloads):target .section-heading[data-motion-visible="true"]::after {
    animation-play-state: running;
  }
  @keyframes support-destination {
    0% { opacity: 0; transform: scaleX(.5); }
    5% { opacity: 1; }
    15%,100% { opacity: 0; transform: scaleX(1); }
  }

  @media (max-width: 660px) {
    .journey-events [data-ambient-motion]:nth-child(n) {
      --history-axis: scaleY(0);
      --history-step: 0ms;
      --row-delay: 0ms;
    }
    .journey-events [data-ambient-motion]::after {
      inset: 0 auto 0 -1px;
      width: 2px;
      height: auto;
      background: linear-gradient(180deg,#4ecfff,#a1faff);
      transform-origin: center top;
    }
  }
}
