/* Assembly-first revision. These overrides are deliberately scoped to the workbench. */
.workspace {position:relative;align-items:stretch;}
#onboarding-arrow {position:absolute;inset:0;width:100%;height:100%;z-index:5;pointer-events:none;overflow:visible;filter:drop-shadow(0 1px 3px #fff);}
#guide-path {animation:guide-travel 1.8s linear infinite;}
@keyframes guide-travel {to {stroke-dashoffset:-20;}}
.skill-card {position:relative;width:100%;font:inherit;text-align:left;color:var(--ink);touch-action:manipulation;}
.skill-copy,.skill-name,.skill-desc {display:block;min-width:0;}
.skill-toggle {pointer-events:none;flex-shrink:0;}
.skill-card.selected .skill-toggle {background:#e8e3f8;border-color:#c6bde9;color:#71609c;}
#get-recipe:disabled {opacity:.45;box-shadow:none;cursor:default;}
.skill-card.selected {border-color:#bab4e6;background:#f7f5ff;box-shadow:inset 3px 0 #a199d9;}
.skill-card:active:not(:disabled) {transform:scale(.985);}
.recommended-dot {position:absolute;left:3px;top:50%;width:3px;height:14px;border-radius:3px;background:#9a90cc;transform:translateY(-50%);}
.skill-card.dragging {opacity:.38;animation:none!important;}
.setup-empty .skill-card.recommended {animation:skill-invitation 5.5s ease-in-out infinite;animation-delay:var(--cue-delay,0s);transform-origin:center;}
@keyframes skill-invitation {0%,10%,30%,100%{transform:none;}13%{transform:translateX(2px) rotate(-.6deg);}17%{transform:translateX(-2px) rotate(.6deg);}21%{transform:translateX(1px) rotate(-.4deg);}25%{transform:translateX(-1px) rotate(.3deg);}}
.skill-card.find-skill {outline:3px solid #aaa0e1;outline-offset:3px;}
.engine-panel {display:flex;flex-direction:column;}
.engine-panel>.panel-heading {order:0;flex-shrink:0;}
.engine-panel>.task-input {order:1;flex-shrink:0;}
.engine-panel>.assembly {order:2;flex-shrink:0;margin:16px 18px 0;padding:13px 13px 12px;border:1px solid #e5e1f1;border-radius:9px;background:#fcfbff;}
.engine-panel>.flow-stage {order:3;flex:1;min-height:330px;height:auto;margin-top:6px;}
.assembly-label {font-size:9px;color:#605878;}
.assembly-label>span {display:flex;gap:8px;align-items:center;}
#assembly-progress {font:9px ui-monospace,monospace;color:#82749c;background:#eeebf6;padding:2px 5px;border-radius:4px;letter-spacing:0;}
.assembly-instruction {font-size:10px;line-height:1.6;color:#766b8b;margin:7px 0 9px;max-width:400px;}
.drop-zone {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:7px;border:0;background:none;padding:0;margin-top:0;min-height:78px;}
.drop-zone.drag-over,.drop-zone.drag-invitation {background:#eeebfb;outline:2px solid #b2a5e0;outline-offset:5px;border-radius:5px;}
.assembly-slot {position:relative;min-width:0;min-height:79px;padding:11px 8px 9px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:#fff;border:1px dashed #d5cede;border-radius:7px;transition:background-color 180ms,border-color 180ms,box-shadow 180ms;}
.assembly-slot.unfilled .slot-icon {opacity:.3;}
.assembly-slot.unfilled .slot-title {color:#82778f;}
.assembly-slot.unfilled .slot-caption {color:#83778f;}
.slot-number {position:absolute;left:7px;top:5px;color:#7a6c87;font:8px ui-monospace,monospace;}
.slot-icon {width:19px;height:19px;display:grid;place-items:center;}
.slot-icon img {width:17px;height:17px;opacity:.75;}
.slot-title {font-size:10px;font-weight:500;line-height:1.2;text-align:center;}
.slot-caption {font-size:8px;color:#7b7390;line-height:1.3;}
.slot-target {position:absolute;inset:0;background:none;border:0;border-radius:7px;}
.slot-target>span {position:absolute;top:4px;right:7px;font:13px system-ui;color:#b4a8c3;}
.slot-target:hover {background:#7666b00b;}
.assembly-slot.filled {background:var(--tint);border:1px solid var(--rim);box-shadow:0 2px 4px #35234d05;}
.assembly-slot.filled .slot-number {color:#867a98;}
.assembly-slot.filled .slot-caption {color:#6e6381;}
.assembly-slot [data-remove] {position:absolute;right:2px;top:2px;width:24px;height:24px;display:grid;place-items:center;border:0;background:none;color:#8d7ba5;font:14px system-ui;border-radius:4px;}
.assembly-slot [data-remove]:hover {background:#7666b014;color:#574270;}
.assembly-slot.just-added {animation:tile-arrives 430ms cubic-bezier(.2,.7,.2,1) both;}
@keyframes tile-arrives {0%{transform:translateY(-7px) scale(.97);box-shadow:0 0 0 5px #a398db22;}100%{transform:none;box-shadow:0 0 0 0 #a398db00;}}
.assembly-bottom {margin-top:10px;gap:10px;align-items:center;}
.assembly-bottom>span {font-size:9px;max-width:56%;}
.replay-button {font-size:9px;padding:7px 8px;min-height:31px;}
.replay-button:disabled {background:#faf9fc;color:#8a8194;border-color:#ece9f0;opacity:1;}
.flow-stage {background-size:17px 17px;}
.agent-core {top:50%;transform:translate(-50%,-52%);}
.agent-mark {position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:168px;height:142px;min-width:0;min-height:0;border:0;border-radius:50%;background:radial-gradient(ellipse at center,#f0f0fc 0%,#f5f5fc99 48%,#fff0 72%);box-shadow:none;backdrop-filter:none;overflow:visible;}
.agent-mark img {display:block;flex:none;width:148px;height:auto;max-width:100%;max-height:100%;margin:0;object-fit:contain;filter:drop-shadow(0 7px 8px #7376a32b);}
.agent-core h3 {margin-top:4px;font-size:21px;}
.core-sub {font-size:7px;letter-spacing:.08em;}
.agent-status {margin-top:9px;font-size:9px;padding:4px 7px;border:1px solid #e5eee8;background:#fafffc;}
.needs-skills .agent-status {color:#7f768b;border-color:#ece7f0;background:#fcfaff;}
.needs-skills .agent-status .status-dot {background:#a69bad;box-shadow:none;}
.flow-nodes,.flow-output-nodes {top:50%;transform:translateY(-50%);gap:36px;}
.flow-label {top:34px;font-size:7px;}
.flow-node {min-height:34px;}
.flow-output-nodes .flow-node {color:#8b8293;background:#fcfbfd;border-color:#e8e3ec;}
.flow-output-nodes .flow-node i {background:#c2b8cc;}
.flow-output-nodes .flow-node.active {color:#4d7e69;background:#f8fdf9;border-color:#b9d9c8;box-shadow:0 2px 8px #4594730a;}
.flow-output-nodes .flow-node.active i {background:#319273;}
.flow-caption {bottom:17px;font-size:9px;padding:0 14px;}
.results-panel {display:flex;flex-direction:column;}
.results-panel>.panel-heading {flex-shrink:0;}
.results-caption {font-size:10px;min-height:16px;}
.needs-skills .results-caption {color:#8c7b9d;}
.needs-skills .results-caption .status-dot {background:#b8a7c6;box-shadow:none;}
.artifact-list {flex-shrink:0;}
.artifact-placeholder {position:relative;display:flex;align-items:center;gap:11px;min-height:108px;padding:17px 13px 24px;border:1px dashed #e0dae8;border-radius:7px;background:linear-gradient(115deg,#fff,#fcfbfe);}
.placeholder-index {position:absolute;right:9px;top:7px;font:8px ui-monospace,monospace;color:#b3a9bf;}
.placeholder-icon {width:30px;height:35px;display:grid;place-items:center;flex-shrink:0;border:1px solid #ece6f2;border-radius:5px;background:#f8f5fb;}
.placeholder-icon img {width:16px;height:16px;opacity:.25;}
.artifact-placeholder>div {min-width:0;flex:1;}
.placeholder-label {font-size:11px;color:#7b6d83;display:block;margin-bottom:9px;}
.skeleton-line {display:block;width:91%;height:4px;border-radius:2px;background:#efebf3;margin-top:6px;}
.skeleton-line.short {width:61%;}
.placeholder-hint {position:absolute;left:55px;bottom:10px;font-size:8px;color:#806d8e;}
.artifact-placeholder.forming {border-color:#b7a7d1;background:#fcfaff;}
.artifact-placeholder.forming .skeleton-line {animation:line-forming 1.2s ease-in-out infinite;transform-origin:left;}
@keyframes line-forming {0%,100%{transform:scaleX(.5);opacity:.5;}50%{transform:scaleX(1);opacity:1;}}
.artifact-card {padding-bottom:28px;}
.artifact-card.revealed {animation:result-arrives 260ms ease-out both;}
@keyframes result-arrives {from{transform:translateY(7px);opacity:0;}to{transform:none;opacity:1;}}
.artifact-stream {position:absolute;bottom:6px;left:13px;right:13px;display:flex;align-items:center;gap:4px;height:10px;overflow:hidden;}
.artifact-stream>i {display:block;width:12px;height:2px;background:#9db9ad;opacity:.4;animation:output-packet 2.1s ease-in-out infinite;}
.artifact-stream>i:nth-child(2) {animation-delay:.15s;}
.artifact-stream>i:nth-child(3) {animation-delay:.3s;}
.artifact-stream>span {margin-left:4px;font:7px ui-monospace,monospace;color:#86948e;}
@keyframes output-packet {0%,100%{transform:translateX(-8px);opacity:0;}35%,65%{opacity:.75;}85%{transform:translateX(8px);opacity:0;}}
.output-terminal {margin:13px 12px 0;flex:0 0 188px;min-height:188px;background:#222330;color:#c7c6dc;border:1px solid #333444;border-radius:7px;box-shadow:0 3px 8px #17152d08;overflow:hidden;}
.terminal-top {height:31px;display:flex;align-items:center;gap:7px;border-bottom:1px solid #ffffff0d;background:#ffffff03;padding:0 9px;}
.terminal-lights {display:flex;gap:3px;flex-shrink:0;}
.terminal-lights>i {width:4px;height:4px;border-radius:50%;background:#727086;}
.terminal-lights>i:first-child {background:#a78997;}
.terminal-lights>i:nth-child(2) {background:#a59a7e;}
.terminal-lights>i:nth-child(3) {background:#7b9c91;}
#terminal-file {font:8px ui-monospace,monospace;color:#b7b4ce;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.terminal-replay {margin-left:auto;font:7px ui-monospace,monospace;letter-spacing:.05em;color:#9a91b8;border:1px solid #74678c55;border-radius:3px;padding:2px 4px;flex-shrink:0;}
.terminal-content {position:relative;height:129px;padding:10px 11px;overflow:hidden;}
.terminal-kind {font:7px/1.5 ui-monospace,monospace;letter-spacing:.06em;color:#b2a1cf;margin-bottom:7px;}
#terminal-body {font:11px/1.65 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;scrollbar-width:none;margin:0;height:calc(100% - 20px);color:#c0d7d0;}
#terminal-body::-webkit-scrollbar {display:none;}
.terminal-caret {position:absolute;bottom:11px;left:12px;width:5px;height:11px;background:#b3a7df;animation:terminal-cursor 1.1s step-end infinite;opacity:.7;pointer-events:none;}
.output-terminal[data-phase=waiting] #terminal-body {color:#9a91ad;}
.output-terminal[data-phase=waiting] .terminal-caret {display:none;}
@keyframes terminal-cursor {50%{opacity:0;}}
.terminal-bottom {height:26px;border-top:1px solid #ffffff0b;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 9px;color:#a29ab6;font:8px ui-monospace,monospace;}
.result-summary {font-size:8px;gap:5px;}
.recipe-side:disabled {opacity:.5;cursor:default;}
.event-waiting {display:block;font-size:8px;color:#8b7f9a;margin-top:4px;}
.paused #guide-path,.paused .skill-card,.paused .artifact-stream>i,.paused .terminal-caret,.paused .skeleton-line {animation-play-state:paused;}
@media(min-width:981px) and (max-width:1599px) {
  .artifact-card {display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:9px;padding:12px 12px 26px;}
  .artifact-top {grid-column:1;grid-row:1/4;display:block;margin:0;}
  .artifact-top .file-format,.artifact-top .artifact-arrow {display:none;}
  .artifact-card h3 {grid-column:2;font-size:11px;line-height:1.45;margin-bottom:5px;}
  .artifact-card p {grid-column:2;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;font-size:10px;}
  .artifact-foot {grid-column:2;margin-top:8px;padding-top:6px;font-size:8px;gap:5px;}
  .artifact-placeholder {min-height:98px;}
}
@media(min-width:1600px) {
  .engine-panel>.flow-stage {min-height:370px;}
  .agent-mark {width:178px;height:150px;}
  .agent-mark img {width:156px;height:auto;}
  .agent-core {top:50%;}
  .terminal-content {height:139px;}
  .output-terminal {min-height:198px;flex-basis:198px;}
}
@media(max-width:1200px) {
  .engine-panel>.assembly {margin:13px 12px 0;padding:11px 10px 10px;}
  .assembly-instruction {font-size:9px;}
  .agent-mark {width:110px;height:100px;}
  .agent-mark img {width:98px;height:auto;}
  .agent-core {top:50%;}
  .agent-core h3 {font-size:19px;}
  .flow-nodes,.flow-output-nodes {width:102px;gap:38px;}
  .slot-title {font-size:9px;}
  .slot-caption {font-size:7px;}
  .assembly-bottom>span {font-size:8px;max-width:51%;}
  .replay-button {font-size:8px;padding:7px 5px;}
  .output-terminal {margin-left:10px;margin-right:10px;}
  #terminal-file {font-size:7px;}
  .terminal-bottom {font-size:7px;}
}
@media(max-width:980px) {
  #onboarding-arrow {display:none!important;}
  .results-panel {grid-column:1/-1;}
  .output-terminal {margin:13px 12px 0;}
  #terminal-body {font-size:11px;}
  .terminal-top #terminal-file {font-size:9px;}
  .terminal-bottom {font-size:8px;}
  .flow-nodes,.flow-output-nodes {width:120px;}
  .agent-mark {width:136px;height:116px;}
  .agent-mark img {width:120px;height:auto;}
}
@media(max-width:640px) {
  .skills-panel {order:0;}
  .engine-panel {order:1;scroll-margin-top:12px;}
  .results-panel {order:2;}
  .skills-panel .panel-note {font-size:11px;margin-bottom:11px;max-width:none;}
  .skill-card {min-height:71px;}
  .skill-name {font-size:10px;}
  .skill-desc {font-size:8px;}
  .recommended-dot {left:1px;width:2px;height:12px;}
  .engine-panel>.assembly {margin:13px 12px 0;padding:12px 10px 10px;}
  .assembly-instruction {font-size:10px;line-height:1.6;}
  .drop-zone {gap:6px;}
  .assembly-slot {min-height:85px;padding:13px 5px 10px;}
  .slot-title {font-size:10px;}
  .slot-caption {font-size:8px;}
  .assembly-slot [data-remove] {width:28px;height:28px;top:0;right:0;}
  .assembly-bottom {gap:6px;align-items:flex-start;}
  .assembly-bottom>span {font-size:9px;line-height:1.6;max-width:52%;padding-top:4px;}
  .replay-button {font-size:8px;min-height:34px;}
  .engine-panel>.flow-stage {min-height:335px;flex:none;height:335px;}
  .flow-nodes,.flow-output-nodes {width:96px;gap:39px;}
  .agent-mark {width:96px;height:92px;}
  .agent-mark img {width:87px;height:auto;}
  .agent-core {top:50%;transform:translate(-50%,-52%);}
  .agent-core h3 {font-size:18px;margin-top:1px;}
  .agent-status {font-size:7px;margin-top:7px;}
  .flow-label {font-size:6px;top:29px;}
  .core-sub {font-size:6px;}
  .flow-caption {font-size:8px;bottom:17px;}
  .artifact-placeholder {min-height:108px;}
  .artifact-card {padding-bottom:29px;}
  .artifact-stream {left:13px;right:13px;}
  .artifact-list {gap:9px;}
  .output-terminal {margin:13px 12px 0;flex-basis:210px;min-height:210px;}
  .terminal-content {height:151px;}
  .terminal-top {padding:0 11px;}
  #terminal-body {font-size:11px;}
  .terminal-replay {font-size:7px;}
  .terminal-bottom {font-size:7px;}
  .result-summary {font-size:9px;}
}
@media(max-width:360px) {
  .flow-nodes,.flow-output-nodes {width:84px;gap:37px;}
  .agent-mark {width:84px;height:86px;}
  .agent-mark img {width:76px;height:auto;}
  .agent-core {top:50%;}
  .agent-core h3 {font-size:16px;}
  .agent-status {font-size:6px;}
  .assembly-label {font-size:8px;}
  .slot-title {font-size:9px;}
  .slot-caption {font-size:7px;}
  .replay-button {font-size:7px;}
}
@media(prefers-reduced-motion:reduce) {
  #guide-path,.setup-empty .skill-card.recommended,.assembly-slot.just-added,.artifact-card.revealed,.artifact-stream>i,.terminal-caret,.artifact-placeholder.forming .skeleton-line {animation:none!important;}
  .artifact-stream>i {opacity:.5;transform:none;}
}
