/* ================= the agent mark ================= */
.ag{overflow:visible}
.ag use,.ag .ic,.ag .bdg,.ag .band{transform-box:view-box}
.ag .ic{transform-origin:50px 50px}
.ag.fam-w use{transform-origin:var(--ox) var(--oy)}
.ag .bdg{transform-origin:86px 86px}
.ag .sheen{opacity:0}
.ag .bdg{display:none}
.ag.sz-l.st-done .bdg-done,.ag.sz-l.st-wait .bdg-wait{display:inline}

/* static poses: the default, and what reduced motion shows. Each state is distinguishable without movement. */
.ag.fam-p.st-think .L1{opacity:.42}.ag.fam-p.st-think .L2{opacity:.16}
.ag.fam-p.st-speak .L1{opacity:.5}
.ag.fam-p.st-wait .L2{transform:translate(6px,5px)}
.ag.fam-w.st-speak .sheen{opacity:.62}.ag.fam-w.st-speak .band{transform:translateX(72px)}
.ag.fam-w.st-wait .L0{transform:translate(-3px,-6px)}.ag.fam-w.st-wait .L1{transform:translate(3px,6px)}

/* motion: only when the page allows it (no reduced motion, or "Play the motion" pressed) */
.anim-ok .ag:not(.static).fam-p.st-think use{animation:p-lay 2.2s cubic-bezier(.45,0,.2,1) infinite;animation-delay:calc(var(--i) * .26s)}
@keyframes p-lay{0%{opacity:.16;transform:translate(7px,-6px)}26%{opacity:1;transform:translate(0,0)}70%{opacity:1;transform:translate(0,0)}100%{opacity:.16;transform:translate(-2px,2px)}}
.anim-ok .ag:not(.static).fam-p.st-speak use{animation:p-speak 1.3s ease-in-out infinite;animation-delay:calc(var(--i) * .17s)}
@keyframes p-speak{0%,100%{opacity:1}45%{opacity:.48}}
.anim-ok .ag:not(.static).fam-p.st-done use{animation:p-close 3.2s cubic-bezier(.2,.8,.3,1) infinite}
@keyframes p-close{0%{transform:translate(calc(var(--i) * 4px - 4px),calc(var(--i) * -4px + 4px));opacity:.7}16%,100%{transform:translate(0,0);opacity:1}}
.anim-ok .ag:not(.static).fam-p.st-wait .L2{animation:p-wait 2.4s ease-in-out infinite}
@keyframes p-wait{0%,100%{transform:translate(5px,4px)}50%{transform:translate(8px,7px)}}

/* thinking: the ribbons draw on from their tails and meet at the tip (as the homepage hero does), hold, then trace out
   into the tip, and again. The still pose is the mark part-drawn. */
.ag .tr{stroke-dasharray:100 100;stroke-dashoffset:0}
.ag.fam-w.st-think .tr{stroke-dashoffset:32}
.anim-ok .ag:not(.static).fam-w.st-think .tr{animation:w-trace 3.2s cubic-bezier(.45,0,.3,1) infinite}
@keyframes w-trace{0%{stroke-dashoffset:100}42%{stroke-dashoffset:0}56%{stroke-dashoffset:0}94%,100%{stroke-dashoffset:-100}}
.anim-ok .ag:not(.static).fam-w.st-speak .band{animation:w-sheen 1.5s linear infinite}
@keyframes w-sheen{0%{transform:translateX(-6px)}100%{transform:translateX(150px)}}
.anim-ok .ag:not(.static).fam-w.st-done .L0{animation:w-close-a 3.2s cubic-bezier(.2,.8,.3,1) infinite}
.anim-ok .ag:not(.static).fam-w.st-done .L1{animation:w-close-b 3.2s cubic-bezier(.2,.8,.3,1) infinite}
@keyframes w-close-a{0%{transform:translate(-3px,-6px)}15%{transform:translate(.6px,1.2px)}24%,100%{transform:translate(0,0)}}
@keyframes w-close-b{0%{transform:translate(3px,6px)}15%{transform:translate(-.6px,-1.2px)}24%,100%{transform:translate(0,0)}}
.anim-ok .ag:not(.static).fam-w.st-wait .L0{animation:w-wait-a 2.4s ease-in-out infinite}
.anim-ok .ag:not(.static).fam-w.st-wait .L1{animation:w-wait-b 2.4s ease-in-out infinite}
@keyframes w-wait-a{0%,100%{transform:translate(-3px,-6px)}50%{transform:translate(-4px,-8px)}}
@keyframes w-wait-b{0%,100%{transform:translate(3px,6px)}50%{transform:translate(4px,8px)}}
.anim-ok .ag:not(.static).st-done .bdg-done{animation:b-pop 3.2s cubic-bezier(.3,1.5,.5,1) infinite}
@keyframes b-pop{0%,8%{opacity:0;transform:scale(.3)}20%,100%{opacity:1;transform:scale(1)}}
.anim-ok .ag:not(.static).st-wait .bdg-wait{animation:b-wait 2.4s ease-in-out infinite}
@keyframes b-wait{0%,100%{opacity:1}50%{opacity:.45}}


/* round five: the thinking still pose is the part-drawn mark (above) */
