/* ============================================================
   Spatial portfolio · ai ("How AI shapes my work" window)
   Prefix: .vai-*  ·  Chrome stays neutral (dark glass, white
   vibrant text); colour comes only from content: real app
   screens, real logos and the real Flowise tool colours.
   Spacing on an 8pt grid: 24 to 32px between blocks, 16px
   inside cards, 12 to 16px between chips and tiles.
   ============================================================ */

.vai { container-type: inline-size; container-name: vai; position: relative; }
.vai-panel[hidden] { display: none; }
.vai-panel:focus { outline: none; }

/* ---------- staged entrance (per section) ---------- */
.vai-panel [data-st] { opacity: 0; transform: translateY(12px); }
.vai-panel.is-in [data-st] {
  opacity: 1; transform: none;
  transition: opacity .4s var(--vx-ease-out), transform .7s var(--vx-spring-smooth);
  transition-delay: calc(var(--st, 0) * 40ms + 30ms);
}
.vx-reduced .vai-panel [data-st] { opacity: 1; transform: none; transition: none; }

/* ---------- shared ---------- */
.vai img { -webkit-user-drag: none; user-select: none; }
.vai-btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; gap: 8px; flex: none; }
.vai-btn-sm svg { width: 16px; height: 16px; }
.vai-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.16em; border-radius: 1px; background: currentColor; animation: vai-blink 1.05s steps(2, jump-none) infinite; }
@keyframes vai-blink { 0%, 45% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes vai-in { from { opacity: 0; translate: 0 6px; } }
@keyframes vai-rot { to { rotate: 360deg; } }

/* Brand logo chip: official logos on a white disc, monogram fallback */
.vai-logo { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 4px 12px -6px rgb(0 0 0 / 0.45); }
.vai-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.vai-logo.is-pad img { inset: 20%; width: 60%; height: 60%; object-fit: contain; }
.vai-logo.is-loaded img { opacity: 1; }
.vai-mono { font: 700 13px/1 var(--vx-font); letter-spacing: 0; color: rgb(30 30 36); }
.vai-logo.is-loaded .vai-mono { opacity: 0; }
.vai-logo.is-mono { background: rgb(255 255 255 / 0.18); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.4), inset 0 0 0 1px rgb(255 255 255 / 0.12); }
.vai-logo.is-mono .vai-mono { color: #fff; }

/* ============================================================
   Window header + section picker
   ============================================================ */
.vai-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.vai-top__t { min-width: 0; margin: 0; font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
.vai-askbtn .vx-kbd { margin-left: 2px; }

/* Sticky, so the three sections stay one tap away while reading */
.vai-segwrap { position: sticky; top: -24px; z-index: 20; margin: 0 0 32px; pointer-events: none; }
.vai-segwrap::before {
  content: ""; position: absolute; z-index: -1; left: -120px; right: -120px; top: -16px; bottom: -24px; pointer-events: none;
  background: linear-gradient(180deg, rgb(var(--vx-glass) / 0.94) 0%, rgb(var(--vx-glass) / 0.86) 62%, rgb(var(--vx-glass) / 0) 100%);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(180deg, #000 64%, transparent); mask-image: linear-gradient(180deg, #000 64%, transparent);
  opacity: 0; transition: opacity .25s var(--vx-ease-out);
}
.vai.is-stuck .vai-segwrap::before { opacity: 1; }
.vai-segctl {
  position: relative; display: inline-flex; gap: 4px; padding: 4px; max-width: 100%; pointer-events: auto;
  border-radius: var(--vx-r-pill);
  background: rgb(40 40 48 / 0.9); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.14), inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 12px 28px -18px rgb(0 0 0 / 0.7);
}
.vai-segctl__b {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px 0 16px;
  border: 0; border-radius: var(--vx-r-pill); background: none; color: var(--vx-label-2); font: 600 15px/1 var(--vx-font); letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  transition: color .25s, scale .4s var(--vx-spring);
}
.vai-segctl__b svg { width: 18px; height: 18px; flex: none; }
.vai-segctl__b:hover, .vai-segctl__b[aria-selected="true"] { color: var(--vx-label-1); }
.vai-segctl__b:active { scale: 0.96; }
.vai-segctl__b:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.vai-segctl__s { display: none; }
.vai-segctl__pill { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: var(--vx-r-pill); background: var(--vx-fill-hi); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.3), 0 6px 16px -8px rgb(0 0 0 / 0.5); transition: transform .55s var(--vx-spring), width .55s var(--vx-spring); }

/* Section header */
.vai-phead { margin: 0 0 24px; max-width: 760px; }
.vai-phead__t { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.vai-phead__l { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--vx-label-2); text-wrap: pretty; }

/* ============================================================
   1 · In my apps
   ============================================================ */
.vai-prods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.vai-prod {
  display: flex; flex-direction: column; gap: 16px; padding: 16px 16px 24px; border-radius: var(--vx-r-card); background: var(--vx-platter);
  box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.08), inset 0 0 0 1px rgb(255 255 255 / 0);
  transition: box-shadow .45s var(--vx-ease-out), background .35s;
}
.vai-prod.is-lit { background: var(--vx-platter-hi); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.14), inset 0 0 0 1px rgb(255 255 255 / 0.22); }
.vai-prod__stage { position: relative; height: 232px; border-radius: 18px; overflow: hidden; isolation: isolate; background: rgb(0 0 0 / 0.24); box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.08); }
.vai-prod__flow { position: absolute; inset: 0; }
.vai-prod__flow:empty { display: none; }
.vai-prod__fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.vai-prod.has-flow .vai-prod__fallback { display: none; }
.vai-prod__fallback img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 16px 34px -12px rgb(0 0 0 / 0.6); }
.vai-prod__meta { display: flex; align-items: center; gap: 16px; padding: 0 8px; }
.vai-prod__icon { width: 44px; height: 44px; border-radius: 12px; flex: none; box-shadow: 0 6px 16px -8px rgb(0 0 0 / 0.6), inset 0 0 0 0.5px rgb(255 255 255 / 0.2); }
.vai-prod__id { flex: 1; min-width: 0; }
.vai-prod__name { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.vai-prod__kind { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--vx-label-2); text-wrap: balance; } /* wraps beside the Open case button instead of clipping */
.vai-prod__text { margin: 0; padding: 0 8px; font-size: 15px; line-height: 1.55; color: var(--vx-label-2); text-wrap: pretty; }

