/* fx layer, dash: the shelf dash (arrows and arrow keys) and the progress thread.
   fx/dash.js adds one host per shelf on its first dash (.fx-dash-front: same box as the track's upper part, over it,
   layer 2) for the thin speed-lines. It is empty at rest.
   Everything that changes the page's look waits for a class set by fx/dash.js (fx-dash-ready on <html>,
   fx-dash-on on a dashing track), so without the script the shelves look and behave as before. */

.fx-dash-host{position:absolute;left:0;right:0;top:0;height:0;pointer-events:none}
.fx-dash-front{z-index:2}

/* while dashing, dash.js owns scrollLeft: no snapping or smooth scrolling in between its frames */
.track.fx-dash-on{scroll-snap-type:none;scroll-behavior:auto}
/* after a dash: resting exactly on the card's layout edge; dash.js removes this as soon as the visitor scrolls */
.track.fx-dash-rest{scroll-snap-type:none}

/* thin ink speed-lines, three drawings on twos (dash.js shows each for one slot) */
.fx-dash-lines{position:absolute;inset:0;pointer-events:none;overflow:hidden;opacity:.72}
.fx-dash-lines svg{position:absolute;inset:0;width:100%;height:100%;display:block}
.fx-dash-ln{fill:var(--ink);opacity:0}

/* ---------- the progress thread: a thin line in the shelf's element colour, a head mark at the bead ---------- */
.shelf[data-fx="flame"]{--fx-dash-c:var(--fx-flame-main,var(--verm))}
.shelf[data-fx="water"]{--fx-dash-c:var(--fx-water-main,var(--indigo))}
.shelf[data-fx="thunder"]{--fx-dash-c:var(--fx-thunder-main,var(--gold))}
.shelf[data-fx="wind"]{--fx-dash-c:var(--fx-wind-main,var(--moss))}
.shelf[data-fx="ink"]{--fx-dash-c:var(--fx-ink-main,var(--ink))}

.fx-dash-ready .thread::before{background:color-mix(in srgb,var(--fx-dash-c,var(--verm)) 24%,transparent)}
/* the travelled part: from the start to the bead (--fx-dash-p mirrors the bead's --p) */
.fx-dash-ready .thread::after{content:"";position:absolute;left:6px;right:6px;top:5.25px;height:2.5px;border-radius:2px;
  background:var(--fx-dash-c,var(--verm));transform-origin:0 50%;transform:scaleX(var(--fx-dash-p,0))}
/* the head mark: a small ink-edged lozenge in the element's colour */
.fx-dash-ready .thread i{z-index:1;top:2px;width:12px;height:10px;border-radius:1px 60% 1px 60%;
  background:var(--fx-dash-c,var(--verm));box-shadow:0 0 0 2px var(--paper),0 0 0 3.5px color-mix(in srgb,var(--fx-dash-c,var(--verm)) 45%,transparent);
  transform:rotate(-8deg)}
