/* The trail uses the history page's existing warm neutral and copper colors. */
.chapter-list.has-history-journey { position:relative; gap:34px; }
.has-history-journey .chapter { column-gap:64px; }
.has-history-journey #today { padding-inline-end:46px; }
.history-passage { display:none; }
.has-history-journey .history-passage { display:block; height:48px; }
.history-trail {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:1;
  overflow:visible;
  pointer-events:none;
}
.history-trail[hidden] { display:none; }
.history-trail-step { fill:#a34e26; }
.history-trail-logo circle {
  fill:var(--dark-deep);
  stroke:#db8a5b;
  stroke-width:1.5;
}
.journey-gallery.is-visible { transition:opacity .45s ease; }
.has-history-journey[data-journey-ready] .journey-gallery:not(.is-visible) { opacity:0; }
.journey-gallery.is-reached > figure { border-color:#bc7950; }
.journey-gallery.is-visible > figure { animation:history-photo-enter .42s ease-out both; }
.journey-gallery.is-visible > figure:nth-of-type(2) { animation-delay:65ms; }
.journey-gallery.is-visible > figure:nth-of-type(3) { animation-delay:115ms; }
@keyframes history-photo-enter {
  from { opacity:.45; transform:translateY(8px); }
  to { opacity:1; transform:translateY(0); }
}
@media (max-width:700px) {
  .has-history-journey .chapter,.has-history-journey #today {
    grid-template-columns:minmax(0,1fr);
    padding-inline-end:38px;
  }
  .has-history-journey .history-passage { height:42px; }
  .chapter-list.has-history-journey { gap:27px; }
}
@media (prefers-reduced-motion:reduce), print {
  .has-history-journey .history-passage { display:none; }
  .has-history-journey[data-journey-ready] .journey-gallery { opacity:1 !important; transition:none; }
  .journey-gallery.is-visible > figure { animation:none; }
}
@media (prefers-reduced-motion:reduce) {
  .history-trail-stamps { display:none; }
}
@media print {
  .history-trail { display:none; }
}


/* Reserve room for the route at both sides and across the gap between paragraphs. */
.history-page .history-process .chapter.stage { padding-inline:clamp(34px,4vw,51px); }
.has-history-journey .route-in-right .history-opening { margin-inline-start:auto; }
.has-history-journey .history-passage { height:clamp(57px,7vw,91px); }
.history-process .history-family-heading { margin-top:34px; }
.history-process .welfare-single.is-visible > figure { animation:none; }
.history-process .welfare-locator { position:absolute; inset:0; width:100%; height:100%; }
.history-process .welfare-locator rect {
  fill:#f590341e;
  stroke:#ffaf74;
  stroke-width:3;
  vector-effect:non-scaling-stroke;
}
@media (max-width:540px) {
  .history-page .history-process .chapter.stage { padding-inline:32px; }
}
@media (prefers-reduced-motion:reduce), print {
  .has-history-journey .history-passage { display:none; }
  .has-history-journey .route-in-right .history-opening { margin-inline-start:0; }
}

