/* ============================================================
   The product stage — five acts, original to Quicklead.
   Light surface, violet accent, everything animates from its
   act becoming current. No third-party libraries.
   ============================================================ */

.st {
  position: relative; height: 560px; overflow: hidden;
  border-radius: var(--r-2xl); border: 1px solid var(--line);
  background: #fff; box-shadow: 0 30px 70px -34px rgba(23,18,58,.28);
}
.st-screen {
  position: absolute; inset: 0; padding: 22px 24px;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.995);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility .45s;
}
.st[data-act="1"] .st-screen[data-act="1"],
.st[data-act="2"] .st-screen[data-act="2"],
.st[data-act="3"] .st-screen[data-act="3"],
.st[data-act="4"] .st-screen[data-act="4"],
.st[data-act="5"] .st-screen[data-act="5"] { opacity: 1; visibility: visible; transform: none; }

.st-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex: none; }
.st-t { font-family: var(--f-display); font-size: 14px; font-weight: 640; color: var(--text-hi); display: inline-flex; align-items: center; gap: 9px; }
.st-t i { color: var(--acc-violet); font-size: 13px; }
.st-pill { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--text-lo); display: inline-flex; align-items: center; gap: 7px; }
.st-pill-live { color: var(--acc-emerald); border-color: rgba(12,130,86,.26); background: rgba(12,130,86,.07); }
.st-pill-ok { color: var(--acc-violet); border-color: rgba(122,77,255,.26); background: rgba(122,77,255,.07); }
.st-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: stPulse 1.6s ease-in-out infinite; }
@keyframes stPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

.st-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; gap: 18px; white-space: nowrap; font-size: 11.5px; color: var(--text-lo); flex: none; }
.st-foot b { color: var(--text-hi); font-weight: 640; }
.st-tagmini { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; }
.st-ok { background: rgba(12,130,86,.1); color: var(--acc-emerald); }
.st-cut { background: var(--fill-2); color: var(--text-dim); }
.st-count { font-variant-numeric: tabular-nums; }

/* ── act 1: import ─────────────────────────────────────────── */
.st-import { display: grid; grid-template-columns: 196px minmax(130px, 1fr) 250px; gap: 0; align-items: stretch; flex: 1; min-height: 0; }
.st-srcs { display: flex; flex-direction: column; justify-content: space-around; padding-right: 4px; }
.st-src { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); opacity: 0; }
.st[data-act="1"] .st-src { animation: stIn .4s var(--ease) calc(var(--i) * .11s) both; }
.st-src-i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; background: rgba(122,77,255,.1); color: var(--acc-violet); }
.st-src-n { font-size: 12px; color: var(--text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-src-c { font-family: var(--f-mono); font-size: 11px; color: var(--acc-emerald); }
.st-src-bar { grid-column: 2 / -1; height: 3px; border-radius: 2px; background: var(--fill-2); overflow: hidden; }
.st-src-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet-500), var(--cyan-400)); border-radius: inherit; }
.st[data-act="1"] .st-src-bar i { animation: stFill 1.1s var(--ease) calc(var(--i) * .11s + .2s) forwards; }
@keyframes stFill { to { width: 100%; } }

/* the hub: wires and packets are one SVG stretched over the column, so each
   wire starts level with its source card and all of them meet at the mark */
.st-hub { position: relative; min-width: 0; }
.st-hubwires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.st-hw { fill: none; stroke: var(--line-str); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-dasharray: 4 5; opacity: 0; }
.st[data-act="1"] .st-hw { animation: stHwIn .5s var(--ease) calc(var(--i, 5) * .11s + .15s) both, stHwFlow 1.2s linear infinite; }
.st-hw-out { stroke: rgba(122,77,255,.55); stroke-dasharray: 5 4; }
@keyframes stHwIn { to { opacity: 1; } }
@keyframes stHwFlow { to { stroke-dashoffset: -18; } }
.st-pk { fill: var(--violet-500); opacity: 0; filter: drop-shadow(0 0 4px rgba(122,77,255,.7)); }
.st[data-act="1"] .st-pk { animation: stPkIn .3s ease-out calc(var(--i, 0) * .11s + .7s) forwards; }
.st-pk-out { fill: var(--cyan-400); filter: drop-shadow(0 0 4px rgba(70,229,240,.8)); }
.st[data-act="1"] .st-pk-out { animation-delay: 1.4s; }
@keyframes stPkIn { to { opacity: 1; } }
.st-q { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; transform: translate(-50%, -50%); display: grid; place-items: center; opacity: 0; }
.st[data-act="1"] .st-q { animation: stQIn .6s var(--ease) .35s both; }
@keyframes stQIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.st-q-mark { width: 100%; height: 100%; position: relative; z-index: 2; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(135deg, #8B6BFF, #6A2FF5 55%, #3D0FA8); box-shadow: 0 18px 40px -14px rgba(82,24,204,.55), 0 0 0 6px #fff; }
.st-q-mark img { width: 56px; height: 56px; object-fit: contain; filter: brightness(0) invert(1); }
.st[data-act="1"] .st-q-mark { animation: stQBeat 1.9s ease-in-out .9s infinite; }
@keyframes stQBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.st-q-ring { position: absolute; inset: 0; border-radius: 34px; border: 1.5px solid rgba(122,77,255,.5); z-index: 1; }
.st[data-act="1"] .st-q-ring { animation: stRing 2.4s ease-out .9s infinite; }
.st-q-ring2 { border-color: rgba(70,229,240,.55); }
.st[data-act="1"] .st-q-ring2 { animation-delay: 2.1s; }
@keyframes stRing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.95); opacity: 0; } }
.st-q-l { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-lo); background: #fff; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); z-index: 2; }

