/* One stepper for every tool: the Recon (rv-steps) and accounting/POS (tr-accounting-steps) step bars share these rules.
   UI #188 (owner pick, style 66 "Slim · bead pushes + check pop"): one slim pill row of dot + name. A thin track runs under
   it; the filled part grows to the current step's dot and pushes a bead there. A step that has just been finished stamps in
   its check with a few sparks (assets/js/app-workspace-stepper.js measures the bar and starts the pop).
   Owner (Nov 11, option G "White stepper"): the pill is white again (the raised dark surface in dark mode) with a hairline ring
   and a faint shadow, so it shows on the flat white pages. The current step is blue and bold with a blue dot, done steps are
   plain ink with a green check, later steps are grey, and the line is one blue on a light grey track. Every colour is set
   here once through the --tr-stepper-* variables, so each tool's step bar changes together. All text is AA (4.5:1 or better). */
#appShell.ui-workspace .tr-stepper {--tr-stepper-bg:var(--ui-surface-solid);--tr-stepper-ring:var(--ui-line);--tr-stepper-shadow:0 4px 18px rgb(15 29 51 / 8%);--tr-stepper-current:var(--ui-blue);--tr-stepper-done:var(--ui-ink);--tr-stepper-later:var(--ui-ink-secondary);--tr-stepper-later-dot:var(--ui-line-strong);--tr-stepper-blue:var(--ui-blue);--tr-stepper-ok:var(--ui-green);--tr-stepper-track:var(--ui-line);position:relative;display:flex;gap:6px;margin:0 0 6px;padding:11px 18px 18px;border:0;border-radius:999px;background:var(--tr-stepper-bg);box-shadow:0 0 0 1px var(--tr-stepper-ring),var(--tr-stepper-shadow)}
/* Dark: the raised dark surface with the same hairline ring; no shadow, which would not read on the dark page. */
#appShell.ui-workspace[data-ui-theme="dark"] .tr-stepper {--tr-stepper-shadow:0 0 #0000}
/* Step buttons are plain buttons: a dot and the step name on one line, centred in an equal share of the row. */
#appShell.ui-workspace .tr-stepper button {position:relative;display:flex;flex:1 1 0;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:34px;padding:4px;border:0;border-radius:999px;background:transparent;box-shadow:none;transform:none;opacity:1;color:var(--tr-stepper-later);font-size:var(--type-body);font-weight:600;line-height:1.25;transition:color 150ms ease;user-select:none;text-align:center;white-space:nowrap}
#appShell.ui-workspace .tr-stepper button:disabled {cursor:not-allowed}
#appShell.ui-workspace .tr-stepper button:focus-visible {outline:2px solid var(--ui-blue);outline-offset:2px}
/* The dot. Its number or check stays in the page for the code that writes it, but only the dot shows. */
#appShell.ui-workspace .tr-stepper-mark {position:relative;display:grid;place-items:center;flex:none;width:9px;height:9px;overflow:hidden;border-radius:50%;background:var(--tr-stepper-later-dot);color:transparent;text-indent:100%;white-space:nowrap}
/* Done steps: a green check in place of the dot, in the same 15px box (the check character in the page stays hidden). */
#appShell.ui-workspace .tr-stepper .is-done .tr-stepper-mark {width:15px;height:15px;background:transparent}
#appShell.ui-workspace .tr-stepper .is-done .tr-stepper-mark::after {content:"✓";position:absolute;inset:0;display:grid;place-items:center;text-indent:0;color:var(--tr-stepper-ok);font-size:var(--type-caption);font-weight:700;line-height:1}
#appShell.ui-workspace .tr-stepper [aria-current=step]:not(.is-done) .tr-stepper-mark {background:var(--tr-stepper-blue);box-shadow:0 0 0 3px color-mix(in srgb,var(--tr-stepper-blue) 25%,transparent)}
#appShell.ui-workspace .tr-stepper-copy {display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}
/* The status words (Complete, Current step, Up next) are spoken from each button's name; the slim row shows only the step name. */
#appShell.ui-workspace .tr-stepper-copy small {display:none}
#appShell.ui-workspace .tr-stepper .is-done .tr-stepper-copy>span {color:var(--tr-stepper-done)}
#appShell.ui-workspace .tr-stepper button:not([aria-current=step]):not(:disabled):hover .tr-stepper-copy>span {text-decoration:underline}
#appShell.ui-workspace .tr-stepper [aria-current=step] .tr-stepper-copy>span {color:var(--tr-stepper-current);font-weight:700}
/* UI #195 (style 62 "shimmer name"): a light band sweeps across the current step's name, left to right, at the mockup's speed
   (1.8s per sweep). It runs twice when a step becomes current (3.6s, under WCAG's 5-second limit for motion that starts by
   itself), then rests on the plain blue. Only the paint changes, never the width. The band (a light blue) starts and ends off
   the text, so the resting name is the same blue as without the effect. Reduced motion, high-contrast mode, or a browser without clipped text: plain text. */
