/* Install, "Four steps to your first ticket" (download.dc.html, 02 First run):
   each step card carries a progress bar along its top edge and a tick by its
   number, and the heading's "~10 minutes" sits over a four-part meter. Played
   once by js/install-steps.js when the steps come into view; the markup at rest
   is the finished picture: every tick shown, the meter full, the bars gone
   (they only show a step running). Text is never dimmed, so the steps read the
   same while the figure plays. */
.frun__step { position: relative; }
.frun__step::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(90% 60% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); opacity: 0; transition: opacity .5s ease; }
.frun__step > :not(.frun__bar) { position: relative; z-index: 1; }
.frun__bar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); opacity: 0; transform-origin: left center; }
.frun__tick { display: inline-block; width: 10px; height: 10px; margin-left: 8px; vertical-align: -1px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4 4.9 9.2 10 3.2' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4 4.9 9.2 10 3.2' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.frun__meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; width: 100%; max-width: 168px; }
.frun__meter i { position: relative; height: 2px; border-radius: 1px; overflow: hidden; background: var(--line-2); }
.frun__meter i::before { content: ''; position: absolute; inset: 0; background: var(--accent); opacity: .45; transform-origin: left center; }
.frun__total { color: var(--text); transition: color .6s ease; }

/* Playing: a step runs (bar fills, the card catches a light), then is done
   (bar fades, tick lands, its meter part settles). --frun-step is set by the script. */
.frun[data-armed] .frun__bar, .frun[data-armed] .frun__meter i::before { transform: scaleX(0); opacity: 1; transition: transform var(--frun-step, 1.1s) cubic-bezier(.45, .05, .35, 1), opacity .6s ease; }
.frun[data-armed] .frun__step.is-on > .frun__bar, .frun[data-armed] .frun__meter i.is-on::before { transform: none; }
.frun[data-armed] .frun__step.is-done > .frun__bar { opacity: 0; }
.frun[data-armed] .frun__meter i.is-done::before { opacity: .45; }
.frun[data-armed] .frun__step.is-on:not(.is-done)::after { opacity: 1; }
.frun[data-armed] .frun__tick { transform: scale(0); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), opacity .2s ease; }
.frun[data-armed] .frun__step.is-done .frun__tick { transform: none; opacity: 1; }
.frun[data-armed] .frun__total.is-on { color: var(--accent); }

