:root {
  color-scheme: light;
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-soft: #eef0f2;
  --surface-hover: #e3e5e8;
  --board: #f4f5f6;
  --pastel: #e9edf2;
  --pastel-strong: #dde3e9;
  --pastel-ink: #46576b;
  --text: #202124;
  --muted: #686c72;
  --faint: #92969d;
  --line: rgb(32 33 36 / 8%);
  --line-strong: rgb(32 33 36 / 14%);
  --accent: #596b7f;
  --accent-hover: #46576b;
  --accent-soft: #e8edf2;
  --accent-faint: rgb(89 107 127 / 13%);
  --action: #3972d5;
  --action-hover: #2f63bc;
  --action-soft: #eaf1fc;
  --action-faint: rgb(57 114 213 / 16%);
  --success: #31a24c;
  --danger: #d93025;
  --shadow-small: 0 1px 2px rgb(28 30 33 / 7%);
  --shadow-card: 0 2px 8px rgb(28 30 33 / 10%);
  --shadow-float: 0 12px 34px rgb(28 30 33 / 18%);
  --ui-font: "Zalando Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display-font: "Zalando Sans", var(--ui-font);
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-family: var(--ui-font);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgb(89 107 127 / 30%);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

::selection {
  color: var(--accent-hover);
  background: rgb(89 107 127 / 18%);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgb(101 103 107 / 28%);
  background-clip: padding-box;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  --messenger-blue: var(--action);
  --messenger-hover: var(--surface-soft);
  --messenger-selected: var(--accent-soft);
  position: relative;
  z-index: 5;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(18px);
}

.brand-bar {
  display: flex;
  height: 58px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-button strong,
.brand-button small {
  display: block;
}

.brand-button strong {
  font-family: var(--display-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-button small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #738295, #46515e);
  box-shadow: 0 2px 7px rgb(32 33 36 / 18%);
  font-family: var(--display-font);
  font-size: 15px;
  font-weight: 750;
}

.system-light,
.status-dot,
.summary-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.system-light {
  background: var(--success);
  box-shadow: 0 0 0 3px rgb(49 162 76 / 12%);
}

.sidebar-view {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 5px 10px 10px;
}

.chat-list-heading {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.chat-list-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.chat-list-heading h2 small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.compose-agent {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0 0 2px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--messenger-blue);
  box-shadow: 0 2px 7px var(--action-faint);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background 140ms ease, transform 140ms ease;
}

.compose-agent:hover {
  background: var(--action-hover);
}

.compose-agent:active {
  transform: scale(0.94);
}

.agent-search {
  display: grid;
  min-height: 36px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  margin: 2px 2px 10px;
  padding: 0 10px;
  border-radius: 999px;
  color: #65676b;
  background: var(--messenger-hover);
}

.agent-search > span {
  font-size: 20px;
  text-align: center;
}

.agent-search input {
  height: 36px;
  padding: 0 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.agent-search input:focus {
  box-shadow: none;
}

.agent-search input::-webkit-search-cancel-button {
  opacity: 0.55;
}

.agent-list {
  display: grid;
  min-height: 0;
  flex: 1;
  align-content: start;
  gap: 0;
  overflow: auto;
}

.agent-list-group {
  display: grid;
  gap: 0;
}

.agent-list-section {
  margin: 8px 10px 2px;
  color: #8a8d91;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.agent-list-group:first-child .agent-list-section {
  margin-top: 2px;
}

.agent-contact-item {
  min-width: 0;
}

.agent-contact {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, transform 140ms ease;
}

.agent-contact:hover {
  background: var(--messenger-hover);
}

.agent-contact:active {
  transform: scale(0.988);
}

.agent-contact.is-selected {
  background: var(--messenger-selected);
}

.agent-profile-avatar {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  overflow: hidden;
  place-items: end center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
}

.agent-portrait {
  display: block;
  font-size: 27px;
  line-height: 1.25;
  transform: translateY(2px);
}

.avatar-tone-0 {
  background: linear-gradient(145deg, #c6e5ff, #82baf5);
}

.avatar-tone-1 {
  background: linear-gradient(145deg, #d9f4dc, #8fc89a);
}

.avatar-tone-2 {
  background: linear-gradient(145deg, #ffe8bd, #edbd6d);
}

.avatar-tone-3 {
  background: linear-gradient(145deg, #f3d9ea, #ca91b5);
}

.avatar-tone-4 {
  background: linear-gradient(145deg, #ffded7, #df9e92);
}

.avatar-tone-5 {
  background: linear-gradient(145deg, #e2ddff, #aaa0df);
}

.agent-presence {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid white;
  border-radius: 50%;
  background: #31a24c;
}

.agent-type-marker {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--body-font);
  font-weight: 800;
}

.agent-type-marker.is-primary {
  color: white;
  background: #2f8f4e;
}

.agent-type-marker.is-sample {
  color: #6e5aa8;
  background: #eee9fb;
}

.agent-chat-copy {
  min-width: 0;
}

.agent-chat-copy strong,
.agent-chat-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-chat-copy strong {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.agent-chat-copy small {
  margin-top: 2px;
  color: #65676b;
  font-size: 10px;
}

.agent-contact.is-selected .agent-chat-copy small {
  color: var(--accent-hover);
}

.agent-chat-state {
  align-self: start;
  min-width: 48px;
  padding-top: 5px;
  color: #8a8d91;
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}

.agent-chat-state.is-live {
  color: var(--messenger-blue);
  font-weight: 650;
}

.agent-search-empty {
  margin: 22px 10px;
  color: #65676b;
  font-size: 11px;
  text-align: center;
}

.shared-workspaces {
  flex: 0 0 auto;
  padding: 12px 10px 10px;
  border-top: 1px solid var(--line);
}

.shared-workspaces-heading {
  margin: 0 8px 7px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.shared-workspace-list {
  display: grid;
  gap: 3px;
}

.shared-workspace-link {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.shared-workspace-link:hover {
  color: var(--text);
  background: var(--messenger-hover);
}

.shared-workspace-link:active {
  transform: scale(0.988);
}

.shared-workspace-link.is-active {
  color: var(--accent-hover);
  background: var(--messenger-selected);
}

.shared-workspace-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.shared-workspace-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.shared-workspace-link.is-active .shared-workspace-icon {
  border-color: transparent;
  color: white;
  background: var(--accent);
}

.shared-workspace-copy {
  min-width: 0;
}

.shared-workspace-copy strong,
.shared-workspace-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-workspace-copy strong {
  color: inherit;
  font-size: 12px;
  font-weight: 650;
}

.shared-workspace-copy small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.shared-workspace-link.is-active .shared-workspace-copy small {
  color: var(--accent);
}

.shared-workspace-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  margin-left: 0;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
}

.shared-workspace-count.has-events {
  color: var(--danger);
  background: rgb(217 48 37 / 10%);
}

.shared-workspace-arrow {
  padding-right: 3px;
  color: var(--faint);
  font-size: 18px;
  line-height: 1;
}

.tab-count {
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.breadcrumb-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.breadcrumb-button:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.sidebar-footer {
  display: flex;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
}

.sidebar-footer .status-dot {
  width: 6px;
  height: 6px;
  margin-right: 5px;
  background: var(--success);
}

kbd {
  padding: 3px 7px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: none;
  font-family: inherit;
}

.workspace {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  position: relative;
  z-index: 4;
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: saturate(160%) blur(22px);
}

.agent-heading,
.workspace-scope-heading,
.toolbar,
.actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.workspace-scope-heading {
  flex: 1;
  overflow: hidden;
}

.workspace-scope-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.breadcrumb-button {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.breadcrumb-separator {
  color: var(--faint);
}

.agent-title-stack {
  display: flex;
  width: min(30vw, 370px);
  min-width: 140px;
  flex-direction: column;
  justify-content: center;
}

.agent-title-input {
  width: 100%;
  min-width: 0;
  height: 25px;
  padding: 1px 8px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.agent-description {
  display: block;
  overflow: hidden;
  padding: 0 8px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-title-input:hover,
.agent-title-input:focus {
  background: var(--surface-soft);
  box-shadow: none;
}

.agent-title-input:focus {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.status-pill {
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  letter-spacing: 0.01em;
  font-size: 9px;
  font-weight: 650;
}

.agent-type-marker {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  font-size: 10px;
}

.status-pill.is-saved {
  color: var(--muted);
}

.status-pill.is-runtime,
.status-pill.is-dirty {
  color: var(--accent);
  background: var(--accent-soft);
}

.status-pill.is-runtime {
  color: #21783a;
  background: #e5f5e9;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-soft);
  cursor: pointer;
  font-family: var(--display-font);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button:hover {
  background: var(--surface-hover);
}

.button:active {
  transform: scale(0.975);
}

.button.primary {
  color: white;
  background: var(--action);
  box-shadow: 0 2px 7px var(--action-faint);
}

.button.primary:hover {
  background: var(--action-hover);
  box-shadow: 0 3px 9px rgb(57 114 213 / 22%);
}

.button.secondary {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.button.ghost {
  color: var(--muted);
  background: transparent;
}

.button.ghost:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.button.danger {
  color: var(--danger);
}

.button.full {
  width: 100%;
}

.button.mini {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
}

.call-button {
  color: var(--action);
  background: var(--action-soft);
  box-shadow: none;
}

.call-button .status-dot {
  background: var(--success);
}

.call-button .status-dot {
  box-shadow: none;
}

.call-button.is-disabled {
  color: var(--faint);
  background: var(--surface-soft);
  box-shadow: none;
  cursor: not-allowed;
}

.call-button.is-disabled .status-dot {
  background: var(--faint);
  box-shadow: none;
}

.workspace-tabs {
  position: relative;
  z-index: 3;
  display: flex;
  height: 46px;
  align-items: center;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(28 30 33 / 4%);
}

.workspace-tab {
  position: relative;
  align-self: stretch;
  min-height: 46px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--display-font);
  font-size: 12px;
  font-weight: 600;
}

.workspace-tab:hover {
  color: var(--text);
  background: transparent;
}

.workspace-tab.is-active {
  color: var(--accent);
  background: transparent;
}

.workspace-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 140ms ease, transform 140ms ease;
}

.workspace-tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.workspace-tab-help {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--faint);
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
}

.workspace-tab-help:hover,
.workspace-tab-help.is-active {
  opacity: 1;
}

.workspace-tab-info {
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

.tab-count {
  margin-left: 4px;
}

.tab-count.has-events {
  color: var(--accent);
}

.shared-workspace-link .shared-workspace-count {
  margin-left: 0;
}

.shared-workspace-link .shared-workspace-count.has-events {
  color: var(--danger);
}

.workspace-view {
  height: calc(100vh - 104px);
  min-height: 0;
}

.shared-workspace-chrome {
  display: none;
}

body.is-shared-workspace .agent-workspace-chrome {
  display: none;
}

body.is-shared-workspace .shared-workspace-chrome {
  display: flex;
}

body.is-shared-workspace .workspace-view {
  height: calc(100vh - 58px);
}

.builder-layout {
  --hud-width: 310px;
  position: relative;
  display: block;
  height: 100%;
  padding: 10px;
  background: var(--board);
}

.canvas-panel,
.canvas-viewport {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.canvas-panel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--board);
}

.canvas-viewport {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  cursor: grab;
  touch-action: none;
  background-color: var(--board);
  background-image: radial-gradient(circle at 1px 1px, rgb(89 107 127 / 12%) 1px, transparent 1.2px);
  background-position: 0 0;
  background-size: 20px 20px;
}

.canvas-viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.canvas-viewport.is-panning {
  cursor: grabbing;
}

.canvas-stage {
  position: relative;
  width: 1200px;
  height: 900px;
  min-width: 100%;
  min-height: 100%;
}

.flow-board {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 900px;
  transform: scale(1);
  transform-origin: 0 0;
  will-change: transform;
}

.connection-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.connection-layer marker path {
  fill: #8a8d91;
}

.flow-connection {
  stroke: #8a8d91;
  stroke-width: 2;
  opacity: 0.95;
}

.flow-node {
  position: absolute;
  z-index: 1;
  display: flex;
  width: 244px;
  height: 134px;
  flex-direction: column;
  padding: 12px 14px 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  cursor: grab;
  user-select: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.flow-node[data-node-kind="step"] {
  background: var(--surface);
}

.flow-node[data-node-kind="branch"] {
  background: #faf8f1;
}

.flow-node[data-node-kind="tool"] {
  background: #f0f3f5;
}

.flow-node[data-node-kind="action"] {
  background: #f5f2f5;
}

.flow-node[data-node-kind="start"] {
  background: #f1f6f2;
}

.flow-node[data-node-kind="end"] {
  background: #f8f2f1;
}

.flow-node:hover {
  border-color: rgb(89 107 127 / 40%);
  box-shadow: 0 4px 14px rgb(28 30 33 / 12%);
}

.flow-node.is-selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-faint),
    0 4px 14px rgb(28 30 33 / 12%);
}

.flow-node.is-dragging {
  z-index: 4;
  box-shadow:
    0 0 0 3px var(--accent-faint),
    0 8px 22px rgb(28 30 33 / 18%);
  cursor: grabbing;
  transform: scale(1.015);
}

.node-card-header,
.node-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.node-card-header {
  margin-bottom: 8px;
}

.node-meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.node-index {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.node-card-kind {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-transform: uppercase;
}

.flow-node[data-node-kind="start"] .node-card-kind {
  color: #21783a;
  background: #d5e8d7;
}

.flow-node[data-node-kind="end"] .node-card-kind {
  color: var(--pastel-ink);
  background: #ecd3cc;
}

.flow-node[data-node-kind="branch"] .node-card-kind {
  color: #6a5b2b;
  background: #ecdfb5;
}

.flow-node[data-node-kind="tool"] .node-card-kind {
  color: #38566d;
  background: #d4e5f1;
}

.flow-node[data-node-kind="action"] .node-card-kind {
  color: #6a4b59;
  background: #ead7df;
}

.node-grip {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
  line-height: 1;
}

.flow-node h3 {
  overflow: hidden;
  margin: 0 0 5px;
  font-size: 15px;
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.flow-node.is-end .node-summary {
  -webkit-line-clamp: 2;
}

.node-stat {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: rgb(255 255 255 / 72%);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.25;
}

.node-route {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.2;
}

.node-route strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-node {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: calc(var(--hud-width) + 20px);
  color: white;
  border: 0;
  background: var(--action);
  box-shadow: 0 3px 10px var(--action-faint);
  backdrop-filter: blur(12px);
}

.add-node:hover {
  color: white;
  background: var(--action-hover);
}

.canvas-navigation {
  position: absolute;
  z-index: 4;
  bottom: 16px;
  left: 16px;
  display: flex;
  overflow: hidden;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow-card);
  backdrop-filter: saturate(135%) blur(14px);
}

.canvas-navigation button {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.canvas-navigation button:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.canvas-navigation button:disabled {
  color: var(--line-strong);
  cursor: default;
}

.canvas-navigation button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.canvas-navigation #zoom-reset {
  min-width: 48px;
  border-inline: 1px solid var(--line);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.canvas-navigation > span {
  width: 1px;
  height: 20px;
  margin-inline: 2px;
  background: var(--line);
}

.canvas-navigation .fit-canvas {
  min-width: 40px;
}

.canvas-empty {
  position: absolute;
  top: 90px;
  left: 50%;
  color: var(--muted);
  transform: translateX(-50%);
}

.inspector {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  bottom: 6px;
  width: var(--hud-width);
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(255 255 255 / 97%);
  box-shadow: var(--shadow-card);
  backdrop-filter: saturate(135%) blur(18px);
}

.inspector-empty {
  display: grid;
  height: 100%;
  place-content: center;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.inspector-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-inline: auto;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 9px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 26px;
}

.inspector-empty h2 {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 15px;
}

.inspector-empty p {
  margin: 0;
  font-size: 12px;
}

#node-form {
  padding: 14px 12px 12px;
}

.inspector-header,
.transition-heading,
.dialog-header,
.dialog-footer,
.events-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inspector-header {
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
}

.inspector-header h2,
.dialog-header h2 {
  margin: 0;
  font-size: 18px;
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.inspector-header h2 {
  font-size: 16px;
}

.inspector .kicker {
  margin-bottom: 2px;
  font-size: 9px;
}

.node-number {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

label {
  display: block;
  margin: 13px 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: none;
}

.inspector input,
.inspector select,
.inspector textarea {
  border-radius: 10px;
  background: var(--surface-soft);
  box-shadow: none;
  font-size: 11px;
}

.inspector label {
  margin: 9px 0 4px;
  font-size: 10px;
}

.inspector input,
.inspector select {
  height: 34px;
  padding: 6px 9px;
}

.inspector textarea {
  min-height: 60px;
  padding: 8px 9px;
}

#node-task {
  height: 86px;
}

input,
select {
  height: 38px;
  padding: 8px 11px;
}

textarea {
  min-height: 82px;
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.45;
}

input:hover,
select:hover,
textarea:hover {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.field-hint {
  margin: 1px 0 0;
  color: var(--faint);
  font-size: 9px;
}

.node-actions-summary {
  margin-top: 9px;
  padding: 9px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.node-actions-summary strong {
  display: block;
  font-size: 10px;
}

.node-actions-summary p {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.4;
}

.node-actions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.node-action-chip {
  padding: 3px 6px;
  border-radius: 999px;
  color: #38566d;
  background: #d4e5f1;
  font-size: 9px;
  font-weight: 650;
}

.transition-heading {
  align-items: end;
  gap: 8px;
  margin-top: 10px;
}

.transition-heading label {
  margin-bottom: 1px;
}

.transition-list {
  display: grid;
  gap: 0;
  margin-top: 6px;
}

.transition-editor {
  padding: 9px;
  border: 0;
  border-radius: 11px;
  background: var(--surface-soft);
  box-shadow: none;
}

.transition-editor + .transition-editor {
  margin-top: 6px;
  border-top: 0;
}

.transition-editor header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.transition-title {
  font-size: 10px;
  font-weight: 700;
}

.remove-transition {
  padding: 4px 6px;
  border: 0;
  border-radius: 7px;
  color: var(--danger);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.remove-transition:hover {
  background: var(--accent-soft);
}

.transition-editor label {
  margin-top: 7px;
}

.transition-editor textarea {
  height: 54px;
  min-height: 50px;
  background: var(--surface);
  box-shadow: none;
}

.transition-editor select {
  background: var(--surface);
  box-shadow: none;
}

.guard-badge {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 650;
}

.toggle-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: 10px 0;
  padding: 9px;
  border: 0;
  border-radius: 11px;
  background: var(--surface-soft);
  box-shadow: none;
  cursor: pointer;
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  color: var(--text);
  font-size: 11px;
}

.toggle-row small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
}

.toggle {
  position: relative;
  width: 32px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #bcc0c4;
  transition: background 160ms ease;
}

.toggle::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgb(28 30 33 / 22%);
  content: "";
  transition: transform 160ms ease;
}

.toggle-row input:checked + .toggle {
  background: var(--accent);
}

.toggle-row input:checked + .toggle::after {
  transform: translateX(12px);
}

.inspector-actions {
  display: grid;
  gap: 4px;
}

.inspector-actions .button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}

#flow-view.is-read-only .add-node:disabled,
#flow-view.is-read-only .inspector button:disabled {
  color: var(--faint);
  background: #e4e6e8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

#flow-view.is-read-only .inspector input:disabled,
#flow-view.is-read-only .inspector select:disabled,
#flow-view.is-read-only .inspector textarea:disabled {
  color: var(--muted);
  background: #eceeef;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

#flow-view.is-read-only .toggle-row {
  color: var(--faint);
  background: #eceeef;
  cursor: not-allowed;
}

#flow-view.is-read-only .toggle-row strong,
#flow-view.is-read-only .toggle-row small {
  color: var(--faint);
}

#flow-view.is-read-only .remove-transition:disabled {
  color: var(--faint);
}

.help-view {
  overflow: auto;
  background: var(--surface);
}

.help-heading {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--line);
}

.help-heading h1 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.help-heading .button {
  color: var(--faint);
  font-size: 10px;
}

.help-heading .status-dot {
  width: 6px;
  height: 6px;
}

.help-scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-scenario {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 26px 30px;
  border-bottom: 1px solid var(--line);
}

.help-scenario:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.help-scenario:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.help-scenario > header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 17px;
}

.help-scenario-number {
  width: 20px;
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.help-scenario-label {
  display: block;
  margin-bottom: 2px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.help-scenario h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 15px;
  letter-spacing: -0.01em;
}

.help-prompt > span,
.help-follow-ups > span {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 650;
}

.help-prompt blockquote {
  margin: 0;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--line-strong);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.help-follow-ups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.help-follow-ups > span {
  width: 100%;
  margin: 0;
}

.help-follow-ups code {
  color: var(--accent-hover);
  font-family: var(--ui-font);
  font-size: 9px;
}

.help-follow-ups code + code::before {
  margin-right: 6px;
  color: var(--faint);
  content: "→";
}

.help-expected {
  margin: auto 0 0;
  padding-top: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.help-prompt + .help-expected,
.help-follow-ups + .help-expected {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.help-expected strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 9px;
  text-transform: uppercase;
}

.help-policy-demo {
  padding: 28px 30px 30px;
  border-top: 1px solid var(--line);
}

.help-policy-demo > header {
  margin-bottom: 20px;
}

.help-policy-demo h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.help-policy-demo ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-policy-demo li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 0 26px;
  border-right: 1px solid var(--line);
}

.help-policy-demo li:first-child {
  padding-left: 0;
}

.help-policy-demo li:last-child {
  padding-right: 0;
  border-right: 0;
}

.help-policy-demo li > span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.help-policy-demo li strong {
  display: block;
  margin: 0 0 5px;
  font-size: 11px;
}

.help-policy-demo li p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.help-footer-note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.help-footer-note strong {
  flex: 0 0 auto;
  color: var(--text);
}

.observability-view {
  --event-conversation: #64788e;
  --event-conversation-soft: #eef1f4;
  --event-conversation-line: #d8e0e7;
  --event-conversation-ink: #465b70;
  --event-flow: #31a24c;
  --event-flow-soft: #e9f7ed;
  --event-flow-line: #c7e8cf;
  --event-flow-ink: #21783a;
  --event-tool: #c47d16;
  --event-tool-soft: #fff5e4;
  --event-tool-line: #f0d7ad;
  --event-tool-ink: #80520f;
  --event-performance: #8b5cf6;
  --event-performance-soft: #f2edff;
  --event-performance-line: #dbceff;
  --event-performance-ink: #6540bd;
  --event-system: #8a8d91;
  --event-system-soft: #f0f2f5;
  --event-system-line: #dfe1e5;
  --event-system-ink: #65676b;
  --event-error: #d93025;
  --event-error-soft: #fff0ef;
  --event-error-line: #f1c5c1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--board);
}

.calls-view {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--surface);
}

.calls-meta {
  color: var(--faint);
  font-size: 10px;
}

.call-studio-layout {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 30%);
  gap: 0;
}

.live-call-card,
.call-history-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.live-call-card {
  display: grid;
  grid-template-rows: auto minmax(130px, 1fr) clamp(128px, 15vh, 154px) auto;
  border-right: 1px solid var(--line);
}

.live-call-header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}

.live-call-header > div {
  display: grid;
  gap: 2px;
}

.live-call-header strong {
  font-size: 12px;
}

.live-call-header time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.live-call-status {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-call-status i,
.media-state i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--faint);
}

.live-call-status.is-active,
.live-call-status.is-connecting {
  color: #21783a;
}

.live-call-status.is-active i,
.live-call-status.is-connecting i {
  background: var(--success);
  box-shadow: 0 0 0 3px rgb(49 162 76 / 12%);
}

.live-call-status.is-failed {
  color: var(--danger);
}

.live-call-status.is-failed i {
  background: var(--danger);
}

.live-call-chat {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
  background:
    linear-gradient(rgb(255 255 255 / 90%), rgb(255 255 255 / 90%)),
    radial-gradient(circle at 1px 1px, rgb(89 107 127 / 14%) 1px, transparent 1.2px);
  background-size: auto, 18px 18px;
  scroll-behavior: smooth;
}

.live-call-chat-empty {
  display: grid;
  height: 100%;
  min-height: 100px;
  align-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.live-call-chat-empty > span {
  margin-bottom: 4px;
  color: var(--action);
  font-size: 20px;
}

.live-call-chat-empty strong {
  color: var(--text);
  font-size: 11px;
}

.live-call-chat-empty small {
  margin-top: 3px;
  font-size: 9px;
}

.live-call-messages {
  display: grid;
  gap: 7px;
}

.live-message {
  display: flex;
  max-width: min(78%, 560px);
  align-items: flex-end;
  gap: 7px;
}

.live-message.is-caller {
  margin-left: auto;
  flex-direction: row-reverse;
}

.live-message-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  font-size: 7px;
  font-weight: 700;
}

.live-message.is-caller .live-message-avatar {
  background: var(--action);
}

.live-message-bubble {
  min-width: 0;
  padding: 7px 10px 5px;
  border-radius: 15px 15px 15px 4px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-small);
}

.live-message.is-caller .live-message-bubble {
  border-radius: 15px 15px 4px;
  color: white;
  background: var(--action);
}

.live-message-bubble p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

.live-message-bubble small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 7.5px;
}

.live-message.is-caller .live-message-bubble small {
  color: rgb(255 255 255 / 68%);
  text-align: right;
}

.call-visualizer-shell {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgb(255 255 255 / 7%);
  border-bottom: 1px solid rgb(255 255 255 / 7%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 25%, rgb(0 0 0 / 9%)),
    radial-gradient(circle at 50% 52%, rgb(95 114 184 / 24%), transparent 38%),
    linear-gradient(145deg, #111526, #1b2036 55%, #121625);
  box-shadow: inset 0 1px rgb(255 255 255 / 5%);
}

#call-visualizer {
  display: block;
  width: 100%;
  height: 100%;
}

.visualizer-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
  color: white;
  background: rgb(18 23 40 / 72%);
  box-shadow:
    inset 0 0 18px rgb(111 171 255 / 14%),
    0 0 24px rgb(113 98 255 / 24%);
  font-size: 14px;
  font-weight: 700;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.visualizer-legend {
  position: absolute;
  right: 12px;
  bottom: 9px;
  display: flex;
  gap: 10px;
  color: rgb(255 255 255 / 64%);
  font-size: 8px;
}

.visualizer-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.visualizer-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #55d6be;
  box-shadow: 0 0 8px #55d6be;
}

.visualizer-legend .is-agent i {
  background: #a68cff;
  box-shadow: 0 0 8px #a68cff;
}

.live-call-controls {
  display: grid;
  min-height: 68px;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
}

.media-state {
  color: var(--faint);
  font-size: 9px;
}

.media-state.is-agent {
  text-align: right;
}

.media-state.is-speaking {
  color: var(--text);
}

.media-state.is-speaking i {
  background: var(--success);
  box-shadow: 0 0 0 3px rgb(49 162 76 / 12%);
}

.media-state.is-agent.is-speaking i {
  background: #8b6eff;
  box-shadow: 0 0 0 3px rgb(139 110 255 / 14%);
}

.call-action {
  display: inline-flex;
  min-width: 126px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--action);
  box-shadow: 0 5px 18px rgb(57 114 213 / 24%);
  cursor: pointer;
  font-family: var(--display-font);
  font-size: 11px;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease;
}

.call-action:hover {
  background: var(--action-hover);
  transform: translateY(-1px);
}

.call-action.is-stop {
  background: var(--danger);
  box-shadow: 0 5px 18px rgb(217 48 37 / 22%);
}

.call-action:disabled {
  color: var(--faint);
  background: var(--surface-soft);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.call-action-icon {
  font-size: 9px;
}

#remote-call-audio {
  display: none;
}

.call-history-panel {
  display: flex;
  flex-direction: column;
}

.call-history-panel > header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
}

.call-history-panel h3 {
  margin: 1px 0 0;
  font-size: 13px;
}

.call-history-panel .calls-list {
  padding: 9px;
}

.calls-list {
  display: grid;
  min-height: 0;
  flex: 1;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 14px 0 6px;
}

.call-row-button {
  display: grid;
  width: 100%;
  grid-template-columns: 10px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 13px 15px;
  border: 0;
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-small);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.call-row-button:hover,
.call-row-button.is-selected {
  background: var(--surface-hover);
}

.call-row-button.is-selected {
  background: var(--accent-soft);
}

.call-row-button:active {
  transform: scale(0.998);
}

.call-row-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--faint);
}

