:root {
  --ink: #0b0f15;
  --surface: #10151d;
  --surface-raised: #151c26;
  --surface-hover: #1a2330;
  --surface-soft: #121923;
  --line: #273241;
  --line-soft: #1d2733;
  --text: #f1f5f9;
  --muted: #8693a5;
  --muted-2: #5f6c7d;
  --mint: #9ef5c2;
  --mint-dark: #1d5d42;
  --violet: #a9b7ff;
  --amber: #f4cc8b;
  --coral: #ff9c97;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--text);
  background: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--ink); color: var(--text); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.app-shell { min-height: 100vh; overflow: hidden; background: radial-gradient(circle at 72% -20%, rgba(76, 101, 150, .12), transparent 37%), var(--ink); }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 28px; border-bottom: 1px solid var(--line-soft); background: rgba(11, 15, 21, .94); }
.brand-lockup, .topbar-actions, .brand-lockup > div, .connection-pill, .workspace-actions, .run-state, .toolbar-actions, .canvas-footnote, .conversation-tools, .composer-footer, .prompt-hints, .flow-card-top, .card-meta, .meter-head { display: flex; align-items: center; }
.brand-lockup { gap: 12px; min-width: 220px; }
.brand-lockup > div:not(.brand-mark) { display: block; }
.brand-mark { width: 30px; height: 30px; border: 1.5px solid var(--mint); border-radius: 9px; position: relative; display: grid; place-items: center; transform: rotate(0deg); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 7px; height: 13px; border-top: 2px solid var(--mint); border-bottom: 2px solid var(--mint); }
.brand-mark::before { left: 5px; transform: skewY(-30deg); }
.brand-mark::after { right: 5px; transform: skewY(30deg); }
.brand-mark span { width: 3px; height: 11px; border-radius: 3px; background: var(--violet); transform: rotate(25deg); }
.brand-mark i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: white; top: 5px; right: 5px; }
.brand-name { font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.brand-subtitle { color: var(--muted-2); font-size: 10px; letter-spacing: .04em; margin-top: 2px; }
.topbar-center { color: var(--text); font-size: 12px; display: flex; align-items: center; gap: 10px; }
.crumb-muted, .crumb-slash { color: var(--muted-2); }
.topbar-actions { gap: 10px; }
.connection-pill { gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; font-family: var(--mono); }
.status-dot, .run-state-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(158, 245, 194, .08), 0 0 10px rgba(158, 245, 194, .55); }
.icon-button, .avatar-button, .square-button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.icon-button { border-radius: 50%; width: 30px; height: 30px; font-size: 14px; }
.avatar-button { border: 0; width: 30px; height: 30px; border-radius: 50%; background: #514f8b; color: #fff; font-size: 10px; font-weight: 800; }
.icon-button:hover, .square-button:hover { color: var(--text); background: var(--surface-hover); }

.app-body { display: flex; min-height: calc(100vh - 72px); }
.session-rail { flex: 0 0 245px; border-right: 1px solid var(--line-soft); padding: 30px 16px 18px; display: flex; flex-direction: column; background: rgba(12, 17, 24, .68); }
.rail-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 8px; margin-bottom: 18px; }
.eyebrow { color: var(--muted-2); font: 500 10px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow-separator { color: var(--line); padding: 0 5px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 14px; line-height: 1.3; letter-spacing: -.02em; }
h3 { font-size: 13px; line-height: 1.35; letter-spacing: -.02em; }
.square-button { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; font-size: 17px; line-height: 1; }
.square-button.subtle { color: var(--muted-2); border-color: transparent; background: transparent; }
.search-box { display: flex; gap: 8px; align-items: center; height: 34px; padding: 0 10px; margin: 0 0 17px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface); color: var(--muted-2); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search-box input::placeholder { color: var(--muted-2); }
.session-list { display: grid; gap: 5px; }
.session-item { width: 100%; text-align: left; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text); padding: 11px 10px; }
.session-item:hover { background: var(--surface); }
.session-item.active { background: var(--surface-raised); border-color: var(--line); box-shadow: inset 2px 0 0 var(--mint); }
.session-item-title, .session-item-meta, .session-item-foot { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-item-title { font-size: 11px; font-weight: 700; }
.session-item-meta { color: var(--muted); font-size: 10px; margin-top: 4px; }
.session-item-foot { color: var(--muted-2); font: 10px var(--mono); margin-top: 9px; }
.session-item-foot::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--mint); }
.rail-bottom { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid var(--line-soft); }
.storage-meter { margin-bottom: 19px; }
.meter-head { justify-content: space-between; color: var(--muted); font: 10px var(--mono); }
.meter-track { height: 4px; border-radius: 3px; background: var(--line); margin: 9px 0 7px; overflow: hidden; }
.meter-track span { display: block; height: 100%; width: 42%; border-radius: inherit; background: var(--mint); }
.storage-meter p { color: var(--muted-2); font-size: 9px; }
.rail-link { width: 100%; padding: 8px 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; text-align: left; }
.rail-link:hover { color: var(--text); }
.rail-link-icon { margin-right: 8px; color: var(--muted-2); font-size: 15px; vertical-align: -1px; }
.shortcut { color: var(--muted-2); font: 10px var(--mono); margin-left: 5px; }

