/* Animated product walkthrough — adapted from the Cowork demo player.
   It is the product UI animating itself, not a video: no fake cursor, no play-over-a-still,
   and it says so under the controls. Every beat shows something the product really does
   today (price book, Good/Better/Best, signature, PDF, quote list). No financing, no
   deposits, no revenue figures — the sample job's prices are the only numbers.
   Colours come from the page's :root tokens. Markup lives in each trade page; behaviour in
   /walkthrough.js. When there is a real screen recording, put a <video> in the same slot. */
.tvd{--ease:cubic-bezier(.16,1,.3,1);--mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  width:100%;margin:0 auto;color:var(--on-dark);display:flex;flex-direction:column;gap:14px}
.tvd-wrap{background:var(--dark);border-radius:16px;padding:22px 20px 14px;margin:30px 0 0}
.tvd-stage{position:relative;width:100%;aspect-ratio:16/10;background:var(--paper);border-radius:12px;
  overflow:hidden;border:1px solid var(--dark-2);container-type:inline-size}
.tvd-beat{position:absolute;inset:0;opacity:0;pointer-events:none;transition:opacity .5s var(--ease);
  display:flex;flex-direction:column;font-size:1.85cqw}
.tvd-beat[data-on="1"]{opacity:1;pointer-events:auto}

.tvd-bar{height:3.2em;flex:none;display:flex;align-items:center;gap:.8em;padding:0 1.2em;
  background:var(--card);border-bottom:1px solid var(--line);color:var(--ink);line-height:1.25}
.tvd-dot{width:.55em;height:.55em;border-radius:99px;background:var(--line);flex:none}
.tvd-bar b{font-size:.85em;font-weight:600;letter-spacing:-.01em}
.tvd-bar span{font-size:.72em;color:var(--slate)}
.tvd-tag{margin-left:auto;font-size:.66em!important;font-weight:600;padding:.28em .7em;border-radius:99px;
  background:var(--paper);color:var(--slate-2)!important;white-space:nowrap}
.tvd-tag--live{background:var(--accent-soft);color:var(--accent-text)!important}
.tvd-tag--done{background:color-mix(in srgb,var(--green) 12%,var(--card));color:var(--green)!important}

.tvd-body{flex:1;min-height:0;padding:1.3em 1.5em;display:flex;flex-direction:column;gap:.9em;color:var(--ink);line-height:1.35}
.tvd-h{margin:0;font-size:1.05em;font-weight:600;letter-spacing:-.015em}
.tvd-sub{margin:0;font-size:.72em;color:var(--slate)}
.tvd .mono{font-family:var(--mono);font-variant-numeric:tabular-nums}
@keyframes tvdIn{to{opacity:1;transform:none}}

/* 1 — price it */
.tvd-rows{display:flex;flex-direction:column}
.tvd-row{display:flex;align-items:center;gap:.9em;font-size:.8em;padding:.62em 0;border-bottom:1px solid var(--line);
  opacity:0;transform:translateY(.5em)}
.tvd-beat[data-on="1"] .tvd-row{animation:tvdIn .5s var(--ease) forwards}
.tvd-row:nth-child(1){animation-delay:.15s}.tvd-row:nth-child(2){animation-delay:.35s}
.tvd-row:nth-child(3){animation-delay:.55s}.tvd-row:nth-child(4){animation-delay:.75s}
.tvd-row:nth-child(5){animation-delay:.95s}
.tvd-row i{font-style:normal;width:1.5em;height:1.5em;flex:none;border-radius:.4em;background:var(--accent-soft);
  color:var(--accent-text);display:flex;align-items:center;justify-content:center;font-size:.8em;font-weight:700}
.tvd-row span{flex:1;min-width:0}
.tvd-row b{font-family:var(--mono);font-weight:600;min-width:5em;text-align:right}
.tvd-total{margin-top:auto;display:flex;align-items:baseline;gap:.7em;padding-top:.8em;border-top:2px solid var(--ink)}
.tvd-total span{font-size:.75em;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--slate-2)}
.tvd-total b{margin-left:auto;font-family:var(--mono);font-size:1.7em;font-weight:600;letter-spacing:-.03em}

/* 2 — three options */
.tvd-opts{display:grid;grid-template-columns:repeat(3,1fr);gap:.7em;flex:1;align-content:start}
.tvd-opt{border:1.5px solid var(--line);border-radius:.7em;padding:.9em;background:var(--card);
  display:flex;flex-direction:column;gap:.4em;opacity:0;transform:translateY(.9em)}
