/* PROGRESS RAIL, the shared case study part (progress-rail.js says what it
   does), with his picks (26 Oct 2026, VA DARK RAIL): Bring on Wonderful's ticks
   on the right, the part in view twice as tall and in Virgin red, names on hover
   or keyboard focus. Tokens only. Every link keeps a 24px target (WCAG 2.5.8)
   however thin its mark draws. */
.cs-rail { --rail-ink: var(--color-text-primary); --rail-now: var(--client-primary); --rail-dim: var(--alpha-600);
  position: fixed; top: 50%; right: var(--space-500); z-index: var(--z-sticky); translate: 0 -50%;
  opacity: 0; visibility: hidden; transition: opacity var(--duration-base) var(--ease-default), visibility 0s linear var(--duration-base); }
.cs-rail[data-shown] { opacity: 1; visibility: visible; transition: opacity var(--duration-base) var(--ease-default); }
/* the ink reads the ground behind it: white on a dark band in light mode, dark on a light one in dark mode, white on the red numbers band */
.cs-rail[data-ground="dark"] { --rail-ink: var(--neutral-0); }
.cs-rail[data-ground="light"] { --rail-ink: var(--neutral-950); }
.cs-rail[data-on-brand] { --rail-ink: var(--color-static-white); --rail-now: var(--color-static-white); --rail-dim: var(--alpha-700); }
.cs-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; justify-items: end; position: relative; }
.cs-rail a { display: flex; flex-direction: row-reverse; align-items: center; gap: var(--space-300); min-height: 24px; min-width: 24px; /* lint-ok: WCAG 2.5.8 target */
  justify-content: flex-start; color: var(--rail-ink); text-decoration: none; position: relative; }
.cs-rail a:focus-visible { outline: var(--border-focus); outline-offset: var(--focus-ring-offset); border-radius: var(--radius-sm); }
.cs-rail-mark { display: block; flex: none; width: 2px; height: var(--space-400); border-radius: var(--dot-radius); background: currentColor; opacity: var(--rail-dim);
  transition: height var(--duration-base) var(--ease-default), opacity var(--duration-base) var(--ease-default), background-color var(--duration-base) var(--ease-default); }
.cs-rail a[aria-current] .cs-rail-mark, .cs-rail a:hover .cs-rail-mark, .cs-rail a:focus-visible .cs-rail-mark { opacity: 1; }
.cs-rail a[aria-current] .cs-rail-mark { height: var(--space-700); background: var(--rail-now); }

/* the name: the part's eyebrow, in the eyebrow's mono, sentence case (1 Nov 2026, hub: the page badge matches the
   calm review panel, #1230, no capitals), on hover or focus. It sits out of the link's flow (1 Nov
   2026, chat VA STUDY BUILDER 1 NOV, a bug SCROLL PATTERN found): in flow, the hidden names made every link about
   173px wide, an invisible strip down the right edge that took the clicks meant for a card row's next arrow at 1280 */
.cs-rail-label { position: absolute; right: calc(100% + var(--space-300)); top: 50%;
  font: var(--weight-semibold) var(--text-label)/1.4 var(--font-mono); white-space: nowrap;
  padding: var(--space-100) var(--space-300); border-radius: var(--chip-radius); background: var(--color-surface); color: var(--color-text-primary);
  box-shadow: 0 0 0 1px var(--color-border); opacity: 0; translate: var(--space-200) -50%; pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-default), translate var(--duration-fast) var(--ease-default); }
.cs-rail a:hover .cs-rail-label, .cs-rail a:focus-visible .cs-rail-label { opacity: 1; translate: 0 -50%; }

/* phones and tablets under 900: no side rail (it would sit on the words); a thin
   red line under the header that fills as you read. The part's name pill under it
   went on 9 Nov 2026 (his ask, chat VA MOBILE HUB). */
.cs-rail-top { display: none; }
@media (max-width: 899px) {
  .cs-rail { display: none; }
  .cs-rail-top { display: block; position: fixed; left: 0; right: 0; top: var(--cs-top, var(--space-1000)); z-index: var(--z-sticky);
    height: 2px; transition: opacity var(--duration-base) var(--ease-default); pointer-events: none; } /* lint-ok: the line's own 2px */
  .cs-rail-top:not([data-shown]) { opacity: 0; }
  .cs-rail-top-fill { position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--client-primary); transform-origin: left; scale: var(--cs-rail-p, 0) 1; }
}
:root[data-motion="still"] .cs-rail, :root[data-motion="still"] .cs-rail *, :root[data-motion="still"] .cs-rail-top, :root[data-motion="still"] .cs-rail-top * { transition: none !important; }
@media (forced-colors: active) { .cs-rail-mark { forced-color-adjust: none; background: CanvasText; } .cs-rail a[aria-current] .cs-rail-mark { background: Highlight; } }
