/* InfiniBot live agents: decorative "example workflow" floors (see live-agents.js).
 * Height is reserved up front so nothing shifts when the script fills it in.
 * Only transform/opacity animate. */
.la-floor {
  --la-gold: #fbbf24;
  --la-gold-2: #f59e0b;
  --la-line: rgba(251, 191, 36, 0.22);
  --la-card: rgba(14, 14, 20, 0.86);
  --la-ink: #f4efe3;
  --la-dim: rgba(244, 239, 227, 0.58);
  position: relative;
  height: 246px;
  width: min(1040px, 100% - 36px);
  margin: clamp(28px, 4vw, 56px) auto;
  pointer-events: none;
  user-select: none;
  contain: layout paint;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
  color: var(--la-ink);
}
.la-floor * { box-sizing: border-box; }
.la-floor--flush { margin-top: 0; }
.la-floor.la-n2 { width: min(760px, 100% - 36px); }
.la-floor--plugins { margin-top: calc(-1 * clamp(24px, 5vw, 90px)); }

.la-cap {
  margin: 0 0 10px;
  height: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 10px/16px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 191, 36, 0.72);
}
.la-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--la-gold);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
  animation: la-blink 2.4s ease-in-out infinite;
}
.la-still .la-live { animation: none; }

.la-row-st {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  height: 140px;
}
.la-rail {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 82px;
}
.la-rail::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--la-line) 8%, var(--la-line) 92%, transparent);
}

