:root {
  font:
    14px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    sans-serif;
  color: #17263b;
  background: #f7f9fc;
  --accent: #2054cd;
  --line: #dce2ec;
  --muted: #5d6b7d;
  --radius: 6px;
  --control: 32px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
a {
  color: var(--accent);
}
.brand {
  text-decoration: none;
  font-size: 20px;
  font-weight: 650;
  color: #17263b;
}
.brand span {
  font-weight: 400;
  color: var(--muted);
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 24px;
}
h1 {
  font-size: 24px;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
h2 {
  font-size: 17px;
  margin: 0 0 12px;
}
p {
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border: 1px solid #cad3df;
  border-radius: var(--radius);
  padding: 5px 9px;
  min-height: var(--control);
  background: #fff;
}
button {
  cursor: pointer;
}
button:hover {
  background: #edf3ff;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #90adf0;
  outline-offset: 2px;
}
input,
select,
textarea {
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 96px;
}
label {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.signin {
  max-width: 440px;
  margin: 64px auto;
}
.stack {
  display: grid;
  gap: 16px;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.error {
  color: #a52d2d;
}
.success {
  color: #267345;
}
.hidden {
  display: none !important;
}
.status {
  font-size: 12px;
  border-radius: 20px;
  background: #eef2f7;
  padding: 3px 9px;
}
#identity {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
@media (pointer: coarse) {
  :root {
    --control: 38px;
  }
  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }
}
@media (max-width: 650px) {
  header {
    padding: 0 16px;
  }
  main {
    padding: 16px;
  }
  .signin {
    margin: 32px auto;
  }
  .card {
    padding: 16px;
  }
}
:root {
  --accent: #3159c7;
  --muted: #6b7789;
  --line: #e1e6ee;
  background: #f6f8fb;
}
header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 56px;
}
main {
  padding: 0 28px 28px;
  max-width: 1700px;
}
h1 {
  font-size: 25px;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.2px;
}
small,
.caption {
  font-size: 12px;
  color: var(--muted);
}
small {
  display: block;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  height: 53px;
  align-items: center;
}
nav button {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-weight: 550;
  min-width: 90px;
}
nav button.active {
  background: #e9effc;
  color: #2349af;
}
.nav-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.page-heading p {
  margin: 0;
}
.list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.list-item {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  gap: 18px;
  padding: 17px 20px;
}
.list-item > span:first-child {
  flex: 1;
}
.list-item strong {
  font-weight: 600;
}
.list-item small {
  margin-top: 3px;
}
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty h2 {
  color: #344459;
}
.prompt-start {
  max-width: 860px;
}
.prompt-start textarea {
  min-height: 110px;
  margin-bottom: 8px;
}
.notice {
  border: 1px solid #d5def3;
  background: #eef3ff;
  padding: 11px 14px;
  margin-bottom: 18px;
  border-radius: 6px;
}
.notice.error {
  border-color: #f1cccc;
  background: #fff5f5;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 0;
  min-height: 28px;
  font-size: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #cad3df;
  border-radius: 6px;
  background: #fff;
  padding: 5px 10px;
  min-height: 32px;
}
.welcome {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  max-width: 1040px;
  margin: 92px auto;
  gap: 100px;
}
.welcome h1 {
  font-size: 43px;
  line-height: 1.2;
  letter-spacing: -1.8px;
  margin: 20px 0;
}
.welcome .intro > p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}
.welcome-steps {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 36px;
}
.welcome-steps span {
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 18px;
  border-radius: 7px;
  font-size: 12px;
}
.welcome-steps i {
  font-style: normal;
  color: #a5b1c5;
}
.signin {
  width: 100%;
  max-width: 400px;
  margin: 0;
  padding: 28px;
  box-shadow: 0 12px 40px #1a31570a;
}
.signin h2 {
  font-size: 19px;
}
.signin p {
  margin-top: 12px;
}
.signin form {
  margin-top: 24px;
}
.signin button {
  width: 100%;
}
#identity select {
  max-width: 230px;
  min-width: 130px;
  font-size: 12px;
}
.designer {
  display: grid;
  grid-template-columns: 270px minmax(330px, 1fr) 265px;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
  min-height: 650px;
  align-items: stretch;
}
.agent-panel,
.inspector {
  padding: 20px;
  background: #fff;
}
.agent-panel {
  border-right: 1px solid var(--line);
}
.inspector {
  border-left: 1px solid var(--line);
}
.inspector p {
  font-size: 12px;
  line-height: 1.7;
}
.panel-title {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.panel-title h2 {
  margin: 0;
}
.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6f62ce;
  box-shadow: 0 0 0 4px #efedfa;
}
.chat-message {
  background: #f3f5f9;
  border-radius: 7px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.chat-message.user {
  background: #edf2fe;
}
#conversation {
  max-height: 300px;
  overflow: auto;
  margin: 20px 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: 15px;
  min-height: 15px;
}
.caption {
  margin-top: 12px;
  line-height: 1.65;
}
.canvas {
  background-color: #f9fbfe;
  background-image: radial-gradient(#d9e2f0 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  min-width: 0;
}
.canvas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffffdf;
  border-bottom: 1px solid var(--line);
  height: 43px;
  padding: 0 18px;
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 600;
}
.graph-scroll {
  overflow: auto;
  max-height: calc(100vh - 245px);
  min-height: 500px;
  padding: 12px;
}
.flow-graph {
  display: block;
  min-width: 460px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  font:
    12px Inter,
    system-ui,
    sans-serif;
}
.edge path {
  stroke: #bac6db;
  stroke-width: 1.4;
  fill: none;
}
.edge text {
  font-size: 9px;
  fill: #66778e;
  paint-order: stroke;
  stroke: #f9fbfe;
  stroke-width: 4px;
  stroke-linejoin: round;
}
.flow-graph marker path {
  fill: #bac6db;
}
.graph-node {
  cursor: pointer;
  outline: none;
}
.graph-node rect {
  stroke: #d4deed;
  fill: #fff;
  stroke-width: 1.3;
}
.graph-node.selected rect,
.graph-node:focus-visible rect {
  stroke: #4b6fc9;
  stroke-width: 2;
}
.graph-node:hover rect {
  fill: #f0f4ff;
}
.graph-node .node-kind {
  font-size: 9px;
  letter-spacing: 0.9px;
  fill: #7d8c9f;
  font-weight: 650;
}
.graph-node .node-title {
  font-size: 12px;
  font-weight: 600;
  fill: #223650;
}
.graph-node .node-detail {
  font-size: 9px;
  fill: #7c8a9e;
}
.graph-node.task rect {
  stroke: #bdb2df;
}
.graph-node.action rect {
  stroke: #abcabb;
}
.graph-node.condition rect {
  stroke: #e1c797;
}
.graph-node.waiting rect,
.graph-node.active rect {
  stroke: #3159c7;
  stroke-width: 2;
  fill: #eff4ff;
}
.graph-node.completed rect {
  stroke: #9fc9b1;
  fill: #f6fcf8;
}
.graph-node.failed rect {
  stroke: #ca7575;
  fill: #fff3f3;
}
.instance-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
}
.instance-layout > .canvas {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.instance-layout .graph-scroll {
  max-height: calc(100vh - 220px);
}
.live-dot {
  color: #377757;
  font-size: 10px;
  letter-spacing: 0;
}
.live-dot:before {
  content: '●';
  margin-right: 6px;
}
.work-summary + .work-summary,
.receipt + .receipt {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.work-summary p {
  font-size: 12px;
  margin: 5px 0 12px;
}
.receipt strong {
  font-size: 12px;
}
.receipt p {
  margin: 8px 0;
  font-size: 12px;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  position: relative;
  border-left: 1px solid #dbe4f1;
  padding: 0 0 18px 20px;
  margin-left: 5px;
}
.timeline li:before {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c5d0e1;
  left: -5px;
  top: 6px;
  border: 2px solid #fff;
}
.timeline li.waiting:before {
  background: #446cd7;
}
.timeline li.completed:before {
  background: #52906d;
}
.timeline li.failed:before {
  background: #bf5050;
}
.timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.timeline strong {
  font-size: 12px;
  font-weight: 550;
}
.timeline small {
  font-size: 11px;
  margin-top: 3px;
}
.status {
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.status.completed,
.status.succeeded,
.status.enabled,
.status.published {
  background: #edf7f0;
  color: #377757;
}
.status.waiting,
.status.review,
.status.confirming,
.status.notifying {
  background: #edf2fe;
  color: #365db1;
}
.status.failed,
.status.unknown,
.status.needs_attention {
  background: #fceeed;
  color: #ad4d43;
}
.task-card {
  max-width: 820px;
}
.task-card .row {
  margin-bottom: 24px;
}
.task-card h2 {
  margin-top: 28px;
}
blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: #f5f7fb;
  border-left: 3px solid #9dadcc;
  white-space: pre-wrap;
  font-size: 13px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 0 0 14px;
  padding: 10px;
}
legend {
  font-size: 11px;
  color: var(--muted);
  padding: 0 5px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px;
  max-width: 700px;
  width: calc(100% - 32px);
  max-height: 90vh;
  color: #17263b;
  box-shadow: 0 15px 80px #12233d33;
}
dialog::backdrop {
  background: #13243d66;
  backdrop-filter: blur(2px);
}
dialog .close {
  float: right;
  min-width: 28px;
  padding: 0;
  font-size: 20px;
  border: 0;
}
dialog h2 {
  font-size: 21px;
  margin: 0 30px 16px 0;
}
dialog li {
  padding: 3px 0;
}
dialog small {
  display: inline;
}
dialog pre,
pre {
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f6f8fb;
  padding: 12px;
  border-radius: 4px;
}
code {
  font-size: 10px;
  overflow-wrap: anywhere;
}
summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
button.primary:hover {
  background: #254bb4;
}
button.primary:disabled {
  background: #3159c7;
}
button {
  transition: background 0.12s;
}
.page-heading .row {
  justify-content: flex-end;
}
@media (min-width: 1400px) {
  .designer {
    grid-template-columns: 300px minmax(400px, 1fr) 290px;
  }
}
@media (max-width: 1050px) {
  .designer {
    grid-template-columns: 230px minmax(300px, 1fr);
  }
  .inspector {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .inspector form {
    max-width: 520px;
  }
  .welcome {
    gap: 50px;
    margin-top: 65px;
  }
  .welcome h1 {
    font-size: 36px;
  }
  .instance-layout {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  main {
    padding: 0 14px 20px;
  }
  header {
    padding: 0 14px;
  }
  .brand {
    font-size: 17px;
  }
  #identity {
    gap: 5px;
  }
  #identity select {
    min-width: 80px;
    max-width: 140px;
  }
  .user-email {
    display: none;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading .row {
    justify-content: flex-start;
  }
  .nav-note {
    display: none;
  }
  nav {
    overflow: auto;
    gap: 0;
  }
  nav button {
    min-width: 78px;
    padding: 5px 7px;
  }
  nav {
    margin-bottom: 20px;
  }
  .welcome {
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 35px auto;
    max-width: 440px;
  }
  .welcome .intro > p {
    font-size: 15px;
  }
  .welcome h1 {
    font-size: 34px;
  }
  .welcome-steps {
    margin-top: 18px;
  }
  .signin {
    max-width: none;
  }
  .designer {
    display: flex;
    flex-direction: column;
  }
  .agent-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .agent-panel #conversation {
    max-height: 150px;
    margin: 12px 0;
  }
  .agent-panel textarea {
    min-height: 80px;
  }
  .graph-scroll {
    min-height: 400px;
    max-height: 600px;
    padding: 8px;
  }
  .flow-graph {
    min-width: 400px;
  }
  .inspector {
    border-top: 1px solid var(--line);
  }
  .instance-layout {
    grid-template-columns: 1fr;
  }
  .instance-layout .graph-scroll {
    max-height: 550px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  dialog {
    padding: 22px;
  }
  .list-item {
    padding: 16px 14px;
    gap: 10px;
  }
  .list-item small {
    font-size: 11px;
    overflow-wrap: anywhere;
  }
  .task-card {
    padding: 18px;
  }
  .task-card a.button {
    width: 100%;
  }
  .task-card .row {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.flow-graph {
  max-width: 560px;
}
#logout {
  white-space: nowrap;
}
nav button[data-view='workflows'].hidden {
  display: none;
}
dialog input[type='password'] {
  font-family: ui-monospace, monospace;
}