.call-row-status.is-active,
.call-row-status.is-completed {
  background: var(--success);
}

.call-row-status.is-connecting {
  background: var(--event-tool, #b9853e);
}

.call-row-status.is-failed {
  background: var(--event-error, #b5655f);
}

.call-row-main,
.call-row-metrics {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.call-row-main strong,
.call-row-main small,
.call-row-metrics strong,
.call-row-metrics small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-row-main strong,
.call-row-metrics strong {
  font-size: 12px;
  font-weight: 650;
}

.call-row-main small,
.call-row-metrics small {
  color: var(--muted);
  font-size: 10px;
}

.call-row-metrics {
  min-width: 110px;
  text-align: right;
}

.call-row-arrow {
  color: var(--accent);
  font-size: 17px;
  text-align: right;
}

.call-history-empty {
  display: grid;
  flex: 1;
  align-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.call-history-empty > span {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 18px;
}

.call-history-empty p {
  margin: 0;
  font-size: 10px;
}

.call-summary {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 1.25fr repeat(4, minmax(100px, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.call-summary article {
  padding: 10px 18px;
  border-right: 1px solid var(--line);
}

.call-summary article:last-child {
  border-right: 0;
}

.call-summary article:first-child {
  color: var(--text);
  background: var(--accent-soft);
}

.call-summary article:first-child span {
  color: var(--accent);
}

.call-summary span,
.call-summary strong {
  display: block;
}

.call-summary span {
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.call-summary strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.call-status .summary-dot {
  display: inline-block;
  margin-right: 4px;
}

.call-status.is-ended .summary-dot,
.call-status.is-failed .summary-dot {
  background: var(--faint);
}

.events-toolbar {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 6px 22px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
}

.event-filters {
  display: flex;
  gap: 3px;
  padding: 0;
  border-radius: 12px;
  background: transparent;
}

.event-filter {
  min-height: 26px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.event-filter:hover {
  color: var(--text);
}

.event-filter.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: none;
}

.events-meta {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
}

.event-feed {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: auto;
  border-radius: 0 0 18px 18px;
  background: var(--board);
}

.timeline-overview {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 22px 7px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.timeline-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.timeline-overview-header > div:first-child {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.timeline-overview-header .kicker {
  margin-bottom: 0;
}

.timeline-overview-header strong {
  display: block;
  font-size: 13px;
}

.timeline-range {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.timeline-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--event-system);
}

.timeline-legend .legend-conversation i {
  background: var(--event-conversation);
}

.timeline-legend .legend-flow i {
  background: var(--event-flow);
}

.timeline-legend .legend-tool i {
  background: var(--event-tool);
}

.timeline-legend .legend-performance i {
  background: var(--event-performance);
}

.timeline-legend .legend-error i {
  background: var(--event-error);
}

.timeline-track {
  position: relative;
  height: 30px;
  margin: 8px 4px 2px 45px;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(10% - 1px),
    rgb(89 107 127 / 12%) calc(10% - 1px),
    rgb(89 107 127 / 12%) 10%
  );
}

.timeline-track-wrap {
  position: relative;
}

.timeline-epoch-label {
  position: absolute;
  top: 11px;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-tick {
  position: absolute;
  bottom: -2px;
  width: 4px;
  height: 14px;
  padding: 0;
  border: 0;
  background: var(--accent);
  cursor: pointer;
  transform: translateX(-50%);
  transform-origin: bottom;
  transition: height 120ms ease, width 120ms ease;
}

.timeline-tick:hover,
.timeline-tick:focus-visible {
  width: 7px;
  height: 28px;
  outline-offset: 2px;
}

.timeline-tick.tick-system {
  height: 8px;
  background: var(--event-system);
}

.timeline-tick.tick-conversation {
  height: 16px;
  background: var(--event-conversation);
}

.timeline-tick.tick-flow {
  height: 22px;
  width: 5px;
  background: var(--event-flow);
}

.timeline-tick.tick-performance {
  height: 12px;
  background: var(--event-performance);
}

.timeline-tick.tick-tool {
  height: 18px;
  background: var(--event-tool);
}

.timeline-tick.level-warning {
  background: var(--event-tool);
}

.timeline-tick.level-error {
  background: var(--event-error);
}

.timeline-epoch-point {
  position: absolute;
  z-index: 2;
  bottom: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--event-system);
  box-shadow: 0 0 0 4px var(--accent-faint);
  pointer-events: none;
  transform: translateX(-50%);
}

.timeline-cursor {
  position: absolute;
  z-index: 8;
  bottom: -7px;
  display: grid;
  width: 21px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 3px 10px rgb(89 107 127 / 22%);
  cursor: grab;
  touch-action: none;
  transform: translateX(-50%);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.timeline-cursor::after {
  width: 3px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  opacity: 0.55;
}

.timeline-cursor:hover,
.timeline-cursor:focus-visible,
.timeline-cursor.is-dragging {
  box-shadow: 0 4px 14px rgb(89 107 127 / 28%);
  transform: translateX(-50%) scale(1.05);
}

.timeline-cursor.is-dragging {
  cursor: grabbing;
}

.timeline-cursor-label {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  padding: 4px 6px;
  border-radius: 7px;
  color: white;
  background: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 3px);
  transition: opacity 100ms ease, transform 100ms ease;
  white-space: nowrap;
}

.timeline-cursor:hover .timeline-cursor-label,
.timeline-cursor:focus-visible .timeline-cursor-label,
.timeline-cursor.is-dragging .timeline-cursor-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.timeline-tick.is-epoch {
  z-index: 3;
  box-shadow: 0 0 0 4px var(--accent-faint);
}

.timeline-scale {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 8px;
  text-transform: uppercase;
}

.event-list {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 12px 18px 32px;
  list-style: none;
}

.event-item {
  display: grid;
  min-height: 58px;
  grid-template-columns: 100px 42px minmax(0, 1fr);
  align-items: start;
}

.event-time {
  position: relative;
  padding: 13px 12px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.event-time::after {
  position: absolute;
  top: 20px;
  right: -1px;
  width: 13px;
  height: 1px;
  background: rgb(89 107 127 / 24%);
  content: "";
}

.event-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  margin-top: 9px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
}

.event-item:not(:last-child) .event-marker::after {
  position: absolute;
  z-index: -1;
  top: 26px;
  left: 14px;
  width: 2px;
  height: calc(100% + 28px);
  border-radius: 999px;
  background: linear-gradient(var(--accent), rgb(89 107 127 / 10%));
  content: "";
}

.event-item.is-epoch .event-time {
  color: var(--accent);
  font-weight: 800;
}

.event-item.is-epoch .event-time::before {
  position: absolute;
  top: 13px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-faint);
  content: "";
}

.event-item.is-epoch .event-marker {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-faint);
}

.event-card {
  margin: 0 0 7px;
  padding: 10px 14px 11px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.event-card:hover {
  border-color: rgb(89 107 127 / 24%);
  box-shadow: var(--shadow-small);
  transform: translateY(-1px);
}

.event-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-title-group {
  min-width: 0;
}

.event-card h3 {
  margin: 0;
  font-size: 12px;
  font-family: var(--display-font);
  font-weight: 650;
}

.event-category {
  padding: 3px 6px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.event-context {
  margin-top: 6px;
  padding-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.event-epoch {
  display: inline-block;
  margin: 4px 0 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-system .event-card {
  border-color: var(--event-system-line);
  background: var(--event-system-soft);
}

.event-system .event-marker {
  color: white;
  border-color: var(--event-system);
  background: var(--event-system);
}

.event-system .event-category {
  color: var(--event-system-ink);
  border-color: var(--event-system-line);
  background: #e4e6eb;
}

.event-system .event-time,
.event-system .event-epoch {
  color: var(--event-system-ink);
}

.event-system .event-time::after {
  background: var(--event-system);
}

.event-flow .event-card {
  border-color: var(--event-flow-line);
  background: var(--event-flow-soft);
}

.event-flow .event-marker {
  color: white;
  border-color: var(--event-flow);
  background: var(--event-flow);
}

.event-flow .event-category {
  color: var(--event-flow-ink);
  border-color: var(--event-flow-line);
  background: #d9efdf;
}

.event-flow .event-time {
  color: var(--event-flow-ink);
}

.event-flow .event-time::after {
  background: var(--event-flow);
}

.event-conversation .event-card {
  border-color: var(--event-conversation-line);
  background: var(--event-conversation-soft);
}

.event-conversation .event-marker {
  color: white;
  border-color: var(--event-conversation);
  background: var(--event-conversation);
}

.event-conversation .event-category {
  color: var(--event-conversation-ink);
  border-color: var(--event-conversation-line);
  background: #e2e8ee;
}

.event-conversation .event-time {
  color: var(--event-conversation-ink);
}

.event-conversation .event-time::after {
  background: var(--event-conversation);
}

.event-conversation .event-card h3 {
  font-size: 13px;
}

.event-conversation .event-card p {
  max-width: 1050px;
  color: var(--text);
  font-size: 12px;
}

.event-performance .event-card {
  border-color: var(--event-performance-line);
  background: var(--event-performance-soft);
}

.event-performance .event-marker {
  color: white;
  border-color: var(--event-performance);
  background: var(--event-performance);
}

.event-performance .event-category {
  color: var(--event-performance-ink);
  border-color: var(--event-performance-line);
  background: #e4d9ff;
}

.event-performance .event-time {
  color: var(--event-performance-ink);
}

.event-performance .event-time::after {
  background: var(--event-performance);
}

.event-tool .event-card {
  border-color: var(--event-tool-line);
  background: var(--event-tool-soft);
}

.event-tool .event-marker {
  color: white;
  border-color: var(--event-tool);
  background: var(--event-tool);
}

.event-tool .event-category {
  color: var(--event-tool-ink);
  border-color: var(--event-tool-line);
  background: #f7e5c4;
}

.event-tool .event-time {
  color: var(--event-tool-ink);
}

.event-tool .event-time::after {
  background: var(--event-tool);
}

.event-item.level-warning .event-card {
  border-color: var(--event-tool-line);
  background: var(--event-tool-soft);
}

.event-item.level-warning .event-marker {
  color: white;
  border-color: var(--event-tool);
  background: var(--event-tool);
}

.event-item.level-error .event-card {
  border-color: var(--event-error-line);
  background: var(--event-error-soft);
}

.event-item.level-error .event-marker {
  color: white;
  border-color: var(--event-error);
  background: var(--event-error);
}

.event-item.level-error .event-category {
  color: #9b251e;
  border-color: var(--event-error-line);
  background: #f7d8d5;
}

.event-item.is-epoch .event-card {
  border-color: rgb(89 107 127 / 24%);
  background: linear-gradient(100deg, var(--accent-soft), var(--surface));
  box-shadow: 0 3px 12px rgb(89 107 127 / 10%);
}

.event-item.is-epoch .event-marker {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
}

.event-item.is-cursor-target .event-card {
  box-shadow:
    0 0 0 2px rgb(89 107 127 / 24%),
    var(--shadow-card);
  transform: translateY(-1px);
}

.event-item.is-cursor-target .event-marker {
  box-shadow:
    0 0 0 4px var(--board),
    0 0 0 6px rgb(89 107 127 / 24%);
}

.events-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 270px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  transform: translate(-50%, -50%);
}

.events-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 25px;
}

.events-empty h3 {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--display-font);
}

.events-empty p {
  margin-bottom: 12px;
  font-size: 11px;
}

.observability-note {
  flex: 0 0 auto;
  padding: 7px 5px 0;
  color: var(--faint);
  font-size: 9px;
  text-align: right;
  background: var(--board);
}

.drawer-dialog {
  width: min(820px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-float);
}

.drawer-dialog::backdrop {
  background: rgb(28 30 33 / 32%);
  backdrop-filter: blur(8px);
}

.dialog-shell {
  display: flex;
  max-height: calc(100vh - 34px);
  flex-direction: column;
}

.dialog-header,
.dialog-footer {
  flex: 0 0 auto;
  padding: 16px 18px;
}

.dialog-header {
  border-bottom: 1px solid var(--line);
}

.dialog-footer {
  background: var(--surface-soft);
}

.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 18px;
}

.dialog-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.create-agent-dialog {
  width: min(560px, calc(100vw - 32px));
}

.create-agent-fields {
  padding: 8px 18px 20px;
}

.create-agent-note {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.clone-agent-source {
  margin: 12px 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.clone-agent-source strong {
  color: var(--text);
}

.create-agent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#flow-editor {
  min-height: 58vh;
  flex: 1;
  border: 0;
  border-radius: 0 0 16px 16px;
  background: var(--bg);
  box-shadow: none;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  resize: none;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.scheduling-dialog {
  width: min(980px, calc(100vw - 32px));
}

.lab-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  overflow: auto;
  padding: 0 16px 16px;
  background: var(--surface);
}

.lab-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow-small);
}

.lab-card h3 {
  margin-bottom: 4px;
  font-size: 14px;
}

.lab-card > p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.lab-card textarea.small {
  min-height: 150px;
  font-family: var(--mono);
  font-size: 10px;
}

pre {
  min-height: 120px;
  max-height: 260px;
  margin: 10px 0 0;
  overflow: auto;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.45;
  white-space: pre-wrap;
}

/* Policy governance and catalog resources */
.governance-view {
  overflow: auto;
  background: var(--surface);
}

.resources-view {
  overflow: hidden;
  background: var(--board);
}

.governance-shell,
.resources-shell {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

.governance-shell {
  background: var(--surface);
}

.resources-shell {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.governance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.governance-summary article {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.governance-summary article:last-child {
  border-right: 0;
}

.governance-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.governance-summary strong {
  color: var(--accent-hover);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.governance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 0;
  align-items: stretch;
  background: var(--surface);
}

.governance-card,
.resource-browser,
.resource-editor-card,
.catalog-answer-card {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.governance-card {
  padding: 20px 22px;
}

.governance-grid > .copilot-card {
  border-right: 1px solid var(--line);
}

.governance-grid > .violations-card {
  border-top: 1px solid var(--line);
}

.card-heading,
.preview-header,
.resource-editor-header,
.resource-browser > header,
.catalog-answer-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-heading {
  margin-bottom: 14px;
}

.violation-heading-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-heading h2,
.resource-editor-header h2,
.resource-browser h2,
.catalog-answer-card h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.review-badge,
.policy-state,
.violation-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.review-badge {
  color: #7a5a14;
  background: #fff4d8;
}

.policy-state.is-active,
.policy-state.is-ready,
.violation-status.is-resolved,
.violation-status.is-dismissed,
.violation-status.is-closed,
.violation-status.is-false_positive {
  color: #21783a;
  background: #e5f5e9;
}

.policy-state.is-draft {
  color: var(--accent);
  background: var(--accent-soft);
}

.policy-state.is-warning,
.violation-status.is-open,
.violation-status.is-new,
.violation-status.is-investigating {
  color: #8a5c00;
  background: #fff1cd;
}

.copilot-card form > label:first-child {
  margin-top: 0;
}

.copilot-card textarea {
  min-height: 104px;
  background: var(--bg);
  font-size: 13px;
}

.example-guidelines {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
}

.example-guidelines span {
  color: var(--faint);
  font-size: 9px;
}

.example-guidelines button,
.text-button {
  padding: 4px 7px;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
  font-size: 9px;
  font-weight: 650;
}

.example-guidelines button:hover,
.text-button:hover {
  color: var(--accent-hover);
  background: var(--pastel-strong);
}

.copilot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
}

.inline-status {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.inline-status.is-success {
  color: #21783a;
}

.inline-status.is-warning {
  color: #8a5c00;
}

.inline-status.is-error {
  color: var(--danger);
}

.restriction-preview {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.preview-header h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 16px;
}

.preview-summary {
  margin: 10px 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.parsed-rule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.parsed-rule > div {
  min-width: 0;
  padding: 10px 11px;
  background: var(--bg);
}

.parsed-rule dt,
.evidence-block dt,
.catalog-result-row dt {
  color: var(--faint);
  font-size: 9px;
  font-weight: 650;
  text-transform: capitalize;
}

.parsed-rule dd,
.evidence-block dd,
.catalog-result-row dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.45;
}

.parsed-rule-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.impact-panel {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.impact-panel.has-risk {
  border-color: rgb(217 48 37 / 25%);
  background: #fff8f6;
}

.impact-panel > header {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.impact-panel > header strong {
  font-size: 10px;
}

.impact-panel > header > span:last-child {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.impact-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
}

.has-risk .impact-icon {
  color: var(--danger);
  background: #fde8e5;
}

.impact-list,
.entity-chips {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.impact-item {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.impact-item strong,
.impact-item small {
  display: block;
}

.impact-item strong {
  overflow-wrap: anywhere;
  font-size: 9px;
}

.impact-item small,
.impact-more {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.impact-empty,
.impact-replay-summary {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.entity-chips {
  flex-flow: row wrap;
}

.entity-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  overflow: hidden;
  border-radius: 999px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-chip small {
  color: var(--faint);
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
}

.preview-warnings {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #704b00;
  background: #fff4d8;
  font-size: 9px;
}

.preview-warnings ul {
  margin: 5px 0 0;
  padding-left: 17px;
}

.approval-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.approval-bar strong,
.approval-bar small {
  display: block;
}

.approval-bar strong {
  font-size: 10px;
}

.approval-bar small {
  max-width: 430px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.segmented-control {
  display: flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.segmented-control button {
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.segmented-control button.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.restriction-list,
.violation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.restriction-register .restriction-list {
  max-height: 620px;
  overflow: auto;
}

.restriction-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.restriction-row > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.restriction-row-copy {
  min-width: 0;
}

.restriction-row-copy strong,
.restriction-row-copy small {
  display: block;
}

.restriction-row-copy strong {
  font-size: 10px;
  line-height: 1.45;
}

.restriction-row-copy small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restriction-details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
}

.restriction-details summary,
.violation-evidence summary {
  cursor: pointer;
  font-weight: 650;
}

.restriction-details pre {
  min-height: 0;
  max-height: 180px;
  margin-top: 6px;
  border-radius: 10px;
  font-size: 8px;
}

.restriction-row > .text-button {
  margin-top: 8px;
}

.violations-card {
  grid-column: 1 / -1;
}

.card-meta {
  color: var(--faint);
  font-size: 9px;
}

.violation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.violation-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.violation-marker {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--danger);
  background: #fde8e5;
  font-weight: 800;
}

.severity-low .violation-marker,
.severity-info .violation-marker {
  color: var(--accent);
  background: var(--accent-soft);
}

.violation-body {
  min-width: 0;
}

.violation-body > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.violation-body > header strong,
.violation-body > header small {
  display: block;
}

.violation-body > header strong {
  font-size: 10px;
  line-height: 1.4;
}

.violation-body > header small {
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}

.violation-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.violation-facts > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 7px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 8px;
}

.violation-facts small {
  color: var(--faint);
  font-family: var(--ui-font);
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
}

.violation-evidence {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
}

.evidence-block {
  margin-top: 8px;
  padding: 9px;
  border-radius: 10px;
  background: var(--surface);
}

.evidence-block > strong {
  font-size: 9px;
}

.evidence-block dl,
.catalog-result-row dl {
  margin: 7px 0 0;
}

.evidence-block dl > div,
.catalog-result-row dl > div {
  display: grid;
  grid-template-columns: minmax(90px, 0.4fr) minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}

.evidence-block p {
  margin: 5px 0 0;
  font-size: 9px;
}

.governance-empty {
  display: grid;
  min-height: 150px;
  place-content: center;
  justify-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.governance-empty > span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.governance-empty strong,
.governance-empty small {
  display: block;
}

.governance-empty strong {
  font-size: 11px;
}

.governance-empty small {
  max-width: 270px;
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
}

.governance-error {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px;
  border: 1px solid rgb(217 48 37 / 18%);
  border-radius: 12px;
  color: var(--danger);
  background: #fff8f6;
  font-size: 9px;
}

.governance-error span {
  color: var(--muted);
}

.resources-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(230px, 0.65fr) minmax(390px, 1.3fr) minmax(270px, 0.8fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

.resource-browser,
.resource-editor-card,
.catalog-answer-card {
  height: 100%;
  min-height: 0;
  padding: 20px 22px;
  overflow: auto;
}

.resource-browser,
.resource-editor-card {
  border-right: 1px solid var(--line);
}

.resource-browser {
  display: flex;
  max-height: none;
  flex-direction: column;
}

.resource-editor-card,
.catalog-answer-card {
  display: flex;
  flex-direction: column;
}

.resource-type-tabs {
  display: flex;
  gap: 3px;
  margin: 13px 0 10px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.resource-type-tabs button {
  min-width: 0;
  flex: 1;
  padding: 7px 4px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
}

.resource-type-tabs button.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.resource-type-tabs span {
  margin-left: 2px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
}

.resource-search {
  position: relative;
  margin: 0 0 9px;
}

.resource-search > span {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
  color: var(--faint);
}

.resource-search input {
  height: 34px;
  padding-left: 27px;
  background: var(--bg);
  font-size: 10px;
}

.resource-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  overflow: auto;
}

.resource-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.resource-row:hover {
  background: var(--surface-soft);
}

.resource-row.is-selected {
  color: var(--accent-hover);
  background: var(--accent-soft);
}

.resource-row > span {
  min-width: 0;
}

.resource-row strong,
.resource-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-row strong {
  font-size: 10px;
}

.resource-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.resource-row code {
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
}

.resource-list-empty {
  padding: 20px 8px;
  color: var(--faint);
  font-size: 9px;
  text-align: center;
}

.resource-editor-card,
.catalog-answer-card {
  min-height: 0;
}

.resource-editor-empty {
  min-height: 0;
  flex: 1;
}

.resource-editor-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.resource-editor-form > label:first-child {
  margin-top: 16px;
}

.resource-json {
  min-height: 260px;
  max-height: none;
  flex: 1;
  background: #f7f8fa;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.55;
  tab-size: 2;
}

.resource-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 12px;
}

.resource-editor-form .inline-status {
  min-height: 16px;
  margin-top: 9px;
}

.catalog-answer-card > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.catalog-answer-card form {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.catalog-info-result {
  display: flex;
  max-height: none;
  min-height: 130px;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
  overflow: auto;
}

.catalog-info-result > p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.catalog-info-result .catalog-answer {
  padding: 9px;
  border-radius: 10px;
  color: var(--accent-hover);
  background: var(--accent-soft);
}

.catalog-result-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.catalog-result-row > small,
.catalog-result-row > strong {
  display: block;
}

.catalog-result-row > small {
  color: var(--faint);
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
}

.catalog-result-row > strong {
  margin-top: 2px;
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: 16px;
  max-width: 360px;
  padding: 12px 16px;
  border: 0;
  border-radius: 18px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.is-error {
  color: var(--danger);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .builder-layout {
    --hud-width: 290px;
  }

  .toolbar .button.ghost {
    padding-inline: 8px;
  }

  .agent-title-stack {
    width: 220px;
  }

  .resources-layout {
    grid-template-columns: minmax(220px, 0.65fr) minmax(360px, 1.35fr);
  }

  .resources-view {
    overflow: auto;
  }

  .resources-shell {
    height: auto;
  }

  .resources-layout {
    flex: none;
    overflow: visible;
  }

  .resource-browser,
  .resource-editor-card,
  .catalog-answer-card {
    height: auto;
    min-height: 500px;
  }

  .catalog-answer-card {
    grid-column: 1 / -1;
    min-height: 300px;
  }

  .catalog-info-result {
    max-height: 360px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .agent-chat-state {
    display: none;
  }

  .builder-layout {
    --hud-width: 250px;
  }

  .topbar,
  .workspace-tabs {
    padding-inline: 10px;
  }

  .agent-heading .status-pill.neutral,
  .toolbar .button.ghost {
    display: none;
  }

  .agent-title-stack {
    width: 180px;
  }

  .call-summary {
    grid-template-columns: repeat(5, 1fr);
  }

  .call-summary article {
    padding-inline: 8px;
  }

  .events-toolbar,
  .timeline-overview {
    padding-inline: 16px;
  }

  .call-studio-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-policy-demo ol {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-policy-demo li,
  .help-policy-demo li:first-child,
  .help-policy-demo li:last-child {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .help-policy-demo li:first-child {
    padding-top: 0;
  }

  .help-policy-demo li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .call-history-panel {
    display: none;
  }

  .timeline-overview {
    margin-inline: 0;
  }

  .event-list {
    padding-inline: 16px;
  }

  .event-item {
    grid-template-columns: 72px 32px minmax(0, 1fr);
  }

  .governance-shell,
  .resources-shell {
    padding: 0;
  }

  .governance-grid,
  .resources-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .violations-card,
  .catalog-answer-card {
    grid-column: auto;
  }

  .governance-grid > .copilot-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .governance-grid > .restriction-register {
    border-bottom: 1px solid var(--line);
  }

  .governance-grid > .violations-card {
    border-top: 0;
  }

  .resource-browser,
  .resource-editor-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .restriction-register .restriction-list,
  .resource-browser {
    max-height: none;
  }

  .resource-browser {
    min-height: 370px;
  }

  .resource-list {
    max-height: 260px;
  }
}

@media (max-width: 680px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    min-height: 220px;
    height: 32vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-footer {
    display: none;
  }

  .shared-workspaces {
    padding: 6px 10px 8px;
  }

  .shared-workspaces-heading {
    display: none;
  }

  .shared-workspace-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shared-workspace-link {
    min-height: 44px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 6px 8px;
  }

  .shared-workspace-icon {
    width: 30px;
    height: 30px;
  }

  .shared-workspace-copy small {
    display: none;
  }

  .workspace {
    height: 68vh;
    min-height: 500px;
  }

  .topbar {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    padding-block: 8px;
  }

  .agent-heading {
    flex: 1 0 100%;
  }

  .agent-title-stack {
    width: min(55vw, 300px);
  }

  .toolbar {
    width: 100%;
    justify-content: flex-end;
  }

  .workspace-view {
    height: calc(68vh - 148px);
  }

  body.is-shared-workspace .shared-workspace-chrome.topbar {
    height: 58px;
    min-height: 58px;
    flex-wrap: nowrap;
    padding-block: 0;
  }

  body.is-shared-workspace .shared-workspace-chrome .toolbar {
    width: auto;
  }

  body.is-shared-workspace .workspace-view {
    height: calc(68vh - 58px);
    min-height: 442px;
  }

  .builder-layout {
    --hud-width: 0px;
  }

  .flow-board {
    min-width: 0;
  }

  .add-node {
    right: 16px;
  }

  .inspector {
    display: none;
  }

  .events-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .live-call-controls {
    grid-template-columns: 1fr auto 1fr;
    padding-inline: 10px;
  }

  .media-state {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calls-meta {
    display: none;
  }

  .call-row-button {
    grid-template-columns: 10px minmax(0, 1fr) auto 14px;
    gap: 8px;
    padding: 10px;
  }

  .call-row-metrics {
    min-width: 82px;
  }

  .event-filters {
    overflow-x: auto;
  }

  .call-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-y: auto;
  }

  .call-summary article:first-child {
    grid-column: 1 / -1;
  }

  .timeline-overview {
    margin-inline: 0;
    padding: 14px 12px 12px;
  }

  .event-list {
    padding-inline: 12px;
  }

  .event-item {
    grid-template-columns: 60px 28px minmax(0, 1fr);
  }

  .event-time {
    padding-right: 8px;
    font-size: 9px;
  }

  .event-marker {
    width: 24px;
    height: 24px;
  }

  .timeline-track {
    margin-left: 40px;
  }

  .timeline-epoch-label {
    font-size: 8px;
  }

  .event-item:not(:last-child) .event-marker::after {
    top: 24px;
    left: 11px;
  }

  .event-card {
    padding: 12px;
  }

  .event-card header {
    align-items: flex-start;
  }

  .lab-grid {
    grid-template-columns: 1fr;
  }

  .workspace-tabs {
    gap: 16px;
    overflow-x: auto;
  }

  .help-heading {
    padding-inline: 18px;
  }

  .help-scenario-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-scenario {
    padding: 22px 18px;
    border-right: 0;
  }

  .help-scenario:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .help-scenario:last-child {
    border-bottom: 0;
  }

  .help-policy-demo {
    padding: 24px 18px;
  }

  .help-footer-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding-inline: 18px;
  }

  .governance-shell,
  .resources-shell {
    padding: 0;
  }

  .governance-summary,
  .impact-grid,
  .violation-list,
  .parsed-rule {
    grid-template-columns: minmax(0, 1fr);
  }

  .governance-summary article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .governance-summary article:last-child {
    border-bottom: 0;
  }

  .governance-card {
    padding: 14px;
  }

  .copilot-actions,
  .approval-bar,
  .resource-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .approval-bar .button,
  .resource-editor-actions .button {
    width: 100%;
  }

  .resource-editor-card,
  .catalog-answer-card {
    min-height: 0;
  }

  .resource-json {
    min-height: 300px;
    max-height: none;
  }
}

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