/* Hestior: three honest step tiles cut from the real App Store screens */
.vai-hs { list-style: none; margin: 0; padding: 16px; position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; container-type: inline-size; }
.vai-hs__i { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 0; opacity: 0.6; transition: opacity .5s; }
.vai-hs__i.is-done { opacity: 0.85; }
.vai-hs__i.is-now { opacity: 1; }
.vai-hs__shot { flex: 1; min-height: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 10px 22px -14px rgb(0 0 0 / 0.8), 0 0 0 0 rgb(255 255 255 / 0); transition: box-shadow .5s; }
.vai-hs__i.is-now .vai-hs__shot { box-shadow: 0 12px 24px -14px rgb(0 0 0 / 0.8), 0 0 0 2px rgb(255 255 255 / 0.85); }
.vai-hs__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vai-hs__cap { display: flex; align-items: center; gap: 8px; height: 20px; font-size: 13px; font-weight: 600; color: var(--vx-label-1); white-space: nowrap; overflow: hidden; }
.vai-hs__cap > span { overflow: hidden; text-overflow: ellipsis; }
.vai-hs__s { display: none; }
/* the step captions follow the card's own width (two cards per row in narrow windows), not only the window's */
@container (max-width: 500px) { .vai-hs__l { display: none; } .vai-hs__s { display: inline; } }
.vai-hs__cap b { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; line-height: 1; background: rgb(255 255 255 / 0.16); transition: background .4s, color .4s; }
.vai-hs__i.is-now .vai-hs__cap b { background: #fff; color: rgb(20 20 24); }

/* Aspen: the real Lucid screen, panning slowly from the question to the Confirm card */
.vai-shot { position: absolute; inset: 0; display: grid; justify-items: center; padding: 16px 16px 0; overflow: hidden; }
.vai-shot img { width: min(80%, 360px); height: auto; border-radius: 12px 12px 0 0; box-shadow: 0 16px 34px -16px rgb(0 0 0 / 0.8); transform: translateY(0); }
.vai-shot.is-live img { animation: vai-pan 12s ease-in-out infinite alternate; }
@keyframes vai-pan { 0%, 12% { transform: translateY(0); } 88%, 100% { transform: translateY(calc(-100% + var(--vai-pan, 216px))); } }

/* ============================================================
   2 · Flowise at Globe
   ============================================================ */
.vai-fwbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 0 0 24px; }
.vai-badge { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--vx-r-pill); font-size: 14px; font-weight: 600; color: var(--vx-label-1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28); }
.vai-badge svg { width: 16px; height: 16px; }