/* ---- Station card ---- */
.la-st {
  position: relative;
  flex: 0 1 252px;
  min-width: 0;
  height: 140px;
  padding: 10px 12px 0 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(24, 22, 16, 0.92), var(--la-card));
  border: 1px solid rgba(251, 191, 36, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  contain: layout paint;
}
.la-st::after { /* gold edge glow while working */
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.55), 0 0 24px rgba(251, 191, 36, 0.18) inset;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.la-st.is-working::after { opacity: 1; }
.la-st__hd {
  display: flex; align-items: center; gap: 7px;
  height: 20px;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.la-st__hd b { overflow: hidden; text-overflow: ellipsis; }
.la-ic {
  flex: none;
  display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 6px;
  color: var(--la-gold);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.la-ic svg, .la-ic img { width: 12px; height: 12px; }
.la-ic img { width: 14px; height: 14px; border-radius: 3px; }
.la-ok {
  margin-left: auto;
  flex: none;
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  color: #141008;
  background: linear-gradient(180deg, #ffe08a, var(--la-gold));
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(.3, 1.6, .5, 1);
}
.la-ok svg { width: 11px; height: 11px; stroke-width: 3; }
.is-done .la-ok { opacity: 1; transform: none; }

.la-st__bd { position: relative; height: 72px; margin-top: 6px; overflow: hidden; transition: opacity 0.35s ease; }
.la-idle {
  position: absolute; left: 0; top: 2px;
  display: flex; align-items: center; gap: 6px;
  font: 500 10px/16px "JetBrains Mono", ui-monospace, monospace;
  color: rgba(244, 239, 227, 0.38);
  transition: opacity 0.3s ease;
}
.la-idle::before { content: ""; width: 5px; height: 5px; border-radius: 50%; border: 1px solid rgba(251, 191, 36, 0.5); }
.is-s1 .la-idle, .is-working .la-idle { opacity: 0; }
.la-st__ft {
  position: absolute; left: 12px; right: 12px; bottom: 9px;
  display: flex; gap: 5px; overflow: hidden; height: 17px;
}
.la-tool, .la-c {
  flex: none;
  padding: 0 7px;
  height: 17px;
  border-radius: 99px;
  font: 500 9.5px/17px "JetBrains Mono", ui-monospace, monospace;
  color: rgba(251, 191, 36, 0.9);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  white-space: nowrap;
}
.la-st.is-working .la-tool { animation: la-chip 1.6s ease-in-out infinite; }
.la-st.is-working .la-tool + .la-tool { animation-delay: 0.8s; }
.la-prog {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: rgba(251, 191, 36, 0.08);
}
.la-prog i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--la-gold-2), #ffe08a);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.is-working .la-prog i { transform: scaleX(1); transition: transform var(--la-d, 3s) linear; }
.is-done .la-prog i { transform: scaleX(1); }
.is-reset .la-prog i { transform: scaleX(0); transition: none; }
.is-reset .la-st__bd { opacity: 0; }

/* Step reveals: .la-s1..4 appear as the station reaches .is-s1..4 */
.la-s1, .la-s2, .la-s3, .la-s4 {
  opacity: 0;
  transform: translate3d(0, 5px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.is-s1 .la-s1, .is-s2 .la-s2, .is-s3 .la-s3, .is-s4 .la-s4 { opacity: 1; transform: none; }

.la-st__bd p { margin: 0 0 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.la-q { color: var(--la-dim); }
.la-row { display: flex; align-items: center; gap: 6px; color: var(--la-ink); }
.la-row svg, .la-out svg, .la-steps svg, .la-pass svg { width: 12px; height: 12px; flex: none; }
.la-row svg { color: var(--la-gold); }
.la-subj { font-weight: 600; }
.la-out { display: flex; align-items: center; gap: 6px; color: var(--la-gold); font-weight: 600; }
.la-chips { display: flex; gap: 5px; margin-bottom: 6px; }
.la-lines i, .la-diff i {
  display: block; height: 5px; margin: 0 0 5px;
  border-radius: 3px;
  background: rgba(244, 239, 227, 0.16);
}
.la-lines i:nth-child(2) { width: 86%; }
.la-lines .la-short, .la-diff .la-short { width: 58%; }
.la-diff .la-add { background: rgba(251, 191, 36, 0.32); }
.la-diff .la-del { background: rgba(244, 239, 227, 0.12); width: 72%; }
.la-term p { font: 500 10.5px/1.5 "JetBrains Mono", ui-monospace, monospace; margin: 0 0 1px; color: var(--la-dim); }
.la-term b { color: var(--la-gold); }
.la-term .la-pass { display: flex; align-items: center; gap: 6px; color: var(--la-gold); font-weight: 600; }
.la-steps { list-style: none; margin: 0 0 4px; padding: 0; }
.la-steps li { display: flex; align-items: center; gap: 6px; margin: 0 0 3px; color: var(--la-dim); white-space: nowrap; overflow: hidden; }
.la-steps svg { color: var(--la-gold); }

/* Workflow graph */
.la-graph { display: flex; align-items: center; height: 30px; margin: 4px 0 8px; }
.la-node {
  flex: none;
  padding: 0 7px;
  height: 22px;
  border-radius: 7px;
  font: 600 9.5px/20px "JetBrains Mono", ui-monospace, monospace;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
  color: var(--la-ink);
  white-space: nowrap;
}
.la-edge {
  flex: 1 1 auto; min-width: 6px; height: 1px;
  background: var(--la-gold);
  transform: scaleX(0); transform-origin: 0 50%; opacity: 1;
  transition: transform 0.5s ease;
}
.is-s2 .la-edge.la-s2, .is-s3 .la-edge.la-s3 { transform: scaleX(1); }

/* FlyPic: noise resolves into the picture (opacity crossfade only) */
.la-img { position: relative; height: 40px; border-radius: 8px; overflow: hidden; background: #120f08; }
.la-img__noise, .la-img__art { position: absolute; inset: 0; transition: opacity 1.4s ease; }
.la-img__noise {
  background:
    repeating-linear-gradient(115deg, rgba(251, 191, 36, 0.12) 0 3px, transparent 3px 7px),
    repeating-linear-gradient(25deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 6px);
  opacity: 0;
}
.la-img__art { opacity: 0; background: linear-gradient(180deg, #3b1d06, #b45309 55%, #fbbf24); }
.la-v2 .la-img__art { background: linear-gradient(180deg, #05050a, #1e1b4b 60%, #92400e); }
.la-v3 .la-img__art { background: linear-gradient(180deg, #7c2d12, #f59e0b 60%, #fde68a); }
.la-sun { position: absolute; left: 62%; top: 9px; width: 16px; height: 16px; border-radius: 50%; background: #fff3c4; box-shadow: 0 0 14px #fde68a; }
.la-v2 .la-sun { width: 9px; height: 9px; top: 7px; left: 20%; background: #e5e7eb; box-shadow: 0 0 8px #e5e7eb; }
.la-hill { position: absolute; left: -10%; right: -10%; bottom: -20px; height: 34px; border-radius: 50% 50% 0 0; background: #1a1206; }
.la-v2 .la-hill { background: repeating-linear-gradient(90deg, #0b0b12 0 9px, #111827 9px 13px); border-radius: 0; height: 22px; bottom: 0; }
.is-working .la-img__noise { opacity: 1; animation: la-noise 0.6s steps(3) infinite; }
.is-s3 .la-img__noise, .is-done .la-img__noise { opacity: 0; }
.is-s3 .la-img__art, .is-done .la-img__art { opacity: 1; }

/* Post card */
.la-post { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.la-thumb { flex: none; width: 30px; height: 30px; border-radius: 7px; background: linear-gradient(160deg, #b45309, #fbbf24); }
.la-post .la-lines { flex: 1; }

/* ---- Agents ---- */
.la-ag {
  position: absolute; left: 0; bottom: 4px;
  width: 48px; height: 72px;
  will-change: transform;
}
.la-ag__body { position: absolute; inset: 0; transform-origin: 50% 100%; }
.la-ag__body img {
  display: block; width: 48px; height: 72px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  animation: la-idle 3.2s ease-in-out infinite;
}
.la-ag:nth-child(2n) .la-ag__body img { animation-duration: 3.9s; }
.la-ag.is-walking .la-ag__body img { animation: la-step 0.36s ease-in-out infinite alternate; }
.la-ag.is-typing .la-ag__body img { animation: la-type 0.5s ease-in-out infinite alternate; }
.la-ag__glow {
  position: absolute; left: 50%; bottom: -4px;
  width: 44px; height: 12px; margin-left: -22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(251, 191, 36, 0.5), transparent);
  opacity: 0.45;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.la-ag.is-done .la-ag__glow, .la-ag.is-typing .la-ag__glow { opacity: 1; transform: scale(1.35); }
.la-bub {
  position: absolute; left: 40px; top: -4px;
  display: flex; gap: 3px; align-items: center;
  height: 18px; padding: 0 7px;
  border-radius: 10px 10px 10px 3px;
  background: rgba(20, 18, 12, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.45);
  opacity: 0; transform: scale(0.6); transform-origin: 0 100%;
  transition: opacity 0.2s ease, transform 0.25s ease;
}
.la-bub i { width: 4px; height: 4px; border-radius: 50%; background: var(--la-gold); animation: la-dot 1s ease-in-out infinite; }
.la-bub i:nth-child(2) { animation-delay: 0.16s; }
.la-bub i:nth-child(3) { animation-delay: 0.32s; }
.la-ag.is-typing .la-bub { opacity: 1; transform: none; }
.la-pkt {
  position: absolute; left: 34px; top: 26px;
  display: flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 6px 0 4px;
  border-radius: 6px;
  color: #141008;
  background: linear-gradient(180deg, #ffe08a, var(--la-gold));
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
  font: 700 9px/18px "JetBrains Mono", ui-monospace, monospace;
  white-space: nowrap;
  opacity: 0; transform: translate3d(0, 6px, 0) scale(0.7);
  transition: opacity 0.25s ease, transform 0.3s ease;
}
.la-pkt svg { width: 11px; height: 11px; }
.la-ag.is-carrying .la-pkt, .la-ag.is-receiving .la-pkt { opacity: 1; transform: none; }
.la-ag.is-receiving .la-pkt { left: auto; right: 30px; }

/* Off screen / hidden tab: freeze every CSS animation too. */
.la-paused *, .la-paused *::before, .la-paused *::after { animation-play-state: paused !important; }

@keyframes la-idle { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -2px, 0); } }
@keyframes la-step { from { transform: translate3d(0, 0, 0) rotate(-2deg); } to { transform: translate3d(0, -4px, 0) rotate(2deg); } }
@keyframes la-type { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -1.5px, 0) rotate(-1deg); } }
@keyframes la-dot { 0%, 100% { opacity: 0.25; transform: translate3d(0, 0, 0); } 40% { opacity: 1; transform: translate3d(0, -2px, 0); } }
@keyframes la-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes la-chip { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }
@keyframes la-noise { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-7px, 0, 0); } }

@media (max-width: 640px) {
  .la-floor[data-la-mobile="off"] { display: none; }
  .la-floor { height: 232px; width: calc(100% - 28px); margin: 24px auto; }
  .la-row-st { gap: 10px; height: 136px; }
  .la-st { flex: 1 1 0; height: 136px; padding: 9px 9px 0; }
  .la-st__hd { font-size: 11px; }
  .la-st__ft { left: 9px; right: 9px; }
  .la-st__ft .la-tool + .la-tool { display: none; }
  .la-node { padding: 0 4px; font-size: 8.5px; }
  .la-rail { height: 74px; }
  .la-ag, .la-ag__body img { width: 40px; height: 60px; }
  .la-bub { left: 32px; }
  .la-pkt { left: 28px; top: 20px; }
  .la-ag.is-receiving .la-pkt { right: 26px; }
  .la-pkt em { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .la-floor *, .la-floor *::before, .la-floor *::after { animation: none !important; transition: none !important; }
}