.st-pool { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--ink-850); padding: 14px 16px; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.st-pool-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--text-lo); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.st-pool-h .st-count { font-family: var(--f-display); font-size: 19px; font-weight: 680; color: var(--text-hi); letter-spacing: -.03em; }
.st-pool-rows { display: grid; gap: 6px; padding-top: 10px; overflow: hidden; }
.st-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 7px 9px; border-radius: 9px; background: #fff; border: 1px solid var(--line); opacity: 0; }
.st[data-act="1"] .st-row { animation: stSlide .42s var(--ease) calc(var(--i) * .17s + .5s) both; }
.st-row img { border-radius: 50%; object-fit: cover; }
.st-row b { display: block; font-size: 12px; color: var(--text-hi); font-weight: 600; line-height: 1.25; }
.st-row em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-row > span:nth-child(2) { min-width: 0; }
.st-dupe { position: relative; }
.st[data-act="1"] .st-dupe { animation: stSlide .42s var(--ease) 1.35s both, stCull .8s var(--ease) 2.3s forwards; }
@keyframes stCull { to { opacity: .34; transform: translateX(14px) scale(.97); filter: grayscale(1); } }
@keyframes stSlide { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes stIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── act 2: scoring ────────────────────────────────────────── */
.st-icp { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative; }
.st-prompt { border: 1px dashed rgba(122,77,255,.35); background: rgba(122,77,255,.05); border-radius: var(--r-md); padding: 11px 14px; margin-bottom: 14px; }
.st-prompt-l { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc-violet); }
.st-prompt p { font-size: 13px; color: var(--text-hi); margin-top: 4px; line-height: 1.5; }

.st-scan { position: absolute; left: -24px; right: -24px; top: 96px; height: 44px; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(122,77,255,.14), transparent);
  border-top: 1px solid rgba(122,77,255,.4); border-bottom: 1px solid rgba(122,77,255,.4); opacity: 0; }
.st[data-act="2"] .st-scan { animation: stScan 2.6s cubic-bezier(.5,0,.5,1) .3s forwards; }
@keyframes stScan { 0% { transform: translateY(0); opacity: 1; } 92% { opacity: 1; } 100% { transform: translateY(268px); opacity: 0; } }

