/* Stoa builder: shared by the landing page hero window and the app's Builder route. */
.bx { --ink: #0d0e10; --ink2: #3b3f46; --mute: #858b94; --mute2: #a9aeb6; --line: #e7e9ed; --line2: #eff1f4; --soft: #f6f7f9;
  --orange: #ef5a2a; --green: #20a77f; --green-bg: #effaf5; --green-line: #8ed9bf; --blue: #1f66d1; --blue-bg: #e2f0fe; --blue-line: #86b9ef;
  --violet: #7a4ddf; --violet-bg: #eee7ff; --amber: #d4731b; --amber-bg: #fff1e2;
  font-family: 'Inter', system-ui, sans-serif; color: var(--ink); font-size: 13px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
:where(.bx) .i { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: middle; }
:where(.bx) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Window chrome */
.bx-win { display: grid; grid-template-columns: 60px 1fr; background: #fff; height: 100%; min-height: 0; }
.bx-rail { border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; background: #fff; min-height: 0; }
.bx-rail .logo { width: 38px; height: 38px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; margin-bottom: 14px; }
.bx-rail .logo svg { width: 22px; height: 22px; }
.bx-rail a, .bx-rail .ri { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: #8d939c; position: relative; }
.bx-rail a .i, .bx-rail .ri .i { width: 18px; height: 18px; }
.bx-rail a:hover { background: var(--soft); color: var(--ink); }
.bx-rail a.on, .bx-rail .ri.on { background: #ecedf0; color: var(--ink); }
.bx-rail hr { width: 30px; border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.bx-main { display: grid; grid-template-rows: 48px 1fr; min-width: 0; min-height: 0; }
.bx-top { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line); min-width: 0; background: #fff; }
.bx-brand { display: flex; align-items: center; gap: 9px; font: 600 15px/1 'Inter Tight', 'Inter', sans-serif; letter-spacing: -.01em; flex: none; }
.bx-brand .sq { width: 24px; height: 24px; border-radius: 6px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.bx-brand .sq svg { width: 15px; height: 15px; }
.bx-crumb { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; font-size: 13.5px; color: var(--ink); white-space: nowrap; }
.bx-crumb .i { width: 17px; height: 17px; }
.bx-crumb .sep { color: var(--mute); }
.bx-crumb .ws { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); font: 600 9px/1 'Inter', sans-serif; letter-spacing: .02em; }
.bx-crumb .wfname { overflow: hidden; text-overflow: ellipsis; }
.bx-status { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 500; }
.bx-status.live { background: var(--green-bg); color: var(--green); }
.bx-status.draft { background: #f2f3f5; color: var(--ink2); }
.bx-status.paused { background: var(--amber-bg); color: var(--amber); }
.bx-status.failing { background: #fdecea; color: #c8321e; }
.bx-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.bx-zoomsel { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 0 6px; height: 30px; border-radius: 7px; }
.bx-zoomsel:hover { background: var(--soft); }
.bx-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.bx-btn:hover { border-color: #d5d8de; color: var(--ink); }
.bx-btn.ghost { color: var(--mute); }
.bx-btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.bx-btn.dark:hover { background: #26282c; }
.bx-btn .i { width: 15px; height: 15px; }

/* Canvas */
.bx-body { position: relative; display: grid; grid-template-columns: 1fr 312px; min-height: 0; overflow: hidden; }
.bx-canvas { position: relative; overflow: hidden; background-color: #f9fafb; background-image: radial-gradient(circle, #d3d7de 1px, transparent 1.3px); background-size: 16px 16px; min-height: 0; touch-action: none; }
.bx-canvas.grab { cursor: grab; }
.bx-canvas.grabbing { cursor: grabbing; }
.bx-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.bx-wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.bx-wire { fill: none; stroke: var(--orange); stroke-width: 1.5; }
.bx-wire.idle { stroke: #d6d9df; }
.bx-wire.fail { stroke: #d93a22; stroke-dasharray: 4 4; }
.bx-cbar { position: absolute; left: 14px; top: 12px; right: 14px; display: flex; justify-content: space-between; pointer-events: none; z-index: 3; }
.bx-cbar > div { display: flex; gap: 6px; pointer-events: auto; }
.bx-tb { height: 30px; min-width: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); box-shadow: 0 1px 1px rgba(16, 24, 40, .03); }
.bx-tb button { height: 28px; min-width: 28px; display: grid; place-items: center; border-radius: 6px; }
.bx-tb button:hover { background: var(--soft); }
.bx-tb .z { font-size: 12.5px; min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.bx-tb .i { width: 15px; height: 15px; }

/* Nodes */
.bx-node { position: absolute; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: border-color .2s, box-shadow .2s; cursor: default; }
.bx-node.is-sel { border-color: var(--ink); box-shadow: 0 0 0 .5px var(--ink), 0 6px 18px -8px rgba(16, 24, 40, .18); }
.bx-node.run { box-shadow: 0 0 0 3px rgba(239, 90, 42, .16); border-color: var(--orange); }
.bx-node.fail { border-color: #d93a22; box-shadow: 0 0 0 3px rgba(217, 58, 34, .12); }
.bx-nh { display: grid; grid-template-columns: 34px 1fr 22px; gap: 10px; align-items: start; }
.bx-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #eceef2; color: var(--ink); }
.bx-ic .i { width: 16px; height: 16px; }
.bx-ic.blue { background: var(--blue-bg); color: var(--blue); }
.bx-ic.violet { background: var(--violet-bg); color: var(--violet); }
.bx-ic.amber { background: var(--amber-bg); color: var(--amber); }
.bx-ic.green { background: var(--green-bg); color: var(--green); }
.bx-nt { font-size: 14px; font-weight: 500; line-height: 1.25; padding-top: 1px; letter-spacing: -.005em; }
.bx-ns { font-size: 12.5px; color: var(--mute); margin-top: 3px; line-height: 1.35; }
.bx-more { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--ink); }
.bx-more:hover { background: var(--soft); }
.bx-chips { display: flex; justify-content: flex-end; gap: 6px; margin: 10px 0 0; flex-wrap: wrap; }
.bx-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 1px solid var(--line); background: #f8f9fa; border-radius: 6px; font-size: 12px; color: var(--mute); white-space: nowrap; }
.bx-chip .i { width: 13px; height: 13px; }
.bx-box { background: var(--soft); border-radius: 10px; padding: 11px 12px; margin-top: 12px; }
.bx-box h5 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.005em; }
.bx-box .bs { font-size: 12px; color: var(--mute2); margin-top: 2px; }
.bx-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.bx-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #1d1f23; min-height: 18px; }
.bx-list li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-ck { width: 15px; height: 15px; color: #3cbf95; flex: none; }
.bx-list li.wait .bx-ck { opacity: 0; }
.bx-file { display: flex; align-items: center; gap: 10px; color: var(--mute) !important; }
.bx-file .pdf { width: 19px; height: 19px; border-radius: 4px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.bx-file .pdf .i { width: 13px; height: 13px; }
.bx-info { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; background: var(--blue-bg); border: 1px solid var(--blue-line); border-radius: 9px; padding: 9px 11px; font-size: 12.5px; font-weight: 600; color: var(--blue); line-height: 1.4; }
.bx-info .i { width: 15px; height: 15px; margin-top: 1px; }
.bx-person { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.bx-person img, .bx-person .ini { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; }
.bx-person .ini { background: #e6e8ec; display: grid; place-items: center; font-size: 10px; font-weight: 600; }
.bx-person .sla { margin-left: auto; font-size: 12px; color: var(--mute); }

/* Wire decorations */
.bx-plus { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; display: grid; place-items: center; color: var(--orange); border-radius: 5px; z-index: 2; }
.bx-plus .i { width: 14px; height: 14px; stroke-width: 1.8; }
.bx-plus:hover { background: #fff; box-shadow: 0 0 0 1px var(--orange); }
.bx-pill { position: absolute; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--green-line); background: var(--green-bg); color: var(--green); font-size: 13px; font-weight: 500; white-space: nowrap; z-index: 2; transform-origin: 50% 50%; }
.bx-pill.fail { border-color: #f1a99c; background: #fdecea; color: #c8321e; }
.bx-pill.wait { border-color: #f4c48f; background: var(--amber-bg); color: var(--amber); }
.bx-pill.hide { opacity: 0; transform: scale(.6); }
.bx-pill.bx-pop { animation: bxPop .42s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes bxPop { 0% { opacity: 0; transform: scale(.55); } 100% { opacity: 1; transform: scale(1); } }

/* Inspector */
.bx-insp { border-left: 1px solid var(--line); background: #fbfbfc; overflow: auto; min-height: 0; }
.bx-insp-in { padding: 10px 16px 18px; }
.bx-ih { display: flex; align-items: center; gap: 8px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); margin: 0 -16px; padding-left: 16px; padding-right: 12px; }
.bx-ih .appic { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: grid; place-items: center; flex: none; }
.bx-ih .appic .i { width: 15px; height: 15px; }
.bx-ih .t { font-size: 13.5px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-ih .ed { color: var(--ink); }
.bx-ih .sp { flex: 1; }
.bx-ih button { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; }
.bx-ih button:hover { background: var(--soft); }
.bx-steps { display: flex; align-items: center; gap: 6px; margin: 0 -16px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.bx-steps button { display: inline-flex; align-items: center; gap: 6px; height: 40px; font-size: 13px; color: var(--ink2); position: relative; padding: 0 2px; }
.bx-steps button.on { color: var(--ink); }
.bx-steps button.on::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: -1px; height: 1.5px; background: var(--ink); }
.bx-steps .chev { width: 14px; height: 14px; color: var(--ink); }
.bx-steps .st { width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; background: #b8bec7; color: #fff; }
.bx-steps .st.ok { background: #39b98f; }
.bx-steps .st .i { width: 10px; height: 10px; stroke-width: 2.6; }
.bx-f { margin-top: 15px; }
.bx-f > label, .bx-f > .lb { display: block; font-size: 12.5px; font-weight: 500; margin-bottom: 7px; color: var(--ink); }
.bx-fbox { border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 7px 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 40px; font-size: 12.5px; color: var(--mute); }
.bx-fbox.col { flex-direction: column; align-items: flex-start; }
.bx-fbox .sp { flex: 1; }
.bx-fbox .chg { height: 26px; padding: 0 9px; border: 1px solid var(--ink); border-radius: 6px; font-size: 12.5px; color: var(--ink); background: #fff; }
.bx-fbox .chg:hover { background: var(--soft); }
.bx-fbox input, .bx-fbox select, .bx-fbox textarea { border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink2); width: 100%; padding: 2px 2px; resize: vertical; }
.bx-fbox select { appearance: none; cursor: pointer; }
.bx-fbox:focus-within { border-color: #b9c0ca; box-shadow: 0 0 0 3px rgba(31, 102, 209, .08); }
.bx-sel { justify-content: space-between; padding: 0 10px; }
.bx-sel .i { width: 14px; height: 14px; color: var(--mute); }
.bx-doc { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px 0 4px; border: 1px solid var(--line); border-radius: 6px; background: #f8f9fa; font-size: 12.5px; color: var(--mute); }
.bx-doc .o { width: 19px; height: 19px; border-radius: 4px; background: #f6a161; color: #fff; display: grid; place-items: center; }
.bx-doc .o .i { width: 12px; height: 12px; }

/* Cursor + collaborator */
.bx-cursor { position: absolute; width: 20px; height: 20px; color: var(--ink); z-index: 6; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.bx-cursor svg { width: 20px; height: 20px; display: block; }
