:root {
  --page: #ffffff;
  --canvas: #fbfbfc;
  --gutter: #f2f5fa;
  --ink: #17191d;
  --muted: #68717d;
  --line: #dfe3e9;
  --blue: #4d73f4;
  --blue-soft: #e9efff;
  --blue-pale: #dce6ff;
  --placeholder: #f3f4f5;
  --badge: #e54855;
  --tooltip: #202225;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }

html, body { width: 100%; min-height: 100%; margin: 0; }

body {
  min-width: 280px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  font-size: 10px;
  -webkit-font-smoothing: antialiased;
}

button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 40px 34px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  background: var(--canvas);
}

.primary-rail {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--page);
}

.rail-control, .utility-button, .gutter-status, .composer-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  color: #424850;
  background: transparent;
  border-radius: 5px;
}

.rail-control:hover, .rail-control[aria-pressed="true"], .gutter-status:hover,
.utility-button:hover, .composer-control:hover { background: #f1f4fa; }

.menu-control { margin-top: 8px; color: var(--blue); }
.rail-upper { display: flex; flex-direction: column; gap: 6px; margin-top: 13px; }
.rail-lower {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: center;
  margin-top: auto;
  padding: 10px 0 9px;
  border-top: 1px solid #edf0f3;
}

.notification-control { overflow: visible; }
.notification-badge {
  position: absolute;
  top: -1px;
  right: 0;
  z-index: 1;
  min-width: 14px;
  height: 11px;
  padding: 0 3px;
  border-radius: 8px;
  color: white;
  background: var(--badge);
  font-size: 6px;
  font-weight: 700;
  line-height: 11px;
  text-align: center;
}

.status-gutter {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  border-right: 1px solid #edf0f4;
  background: var(--gutter);
}
.gutter-status {
  width: 22px;
  height: 22px;
  margin-top: 7px;
  border-radius: 5px;
  background: #e8efff;
}
.status-orbit {
  width: 8px;
  height: 8px;
  border: 1px solid #7891dd;
  border-radius: 50%;
}
.status-orbit::after {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 4px;
  height: 1px;
  background: #7891dd;
  content: "";
  transform: rotate(45deg);
}
.status-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 4px;
  height: 4px;
  border: 1px solid #e8efff;
  border-radius: 50%;
  background: var(--blue);
}