.vai-seg { position: relative; display: inline-flex; gap: 4px; padding: 4px; margin: 0; border-radius: var(--vx-r-pill); background: rgb(0 0 0 / 0.2); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.06), inset 0 0 0 1px rgb(255 255 255 / 0.06); max-width: 100%; }
.vai-seg__b { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px 0 8px; border: 0; border-radius: var(--vx-r-pill); background: none; color: var(--vx-label-2); font: 500 15px/1 var(--vx-font); cursor: pointer; white-space: nowrap; transition: color .25s; }
.vai-seg__b[aria-selected="true"], .vai-seg__b:hover { color: var(--vx-label-1); }
.vai-seg__b:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.vai-seg__pill { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: var(--vx-r-pill); background: var(--vx-fill-hi); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.3), 0 6px 16px -8px rgb(0 0 0 / 0.5); transition: transform .55s var(--vx-spring), width .55s var(--vx-spring); }
.vai-logo--seg { width: 30px; height: 30px; box-shadow: none; }
.vai-seg__s { display: none; }
.vai-fw__blurb { margin: 0 0 16px; padding: 0 12px; max-width: 76ch; font-size: 15px; line-height: 1.55; color: var(--vx-label-2); }

.vai-fw { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 24px; }
.vai-canvas { position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; min-width: 0;
  background-color: rgb(0 0 0 / 0.18);
  background-image: radial-gradient(rgb(255 255 255 / 0.13) 1px, transparent 1.4px);
  background-size: 16px 16px; background-position: 8px 8px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07), inset 0 0.5px 0 rgb(255 255 255 / 0.1); }
.vai-canvas__bar { display: flex; align-items: center; gap: 12px; padding: 12px 12px 8px 16px; font-size: 13px; }
.vai-canvas__name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.vai-logo--bar { width: 22px; height: 22px; box-shadow: none; }
.vai-canvas__meta { flex: 1; color: var(--vx-label-3); font: 500 12px/1 var(--vx-mono); }
.vai-canvas__play { width: 36px; height: 36px; min-height: 36px; background: rgb(255 255 255 / 0.1); }
.vai-canvas__play svg { width: 14px; height: 14px; }
.vai-canvas__fit { position: relative; width: 100%; margin: 8px 0; }
.vai-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.vai-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.vai-edge { fill: none; stroke: rgb(255 255 255 / 0.32); stroke-width: 1.6; stroke-linecap: round; transition: stroke .3s; }
.vai-edge.is-hot { stroke: rgb(255 255 255 / 0.62); }
.vai-edge-glow { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; opacity: 0; }

