/* Shared section navigation. Keep the reading column independent of the rail. */
@media (min-width: 1100px) {
  .case .case-index {
    display: block;
    position: fixed;
    inset: 50% 16px auto auto;
    z-index: 15;
    width: 44px;
    margin: 0;
    transform: translateY(-50%);
  }

  .case .case-index .section-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .case .case-index ol {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .case .case-index a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 44px;
    height: 24px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 3px;
  }

  .case .case-index a::after {
    content: "";
    width: 10px;
    height: 2px;
    background: currentColor;
    opacity: .45;
    transition: opacity 160ms ease;
  }
  .case .case-index a:hover::after{
    width: 16px;
  }

  .case .case-index a[aria-current]::after,
  .case .case-index a:hover::after,
  .case .case-index a:focus-visible::after {
    opacity: 1;
  }

  .case .case-index a[aria-current],
  .case .case-index a:hover,
  .case .case-index a:focus-visible { color: var(--ink); }

  .case .case-index-label {
    position: absolute;
    right: 22px;
    padding: 2px 0;
    border: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 12px/1.5 var(--sans);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(4px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .case .case-index a:hover .case-index-label,
  .case .case-index a:focus-visible .case-index-label {
    opacity: 1;
    transform: none;
  }

  .case .case-index a:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
}

@media (max-width: 1099px) {
  .case .case-index {
    display: block;
    position: static;
    width: auto;
    margin: 40px 0;
    transform: none;
    font-size: 12px;
  }
  .case .case-index .section-label { margin: 0 0 12px; font-size: 11px; }
  .case .case-index ol { flex-direction: row; flex-wrap: wrap; gap: 10px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .case .case-index a::after,
  .case .case-index-label { transition: none; }
}