.st-slist { display: grid; gap: 7px; }
.st-srow { display: grid; grid-template-columns: 30px 1fr 1.15fr 42px 88px; gap: 12px; align-items: center;
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; opacity: 0; }
.st[data-act="2"] .st-srow { animation: stIn .34s var(--ease) calc(var(--i) * .1s) both; }
.st-srow img { border-radius: 50%; object-fit: cover; }
.st-swho b { display: block; font-size: 12.5px; color: var(--text-hi); font-weight: 600; line-height: 1.3; }
.st-swho em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-dim); }
.st-why { font-size: 11px; color: var(--text-lo); line-height: 1.4; }
.st-fate { font-family: var(--f-mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; text-align: right; }
.st-keep .st-fate { color: var(--acc-emerald); }
.st-drop .st-fate { color: var(--text-dim); }
.st[data-act="2"] .st-keep { animation: stIn .34s var(--ease) calc(var(--i) * .1s) both, stKeep .6s var(--ease) calc(1.6s + var(--i) * .18s) both; }
.st[data-act="2"] .st-drop { animation: stIn .34s var(--ease) calc(var(--i) * .1s) both, stDrop .7s var(--ease) calc(2.1s + var(--i) * .2s) both; }
@keyframes stKeep { 0% { border-color: var(--line); } 40% { border-color: rgba(12,130,86,.6); box-shadow: 0 0 0 3px rgba(12,130,86,.1); } 100% { border-color: rgba(12,130,86,.34); box-shadow: none; } }
@keyframes stDrop { to { opacity: .38; transform: translateX(18px) scale(.98); filter: grayscale(1); } }

.st-dial { position: relative; width: 38px; height: 38px; }
.st-dial svg { width: 38px; height: 38px; transform: rotate(-90deg); }
.st-dial circle { fill: none; stroke: var(--fill-2); stroke-width: 3.4; }
.st-dial .st-dial-v { stroke: var(--acc-violet); stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 97.4; }
.st[data-act="2"] .st-dial-v { animation: stDial 1s var(--ease) calc(.6s + var(--i, 0) * .12s) forwards; }
@keyframes stDial { to { stroke-dashoffset: calc(97.4 - (97.4 * var(--s) / 100)); } }
.st-drop .st-dial .st-dial-v { stroke: var(--text-dim); }
.st-dial b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 12px; font-weight: 680; color: var(--text-hi); }

/* ── act 3: the branching graph ────────────────────────────── */
.st-graph { position: relative; flex: 1; min-height: 0; }
.st-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.st-w { fill: none; stroke: var(--line-str); stroke-width: 1.6; stroke-dasharray: 400; stroke-dashoffset: 400; }
.st[data-act="3"] .st-w { animation: stDraw .5s ease-out calc(var(--d) * .22s + .3s) forwards; }
@keyframes stDraw { to { stroke-dashoffset: 0; } }
.st-w-y { stroke: rgba(12,130,86,.55); }
.st-w-n { stroke: rgba(122,77,255,.5); }
.st-token { fill: var(--violet-500); filter: drop-shadow(0 0 5px rgba(122,77,255,.9)); opacity: 0; }
.st[data-act="3"] .st-token { animation: stTokenIn .3s ease-out 2s forwards; }
@keyframes stTokenIn { to { opacity: 1; } }

.st-node { position: absolute; width: 176px; padding: 10px 13px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 6px 18px -10px rgba(23,18,58,.28);
  display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; gap: 1px 10px; opacity: 0; }
.st[data-act="3"] .st-node { animation: stPop .38s var(--ease) calc(var(--d) * .22s) both; }
@keyframes stPop { 0% { opacity: 0; transform: translateY(10px) scale(.94); } 60% { transform: scale(1.02); } 100% { opacity: 1; transform: none; } }
.st-node i { grid-row: 1 / 3; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 10.5px; background: rgba(122,77,255,.1); color: var(--acc-violet); align-self: center; }
.st-node b { font-size: 12px; color: var(--text-hi); font-weight: 620; line-height: 1.3; }
.st-node em { font-style: normal; font-size: 10px; color: var(--text-dim); }
.st-n1 { left: 50%; top: 4px;   transform: translateX(-50%); }
.st-n2 { left: 50%; top: 72px;  transform: translateX(-50%); }
.st-n3 { left: 50%; top: 140px; transform: translateX(-50%); }
.st-n4 { left: 4%;  top: 222px; }
.st-n5 { right: 4%; top: 222px; }
.st-n6 { left: 4%;  top: 282px; }
.st-n7 { right: 4%; top: 282px; }
.st[data-act="3"] .st-n1, .st[data-act="3"] .st-n2, .st[data-act="3"] .st-n3 { animation-name: stPopC; }
@keyframes stPopC { 0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.94); } 100% { opacity: 1; transform: translateX(-50%); } }

.st-branch { position: absolute; top: 192px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .07em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 5px; opacity: 0; }
.st[data-act="3"] .st-branch { animation: stIn .34s var(--ease) calc(var(--d) * .22s) both; }
.st-by { left: 15%; background: rgba(12,130,86,.11); color: var(--acc-emerald); }
.st-bn { right: 13%; background: rgba(122,77,255,.11); color: var(--acc-violet); }
.st-exit { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font-size: 11.5px; color: var(--text-lo);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-pill);
  border: 1px dashed var(--line-str); background: var(--ink-850); opacity: 0; white-space: nowrap; }
.st[data-act="3"] .st-exit { animation: stIn .4s var(--ease) calc(var(--d) * .2s) both; }
.st-exit i { color: var(--acc-emerald); }

