.navigation-chevron {
  width: 16px;
  height: 16px;
  flex: none;
  margin-inline-start: auto;
  transition: var(--navigation-chevron-motion, none);
}
/* A side preview also sets aria-expanded, but it does not unfold the inline list. */
[aria-expanded=true]:not([aria-controls$="-flyout"]) > .navigation-chevron {
  transform: rotate(90deg);
}

/* Clip the natural list to a single animated grid track. */
.navigation-disclosure {
  --disclosure-slide: 220ms cubic-bezier(.2,.7,.2,1);
  display: grid;
  grid-template-rows: 0fr;
  min-width: 0;
}
.navigation-disclosure[data-open] {
  grid-template-rows: 1fr;
}
.navigation-disclosure-clip {
  min-height: 0;
  overflow: hidden;
}
/* Inside the clipped track, the first row gets the same gap as its peers.
   The space disappears with the list when a section is folded. */
body[data-workspace=true] :is(.sidebar, .settings-sidebar) .navigation-disclosure-clip > :is(.crm-tree, .settings-category-links) {
  margin-block-start: var(--nav-row-gap);
}
/* The last group has no following row to show the movement. Move the links
   with the reveal as well, so a branch slides even at the end of the menu. */
.sidebar .navigation-disclosure-clip > *,
.settings-sidebar .navigation-disclosure-clip > * {
  transform: translateY(calc(0px - var(--nav-row-height, 36px)));
}
.sidebar .navigation-disclosure[data-open] > .navigation-disclosure-clip > *,
.settings-sidebar .navigation-disclosure[data-open] > .navigation-disclosure-clip > * {
  transform: none;
}
.learner-sidebar .navigation-disclosure {
  --disclosure-slide: 260ms cubic-bezier(.2,.7,.2,1);
  opacity: 0;
}
.learner-sidebar .navigation-disclosure[data-open] {
  opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .navigation-disclosure[data-motion] {
    transition: grid-template-rows var(--disclosure-slide);
  }
  :is(.sidebar, .settings-sidebar) .navigation-disclosure[data-motion] > .navigation-disclosure-clip > * {
    transition: transform var(--disclosure-slide);
  }
  .learner-sidebar .navigation-disclosure[data-motion] {
    transition: grid-template-rows var(--disclosure-slide), opacity 200ms ease;
  }
  :root {
    --navigation-chevron-motion: transform 240ms cubic-bezier(.2,.7,.2,1), opacity 140ms;
  }
}