.vai-node {
  position: absolute; width: 200px; padding: 12px; border: 0; border-radius: 14px; text-align: left; color: var(--vx-label-1); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, rgb(62 62 72 / 0.96), rgb(44 44 52 / 0.96));
  box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.2), inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 14px 30px -14px rgb(0 0 0 / 0.7);
  transition: box-shadow .35s var(--vx-ease-out), background .3s;
}
.vai-node:hover { background: linear-gradient(180deg, rgb(72 72 82 / 0.98), rgb(52 52 60 / 0.98)); }
.vai-node.is-active { box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.3), 0 0 0 1.5px rgb(255 255 255 / 0.75), 0 0 28px 2px rgb(255 255 255 / 0.16), 0 14px 30px -14px rgb(0 0 0 / 0.7); }
.vai-node.is-picked { box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.3), 0 0 0 2px #fff, 0 14px 30px -14px rgb(0 0 0 / 0.7); }
.vai-node:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.vai-node--agent { width: 212px; }
.vai-node__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vai-node__ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgb(255 255 255 / 0.14); color: #fff; }
.vai-node__ico svg { width: 16px; height: 16px; }
.vai-node__ico.has-logo { background: none; }
.vai-node--tool .vai-node__ico { background: linear-gradient(135deg, var(--g1), var(--g2)); padding: 2px; }
.vai-logo--node { width: 28px; height: 28px; box-shadow: none; }
.vai-node__ico.has-logo .vai-logo--node { width: 32px; height: 32px; }
.vai-node--agent .vai-node__ico { background: #fff; color: rgb(24 24 30); }
.vai-node__t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.vai-node__t b { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.vai-node__t small { margin-top: 2px; font-size: 11.5px; color: var(--vx-label-2); }
.vai-node--tool .vai-node__t small { font-family: var(--vx-mono); font-size: 10.5px; }
.vai-node__rows { display: flex; flex-direction: column; gap: 4px; }
.vai-node__row { position: relative; display: flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 8px; background: rgb(255 255 255 / 0.07); font-size: 12px; color: var(--vx-label-2); }
.vai-node__schema { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 24px; padding: 0 10px; border-radius: 8px; background: rgb(0 0 0 / 0.22); font-size: 11px; }
.vai-node__schema .vx-mono { font-size: 11px; color: var(--vx-label-1); }
.vai-node__schema em { font-style: normal; color: var(--vx-label-3); font: 500 10.5px/1 var(--vx-mono); }
.vai-node__status { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--vx-label-2); padding: 0 2px; }
.vai-node__status i { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / 0.4); }
.vai-node--agent.is-active .vai-node__status i { background: #fff; animation: vai-ping 1.2s var(--vx-ease-out) infinite; }
.vai-node--agent[data-status="Done"] .vai-node__status i { background: #fff; }
@keyframes vai-ping { 0% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0.55); } 100% { box-shadow: 0 0 0 8px rgb(255 255 255 / 0); } }
.vai-node__fetch { position: absolute; left: 50%; top: calc(100% + 8px); translate: -50% 0; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--vx-r-pill); white-space: nowrap;
  background: rgb(255 255 255 / 0.92); color: rgb(24 24 30); font: 600 11px/1 var(--vx-font); opacity: 0; scale: 0.85; transition: opacity .2s, scale .4s var(--vx-spring); pointer-events: none; }
.vai-node__fetch svg { width: 12px; height: 12px; animation: vai-rot 0.9s linear infinite; }
.vai-node__fetch.is-on { opacity: 1; scale: 1; }
/* handles */
.vai-h { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: rgb(40 40 48); box-shadow: 0 0 0 2px rgb(255 255 255 / 0.62); pointer-events: none; }
.vai-h--out { right: -6px; top: 22px; margin-top: -5.5px; }
.vai-h--in { left: -18px; top: 50%; margin-top: -5.5px; }
.vai-node.is-active .vai-h { box-shadow: 0 0 0 2px #fff, 0 0 10px rgb(255 255 255 / 0.7); }
.vai-node--tool .vai-h--out { top: 28px; }
/* tall layout (phones): rows on top, outputs at the bottom */
.vai-stage.is-tall .vai-node { width: 156px; }
.vai-stage.is-tall .vai-node--agent { width: 324px; }
.vai-stage.is-tall .vai-node__rows { order: -1; flex-direction: row; }
.vai-stage.is-tall .vai-node__row { flex: 1; justify-content: center; }
.vai-stage.is-tall .vai-h--in { left: 50%; top: -16px; margin: 0 0 0 -5.5px; }
.vai-stage.is-tall .vai-h--out { right: auto; left: 50%; top: auto; bottom: -6px; margin: 0 0 0 -5.5px; }
.vai-stage.is-tall .vai-node__fetch { top: 50%; left: auto; right: calc(100% + 8px); translate: 0 -50%; }
.vai-stage.is-tall .vai-node__schema { display: none; }
.vai-stage.is-tall .vai-node__head { align-items: flex-start; }
.vai-stage.is-tall .vai-node--agent .vai-node__head { align-items: center; }
/* packets */
.vai-packet { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; pointer-events: none; will-change: transform; }
.vai-packet i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.18), 0 0 18px 4px rgb(255 255 255 / 0.55); }
.vai-packet b { position: absolute; left: 10px; top: -24px; padding: 3px 7px; border-radius: 6px; background: rgb(255 255 255 / 0.94); color: rgb(24 24 30); font-size: 10.5px; font-weight: 600; opacity: 0; transition: opacity .2s; }
.vai-packet.has-label b { opacity: 1; }
/* inspector */
.vai-inspect { display: flex; align-items: baseline; gap: 12px; margin: auto 12px 12px; padding: 12px 16px; border-radius: 14px; font-size: 13px; line-height: 1.45; background: rgb(0 0 0 / 0.26); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); min-height: 44px; }
.vai-inspect__k { flex: none; font-weight: 600; color: var(--vx-label-1); }
.vai-inspect__v { color: var(--vx-label-2); }
.vai-inspect.is-flash { animation: vai-flash .5s var(--vx-ease-out); }
@keyframes vai-flash { from { background: rgb(255 255 255 / 0.16); } }

