/* COMMND AT WORK (24/11). The app window and its five scenes. Each scene plays when it gets the
   class .play (product-demo.js restarts it every time it comes back). Colors come from the page
   tokens, so it follows the light and dark themes. */
.atwork-inner{padding-top:4rem;padding-bottom:4rem}
.atwork-head{max-width:760px}
.atwork-kicker{font:600 15px/1.4 var(--font);color:var(--ac)}
.atwork-head h2{margin-top:10px;font-size:clamp(2.4rem,4.2vw,4.2rem);line-height:1.06}
.atwork-head .panel-support{max-width:40rem;margin-top:1.2rem}

.atw{margin-top:2.4rem;padding:clamp(10px,1.4vw,18px);border:1px solid var(--glass-line);border-radius:30px;background:var(--glass-bg);box-shadow:var(--glass-shadow);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}

/* The tabs on top, each with the bar that fills while its scene plays. */
.atw-tabs{display:flex;gap:6px;padding:6px;border:1px solid var(--ln);border-radius:20px;background:var(--sf);overflow-x:auto;scrollbar-width:none}
.atw-tabs::-webkit-scrollbar{display:none}
.atw-tab{position:relative;flex:1 0 auto;display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:0 16px;border:0;border-radius:14px;background:none;color:var(--ink3);font:500 15px/1 var(--font);white-space:nowrap;overflow:hidden;transition:background .2s,color .2s}
.atw-tab svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.atw-tab:hover{color:var(--ink)}
.atw-tab[aria-selected=true]{background:var(--tint);color:var(--ink);font-weight:600}
.atw-bar{position:absolute;left:16px;right:16px;bottom:6px;height:2px;border-radius:2px;background:var(--ac);transform:scaleX(0);transform-origin:left}
.atw-tab[aria-selected=true] .atw-bar{transform:scaleX(var(--atw-progress,0))}