.main-workspace { flex: 1; min-width: 0; padding: 30px 34px 42px; }
.workspace-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; max-width: 1360px; margin: 0 auto 21px; }
.workspace-header h1 { margin-top: 8px; font-size: clamp(21px, 2.1vw, 29px); line-height: 1.15; letter-spacing: -.045em; }
.header-description { max-width: 560px; color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 8px; }
.workspace-actions { gap: 8px; padding-top: 5px; }
.button { height: 34px; padding: 0 13px; border-radius: 7px; font-size: 11px; font-weight: 700; transition: transform .16s ease, background .16s ease; }
.button:active { transform: translateY(1px); }
.button-quiet { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.button-quiet:hover { color: var(--text); background: var(--surface); }
.button-primary { border: 1px solid var(--mint); background: var(--mint); color: #0b1911; box-shadow: 0 8px 22px rgba(158, 245, 194, .08); }
.button-primary:hover { background: #b5fad1; }
.run-icon { font-size: 9px; margin-right: 3px; }
.run-strip { max-width: 1360px; margin: 0 auto 20px; min-height: 38px; display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.run-state { gap: 8px; min-width: 100px; color: var(--text); font: 10px var(--mono); }
.run-state-dot.idle { background: var(--muted-2); box-shadow: none; }
.run-state-dot.working { background: var(--mint); animation: statePulse 1.2s ease-in-out infinite; }
.run-state-dot.complete { background: var(--mint); box-shadow: none; }
.run-state-dot.failed { background: var(--coral); box-shadow: none; }
.run-progress { height: 3px; flex: 1; max-width: 390px; border-radius: 3px; overflow: hidden; background: var(--line); }
.run-progress span { display: block; width: 16%; height: 100%; border-radius: 3px; background: var(--mint); transition: width .3s ease; }
.run-detail { color: var(--muted); flex: 1; }
.run-time { color: var(--muted-2); font: 10px var(--mono); }
@keyframes statePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(158,245,194, .4); } 50% { box-shadow: 0 0 0 5px rgba(158,245,194, 0); } }

.canvas-layout { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 15px; align-items: start; }
.canvas-column, .artifact-dock, .conversation-panel { border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(16, 21, 29, .8); overflow: hidden; }
.canvas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 46px; padding: 0 15px; border-bottom: 1px solid var(--line-soft); }
.toolbar-label { display: flex; align-items: center; gap: 8px; font: 10px var(--mono); color: var(--text); }
.pulse-icon { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px rgba(158, 245, 194, .65); }
.toolbar-actions { gap: 3px; }
.toolbar-button { border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); font-size: 10px; padding: 6px 8px; }
.toolbar-button:hover, .toolbar-button.active { color: var(--text); background: var(--surface-raised); }
.canvas-surface { min-height: 544px; position: relative; overflow: hidden; background: #0e141c; }
.canvas-grid { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(125, 145, 170, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 145, 170, .07) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(to bottom, black, transparent 95%); }
.canvas-inner { position: relative; max-width: 620px; margin: 0 auto; padding: 38px 25px 45px; }
.canvas-intro { margin: 0 0 26px 57px; }
.canvas-intro p { color: var(--muted); font-size: 11px; margin-top: 7px; }
.flow-stack { display: grid; gap: 0; }
.flow-card { display: grid; grid-template-columns: 43px 1fr; min-height: 128px; }
.flow-rail { display: flex; flex-direction: column; align-items: center; }
.step-number { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font: 10px var(--mono); }
.flow-line { width: 1px; flex: 1; min-height: 30px; background: var(--line); }
.flow-line.last { background: linear-gradient(var(--line), transparent); }
.flow-content { align-self: start; margin: 0 0 12px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 8px; background: rgba(20, 28, 39, .9); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.flow-content:hover { transform: translateX(2px); background: var(--surface-hover); }
.flow-card.complete .step-number { border-color: var(--mint-dark); background: rgba(29, 93, 66, .28); color: var(--mint); }
.flow-card.active-card .step-number { border-color: rgba(158, 245, 194, .65); color: var(--mint); box-shadow: 0 0 15px rgba(158, 245, 194, .09); }
.flow-card.active-card .flow-content { border-color: rgba(158, 245, 194, .45); background: linear-gradient(100deg, rgba(24, 50, 43, .78), rgba(20, 28, 39, .95)); box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.flow-card.next-card .flow-content { background: rgba(20, 25, 34, .5); border-style: dashed; }
.flow-card-top { justify-content: space-between; gap: 10px; }
.card-kicker { display: block; color: var(--muted-2); font: 9px var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.active-card .card-kicker { color: var(--mint); }
.flow-content p { max-width: 470px; color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 8px; }
.check-badge, .working-badge, .next-badge { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; }
.check-badge { color: var(--mint); background: rgba(158,245,194,.08); }
.working-badge { border: 1px solid rgba(158,245,194,.35); }
.working-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: statePulse 1.2s ease-in-out infinite; }
.next-badge { border: 1px solid var(--line); color: var(--muted); }
.card-meta { gap: 13px; margin-top: 14px; color: var(--muted-2); font: 9px var(--mono); }
.card-meta span:not(:first-child)::before { content: "·"; margin-right: 13px; color: var(--line); }
.add-step-button { display: block; margin: 5px 0 0 43px; padding: 8px 11px; border: 1px dashed var(--line); border-radius: 6px; background: transparent; color: var(--muted-2); font-size: 10px; }
.add-step-button:hover { color: var(--mint); border-color: var(--mint-dark); }
.canvas-footnote { gap: 15px; min-height: 37px; padding: 0 16px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font: 9px var(--mono); }
.legend-dot { width: 6px; height: 6px; display: inline-block; margin-right: 5px; border-radius: 50%; }
.legend-dot.mint { background: var(--mint); }.legend-dot.violet { background: var(--violet); }.canvas-id { margin-left: auto; }

.artifact-dock { min-height: 627px; display: flex; flex-direction: column; }
.dock-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 19px 17px 16px; }
.dock-header h2 { margin-top: 7px; }
.artifact-tabs { display: flex; padding: 0 12px; border-bottom: 1px solid var(--line-soft); }
.artifact-tab { padding: 8px 7px 11px; margin-right: 10px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted-2); font-size: 10px; }
.artifact-tab:hover, .artifact-tab.active { border-color: var(--mint); color: var(--text); }
.artifact-tab span { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 3px; border-radius: 4px; background: var(--surface-hover); color: var(--muted); font: 9px var(--mono); }
.artifact-content { flex: 1; padding: 16px; }
.artifact-summary { color: var(--muted); font-size: 10px; line-height: 1.65; margin-bottom: 15px; }
.file-list { display: grid; gap: 5px; }
.file-row { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 6px; color: var(--muted); font: 10px var(--mono); }
.file-row:hover { background: var(--surface-hover); color: var(--text); }.file-icon { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 4px; background: rgba(169,183,255,.1); color: var(--violet); font-size: 9px; }.file-size { margin-left: auto; color: var(--muted-2); font-size: 9px; }
.code-block { padding: 13px; border: 1px solid var(--line-soft); border-radius: 6px; background: #0b1017; color: #b8c5d5; font: 9px/1.7 var(--mono); overflow: auto; white-space: pre-wrap; }.code-green { color: var(--mint); }.code-violet { color: var(--violet); }.code-amber { color: var(--amber); }
.artifact-empty { display: grid; place-items: center; min-height: 220px; padding: 20px; color: var(--muted-2); text-align: center; font-size: 10px; line-height: 1.6; }.artifact-empty strong { display: block; color: var(--muted); margin-bottom: 6px; }
.agent-note { display: flex; gap: 10px; margin: 0 13px 14px; padding: 12px; border: 1px solid rgba(169,183,255,.18); border-radius: 7px; background: rgba(80, 84, 160, .08); }.agent-note-mark { color: var(--violet); }.agent-note strong { font-size: 10px; }.agent-note p { color: var(--muted); font-size: 10px; line-height: 1.55; margin-top: 5px; }

.conversation-panel { max-width: 1360px; margin: 15px auto 0; padding: 19px 18px 16px; }
.conversation-heading { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }.conversation-heading h2 { margin-top: 7px; }.conversation-tools { gap: 12px; }.turn-count { color: var(--muted-2); font: 9px var(--mono); }.text-button { border: 0; background: transparent; color: var(--muted); font-size: 10px; }.text-button:hover { color: var(--text); }
.message-list { max-height: 185px; overflow: auto; display: grid; gap: 13px; margin: 17px 0 16px; padding-right: 5px; }.message { display: flex; gap: 10px; }.message-avatar { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; font: 9px var(--mono); }.message.user .message-avatar { background: #514f8b; color: white; }.message.agent .message-avatar { border: 1px solid var(--mint-dark); color: var(--mint); }.message-body { min-width: 0; }.message-meta { color: var(--muted-2); font: 9px var(--mono); }.message-copy { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 4px; }.message.agent .message-copy { color: #bcc7d4; }.composer { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }.composer-avatar { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 6px; background: #514f8b; color: #fff; font: 9px var(--mono); }.composer-input-wrap { min-width: 0; flex: 1; }.composer textarea { width: 100%; min-height: 25px; max-height: 100px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; line-height: 1.5; }.composer textarea::placeholder { color: var(--muted-2); }.composer-footer { justify-content: space-between; gap: 10px; padding-top: 4px; }.prompt-hints { gap: 5px; flex-wrap: wrap; }.hint-chip { border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); font-size: 9px; padding: 4px 7px; }.hint-chip:hover { color: var(--mint); border-color: var(--mint-dark); }.composer-shortcut { color: var(--muted-2); font: 9px var(--mono); margin-left: 4px; }.send-button { flex: 0 0 auto; width: 26px; height: 26px; border: 0; border-radius: 6px; background: var(--mint); color: #0b1911; font-weight: 800; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 320px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-raised); box-shadow: 0 15px 40px rgba(0,0,0,.3); color: var(--text); font-size: 10px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) { .session-rail { flex-basis: 210px; }.main-workspace { padding-inline: 22px; }.canvas-layout { grid-template-columns: minmax(0, 1fr) 285px; }.canvas-inner { padding-inline: 18px; } }
@media (max-width: 900px) { .topbar { padding-inline: 18px; }.topbar-center { display: none; }.app-body { display: block; }.session-rail { display: block; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 15px 18px; }.rail-heading { margin-bottom: 12px; }.search-box { max-width: 360px; margin-bottom: 10px; }.session-list { grid-template-columns: repeat(3, minmax(150px, 1fr)); overflow-x: auto; }.session-item { min-width: 150px; }.rail-bottom { display: none; }.main-workspace { padding: 24px 18px 34px; }.canvas-layout { grid-template-columns: 1fr; }.artifact-dock { min-height: 0; }.artifact-content { min-height: 170px; }.agent-note { margin-top: 0; }.run-strip { flex-wrap: wrap; padding: 9px 0; gap: 9px; }.run-progress { order: 5; flex-basis: 100%; max-width: none; }.run-detail { min-width: 150px; } }
@media (max-width: 600px) { .topbar { height: 62px; }.app-body { min-height: calc(100vh - 62px); }.brand-lockup { min-width: 0; }.brand-subtitle { display: none; }.topbar-actions { gap: 5px; }.connection-pill { padding-inline: 7px; }.connection-pill span:last-child { display: none; }.session-rail { padding-inline: 12px; }.session-list { margin-inline: -12px; padding-inline: 12px; grid-template-columns: repeat(3, 145px); }.main-workspace { padding: 20px 12px 28px; }.workspace-header { display: block; }.workspace-actions { padding-top: 17px; }.workspace-actions .button { flex: 1; }.workspace-header h1 { font-size: 23px; }.canvas-toolbar { height: auto; min-height: 46px; align-items: flex-start; flex-direction: column; padding-block: 11px; }.toolbar-actions { width: 100%; }.toolbar-button { flex: 1; }.canvas-surface { min-height: 480px; }.canvas-inner { padding: 27px 12px 35px; }.canvas-intro { margin-left: 43px; }.flow-card { grid-template-columns: 34px 1fr; }.flow-content { padding: 13px; }.card-meta { gap: 7px; flex-wrap: wrap; }.card-meta span:not(:first-child)::before { margin-right: 7px; }.add-step-button { margin-left: 34px; }.canvas-footnote { align-items: flex-start; flex-wrap: wrap; padding-block: 9px; }.canvas-id { width: 100%; margin-left: 0; }.conversation-panel { padding: 16px 12px 12px; }.composer-shortcut { display: none; }.artifact-dock { border-radius: 8px; }.run-time { width: 100%; }.run-detail { flex: 1; } }