.main-canvas {
  min-width: 0;
  min-height: 100vh;
  background: var(--canvas);
}
.top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 32px;
  padding: 6px 4px 0 9px;
  background: var(--page);
  border-bottom: 1px solid #f0f1f4;
}
.title-block { min-width: 0; line-height: 1; }
.title-block strong {
  display: block;
  overflow: hidden;
  max-width: 310px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: -.08px;
}
.running-status {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 6.5px;
}
.running-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
}
.utility-actions { display: flex; align-items: center; gap: 1px; height: 22px; }
.utility-wrap { position: relative; }
.utility-button { width: 22px; height: 22px; border-radius: 4px; }
.code-button { color: #4c5560; font-size: 8px; font-weight: 600; letter-spacing: -1px; }
.share-button {
  height: 19px;
  margin-left: 4px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  color: white;
  background: var(--blue);
  font-size: 7px;
  font-weight: 600;
}
.share-button:hover, .share-button.is-acknowledged { background: #3f62dc; }
.outputs-tooltip {
  position: absolute;
  top: 25px;
  left: 50%;
  z-index: 5;
  padding: 3px 5px;
  border-radius: 2px;
  color: white;
  background: var(--tooltip);
  font-size: 7px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}
.outputs-wrap:hover .outputs-tooltip,
.outputs-wrap:focus-within .outputs-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.content-stage {
  position: relative;
  min-height: calc(100vh - 32px);
  overflow: hidden;
}
.workflow-column {
  position: absolute;
  top: 17px;
  left: 61px;
  width: 429px;
  height: 208px;
}
.top-placeholder {
  width: 255px;
  height: 28px;
  margin-left: 202px;
  border-radius: 5px;
  background: #eef2ff;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding-top: 6px;
}
.brand-row strong { font-size: 10px; font-weight: 700; }
.brand-mark { position: relative; width: 12px; height: 10px; }
.brand-mark i {
  position: absolute;
  width: 7px;
  height: 4px;
  border: 1px solid #59616b;
  border-radius: 4px;
  transform: rotate(-32deg);
}
.brand-mark i:first-child { top: 1px; left: 0; }
.brand-mark i:last-child { right: 0; bottom: 1px; }
.workflow-rule { height: 1px; width: 404px; background: #555d66; opacity: .8; }
.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 329px;
  margin: 10px 0 0 5px;
}
.conversation-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 20px;
  padding: 4px 7px;
  border: 1px solid #e5e9f0;
  border-radius: 5px;
  background: #f8faff;
}
.conversation-item-agent { background: #f3f5fa; }
.conversation-label {
  color: #7c8795;
  font-size: 6.5px;
  font-weight: 700;
  line-height: 1;
}
.conversation-item-agent .conversation-label { color: var(--blue); }
.conversation-item p {
  overflow: hidden;
  margin: 0;
  color: #3d4653;
  font-size: 7px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-list .progress-surface {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  height: 27px;
  margin-top: 1px;
}
.task-copy {
  margin: 10px 0 0;
  color: #363d45;
  font-size: 7.5px;
  line-height: 1.2;
  white-space: nowrap;
}
.execution-track {
  position: relative;
  height: 78px;
  margin-top: 5px;
  margin-left: 1px;
  border-left: 1px solid #9da5ae;
}
.track-node {
  position: absolute;
  left: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #68717d;
}
.track-start { top: 0; }
.track-end { top: 68px; }
.track-branch {
  position: absolute;
  top: 8px;
  left: 0;
  width: 13px;
  height: 1px;
  background: #9da5ae;
}
.step-count {
  position: absolute;
  top: 10px;
  left: 6px;
  color: #a2a8b0;
  font-size: 6.5px;
  white-space: nowrap;
}
.track-line {
  position: absolute;
  top: 21px;
  left: 0;
  height: 46px;
  border-left: 1px dashed #c8cdd4;
}
.progress-surface {
  position: absolute;
  top: 31px;
  left: 5px;
  width: 329px;
  height: 27px;
  padding: 5px 8px 4px 9px;
  overflow: hidden;
  border: 1px solid #e5e9f0;
  border-radius: 5px;
  background: #f3f5fa;
  box-shadow: inset 14px 0 24px rgba(255,255,255,.25);
}
.thinking-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  color: #3d4653;
  font-size: 6.5px;
  line-height: 1;
  white-space: nowrap;
}
.thinking-heading strong {
  color: #283344;
  font-size: 6.5px;
  font-weight: 700;
}
.thinking-pulse {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px #dce6ff;
}
.thinking-state {
  overflow: hidden;
  min-width: 0;
  color: #7c8795;
  text-overflow: ellipsis;
}
.thinking-track {
  height: 2px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 2px;
  background: #dfe5f1;
}
.thinking-track-fill {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  opacity: .78;
}

.tips-composer {
  position: absolute;
  bottom: 7px;
  left: 76px;
  width: 414px;
}
.tips-composer h2 {
  margin: 0 0 4px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}
.suggestion-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 25px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--blue-pale);
}
.suggestion-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 4px;
  background: white;
}
.suggestion-mark span {
  width: 8px;
  height: 8px;
  border: 1px solid #66717f;
  border-radius: 50%;
}
.suggestion-row p {
  overflow: hidden;
  flex: 1;
  margin: 0 5px;
  color: #3f4a5e;
  font-size: 7px;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.square-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: white;
  background: var(--blue);
}
.square-action:hover { background: #3f62dc; }
.composer {
  position: relative;
  height: 67px;
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid #dfe3e9;
  border-radius: 10px;
  background: white;
  box-shadow: 0 5px 13px rgba(57, 65, 78, .12), 0 1px 2px rgba(57, 65, 78, .06);
}
.composer.has-attachments { height: 94px; }
.composer textarea {
  display: block;
  width: 100%;
  height: 40px;
  padding: 8px 10px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 9px;
}
.composer.has-attachments textarea { height: 31px; }
.composer textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.attachment-strip {
  position: absolute;
  top: 32px;
  right: 8px;
  left: 8px;
  display: flex;
  align-items: stretch;
  gap: 5px;
  height: 31px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 1px 3px;
  scrollbar-width: thin;
  scrollbar-color: #c8d3ef transparent;
}
.attachment-card {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 104px;
  max-width: 148px;
  height: 27px;
  gap: 5px;
  padding: 3px 22px 3px 4px;
  border: 1px solid #dce4f7;
  border-radius: 5px;
  background: #f7f9ff;
}
.attachment-preview,
.attachment-file-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  overflow: hidden;
  border-radius: 3px;
  background: #e5ecff;
  color: #4d64a5;
  font-size: 6px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.attachment-preview { object-fit: cover; }
.attachment-details { min-width: 0; }
.attachment-name,
.attachment-type {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.attachment-name {
  color: #3d4653;
  font-size: 6.5px;
  line-height: 1.1;
}
.attachment-type {
  margin-top: 2px;
  color: #8993a2;
  font-size: 5.5px;
  line-height: 1;
}
.attachment-remove {
  position: absolute;
  top: 5px;
  right: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #66738a;
  background: transparent;
  font-size: 12px;
  line-height: 1;
}
.attachment-remove:hover { color: #304b9e; background: #e8eeff; }
.composer-actions {
  position: absolute;
  right: 7px;
  bottom: 6px;
  left: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.composer-control { width: 24px; height: 22px; }
.plus-control { font-size: 18px; font-weight: 300; line-height: 1; }
.composer-right-actions { display: flex; align-items: center; gap: 2px; }
.mic-control { color: #5b6470; }
.send-action { background: #bacbfa; }
.send-action:hover, .send-action.is-acknowledged { background: var(--blue); }
.local-feedback {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Small inline marks keep the page self-contained and visually coherent. */
.icon { position: relative; display: block; width: 13px; height: 13px; }
.icon-menu { width: 13px; height: 11px; }
.icon-menu i { display: block; width: 13px; height: 1px; margin: 3px 0; background: currentColor; }
.icon-home { width: 12px; height: 10px; margin-top: 2px; border: 1px solid currentColor; border-top: 0; border-radius: 1px 1px 2px 2px; }
.icon-home::before { position: absolute; top: -5px; left: 1px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-left: 1px solid currentColor; content: ""; transform: rotate(45deg); }
.icon-home::after { position: absolute; bottom: 0; left: 4px; width: 3px; height: 5px; border-left: 1px solid currentColor; content: ""; }
.icon-library { width: 13px; height: 12px; }
.icon-library i { position: absolute; bottom: 1px; width: 6px; height: 9px; border: 1px solid currentColor; border-radius: 1px; transform: skewY(-9deg); }
.icon-library i:nth-child(1) { left: 0; }
.icon-library i:nth-child(2) { left: 3px; }
.icon-library i:nth-child(3) { left: 6px; }
.icon-bell { width: 11px; height: 11px; border: 1px solid currentColor; border-radius: 7px 7px 3px 3px; border-bottom-color: transparent; }
.icon-bell::before { position: absolute; right: -2px; bottom: -2px; left: -2px; height: 3px; border-bottom: 1px solid currentColor; border-radius: 50%; content: ""; }
.icon-bell::after { position: absolute; bottom: -4px; left: 4px; width: 3px; height: 2px; border-radius: 50%; background: currentColor; content: ""; }
.icon-settings { width: 12px; height: 12px; border: 1px solid currentColor; border-radius: 50%; }
.icon-settings::before { position: absolute; top: 3px; left: 3px; width: 4px; height: 4px; border: 1px solid currentColor; border-radius: 50%; content: ""; }
.icon-settings::after { position: absolute; top: -3px; right: 3px; bottom: -3px; left: 3px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; content: ""; }
.icon-output { width: 10px; height: 12px; border: 1px solid currentColor; border-radius: 1px; }
.icon-output::before { position: absolute; top: 3px; left: 2px; width: 5px; height: 1px; background: currentColor; box-shadow: 0 3px 0 currentColor; content: ""; }
.icon-window { width: 12px; height: 10px; border: 1px solid currentColor; border-radius: 1px; }
.icon-window::before { position: absolute; top: 2px; right: 0; left: 0; border-top: 1px solid currentColor; content: ""; }
.icon-refresh { width: 11px; height: 11px; border: 1.5px solid white; border-left-color: transparent; border-radius: 50%; }
.icon-refresh::after { position: absolute; top: -2px; left: -2px; width: 0; height: 0; border-top: 3px solid white; border-right: 3px solid transparent; content: ""; transform: rotate(-25deg); }
.icon-microphone { width: 7px; height: 10px; border: 1px solid currentColor; border-radius: 5px; }
.icon-microphone::before { position: absolute; bottom: -4px; left: 2px; width: 1px; height: 4px; background: currentColor; content: ""; }
.icon-microphone::after { position: absolute; bottom: -4px; left: -2px; width: 9px; border-bottom: 1px solid currentColor; content: ""; }
.icon-send { width: 0; height: 0; border-right: 4px solid transparent; border-bottom: 7px solid white; border-left: 4px solid transparent; }
.icon-send::after { position: absolute; top: 5px; left: -1px; width: 2px; height: 3px; background: white; content: ""; }

@media (max-width: 680px) {
  .app-shell { grid-template-columns: 38px 22px minmax(0, 1fr); }
  .top-bar { padding-left: 8px; }
  .title-block strong { max-width: min(280px, 52vw); }
  .workflow-column {
    left: 50%;
    width: min(429px, calc(100% - 24px));
    transform: translateX(-50%);
  }
  .top-placeholder { width: min(255px, 59%); margin-left: auto; }
  .workflow-rule { width: 94%; }
  .task-copy { white-space: normal; }
  .progress-surface { width: min(329px, calc(100% - 17px)); }
  .tips-composer {
    left: 50%;
    width: min(414px, calc(100% - 24px));
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  .app-shell { grid-template-columns: 36px 14px minmax(0, 1fr); }
  .utility-actions { gap: 0; }
  .utility-button { width: 20px; }
  .code-button { display: none; }
  .share-button { margin-left: 2px; padding: 0 7px; }
  .workflow-column { top: 14px; }
  .brand-row { height: 38px; }
  .tips-composer { bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}



p[data-node-id="task-copy"] {
  color: #2563eb;
  font-size: 11px;
}