/* The window: the same parts as app.commnd.com. Always dark, like the app the team uses. */
.atw-window{display:grid;grid-template-columns:200px minmax(0,1fr);margin-top:12px;height:clamp(430px,36vw,490px);border:1px solid #2a2a31;border-radius:22px;background:#0d0c14;color:#f4f4f6;overflow:hidden;box-shadow:0 30px 70px rgba(0,0,0,.35)}
.atw-side{display:flex;flex-direction:column;gap:12px;padding:20px 16px;border-right:1px solid #22222b;background:#0a0a10}
.atw-logo{display:inline-flex;flex-direction:column;align-self:flex-start;font:600 22px/1 var(--font);letter-spacing:-.035em}
.atw-logo i{display:block;height:2.5px;margin:5px 4px 0 0;border-radius:3px;background:linear-gradient(90deg,#8b5cf6,#3b82f6,#22c55e)}
.atw-co{margin-top:10px;padding:9px 11px;border:1px solid #2a2a31;border-radius:10px;font-size:13px;color:#c6c6cf}
.atw-nav{display:flex;flex-direction:column;gap:2px;padding:9px 11px;border-radius:10px;font-size:13.5px;color:#a1a1ad}
.atw-nav small{font-size:11.5px;color:#7d7d89}
.atw-nav-on{position:relative;background:rgba(139,92,246,.14);color:#c4b5fd}
.atw-nav-on b{position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:3px;background:#8b5cf6}
.atw-main{position:relative;display:flex;flex-direction:column;min-width:0;padding:16px 20px;overflow:hidden}
.atw-band{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:16px 18px;border:1px solid #2c2a4a;border-radius:16px;background:linear-gradient(120deg,#17143a,#221a5a 55%,#1a1650)}
.atw-band strong{margin-right:6px;font:600 22px/1 var(--font);letter-spacing:-.03em}
.atw-pill{display:inline-flex;align-items:center;gap:7px;padding:6px 11px;border:1px solid rgba(255,255,255,.14);border-radius:99px;background:rgba(255,255,255,.06);font-size:12.5px;color:#e4e4ee}
.atw-pill-dim{color:#b9b9c8}
.atw-dot{width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 0 rgba(34,197,94,.6);animation:atw-ping 2s infinite}
.atw-sample{margin-left:auto;font-size:12px;color:#9d9db4}
.atw-scene{flex:1;min-height:0;display:flex;flex-direction:column;gap:12px;padding-top:14px}
.atw-scene[hidden]{display:none}
.atw-label{display:flex;align-items:center;gap:8px;font:600 14px/1 var(--font);color:#c6c6cf}
.atw-chip{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:99px;background:#22222c;color:#d6d6e0;font:600 12px/1 var(--font)}
.atw-chip-ok{background:rgba(34,197,94,.16);color:#4ade80}

/* 1 · Summary */
.atw-insight{display:flex;gap:14px;align-items:flex-start;padding:14px 16px;border:1px solid #2c2a4a;border-radius:16px;background:linear-gradient(100deg,rgba(124,77,255,.16),rgba(124,77,255,.04))}
.atw-spark{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:11px;background:#1b1a2a;color:#a78bfa}
.atw-insight p{font-size:14.5px;line-height:1.5;color:#c6c6cf}
.atw-insight b{color:#f4f4f6}
.atw-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.atw-kpi{display:flex;flex-direction:column;gap:3px;padding:14px;border:1px solid #26262f;border-radius:14px;background:#131219}
.atw-kpi:first-child{border-color:#4c3a99;box-shadow:inset 0 2px 0 #8b5cf6}
.atw-kpi span{font-size:12.5px;color:#a1a1ad}
.atw-kpi strong{font:600 clamp(1.3rem,2vw,1.75rem)/1.1 var(--font);letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.atw-kpi em{font-style:normal;font-size:12px;color:#a1a1ad}
.atw-kpi em.up{color:#4ade80}
.atw-kpi svg{height:30px;margin-top:6px}
.atw-line{fill:none;stroke:#8b5cf6;stroke-width:2;vector-effect:non-scaling-stroke;stroke-dasharray:2000;stroke-dashoffset:0}
.play .atw-line{animation:atw-draw 1.6s .3s ease-out both}
.play .atw-insight{animation:atw-rise .5s ease-out both}
.play .atw-kpi{animation:atw-rise .5s ease-out both}
.play .atw-kpi:nth-child(2){animation-delay:.08s}
.play .atw-kpi:nth-child(3){animation-delay:.16s}
.play .atw-kpi:nth-child(4){animation-delay:.24s}

/* 2 · Approve a move: the cursor goes to Approve, clicks, the card turns into «Applied» and leaves. */
.atw-badge{position:relative;display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:99px;background:rgba(139,92,246,.2);color:#c4b5fd;font-size:12px}
.atw-badge b{grid-area:1/1}
.atw-n2{opacity:0}
.atw-rec{position:relative;display:flex;flex-direction:column;gap:8px;padding:14px 16px;border:1px solid #2a2a33;border-radius:16px;background:#131219}
.atw-rec-top{display:flex;justify-content:space-between;align-items:center}
.atw-saved{padding:4px 10px;border-radius:10px;background:rgba(139,92,246,.18);color:#c4b5fd;font:600 13px/1.2 var(--font)}
.atw-rec-title{font:600 16px/1.35 var(--font);letter-spacing:-.01em;color:#f4f4f6}
.atw-rec-fix{font-size:13.5px;color:#c6c6cf}
.atw-rec-fix b{margin-right:6px;color:#a78bfa;font-weight:600}
.atw-rec-actions{display:flex;gap:10px;align-items:center}
.atw-approve{position:relative;display:inline-grid;min-width:104px;height:36px;padding:0 16px;place-items:center;border-radius:10px;background:#7c4dff;color:#fff;font:600 13.5px/1 var(--font)}
.atw-approve span{grid-area:1/1}
.atw-approve-b{opacity:0}
.atw-ghost{font-size:13.5px;color:#a1a1ad}
.atw-toast{position:absolute;right:14px;bottom:14px;padding:7px 12px;border-radius:10px;background:#15301f;color:#4ade80;font-size:12.5px;opacity:0}
.atw-rec-next{opacity:.85}
.atw-cursor{position:absolute;left:62%;top:78%;width:22px;height:22px;opacity:0;pointer-events:none;background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 8-6.5 1.8L9 18z' fill='%23fff' stroke='%23111' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");filter:drop-shadow(0 2px 4px rgba(0,0,0,.5))}
.play .atw-cursor{animation:atw-cursor 3.2s .4s ease-in-out both}
.play .atw-approve{animation:atw-press 3.2s .4s both}
.play .atw-approve-a{animation:atw-out 3.2s .4s both}
.play .atw-approve-b{animation:atw-in-late 3.2s .4s both}
.play .atw-toast{animation:atw-toast 4.6s .4s both}
.play .atw-rec-first{animation:atw-leave 5.6s .4s both}
.play .atw-n3{animation:atw-out-late 5.6s .4s both}
.play .atw-n2{animation:atw-in-later 5.6s .4s both}

/* 3 · Ask Commnd: the message types itself, three dots, the answer, «Drafted». */
.atw-chat{flex:1;display:flex;flex-direction:column;gap:10px;justify-content:flex-start}
.atw-msg{max-width:78%;padding:11px 14px;border-radius:16px;font-size:14px;line-height:1.5}
.atw-me{align-self:flex-end;border-top-right-radius:6px;background:#7c4dff;color:#fff}
.atw-typed{display:inline-block;overflow:hidden;white-space:nowrap;vertical-align:bottom;max-width:100%}
.atw-bot{align-self:flex-start;border:1px solid #2a2a33;border-top-left-radius:6px;background:#15141d;color:#e4e4ee}
.atw-bot small{display:block;margin-bottom:4px;font-size:12px;color:#9d9db4}
.atw-dots{display:flex;align-items:center;gap:5px;font-size:12.5px;color:#9d9db4}
.atw-dots i{width:6px;height:6px;border-radius:50%;background:#8b5cf6;animation:atw-blink 1s infinite}
.atw-dots i:nth-child(2){animation-delay:.15s}
.atw-dots i:nth-child(3){animation-delay:.3s}
.atw-dots span{margin-left:6px}
.atw-drafted{align-self:flex-start;padding:4px 10px;border-radius:99px;background:rgba(34,197,94,.14);color:#4ade80;font-size:12px;font-weight:600}
.atw-input{display:flex;align-items:center;justify-content:space-between;padding:8px 8px 8px 16px;border:1px solid #2e2e38;border-radius:16px;color:#7d7d89;font-size:14px}
.atw-input b{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#7c4dff;color:#fff}
.play .atw-me{animation:atw-rise .35s ease-out both}
.play .atw-typed{animation:atw-type 1.6s .2s steps(40,end) both}
.play .atw-dots{animation:atw-dots-show 3.6s 1.9s both}
.play .atw-reply{animation:atw-pop .45s 3.6s ease-out both}
.play .atw-drafted{animation:atw-pop .4s 4.3s ease-out both}

/* 4 · Autopilot: the switch turns on, the log fills. */
.atw-auto{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border:1px solid #2a2a33;border-radius:16px;background:#131219}
.atw-auto b{display:block;font-size:15px}
.atw-auto div>span{display:block;margin-top:3px;font-size:13px;color:#a1a1ad}
.atw-auto-on{display:none!important}
.atw-switch{position:relative;flex:none;width:52px;height:30px;border-radius:99px;background:#2e2e38}
.atw-switch i{position:absolute;left:3px;top:3px;width:24px;height:24px;border-radius:50%;background:#fff}
.atw-log{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.atw-log li{display:grid;grid-template-columns:44px auto 1fr auto;align-items:center;gap:10px;padding:10px 14px;border:1px solid #24242d;border-radius:12px;background:#111018;font-size:13.5px;color:#e4e4ee}
.atw-log time{color:#7d7d89;font-variant-numeric:tabular-nums}
.atw-log em{font-style:normal;color:#a78bfa;font-weight:600;font-size:12.5px}
.atw-ok,.atw-wait{padding:3px 8px;border-radius:8px;font-size:11.5px;font-weight:600}
.atw-ok{background:rgba(34,197,94,.14);color:#4ade80}
.atw-wait{background:rgba(245,158,11,.14);color:#fbbf24}
.play .atw-switch{animation:atw-switch-bg .01s .9s both}
.play .atw-switch i{animation:atw-knob .35s .9s ease-out both}
.play .atw-auto-off{animation:atw-hide .01s .9s both}
.play .atw-auto-on{display:block!important;animation:atw-show .3s .9s both}
.play .atw-log li{animation:atw-rise .45s ease-out both}
.play .atw-log li:nth-child(1){animation-delay:1.5s}
.play .atw-log li:nth-child(2){animation-delay:2.3s}
.play .atw-log li:nth-child(3){animation-delay:3.1s}
.play .atw-log li:nth-child(4){animation-delay:3.9s}

/* 5 · Results: the line before the change, the mark, the line after. */
.atw-result-top{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px 20px;align-items:flex-end}
.atw-result-top .atw-rec-title{margin-top:8px}
.atw-figs{display:flex;gap:8px}
.atw-figs span{display:flex;flex-direction:column;gap:3px;min-width:86px;padding:10px 12px;border:1px solid #26262f;border-radius:12px;background:#131219;font-size:12px;color:#a1a1ad}
.atw-figs b{font:600 18px/1.1 var(--font);color:#f4f4f6}
.atw-figs b.atw-good{color:#4ade80}
.atw-chart{flex:1;min-height:0;width:100%;padding:10px 4px 0}
.atw-chart path{fill:none;vector-effect:non-scaling-stroke}
.atw-grid{stroke:#22222b;stroke-width:1}
.atw-target{stroke:#4ade80;stroke-width:1.2;stroke-dasharray:5 5;opacity:.6}
.atw-before{stroke:#7d7d89;stroke-width:2.4;stroke-dasharray:2000;stroke-dashoffset:0}
.atw-mark{stroke:#8b5cf6;stroke-width:1.5;stroke-dasharray:4 4}
.atw-after{stroke:#a78bfa;stroke-width:3;stroke-dasharray:2000;stroke-dashoffset:0;filter:drop-shadow(0 0 6px rgba(139,92,246,.6))}
.atw-cap{font-size:12.5px;color:#9d9db4}
.play .atw-before{animation:atw-draw-long 1.2s .2s ease-out both}
.play .atw-mark{animation:atw-show .3s 1.3s both}
.play .atw-after{animation:atw-draw-after 1.8s 1.5s ease-out both}
.play .atw-figs span{animation:atw-pop .4s ease-out both}
.play .atw-figs span:nth-child(1){animation-delay:.3s}
.play .atw-figs span:nth-child(2){animation-delay:3.1s}
.play .atw-figs span:nth-child(3){animation-delay:3.4s}
.play .atw-chip-ok{animation:atw-pop .4s 3.6s ease-out both}

.atw-note{margin-top:12px;text-align:center;font-size:13px;color:var(--ink3)}

@keyframes atw-ping{0%{box-shadow:0 0 0 0 rgba(34,197,94,.55)}80%,100%{box-shadow:0 0 0 7px rgba(34,197,94,0)}}
@keyframes atw-draw{from{stroke-dashoffset:2000}to{stroke-dashoffset:0}}
@keyframes atw-draw-long{from{stroke-dashoffset:2000}to{stroke-dashoffset:0}}
@keyframes atw-draw-after{from{stroke-dashoffset:2000}to{stroke-dashoffset:0}}
@keyframes atw-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes atw-pop{from{opacity:0;transform:translateY(6px) scale(.97)}to{opacity:1;transform:none}}
@keyframes atw-show{from{opacity:0}to{opacity:1}}
@keyframes atw-hide{to{opacity:0;height:0;margin:0}}
@keyframes atw-blink{0%,100%{opacity:.25}50%{opacity:1}}
@keyframes atw-type{from{width:0}to{width:100%}}
@keyframes atw-dots-show{0%{opacity:0;max-height:0;padding-block:0;border-width:0}8%,90%{opacity:1;max-height:60px;padding-block:11px;border-width:1px}100%{opacity:0;max-height:0;padding-block:0;border-width:0;margin-top:-10px}}
@keyframes atw-cursor{0%{opacity:0;transform:translate(160px,60px)}15%{opacity:1}55%{opacity:1;transform:translate(-210px,-18px)}62%{transform:translate(-210px,-18px) scale(.85)}70%{transform:translate(-210px,-18px) scale(1)}95%{opacity:1}100%{opacity:0;transform:translate(-210px,-18px)}}
@keyframes atw-press{0%,57%{transform:none;background:#7c4dff}62%{transform:scale(.94)}70%,100%{transform:none;background:#16a34a}}
@keyframes atw-out{0%,62%{opacity:1}68%,100%{opacity:0}}
@keyframes atw-in-late{0%,64%{opacity:0}72%,100%{opacity:1}}
@keyframes atw-toast{0%,48%{opacity:0;transform:translateY(6px)}55%,92%{opacity:1;transform:none}100%{opacity:0}}
@keyframes atw-leave{0%,78%{opacity:1;transform:none;max-height:240px}92%{opacity:0;transform:translateX(30px);max-height:240px}100%{opacity:0;transform:translateX(30px);max-height:0;padding-block:0;border-width:0;margin-bottom:-12px}}
@keyframes atw-out-late{0%,82%{opacity:1}88%,100%{opacity:0}}
@keyframes atw-in-later{0%,84%{opacity:0}90%,100%{opacity:1}}
@keyframes atw-switch-bg{to{background:#7c4dff}}
@keyframes atw-knob{to{transform:translateX(22px)}}

@media(max-width:900px){
  .atw-window{grid-template-columns:1fr;height:auto;min-height:480px}
  .atw-side{display:none}
  .atw-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .atw-sample{margin-left:0}
}
@media(max-width:560px){
  .atw-tab{flex:0 0 auto;padding:0 12px;font-size:14px}
  .atw-main{padding:12px}
  .atw-log li{grid-template-columns:auto 1fr;}
  .atw-log time{display:none}
  .atw-log em{grid-column:2}
  .atw-msg{max-width:92%}
  .atw-typed{white-space:normal}
  .atw-cursor{display:none}
}
@media(prefers-reduced-motion:reduce){
  .atw *{animation:none!important}
}

/* The platform logos (24/11, Angel: «faltan los logos de las apps»): Google Ads on the band, the
   sidebar, each card, the Autopilot log and the result, as in the app. */
.atw-g{flex:none;width:15px;height:15px}
.atw-nav small{display:flex;align-items:center;gap:5px}
.atw-nav small .atw-g{width:12px;height:12px}
.atw-logo-tile{display:grid;place-items:center;flex:none;width:30px;height:30px;border:1px solid #2e2e38;border-radius:9px;background:#fff}
.atw-logo-tile .atw-g{width:18px;height:18px}
.atw-rec-top{justify-content:flex-start;gap:8px}
.atw-where{margin-left:2px;font-size:12.5px;color:#9d9db4}
.atw-rec{flex-direction:row;align-items:stretch;gap:16px}
.atw-rec-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.atw-est{flex:0 0 210px;display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid #2c2a4a;border-radius:14px;background:rgba(124,77,255,.1)}
.atw-est span{font-size:12px;font-weight:600;color:#a1a1ad}
.atw-est strong{font:600 26px/1.1 var(--font);letter-spacing:-.03em;color:#c4b5fd}
.atw-est em{font-style:normal;font-size:12.5px;color:#d6d6e0}
.atw-est .atw-est-check{margin-top:8px;padding-top:8px;border-top:1px solid #2e2e40}
.atw-est-small{align-self:center}
.atw-what{display:flex;align-items:center;gap:8px;min-width:0}
.atw-log li{grid-template-columns:44px auto 1fr auto}
.atw-result-top .atw-rec-top{margin-bottom:2px}
@media(max-width:900px){.atw-est{flex-basis:170px}}
@media(max-width:560px){
  .atw-rec{flex-direction:column}
  .atw-est,.atw-est-small{flex-basis:auto;align-self:stretch}
  .atw-where{display:none}
}
