/* The chapter rail expands towards the content, keeping its right edge fixed. */
@media (min-width: 992px) and (min-height: 650px) and (hover: hover) and (pointer: fine) {
  .ba-section-nav.ba-section-nav--rail {
    position: fixed !important;
    top: calc(var(--quick-nav-header-height, 4.375rem) + 1.5rem) !important;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: 15rem; /* Leave space for the floating consultation entry. */
    z-index: 900;
    display: flex;
    width: max-content;
    padding: 0;
    align-items: center;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .ba-section-nav--rail .ba-section-nav-inner {
    display: flex;
    width: auto;
    margin: 0;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.5rem;
    overflow: visible;
  }

  .ba-section-nav.ba-section-nav--rail a {
    position: relative;
    display: flex;
    width: 2.25rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 62.4375rem;
    background: transparent;
    color: #746d87;
    font-size: 0.8125rem;
    line-height: 1;
    transition: width 200ms ease, background-color 200ms ease, border-color 200ms ease, color 200ms ease;
  }

  .ba-section-nav--rail a::after {
    content: none;
  }

  .ba-section-nav--rail a::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.3125rem;
    width: 1.5rem;
    height: 0.625rem;
    border-radius: 62.4375rem;
    background: #c6c8de;
    transform: translateY(-50%);
    transition: background-color 200ms ease;
  }

  .ba-section-nav--rail .ba-section-nav-label {
    padding-left: 0.875rem;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 140ms ease;
  }

  .ba-section-nav.ba-section-nav--rail:hover a,
  .ba-section-nav.ba-section-nav--rail:has(a:focus-visible) a {
    width: 9.75rem;
    border-color: #e8eaf5;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 0.1875rem 0.75rem rgba(30, 39, 70, 0.05);
  }

  .ba-section-nav--rail:hover .ba-section-nav-label,
  .ba-section-nav--rail:has(a:focus-visible) .ba-section-nav-label {
    opacity: 1;
  }

  .ba-section-nav.ba-section-nav--rail a:hover,
  .ba-section-nav.ba-section-nav--rail a:focus-visible,
  .ba-section-nav.ba-section-nav--rail a.is-active {
    color: #272fc7;
  }

  .ba-section-nav--rail a:hover::before,
  .ba-section-nav--rail a:focus-visible::before,
  .ba-section-nav--rail a.is-active::before {
    background: #343bd7;
  }

  .ba-section-nav.ba-section-nav--rail:hover a.is-active,
  .ba-section-nav.ba-section-nav--rail:has(a:focus-visible) a.is-active,
  .ba-section-nav.ba-section-nav--rail a:hover,
  .ba-section-nav.ba-section-nav--rail a:focus-visible {
    border-color: #dfe1ff;
    background: #f1f2ff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ba-section-nav.ba-section-nav--rail a,
  .ba-section-nav--rail a::before,
  .ba-section-nav--rail .ba-section-nav-label {
    transition: none;
  }
}
