/* Sidebar auto-hide — loaded on every page, because the preference applies
   everywhere, not just where it was switched on.
   The rail keeps a sliver visible so there is something to aim at, and the
   panel slides rather than disappearing, so the menu never seems to vanish. */
.sidebar-rail {
  transition: width .18s ease;
}
.sidebar-rail.sidebar-collapsed {
  width: 0.75rem;
}
.sidebar-rail.sidebar-collapsed > * {
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.sidebar-rail > * { opacity: 1; transition: opacity .18s ease .06s; }

/* A collapsed rail widens its hover target beyond its visible width, so the
   menu can be summoned without pixel-hunting the screen edge. */
.sidebar-rail.sidebar-collapsed::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inline-size: 1.25rem;
  translate: 0 0;
}
.sidebar-rail { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .sidebar-rail, .sidebar-rail > * { transition: none; }
}