/* chat */
.vai-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: 22px; background: rgb(0 0 0 / 0.2); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07), inset 0 0.5px 0 rgb(255 255 255 / 0.1); overflow: hidden; }
.vai-chat__head { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 16px; font-size: 14px; box-shadow: inset 0 -1px 0 var(--vx-hairline); }
.vai-chat__tag { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--vx-label-2); padding: 4px 10px; border-radius: var(--vx-r-pill); background: rgb(255 255 255 / 0.09); }
.vai-chat__thread { flex: 1 1 0; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px 16px; overflow: hidden;
  -webkit-mask: linear-gradient(transparent, #000 36px); mask: linear-gradient(transparent, #000 36px); }
.vai-msg { max-width: 88%; padding: 8px 12px; border-radius: 16px 16px 16px 6px; font-size: 13.5px; line-height: 1.4; background: rgb(255 255 255 / 0.11); align-self: flex-start; transform-origin: 0 100%; }
.vai-msg--me { align-self: flex-end; border-radius: 16px 16px 6px 16px; background: rgb(255 255 255 / 0.92); color: rgb(22 22 28); transform-origin: 100% 100%; }
.vai-msg--me .vx-mono { font-size: 12.5px; font-weight: 500; }
.vai-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.vai-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgb(255 255 255 / 0.7); animation: vai-dotb 1s ease-in-out infinite; }
.vai-typing i:nth-child(2) { animation-delay: .15s; } .vai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes vai-dotb { 0%, 60%, 100% { translate: 0 0; opacity: 0.5; } 30% { translate: 0 -3px; opacity: 1; } }
.vai-call { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 12px; border-radius: 12px; background: rgb(0 0 0 / 0.28); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); font-size: 11.5px; transform-origin: 0 100%; }
.vai-call__ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgb(255 255 255 / 0.12); flex: none; }
.vai-call__ico svg { width: 12px; height: 12px; }
.vai-call__fn { flex: 1 1 calc(100% - 40px); min-width: 0; font-size: 11px; line-height: 1.45; color: var(--vx-label-1); overflow-wrap: anywhere; }
.vai-call__st { margin-left: 30px; display: inline-flex; align-items: center; gap: 6px; color: var(--vx-label-2); white-space: nowrap; }
.vai-call__st i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.3); border-top-color: #fff; animation: vai-rot .8s linear infinite; }
.vai-call.is-done .vai-call__st i { border: 0; width: 8px; height: 8px; background: #fff; animation: none; }
.vai-answer { align-self: stretch; padding: 12px 12px 4px; border-radius: 16px 16px 16px 6px; background: rgb(255 255 255 / 0.1); transform-origin: 0 100%; }
.vai-ans { display: none; padding: 0 0 8px; }
.vai-ans.is-in { display: block; animation: vai-in .45s var(--vx-ease-out); }
.vai-ans h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em; }
.vai-ans h4 .vai-tag:first-of-type { margin-left: 4px; }
.vai-tag { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--vx-label-1); background: rgb(255 255 255 / 0.12); }
.vai-ans i { display: block; height: 5px; margin: 0 0 4px; border-radius: 3px; background: rgb(255 255 255 / 0.2); width: calc(var(--w) * var(--p, 1)); }
.vai-chat__input { display: flex; align-items: center; gap: 4px; margin: 0 12px 12px; height: 44px; padding: 0 6px 0 16px; border-radius: var(--vx-r-pill); background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); font: 500 12.5px/1 var(--vx-mono); overflow: hidden; white-space: nowrap; }
.vai-chat__typed:empty + .vai-caret { opacity: 0.35; }
.vai-chat__send { margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: rgb(22 22 28); flex: none; }
.vai-chat__send svg { width: 14px; height: 14px; }

