/* The three scenes under the hero, in the demonstration's visual language (demo.css): the same surface, chat,
   paper, fields, sheet and buttons, larger. scenes.js toggles .is-on / .is-pressed / .is-enabled / .is-moved. */
.scene{padding-top:128px}
.scene-head{max-width:640px;margin:0 auto;text-align:center}.scene-head h2{margin:0;font:500 42px/1.1 var(--serif);letter-spacing:-.2px;text-wrap:balance}.scene-head p{margin:14px auto 0;max-width:520px;color:var(--muted);text-wrap:pretty}
.sc-stage{position:relative;margin-top:40px;padding:24px 24px 64px;border:1px solid var(--hair);border-radius:14px;background:var(--surface);color:var(--fg);display:grid;gap:24px;overflow:hidden}
/* Shown between data-at and data-until. Without the script every scene shows its finished frame. */
.sc-stage [data-at],.sc-stage [data-until]{transition:opacity 260ms var(--ease),visibility 0s,transform 360ms var(--ease)}
.scene.js [data-at]:not(.is-on),.scene [data-until]:not(.is-on){opacity:0;visibility:hidden;transition:opacity 220ms var(--ease),visibility 0s linear 220ms,transform 360ms var(--ease)}
.scene.is-still *{transition:none!important;animation:none!important}
.sc-btn{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 14px;border:1px solid var(--rule);border-radius:8px;background:var(--bg);color:var(--fg);font:500 13px/1 var(--sans);white-space:nowrap;transition:transform 120ms ease-out,box-shadow 120ms ease-out,opacity 200ms ease-out}
.sc-primary{border-color:var(--btn-bg);background:var(--btn-bg);color:var(--btn-fg)}
.sc-btn.is-pressed,.sc-row.is-pressed,.sc-flag.is-pressed{transform:scale(.95);box-shadow:0 0 0 6px color-mix(in srgb,var(--fg) 14%,transparent)}
[data-enable]:not(.is-enabled){opacity:.35}
.scene.js .sc-mark[data-at]:not(.is-on){opacity:1;visibility:visible}
.sc-lines i{display:block;width:92%;height:6px;margin-top:11px;border-radius:6px;background:var(--g200)}.sc-lines i:nth-child(2){width:72%}.sc-lines i:nth-child(4){width:84%}.sc-lines i:nth-child(6){width:60%}.sc-lines i:last-child{width:40%}
.sc-ink path,.sc-aa path{fill:var(--ink)}.sc-placeholder path{fill:var(--g300)}
.sc-paper{position:relative;background:var(--paper);color:var(--ink);border-radius:4px;box-shadow:0 14px 36px rgb(18 26 34/.10)}
.sc-paper>strong{display:block;font:500 22px/1.2 var(--serif)}
/* The pointer (a mouse arrow, or a fingertip on the phone). */
.sc-cursor{position:absolute;z-index:6;left:0;top:0;width:22px;height:26px;pointer-events:none;opacity:0;transform:translate(var(--cx,0),var(--cy,0));transition:opacity 200ms ease-out}
.sc-cursor.is-on{opacity:1}
.sc-cursor::before{content:"";position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 26'%3E%3Cpath d='M2 2v19l5-4.6 3.4 7.6 3.4-1.5-3.3-7.4H17Z' fill='%23121a22' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat;transform-origin:2px 2px;transition:transform 100ms ease-out}
.sc-cursor.is-down::before{transform:scale(.88)}
.sc-cursor::after{content:"";position:absolute;left:-10px;top:-10px;width:24px;height:24px;border-radius:50%;border:2px solid var(--fg);opacity:0;transform:scale(.4)}
.sc-cursor.is-down::after{animation:sc-ring 420ms ease-out both}
.sc-touch{width:30px;height:30px;margin:-15px 0 0 -15px}.sc-touch::before{border-radius:50%;background:color-mix(in srgb,var(--ink) 30%,transparent);box-shadow:0 0 0 2px rgb(255 255 255/.85)}.sc-touch.is-down::before{transform:scale(.8)}.sc-touch::after{left:-6px;top:-6px;width:42px;height:42px;border-color:var(--ink)}
@keyframes sc-ring{0%{opacity:.6;transform:scale(.4)}100%{opacity:0;transform:scale(1.4)}}
.sc-replay{position:absolute;right:16px;bottom:14px;width:36px;height:36px;border:1px solid var(--rule);border-radius:8px;background:var(--bg);color:var(--fg);display:grid;place-items:center;cursor:pointer;opacity:.7;transition:opacity 150ms ease-out,transform 100ms ease-out}
.sc-replay:hover,.scene.is-done .sc-replay{opacity:1}.sc-replay:active{transform:scale(.95)}.sc-replay svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

/* 1. Ask, and check it in the chat */
.sc-ask{grid-template-columns:minmax(0,1fr) 540px}
.sc-chat{height:560px;padding:20px;border:1px solid var(--hair);border-radius:12px;background:var(--bg);display:flex;flex-direction:column}
.sc-thread{flex:1;display:flex;flex-direction:column;gap:14px}
.sc-msg{margin:0;font-size:15px;line-height:22px}.scene.js .sc-msg:not(.is-on){display:none}.sc-msg.is-on{animation:fd-in 240ms var(--ease) both}
.sc-user{align-self:flex-end;max-width:80%;padding:10px 14px;border-radius:16px 16px 4px 16px;background:var(--wash)}
.sc-agent{align-self:stretch}
.sc-tool{padding:10px 12px;border:1px solid var(--hair);border-radius:10px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;line-height:18px}.sc-tool span{font-weight:500}.sc-tool small{color:var(--muted);font-size:12px}
.sc-composer{height:48px;border:1px solid var(--rule);border-radius:12px;display:flex;align-items:center;justify-content:flex-end;padding:0 8px}.sc-composer span{flex:1;margin:0 8px;height:7px;max-width:140px;border-radius:7px;background:var(--hair);overflow:hidden;white-space:nowrap;font-size:15px;line-height:22px}.sc-composer span.has-text{height:22px;max-width:none;background:none}.sc-composer span.has-text~i{opacity:1}.sc-composer i{width:32px;height:32px;border-radius:8px;background:var(--fg);opacity:.3}
.sc-panel{height:560px;padding:16px;border:1px solid var(--hair);border-radius:12px;background:var(--bg);display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:12px;transform-origin:left center}
.scene.js .sc-panel:not(.is-on){transform:translateX(-10px)}
.sc-panel-head{display:flex;flex-direction:column;gap:2px}.sc-panel-head strong{font-size:16px;font-weight:600}.sc-panel-head span{font-size:13px;color:var(--muted)}
.sc-doc{min-height:0;padding:16px;border:1px solid var(--hair);border-radius:8px;background:var(--wash);overflow:hidden}
.sc-page{position:relative;height:100%;padding:24px 26px;background:var(--paper);border-radius:3px;box-shadow:0 10px 28px rgb(18 26 34/.08)}
.sc-page-top{height:9px;width:46%;border-radius:9px;background:var(--g300);margin-bottom:22px}
.sc-field{position:absolute;bottom:58px;height:46px;border:1.5px dashed #4b83d1;border-radius:6px;background:rgb(75 131 209/.08);display:flex;align-items:flex-end;padding:0 8px 5px;transform:none}
.sc-field span{font-size:11px;font-weight:500;color:#2f5f9e}
.sc-f-sig{left:26px;width:46%}.sc-f-date{right:26px;width:28%}
.scene.js .sc-field:not(.is-on){transform:scale(.9)}
.sc-f-sig.is-moved{transform:translate(22px,-18px);transition:transform 640ms var(--ease),opacity 260ms var(--ease)}
.sc-actions{grid-row:3;grid-column:1;min-height:52px;padding-top:12px;border-top:1px solid var(--hair);display:flex;align-items:center;justify-content:flex-end;gap:8px}
.sc-actions p{margin:0;font-size:13px;line-height:18px;overflow-wrap:anywhere}.sc-actions>div{display:flex;gap:8px;flex:none}
.sc-confirm{justify-content:space-between}.sc-sent{justify-content:flex-start}.sc-sent p{color:var(--muted)}.sc-sent b{color:var(--fg);font-weight:600}

/* 2. From the inbox to a tap */
.sc-inbox{grid-template-columns:minmax(0,1fr) 340px;align-items:center}
.sc-mailbox{align-self:stretch;padding:8px 0;border:1px solid var(--hair);border-radius:12px;background:var(--bg);overflow:hidden}
.sc-row{display:grid;grid-template-columns:150px minmax(0,1fr) auto;align-items:center;gap:16px;height:64px;padding:0 20px;border-bottom:1px solid var(--hair);font-size:14px;transition:transform 120ms ease-out,box-shadow 120ms ease-out,background 200ms ease-out}
.sc-row b{font-weight:600}.sc-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-row time{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.sc-new{position:relative;background:color-mix(in srgb,var(--fg) 3%,transparent)}.sc-new::before{content:"";position:absolute;left:8px;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:#4b83d1}
.sc-new.was-pressed{background:color-mix(in srgb,var(--fg) 6%,transparent)}.sc-new.was-pressed::before{opacity:0}
.scene.js .sc-new:not(.is-on){transform:translateY(-18px)}
.sc-old i{display:block;height:7px;border-radius:7px;background:var(--hair)}.sc-old i:first-child{width:96px}.sc-old i:last-child{width:62%;grid-column:span 2}
.sc-phone{width:340px;height:580px;padding:10px;border-radius:34px;background:#1b232b;box-shadow:0 24px 60px rgb(18 26 34/.18)}
.sc-screen{position:relative;height:100%;border-radius:25px;overflow:hidden;background:var(--g100);color:var(--ink)}
.sc-screen::after{content:"";position:absolute;inset:0;z-index:2;background:rgb(18 26 34/.22);opacity:0;pointer-events:none;transition:opacity 280ms var(--ease)}.sc-screen:has(.sc-sheet.is-on)::after{opacity:1}
.sc-scr{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--paper)}
.sc-mail{justify-content:center;padding:22px}.sc-mail-card{padding:32px 18px;border-radius:12px;background:var(--g50);text-align:center}.sc-mail-card h3{margin:0;font:500 21px/1.2 var(--serif)}.sc-mail-card p{margin:10px 0 0;font-size:14px}.sc-mail-card small{display:block;margin-top:4px;font-size:12px;color:var(--g600)}.sc-review{height:42px;margin-top:20px}
.sc-sign{background:var(--g100)}.sc-sign .sc-paper{flex:1;margin:16px 14px 0;padding:22px 20px}
.sc-sigline,.sc-dateline{position:absolute;left:20px;height:52px;border-bottom:1px solid var(--ink)}
.sc-sigline{right:20px;bottom:110px}.sc-dateline{width:52%;bottom:44px}
.sc-sigline small,.sc-dateline small{position:absolute;left:0;top:calc(100% + 5px);font-size:10px;color:var(--g600)}
.sc-dateline span{position:absolute;left:0;bottom:7px;font-size:13px;font-variant-numeric:tabular-nums}
.sc-flag{position:absolute;inset:6px 0 5px;display:flex;align-items:center;justify-content:center;border:1px dashed var(--g500);border-radius:5px;background:var(--g100);font-size:13px;font-weight:500;transition:transform 120ms ease-out,box-shadow 120ms ease-out,opacity 220ms var(--ease)}
.sc-mark{position:absolute;left:-4px;right:0;bottom:1px;height:62px;clip-path:inset(-20% -10% -20% -10%)}.sc-mark svg{display:block;width:100%;height:100%}
.scene.js .sc-mark[data-at]:not(.is-on){opacity:1;visibility:visible;clip-path:inset(-20% 102% -20% -10%)}
.sc-mark[data-at]{transition:clip-path 900ms cubic-bezier(.45,.05,.3,1)}
.sc-bar{flex:none;height:62px;margin-top:14px;padding:0 16px;display:flex;align-items:center;gap:14px;background:var(--paper);border-top:1px solid var(--g200)}
.sc-track{flex:1;height:4px;border-radius:2px;background:var(--g200);overflow:hidden}.sc-track i{display:block;width:100%;height:100%;background:var(--ink)}
.scene.js .sc-track:not(.is-on){opacity:1;visibility:visible}.scene.js .sc-track i{width:0;transition:width 600ms var(--ease)}.scene.js .sc-track.is-on i{width:100%}
.sc-screen .sc-btn{border-color:var(--ink);background:var(--ink);color:var(--paper)}
.sc-sheet{position:absolute;z-index:3;left:0;right:0;bottom:0;padding:14px 16px 18px;border-radius:18px 18px 0 0;background:var(--paper);box-shadow:0 -12px 30px rgb(18 26 34/.14)}
.scene.js .sc-sheet:not(.is-on){opacity:1;transform:translateY(104%);transition:transform 360ms var(--ease),visibility 0s linear 360ms}
.sc-sheet.is-on{transition:transform 360ms var(--ease)}
.sc-seg{display:grid;grid-template-columns:1fr 1fr;padding:3px;border-radius:9px;background:var(--g100)}.sc-seg span{height:30px;border-radius:7px;display:grid;place-items:center;font-size:13px;font-weight:500;color:var(--g600)}.sc-seg .on{background:var(--paper);color:var(--ink);box-shadow:0 1px 2px rgb(18 26 34/.12)}
.sc-label{margin:14px 0 0;font-size:12px;color:var(--g600)}
.sc-typed{height:70px;margin-top:6px;padding:4px 8px;border:1px solid var(--g300);border-radius:8px}.sc-typed svg{display:block;width:100%;height:100%}
.sc-styles{display:flex;gap:8px;margin-top:10px}.sc-styles span{width:56px;height:42px;border:1px solid var(--g200);border-radius:8px;display:grid;place-items:center;transition:transform 120ms ease-out}.sc-styles span.is-selected{border-color:var(--ink);box-shadow:inset 0 0 0 .5px var(--ink)}.sc-styles span.is-pressed{transform:scale(.92)}.sc-aa{width:46px;height:32px}
.sc-save{display:flex;width:100%;height:44px;margin-top:14px;border-radius:10px}
.sc-done{align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center}.sc-done svg{width:44px;height:44px;fill:none;stroke:var(--ink);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:24;stroke-dashoffset:0}.sc-done.is-on svg{animation:sc-check 420ms cubic-bezier(.3,.7,.2,1) 120ms both}.sc-done strong{font:500 22px/1.25 var(--serif);max-width:220px}
@keyframes sc-check{from{stroke-dashoffset:24}to{stroke-dashoffset:0}}

/* 3. Signed, and anyone can check it */
.sc-record{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}
.sc-signed{min-height:520px;padding:22px;border:1px solid var(--hair);border-radius:12px;background:var(--wash);display:flex}
.sc-signed .sc-paper{flex:1;padding:30px 30px 0}
.sc-signed .sc-sigline{right:auto;width:60%;left:30px;bottom:140px}.sc-signed .sc-dateline{left:30px;width:36%;bottom:72px}
.sc-ref{position:absolute;left:30px;right:30px;bottom:18px;margin:0;padding:4px 6px;margin-left:-6px;border-radius:5px;font-size:11px;color:var(--g600);transition:background 300ms ease-out,color 300ms ease-out}
.sc-ref.was-pressed{background:rgb(75 131 209/.12);color:var(--ink)}
.sc-check{display:flex;flex-direction:column;justify-content:center;gap:4px}
.sc-card{box-shadow:0 20px 50px color-mix(in srgb,var(--ink) 8%,transparent)}
.sc-card h3{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.scene.js .sc-card:not(.is-on){transform:translateY(14px)}
.sc-verified{display:inline-flex;align-items:center;gap:5px;font:500 13px/1 var(--sans);color:#1f7a4d}.sc-verified svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:24}.sc-verified.is-on svg,.scene:not(.js) .sc-verified svg{animation:sc-check 420ms cubic-bezier(.3,.7,.2,1) both}
.sc-record .verify-form{margin-top:24px;max-width:none}
.scene.js .record-details>div:not(.is-on){transform:translateY(6px)}

@media (prefers-color-scheme:dark){.sc-phone{background:#2a3138;box-shadow:0 0 0 1px #3a434b}.sc-cursor:not(.sc-touch)::before{filter:invert(1)}.sc-verified{color:#5cc28c}.sc-field span{color:#2f5f9e}}
@media (max-width:1023px){.scene{padding-top:96px}.sc-ask{grid-template-columns:minmax(0,1fr) 420px}.sc-inbox{grid-template-columns:minmax(0,1fr) 320px}.sc-phone{width:320px}}
@media (max-width:760px){
  .scene-head h2{font-size:32px}.sc-stage{margin-top:28px;padding:14px 14px 60px;gap:14px}
  .sc-ask,.sc-inbox,.sc-record{grid-template-columns:minmax(0,1fr)}
  .sc-chat{height:270px;padding:14px}.sc-thread{min-height:0;overflow:hidden}.sc-msg{font-size:14px;line-height:21px}
  .sc-panel{height:500px;padding:12px}.sc-confirm{flex-direction:column;align-items:stretch}.sc-confirm>div{justify-content:flex-end}
  .sc-row{grid-template-columns:minmax(0,1fr) auto;height:auto;padding:12px 16px 12px 22px;row-gap:2px}.sc-row span{grid-column:1/-1;grid-row:2}.sc-old{display:none}
  .sc-phone{width:100%;max-width:340px;height:560px;justify-self:center}
  .sc-signed{min-height:440px;padding:14px}.sc-signed .sc-paper{padding:22px 20px 0}.sc-signed .sc-sigline{left:20px;width:70%}.sc-signed .sc-dateline{left:20px;width:46%}.sc-ref{left:20px;right:20px}
  .sc-replay{width:44px;height:44px;right:10px;bottom:8px}
  .sc-page{padding:18px}.sc-field{bottom:36px}.sc-f-sig{left:18px;width:44%}.sc-f-date{right:18px;width:28%}.sc-f-sig.is-moved{transform:translate(6px,-16px)}
}
@media (prefers-reduced-motion:reduce){.sc-stage *{transition:none!important;animation:none!important}}
.nowrap{white-space:nowrap}
