/* Local-first workspace foundations. */
:root,
:root[data-theme="codex"] {
  --paper: #f2f5f4;
  --ink: #243638;
  --surface: #ffffff;
  --line: #dde5e2;
  --hover: #e8efec;
  --accent: #347b70;
  --accent-hover: #286559;
  --muted: #74817d;
  --sidebar: #fbfcfa;
  --header: #f7f9f7ee;
  --accent-line: #94b8aa;
}
:root[data-theme="hermes"] {
  --paper: #f4f4f8;
  --ink: #303346;
  --surface: #ffffff;
  --line: #e1e2eb;
  --hover: #ebecf5;
  --accent: #6962b5;
  --accent-hover: #56509c;
  --muted: #7c7e90;
  --sidebar: #fcfcff;
  --header: #f8f8fcee;
  --accent-line: #b3afd8;
}
:root[data-theme="claude"] {
  --paper: #f7f3ee;
  --ink: #43392e;
  --surface: #fffdfa;
  --line: #e8dfd5;
  --hover: #efe8de;
  --accent: #a86b49;
  --accent-hover: #8e5639;
  --muted: #8b7d70;
  --sidebar: #fffcf8;
  --header: #fbf8f3ee;
  --accent-line: #d4b59b;
}
:root[data-theme="paper"] {
  --paper: #f5f4ee;
  --ink: #373d32;
  --surface: #fffef9;
  --line: #e3e3d8;
  --hover: #ebecdf;
  --accent: #697c50;
  --accent-hover: #53643d;
  --muted: #808573;
  --sidebar: #fffef8;
  --header: #faf9f3ee;
  --accent-line: #b8c3a1;
}
:root[data-theme="graphite"] {
  color-scheme: dark;
  --paper: #111718;
  --ink: #e4eeea;
  --surface: #1b2425;
  --line: #2a3737;
  --hover: #243332;
  --accent: #a9d6c3;
  --accent-hover: #c6eadb;
  --muted: #8fa5a0;
  --sidebar: #151d1e;
  --header: #141c1dee;
  --accent-line: #547b70;
}
:root {
  --terminal-bg: #131c21;
  --terminal-fg: #dbe5e9;
  --terminal-muted: #8b9fa9;
  --terminal-line: #2c3a42;
  --node-header: #1c282f;
}
.agent-node[data-runtime="codex"],
.agent-node[data-runtime="hermes"],
.agent-node[data-runtime="claude"] {
  --terminal-bg: #131c21;
  --terminal-fg: #dbe5e9;
  --terminal-muted: #8b9fa9;
  --terminal-line: #2c3a42;
  --node-header: #1c282f;
  --ink: #e6edf0;
  --muted: #9bafb8;
  --agent-accent: var(--accent);
}
#project-sidebar {
  width: 224px;
  padding: 28px 18px 18px;
  background: var(--sidebar);
}
#workspace {
  margin-left: 224px;
}
.brand {
  gap: 11px;
  margin-bottom: 35px;
}
.brand img {
  width: 29px;
  height: 29px;
  padding: 4px;
  background: var(--hover);
  border-radius: 9px;
}
.brand strong {
  font-size: 21px;
  letter-spacing: -0.8px;
  font-weight: 650;
}
.project-info {
  width: 100%;
  text-align: left;
  padding: 16px 11px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 3px 8px #142b1c03;
}
#project-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font:
    600 15px ui-sans-serif,
    system-ui,
    sans-serif;
}
.project-info h1 {
  font-size: 12px;
  font-weight: 650;
}
#connection {
  font-size: 9px;
  line-height: 1.5;
}
#new-agent {
  height: 42px;
  border-radius: 9px;
  margin-bottom: 24px;
  box-shadow: 0 3px 9px color-mix(in srgb, var(--accent) 15%, transparent);
  font-weight: 600;
}
.nav-button {
  gap: 12px;
  min-height: 39px;
  border-radius: 8px;
  font-size: 12px;
}
.nav-button.current {
  background: var(--hover);
  font-weight: 600;
}
.nav-button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
  opacity: 0.8;
}
.nav-button small {
  background: var(--surface);
  min-width: 20px;
  padding: 3px 6px;
  text-align: center;
  border-radius: 5px;
  font-size: 9px;
}
.side-heading {
  margin: 28px 10px 12px;
  font:
    600 9px ui-sans-serif,
    system-ui,
    sans-serif;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.agent-link {
  border-radius: 9px;
  margin-bottom: 4px;
  padding: 11px 12px;
  gap: 11px;
}
.agent-link strong {
  font-size: 11px;
  font-weight: 550;
}
.agent-link small {
  font-size: 9px;
  margin-top: 4px;
  opacity: 0.75;
}
.agent-link.active {
  background: var(--hover);
  box-shadow: inset 2px 0 var(--accent);
}
.local-note {
  font-size: 9px;
  opacity: 0.7;
}
.workspace-header {
  height: 92px;
  padding: 22px 32px;
  background: var(--header);
  backdrop-filter: blur(18px);
}
.workspace-header h2 {
  font:
    600 22px/1.1 ui-sans-serif,
    system-ui,
    sans-serif;
  letter-spacing: -0.7px;
  margin-top: 8px;
}
.eyebrow {
  font:
    550 9px ui-monospace,
    monospace;
  letter-spacing: 1.2px;
  opacity: 0.8;
}
#attention {
  border-radius: 20px;
  font-size: 10px;
  padding: 8px 13px;
}
#canvas {
  background-image: radial-gradient(
    color-mix(in srgb, var(--muted) 16%, transparent) 0.6px,
    transparent 0.8px
  );
}
#canvas::before {
  content: "";
  position: absolute;
  width: max(105%, 1200px);
  height: 110%;
  right: -12%;
  bottom: -24%;
  background: url("/scene-terrain.svg") center/contain no-repeat;
  opacity: 0.12;
  transform: translate(var(--scene-x, 0px), var(--scene-y, 0px));
  pointer-events: none;
}
:root[data-atmosphere="structures"] #canvas::before {
  background-image: url("/scene-structures.svg");
  opacity: 0.13;
}
:root[data-atmosphere="quiet"] #canvas::before {
  display: none;
}
:root[data-theme="graphite"] #canvas::before {
  opacity: 0.13;
}
.agent-node {
  border: 1px solid #33454d;
  border-radius: 13px;
  box-shadow:
    0 3px 6px #11252c0a,
    0 16px 40px #11252c19;
}
.agent-node.selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent),
    0 18px 48px #10222b24;
}
.agent-node.head-agent:not(.expanded) {
  width: 473px;
  height: 336.6px;
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent),
    0 18px 45px #10222b24;
}
.agent-node.head-agent::after {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  pointer-events: none;
}
.node-header {
  min-height: 32px;
  padding: 3px 8px;
  gap: 7px;
  border-bottom: 1px solid #2b3b44;
  color: var(--terminal-fg);
}
.node-avatar {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #3b4d57;
  background: #263740;
  color: #b6cbd4;
  border-radius: 6px;
  font:
    500 11px ui-sans-serif,
    system-ui,
    sans-serif;
}
.head-agent .node-avatar {
  background: color-mix(in srgb, var(--accent) 20%, #1c282f);
  border-color: color-mix(in srgb, var(--accent) 55%, #33454d);
  color: #d5eee6;
  font-size: 10px;
  font-weight: 650;
}
.node-heading {
  flex: 1;
  min-width: 0;
}
.node-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.node-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #e5edf1;
  line-height: 1.3;
}
.head-agent .node-title {
  font-size: 11px;
}
.head-badge {
  font:
    600 7px ui-monospace,
    monospace;
  letter-spacing: 0.8px;
  color: #b7dbcd;
  background: #2d4542;
  border: 1px solid #46635b;
  padding: 2px 4px;
  border-radius: 3px;
}
.node-status {
  display: none;
  color: #8da5b0;
  font:
    9px/1.5 ui-sans-serif,
    system-ui,
    sans-serif;
  margin-top: 4px;
}
.node-work {
  font:
    9px/1.5 ui-sans-serif,
    system-ui,
    sans-serif;
  color: #a8bdc6;
  opacity: 0.9;
}
.node-header .icon-button {
  color: #92a9b4;
  padding: 1px 3px;
  width: 24px;
  height: 24px;
  line-height: 18px;
  border-radius: 5px;
  font-size: 13px;
}
.node-header .icon-button:hover {
  background: #2a3d47;
  border-color: #3b4d57;
}
.node-header .dot {
  width: 5px;
  height: 5px;
  flex-shrink: 0;
}
.node-terminal {
  padding: 11px 10px 5px 13px;
}
.node-footer {
  min-height: 20px;
  background: #182329;
  border-color: #2b3b44;
  padding: 1px 8px;
  font:
    9px ui-sans-serif,
    system-ui,
    sans-serif;
}
.node-footer button {
  color: #90aab6;
  font-size: 9px;
}
.node-footer .node-claim {
  color: #b6d3ca;
}
.node-placeholder {
  color: #9cb4bd;
  font-size: 11px;
}
.node-placeholder button {
  background: #243840;
  color: #d6e7e9;
  border-color: #40555e;
  border-radius: 7px;
}
.branch-edge {
  stroke-width: 1.5;
  opacity: 0.55;
}
.team-edge {
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.3;
  stroke-dasharray: 4 7;
}
.canvas-footer {
  border-radius: 12px;
  padding: 6px 7px 6px 13px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: 0 5px 20px #172b2208;
  color: var(--muted);
}
#canvas-hint {
  font-size: 10px;
  opacity: 0.7;
}
.camera-controls {
  border: 0;
  background: transparent;
  font:
    10px ui-monospace,
    monospace;
}
.camera-controls button {
  border-radius: 6px;
  padding: 7px 10px;
}
#fit-project {
  font:
    550 10px ui-sans-serif,
    system-ui,
    sans-serif;
  border-left: 1px solid var(--line);
  margin-left: 4px;
}
#expanded-layer.has-focus::before {
  content: "";
  position: absolute;
  inset: 92px 0 0;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  pointer-events: none;
}
#focus-toolbar {
  position: absolute;
  top: 108px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 34px;
  color: var(--ink);
}
#focus-toolbar[hidden] {
  display: none;
}
#return-to-graph {
  border-color: var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
  font-size: 11px;
}
#focus-title {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.focus-hint {
  margin-left: auto;
  font:
    8px ui-monospace,
    monospace;
  letter-spacing: 0.9px;
  color: var(--muted);
  white-space: nowrap;
}
.agent-node.expanded {
  inset: 158px 28px 28px;
  width: auto;
  height: auto;
  border-color: #526a73;
  border-radius: 14px;
  box-shadow:
    0 24px 90px #071a2830,
    0 3px 8px #071a2810;
}
.agent-node.expanded .node-header {
  min-height: 32px;
}
.agent-node.expanded .node-terminal {
  padding: 9px;
}
#drawer,
#graph-popover {
  box-shadow: -8px 0 50px #122b2212;
}
#drawer-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.drawer-section > h3 {
  font:
    600 9px ui-sans-serif,
    system-ui,
    sans-serif;
  letter-spacing: 1.2px;
  color: var(--muted);
}
:root[data-theme="graphite"] .primary {
  color: #13251d;
}
:root[data-theme="graphite"] .agent-node {
  box-shadow: 0 12px 40px #00000035;
}
@media (max-width: 1100px) {
  #project-sidebar {
    width: 184px;
    padding: 24px 12px 16px;
  }
  #workspace {
    margin-left: 184px;
  }
  .project-info {
    width: 100%;
    text-align: left;
    padding: 12px 9px;
    gap: 8px;
  }
  .brand strong {
    font-size: 20px;
  }
  .workspace-header {
    padding-inline: 24px;
  }
}
@media (max-width: 650px) {
  #project-sidebar {
    width: 210px;
  }
  #workspace {
    margin-left: 0;
  }
  .workspace-header {
    height: 78px;
    padding: 17px 18px;
  }
  .workspace-header h2 {
    font-size: 20px;
  }
  #expanded-layer.has-focus::before {
    top: 78px;
  }
  #focus-toolbar {
    top: 91px;
    left: 12px;
    right: 12px;
    gap: 10px;
  }
  #return-to-graph {
    font-size: 10px;
    padding: 7px 9px;
  }
  .focus-hint {
    display: none;
  }
  .agent-node.expanded {
    inset: 137px 10px 13px;
    border-radius: 11px;
  }
  .agent-node.expanded .node-terminal {
    padding: 12px 10px 6px;
  }
  .canvas-footer {
    padding: 4px;
  }
}