/* progressive disclosure: the prompt steps and the iterations */
.vai-discs { display: grid; gap: 12px; margin: 0 0 24px; }
.vai-disc { border-radius: 22px; background: var(--vx-platter); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.08); }
.vai-disc[hidden] { display: none; }
.vai-disc__s { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 12px 20px 12px 16px; list-style: none; cursor: pointer; border-radius: inherit; transition: background .25s; }
.vai-disc__s::-webkit-details-marker { display: none; }
.vai-disc__s::marker { content: ""; }
.vai-disc__s:hover { background: rgb(255 255 255 / 0.04); }
.vai-disc__s:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.vai-disc__ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--vx-fill); }
.vai-disc__ico svg { width: 18px; height: 18px; }
.vai-disc__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vai-disc__t b { font-size: 16px; line-height: 1.3; font-weight: 600; }
.vai-disc__t small { font-size: 13px; line-height: 1.4; color: var(--vx-label-2); }
.vai-disc__chev { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: rgb(255 255 255 / 0.08); transition: rotate .45s var(--vx-spring); }
.vai-disc__chev svg { width: 16px; height: 16px; }
.vai-disc[open] .vai-disc__chev { rotate: 180deg; }
.vai-disc__b { padding: 4px 20px 20px; }
.vai-disc[open] .vai-disc__b { animation: vai-in .4s var(--vx-ease-out); }

.vai-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.vai-step { display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px; border-radius: 14px; transition: background .4s; }
.vai-step.is-now { background: rgb(255 255 255 / 0.07); }
.vai-step__n { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgb(255 255 255 / 0.12); font: 600 12px/1 var(--vx-mono); transition: background .4s, color .4s; }
.vai-step.is-now .vai-step__n { background: #fff; color: rgb(22 22 28); }
.vai-step__t { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; line-height: 1.45; color: var(--vx-label-2); padding-top: 2px; }
.vai-step__t b { font-size: 14.5px; color: var(--vx-label-1); font-weight: 600; }
.vai-evo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.vai-evo__i { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.06); }
.vai-evo__i:not(:last-child)::after { content: ""; position: absolute; right: -20px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border: solid rgb(255 255 255 / 0.55); border-width: 2px 2px 0 0; border-radius: 1px; rotate: 45deg; }
.vai-evo__k { align-self: flex-start; padding: 4px 8px; border-radius: 8px; background: rgb(255 255 255 / 0.12); font-size: 11.5px; font-weight: 500; color: var(--vx-label-1); }
.vai-evo__i:last-child .vai-evo__k { background: #fff; color: rgb(22 22 28); }
.vai-evo__m { font-size: 13px; font-weight: 600; color: var(--vx-label-1); }
.vai-evo__t { font-size: 13.5px; line-height: 1.45; color: var(--vx-label-2); }
.vai-evo__guard { margin: 16px 0 0; }
.vai-note { display: flex; align-items: center; gap: 8px; margin: 0; }
.vai-note svg { width: 14px; height: 14px; flex: none; }

/* ============================================================
   3 · How I build
   ============================================================ */
.vai-loop { position: relative; margin: 0 0 24px; padding: 32px 24px 28px; border-radius: var(--vx-r-card); background: var(--vx-platter); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.08); }
.vai-loop__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.vai-loop__path { fill: none; stroke: rgb(255 255 255 / 0.16); stroke-width: 1.5; stroke-dasharray: 3 6; stroke-linecap: round; }
.vai-loop__trail { fill: none; stroke: rgb(255 255 255 / 0.7); stroke-width: 2; stroke-linecap: round; }
.vai-loop__dot { position: absolute; left: 0; top: 0; z-index: 3; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.16), 0 0 18px 4px rgb(255 255 255 / 0.45); opacity: 0; pointer-events: none; will-change: transform; }
.vai-loop__list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.vai-loop__i { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.vai-loop__disc { position: relative; z-index: 2; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 50%; color: var(--vx-label-2); background: rgb(52 52 60); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.2), inset 0 0 0 1px rgb(255 255 255 / 0.1), 0 10px 20px -12px rgb(0 0 0 / 0.6);
  transition: background .35s, color .35s, box-shadow .35s; }
