figure.demo ul {
  /* Identify the scroll group that the browser monitors */
  scroll-target-group: auto;
  /* And as <a> elements within that group come into frame, they are automatically treated as the "current target" */
  a:target-current {
    /* Whatever style you wish to denote the "current target" */
    font-weight: bold;
    background-color: var(--green-dark);
    color: var(--green-light);
  }
}

/* Only used for the demo */
figure.demo {
  display: grid;
  grid-template-columns: 
    minmax(100px, 1fr) 
    minmax(300px, 3fr);
  gap: 2em;
  ul {
    position: sticky;
    top: 0;
  }
  a {
    display: block;
    padding: 4px 8px;
  }
  section {
    padding-block-end: 1rem;
    margin-block-end: 1rem;
  }
}