.theme-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.theme-option {
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 8px 8px 12px;
  border: 1px solid var(--line);
}
.theme-preview {
  position: relative;
  height: 68px;
  border-radius: 5px;
  overflow: hidden;
}
.theme-preview i {
  position: absolute;
  display: block;
  border-radius: 3px;
}
.theme-preview i:first-child {
  inset: 0;
  border-radius: 0;
}
.theme-preview::after {
  content: "";
  position: absolute;
  inset: -10px -5px -10px 10px;
  background: url("/scene-structures.svg") center / 180px auto;
  opacity: 0.35;
}
.theme-preview i:nth-child(2) {
  inset: 0 auto 0 0;
  width: 20%;
  opacity: 0.2;
  z-index: 1;
}
.theme-preview i:nth-child(3) {
  width: 42%;
  height: 29px;
  top: 20px;
  left: 42%;
  z-index: 2;
  box-shadow: 0 3px 7px #00000022;
}
.atmosphere-label {
  margin-top: 18px;
}
.theme-option strong,
.theme-option small {
  padding: 0 3px;
}
.task-intro {
  padding: 8px 0 20px;
}
.task-intro h3 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 450;
  letter-spacing: -1px;
  margin: 14px 0;
}
.task-intro p,
.task-empty p {
  color: var(--muted);
  line-height: 1.65;
}
.task-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  padding: 20px 0;
  margin-bottom: 20px;
  gap: 12px;
}
.task-metrics span {
  font-size: 10px;
  color: var(--muted);
}
.task-metrics strong {
  display: block;
  font-size: 25px;
  line-height: 1;
  color: var(--ink);
  font-weight: 450;
  margin-bottom: 9px;
}
.task-toolbar,
.task-detail-heading,
.task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.task-toolbar > :last-child,
.task-detail-heading > :last-child {
  margin-left: auto;
}
.task-list {
  display: grid;
  gap: 10px;
}
.task-row {
  display: grid;
  grid-template-columns: 1fr auto;
  text-align: left;
  gap: 8px;
  padding: 17px;
  background: var(--surface);
  border-radius: 9px;
}
.task-row .task-state {
  grid-column: 2;
  grid-row: 1;
}
.task-row > strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: -0.2px;
}
.task-row > small {
  grid-column: 1 / -1;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.65;
}
.task-row-meta {
  grid-column: 1 / -1;
  font:
    9px ui-monospace,
    monospace;
  color: var(--muted);
  padding-top: 4px;
}
.task-state {
  display: inline-block;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--hover);
  color: var(--ink);
  font:
    9px ui-monospace,
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.task-state[data-state="verified"] {
  color: #477051;
  background: #e1ecdf;
}
.task-state[data-state="blocked"],
.task-state[data-state="failed"] {
  color: #8c593f;
  background: #f4e7da;
}
:root[data-theme="graphite"] .task-state[data-state="verified"] {
  color: #bed4af;
  background: #303e2c;
}
:root[data-theme="graphite"] .task-state[data-state="blocked"],
:root[data-theme="graphite"] .task-state[data-state="failed"] {
  color: #e0bb9a;
  background: #493a2d;
}
.task-empty {
  padding: 42px 10px;
  text-align: center;
}
.task-empty > span {
  display: block;
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 22px;
}
.task-empty h3 {
  font-weight: 500;
  letter-spacing: -0.5px;
  font-size: 20px;
}
.task-brief,
.task-outcome {
  white-space: pre-wrap;
  line-height: 1.75;
}
.task-outcome {
  border-left: 2px solid var(--accent);
  padding: 8px 14px;
  background: var(--hover);
  font-size: 12px;
}
.task-actions button {
  font-size: 10px;
  padding: 7px 9px;
}
.task-link {
  display: block;
  margin: 8px 0;
  width: 100%;
  text-align: left;
}
.task-attempt {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--line);
  gap: 8px;
  padding: 12px 0;
  font-size: 11px;
}
.task-attempt strong {
  font-weight: 500;
}
.task-attempt small {
  color: var(--muted);
}
.task-attempt button {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 10px;
}
.task-messages article {
  border-left: 1px solid var(--line);
  padding: 0 0 16px 14px;
  margin-top: 16px;
}
.task-messages article header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.task-messages article header small {
  font:
    9px ui-monospace,
    monospace;
  color: var(--muted);
}
.task-messages article p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  #canvas::before {
    transform: none;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
  }
}
.theme-option[aria-pressed="true"] {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
}
.theme-swatches {
  display: flex;
  gap: 4px;
}
.theme-swatches i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #0000000a;
}
.theme-option strong {
  font-size: 11px;
  font-weight: 550;
}
.theme-option small {
  font-size: 9px;
  color: var(--muted);
}
@media (max-width: 650px) {
  .workspace-header h2 {
    font-size: 18px;
  }
  #attention {
    font-size: 0;
    padding: 8px;
    margin-left: 5px;
  }
  #attention::before {
    content: "!";
    font-size: 11px;
  }
  #attention-count {
    font-size: 11px;
    padding-left: 5px;
  }
  .workspace-header > div {
    min-width: 0;
  }
  .workspace-header h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #canvas::before {
    width: 140%;
    height: 60%;
    opacity: 0.2;
  }
}

