/* ─── AGENT BUILD INTRO ─────────────────────────────────────────────
   Active only while <html> has .building (set by the inline script in
   <head> of index.html). Engine and settings: /intro.js */

html.building { scroll-behavior: auto !important; }
.building .fade-in { transition: none !important; }
.building [data-build] { visibility: hidden; }
.building [data-build].b-on { visibility: visible; }
.building .bi-w { visibility: hidden; }
.building .bi-w.on { visibility: visible; }

:root {
  --bi-sel: #0d99ff;
  --bi-guide: #ff3b5c;
  --bi-ink: #152042;
  --bi-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bi-layer {
  position: absolute; left: 0; top: 0; width: 100%;
  pointer-events: none; z-index: 250; overflow: hidden;
}
.bi-layer > * { position: absolute; }
.bi-cv { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 260; }

/* selection box, Figma style */
.bi-sel { border: 1px solid var(--bi-sel); background: rgba(13,153,255,.06); transition: opacity .35s; }
.bi-sel i { position: absolute; width: 6px; height: 6px; background: #fff; border: 1px solid var(--bi-sel); }
.bi-sel i:nth-child(1) { left: -3px; top: -3px; }
.bi-sel i:nth-child(2) { right: -3px; top: -3px; }
.bi-sel i:nth-child(3) { left: -3px; bottom: -3px; }
.bi-sel i:nth-child(4) { right: -3px; bottom: -3px; }
.bi-dim {
  position: absolute; left: 50%; bottom: -19px; transform: translateX(-50%);
  background: var(--bi-sel); color: #fff; font: 600 10px/1 var(--bi-mono);
  letter-spacing: 0; padding: 3px 5px; border-radius: 3px; white-space: nowrap;
}
.bi-name {
  position: absolute; left: -1px; bottom: 100%; margin-bottom: 3px;
  color: var(--bi-sel); font: 600 10px/1 var(--bi-mono); letter-spacing: 0; white-space: nowrap;
}
.bi-wsel { border: 1px solid var(--bi-sel); background: rgba(13,153,255,.16); border-radius: 2px; }

/* wireframes */
.bi-wire { transition: opacity .45s; }
.bi-wire.box { border: 1px dashed rgba(21,32,66,.24); background: rgba(21,32,66,.025); border-radius: 10px; }
.bi-wire.bar { background: rgba(21,32,66,.1); border-radius: 3px; }
.bi-wire.chip { border: 1px solid rgba(21,32,66,.2); background: rgba(21,32,66,.04); border-radius: 5px; }
.bi-wire.media {
  background-color: #e4e8f0; border-radius: 16px;
  background-image:
    linear-gradient(to top right, transparent calc(50% - .5px), rgba(21,32,66,.16) 50%, transparent calc(50% + .5px)),
    linear-gradient(to top left, transparent calc(50% - .5px), rgba(21,32,66,.16) 50%, transparent calc(50% + .5px));
}
.bi-fade { opacity: 0 !important; }

/* guides, crosshairs, spacing */
.bi-guide { background: var(--bi-guide); box-shadow: 0 0 6px var(--bi-guide); transition: opacity .5s; }
.bi-guide.blue { background: var(--bi-sel); box-shadow: 0 0 6px var(--bi-sel); }
.bi-cross {
  width: 9px; height: 9px; margin: -4px 0 0 -4px; transition: opacity .6s;
  background:
    linear-gradient(rgba(21,32,66,.55), rgba(21,32,66,.55)) center / 1px 100% no-repeat,
    linear-gradient(rgba(21,32,66,.55), rgba(21,32,66,.55)) center / 100% 1px no-repeat;
}
.bi-gap { width: 1px; background: var(--bi-guide); transition: opacity .4s; }
.bi-gap b {
  position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
  background: var(--bi-guide); color: #fff; font: 600 10px/1 var(--bi-mono);
  letter-spacing: 0; padding: 2px 4px; border-radius: 3px;
}

/* typing */
.bi-caret { width: 1.5px; background: var(--bi-ink); animation: bi-blink .6s steps(1) infinite; }
@keyframes bi-blink { 50% { opacity: 0; } }
.bi-draft { border: 1px solid var(--bi-guide); background: rgba(255,59,92,.08); white-space: nowrap; overflow: hidden; }

/* asset being dragged in */
.bi-ghost {
  border-radius: 12px; border: 2px solid #fff; overflow: hidden; z-index: 4;
  box-shadow: 0 14px 34px rgba(21,32,66,.35), 0 0 0 4px rgba(13,153,255,.4), 0 0 30px rgba(13,153,255,.35);
}

/* scan */
.bi-beam {
  position: fixed; left: 0; right: 0; height: 140px; z-index: 255; pointer-events: none;
  background: linear-gradient(rgba(13,153,255,0), rgba(13,153,255,.1) 85%, rgba(13,153,255,.8) 99%, rgba(13,153,255,0));
}
.bi-logo {
  position: fixed; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 20px; background: #fff url(/images/favicon.png) center / 62% auto no-repeat;
  box-shadow: 0 10px 30px rgba(21,32,66,.15); z-index: 258;
  transition: opacity .5s, transform .5s; animation: bi-pulse 1s ease-in-out infinite;
}
@keyframes bi-pulse {
  50% { box-shadow: 0 10px 30px rgba(21,32,66,.15), 0 0 0 12px rgba(13,153,255,.08), 0 0 50px rgba(13,153,255,.3); }
}

/* status pill */
.bi-pill {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 270;
  display: flex; align-items: center; gap: 10px;
  background: rgba(21,32,66,.94); border: 1px solid #2e3f6e; border-radius: 999px;
  padding: 7px 8px 7px 12px; box-shadow: 0 10px 30px rgba(21,32,66,.25);
  font: 11px/1.2 var(--bi-mono); letter-spacing: 0; word-spacing: 0; color: #b0b7cb;
  white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: opacity .4s;
}
.bi-pill b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.bi-dots { display: flex; }
.bi-dots span { width: 12px; height: 12px; border-radius: 50%; margin-left: -4px; border: 2px solid #152042; }
.bi-bar { width: 80px; height: 3px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
.bi-bar div { height: 100%; width: 0; background: var(--bi-sel); transition: width .2s; }
.bi-status { color: #6cc4ff; min-width: 150px; }
.bi-skip {
  pointer-events: auto; background: rgba(255,255,255,.12); border: 0; color: #fff;
  font: inherit; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.bi-skip:hover { background: rgba(255,255,255,.22); }
.bi-skip:focus-visible { outline: 2px solid var(--bi-sel); outline-offset: 2px; }
@media (max-width: 600px) {
  .bi-bar, .bi-hide-sm { display: none; }
  .bi-status { min-width: 0; }
}