@media (prefers-reduced-motion:no-preference) and (forced-colors:none){@supports ((-webkit-background-clip:text) or (background-clip:text)){
  #appShell.ui-workspace .tr-stepper [aria-current=step]:not(.is-done) .tr-stepper-copy>span {background:linear-gradient(90deg,var(--tr-stepper-current) 25%,color-mix(in srgb,var(--tr-stepper-current) 41%,#fff) 50%,var(--tr-stepper-current) 75%) 150% 0/200% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:tr-stepper-shimmer 1.8s linear 2}
}}
@keyframes tr-stepper-shimmer {from{background-position:350% 0}to{background-position:150% 0}}
#appShell.ui-workspace :is(.accounting-design[data-accounting-finished=true],.recon-v11[data-recon-finished=true]) .tr-stepper [aria-current=step] .tr-stepper-copy>span {background:none;-webkit-text-fill-color:currentcolor;animation:none}
#appShell.ui-workspace :is(.accounting-design[data-accounting-finished=true],.recon-v11[data-recon-finished=true]) .tr-stepper [aria-current=step] .tr-stepper-mark {background:var(--tr-stepper-ok);box-shadow:0 0 0 3px color-mix(in srgb,var(--tr-stepper-ok) 25%,transparent)}
#appShell.ui-workspace :is(.accounting-design[data-accounting-finished=true],.recon-v11[data-recon-finished=true]) .tr-stepper [aria-current=step] .tr-stepper-copy>span {color:var(--tr-stepper-ok)}
/* The track, the filled bar and the bead. One blue up to the current step; green once every step is done. */
#appShell.ui-workspace .tr-stepper-track {position:absolute;left:18px;right:18px;bottom:7px;height:3px;border-radius:3px;background:var(--tr-stepper-track);pointer-events:none}
#appShell.ui-workspace .tr-stepper-fill {position:absolute;top:0;bottom:0;left:0;width:0;border-radius:3px;background:var(--tr-stepper-blue);transition:width 1s cubic-bezier(.45,0,.2,1)}
#appShell.ui-workspace .tr-stepper-bead {position:absolute;top:50%;left:0;box-sizing:border-box;width:14px;height:14px;margin:-7px 0 0 -7px;border:2.5px solid var(--tr-stepper-blue);border-radius:50%;background:var(--tr-stepper-bg);transition:left 1s cubic-bezier(.45,0,.2,1)}
#appShell.ui-workspace .tr-stepper-bead.is-moving {animation:tr-stepper-squish 1s ease-in-out}
#appShell.ui-workspace .tr-stepper-track.is-finished .tr-stepper-fill {background:var(--tr-stepper-ok)}
#appShell.ui-workspace .tr-stepper-track.is-finished .tr-stepper-bead {border-color:var(--tr-stepper-ok)}
/* First draw, a resize or a font swap puts the bar in place without the slide. */
#appShell.ui-workspace .tr-stepper-track.is-still :is(.tr-stepper-fill,.tr-stepper-bead) {transition:none}
/* The check pop: the just-finished step stamps in its check .25s after the bar starts moving, with sparks around it. */
#appShell.ui-workspace .tr-stepper button.is-just .tr-stepper-mark {animation:tr-stepper-stamp .5s cubic-bezier(.3,1.6,.5,1) .25s both}
#appShell.ui-workspace .tr-stepper-spark {position:absolute;width:6px;height:6px;margin:-3px 0 0 -3px;border-radius:50%;background:var(--tr-stepper-ok);pointer-events:none;animation:tr-stepper-burst .9s cubic-bezier(.2,.7,.3,1) .25s both}
#appShell.ui-workspace .tr-stepper-spark.is-blue {background:var(--tr-stepper-blue)}
@keyframes tr-stepper-stamp {from{transform:scale(2.2) rotate(-25deg);opacity:0}}
@keyframes tr-stepper-burst {to{transform:translate(var(--tr-spark-x),var(--tr-spark-y)) scale(.2);opacity:0}}
@keyframes tr-stepper-squish {15%{transform:scale(1.3,.78)}70%{transform:scale(1.15,.88)}85%{transform:scale(.9,1.12)}100%{transform:none}}
@media (prefers-reduced-motion:reduce){#appShell.ui-workspace .tr-stepper-track :is(.tr-stepper-fill,.tr-stepper-bead,.tr-stepper-bead.is-moving) {transition:none;animation:none}#appShell.ui-workspace .tr-stepper button.is-just .tr-stepper-mark {animation:none}#appShell.ui-workspace .tr-stepper .tr-stepper-spark {display:none}}
#appShell.ui-workspace .tr-stepper-line {display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 14px;margin:8px 2px 22px;font-size:var(--type-body);color:var(--ui-ink-secondary)}
#appShell.ui-workspace .tr-stepper-line b {font-weight:700;color:var(--ui-ink)}
#appShell.ui-workspace .tr-stepper-line span:empty {display:none}
#appShell.ui-workspace .tr-stepper-stale {margin:0 0 18px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--ui-amber,#b7791f) 30%,var(--ui-line));border-radius:10px;background:color-mix(in srgb,var(--ui-amber,#b7791f) 12%,var(--ui-surface-solid));color:var(--ui-ink);font-size:var(--type-body)}
/* Phones: dots for every step and the full name of the current one only. The current step takes the room its name needs; the others share what is left. */
@media(max-width:760px){
  #appShell.ui-workspace .tr-stepper {gap:2px;padding:4px 14px 16px}
  #appShell.ui-workspace .tr-stepper button {min-height:44px;padding:0 2px}
  #appShell.ui-workspace .tr-stepper button[aria-current=step] {flex:0 0 auto}
  #appShell.ui-workspace .tr-stepper [aria-current=step] .tr-stepper-copy {overflow:visible}
  #appShell.ui-workspace .tr-stepper button:not([aria-current=step]) .tr-stepper-copy {display:none}
  #appShell.ui-workspace .tr-stepper-track {left:14px;right:14px;bottom:6px}
  #appShell.ui-workspace .tr-stepper-line {margin-bottom:18px}
}
/* Import mapping parts: the same marks, smaller, inside the step. */
#appShell.ui-workspace #paneImportHub .stepper {display:flex;flex-wrap:wrap;gap:6px 16px;padding:0;border:0;background:none}
#appShell.ui-workspace #paneImportHub .stepper .step {display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:none;box-shadow:none;font-size:var(--type-caption);font-weight:600;color:var(--ui-ink-secondary)}
#appShell.ui-workspace #paneImportHub .stepper .step i {display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--ui-line);border-radius:50%;background:var(--ui-surface-muted);font-size:var(--type-caption);font-style:normal}
#appShell.ui-workspace #paneImportHub .stepper .step.active {color:var(--ui-blue)}
#appShell.ui-workspace #paneImportHub .stepper .step.active i {border-color:var(--ui-blue);background:var(--ui-blue);color:var(--workspace-primary-ink,#fff)}
/* Keep each step label on one line where five or six steps share a narrow row. */
@media (max-width:900px){#appShell.ui-workspace .tr-stepper button{padding:4px 1px}#appShell.ui-workspace .tr-stepper-copy>span{font-size:var(--type-caption)}}
