1@layer stuck {
2  @supports (container-type: scroll-state) {
3    nav { container-type: scroll-state; }
4    @container scroll-state(stuck: top) {
5      /* expand grid template via custom property (or whatever) */
6      .nav__content { --expanded: 1; }
7    }
8  }
9}