/* THE SECTION RAIL: ticks pinned to the left edge on wide screens, with the section names on hover. */

/* the section rail: ticks pinned to the left edge, names on hover; hidden while the walkthrough passes under it */
.rail {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  transition: opacity 0.3s;
}
@media (min-width: 1280px) {
  .rail {
    display: block;
  }
}
.rail.off {
  opacity: 0;
  pointer-events: none;
}
.rail::before {
  content: '';
  position: absolute;
  inset: -24px -48px -24px -24px;
}
.rail ul {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: gap 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rail:hover ul,
.rail:focus-within ul {
  gap: 8px;
}
.rail a {
  display: grid;
  grid-template-columns: 32px auto;
  align-items: center;
  column-gap: 14px;
  height: 8px;
  text-decoration: none;
  color: var(--placeholder);
  transition: height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rail:hover a,
.rail:focus-within a {
  height: 20px;
}
.rail .tick {
  flex: none;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition:
    width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.3s;
}
.rail .label {
  font: 400 13px/1 Inter;
  white-space: nowrap;
  color: var(--tertiary);
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity 0.3s,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.2s;
}
.rail:hover .label,
.rail:focus-within .label {
  opacity: 1;
  transform: none;
}
.rail a:hover,
.rail a:hover .label,
.rail a[aria-current='true'],
.rail a[aria-current='true'] .label {
  color: var(--primary);
}
.rail a[aria-current='true'] .tick {
  width: 32px;
}
.rail a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .rail,
  .rail ul,
  .rail a,
  .rail .tick,
  .rail .label {
    transition: none;
  }
}
