/* THE SLIDING BAR (public/js/00b-slide-bar.js; owner 30 Nov 2026). A pill track of equal tabs; the chosen one wears a coloured bar that
   slides to the tab pressed: the edge in front leads, the edge behind follows on a soft spring, so the bar stretches and settles. The
   words change colour as the bar arrives. The track's padding is --slide-pad; the place gives the track and the tabs their own look. */
@property --slide-l{syntax:'<number>';inherits:false;initial-value:0}
@property --slide-r{syntax:'<number>';inherits:false;initial-value:0}
html[data-new-pace] .np-slide{--slide-pad:var(--np-space-1);--slide-spring:cubic-bezier(.3,1.15,.6,1);position:relative;display:inline-grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:0;
  padding:var(--slide-pad);border-radius:var(--np-round-pill);background:var(--fx-glass);border:1px solid var(--fx-glass-edge);max-width:100%;contain:layout}
@supports (animation-timing-function:linear(0,1)){ html[data-new-pace] .np-slide{--slide-spring:linear(0,0.042,0.143,0.273,0.411,0.543,0.661,0.761,0.842,0.905,0.952,0.985,1.007,1.02,1.026,1.028,1.027,1.025,1.021,1.017,1.013,1.01,1)} }
html[data-new-pace] .np-slide > :not(.np-slide-thumb){position:relative;z-index:1}
html[data-new-pace] .np-slide > .np-slide-thumb{--slide-l:var(--at);--slide-r:var(--at);position:absolute;z-index:0;top:var(--slide-pad);bottom:var(--slide-pad);
  left:calc(var(--slide-pad) + (100% - 2 * var(--slide-pad)) / var(--n) * var(--slide-l));
  width:calc((100% - 2 * var(--slide-pad)) / var(--n) * (var(--slide-r) - var(--slide-l) + 1));
  border-radius:var(--np-round-pill);background:var(--fx-main);box-shadow:0 2px 10px color-mix(in srgb,var(--fx-main) 35%,transparent);pointer-events:none}
html[data-new-pace] .np-slide > .np-slide-thumb.is-right{animation:np-slide-r .38s cubic-bezier(.25,.8,.25,1) var(--d,0ms) both,np-slide-l .55s var(--slide-spring) calc(var(--d,0ms) + 40ms) both}
html[data-new-pace] .np-slide > .np-slide-thumb.is-left{animation:np-slide-l .38s cubic-bezier(.25,.8,.25,1) var(--d,0ms) both,np-slide-r .55s var(--slide-spring) calc(var(--d,0ms) + 40ms) both}
/* at rest the chosen tab wears the colour itself (so it reads as one piece, and a contrast check sees what a person sees); while the
   bar travels the tab arriving holds back its own colour until the bar has settled under it */
html[data-new-pace] .np-slide > [aria-selected="true"]{background:var(--fx-main)}
html[data-new-pace] .np-slide > .is-arriving{animation:np-slide-in .28s ease calc(var(--d,0ms) + 110ms) both,np-slide-hold .6s linear var(--d,0ms)}
html[data-new-pace] .np-slide > .is-leaving{animation:np-slide-out .22s ease var(--d,0ms) both}
html[data-new-pace] .np-slide > :is(.is-arriving,.is-leaving) b{color:inherit}
@keyframes np-slide-l{from{--slide-l:var(--from)}to{--slide-l:var(--at)}}
@keyframes np-slide-r{from{--slide-r:var(--from)}to{--slide-r:var(--at)}}
@keyframes np-slide-in{from{color:var(--fx-text2)}}
@keyframes np-slide-out{from{color:var(--fx-on-main)}}
@keyframes np-slide-hold{from,to{background-color:transparent}}
