*{box-sizing:border-box} :root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#202435;font-size:16px;font-synthesis:none;--line:#e3e5ee;--muted:#70778b;--purple:#6c56df}
body{margin:0;background:#fff}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ad9cf4;outline-offset:2px}button{border:0;background:none}h1,h2,h3,p{margin:0}button,i,svg{flex-shrink:0}i{display:inline-flex;line-height:0}i svg{width:18px;height:18px}button{touch-action:manipulation}[hidden]{display:none!important}
.workspace{position:relative;flex:1;min-height:0;display:flex}.library{width:246px;flex-shrink:0;border-right:1px solid var(--line);display:flex;flex-direction:column;background:#fff;z-index:2}.lib-head{display:flex;align-items:center;gap:8px;padding:23px 18px 18px}.lib-head>i{color:#6a7183}h2{font-size:16px;letter-spacing:-.4px;font-weight:650}.search{display:flex;align-items:center;gap:7px;margin:0 16px 4px;border:1px solid var(--line);border-radius:7px;padding:8px 9px;background:#fcfcfd;color:#858b9c}.search input{border:0;outline:0;min-width:0;flex:1;background:transparent;font-size:13px}.search:focus-within{border-color:#9f8ded}.search i svg{width:15px;height:15px}kbd{font:11px monospace;border:1px solid var(--line);background:white;color:#8c92a2;padding:1px 4px;border-radius:3px}
#catalog{overflow-y:auto;padding:0 16px 16px;flex:1}.group{margin-top:19px}.group h3{color:#787e90;font-size:10.5px;letter-spacing:1.2px;text-transform:uppercase;font-weight:700;margin:0 0 8px 2px}.lib-item{display:flex;align-items:center;gap:10px;padding:9px;width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;margin-top:6px;text-align:left;font-size:13px;font-weight:550;min-height:44px}.lib-item:hover{background:#faf9ff;border-color:#bcb0ea}.lib-item>.grip{margin-left:auto;color:#b4b8c6}.grip svg{width:12px;height:16px}.badge-icon{width:29px;height:29px;border-radius:7px;color:var(--tone);background:var(--tint);display:inline-flex;align-items:center;justify-content:center}.badge-icon svg{width:17px;height:17px}.lib-tip{display:flex;align-items:center;gap:7px;font-size:12px;color:#7b8192;padding:14px 16px;border-top:1px solid var(--line)}.lib-tip svg{width:15px;height:15px}
.editor{display:flex;flex:1;min-width:0;flex-direction:column}.canvas-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 20px;height:54px;border-bottom:1px solid var(--line);flex-shrink:0}.canvas-heading,.tabs,.tabs button{display:flex;align-items:center}.canvas-heading{gap:9px}.canvas-heading h2{font-size:14px}.tabs{background:#f2f3f7;border:1px solid #e6e7ed;border-radius:7px;padding:2px}.tabs button{padding:5px 9px;gap:6px;color:#707789;font-size:12px;border:1px solid transparent;border-radius:5px}.tabs button.chosen{background:white;color:#403758;box-shadow:0 1px 3px #24203a12;border-color:#e1e2e8}.tabs i svg{width:14px;height:14px}
#canvas{flex:1;position:relative;overflow:hidden;isolation:isolate;touch-action:none;background-color:#f7f8fc;background-image:radial-gradient(#cdd1df .85px,transparent .95px);background-size:17px 17px}#world{position:absolute;transform-origin:0 0;inset:0 auto auto 0;width:0;height:0}#edges{position:absolute;top:0;left:0;width:1px;height:1px;overflow:visible;pointer-events:none}.node{position:absolute;background:#fff;border:1.4px solid var(--rim);border-radius:11px;width:230px;height:82px;box-shadow:0 3px 8px #222d4810,0 1px 2px #222d4809;text-align:left;padding:0;color:#212638;cursor:grab;touch-action:none}.node:hover,.node.selected{box-shadow:0 0 0 3px var(--tint),0 4px 10px #222d4815}.node-inner{display:flex;align-items:center;gap:10px;padding:12px 13px 8px}.node .badge-icon{width:33px;height:33px;border-radius:8px}.node .badge-icon svg{width:20px;height:20px}.node-category{display:block;text-transform:uppercase;letter-spacing:.85px;font-size:9px;line-height:13px;font-weight:720;color:var(--tone)}.node-title{display:block;font-size:15px;font-weight:650;letter-spacing:-.33px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.node-name{min-width:0;flex:1}.dots{color:#999eae;font-size:17px;line-height:10px;align-self:flex-start}.node-meta{margin:0 13px;border-top:1px solid #edeef4;padding-top:5px;font:11px/15px Consolas,"Courier New",monospace;color:#757c8e;display:flex;align-items:center;gap:6px;white-space:nowrap;overflow:hidden}.node-meta i svg{width:12px;height:12px}.port{padding:0;position:absolute;width:9px;height:9px;left:calc(50% - 4.5px);border-radius:50%;border:2px solid var(--port);background:#fff;z-index:1}.port.in{top:-5px}.port.out{bottom:-5px}.port::before{content:"";position:absolute;inset:-6px}.port.armed{box-shadow:0 0 0 5px #9f8bf955}.canvas-tools,.canvas-tools button,#minimap{display:flex;align-items:center;justify-content:center}.canvas-tools{position:absolute;left:18px;bottom:16px;padding:4px;gap:1px;background:#fff;border:1px solid #dfe2ea;border-radius:8px;box-shadow:0 2px 7px #2630470d;color:#596075}.canvas-tools button,.iconbtn{padding:0;width:29px;height:29px;border-radius:5px;display:inline-grid;place-items:center}.canvas-tools button:hover,.canvas-tools .tool-on{color:#7159d6;background:#efecfd}.canvas-tools i svg{width:16px;height:16px}.canvas-tools span{font-size:11px;min-width:33px;text-align:center;font-variant-numeric:tabular-nums}.canvas-tools b{height:15px;width:1px;background:var(--line);margin:0 3px}#minimap{position:absolute;right:18px;bottom:16px;width:128px;height:76px;border:1px solid #daddea;border-radius:8px;background:#fffffff5;padding:5px;box-shadow:0 2px 7px #2630470a}#minimap svg{width:100%;height:100%;background:#f7f6fc;border:1px solid #dfdaf0;border-radius:3px}footer{height:29px;display:flex;align-items:center;justify-content:space-between;padding:0 17px;border-top:1px solid var(--line);color:#7b8293;font-size:11px}footer span{display:flex;align-items:center;gap:6px}footer i{color:#81889c}footer i svg{width:12px;height:12px}
#inspector{position:absolute;right:12px;top:62px;width:278px;max-height:calc(100% - 74px);overflow:auto;padding:17px;background:#fff;border:1px solid #dcdeeb;border-radius:11px;box-shadow:0 8px 35px #2428461e;z-index:3}.panel-title,.modal-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.panel-title strong{font-size:14px}.panel-type{display:flex;align-items:center;gap:9px;font-size:14px;margin:14px 0 18px}.field{display:grid;gap:6px;margin:12px 0;font-size:12px;color:#616878}.field input,.field select{padding:8px 9px;border:1px solid #d8dbe6;border-radius:6px;background:#fafbfc;color:#272d40;min-width:0;width:100%;font-size:14px}.danger{color:#ba4754;margin-top:12px;font-size:13px;padding:5px 0;display:flex;align-items:center;gap:6px}.danger i svg{width:15px}.empty{margin:20px 0;color:#787e8d;font-size:14px}dialog{border:1px solid var(--line);padding:21px;border-radius:13px;box-shadow:0 20px 70px #1b1d382d;max-width:min(430px,92vw);width:430px;color:inherit}dialog::backdrop{background:#20233752}.modal-head{margin-bottom:16px}.modal-head h2{font-size:20px}.modal-copy{font-size:14px;line-height:1.6;color:#676d7f}#listview{flex:1;overflow:auto;padding:16px;background:#f8f9fc}.list-row{display:flex;align-items:center;gap:12px;padding:12px;background:white;border:1px solid var(--line);border-radius:8px;margin:8px 0;width:100%;text-align:left}.list-row strong{font-size:14px}.list-row small{display:block;color:#72798b;font-size:12px;margin-top:3px}.list-row>.last{margin-left:auto;color:#9298a7}.steps{list-style:none;padding:0;margin:15px 0 0}.history-row{border-bottom:1px solid var(--line);padding:10px 0;font-size:14px}#toast{position:fixed;z-index:7;bottom:41px;left:50%;transform:translate(-50%,10px);opacity:0;pointer-events:none;background:#28283d;color:white;font-size:13px;padding:10px 16px;border-radius:8px;transition:.18s;max-width:90vw}#toast.show{opacity:1;transform:translate(-50%,0)}.mobile-lib,.mobile-close{display:none}
.connection-title{font-size:12px;color:#616878;margin:17px 0 5px}.connection{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ececf4;padding:3px 0;gap:8px}.connection small{color:#697086;font-size:12px}.connection button{width:24px;height:24px;padding:4px;border-radius:4px;color:#8d92a0}.connection button:hover{color:#bd5264;background:#fff1f4}.connection button svg{width:14px;height:14px}.danger>svg{width:15px;height:15px}

main { height: 100dvh; display: flex; flex-direction: column; }
.top {
  height: 50px;
  padding: 0 clamp(18px, 2.15vw, 38px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand { font-size: clamp(21px, 1.5vw, 26px); font-weight: 750; letter-spacing: -1px; }
.top-right { display: flex; align-items: center; margin-left: auto; gap: 13px; }
.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #efe5ff;
  border: 1px solid #e5d7fb;
  color: #793cc4;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.library { width: clamp(264px, 17.3vw, 308px); }
.lib-head { padding: 26px 20px 20px; gap: 11px; }
.lib-head h2 { font-size: 18px; }
.search { margin: 0 20px 4px; padding: 11px; }
.search input, .lib-item { font-size: 14px; }
#catalog { padding: 0 clamp(12px, 1vw, 18px) 16px; scrollbar-width: thin; scrollbar-color: #d9d9e7 transparent; }
.group { margin-top: 21px; }
.group h3 { font-size: 11px; }
.lib-item { min-height: 48px; gap: 8px; }
.lib-item .badge-icon { flex-shrink: 0; width: 31px; height: 31px; }
.lib-item:is([data-add="sca"], [data-add="aiScan"]) .lib-label { white-space: nowrap; }
.lib-item[data-add="aiScan"] { gap: 6px; padding-inline: 7px; font-size: 13px; }
.lib-tip { padding: 0 16px; }

.canvas-head { height: clamp(54px, 4.3vw, 68px); }
.canvas-heading { min-width: 0; gap: 10px; }
.canvas-heading h1 { font-size: 16px; font-weight: 680; }
.breadcrumb { display: flex; align-items: center; gap: 8px; min-width: 0; color: #69728a; font-size: 13px; white-space: nowrap; }
.breadcrumb svg { width: 13px; height: 13px; }
.canvas-actions { display: flex; align-items: center; gap: 8px; }
#scenario-menu { position: relative; z-index: 4; }
#scenario-menu summary { cursor: pointer; list-style: none; color: #687087; }
#scenario-menu summary::-webkit-details-marker { display: none; }
#scenario-menu[open] summary { background: #efecfd; color: #6c56df; }
.menu-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  gap: 2px;
  min-width: 205px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 20px #24284620;
}
.menu-panel :is(button, a) { display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 5px; text-align: left; font-size: 13px; color: inherit; text-decoration: none; }
.menu-panel :is(button, a):hover { background: #f1edfd; }
.menu-panel svg { width: 16px; height: 16px; }

#canvas { background-color: #f5f6fc; background-image: radial-gradient(#cacedf .9px, transparent 1px); background-size: 21px 21px; }
#canvas, #canvas * { user-select: none; -webkit-user-select: none; }
.node { transition: border-color .14s, box-shadow .14s, background-color .14s; }
.node:hover {
  z-index: 2;
  border-color: var(--tone);
  background-color: color-mix(in srgb, var(--tint) 45%, white);
  box-shadow: 0 0 0 4px var(--tint), 0 6px 14px #26304724;
}
.node.selected, .node.in-selection {
  z-index: 1;
  border-color: #8a6be7;
  background-color: #fdfbff;
  box-shadow: 0 0 0 3px #8768ea36, 0 5px 12px #47308b1c;
}
.node-open { display: block; width: 100%; height: 100%; padding: 0; text-align: left; cursor: inherit; border-radius: inherit; }
.node .port { cursor: crosshair; transition: box-shadow .14s, background-color .14s; }
.port:hover, .port.drop-target {
  background: #8a6be7;
  border-color: #7754de;
  box-shadow: 0 0 0 5px #9f8bf948;
}
.wire-line { fill: none; stroke: #a6a9c2; stroke-width: 1.8; transition: stroke .14s, stroke-width .14s; }
.wire-hit { fill: none; stroke: transparent; stroke-width: 14px; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.wire:hover .wire-line, .wire.context-active .wire-line { stroke: #815eea; stroke-width: 3.2; }
.wire.incompatible .wire-line { stroke: #be6371; stroke-dasharray: 4 4; }
#wire-preview { fill: none; stroke: #8664ed; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
#wire-preview.blocked { stroke: #c9576a; stroke-dasharray: 4 3; }
.port.blocked-target { background: #fff1f3; border-color: #c9576a; box-shadow: 0 0 0 5px #f4c4cc85; cursor: not-allowed; }
#selection-box { pointer-events: none; position: absolute; z-index: 2; border: 1px solid #8a6be7; background: #8a6be71a; border-radius: 4px; }
#canvas[data-gesture="wire"], #canvas[data-gesture="box"] { cursor: crosshair; }
#canvas[data-gesture="wire"] .node { cursor: crosshair; }
#canvas[data-gesture="move"] .node, #canvas[data-gesture="pan"] { cursor: grabbing; }
.canvas-tools, #minimap { z-index: 3; }
.node .dots { position: absolute; top: 12px; right: 13px; }
.node-title { padding-right: 2px; }
.node[data-type="aiScan"] .node-title { font-size: 14px; }
#minimap { width: 156px; height: 91px; cursor: crosshair; }
#minimap svg { overflow: hidden; }
#minimap-viewport { fill: #8664ed0c; stroke: #9c83ed; stroke-width: 1.2; }
#canvas:focus-visible { outline: 2px solid #aa95f1; outline-offset: -2px; }
#context-menu {
  position: fixed;
  z-index: 8;
  width: min(248px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 5px;
  border: 1px solid #e0dceb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px #2d225129, 0 2px 6px #2d225110;
  user-select: none;
}
.context-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #eeedf4;
}
.context-label { min-width: 0; }
.context-label strong, .context-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-label strong { font-size: 13px; }
.context-label small { margin-top: 3px; font-size: 12px; color: #6f6686; }
.context-glyph {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--tint, #f0eafd);
  color: var(--tone, #7858d9);
}
.context-glyph svg { width: 17px; height: 17px; }
#context-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 37px;
  padding: 6px 9px;
  border-radius: 7px;
  text-align: left;
  font-size: 13px;
}
#context-menu button > i { color: #6f6686; }
#context-menu button > i svg { width: 16px; height: 16px; }
#context-menu button:hover, #context-menu button:focus-visible { outline: 0; background: #f2edfd; color: #5433a0; }
#context-menu .danger-item, #context-menu .danger-item > i { color: #b3344c; }
#context-menu .danger-item:hover, #context-menu .danger-item:focus-visible { background: #fff0f3; }
#context-menu kbd { margin-left: auto; white-space: nowrap; }
#context-menu hr { border: 0; border-top: 1px solid #eeedf4; margin: 4px; }
.context-picker { max-height: min(318px, 60dvh); overflow: auto; scrollbar-width: thin; }
.context-picker .badge-icon { width: 25px; height: 25px; }
.context-picker .badge-icon svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: no-preference) {
  #context-menu:not([hidden]) { animation: context-in .12s ease-out; }
  @keyframes context-in { from { opacity: 0; transform: translateY(3px); } }
}
.workspace-bar { height: 31px; flex: 0 0 31px; font-size: 11px; line-height: 1.2; }
.workspace-bar i svg { width: 12px; height: 12px; }
#scenario-execution { color: var(--dark-accent,#6645b0); text-align: center; }
#scenario-execution:empty { display: none; }
footer .status { border-left: 1px solid var(--line); margin-left: 3px; padding-left: 9px; }
#inspector { top: clamp(62px, 5vw, 77px); max-height: calc(100% - 89px); width: min(306px, calc(100% - 24px)); }
.field textarea { padding: 8px 9px; border: 1px solid #d8dbe6; border-radius: 6px; background: #fafbfc; color: #272d40; width: 100%; font-size: 14px; resize: vertical; }
.panel-ports { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-ports span { padding: 4px 7px; border: 1px solid #e2e5ee; border-radius: 5px; background: #f7f8fc; font-size: 11px; color: #697086; }
.panel-ports strong { margin-left: 3px; color: #374158; font-weight: 650; }
.panel-note { margin-top: 9px; font-size: 12px; line-height: 1.5; color: #697086; }
.scan-checks { display: grid; gap: 9px; min-width: 0; margin: 14px 0; padding: 0; border: 0; }
.scan-checks legend { margin-bottom: 7px; padding: 0; font-size: 12px; font-weight: 650; }
.check-field { display: flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.check-field input { width: 15px; height: 15px; flex: 0 0 auto; margin: 0; accent-color: #7557d6; }
dialog { max-height: calc(100dvh - 30px); }
#run-results { display: grid; gap: 7px; }
.run-warning { border-radius: 7px; background: #fff5e1; color: #835414; padding: 9px 11px; font-size: 13px; }
.run-step { border: 1px solid #e3e5ee; border-radius: 9px; overflow: hidden; }
.run-step summary { display: flex; align-items: center; gap: 9px; padding: 9px 11px; cursor: pointer; list-style: none; }
.run-step summary::-webkit-details-marker { display: none; }
.run-step summary:hover, .run-step[open] summary { background: #f8f8fd; }
.run-step summary > i { color: #8588a0; }
.run-step summary > i svg { width: 14px; height: 14px; }
.run-step[open] summary > i { transform: rotate(90deg); }
.run-step-title { flex: 1; min-width: 0; }
.run-step-title strong, .run-step-title small { display: block; }
.run-step-title strong { font-size: 14px; }
.run-step-title small { color: #687084; margin-top: 2px; font-size: 12px; }
.run-status, .severity-label { border-radius: 5px; padding: 4px 6px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.run-status[data-state="done"] { background: #e4f5ee; color: #1a785b; }
.run-status[data-state="halted"] { background: #fff0d7; color: #875311; }
.run-status[data-state="skipped"] { background: #eff0f6; color: #656a7b; }
.run-status[data-state="error"] { background: #fde9ee; color: #992b4d; }
.run-step-body { border-top: 1px solid #edeef5; padding: 10px 11px; font-size: 13px; color: #62697b; line-height: 1.45; }
.run-step-body ul { list-style: none; display: grid; gap: 5px; padding: 0; margin: 9px 0 0; }
.run-finding, .run-file { display: flex; align-items: flex-start; gap: 8px; border-radius: 6px; padding: 6px 8px; background: #f7f8fc; }
.run-finding strong, .run-finding code, .run-finding small { display: block; }
.run-finding strong { color: #30364a; }
.run-finding small { font-size: 12px; margin-top: 4px; }
.run-finding code, .run-file code { font-size: 12px; overflow-wrap: anywhere; }
.severity-label[data-severity="Critical"] { color: #a5264a; background: #fde4ed; }
.severity-label[data-severity="High"] { color: #ad4a22; background: #ffe9db; }
.severity-label[data-severity="Medium"] { color: #815b20; background: #fbefd2; }
.severity-label[data-severity="Low"] { color: #3f6e9f; background: #e8f0fd; }

@media (min-width: 1500px) {
  .lib-head { padding-top: 30px; padding-bottom: 23px; }
  .lib-item { min-height: 53px; }
  .lib-item .badge-icon { width: 34px; height: 34px; }
  .group { margin-top: 24px; }
}
@media (max-width: 1000px) {
  #minimap { width: 112px; height: 66px; }
}
@media (max-width: 670px) {
  .library { display: none; }
  .library.open { display: flex; position: absolute; inset: 0 auto 0 0; width: min(290px, 90vw); z-index: 5; box-shadow: 8px 0 28px #20253a20; }
  .mobile-lib, .mobile-close { display: inline-grid; }
  .mobile-close { margin-left: auto; }
  .studio, .top-divider { display: none; }
  .top-right { gap: 9px; }
  .space { font-size: 12px; }
  .canvas-head { padding: 0 8px; gap: 5px; }
  .canvas-heading { gap: 5px; }
  .canvas-heading h1 { font-size: 14px; }
  .canvas-actions { gap: 4px; }
  .tabs button { padding: 5px 6px; }
}
@media (max-width: 410px) {
  #minimap { width: 80px; height: 50px; right: 8px; bottom: 8px; }
  .canvas-tools { left: 8px; bottom: 8px; }
}

.brand { color: inherit; text-decoration: none; }
.breadcrumb a { color: #6f54c9; text-decoration: none; font-weight: 600; }
.breadcrumb #editor-scenario-name { overflow: hidden; text-overflow: ellipsis; }
.breadcrumb a:hover { text-decoration: underline; }

.app-shell { display: flex; flex: 1; min-height: 0; }
.app-shell > :is(.workspace, .site-page) { min-width: 0; flex: 1; }
.site-page { overflow: auto; background: #f7f8fc; }
.page-content { max-width: 1170px; margin: 0 auto; padding: clamp(16px, 4.2vw, 56px) clamp(16px, 4vw, 52px); }
#scenarios { overflow: hidden; }
#scenarios > .page-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding-block: clamp(12px, 3vh, 28px);
}
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  flex: 0 0 auto;
  gap: 24px;
  overflow: hidden;
  padding: clamp(16px, 3.8vh, 32px) clamp(20px, 4vw, 45px);
  border: 1px solid #3b3260;
  border-radius: 19px;
  background: radial-gradient(ellipse at 105% 0%, #5a427e 0%, #2b254c 51%, #211d37 100%);
  color: white;
}
.home-hero h1 { font-size: clamp(25px, 4.1vw, 46px); font-weight: 730; line-height: 1.05; letter-spacing: -.045em; overflow-wrap: anywhere; }
.home-hero p { max-width: 44ch; margin-top: 9px; color: #e4def0; font-size: 14px; line-height: 1.6; }
.site-primary { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 13px; border-radius: 8px; background: #fbf8ff; color: #49338a; font-weight: 650; font-size: 13px; text-decoration: none; }
.site-primary:hover { background: #eae0ff; }
.site-primary svg { width: 16px; height: 16px; }
.home-flow {
  position: relative;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #cdb5ff36;
  border-radius: 15px;
  background: radial-gradient(#cbb6f538 .8px, transparent 1px) center / 14px 14px, linear-gradient(115deg, #1a1634bc, #302344cc);
}
#promo-pipeline { display: block; width: 100%; overflow: visible; }
.flow-node text { fill: #f2edf9; font-size: 12px; font-weight: 550; }
.flow-track { stroke: #74668b; stroke-width: 1.6; stroke-dasharray: 1; }
.flow-ink { stroke: #b6a8d9; stroke-width: 1.6; stroke-dasharray: 1; }
.flow-signal { opacity: 0; stroke: #e5fff7; stroke-width: 3.3; stroke-linecap: round; stroke-dasharray: .045 1.1; filter: drop-shadow(0 0 3px #91f5d8); }
.flow-tile { fill: color-mix(in srgb, var(--accent) 12%, #262037); stroke: color-mix(in srgb, var(--accent) 50%, #30273e); }
.flow-progress { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1; opacity: 0; }
.flow-icon { fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.flow-check { transform-box: fill-box; transform-origin: center; }
.flow-check circle { fill: #a1efd4; stroke: #282039; stroke-width: 1.8; }
.flow-check path { fill: none; stroke: #1d5145; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.flow-replay { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 7px; color: #cec3e1; }
.flow-replay:hover, .flow-replay:focus-visible { background: #ddcfff20; color: white; }
.flow-replay svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .flow-node { animation: flow-enter .36s ease-out var(--enter) both; }
  .flow-progress { animation: flow-work var(--work) linear var(--start) both; }
  .flow-check { animation: flow-complete .25s ease-out var(--done) both; }
  .flow-track { animation: flow-draw .36s ease-out calc(var(--enter) + .36s) both; }
  .flow-ink { animation: flow-draw var(--travel) ease-in-out var(--depart) both; }
  .flow-signal { animation: flow-travel var(--travel) ease-in-out var(--depart) both; }
}
@keyframes flow-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes flow-work {
  0% { opacity: 0; stroke-dashoffset: 1; }
  8% { opacity: 1; }
  90% { opacity: 1; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}
@keyframes flow-complete {
  from { opacity: 0; transform: scale(.45); }
  70% { opacity: 1; transform: scale(1.14); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes flow-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes flow-travel {
  0% { opacity: 0; stroke-dashoffset: .045; }
  10%, 90% { opacity: 1; }
  100% { opacity: 0; stroke-dashoffset: -1; }
}
@media (prefers-reduced-motion: reduce) { .flow-replay { display: none; } }
.scenario-icon { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; border-radius: 8px; color: #7251cb; background: #efe8fb; }
.scenario-icon svg { width: 17px; height: 17px; }
.severity-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.site-link { color: #6745bb; font-size: 13px; font-weight: 650; }
.scenarios-heading { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; margin: 14px 0 8px; }
.scenarios-heading h2 { font-size: 18px; }
#scenario-total { padding: 3px 6px; border-radius: 5px; background: #efeaf8; color: #66578c; font-size: 12px; }
.scenario-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid #e3e3ef;
  border-radius: 13px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 7px #25204708;
}
.scenario-card:hover { border-color: #bca5ef; }
.scenario-card:focus-visible { outline: 2px solid #a18be3; outline-offset: 1px; }
.scenario-card > i { color: #8a72c5; }
.scenario-card > i svg { width: 15px; height: 15px; }
.scenario-card h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 15px; line-height: 19px; }
.scenario-grid {
  display: grid;
  gap: 14px;
  min-height: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  align-content: start;
  overflow: auto;
  padding: 3px;
  scrollbar-width: thin;
  scrollbar-color: #a498c1 transparent;
}
.integration-configure { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 9px; border: 1px solid #e5dcf5; border-radius: 7px; background: #fbf8ff; color: #5e419c; font-size: 12px; font-weight: 650; }
.integration-configure:hover { background: #f1eafa; border-color: #cbb8e8; }
.integration-configure svg { width: 14px; height: 14px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
@media (max-width: 780px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .home-flow { max-width: 420px; justify-self: center; }
}
@media (max-width: 680px) {
  .scenario-grid { grid-template-columns: repeat(auto-fill, minmax(min(186px, 100%), 1fr)); }
}
@media (max-width: 440px) {
  .home-flow { width: calc(100% + 18px); padding-inline: 3px; }
  .flow-node text { font-size: 15px; }
}
@media (max-height: 375px), (max-height: 530px) and (max-width: 780px) {
  #scenarios { overflow: auto; }
  #scenarios > .page-content { height: auto; }
  .scenario-grid { overflow: visible; }
}

.field select {
  appearance: none;
  min-height: 38px;
  padding: 8px 34px 8px 10px;
  border-color: #dddfea;
  border-radius: 9px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%237553cf' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
  cursor: pointer;
}
.field select:hover { border-color: #b6a4ec; }
.field select:disabled { opacity: .55; cursor: default; }
@supports (appearance: base-select) {
  .field select, .field select::picker(select) { appearance: base-select; }
  .field select { align-items: center; gap: 8px; padding: 8px 10px; background: white; }
  .field select::picker-icon {
    content: "";
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    align-self: center;
    margin: 0 0 0 auto;
    color: #7553cf;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .field select:open::picker-icon { transform: rotate(180deg); }
  .field select::picker(select) {
    position-area: block-end span-inline-end;
    position-try-fallbacks: none;
    max-block-size: min(220px, calc(100% - 10px));
    overflow: auto;
    margin-top: 5px;
    padding: 4px;
    border: 1px solid #ddd5ef;
    border-radius: 10px;
    background: #fff;
    color: #272d40;
    box-shadow: 0 8px 24px #32235b26;
  }
  .field option { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 9px; border-radius: 6px; font-size: 13px; }
  .field option:hover, .field option:focus-visible { background: #f3effd; outline: 0; }
  .field option:checked { color: #6346b7; background: #eee8fb; }
  .field option::checkmark { content: "✓"; order: 1; margin-left: auto; color: #7353ca; }
}

.editor-side-panel { flex: 1; min-height: 0; overflow: auto; padding: clamp(11px, 2vw, 25px); background: #f7f8fc; }
.run-content { max-width: 740px; margin: 0 auto; display: grid; gap: 16px; }
#run-form { padding: clamp(12px, 2vw, 19px); border: 1px solid #e2e3ee; border-radius: 12px; background: #fff; }
.run-form-head, .run-result-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
.run-form-head button { padding: 5px 8px; border-radius: 5px; color: #6546b8; font-size: 12px; }
.run-form-head button:hover { background: #f1ecfc; }
#run-form .modal-copy { margin: 5px 0 12px; font-size: 13px; }
.editor-body { display: flex; flex: 1; min-height: 0; min-width: 0; }
#editor-workspace { --editor-side-width: clamp(280px, 25vw, 350px); }
.editor-body .editor-side-panel { flex: 0 0 var(--editor-side-width); padding: 14px; border-left: 1px solid var(--line); }
.editor-body #run-form { padding: 13px; }
.editor-body .run-content { gap: 10px; }
#demo-status { font-size: 13px; font-weight: 600; }
#demo-status:empty, #run-results:empty { display: none; }
.demo-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; color: inherit; font-size: 13px; font-weight: 600; }
.demo-toggle i svg { width: 15px; height: 15px; }
.demo-toggle[aria-expanded="true"] { background: #7557d6; border-color: #7557d6; color: white; }
.scenario-label { min-width: 0; }
.scenario-label small { display: block; margin-top: 3px; color: #75688a; font-size: 11px; }
.scenario-settings-actions { justify-content: space-between; align-items: center; }
.scenario-settings-actions .danger { margin: 0; }
.scenario-access { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.scenario-access h3 { margin-bottom: 7px; font-size: 15px; }
.scenario-access .modal-copy + button { margin-top: 10px; }
.scenario-access .field { margin-block: 9px; }
.scenario-link-actions { display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; }
.scenario-link-actions .danger { margin: 0; }
.read-only .port { pointer-events: none; }
.read-only .node, .read-only .node-open { cursor: default; }
.scenario-card { position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.scenario-target { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.scenario-target::after { content: ''; position: absolute; inset: 0; border-radius: 13px; }
.scenario-target:focus-visible::after { outline: 2px solid #997de9; }
.scenario-spinner {
  flex: 0 0 auto;
  margin-inline: auto;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb,currentColor 24%,transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  color: var(--dark-accent,#6645b0);
}
@media (prefers-reduced-motion: no-preference) {
  .scenario-spinner { animation: scenario-spin .85s linear infinite; }
}
@keyframes scenario-spin { to { transform: rotate(360deg); } }
.card-settings { position: relative; color: #8875ad; }
.card-settings:hover, .card-settings:focus-visible { background: #ac8de926; }
.node[data-inactive="true"] { border-style: dashed; filter: saturate(.25); opacity: .72; }
.node[data-inactive="true"]:hover, .node[data-inactive="true"].selected { opacity: 1; }
.node[data-split="true"] .out[data-branch="main"] { left: calc(25% - 4.5px); }
.node[data-split="true"] .out[data-branch="below"] { left: calc(75% - 4.5px); }
.branch-labels { position: absolute; inset: 100% 0 auto; display: flex; pointer-events: none; }
.branch-labels b { width: 50%; margin-top: 6px; text-align: center; font: 600 10px/1.1 inherit; font-size: 10px; color: var(--tone); }
.node:is([data-run="running"],[data-run="finishing"]) { border-color: var(--run-progress,#9472eb); box-shadow: 0 0 0 3px color-mix(in srgb,var(--run-progress,#9472eb) 23%,transparent); }
.execution-progress { position: absolute; bottom: -9px; inset-inline: 12px; height: 3px; border-radius: 3px; background: color-mix(in srgb,var(--run-progress,#9472eb) 20%,transparent); overflow: hidden; pointer-events: none; }
.execution-progress > span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--run-progress,#9472eb); transform-origin: left center; }
.node[data-run="running"] .execution-progress > span { transform: scaleX(.12); }
.read-only .execution-progress { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .node[data-run="running"] .execution-progress[data-pace="quick"] > span { animation: run-quick .5s ease-out var(--run-elapsed,0ms) both; }
  .node[data-run="running"] .execution-progress[data-pace="slow"] > span { animation: run-progress 40s linear var(--run-elapsed,0ms) both; }
  .node[data-run="finishing"] .execution-progress > span { transition: transform .14s ease-out; }
  .execution-mark { animation: run-mark .16s ease-out both; }
}
.execution-mark { position: absolute; top: -8px; right: -7px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--dark-bg,#fff); color: var(--run-success,#167346); border: 1px solid currentColor; }
.execution-mark svg { width: 14px; height: 14px; }
.node[data-run="halted"] .execution-mark { color: var(--run-error,#b42335); }
[data-theme="dark"] #editor-workspace { --run-success:#7adea6; --run-error:#ffa2ad; --run-progress:#58a6ff; }
@keyframes run-mark { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
@keyframes run-quick { from { transform: scaleX(0); } to { transform: scaleX(.94); } }
@keyframes run-progress {
  0% { transform: scaleX(0); }
  10% { transform: scaleX(.14); }
  35% { transform: scaleX(.47); }
  65% { transform: scaleX(.76); }
  85% { transform: scaleX(.89); }
  100% { transform: scaleX(.94); }
}
@media (min-width: 741px) {
  .editor-panel-open #inspector { right: calc(var(--editor-side-width) + 12px); }
}
@media (max-width: 740px) {
  .editor-body { flex-direction: column; }
  .editor-body .editor-side-panel { max-height: 40%; flex: 0 1 auto; border-left: 0; border-top: 1px solid var(--line); padding: 8px; }
  .editor-panel-open #inspector { max-height: min(52vh, 55%); }
  .scenarios-heading { flex-wrap: wrap; }
}
#run-profile { display: grid; gap: 7px; margin: 13px 0; }
#run-profile:empty { display: none; }
.demo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(74px, .85fr) 24px;
  align-items: center;
  gap: 4px;
}
.demo-columns { font-size: 11px; color: #6f648b; }
.demo-row :is(input, select) {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 11px;
  text-overflow: ellipsis;
}
.demo-row select { cursor: pointer; }
.demo-row .iconbtn { width: 24px; height: 28px; color: #806f9b; }
.demo-row .iconbtn svg { width: 15px; height: 15px; }
.demo-row .iconbtn:hover { background: #ea71731e; color: #ac3950; }
#demo-add { justify-self: start; }
.badge-icon svg { display: block; flex: 0 0 auto; }.run-start { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; padding: 7px 12px; border-radius: 8px; background: #7557d6; color: #fff; font-size: 13px; font-weight: 650; }
.run-start:hover { background: #6447c3; }
.run-start:disabled { opacity: .5; cursor: default; }
.run-start svg { width: 14px; height: 14px; }
.run-result-head { padding: 2px 0 6px; }
.run-result-head > div { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 520px) {
  .breadcrumb > :is(a, i) { display: none; }
}
@media (max-width: 870px) {
  .canvas-head { padding-inline: 10px; gap: 3px; }
  .canvas-actions { gap: 4px; }
}
