.bf-workflow { margin-top: 26px; }
.bf-page .bf-journey {
  display: block; margin: 0; padding: 0; background: var(--bg);
}
.bf-journey.ready {
  position: sticky; top: var(--site-header-height, 67px); z-index: 8;
}
.bf-journey .stage-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
.bf-page .bf-journey a {
  display: flex; align-items: center; min-height: 44px; padding: 4px 0;
  text-decoration: none;
}
.bf-page .bf-journey a[aria-current="location"] {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.bf-page .bf-workflow > section[id] { scroll-margin-top: var(--stage-nav-height, 46px); }
.bf-journey .stage-picker { display: none; }
@media (max-width: 760px) {
  .bf-page:has(.header-away) .bf-journey.ready { top: 0; }
  .bf-journey.ready .stage-picker {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px;
    padding: 0; border: 0; color: var(--ink); background: var(--bg);
    font: inherit; font-size: 12px; cursor: pointer;
  }
  .stage-picker strong { margin-left: auto; font-weight: 500; }
  .stage-picker::after {
    content: ''; width: 7px; height: 7px; margin: 0 4px 4px 0;
    border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg);
  }
  .stage-picker[aria-expanded="true"]::after { transform: rotate(225deg); margin-bottom: -3px; }
  .bf-journey.ready .stage-links { display: none; }
  .bf-journey.ready .stage-picker[aria-expanded="true"] + .stage-links {
    display: grid; position: absolute; inset: 100% 0 auto;
    padding: 4px 16px; border: 1px solid var(--line); background: var(--bg);
    max-height: calc(100dvh - var(--site-header-height, 73px) - 54px);
    overflow-y: auto; overscroll-behavior: contain;
  }
}
/* Keep the strip in flow while it fades, including when scrolling reverses. */
.bf-journey.past-story {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .bf-journey.ready {
    transition: top .24s ease-in-out, opacity .32s ease-in-out,
      transform .32s ease-in-out, visibility 0s;
  }
  .bf-journey.ready.past-story {
    transform: translateY(-5px);
    transition-delay: 0s, 0s, 0s, .32s;
  }
}