.tvd-beat[data-on="1"] .tvd-opt{animation:tvdIn .55s var(--ease) forwards}
.tvd-opt:nth-child(1){animation-delay:.15s}.tvd-opt:nth-child(3){animation-delay:.55s}
.tvd-opt strong{font-size:.82em}
.tvd-opt .p{font-family:var(--mono);font-size:1.25em;font-weight:600;letter-spacing:-.02em}
.tvd-opt ul{margin:0;padding-left:1.05em;font-size:.7em;color:var(--slate-2);line-height:1.55}
.tvd-opt--pick{border-color:var(--ink);box-shadow:0 0 0 1.5px var(--ink)}
.tvd-beat[data-on="1"] .tvd-opt--pick{animation:tvdIn .55s var(--ease) .35s forwards,tvdPick .7s var(--ease) 1.6s}
@keyframes tvdPick{50%{transform:translateY(-.4em) scale(1.015)}}
.tvd-pill{align-self:flex-start;font-size:.62em;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  background:var(--accent);color:var(--ink);padding:.22em .6em;border-radius:99px}

/* 3 — signature */
.tvd-field{display:flex;flex-direction:column;gap:.3em;font-size:.72em;color:var(--slate)}
.tvd-field div{background:var(--card);border:1px solid var(--line);border-radius:.5em;padding:.55em .8em;
  font-size:1.15em;color:var(--ink);font-weight:500}
.tvd-sign{flex:1;min-height:0;border:1.5px dashed var(--slate);border-radius:.7em;background:var(--card);
  display:flex;align-items:center;justify-content:center}
.tvd-sign svg{width:58%;height:auto;max-height:90%}
.tvd-sign path{fill:none;stroke:var(--ink);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:640;stroke-dashoffset:640}
.tvd-beat[data-on="1"] .tvd-sign path{animation:tvdDraw 1.9s var(--ease) .45s forwards}
@keyframes tvdDraw{to{stroke-dashoffset:0}}
.tvd-signrow{display:flex;align-items:center;gap:.8em;font-size:.74em;color:var(--slate-2)}
.tvd-check{width:1.3em;height:1.3em;flex:none;border-radius:.3em;border:1.5px solid var(--slate);
  display:flex;align-items:center;justify-content:center}
.tvd-check svg{width:.85em;height:.85em;opacity:0}
.tvd-beat[data-on="1"] .tvd-check{animation:tvdTick .3s var(--ease) 2.5s forwards}
.tvd-beat[data-on="1"] .tvd-check svg{animation:tvdIn .3s var(--ease) 2.5s forwards}
@keyframes tvdTick{to{background:var(--green);border-color:var(--green)}}
.tvd-btn{margin-left:auto;background:var(--ink);color:var(--on-dark);border-radius:.55em;padding:.72em 1.4em;
  font-size:.95em;font-weight:700;white-space:nowrap}

/* 4 — paperwork */
.tvd-doc{flex:1;min-height:0;background:var(--card);border:1px solid var(--line);border-radius:.6em;
  padding:1em 1.2em;display:flex;flex-direction:column;gap:.55em;font-size:.74em;
  opacity:0;transform:translateY(.6em)}
.tvd-beat[data-on="1"] .tvd-doc{animation:tvdIn .55s var(--ease) .15s forwards}
.tvd-doc-top{display:flex;align-items:center;gap:.8em;padding-bottom:.6em;border-bottom:2px solid var(--ink)}
.tvd-logo{width:2.4em;height:2.4em;border-radius:.45em;background:var(--accent);flex:none}
.tvd-doc-top b{font-size:1.1em}
.tvd-doc-top span{display:block;color:var(--slate);font-size:.85em}
.tvd-doc-top em{margin-left:auto;font-style:normal;text-align:right;color:var(--slate);font-size:.85em}
.tvd-doc-grid{display:grid;grid-template-columns:1fr 1fr;gap:.2em 1em;color:var(--slate-2)}
.tvd-doc-grid b{color:var(--ink);font-weight:600}
.tvd-doc-line{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:.3em 0}
.tvd-doc-line b{font-family:var(--mono);font-weight:600}
.tvd-doc-total{border-bottom:0;border-top:1.5px solid var(--ink);font-weight:700;font-size:1.1em}
.tvd-doc-sig{margin-top:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:1em;color:var(--slate)}
.tvd-doc-sig svg{width:9em;height:auto}
.tvd-doc-sig path{fill:none;stroke:var(--ink);stroke-width:3;stroke-linecap:round}
.tvd-steps{display:flex;gap:.7em}
.tvd-step{flex:1;display:flex;align-items:center;gap:.6em;font-size:.74em;background:var(--card);
  border:1px solid var(--line);border-radius:.6em;padding:.55em .7em;opacity:.3}