.vai-loop__disc svg { width: 22px; height: 22px; }
.vai-loop__i.is-done .vai-loop__disc { color: #fff; background: rgb(70 70 80); }
.vai-loop__i.is-now .vai-loop__disc { color: rgb(22 22 28); background: #fff; box-shadow: 0 0 0 6px rgb(255 255 255 / 0.12), 0 0 28px 2px rgb(255 255 255 / 0.22); }
.vai-loop__who { font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: var(--vx-r-pill); background: rgb(255 255 255 / 0.12); }
.vai-loop__who--me { background: #fff; color: rgb(22 22 28); }
.vai-loop__t { font-size: 17px; font-weight: 600; line-height: 1.3; }
.vai-loop__p { margin: 0; max-width: 24ch; font-size: 14px; line-height: 1.5; color: var(--vx-label-2); text-wrap: pretty; }

.vai-harness { display: flex; align-items: center; gap: 16px; width: 100%; margin: 0 0 32px; padding: 16px 24px 16px 16px; border: 0; border-radius: var(--vx-r-card); background: var(--vx-platter); color: var(--vx-label-1); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.08); transition: background .3s; }
.vai-harness:hover { background: var(--vx-platter-hi); }
.vai-harness:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vai-harness__logos { display: flex; flex: none; padding-left: 8px; }
.vai-logo--stack { width: 40px; height: 40px; margin-left: -8px; box-shadow: 0 0 0 2px rgb(44 44 52), 0 4px 12px -6px rgb(0 0 0 / 0.45); }
.vai-harness__t { flex: 1; min-width: 0; display: grid; gap: 4px; }
.vai-harness__t b { font-size: 16px; line-height: 1.35; font-weight: 600; }
.vai-harness__t span { font-size: 14px; line-height: 1.5; color: var(--vx-label-2); }
.vai-harness__go { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.vai-harness__go svg { width: 16px; height: 16px; transition: translate .35s var(--vx-spring); }
.vai-harness:hover .vai-harness__go svg { translate: 3px 0; }

.vai-tgroup { margin: 0 0 32px; }
.vai-tgroup:last-child { margin-bottom: 8px; }
.vai-tgroup__h { margin: 0 0 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vx-label-3); }
.vai-tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vai-tool { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 16px; border-radius: 20px; background: var(--vx-platter); box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.08); }
.vai-tool__t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vai-tool__t b { font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.vai-tool__t small { font-size: 12.5px; line-height: 1.35; color: var(--vx-label-2); }

/* ============================================================
   Narrow: the window's own width (container), so this works for
   the phone sheet and small desktop windows alike.
   ============================================================ */
@container vai (max-width: 980px) {
  .vai-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container vai (max-width: 860px) {
  .vai-fw { grid-template-columns: minmax(0, 1fr); }
  .vai-chat__thread { flex: none; height: 300px; min-height: 300px; }
  .vai-evo { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .vai-evo__i:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -16px; margin: 0 0 0 -4px; rotate: 135deg; }
  .vai-loop__list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .vai-loop { padding: 24px; }
  .vai-loop__i { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; row-gap: 4px; align-items: center; text-align: left; }
  .vai-loop__disc { grid-row: 1 / span 2; width: 48px; height: 48px; margin: 0; align-self: start; }
  .vai-loop__disc svg { width: 20px; height: 20px; }
  .vai-loop__who { display: none; }
  .vai-loop__p { max-width: none; }
  .vai-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container vai (max-width: 720px) {
  .vai-prods { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@container vai (max-width: 600px) {
  .vai-top { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
  .vai-top__t { font-size: 28px; }
  .vai-askbtn { margin: 0; }
  .vai-askbtn .vx-kbd { display: none; }
  .vai-segwrap { top: -6px; margin-bottom: 24px; }
  .vai-segctl { display: flex; width: 100%; }
  .vai-segctl__b { flex: 1 1 0; min-width: 0; padding: 0 8px; gap: 6px; font-size: 14px; }
  .vai-segctl__b svg { width: 16px; height: 16px; }
  .vai-segctl__l { display: none; }
  .vai-segctl__s { display: inline; overflow: hidden; text-overflow: ellipsis; }
  .vai-phead { margin-bottom: 16px; }
  .vai-phead__t { font-size: 21px; }
  .vai-phead__l { font-size: 15px; }
  .vai-prod { padding: 12px 12px 20px; gap: 16px; }
  .vai-prod__stage { height: 208px; }
  .vai-prod__meta { gap: 12px; padding: 0 4px; }
  .vai-prod__text { padding: 0 4px; }
    .vai-prod .vai-btn-sm span { display: none; }
  .vai-prod .vai-btn-sm { width: 40px; padding: 0; justify-content: center; }
  .vai-hs { gap: 8px; padding: 12px; }
  .vai-hs__cap { font-size: 12px; gap: 6px; }
  .vai-hs__l { display: none; }
  .vai-hs__s { display: inline; }
  .vai-hs__cap b { width: 20px; height: 20px; font-size: 12px; }
  .vai-shot { --vai-pan: 192px; }
  .vai-fwbar { gap: 8px; margin-bottom: 16px; }
  .vai-badge { height: 32px; font-size: 13px; padding: 0 12px; }
  .vai-seg { display: flex; width: 100%; }
  .vai-seg__b { flex: 1; justify-content: center; padding: 0 12px 0 6px; font-size: 14px; gap: 6px; }
  .vai-logo--seg { width: 26px; height: 26px; }
  .vai-seg__l { display: none; }
  .vai-seg__s { display: inline; }
  .vai-fw__blurb { padding: 0; }
  .vai-canvas__meta { display: none; }
  .vai-canvas__name { flex: 1; }
  .vai-steps { grid-template-columns: minmax(0, 1fr); }
  .vai-disc__s { gap: 12px; padding: 12px 16px 12px 12px; }
  .vai-disc__b { padding: 0 12px 16px; }
  .vai-harness { flex-wrap: wrap; padding: 16px; margin-bottom: 24px; }
  .vai-harness__t { flex-basis: calc(100% - 120px); }
  .vai-harness__go { width: 100%; justify-content: flex-end; }
  .vai-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vai-tool { flex-direction: column; align-items: flex-start; gap: 12px; min-height: 0; padding: 16px; }
  .vai-tool__t b { font-size: 14.5px; }
  .vai-tgroup { margin-bottom: 24px; }
}

/* ---------- reduced motion: still frames, no ambient loops ---------- */
.vx-reduced .vai-shot img, .vx-reduced .vai-caret, .vx-reduced .vai-typing i, .vx-reduced .vai-node__status i, .vx-reduced .vai-call__st i, .vx-reduced .vai-node__fetch svg { animation: none !important; }
.vx-reduced .vai-caret { opacity: 0; }
.vx-reduced .vai-segctl__pill, .vx-reduced .vai-seg__pill, .vx-reduced .vai-disc__chev { transition: none; }
/* windows pushed into the distance hold their ambient loops still */
.vx-window.is-far .vai-shot img, .vx-window.is-far .vai-caret, .vx-window.is-far .vai-typing i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .vai-shot img, .vai-caret, .vai-typing i { animation: none !important; }
  .vai-segctl__pill, .vai-seg__pill { transition: none; }
}
@container vai (max-width: 400px) {
  .vai-segctl__b svg { display: none; }
  .vai-segctl__b { padding: 0 6px; }
}
@media (hover: none) { .vai-askbtn .vx-kbd { display: none; } }