.node-model {
  margin-left: auto;
  color: #93a9b3;
  font:
    9px ui-monospace,
    monospace;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45%;
  flex-shrink: 1;
}
.node-title {
  min-width: 0;
  flex-shrink: 1;
}
.head-badge {
  flex-shrink: 0;
}
.node-footer button {
  padding: 0 3px;
  line-height: 16px;
}
.node-footer .node-work {
  width: auto;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

@font-face {
  font-family: Inter;
  src: url("/fonts/inter-regular.ttf");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/inter-medium.ttf");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/inter-semibold.ttf");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/inter-bold.ttf");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-regular.ttf");
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-semibold.ttf");
  font-weight: 600;
  font-display: block;
}
:root {
  --paper: #f1f2ed;
  --sidebar: #fbfcf8;
  --line: #dfe4dc;
  --header: #f9faf6ee;
}
:root[data-theme="codex"] {
  --paper: #f0f2ee;
  --sidebar: #fafbf8;
  --line: #dce3db;
  --header: #fafbf8ed;
  --accent: #456b56;
  --accent-hover: #345640;
}
:root[data-theme="graphite"] {
  --paper: #161b1a;
  --sidebar: #1b2220;
  --line: #303b35;
  --header: #1b2220ed;
}
#project-sidebar {
  width: 224px;
  padding: 24px 16px 18px;
}
.brand {
  margin: 0 8px 30px;
}
.brand img {
  background: transparent;
  padding: 0;
  width: 27px;
}
.brand strong {
  font-family: Inter, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -1.2px;
}
.project-info {
  padding: 12px 10px;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  margin-bottom: 14px;
}
#project-mark {
  width: 30px;
  height: 30px;
  font-family: Inter, sans-serif;
}
#new-agent {
  height: 38px;
  font-size: 12px;
  margin-bottom: 22px;
  border-radius: 8px;
}
.nav-button,
.agent-link {
  font-family: Inter, sans-serif;
}
.nav-button.current {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.side-heading {
  margin-top: 30px;
  font-size: 9px;
  letter-spacing: 1.5px;
}
.agent-link {
  padding: 10px 12px;
  border-radius: 7px;
}
.agent-link small {
  font-size: 9px;
}
.local-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 10px 0;
  font-size: 10px;
  opacity: 0.8;
}
.local-note i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.workspace-header {
  height: 72px;
  padding: 15px 28px;
  gap: 18px;
  box-shadow: 0 1px 0 #ffffff66;
}
.workspace-heading {
  flex: 1;
  min-width: 0;
}
.workspace-location {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}
.workspace-header h2 {
  font:
    600 16px/1.2 Inter,
    sans-serif;
  letter-spacing: -0.5px;
  margin: 5px 0 0;
  white-space: nowrap;
}
#project-summary {
  font:
    400 10px Inter,
    sans-serif;
  letter-spacing: 0.1px;
  text-transform: none;
}
#project-directory {
  padding: 2px 0;
  font:
    400 10px "IBM Plex Mono",
    monospace;
  color: var(--muted);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  border: 0;
  border-radius: 0;
  max-width: 60%;
}
#project-directory:hover {
  color: var(--accent);
  background: transparent;
}
.workspace-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
#invite {
  background: var(--surface);
  border-color: var(--line);
  padding: 8px 13px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 2px 3px #243a2010;
}
#invite:hover {
  border-color: var(--accent);
}
#participants {
  display: flex;
  padding-left: 6px;
}
.participant-avatar {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid var(--sidebar);
  border-radius: 50%;
  font:
    600 10px Inter,
    sans-serif;
  color: white;
  background: var(--person-color);
}
#participants .participant-avatar {
  margin-left: -6px;
  box-shadow: 0 0 0 1px var(--line);
}
#canvas {
  inset: 72px 0 0;
  background-image: radial-gradient(
    color-mix(in srgb, var(--muted) 17%, transparent) 0.7px,
    transparent 0.7px
  );
}
#canvas::before {
  opacity: 0.07;
  bottom: -36%;
  right: -18%;
}
:root[data-atmosphere="structures"] #canvas::before {
  opacity: 0.08;
}
.agent-node {
  border-radius: 10px;
  border-color: #35413e;
  box-shadow:
    0 2px 3px #11251c10,
    0 12px 24px -6px #23372a30,
    0 38px 64px -24px #23372a18;
}
.agent-node.head-agent {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent),
    0 16px 40px -10px #18302035;
}
.node-header {
  background: #1c282b;
  border-bottom-color: #2d393b;
}
.head-agent .node-header {
  background: linear-gradient(110deg, #23332e, #1c282b 75%);
}
.node-avatar {
  border-radius: 5px;
  background: #283634;
  border-color: #40504a;
  color: #b7cec1;
}
.node-title {
  font-family: Inter, sans-serif;
  font-weight: 500;
  letter-spacing: -0.15px;
}
.node-model {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  color: #8da39d;
}
.node-terminal .xterm-viewport {
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.node-footer {
  background: #182225;
  border-top-color: #293633;
}
.node-footer button {
  color: #93a8a0;
  font-family: Inter, sans-serif;
  font-size: 8px;
}
.node-footer .node-claim {
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-node.expanded {
  inset: 124px 26px 76px;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 12px 80px #13291b38;
}
.canvas-footer {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  bottom: 20px;
  left: 26px;
  right: 26px;
}
.camera-controls {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  padding: 3px;
  box-shadow: 0 4px 12px #2436230a;
}
#canvas-hint {
  font:
    400 10px Inter,
    sans-serif;
  opacity: 0.65;
}
#focus-toolbar {
  top: 82px;
}
#drawer {
  top: 72px;
  box-shadow: -12px 0 40px #1d34200d;
}
.drawer-heading h2 {
  font-family: Inter, sans-serif;
  font-weight: 600;
  letter-spacing: -0.4px;
  font-size: 17px;
}
.sharing-intro {
  padding: 4px 0 12px;
}
.sharing-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--hover);
  font-size: 25px;
  color: var(--accent);
  margin: 4px 0 22px;
}
.sharing-intro h3 {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.9px;
  line-height: 1.15;
  margin: 0 0 12px;
}
.sharing-intro p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}
.invite-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.invite-permissions {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 16px;
}
#invite-form label {
  font-size: 11px;
}
#invite-form select {
  font-size: 11px;
}
#invite-status {
  font-size: 11px;
  color: var(--accent);
  line-height: 1.6;
}
#your-profile {
  display: flex;
  align-items: end;
  gap: 8px;
}
#your-profile label {
  flex: 1;
  margin: 0;
  font-size: 11px;
}
#drawer #your-profile > button {
  width: auto;
  flex-shrink: 0;
  font-size: 11px;
  margin-bottom: 1px;
  white-space: nowrap;
}
.person-row,
.invitation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.person-row > div,
.invitation-row > div {
  flex: 1;
  min-width: 0;
}
.person-row strong,
.invitation-row strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
}
.person-row small,
.invitation-row small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.person-row strong small {
  display: inline;
}
.person-row button,
.invitation-row button {
  font-size: 10px;
  padding: 6px;
}
.invitation-row {
  gap: 6px;
}
#collaborator-cursors {
  pointer-events: none;
}
.collaborator-cursor {
  position: absolute;
  color: var(--person-color);
  pointer-events: none;
  transform-origin: 0 0;
  z-index: 15;
  display: flex;
  align-items: start;
  gap: 1px;
}
.cursor-arrow {
  font-size: 20px;
  transform: rotate(-115deg);
  text-shadow: 0 1px 1px white;
}
.cursor-name {
  color: white;
  background: var(--person-color);
  border: 1px solid #ffffff66;
  border-radius: 4px 8px 8px 8px;
  padding: 4px 7px;
  margin-top: 15px;
  font:
    500 10px Inter,
    sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 5px #0001;
}
@media (max-width: 1050px) {
  .workspace-location {
    gap: 8px;
  }
  #project-directory {
    max-width: 40%;
  }
}
@media (max-width: 700px) {
  #project-sidebar {
    width: 210px;
  }
  .workspace-header {
    padding: 12px 16px;
    gap: 10px;
  }
  .workspace-header h2 {
    font-size: 14px;
  }
  #project-directory {
    display: none;
  }
  .workspace-actions {
    gap: 10px;
  }
  #participants .participant-avatar:nth-child(n + 3) {
    display: none;
  }
  #canvas {
    inset: 72px 0 0;
  }
  #drawer {
    top: 72px;
  }
  .agent-node.expanded {
    inset: 90px 12px 72px;
    width: auto;
  }
}