.tvd-beat[data-on="1"] .tvd-step{animation:tvdLight .45s var(--ease) forwards}
.tvd-step:nth-child(1){animation-delay:1.1s}.tvd-step:nth-child(2){animation-delay:1.8s}
@keyframes tvdLight{to{opacity:1}}
.tvd-tick{width:1.35em;height:1.35em;flex:none;border-radius:99px;background:var(--green);display:flex;align-items:center;justify-content:center}
.tvd-tick svg{width:.8em;height:.8em}

/* 5 — on file */
.tvd-search{background:var(--card);border:1px solid var(--line);border-radius:.55em;padding:.55em .8em;
  font-size:.76em;color:var(--slate)}
.tvd-list{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:.6em;overflow:hidden}
.tvd-item{display:flex;align-items:center;gap:.9em;padding:.7em 1em;border-bottom:1px solid var(--line);font-size:.78em;
  opacity:0;transform:translateY(.5em)}
.tvd-item:last-child{border-bottom:0}
.tvd-beat[data-on="1"] .tvd-item{animation:tvdIn .5s var(--ease) forwards}
.tvd-item:nth-child(1){animation-delay:.15s}.tvd-item:nth-child(2){animation-delay:.35s}
.tvd-item:nth-child(3){animation-delay:.55s}.tvd-item:nth-child(4){animation-delay:.75s}
.tvd-item:nth-child(5){animation-delay:.95s}
.tvd-item div{flex:1;min-width:0}
.tvd-item div span{display:block;color:var(--slate);font-size:.88em}
.tvd-item b{font-family:var(--mono);font-weight:600}
.tvd-st{font-size:.82em;font-weight:700;min-width:4.6em;text-align:right}
.tvd-st--signed{color:var(--green)}.tvd-st--sent{color:var(--slate-2)}.tvd-st--draft{color:var(--slate)}

/* controls */
.tvd-track{display:flex;gap:6px}
.tvd-chap{flex:1;appearance:none;border:0;padding:0;background:none;cursor:pointer;display:flex;flex-direction:column;
  gap:7px;text-align:left;min-height:44px;justify-content:center;font:inherit}
.tvd-chap-bar{height:3px;border-radius:99px;background:var(--dark-2);overflow:hidden}
.tvd-chap-fill{display:block;height:100%;width:0;background:var(--accent);border-radius:99px}
.tvd-chap-done .tvd-chap-fill{width:100%}
.tvd-chap-label{font-size:12px;font-weight:500;color:var(--dark-muted);transition:color .3s}
.tvd-chap[aria-current="true"] .tvd-chap-label{color:var(--on-dark);font-weight:600}
.tvd-chap:focus-visible,.tvd-play:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}
.tvd-foot{display:flex;align-items:center;gap:12px}
.tvd-play{appearance:none;border:1px solid var(--dark-2);background:transparent;color:var(--on-dark);cursor:pointer;
  width:44px;height:44px;flex:none;border-radius:11px;display:flex;align-items:center;justify-content:center}
@media (hover:hover) and (pointer:fine){.tvd-play:hover{background:var(--dark-2)}}
.tvd-cap{margin:0;font-size:13.5px;color:var(--dark-muted);line-height:1.5}
.tvd-cap b{color:var(--on-dark);font-weight:600}
.tvd-note{margin-left:auto;font-size:11.5px;color:var(--dark-muted);white-space:nowrap;opacity:.8}

@media (max-width:640px){
  .tvd-wrap{padding:14px 12px 8px;margin-left:-6px;margin-right:-6px}
  .tvd-stage{aspect-ratio:4/5}
  .tvd-beat{font-size:3.7cqw}
  .tvd-opts{grid-template-columns:1fr;gap:.5em}
  .tvd-opt{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:.2em .8em;padding:.7em .9em}
  .tvd-opt .p{margin-left:auto}
  .tvd-opt ul{flex-basis:100%;display:flex;flex-wrap:wrap;gap:0 1.2em;padding-left:0;list-style:none}
  .tvd-opt--pick .tvd-pill{order:-1;flex-basis:100%;flex-grow:0;max-width:max-content}
  .tvd-steps{flex-direction:column;gap:.4em}
  .tvd-doc-grid{grid-template-columns:1fr}
  .tvd-doc-sig svg{width:6em}
  .tvd-chap-label,.tvd-note{display:none}
}
@media (prefers-reduced-motion:reduce){
  .tvd-beat,.tvd-row,.tvd-opt,.tvd-step,.tvd-doc,.tvd-item,.tvd-sign path,.tvd-check,.tvd-check svg{
    animation:none!important;transition:none!important;opacity:1!important;transform:none!important;stroke-dashoffset:0!important}
  .tvd-check{background:var(--green);border-color:var(--green)}
  .tvd-beat{opacity:0!important}
  .tvd-beat[data-on="1"]{opacity:1!important}
}
