/* Agents: a Mac with one at work, playing by itself, and how much faster it is with Winky. */
#agent{--agent:#a98bff;--zap:#ffd60a;min-height:100vh;padding:130px 5vw 7vh;display:grid;grid-template-columns:calc(5.275*clamp(46px,6.4vw,108px)) minmax(0,1fr);column-gap:5vw;align-content:center;align-items:end;isolation:isolate}      /* #roll's own grid and sizes, with the chart where its timeline is */
/* drawn by js/agent.js, by a slightly shaky hand */
.doodle{fill:none;stroke:var(--agent);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;overflow:visible;pointer-events:none}
.doodle path{stroke-dasharray:1.02;stroke-dashoffset:1.02}.drawn .doodle path{stroke-dashoffset:0;transition:stroke-dashoffset .6s var(--out) calc(var(--i)*55ms + 120ms)}
.back{position:absolute;inset:0;width:100%;height:100%;z-index:-1;stroke:#27272b;stroke-width:2.6}
#agent h2{font-size:clamp(46px,6.4vw,108px);line-height:1.12;word-spacing:0;text-wrap:initial;white-space:nowrap}
#agent .sub{margin:.8em 0 0;max-width:31ch;font-size:clamp(18px,1.65vw,25px);line-height:1.35}
.droid{position:relative;display:inline-block;margin:0 .2em 0 .24em;color:var(--agent)}.droid svg{position:absolute;left:-.2em;top:-.53em;width:2.92em;height:1.9em}
/* a point you can't miss */
.times{white-space:nowrap}.times i{display:inline-block;width:.2em;height:.2em;margin:0 .075em 0 .085em;border-radius:9em;background:currentColor;font-size:1em;text-indent:-99em;overflow:hidden;vertical-align:baseline}
/* faster: it leans, and the s is a bolt */
.fast{display:inline-block;margin-right:.07em;transform-origin:0 80%;transition:transform .35s cubic-bezier(.3,2.2,.5,1)}.zap .fast{transform:skewX(-11deg)}.fast span{position:relative;margin:0 .09em 0 .08em;color:#0000}.fast svg{position:absolute;left:50%;top:50%;height:.98em;width:.686em;margin:-.43em 0 0 -.35em;overflow:visible;fill:var(--zap);stroke:var(--zap);stroke-width:7;stroke-linejoin:round}.fast canvas{position:absolute;left:50%;top:50%;width:2.4em;height:2.4em;margin:-1.13em 0 0 -1.2em;pointer-events:none}.zap .fast svg{filter:drop-shadow(0 0 .07em rgb(76 195 255/.4))}
.zap .fast path{transform-origin:50% 50%;animation:strike .5s var(--out)}@keyframes strike{0%{fill:#fff;stroke:#fff;transform:translateY(-34px) scale(1.5)}30%{fill:#fff;stroke:#fff;transform:scale(1.22)}45%{opacity:.25}60%{opacity:1}}

/* the Mac's screen */
.book{position:relative;width:100%;max-width:min(1000px,calc((100vh - 390px)*1.6));justify-self:end}
.lid{position:relative;aspect-ratio:1.6;border-radius:16px;overflow:hidden;background:#000}
.os{position:absolute;left:0;top:0;transform-origin:0 0;width:720px;height:450px;overflow:hidden;font:600 13px/1 -apple-system,BlinkMacSystemFont,system-ui,sans-serif;font-variation-settings:normal;background:linear-gradient(#4a4a4d,#252527 34%,#0000 70%),#000 url(assets/dunes.webp) center/cover;background-blend-mode:screen}
.menus{position:absolute;inset:0 0 auto;height:30px;padding:0 14px;display:flex;align-items:center;font-weight:500}.menus svg{width:13px;height:13px;fill:currentColor;margin:-2px 12px 0 0}.menus b{width:56px;margin-right:27px}.menus span{margin-left:14px}.menus .wifi{width:16px;margin:0 10px 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.dock{position:absolute;left:50%;bottom:7px;transform:translateX(-50%);display:flex;align-items:center;gap:7px;padding:6px 7px 8px;border-radius:17px;background:rgb(90 90 96/.55);box-shadow:inset 0 0 0 1px rgb(255 255 255/.22)}
.dock span{position:relative;width:38px;height:38px;border-radius:9.5px;background:linear-gradient(#fff,#d1d1d6)}.dock :is(svg,img){display:block;width:100%;height:100%;border-radius:inherit}.dock svg{fill:none;stroke:#1c1c1e;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.dock .solid{fill:#1c1c1e}.dock .half{fill:#a1a1a6;stroke:none}.dock .petals svg{stroke:none;fill:rgb(0 0 0/.42)}.dock :is(.term,.talks){background:linear-gradient(#48484a,#151517)}.dock :is(.term,.talks) svg{stroke:#fff}.dock .talks .solid{fill:#fff}.dock .bin{background:none}.dock .bin svg{stroke:#d1d1d6}
.dock .on:after{content:"";position:absolute;left:50%;top:calc(100% + 2px);width:3.5px;height:3.5px;margin-left:-1.75px;border-radius:9px;background:#fff}.dock i{width:1px;height:32px;background:rgb(255 255 255/.28)}


/* The chart. Two agents editing the same picture: the bar is how much of the work is done, and the picture at the end (.pic) has the
   edits made so far. As wide as the timeline in #roll. --s is the percentage done; js/agent.js counts it up. --lead is how far Winky runs ahead of its bar */
.chart{position:relative;--h:clamp(52px,7.1vh,64px);--row:var(--h);--pic:calc(var(--row)*1.5);--lead:36px;display:grid;row-gap:8px;grid-column:1/-1;margin:76px 0 calc(94px - var(--row)*2);font-size:clamp(14px,1.215vw,17px);font-weight:700;line-height:1}
.chart .with{--s:100}.chart .alone{--s:40.8}.chart>div{position:relative;margin-right:calc(var(--pic)/2 + var(--lead))}.chart p{position:relative;height:var(--row);isolation:isolate}
.chart>div>span{position:absolute;z-index:2;left:0;right:0;top:0;bottom:0;padding-left:22px;display:flex;align-items:center;pointer-events:none}.chart .with>span,.with b{color:#000;clip-path:inset(0 calc(100% - var(--s)*1%) 0 0)}
.chart figcaption{position:absolute;right:calc(var(--pic) + 20px);bottom:0;height:var(--row);display:flex;flex-direction:column;justify-content:center;text-align:right;font-size:1.25em;font-weight:800;letter-spacing:-.015em}.chart figcaption span{display:block;margin-top:.5em;font-size:.76em;font-weight:500;letter-spacing:0;color:#b4b4b9}
.chart i{position:absolute;left:0;top:0;bottom:0;width:calc(var(--s)*1%);border-radius:14px}.alone i{background:#6a55ad}.with i{background:linear-gradient(90deg,#ffb700,var(--zap) 55%,#fff7c2)}.zap .with i{width:calc(100% + var(--lead) - var(--pic)/2 + 28px)}.with p:before{content:"";position:absolute;z-index:-2;inset:0;border-radius:14px;background:#141416}
.chart b{font-size:1.25em;font-weight:900;letter-spacing:-.02em;font-variant-numeric:tabular-nums;white-space:nowrap}.with b{position:absolute;z-index:3;inset:0;display:flex;align-items:center;justify-content:flex-end;padding-right:calc(100% - max(var(--s)*1% - var(--pic)/2 + var(--lead) - 20px,212px));font-size:1.5em}
.alone em{position:absolute;left:max(var(--s)*1%,12em);top:0;bottom:0;display:flex;align-items:center;gap:10px;padding-left:12px;font-style:normal}.alone em svg{height:32px;stroke-width:7.8}
/* the picture they're both editing */
.chart .pic{position:absolute;z-index:1;right:calc(var(--pic)/-2 - var(--lead));top:0;width:var(--pic);height:100%;border:2px solid #fff;border-radius:14px;overflow:hidden;background:#000}.chart .pic svg{display:block;width:100%;height:100%}.chart .alone .pic{border-color:#6b6b70}
.chart .pic g{opacity:0;transform:scale(.9);transform-box:fill-box;transform-origin:50% 50%;transition:opacity .15s,transform .25s var(--out)}.chart .pic g.on{opacity:1;transform:none}
/* Winky goes super: golden hair, a see-through aura and blue lightning. It runs behind its finished picture and looks out over the top */
.with em{--h:47px;position:absolute;z-index:0;left:calc(var(--s)*1%);top:50%;height:var(--h);width:calc(var(--lead)*2);margin-top:calc(var(--h)/-2)}.zap .with em{transform:translateY(calc(var(--row)*-.5 - 17px)) scale(.88);transition:transform .5s var(--out) .06s}.zap .saiyan .volt{visibility:hidden}
.saiyan{position:absolute;isolation:isolate;display:block;left:50%;top:50%;height:150%;transform:translate(-50%,-50%)}.saiyan canvas{display:block;height:100%;transform:translate(calc(var(--h)*.236),calc(var(--h)*.05)) scale(.84)}
.chart .volts{position:absolute;left:calc(var(--h)*-1.1);top:calc(var(--h)*-1.9);width:calc(100% + var(--h)*2.2);height:calc(var(--h)*3.6);pointer-events:none}
.with i:before,.saiyan:before{content:"";position:absolute;z-index:-1;opacity:0;transition:opacity .4s}.with i:before{inset:-13px -14px -13px 0;border-radius:0 40px 40px 0;background:linear-gradient(90deg,rgb(255 200 20/0),rgb(255 206 20/.25) 45%,rgb(255 220 60/.5));filter:blur(11px)}.saiyan:before{left:50%;top:50%;width:calc(var(--h)*3.1);height:calc(var(--h)*3.7);margin:calc(var(--h)*-2.3) 0 0 calc(var(--h)*-1.55);background:radial-gradient(closest-side,rgb(255 220 70/.5),rgb(255 200 20/.18) 50%,rgb(255 190 0/0))}.super :is(.with i,.saiyan):before{opacity:1;animation:hum .9s infinite alternate ease-in-out}@keyframes hum{to{opacity:.66}}
.saiyan svg{position:absolute;left:50%;bottom:46%;height:76%;aspect-ratio:1.111;transform:translateX(-50%) scale(0);transform-origin:50% 88%;overflow:visible;filter:drop-shadow(0 0 5px rgb(255 190 0/.55));transition:transform .12s}.saiyan path{fill:none;stroke:#b26b00;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.saiyan path:first-child{fill:var(--zap);stroke:#fff0a0}.saiyan .volt{stroke:#4cc3ff;filter:drop-shadow(0 0 5px #4cc3ff);animation:volt 1.1s infinite steps(1)}.saiyan .volt:last-child{animation-delay:-.5s}@keyframes volt{0%,22%,44%{opacity:1}12%,34%,62%{opacity:0}}
.super .saiyan svg{transform:translateX(-50%);transition:transform .42s cubic-bezier(.2,2.4,.4,1);animation:surge .22s .5s infinite alternate ease-in-out}@keyframes surge{from{transform:translateX(-50%)}to{transform:translateX(-50%) scale(.97,1.05) skewX(2.5deg)}}

/* Winky's notch, in the app's own points */
.nook{position:absolute;left:50%;top:0;width:0;height:0}.nook>svg{position:absolute;overflow:visible;width:1px;height:1px;filter:drop-shadow(0 10px 13px rgb(0 0 0/.5))}.nook>svg path{fill:#000;stroke:rgb(255 255 255/.18)}
.in{position:absolute;left:-300px;width:600px;top:0;height:260px}.in>*{position:absolute}
.in .helmet{left:170px;top:-.5px;width:32.6px;height:37.2px;filter:brightness(1.6)}.in .right{left:395px;right:161px;top:0;height:32px;gap:5px}.in .pulse{width:12.1px;height:5.4px}.in .right svg{width:18px;height:18px;stroke-width:9}
.open{left:89px;width:422px;top:38px;opacity:0;transform:scale(.97);transform-origin:50% 0;transition:opacity .18s,transform .22s}.nook.wide .open{opacity:1;transform:none;transition-delay:.06s}
.open .row{display:flex;gap:6px;margin-bottom:16px}.open .row span{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px;border-radius:99px;background:rgb(255 255 255/.11)}.open .row .o{width:32px;padding:0;justify-content:center;margin-left:auto}.open svg{flex:none}.open .row svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* the three files, and the agent's window */
.files{display:flex;gap:10px}.file{position:relative;flex:none;width:134px;height:86px;border-radius:10px;overflow:hidden;background:#fff}.file svg,.file canvas{position:absolute;inset:0;width:100%;height:100%}.file:after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgb(255 255 255/.12)}.file.busy:after{box-shadow:inset 0 0 0 2px var(--agent)}
.work{position:absolute;left:119px;right:119px;bottom:72px;border-radius:11px;overflow:hidden;background:#0d0d0f;box-shadow:0 14px 34px rgb(0 0 0/.6),0 0 0 1px rgb(255 255 255/.16)}
.work header{display:flex;align-items:center;gap:5.5px;height:25px;padding:0 10px;background:#1c1c1f;font-size:12px}.work header i{width:8.5px;height:8.5px;border-radius:9px;background:#ff5f57}.work header i:nth-child(2){background:#febc2e}.work header i:nth-child(3){background:#28c840}.work header em{font-style:normal;margin-left:6px}.work header b{margin-left:auto;display:flex;align-items:center;gap:6px;font-weight:600}.work header b:before{content:"";width:7px;height:7px;border-radius:9px;background:var(--agent)}
.work ul{list-style:none;padding:9px 14px 10px}.work li{display:flex;align-items:center;height:30px;font-size:16px;color:#8e8e93}.work li:before{content:"";width:7px;height:7px;margin:0 11px 0 4px;border-radius:9px;background:#55555a}.work li em{margin-left:auto;font-style:normal;font-weight:500}
.work li.now{color:#fff}.work li.now:before{background:#fff;animation:blip .7s infinite}.work li.done{color:#fff}.work li.done:before{content:"✓";width:15px;height:auto;margin-right:7px;margin-left:0;background:none;color:var(--agent);font-weight:800}

#agent .small{grid-column:1/-1;margin-top:4vh;display:flex;align-items:center;gap:14px;font-size:13px;line-height:1.45;color:#98989d}.small a{color:#fff;text-decoration:underline;text-underline-offset:3px;white-space:nowrap;transition:color .15s}
.hold{flex:none;width:5.4em;height:32px;border-radius:99px;background:#232326;color:#fff;font-weight:650;transition:background-color .15s,transform .15s var(--out)}.hold:active{transform:scale(.96)}
@media(hover:hover){.hold:hover{background:#38383c}.small a:hover{color:var(--zap)}}
@media(forced-colors:active){.chart i,.hold{border:1px solid}}

@media(min-width:901px){#agent .small{position:absolute;left:0;right:0;bottom:max(12px,1.6vh);margin:0}}
@media(max-width:900px){
  #agent{min-height:100svh;grid-template-columns:minmax(0,1fr);padding:44px 5vw 22px;align-items:center}#agent h2{font-size:min(10.4vw,76px);word-spacing:.1em}
  .book{max-width:600px;margin:22px 0 4px;justify-self:start}.back{display:none!important}#agent .sub{max-width:46ch;font-size:15px;line-height:1.5;margin-top:14px}.os:has(.wide) .menus{opacity:0}
  .lid{aspect-ratio:1.25}.os{width:500px;height:400px}.work{left:9px;right:9px;bottom:66px}
  .chart{--h:54px;--lead:30px;margin:70px 0 0}.with em{--h:40px}.chart figcaption{position:static;order:3;height:auto;margin-top:10px;text-align:left}
  .chart>div>span{padding:10px 0 0 13px;align-items:flex-start}.chart .with b{justify-content:flex-start;align-items:flex-end;padding:0 0 9px 13px;font-size:1.25em}.alone em{left:13px;padding:0 0 9px;align-items:flex-end}.alone em svg{display:none}#agent .small{margin-top:18px;align-items:flex-start;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.hold{display:none}.drawn .doodle path,.fast{transition:none}.fast path,.saiyan svg,.saiyan .volt,.with i:before,.saiyan:before{animation:none!important}.zap .with em,.chart .pic g{transition:none}}
.in [hidden]{display:none}
@media(min-width:901px) and (max-width:1100px){.chart figcaption{font-size:1.15em}.alone em svg{display:none}}
