/* Four illustrated process stories share the porcelain surface and transport. */
#top #ai #aiIn .wf-canvas {
  --scene-ground: #f0f1ee;
  --scene-paper: #fff;
  --scene-soft: #e1e7e1;
  --scene-edge: #bdc6bd;
  --scene-wire: #7a877e;
  --scene-muted: #4e5d54;
  --scene-ink: #26322b;
  --scene-accent: #406956;
  --scene-on-accent: #fff;
  position: relative;
  container: workflow / inline-size;
  display: block;
  justify-items: normal;
  align-self: start;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--round);
  background: var(--scene-ground);
  color: var(--scene-ink);
  font-family: var(--font, Inter, sans-serif);
  cursor: pointer;
}
html[data-theme="dark"] #top #ai #aiIn .wf-canvas {
  --scene-ground: #252a27;
  --scene-paper: #333b36;
  --scene-soft: #3f4d44;
  --scene-edge: #647569;
  --scene-wire: #94a69a;
  --scene-muted: #c3cfc6;
  --scene-ink: #eff3ed;
  --scene-accent: #b1cabb;
  --scene-on-accent: #203329;
}
#top #ai #aiIn .aip-detail > .wf-canvas { grid-area: auto; }
html[data-study] #top #ai #wai .ai-entry .ai-demo.im:has(.wf-canvas) {
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  padding: 0;
  overflow: visible;
  background: transparent !important;
}

#top #aiIn .wf-canvas .wf-board {
  display: grid;
  place-items: center;
  height: clamp(200px, 43cqi, 350px);
  box-sizing: content-box;
  padding: clamp(16px, 2.6cqi, 26px) clamp(8px, 3cqi, 28px) 0;
}
#top #aiIn .wf-board > svg {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 660px;
  max-height: none;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  font-family: inherit;
}
#top #aiIn .wf-board > .sc-compact { display: none; }
.wf-board .sc-strong { font-size: 14px; font-weight: 640; letter-spacing: -.025em; }
.wf-board .sc-label { font-size: 12px; font-weight: 570; letter-spacing: -.012em; }
.wf-board .sc-small { font-size: 10.5px; font-weight: 520; letter-spacing: -.006em; }

#top #aiIn .wf-canvas .wf-caption {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  margin: 0;
  padding: 0 clamp(10px, 2.2cqi, 22px) 4px;
  border: 0;
  background: transparent;
}
.wf-narration {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#top #aiIn .wf-play {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  min-width: 44px;
  margin: 0;
  padding: 4px 7px;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  color: var(--scene-muted);
  background: transparent;
  font: 550 13px/1.3 var(--font, Inter, sans-serif);
  cursor: pointer;
}
#top #aiIn .wf-play:focus-visible {
  color: var(--scene-ink);
  outline: 2px solid var(--scene-accent);
  outline-offset: -2px;
}
/* A mouse uses the portfolio cursor as its transport. The same native
   button remains available to touch, keyboard and forced-colors users. */
@media (hover: hover) and (pointer: fine) and (forced-colors: none) {
  #top #aiIn .wf-canvas .wf-play { opacity: 0; }
  #top #aiIn .wf-canvas .wf-play:focus-visible { opacity: 1; }
}
@media (any-pointer: coarse) {
  #top #aiIn .wf-canvas .wf-play { opacity: 1; }
}
@media (any-hover: hover) and (any-pointer: fine) and (forced-colors: none) {
  html[data-portfolio-pointer] #top #aiIn .wf-canvas .wf-play:not(:focus-visible) { opacity: 0; }
}
.wf-play-icon {
  width: 11px;
  height: 11px;
  background: currentColor;
  clip-path: polygon(12% 0, 97% 50%, 12% 100%);
}
[data-control="pause"] .wf-play-icon {
  clip-path: polygon(8% 0, 38% 0, 38% 100%, 8% 100%, 8% 0,
                     64% 0, 95% 0, 95% 100%, 64% 100%, 64% 0);
}
[data-control="next"] .wf-play-icon {
  clip-path: polygon(0 0, 68% 50%, 0 100%, 0 0, 79% 0, 100% 0, 100% 100%, 79% 100%, 79% 0);
}
[data-control="reset"] .wf-play-icon {
  box-sizing: border-box;
  clip-path: none;
  border: 1.7px solid currentColor;
  border-right-style: dotted;
  border-radius: 50%;
  background: transparent;
}

/* Start one continuous SVG sequence. Each phase has a fixed offset on that
   clock, so changing the narration never restarts a path or a moving object. */
@media (prefers-reduced-motion: no-preference) {
  .wf-canvas[data-auto-ready][data-control="play"] [data-phase]:not([data-phase="1"]) { opacity: .14; }
  .wf-board [data-phase="1"] { --phase-at: 0ms; --from-opacity: 1; }
  .wf-board [data-phase="2"] { --phase-at: var(--wf-beat); }
  .wf-board [data-phase="3"] { --phase-at: calc(2 * var(--wf-beat)); }
  .wf-board [data-phase="4"] { --phase-at: calc(3 * var(--wf-beat)); }
  .wf-canvas[data-control="resume"] { --wf-motion: paused; }

  .wf-canvas:is([data-control="pause"], [data-control="resume"]) [data-phase] {
    animation: wf-phase-in 420ms ease-out var(--phase-at) both var(--wf-motion, running);
  }
  .wf-canvas:is([data-control="pause"], [data-control="resume"]) .sc-trace {
    stroke-dasharray: 1 1;
    animation: wf-connect 540ms cubic-bezier(.32,0,.36,1) var(--phase-at) both var(--wf-motion, running);
  }
  .wf-canvas:is([data-control="pause"], [data-control="resume"]) .sc-arrive {
    animation: wf-arrive 510ms cubic-bezier(.2,.7,.2,1) calc(var(--phase-at) + 100ms) both var(--wf-motion, running);
  }
  .wf-canvas:is([data-control="pause"], [data-control="resume"]) .sc-title-cue {
    animation: wf-arrive 270ms ease-out calc(var(--phase-at) + 600ms) both var(--wf-motion, running);
  }
}
@keyframes wf-phase-in { from { opacity: var(--from-opacity, .14); } to { opacity: 1; } }
@keyframes wf-connect { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes wf-arrive { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .wf-canvas[data-active-stage="1"] :is([data-phase="2"], [data-phase="3"], [data-phase="4"]),
  .wf-canvas[data-active-stage="2"] :is([data-phase="3"], [data-phase="4"]),
  .wf-canvas[data-active-stage="3"] [data-phase="4"] { opacity: .2; }
}
@container workflow (max-width: 475px) {
  #top #aiIn .wf-canvas .wf-board {
    height: auto;
    padding: 14px 9px 0;
  }
  #top #aiIn .wf-board > .sc-wide { display: none; }
  #top #aiIn .wf-board > .sc-compact {
    display: block;
    height: auto;
    max-width: 340px;
  }
}
@media (forced-colors: active) {
  .wf-canvas { --scene-wire: CanvasText; }
  .wf-play-icon { forced-color-adjust: none; background: ButtonText; }
}
