/* Agent workspace carousel (src/partials/agent-workspace.html), moved from the
   agents page. Scoped to .ws-showcase so its short class names (.tab, .frame,
   .row, .cursor) cannot reach the rest of the homepage. */
.ws-showcase{
  --ink:#17191F;--ink-2:#4A515C;--slate:#5C6470;--muted:#A3AAB6;--line-n:#E4E7EC;
  --blue:#1B439E;--blue-tint:#EEF3FF;--demo-ease:cubic-bezier(.2,0,.2,1);
  color-scheme:light;color:var(--ink);margin-top:clamp(28px,5vh,52px);
}
.ws-showcase *,.ws-showcase *::before,.ws-showcase *::after{box-sizing:border-box}
.ws-showcase img{max-width:100%;display:block}
.ws-showcase p{margin:0}
.ws-showcase button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;margin:0}
.ws-showcase :focus-visible{outline:2px solid #2457C5;outline-offset:3px}

.ws-showcase .sc-shell{position:relative}
.ws-showcase .sc-panel{
  position:relative;border-radius:24px;background:rgba(255,255,255,.86);
  box-shadow:0 0 0 1px var(--line-n),0 30px 80px -40px rgba(16,29,58,.35);
  padding:10px 10px clamp(18px,3vw,34px);
}
.ws-showcase .tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:6px 6px 0}
.ws-showcase .tab{
  position:relative;display:flex;flex-direction:column;justify-content:flex-start;text-align:left;padding:16px 14px 18px;border-radius:14px;color:var(--muted);
  transition:color .2s var(--demo-ease),background .2s var(--demo-ease);
}
.ws-showcase .tab:hover{color:var(--ink-2);background:rgba(27,67,158,.04)}
.ws-showcase .tab.on{color:var(--ink)}
.ws-showcase .tab .t-head{display:flex;align-items:center;gap:9px;font-size:14.5px;font-weight:600;letter-spacing:-0.01em}
.ws-showcase .tab svg{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ws-showcase .tab.on svg{stroke:var(--blue)}
.ws-showcase .tab .t-desc{display:block;margin-top:8px;font-size:12.5px;line-height:1.45;font-weight:400}
.ws-showcase .tab .bar{position:absolute;left:14px;right:14px;top:6px;height:2px;border-radius:2px;background:transparent;overflow:hidden}
.ws-showcase .tab.on .bar{background:rgba(27,67,158,.12)}
.ws-showcase .tab .bar i{display:block;height:100%;width:0;background:var(--blue)}
.ws-showcase .tab.on .bar i{animation:ws-fill var(--dur,6.5s) linear forwards}
.ws-showcase.paused .tab.on .bar i{animation-play-state:paused}
@keyframes ws-fill{to{width:100%}}

.ws-showcase .frame-wrap{position:relative;margin:clamp(12px,2vw,20px) clamp(4px,1vw,12px) 0;perspective:1800px}
.ws-showcase .frame{
  position:relative;border-radius:14px;overflow:hidden;background:#fff;
  box-shadow:0 0 0 1px rgba(16,29,58,.10),0 40px 90px -40px rgba(16,29,58,.45);
  transform-origin:50% 0;will-change:transform;
}
.ws-showcase .chrome{
  display:flex;align-items:center;gap:7px;height:38px;padding:0 14px;background:#F7F8FA;
  border-bottom:1px solid var(--line-n);font-size:12px;color:var(--slate);
}
.ws-showcase .chrome i{width:10px;height:10px;border-radius:50%;background:#DADDE3}
.ws-showcase .chrome .ttl{flex:1;text-align:center;margin-right:44px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ws-showcase .chrome .live{display:inline-flex;align-items:center;gap:6px;color:var(--blue);font-weight:600}
.ws-showcase .chrome .live::before{content:"";width:6px;height:6px;border-radius:50%;background:#15A36B;box-shadow:0 0 0 3px rgba(21,163,107,.18)}
.ws-showcase .screen{position:relative;aspect-ratio:16/9;background:#fff}
.ws-showcase .shot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top left;opacity:0;visibility:hidden}
.ws-showcase .shot.prev{opacity:1;visibility:visible;z-index:1}
.ws-showcase .shot.on{opacity:1;visibility:visible;z-index:2;animation:ws-screen-in .38s var(--demo-ease) both}
@keyframes ws-screen-in{from{opacity:0}to{opacity:1}}
@keyframes ws-toast-in{from{opacity:0;transform:translateY(8px)}}

/* Rows cut out of each capture rise into place when a screen opens and glow in
   their status colour under the pointer (Truo Demo trade.css). */
.ws-showcase .rows{position:absolute;inset:0;opacity:0;visibility:hidden;pointer-events:none}
.ws-showcase .rows.prev{opacity:1;visibility:visible;z-index:1}
.ws-showcase .rows.on{opacity:1;visibility:visible;z-index:2;animation:ws-screen-in .38s var(--demo-ease) both}
.ws-showcase .rows .slot,.ws-showcase .rows .row{position:absolute;left:var(--l);top:var(--t);width:var(--w);height:var(--h)}
.ws-showcase .rows .slot{background:var(--bg,#fff)}
.ws-showcase .rows .row{
  pointer-events:auto;background-repeat:no-repeat;background-size:var(--bs);background-position:var(--bp);
  transform-origin:50% 100%;border-radius:var(--r,0);
  transition:box-shadow .15s ease;
}
.ws-showcase .rows .row::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:color-mix(in srgb,var(--glow) 9%,transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--glow) 85%,transparent);
  opacity:0;transition:opacity .15s ease;
}
.ws-showcase .rows .row:hover{z-index:1;box-shadow:0 0 16px color-mix(in srgb,var(--glow) 34%,transparent)}
.ws-showcase .rows .row:hover::after{opacity:1}
.ws-showcase .rows .row.i{--glow:#9d9da6}
.ws-showcase .rows .row.o{--glow:#0f7b6e}
.ws-showcase .rows .row.p{--glow:#3b6fd4}
.ws-showcase .rows .row.w{--glow:#d4952b}
.ws-showcase .rows .row.b{--glow:#c43a3a}
.ws-showcase .rows.on.play .row{animation:ws-row-in .42s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(120ms + var(--i) * 32ms)}
@keyframes ws-row-in{from{opacity:0;transform:translateY(30%) scaleY(.92)}to{opacity:1;transform:none}}

.ws-showcase .cursor{
  position:absolute;z-index:4;left:var(--tx,50%);top:calc(38px + (100% - 38px) * var(--typ,.5));
  transition:left .8s var(--demo-ease),top .8s var(--demo-ease);pointer-events:none;
}
.ws-showcase .cursor svg{width:20px;height:20px;filter:drop-shadow(0 2px 4px rgba(16,29,58,.25))}
.ws-showcase .cursor span{
  position:absolute;left:16px;top:18px;white-space:nowrap;background:var(--blue);color:#fff;
  font-size:11.5px;font-weight:600;padding:4px 9px;border-radius:6px 999px 999px 999px;
  box-shadow:0 4px 12px rgba(27,67,158,.3);
}
.ws-showcase .agent-card{
  position:absolute;right:-26px;top:54%;z-index:5;display:none;gap:11px;align-items:flex-start;width:min(300px,42%);
  padding:13px 14px;border-radius:14px;background:#fff;
  box-shadow:0 0 0 1px rgba(16,29,58,.08),0 18px 40px -16px rgba(16,29,58,.35);
}
.ws-showcase .agent-card.on{display:flex;animation:ws-toast-in .26s var(--demo-ease) .55s both}
.ws-showcase .agent-card .ic{
  width:30px;height:30px;border-radius:9px;display:grid;place-items:center;flex:none;background:var(--blue-tint);
}
.ws-showcase .agent-card .ic svg{width:16px;height:16px;stroke:var(--blue);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ws-showcase .agent-card b{display:block;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--blue)}
.ws-showcase .agent-card strong{display:block;margin-top:3px;font-size:14px;font-weight:600;letter-spacing:-0.01em;color:var(--ink)}
.ws-showcase .agent-card em{display:block;margin-top:4px;font-style:normal;font-size:12.5px;line-height:1.45;color:var(--slate)}
.ws-showcase .agent-card .tag{
  display:inline-flex;margin-top:9px;font-size:11px;font-weight:600;padding:3px 8px;border-radius:999px;
  background:#FFF7E8;color:#8A4B08;
}
.ws-showcase .agent-card .tag.ok{background:#ECFDF8;color:#0B5C56}
.ws-showcase .sc-note{margin:16px clamp(4px,1vw,12px) 0;font-size:12px;color:var(--muted)}
html[data-theme="dark"] .ws-showcase .sc-note{color:var(--theme-text)}
/* Dark panel and tabs; the captured screens inside the frame stay light. */
html[data-theme="dark"] .ws-showcase .sc-panel{
  background:var(--theme-surface);
  box-shadow:0 0 0 1px rgb(255 255 255 / 8%),0 30px 80px -40px rgb(0 0 0 / 60%);
}
html[data-theme="dark"] .ws-showcase .tabs{--ink:var(--theme-text);--ink-2:#c9d2de;--muted:#8794a6;--blue:var(--theme-accent)}
html[data-theme="dark"] .ws-showcase .tab:hover{background:rgb(255 255 255 / 4%)}
html[data-theme="dark"] .ws-showcase .tab.on .bar{background:rgb(255 255 255 / 12%)}

@media (prefers-reduced-motion:reduce){
  .ws-showcase *,.ws-showcase *::before,.ws-showcase *::after{
    animation-duration:.001ms !important;transition-duration:.001ms !important;
    animation-iteration-count:1 !important;
  }
  .ws-showcase .rows .row{animation:none !important}
  .ws-showcase .tab .bar{display:none}
}

@media (max-width:1100px){
  .ws-showcase .tabs{display:flex;overflow-x:auto;scrollbar-width:none;gap:6px}
  .ws-showcase .tabs::-webkit-scrollbar{display:none}
  .ws-showcase .tab{flex:none;padding:14px 14px 14px}
  .ws-showcase .tab .t-desc{display:none}
}
@media (max-width:860px){
  .ws-showcase .sc-panel{padding:6px 6px 16px;border-radius:18px}
  .ws-showcase .frame-wrap{margin:10px 4px 0}
  .ws-showcase .chrome .ttl{margin-right:0;text-align:left}
  /* On phones the agent card sits under the frame instead of covering the screen. */
  .ws-showcase .agent-card{position:relative;width:auto;inset:auto !important;margin:10px 0 0;padding:11px 12px}
  .ws-showcase .agent-card .tag{display:none}
  .ws-showcase .cursor span{display:none}
}
