/* the looping signing scene (authshow.js), shared by the sign-in page and the website */
.show-stage { position: relative; align-self: center; width: min(440px, 100%); height: 392px; }
.sx-layer { position: absolute; inset: 0; transition: opacity .45s ease, transform .5s cubic-bezier(.4, 0, .2, 1); }
.sx-layer.leave { opacity: 0; transform: translateX(-28px); }
/* the email that starts it */
.sx-mail { position: absolute; left: 34px; right: 34px; top: 64px; padding: 18px 20px 20px; background: #fff; color: var(--ink); border-radius: 12px;
  box-shadow: 0 24px 60px -22px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06); opacity: 0; transform: translateY(-14px) scale(.985);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2, .75, .25, 1); }
.sx-mail.in { opacity: 1; transform: none; }
.sx-mail.out { opacity: 0; transform: translateY(-8px) scale(.965); transition-duration: .22s, .3s; transition-timing-function: ease-in; }
.m-top { display: flex; align-items: center; gap: 10px; }
.m-av { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: #ecece9; color: var(--ink-2); font-size: 10.5px; font-weight: 650; letter-spacing: .02em; }
.m-who b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.m-who small { display: block; font-size: 11px; color: var(--faint); }
.m-sub { margin-top: 14px; font-size: 14.5px; font-weight: 640; letter-spacing: -.015em; }
.sx-mail p { margin: 5px 0 16px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.m-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 8px; background: #2747ff; color: #fff; font-size: 12.5px; font-weight: 600; }
/* the document */
.sx-doc { position: absolute; inset: 0 0 auto 0; padding: 26px 28px 0; background: #fff; color: var(--ink); border-radius: 12px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); opacity: 0; transform: translateY(18px) scale(.98);
  transition: opacity .32s ease, transform .6s cubic-bezier(.2, .75, .25, 1); }
.sx-doc.in { opacity: 1; transform: none; transition-delay: .14s; }
.sd-head { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); font-weight: 560; }
.sd-ref { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.sd-title { margin: 16px 0 13px; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.sd-lines { display: grid; gap: 7px; margin-bottom: 18px; }
.sd-lines i { display: block; height: 6px; border-radius: 3px; background: var(--paper-2); }
.sd-sign { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 18px; align-items: end; }
.sd-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sd-col small, .sx-extras small { font-size: 10.5px; color: var(--faint); }
.sd-rule { display: block; height: 1px; background: var(--line-strong); }
.sd-date { font-size: 13px; color: var(--ink-2); padding-bottom: 3px; opacity: 0; transform: translateY(3px); transition: opacity .35s ease, transform .35s ease; }
.sd-date.in { opacity: 1; transform: none; }
/* fields waiting for the client: soft amber; the one being filled gets a ring */
.sx-f { position: relative; border-radius: 6px; background: #fff7e2; box-shadow: inset 0 0 0 1px #f0d68e; transition: background .35s ease, box-shadow .35s ease; }
.sx-f.now { box-shadow: inset 0 0 0 1.5px #dda22a, 0 0 0 4px rgba(221, 162, 42, .16); }
.sx-f.done { background: transparent; box-shadow: inset 0 0 0 1px transparent; }
.sx-ph { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: #a2740f; transition: opacity .2s; }
.sx-ph svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.sx-f.done .sx-ph { opacity: 0; }
.sx-sig { height: 52px; }
.sx-sigsvg { position: absolute; inset: 0 auto 0 0; width: 100%; height: 100%; overflow: visible; }
.sx-sigsvg text { fill: var(--ink-sig, #1d3557); opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 260% 100%; mask-size: 260% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 100% 0; mask-position: 100% 0; }
.sx-sig.write .sx-sigsvg text { opacity: 1; animation: sx-write 1.15s cubic-bezier(.45, .05, .3, 1) forwards; }
@keyframes sx-write { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
.sx-extras { display: grid; gap: 14px; align-items: end; min-height: 52px; }
.sx-extras.n2 { grid-template-columns: 1.3fr 1fr; gap: 24px; }
.sx-check { display: inline-flex; align-items: center; gap: 9px; justify-self: start; padding: 7px 12px 7px 8px; font-size: 12.5px; color: var(--ink-2); }
.sx-box { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1.5px #c99a2e; transition: background .2s, box-shadow .2s; }
.sx-box svg, .sx-paid svg, .sx-doneline svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sx-box path { stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .3s ease .08s; }
.sx-check.done .sx-box { background: #2747ff; box-shadow: none; }
.sx-check.done .sx-box path { stroke-dashoffset: 0; }
.sx-initrow { display: flex; align-items: center; gap: 12px; }
.sx-init { width: 74px; height: 40px; flex: none; }
.sx-init.short { width: 100%; height: 34px; }
.sx-ink { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--fnt, "Great Vibes"); font-weight: var(--fw, 400); font-size: 24px; color: var(--ink-sig, #1d3557); opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 260% 100%; mask-size: 260% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 100% 0; mask-position: 100% 0; }
.sx-init.write .sx-ink { opacity: 1; animation: sx-write .6s cubic-bezier(.45, .05, .3, 1) forwards; }
.sx-textcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sx-text { height: 34px; display: flex; align-items: center; padding: 0 10px; font-size: 13px; color: var(--ink); white-space: nowrap; }
.sx-text.done { box-shadow: inset 0 -1px 0 var(--line-strong); border-radius: 0; }
.sx-text.typing .sx-typed::after { content: ""; display: inline-block; width: 1.5px; height: 15px; margin-left: 1px; vertical-align: -3px; background: var(--ink); animation: sx-caret .8s steps(1) infinite; }
@keyframes sx-caret { 50% { opacity: 0; } }
.sx-pay { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px 0 10px; font-size: 13px; font-weight: 600; }
.sx-paybtn { position: relative; height: 24px; padding: 0 11px; display: inline-grid; place-items: center; border-radius: 6px; background: #2747ff; color: #fff; font-size: 11.5px; font-weight: 600; transition: opacity .2s; }
.sx-pay.busy .sx-paybtn { color: transparent; }
.sx-pay.busy .sx-paybtn::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: sx-spin .6s linear infinite; }
@keyframes sx-spin { to { transform: rotate(360deg); } }
.sx-paid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 2px; font-size: 12.5px; font-weight: 600; color: #15803d; opacity: 0; transform: translateY(3px); transition: opacity .3s, transform .3s; }
.sx-paid svg { width: 14px; height: 14px; padding: 2px; border-radius: 50%; background: #16a34a; }
.sx-paid i { font-style: normal; font-weight: 500; color: var(--faint); font-size: 11.5px; }
.sx-pay.done { box-shadow: inset 0 -1px 0 var(--line-strong); border-radius: 0; }
.sx-pay.done .sx-amt, .sx-pay.done .sx-paybtn { opacity: 0; }
.sx-pay.done .sx-paid { opacity: 1; transform: none; }
.sx-amt { transition: opacity .2s; }
/* footer: progress and Finish */
.sx-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px -28px 0; padding: 13px 18px 13px 28px; border-top: 1px solid var(--line); }
.sx-prog { position: relative; display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); font-weight: 520; min-height: 18px; }
.sx-bar { width: 64px; height: 4px; border-radius: 2px; background: var(--paper-2); overflow: hidden; }
.sx-bar i { display: block; height: 100%; width: 100%; background: #2747ff; border-radius: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .45s cubic-bezier(.2, .75, .25, 1); }
.sx-count, .sx-bar { transition: opacity .25s; }
.sx-doneline { position: absolute; left: 0; display: inline-flex; align-items: center; gap: 7px; color: #15803d; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .3s ease .1s, transform .3s ease .1s; }
.sx-doneline svg { width: 14px; height: 14px; padding: 2px; border-radius: 50%; background: #16a34a; }
.sx-doc.signed .sx-count, .sx-doc.signed .sx-bar { opacity: 0; }
.sx-doc.signed .sx-doneline { opacity: 1; transform: none; }
.sx-finish { height: 30px; padding: 0 16px; display: inline-grid; place-items: center; border-radius: 8px; background: #ecece9; color: #a3a39e; font-size: 12.5px; font-weight: 600; transition: background .3s, color .3s, opacity .3s; }
.sx-doc.ready .sx-finish { background: #2747ff; color: #fff; }
.sx-doc.signed .sx-finish { opacity: 0; }
/* the firm is told */
.sx-toast { position: absolute; right: -30px; bottom: -18px; display: flex; align-items: center; gap: 10px; padding: 11px 15px 11px 13px; border-radius: 11px; background: #1f1f1d; color: #ecece9;
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); opacity: 0; transform: translateY(12px); transition: opacity .4s ease, transform .5s cubic-bezier(.2, .75, .25, 1); }
.sx-toast.in { opacity: 1; transform: none; }
.sx-toast .t-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .15); }
.sx-toast b { display: block; font-size: 13px; font-weight: 600; }
.sx-toast small { display: block; font-size: 11.5px; color: #9a9a95; margin-top: 1px; }
/* the client's pointer: x and y on separate layers with different easing, so it moves in a gentle arc */
.sx-cx, .sx-cy { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.sx-cx { z-index: 5; opacity: 0; transition-property: transform, opacity; transition-timing-function: cubic-bezier(.45, .05, .35, 1), ease; }
.sx-cy { transition-property: transform; transition-timing-function: cubic-bezier(.3, .1, .2, 1); }
.show-stage.cur-on .sx-cx { opacity: 1; }
.sx-arrow { display: block; width: 18px; max-width: none; height: 22px; margin: -1px 0 0 -2px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28)); transform-origin: 3px 2px; transition: transform .12s ease; }
.show-stage.press .sx-arrow { transform: scale(.86); }
.sx-ripple { position: absolute; z-index: 4; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(18, 18, 17, .14); pointer-events: none; animation: sx-ripple .6s ease-out forwards; }
@keyframes sx-ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.sx-layer.still .sx-doc, .sx-layer.still .sx-toast { opacity: 1; transform: none; transition: none; }
.sx-layer.still .sx-mail { display: none; }
.sx-layer.still .sx-sigsvg text, .sx-layer.still .sx-ink { opacity: 1; -webkit-mask: none; mask: none; }
.sx-layer.still .sd-date { opacity: 1; transform: none; }
