/* Screencap vs Cap: a git-style graph. Cap's main line, Screencap forks off it.
   Without JS (or with reduced motion) the figure shows its final state: everything visible and lit. */
.cv { margin: 24px 0 8px; }
.cv-card { position: relative; background: var(--card); border-radius: 30px; padding: 20px 20px 14px; box-shadow: 0 6px 0 rgba(11,36,64,.08), 0 26px 60px rgba(11,36,64,.11); display: grid; gap: 14px; }
.cv-stage { display: grid; gap: 12px; }
.cv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.cv-chip { padding: 6px 12px; border-radius: 12px; border: 3px solid var(--navy); box-shadow: 0 3px 0 var(--navy); font: 800 clamp(13px, 1.7vw, 15px)/1.15 var(--display); color: var(--navy); background: #fff; transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .25s; }
.cv-chip-sc { background: var(--sun); }
.cv-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 2.5px solid var(--navy); box-shadow: 0 3px 0 var(--navy); font: 700 clamp(12px, 1.5vw, 13.5px)/1.2 var(--display); color: var(--navy); background: var(--bg); transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .25s; }
.cv-badge::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); }
.cv-badge-sc { background: #fff; }
.cv-badge-sc::before { background: var(--rec); }

/* Tracks */
.cv-tracks { position: relative; height: 76px; margin: 2px 6px; }
.cv-lane { position: absolute; top: 0; height: 24px; left: 0; right: 0; }
.cv-lane-sc { top: 52px; left: calc(28% + 56px); }
.cv-line { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--navy); transform-origin: left center; transition: transform 1.3s linear; }
.cv-lane-sc .cv-line { background: var(--rec); }
.cv-dot { position: absolute; top: 3px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--navy); box-sizing: border-box; transition: transform .3s cubic-bezier(.3,1.6,.5,1), opacity .2s, background-color .4s; }
.cv-lane-sc .cv-dot { border-color: var(--rec); }
.cv-fork { left: 28%; }
.cv-branch { position: absolute; left: 28%; top: 12px; width: 56px; height: 52px; overflow: visible; transition: opacity .5s; }
.cv-branch path { fill: none; stroke: var(--rec); stroke-width: 4; stroke-linecap: round; }
.cv-lit .cv-dot { background: var(--sun); }

/* Caption + controls */
.cv-foot { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.cv-step { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--sun); border: 3px solid var(--navy); box-shadow: 0 3px 0 var(--navy); font: 800 14px/1 var(--display); color: var(--navy); }
.cv-cap { flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.35; color: var(--body); }
.cv-cap b { color: var(--navy); }
.cv-btn { flex: none; display: none; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; border: 2.5px solid var(--navy); background: #fff; color: var(--navy); font: 700 13px/1 var(--display); cursor: pointer; box-shadow: 0 3px 0 var(--navy); }
.cv-btn:active { translate: 0 2px; box-shadow: 0 1px 0 var(--navy); }
.cv-btn svg { width: 12px; height: 12px; }
.cv-steps { margin: 0; padding: 0 4px; list-style: none; display: grid; gap: 6px; font-size: 14.5px; color: var(--body); counter-reset: cv; }
.cv-steps li { display: flex; gap: 8px; }
.cv-steps li::before { counter-increment: cv; content: counter(cv); flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--sun); border: 2px solid var(--navy); font: 800 12px/1 var(--display); color: var(--navy); }

/* JS-driven states. Default (no JS): final state, captions list shown. */
.cv.is-js .cv-steps { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cv.is-js .cv-btn { display: inline-flex; }
.cv:not(.is-js) .cv-foot { display: none; }
.cv.is-js .cv-line.is-off { transform: scaleX(0); }
.cv.is-js .cv-dot.is-off, .cv.is-js .cv-chip.is-off, .cv.is-js .cv-badge.is-off { opacity: 0; transform: scale(.4); }
.cv.is-js .cv-branch.is-off { opacity: 0; }

@media (max-width: 560px) {
  .cv-card { padding: 16px 12px 12px; border-radius: 24px; }
  .cv-cap { font-size: 14px; }
  .cv-badge { padding: 3px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-line, .cv-dot, .cv-chip, .cv-badge, .cv-branch { transition: none; }
}
/* Break out of the narrow text column on wide screens so the graph has room. */
@media (min-width: 900px) {
  .cv { margin-left: calc(50% - min(440px, 50vw - 24px)); margin-right: calc(50% - min(440px, 50vw - 24px)); }
}