/* ── act 4: writing ────────────────────────────────────────── */
.st-write { display: grid; grid-template-columns: 1fr 1.08fr; gap: 20px; flex: 1; min-height: 0; }
.st-profile { display: grid; gap: 9px; align-content: start; }
.st-pcard { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px; background: var(--ink-850); border: 1px solid var(--line); }
.st-pcard img { border-radius: 50%; object-fit: cover; }
.st-pcard b { display: block; font-size: 13px; color: var(--text-hi); }
.st-pcard em { display: block; font-style: normal; font-size: 11px; color: var(--text-lo); }
.st-field { padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line); background: #fff; transition: border-color .3s, background .3s, transform .3s var(--ease); }
.st-field-l { font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.st-field p { font-size: 11.5px; color: var(--text-mid); margin-top: 3px; line-height: 1.45; }
.st-field.lit { border-color: rgba(122,77,255,.55); background: rgba(122,77,255,.06); transform: translateX(4px); }
.st-field.lit .st-field-l { color: var(--acc-violet); }

.st-compose { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--ink-850); padding: 15px 17px; display: flex; flex-direction: column; }
.st-compose-l { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc-violet); display: inline-flex; align-items: center; gap: 7px; }
.st-typed { font-size: 13.5px; line-height: 1.7; color: var(--text-hi); margin-top: 12px; flex: 1; }
.st-caret { display: inline-block; width: 2px; height: 15px; background: var(--violet-500); vertical-align: -2px; animation: stCaret 1s step-end infinite; }
@keyframes stCaret { 50% { opacity: 0; } }
.st-variants { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.st-vchip { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; padding: 4px 9px; border-radius: 5px; border: 1px solid var(--line); color: var(--text-dim); }
.st-vchip.st-on { background: rgba(122,77,255,.1); color: var(--acc-violet); border-color: rgba(122,77,255,.28); }

/* ── act 5: booked ─────────────────────────────────────────── */
.st-week { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; flex: 1; min-height: 0; }
.st-cal { display: grid; grid-template-columns: 44px repeat(5, 1fr); grid-auto-rows: 1fr; gap: 5px; }
.st-cal-d { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); text-align: center; align-self: center; }
.st-cal-t { font-family: var(--f-mono); font-size: 9.5px; color: var(--text-dim); align-self: center; }
.st-cal-c { border-radius: 8px; border: 1px solid var(--line); background: var(--ink-850); min-height: 34px; }
.st-booked { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 10px; font-weight: 600;
  color: #fff; border: 0; opacity: 0;
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700)); box-shadow: 0 6px 14px -6px rgba(122,77,255,.8); }
.st-booked i { font-size: 8.5px; }
.st[data-act="5"] .st-booked.show { animation: stPop .42s var(--ease) both; }

.st-side { display: grid; gap: 9px; align-content: start; }
.st-sidecard { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: #fff; opacity: 0; }
.st[data-act="5"] .st-sidecard { animation: stIn .38s var(--ease) calc(var(--i) * .16s + .4s) both; }
.st-sidecard b { display: block; font-size: 11.5px; color: var(--text-hi); font-weight: 620; }
.st-sidecard em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-dim); }
.st-bigstat { margin-top: auto; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(150deg, rgba(122,77,255,.12), rgba(70,229,240,.06)); border: 1px solid var(--line); text-align: center; }
.st-bigstat .st-count { display: block; font-family: var(--f-display); font-size: 2.4rem; font-weight: 700; letter-spacing: -.045em; color: var(--text-hi); line-height: 1; }
.st-bigstat em { display: block; font-style: normal; font-size: 11px; color: var(--text-lo); margin-top: 6px; line-height: 1.4; }

/* ── responsive ────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .st { height: 520px; }
  .st-srow { grid-template-columns: 28px 1fr 42px 70px; }
  .st-why { display: none; }
}
@media (max-width: 900px) {
  .st { height: 500px; }
  .st-import { grid-template-columns: 1fr; }
  .st-srcs, .st-hub { display: none; }
  .st-write, .st-week { grid-template-columns: 1fr; }
  .st-side { display: none; }
  .st-node { width: 148px; }
}
@media (max-width: 620px) {
  .st { height: 470px; }
  .st-screen { padding: 16px 15px; }
  .st-profile { display: none; }
  .st-node { width: 128px; padding: 8px 10px; }
  .st-node b { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .st * { animation: none !important; }
  .st-node, .st-row, .st-srow, .st-src, .st-sidecard, .st-branch, .st-exit, .st-booked, .st-hw, .st-pk, .st-q { opacity: 1 !important; }
  .st-w { stroke-dashoffset: 0; }
}