.node-connection {
  color: var(--terminal-muted);
  font:
    400 8px Inter,
    sans-serif;
  white-space: nowrap;
}
.node-message[data-kind="connection"] {
  background: #1e2a2e;
  color: var(--terminal-muted);
  font-size: 10px;
}

/* UltraFlow's curated workspace. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-semibold.ttf");
  font-weight: 600;
  font-display: swap;
}
:root[data-theme="ultraflow"] {
  color-scheme: dark;
  --paper: #090d19;
  --ink: #f2f4fa;
  --surface: #141b2c;
  --line: #2b3650;
  --hover: #1b253a;
  --accent: #5969ff;
  --accent-hover: #7180ff;
  --muted: #a0abc1;
  --sidebar: #0d1220;
  --header: #0d1220ed;
  --accent-line: #6573cb;
  --terminal-bg: #0c111d;
  --terminal-fg: #e1e6f2;
}
[data-theme="ultraflow"] #project-sidebar {
  width: 208px;
  padding: 26px 14px 18px;
  background: linear-gradient(160deg, #141b30, #0d1220 45%);
}
[data-theme="ultraflow"] #workspace { margin-left: 208px; }
[data-theme="ultraflow"] .brand { margin: 0 8px 30px; gap: 10px; }
[data-theme="ultraflow"] .brand img { width: 32px; height: 32px; padding: 0; border-radius: 7px; }
[data-theme="ultraflow"] .brand strong {
  font: 600 31px/1 "Barlow Condensed", Inter, sans-serif;
  letter-spacing: -0.7px;
}
[data-theme="ultraflow"] .project-info { border-radius: 7px; background: #141b2b; }
[data-theme="ultraflow"] #project-mark { background: #242e4a; color: #c9d1ff; border-radius: 5px; }
[data-theme="ultraflow"] #new-agent { border-radius: 6px; box-shadow: 0 4px 20px #3346df20; }
[data-theme="ultraflow"] .nav-button { border-radius: 5px; }
[data-theme="ultraflow"] .nav-button.current { background: #202a45; color: #e2e7ff; }
[data-theme="ultraflow"] .agent-link.active { background: #1b253a; }
[data-theme="ultraflow"] .workspace-header { height: 64px; background: #0d1220ed; border-color: #243049; }
[data-theme="ultraflow"] #canvas {
  inset: 64px 0 0;
  background-color: #090d19;
  background-image: radial-gradient(ellipse at 50% 0%, #25346c35, transparent 70%), radial-gradient(#6c7d9d1a 0.7px, transparent 0.7px);
  background-size: 100% 100%, 24px 24px;
}
[data-theme="ultraflow"] #canvas::before { display: none; }
[data-theme="ultraflow"] .agent-node {
  --terminal-bg: #0c111d;
  --terminal-fg: #e1e6f2;
  --terminal-muted: #98a6c1;
  --terminal-line: #2a3550;
  --node-header: #182138;
  border-radius: 8px;
  border-color: #33415e;
  box-shadow: 0 4px 12px #0003, 0 24px 54px -20px #000a;
}
[data-theme="ultraflow"] .agent-node.head-agent {
  border-color: #7482d6;
  box-shadow: 0 0 0 1px #687bff20, 0 0 60px -14px #4b63d955, 0 24px 50px -12px #0009;
}
[data-theme="ultraflow"] .node-header { background: #182138; border-bottom-color: #293650; }
[data-theme="ultraflow"] .head-agent .node-header { background: linear-gradient(110deg, #273761, #182138 85%); }
[data-theme="ultraflow"] .node-avatar { background: #273354; border-color: #465781; color: #d3dcff; }
[data-theme="ultraflow"] .node-model { color: #b0bdd8; }
[data-theme="ultraflow"] .node-status { color: #9caac2; }
[data-theme="ultraflow"] .node-footer { background: #121b2b; border-top-color: #25314a; }
[data-theme="ultraflow"] .node-footer button { color: #aebbd3; }
[data-theme="ultraflow"] .agent-node.expanded { inset: 116px 24px 70px; box-shadow: 0 28px 90px #000a; }
[data-theme="ultraflow"] #focus-toolbar { top: 76px; }
[data-theme="ultraflow"] .head-badge { color: #ced6ff; background: #5e72ff20; border-color: #8393ff40; }
[data-theme="ultraflow"] .branch-edge { opacity: 0.58; }
[data-theme="ultraflow"] #drawer { border-left-color: #2b3650; box-shadow: -20px 0 70px #0005; }
[data-theme="ultraflow"] #notice { background: #202a42; border-color: #4b5d88; color: #eef2ff; box-shadow: 0 8px 30px #0006; }
[data-theme="ultraflow"] .source-view { background: #0c111d; color: #dbe4f4; }
[data-theme="ultraflow"] button:focus-visible,
[data-theme="ultraflow"] a:focus-visible { outline-color: #a5b2ff; }
.folder-field { display: flex; gap: 8px; margin-top: 8px; }
.folder-field input { min-width: 0; flex: 1; margin: 0; }
.folder-field button { flex-shrink: 0; }
.settings-links { display: grid; gap: 8px; }
.settings-links button { display: flex; justify-content: space-between; text-align: left; }
.directory-value { font-family: "IBM Plex Mono", monospace; font-size: 11px; overflow-wrap: anywhere; line-height: 1.7; }
.workspace-save-item { gap: 13px; padding: 16px 12px; align-items: center; }
.save-symbol { display: grid; place-items: center; width: 38px; height: 42px; background: #283657; border: 1px solid #4b6095; border-radius: 5px; color: #d5dfff; font-size: 23px; }
.save-arrow { margin-left: auto; color: var(--muted); }
.save-empty { padding: 32px 12px; color: var(--muted); line-height: 1.7; }
.save-empty h3 { color: var(--ink); font-size: 20px; font-weight: 500; }
.saved-agent-list > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.saved-agent-list strong, .saved-agent-list small { display: block; }
.saved-agent-list small { color: var(--muted); margin-top: 5px; }
@media (max-width: 800px) {
  [data-theme="ultraflow"] #project-sidebar { transform: translateX(-100%); transition: transform 0.18s; }
  [data-theme="ultraflow"] body.sidebar-open #project-sidebar { transform: translateX(0); }
  [data-theme="ultraflow"] #sidebar-toggle { display: block; }
  [data-theme="ultraflow"] #workspace { margin-left: 0; }
  [data-theme="ultraflow"] .workspace-header { height: 64px; }
  [data-theme="ultraflow"] #canvas { inset: 64px 0 0; }
  [data-theme="ultraflow"] .agent-node.expanded { inset: 110px 10px 64px; }
  [data-theme="ultraflow"] #save-workspace { font-size: 11px; padding: 8px; }
  [data-theme="ultraflow"] #drawer { top: 64px; }
}
@media (max-width: 480px) {
  [data-theme="ultraflow"] .workspace-header { padding-inline: 12px; gap: 8px; }
  [data-theme="ultraflow"] .workspace-actions { gap: 8px; }
  [data-theme="ultraflow"] #save-workspace { font-size: 0; }
  [data-theme="ultraflow"] #save-workspace::before { content: "Save"; font-size: 12px; }
  [data-theme="ultraflow"] #participants .participant-avatar:nth-child(n + 2) { display: none; }
}
