:root {
  color: #1f1f1f;
  background: #f5f5f5;
  --surface-canvas: #f5f5f5;
  --surface-raised: #fff;
  --surface-subtle: #fafafa;
  --surface-muted: #f0f0f0;
  --text-primary: #1f1f1f;
  --text-secondary: #595959;
  --text-muted: #6b7280;
  --text-on-accent: #fff;
  --border-default: #d9d9d9;
  --border-control: #8c8c8c;
  --border-subtle: #f0f0f0;
  --accent: #0b57d0;
  --accent-solid: #0b57d0;
  --accent-solid-hover: #0847ab;
  --accent-hover: #0847ab;
  --accent-selected: #bae0ff;
  --accent-subtle: #e6f4ff;
  --danger: #cf1322;
  --danger-solid: #b42318;
  --danger-strong: #cf1322;
  --danger-border: #ffccc7;
  --danger-subtle: #fff2f0;
  --success: #237804;
  --success-subtle: #f6ffed;
  --warning: #faad14;
  --overlay-backdrop: rgb(0 0 0 / 45%);
  --shadow-card: 0 2px 8px rgb(0 0 0 / 6%);
  --shadow-dialog: 0 6px 16px rgb(0 0 0 / 8%);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --page-gutter: clamp(16px, 2vw, 28px);
  --content-reading: 820px;
  --content-standard: 960px;
  --content-dashboard: 1040px;
  --radius-control: 8px;
  --radius-card: 12px;
  --control-height: 36px;
  --font-page-title: 24px;
  --font-section-title: 14px;
  --font-body: 12px;
  --font-caption: 10px;
  font-family:
    Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

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

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1677ff;
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
}

.sidebar {
  display: flex;
  flex: 0 0 278px;
  flex-direction: column;
  min-width: 0;
  padding: 20px 14px 14px;
  overflow: hidden;
  border-right: 1px solid #f0f0f0;
  background: #fff;
  color: #1f1f1f;
  transition:
    flex-basis 180ms ease,
    padding 180ms ease;
}

.sidebar--closed {
  flex-basis: 0;
  padding-right: 0;
  padding-left: 0;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 248px;
  padding: 0 8px 20px;
  gap: 11px;
  -webkit-app-region: drag;
  user-select: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #1677ff;
  border-radius: 8px;
  background: #e6f4ff;
  color: #1677ff;
}

.brand__mark img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__copy strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand__copy span {
  color: #8c8c8c;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-switcher {
  position: relative;
  min-width: 248px;
  margin-bottom: 11px;
}

.project-switcher__row {
  display: grid;
  align-items: center;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.project-switcher select {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fafafa;
  color: #1f1f1f;
  font-size: 10px;
}

.project-create-backdrop {
  position: fixed;
  z-index: 80;
  display: grid;
  padding: 16px;
  background: rgb(0 0 0 / 38%);
  inset: 0;
  place-items: center;
}

.project-create-card {
  position: relative;
  display: flex;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 14px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 12px 36px rgb(0 0 0 / 14%);
  flex-direction: column;
  gap: 10px;
}

.project-create-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-create-card label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.project-create-card label > span {
  color: #595959;
  font-size: 9px;
  font-weight: 650;
}

.project-create-card input,
.project-create-card textarea,
.project-create-card select {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
  resize: vertical;
}

.project-create-card__path {
  display: flex;
  gap: 6px;
}

.project-create-card__path input {
  min-width: 0;
  flex: 1;
}

.project-create-card__path button {
  padding: 0 10px;
}

.project-create-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.project-create-card__actions button {
  display: flex;
  align-items: center;
  gap: 5px;
}

.project-create-card__error {
  margin: 0;
  color: #ff4d4f;
  font-size: 9px;
}

.new-chat {
  display: flex;
  min-width: 248px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #1677ff;
  border-radius: 8px;
  margin-bottom: 11px;
  background: #1677ff;
  color: #fff;
  cursor: pointer;
  gap: 9px;
  text-align: left;
}

.new-chat:hover {
  border-color: #4096ff;
  background: #4096ff;
}

.new-chat span {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}

.new-chat kbd {
  padding: 2px 5px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 5px;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font-size: 9px;
}

.sidebar-search {
  display: flex;
  min-width: 248px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  margin-bottom: 15px;
  background: #fafafa;
  color: #8c8c8c;
  gap: 8px;
}

.sidebar-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f1f1f;
  font-size: 12px;
}

.sidebar-search input::placeholder {
  color: #8c8c8c;
}

.primary-nav {
  display: flex;
  min-width: 248px;
  flex-direction: column;
  padding-bottom: 13px;
  border-bottom: 1px solid #f0f0f0;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  background: transparent;
  color: #595959;
  cursor: pointer;
  gap: 10px;
  text-align: left;
}

.nav-item:hover,
.nav-item--active {
  background: #e6f4ff;
  color: #1677ff;
}

.nav-item span:nth-child(2) {
  flex: 1;
  font-size: 12px;
  font-weight: 550;
}

.nav-item__hint {
  color: #8c8c8c;
  font-size: 9px;
}

.nav-item__badge {
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  place-items: center;
}

.conversation-list {
  min-width: 248px;
  flex: 1;
  padding-top: 14px;
  overflow: auto;
}

.section-label {
  padding: 0 9px;
  margin: 0 0 7px;
  color: #8c8c8c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.conversation-item {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  background: transparent;
  color: #595959;
  cursor: pointer;
  gap: 8px;
  text-align: left;
}

.conversation-item:hover,
.conversation-item--active {
  background: #e6f4ff;
  color: #1677ff;
}

.conversation-item span {
  flex: 1;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item small {
  color: #8c8c8c;
  font-size: 9px;
}

.sidebar-footer {
  min-width: 248px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.user-card {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  background: transparent;
  color: #595959;
  cursor: pointer;
  gap: 9px;
  text-align: left;
}

.user-card:hover {
  background: #fafafa;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #e6f4ff;
  color: #1677ff;
  font-size: 10px;
  font-weight: 800;
}

.user-card__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.user-card__copy strong {
  color: #1f1f1f;
  font-size: 11px;
}

.user-card__copy small {
  color: #8c8c8c;
  font-size: 9px;
}

.workspace {
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-rows: 58px minmax(0, 1fr) auto;
}

.topbar {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 0 0 0 21px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  gap: 3px;
  -webkit-app-region: drag;
  user-select: none;
}

.topbar :is(button, input, select),
.topbar__actions,
.window-controls {
  -webkit-app-region: no-drag;
}

.window-controls {
  display: flex;
  height: 100%;
  flex: 0 0 auto;
  align-self: stretch;
  margin-left: 8px;
}

.window-control {
  display: grid;
  width: 46px;
  min-width: 46px;
  height: 100%;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background-color var(--motion-fast, 120ms) ease-out,
    color var(--motion-fast, 120ms) ease-out;
}

.window-control:hover {
  background: var(--surface-muted);
  color: var(--text-primary);
}

.window-control--close:hover {
  background: var(--danger-solid);
  color: var(--text-on-accent);
}

.window-control:focus-visible {
  outline-offset: -2px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  color: #595959;
  cursor: pointer;
}

.icon-button:hover {
  background: #e6f4ff;
  color: #1677ff;
}

.icon-button--active {
  background: #e6f4ff;
  color: #1677ff;
}

.assistant-sidebar {
  display: flex;
  width: 0;
  flex: 0 0 0;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-left: 0 solid #f0f0f0;
  background: #fff;
  opacity: 0;
  transition:
    width 180ms ease,
    flex-basis 180ms ease,
    opacity 120ms ease;
}

.assistant-sidebar--open {
  width: 350px;
  flex-basis: 350px;
  border-left-width: 1px;
  opacity: 1;
}

.assistant-sidebar__header {
  display: flex;
  height: 58px;
  flex: 0 0 58px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid #f0f0f0;
}

.assistant-sidebar__header strong {
  font-size: 13px;
}

.assistant-sidebar__tabs {
  display: grid;
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  gap: 3px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.assistant-sidebar__tab {
  position: relative;
  padding: 7px 2px;
  border-radius: 7px;
  background: transparent;
  color: #8c8c8c;
  cursor: pointer;
  font-size: 10px;
}

.assistant-sidebar__tab:hover,
.assistant-sidebar__tab--active {
  background: #e6f4ff;
  color: #1677ff;
}

.assistant-sidebar__badge {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  place-items: center;
  border-radius: 8px;
  background: #ff4d4f;
  color: #fff;
  font-size: 8px;
}

.assistant-sidebar__body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.assistant-sidebar__section {
  display: flex;
  padding: 14px;
  flex-direction: column;
  gap: 8px;
}

.assistant-sidebar__section h3 {
  display: flex;
  align-items: center;
  margin: 8px 0 2px;
  color: #595959;
  font-size: 11px;
  gap: 6px;
}

.assistant-sidebar__section h3 .icon-button {
  width: 26px;
  height: 26px;
  margin-left: auto;
}

.assistant-sidebar__diff {
  max-height: 420px;
  padding: 10px;
  overflow: auto;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  margin: 0;
  background: #fafafa;
  color: #3d3d3d;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 9px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.assistant-sidebar__diff-details {
  color: var(--text-secondary);
  font-size: var(--font-caption);
}

.assistant-sidebar__diff-details summary {
  padding: var(--space-2) 0;
  cursor: pointer;
}

.workspace-files {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-2);
}

.workspace-files__heading,
.workspace-files__changed > strong {
  color: var(--text-secondary);
  font-size: var(--font-caption);
}

.workspace-files__changed {
  display: flex;
  min-width: 0;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  flex-direction: column;
  gap: var(--space-1);
}

.workspace-files__changed-row,
.workspace-files__row {
  display: grid;
  width: 100%;
  min-height: 32px;
  align-items: center;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--font-caption);
  gap: var(--space-2);
  text-align: left;
}

.workspace-files__changed-row {
  padding: var(--space-2);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.workspace-files__row {
  padding: var(--space-2);
  grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.workspace-files__changed-row:hover:not(:disabled),
.workspace-files__row:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.workspace-files__changed-row:disabled {
  cursor: default;
  opacity: 0.62;
}

.workspace-files__changed-row span,
.workspace-files__row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-files__changed-row small,
.workspace-files__change {
  color: var(--text-muted);
  font-size: var(--font-caption);
}

.workspace-files__tree {
  min-width: 0;
}

.workspace-files__children {
  margin-left: var(--space-4);
}

.workspace-files__indent {
  width: 13px;
}

.workspace-files__status,
.workspace-files__error {
  padding: var(--space-1) var(--space-2);
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-caption);
  line-height: 1.5;
}

.workspace-files__error {
  color: var(--danger);
}

.assistant-sidebar__row {
  display: grid;
  width: 100%;
  align-items: center;
  padding: 10px;
  border: 1px solid #f0f0f0;
  border-radius: 9px;
  background: #fafafa;
  color: #595959;
  cursor: pointer;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  text-align: left;
}

.assistant-sidebar__row:hover {
  border-color: #91caff;
  background: #e6f4ff;
}

.assistant-sidebar__row span,
.assistant-sidebar__context span,
.assistant-sidebar__library {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.assistant-sidebar__row strong,
.assistant-sidebar__context strong,
.assistant-sidebar__library strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-sidebar__row small,
.assistant-sidebar__context small,
.assistant-sidebar__library small {
  overflow: hidden;
  color: #8c8c8c;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-sidebar__approval {
  padding: 11px;
  border: 1px solid #ffd591;
  border-radius: 9px;
  background: #fff7e6;
}

.assistant-sidebar__approval strong {
  display: block;
  font-size: 11px;
}

.assistant-sidebar__approval p {
  margin: 5px 0;
  color: #595959;
  font-size: 10px;
  line-height: 1.45;
}

.assistant-sidebar__approval code {
  color: #ad6800;
  font-size: 9px;
}

.assistant-sidebar__approval-actions {
  display: flex;
  margin-top: 9px;
  gap: 6px;
}

.assistant-sidebar__approval-actions button {
  flex: 1;
  padding: 7px 5px;
  font-size: 9px;
}

.assistant-sidebar__context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid #f0f0f0;
  border-radius: 9px;
  gap: 8px;
}

.assistant-sidebar__library {
  padding: 9px 10px;
  border: 1px solid #f0f0f0;
  border-radius: 9px;
  background: #fafafa;
}

.assistant-sidebar__memory-form {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.assistant-sidebar__memory-form input {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 10px;
}

.assistant-sidebar__memory-form button {
  padding: 0 10px;
}

.assistant-sidebar__memory {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid #d6e4ff;
  border-radius: 9px;
  background: #f0f5ff;
  color: #2f54eb;
  font-size: 10px;
  gap: 8px;
  line-height: 1.45;
}

.assistant-sidebar__memory > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.assistant-sidebar__memory > span small {
  color: #d46b08;
  font-size: 8px;
}

.assistant-sidebar__memory > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.assistant-sidebar__memory > div > button:not(.icon-button) {
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #1677ff;
  cursor: pointer;
  font-size: 8px;
}

.assistant-sidebar__schedule-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.assistant-sidebar__schedule-form input,
.assistant-sidebar__schedule-form textarea,
.assistant-sidebar__schedule-form select {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  font-size: 9px;
  resize: vertical;
}

.assistant-sidebar__schedule {
  padding: 9px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  background: #fafafa;
}

.assistant-sidebar__schedule > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.assistant-sidebar__schedule strong {
  font-size: 10px;
}

.assistant-sidebar__schedule small {
  color: #8c8c8c;
  font-size: 8px;
}

.assistant-sidebar__schedule > div {
  display: flex;
  margin-top: 7px;
  gap: 8px;
}

.assistant-sidebar__schedule button {
  padding: 3px 0;
  background: transparent;
  color: #1677ff;
  cursor: pointer;
  font-size: 8px;
}

.assistant-sidebar__schedule p {
  margin: 7px 0 0;
  color: #595959;
  font-size: 9px;
  line-height: 1.5;
}

.heartbeat-settings {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 13px;
  container: heartbeat-settings / inline-size;
}

.heartbeat-settings__intro h3 {
  display: flex;
  align-items: center;
  margin: 0;
  color: #1f1f1f;
  font-size: 13px;
  gap: 7px;
}

.heartbeat-settings__intro p,
.heartbeat-settings__empty {
  margin: 5px 0 0;
  color: #8c8c8c;
  font-size: 10px;
  line-height: 1.5;
}

.heartbeat-settings__error {
  margin: 0;
  color: #cf1322;
  font-size: 10px;
  line-height: 1.5;
}

.heartbeat-settings__form {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 9px;
}

.heartbeat-settings__form--weekly {
  grid-template-columns:
    minmax(100px, 1fr) minmax(100px, 1fr)
    minmax(120px, 1fr) auto;
}

.heartbeat-settings__form input,
.heartbeat-settings__form select {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
}

.heartbeat-settings__form .primary-button {
  min-height: 34px;
  white-space: nowrap;
}

.heartbeat-settings__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heartbeat-settings__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  background: #fff;
  gap: 12px;
}

.heartbeat-settings__item > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.heartbeat-settings__item strong {
  font-size: 11px;
}

.heartbeat-settings__item small {
  color: #8c8c8c;
  font-size: 9px;
}

.heartbeat-settings__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.heartbeat-settings__actions button {
  min-width: 40px;
  min-height: 28px;
  padding: 4px 0;
  background: transparent;
  color: #1677ff;
  cursor: pointer;
  font-size: 9px;
}

.heartbeat-settings--sidebar {
  gap: 8px;
}

.heartbeat-settings--sidebar .heartbeat-settings__intro h3 {
  font-size: 10px;
}

.heartbeat-settings--sidebar .heartbeat-settings__intro p,
.heartbeat-settings--sidebar .heartbeat-settings__empty {
  font-size: 8px;
}

.heartbeat-settings--sidebar .heartbeat-settings__form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.heartbeat-settings--sidebar .heartbeat-settings__form input,
.heartbeat-settings--sidebar .heartbeat-settings__form select {
  min-height: 0;
  padding: 8px 9px;
  font-size: 9px;
}

.heartbeat-settings--sidebar .heartbeat-settings__item {
  display: block;
  padding: 9px 10px;
  background: #fafafa;
}

.heartbeat-settings--sidebar .heartbeat-settings__item strong {
  font-size: 10px;
}

.heartbeat-settings--sidebar .heartbeat-settings__item small,
.heartbeat-settings--sidebar .heartbeat-settings__actions button {
  font-size: 8px;
}

.heartbeat-settings--sidebar .heartbeat-settings__actions {
  margin-top: 7px;
}

.heartbeat-settings--sidebar .heartbeat-settings__actions button {
  min-width: 36px;
  min-height: 26px;
}

.assistant-sidebar__empty {
  padding: 16px 10px;
  margin: 0;
  border: 1px dashed #d9d9d9;
  border-radius: 9px;
  color: #8c8c8c;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.assistant-sidebar__preview {
  min-width: 0;
  padding: 16px;
}

.assistant-sidebar__preview > header {
  display: flex;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 12px;
  flex-direction: column;
  gap: 3px;
}

.assistant-sidebar__preview > header strong {
  font-size: 12px;
}

.assistant-sidebar__preview > header small {
  color: #8c8c8c;
  font-size: 9px;
}

.assistant-sidebar__import {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  gap: 6px;
  font-size: 9px;
}

.assistant-sidebar__image-preview {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.assistant-sidebar__web-preview {
  width: 100%;
  min-height: 480px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
}

.assistant-sidebar__preview pre {
  padding: 10px;
  overflow: auto;
  border-radius: 8px;
  background: #f5f5f5;
  font-size: 9px;
  white-space: pre-wrap;
}

.conversation-title {
  display: flex;
  max-width: min(360px, 36vw);
  min-width: 0;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  margin-left: 4px;
  background: transparent;
  color: #1f1f1f;
  flex: 0 1 auto;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}

.conversation-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__actions {
  display: flex;
  min-width: 0;
  align-items: center;
  flex: 0 1 auto;
  margin-left: auto;
  gap: 3px;
}

.topbar-menu {
  position: relative;
}

.topbar-menu__popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: 210px;
  padding: var(--space-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: var(--shadow-dialog);
  gap: 2px;
}

.topbar-menu__popover button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  gap: var(--space-2);
  text-align: left;
}

.topbar-menu__popover button:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.runtime-status {
  display: flex;
  min-width: 0;
  max-width: clamp(108px, 18vw, 220px);
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  margin-right: 8px;
  color: #595959;
  font-size: 10px;
  font-weight: 650;
  gap: 6px;
}

.runtime-status__dot {
  flex: 0 0 auto;
}

.runtime-status__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8c8c8c;
}

.runtime-status--online {
  color: #52c41a;
}

.runtime-status--online .runtime-status__dot {
  background: #52c41a;
}

.chat {
  min-height: 0;
  padding:
    var(--page-gutter)
    max(var(--page-gutter), calc((100% - var(--content-reading)) / 2))
    10px;
  overflow-y: auto;
  scrollbar-color: #d9d9d9 transparent;
  scrollbar-width: thin;
}

.welcome {
  padding: 26px 0 30px;
  text-align: center;
}

.welcome__badge {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #1677ff;
  border-radius: 8px;
  margin: 0 auto 14px;
  background: #e6f4ff;
  color: #1677ff;
}

.eyebrow {
  margin: 0 0 8px;
  color: #1677ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.welcome h1 {
  margin: 0;
  color: #1f1f1f;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.welcome__description {
  margin: 12px 0;
  color: #595959;
  font-size: 12px;
}

.quick-actions {
  display: grid;
  max-width: 720px;
  margin: 0 auto;
  gap: 10px;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(180px, 100%), 1fr)
  );
}

.quick-actions button {
  display: grid;
  min-height: 118px;
  padding: 15px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  gap: 5px;
  grid-template-rows: auto auto 1fr;
  text-align: left;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.quick-actions button:hover {
  border-color: #4096ff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
  transform: translateY(-2px);
}

.quick-actions__icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  margin-bottom: 4px;
  background: #e6f4ff;
  color: #1677ff;
}

.quick-actions strong {
  color: #1f1f1f;
  font-size: 11px;
}

.quick-actions small {
  color: #8c8c8c;
  font-size: 10px;
  line-height: 1.45;
}

.message-list {
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
  gap: 4px;
}

.message {
  display: grid;
  padding: 17px 8px;
  border-top: 1px solid transparent;
  gap: 12px;
  grid-template-columns: 30px 1fr;
}

.message + .message {
  border-top-color: #f0f0f0;
}

.message--user {
  grid-template-columns: 1fr 30px;
}

.message__avatar {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  background: #fff;
  color: #1677ff;
}

.message--user .message__avatar {
  grid-column: 2;
  grid-row: 1;
  border-color: #1677ff;
  background: #e6f4ff;
  color: #1677ff;
}

.message__body {
  min-width: 0;
}

.message--user .message__body {
  width: min(78%, 720px);
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.message__meta {
  display: flex;
  align-items: center;
  margin: 1px 0 8px;
  gap: 8px;
}

.message--user .message__meta {
  justify-content: flex-end;
}

.message__meta strong {
  color: #1f1f1f;
  font-size: 11px;
}

.message__meta span {
  color: #8c8c8c;
  font-size: 9px;
}

.markdown-content {
  color: #1f1f1f;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.message--user .message__content {
  padding: 9px 13px;
  border: 1px solid #bae0ff;
  border-radius: 14px 4px 14px 14px;
  background: #e6f4ff;
}

.markdown-content > :first-child {
  margin-top: 0;
}

.markdown-content > :last-child {
  margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin: 1em 0 0.45em;
  line-height: 1.3;
}

.markdown-content h1 {
  font-size: 1.5em;
}

.markdown-content h2 {
  font-size: 1.3em;
}

.markdown-content h3 {
  font-size: 1.15em;
}

.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content blockquote {
  margin: 0.65em 0;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 1.5em;
}

.markdown-content pre {
  padding: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  overflow-x: auto;
  background: #1f1f1f;
  color: #f5f5f5;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre;
}

.markdown-content :not(pre) > code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f5f5f5;
  color: #1677ff;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

.markdown-table-scroll {
  max-width: 100%;
  margin: 0.8em 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.markdown-table-scroll:focus-visible {
  border-radius: 4px;
  outline: 2px solid #1677ff;
  outline-offset: 2px;
}

.markdown-content table {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
  margin: 0;
  font-size: 11px;
}

.markdown-content th,
.markdown-content td {
  padding: 7px 8px;
  border: 1px solid #d9d9d9;
  text-align: left;
}

.markdown-content blockquote {
  padding-left: 11px;
  border-left: 3px solid #1677ff;
  color: #595959;
}

.markdown-content a {
  color: #1677ff;
  text-decoration-thickness: 1px;
}

.markdown-content img {
  max-width: 100%;
}

.message-generated-image {
  max-width: 640px;
  margin: 10px 0 0;
}

.message-generated-image img {
  display: block;
  width: 100%;
  max-height: 640px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fafafa;
  object-fit: contain;
}

.message-generated-image figcaption {
  margin-top: 5px;
  color: #8c8c8c;
  font-size: 9px;
}

.message__status {
  display: flex;
  align-items: center;
  margin-top: 8px;
  color: #8c8c8c;
  font-size: 10px;
  gap: 7px;
}

.message__status--error {
  color: #ff4d4f;
}

.thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: pulse 1.1s ease-in-out infinite;
  background: #1677ff;
}

.tool-activity {
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  margin-top: 8px;
  background: #fafafa;
  color: #595959;
  font-size: 10px;
  gap: 8px;
}

.tool-activity span {
  flex: 1;
}

.tool-activity small {
  color: #8c8c8c;
  text-transform: uppercase;
}

.approval-card {
  display: grid;
  align-items: center;
  padding: 12px;
  border: 1px solid #faad14;
  border-radius: 8px;
  margin-top: 10px;
  background: #fafafa;
  color: #faad14;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) repeat(4, auto);
}

.approval-card > div {
  min-width: 0;
}

.approval-card strong {
  display: block;
  color: #1f1f1f;
  font-size: 11px;
}

.approval-card p {
  margin: 3px 0 0;
  color: #595959;
  font-size: 9px;
  line-height: 1.5;
}

.approval-card code {
  display: block;
  max-width: 420px;
  margin-top: 6px;
  overflow: hidden;
  color: #434343;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-card button {
  min-height: 29px;
  padding: 0 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.approval-card__deny {
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #595959;
}

.approval-card__allow {
  background: #1677ff;
  color: #fff;
}

.composer-wrap {
  padding:
    8px
    max(var(--page-gutter), calc((100% - var(--content-reading)) / 2))
    15px;
  background: #f5f5f5;
}

.composer {
  padding: 12px 13px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
}

.context-list {
  display: flex;
  padding: 0 1px 9px;
  overflow-x: auto;
  gap: 7px;
}

.context-chip {
  display: flex;
  min-width: 150px;
  max-width: 220px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  background: #fafafa;
  color: #595959;
  gap: 7px;
}

.context-chip > span {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.context-chip strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-chip small {
  color: #8c8c8c;
  font-size: 8px;
}

.context-chip button {
  width: 21px;
  height: 21px;
  border-radius: 6px;
  background: transparent;
  color: #8c8c8c;
  cursor: pointer;
}

.context-chip button:hover {
  background: #fafafa;
  color: #ff4d4f;
}

.composer:focus-within {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgb(22 119 255 / 12%);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 38px;
  max-height: 160px;
  padding: 2px 3px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #1f1f1f;
  font-size: 13px;
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: #8c8c8c;
}

.composer__toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
}

.composer__attachments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.composer__attachments button {
  display: flex;
  height: 29px;
  align-items: center;
  padding: 0 7px;
  border-radius: 7px;
  background: transparent;
  color: #595959;
  cursor: pointer;
  gap: 5px;
}

.composer__attachments button:hover {
  background: #e6f4ff;
  color: #1677ff;
}

.divider {
  width: 1px;
  height: 17px;
  margin: 0 4px;
  background: #f0f0f0;
}

.composer__expert,
.composer__mode {
  display: flex;
  height: 29px;
  align-items: center;
  border: 1px solid;
  border-radius: 7px;
}

.composer__expert {
  max-width: 150px;
  padding: 0 5px 0 8px;
  border-color: var(--border-default);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  gap: 3px;
}

.composer__expert svg {
  flex: 0 0 auto;
}

.composer__expert select,
.composer__mode select {
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.composer__expert select {
  min-width: 0;
  max-width: 120px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
}

.composer__expert:focus-within,
.composer__mode:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.composer__mode {
  padding: 0 4px 0 8px;
  border-color: #91caff;
  background: #e6f4ff;
  color: #0958d9;
  font-size: 10px;
  font-weight: 700;
  gap: 2px;
}

.composer__mode select {
  max-width: 138px;
  font: inherit;
}

.composer__mode--plan {
  border-color: #b7eb8f;
  background: #f6ffed;
  color: #237804;
}

.composer__mode--execute {
  border-color: #ffd591;
  background: #fff7e6;
  color: #ad4e00;
}

.model-button {
  font-size: 10px;
  font-weight: 600;
}

.runtime-picker {
  position: relative;
}

.runtime-picker__menu {
  position: absolute;
  z-index: 25;
  right: 0;
  bottom: 36px;
  display: flex;
  width: 286px;
  max-height: min(420px, 60vh);
  flex-direction: column;
  padding: 8px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  gap: 3px;
}

.runtime-picker__menu > strong {
  padding: 5px 7px 3px;
  color: #8c8c8c;
  font-size: 9px;
}

.runtime-picker__menu > button {
  display: grid;
  width: 100%;
  height: auto;
  min-height: 42px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 7px;
  color: #1f1f1f;
  gap: 2px 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  text-align: left;
}

.runtime-picker__menu > button:hover,
.runtime-picker__menu > button[aria-checked="true"] {
  background: #e6f4ff;
  color: #0958d9;
}

.runtime-picker__menu > button[aria-checked="true"]::after {
  content: "✓";
  font-weight: 700;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.runtime-picker__menu > button > span {
  display: flex;
  min-width: 0;
  align-items: center;
  font-size: 10px;
  font-weight: 650;
  gap: 5px;
}

.runtime-picker__menu > button > small {
  overflow: hidden;
  color: #8c8c8c;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-picker__divider {
  height: 1px;
  margin: 4px;
  background: #f0f0f0;
}

.send-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  margin-left: auto;
  background: #1677ff;
  color: #fff;
  cursor: pointer;
}

.send-button:hover {
  background: #4096ff;
}

.send-button:disabled {
  background: #f5f5f5;
  color: #8c8c8c;
  cursor: default;
  box-shadow: none;
}

.send-button--stop {
  background: #ff4d4f;
}

.composer-hint {
  margin: 7px 0 0;
  color: #8c8c8c;
  font-size: 9px;
  text-align: center;
}

.settings-backdrop {
  position: fixed;
  z-index: 50;
  display: grid;
  background: rgb(0 0 0 / 45%);
  inset: 0;
  place-items: center;
}

.settings-page {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #f7f8fa;
}

.settings-panel {
  display: grid;
  width: min(820px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 16px rgb(0 0 0 / 8%);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.settings-page .settings-panel {
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.settings-panel__header {
  display: flex;
  align-items: center;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #f0f0f0;
}

.settings-panel__header > div {
  flex: 1;
}

.settings-panel__header .eyebrow {
  margin-bottom: 5px;
}

.settings-panel__header h2 {
  margin: 0;
  color: #1f1f1f;
  font-size: 22px;
  font-weight: 500;
}

.settings-panel__description {
  margin: 6px 0 0;
  color: #8c8c8c;
  font-size: 10px;
}

.settings-panel__body {
  display: flex;
  flex-direction: column;
  padding: 20px 24px 26px;
  overflow-y: auto;
  gap: 18px;
}

.settings-panel__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
}

.settings-tabs {
  display: grid;
  padding: 3px;
  border-radius: 9px;
  background: #f5f5f5;
  grid-template-columns: repeat(7, 1fr);
}

.settings-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 34px;
  border-radius: 7px;
  background: transparent;
  color: #595959;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.settings-tabs button strong {
  font-size: 11px;
}

.settings-tabs button small {
  display: none;
  color: #8c8c8c;
  font-size: 9px;
  font-weight: 400;
}

.settings-page .settings-panel__body {
  display: grid;
  padding: 24px 32px 32px;
  align-items: start;
  grid-template-columns: 190px minmax(0, 760px);
  justify-content: center;
  gap: 28px;
}

.settings-page .settings-tabs {
  position: sticky;
  top: 0;
  display: flex;
  padding: 6px;
  flex-direction: column;
  grid-template-columns: none;
}

.settings-page .settings-tabs button {
  min-height: 58px;
  padding: 10px 12px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.settings-page .settings-tabs button small {
  display: block;
  margin-top: 3px;
}

.settings-page .settings-tabs button[aria-selected='true'] {
  background: #eaf3ff;
  box-shadow: none;
}

.settings-tabs button[aria-selected='true'] {
  background: #fff;
  color: #1677ff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 8%);
}

.settings-section {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fafafa;
  gap: 13px;
}

.settings-section__title {
  display: flex;
  align-items: center;
  color: #1677ff;
  gap: 9px;
}

.settings-section__title > div {
  display: flex;
  flex-direction: column;
}

.settings-section__title--actions > div {
  flex: 1;
}

.settings-section__title--actions .secondary-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: #1677ff;
  gap: 5px;
}

.settings-section__title strong {
  color: #1f1f1f;
  font-size: 12px;
}

.settings-section__title small {
  color: #8c8c8c;
  font-size: 9px;
}

.model-capability-badge,
.runtime-capability-badge {
  padding: 2px 7px;
  border: 1px solid #ffd591;
  border-radius: 999px;
  background: #fff7e6;
  color: #ad4e00;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.field {
  display: flex;
  flex-direction: column;
  color: #1f1f1f;
  gap: 7px;
}

.field > span {
  font-size: 11px;
  font-weight: 650;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #1f1f1f;
  font-size: 12px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgb(22 119 255 / 12%);
}

.field input:disabled,
.field textarea:disabled,
.field select:disabled {
  background: #f5f5f5;
  color: #8c8c8c;
}

.field textarea {
  padding-top: 9px;
  padding-bottom: 9px;
  resize: vertical;
}

.field small {
  color: #8c8c8c;
  font-size: 9px;
  line-height: 1.45;
}

.credential-state {
  display: flex;
  align-items: center;
  color: #595959;
  font-size: 10px;
  gap: 7px;
}

.credential-state span {
  flex: 1;
}

.credential-state button {
  padding: 4px 7px;
  border-radius: 6px;
  background: transparent;
  color: #ff4d4f;
  cursor: pointer;
  font-size: 9px;
}

.credential-state button:hover {
  background: #fafafa;
}

.settings-warning {
  padding: 9px 10px;
  border: 1px solid #faad14;
  border-radius: 8px;
  margin: 0;
  background: #fafafa;
  color: #595959;
  font-size: 10px;
  line-height: 1.55;
}

.settings-notice,
.settings-empty {
  margin: 0;
  color: #8c8c8c;
  font-size: 10px;
  line-height: 1.55;
}

.capability-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.capability-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  gap: 8px;
}

.capability-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.capability-card__header > div:first-child {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.capability-card strong {
  color: #1f1f1f;
  font-size: 11px;
}

.capability-card small,
.runtime-assignments small {
  color: #8c8c8c;
  font-size: 9px;
}

.capability-card p {
  margin: 0;
  color: #595959;
  font-size: 10px;
  line-height: 1.55;
}

.capability-card code {
  padding: 7px 8px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  color: #595959;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-switch,
.runtime-assignments,
.runtime-assignments label,
.capability-card__actions,
.capability-card__actions button,
.capability-remove {
  display: flex;
  align-items: center;
}

.capability-switch,
.runtime-assignments label {
  color: #595959;
  font-size: 9px;
  gap: 4px;
}

.runtime-assignments {
  flex-wrap: wrap;
  gap: 9px;
}

.capability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.capability-tags span {
  padding: 2px 6px;
  border-radius: 10px;
  background: #e6f4ff;
  color: #1677ff;
  font-size: 8px;
}

.capability-remove {
  margin-left: auto;
  background: transparent;
  color: #ff4d4f;
  cursor: pointer;
  font-size: 9px;
  gap: 3px;
}

.capability-card__actions {
  gap: 4px;
}

.capability-card__actions button {
  padding: 4px 6px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #595959;
  cursor: pointer;
  font-size: 8px;
  gap: 3px;
}

.mcp-editor {
  display: flex;
  flex-direction: column;
  padding: 13px;
  border: 1px solid #91caff;
  border-radius: 8px;
  background: #f0f8ff;
  gap: 12px;
}

.mcp-editor__header,
.mcp-editor__actions {
  display: flex;
  align-items: center;
}

.mcp-editor__header strong {
  flex: 1;
  font-size: 11px;
}

.mcp-editor__actions {
  justify-content: flex-end;
  gap: 8px;
}

.mcp-test-result {
  color: #389e0d !important;
}

.settings-panel__footer {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  gap: 8px;
}

.settings-feedback {
  flex: 1;
  min-width: 0;
  font-size: 10px;
}

.settings-error {
  color: #ff4d4f;
}

.settings-success {
  display: flex;
  align-items: center;
  color: #52c41a;
  gap: 5px;
}

.primary-button,
.secondary-button {
  min-height: var(--control-height);
  padding: 0 13px;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.primary-button {
  background: var(--accent-solid);
  color: var(--text-on-accent);
}

.primary-button:hover {
  background: var(--accent-solid-hover);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.secondary-button {
  border: 1px solid var(--border-control);
  background: var(--surface-raised);
  color: var(--text-secondary);
}

.conversation-row {
  position: relative;
  display: flex;
  align-items: center;
}

.conversation-row .conversation-item {
  padding-right: 58px;
}

.conversation-more,
.conversation-delete {
  position: absolute;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: #8c8c8c;
  cursor: pointer;
  opacity: 0;
}

.conversation-more {
  right: 31px;
}

.conversation-delete {
  right: 5px;
}

.conversation-row:hover .conversation-more,
.conversation-row:hover .conversation-delete,
.conversation-row--active .conversation-more,
.conversation-more:focus-visible,
.conversation-delete:focus-visible {
  opacity: 1;
}

.conversation-more[aria-expanded='true'] {
  background: var(--accent-subtle);
  color: var(--accent);
  opacity: 1;
}

.conversation-more:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.conversation-delete:hover {
  background: var(--danger-subtle);
  color: var(--danger);
}

.conversation-actions {
  display: grid;
  padding: var(--space-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  margin: 2px 5px var(--space-2);
  background: var(--surface-subtle);
  gap: 2px;
}

.conversation-actions button {
  display: flex;
  min-height: 30px;
  align-items: center;
  padding: 0 var(--space-2);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--font-caption);
  gap: var(--space-2);
  text-align: left;
}

.conversation-actions button:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.conversation-rename {
  display: grid;
  padding: var(--space-1);
  margin: 2px 5px var(--space-2);
  gap: var(--space-1);
  grid-template-columns: minmax(0, 1fr) 28px 28px;
}

.conversation-rename input {
  min-width: 0;
  height: 30px;
  padding: 0 var(--space-2);
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-raised);
  font-size: var(--font-caption);
}

.conversation-rename button {
  display: grid;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  cursor: pointer;
}

.app-notice {
  position: fixed;
  z-index: 60;
  bottom: var(--space-6);
  left: 50%;
  display: flex;
  max-width: min(520px, calc(100vw - 32px));
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: var(--shadow-dialog);
  color: var(--text-secondary);
  font-size: var(--font-body);
  gap: var(--space-3);
  transform: translateX(-50%);
}

.app-notice span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-notice button {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.app-notice button:hover {
  background: var(--surface-muted);
  color: var(--text-primary);
}

.conversation-empty {
  padding: 12px 10px;
  margin: 0;
  color: #8c8c8c;
  font-size: 10px;
}

.message-sources {
  display: flex;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #1677ff;
  border-radius: 8px;
  margin-top: 9px;
  background: #e6f4ff;
  color: #1677ff;
  font-size: 9px;
  gap: 6px;
}

.message-citations {
  padding: 8px 10px;
  border: 1px solid #d6e4ff;
  border-radius: 8px;
  margin-top: 7px;
  background: #fafcff;
  font-size: 9px;
}

.message-citations summary {
  color: #1677ff;
  cursor: pointer;
  font-weight: 600;
}

.message-citations ol {
  padding-left: 18px;
  margin: 8px 0 0;
}

.message-citations li {
  margin-bottom: 8px;
}

.message-citations strong,
.message-citations small {
  display: block;
}

.message-citations small {
  margin-top: 2px;
  color: #8c8c8c;
}

.message-citations p {
  margin: 4px 0;
  color: #434343;
  line-height: 1.5;
}

.message-retry {
  padding: 6px 9px;
  border: 1px solid #ff4d4f;
  border-radius: 7px;
  margin-top: 9px;
  background: #fafafa;
  color: #ff4d4f;
  cursor: pointer;
  font-size: 9px;
}

.context-chip__thumbnail {
  width: 34px;
  height: 28px;
  flex: 0 0 34px;
  border-radius: 5px;
  object-fit: cover;
}

.knowledge-scope {
  position: relative;
}

.knowledge-scope__popover {
  position: absolute;
  z-index: 20;
  bottom: 36px;
  left: 0;
  display: flex;
  width: 270px;
  max-height: 260px;
  flex-direction: column;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 6px 16px rgb(0 0 0 / 8%);
  gap: 4px;
}

.knowledge-scope__popover > strong {
  padding: 3px 5px 7px;
  color: #1f1f1f;
  font-size: 10px;
}

.knowledge-scope__popover label {
  display: grid;
  align-items: center;
  padding: 7px 6px;
  border-radius: 7px;
  color: #595959;
  cursor: pointer;
  gap: 3px 7px;
  grid-template-columns: auto 1fr auto;
}

.knowledge-scope__popover label:hover {
  background: #e6f4ff;
  color: #1677ff;
}

.knowledge-scope__popover label input {
  accent-color: #1677ff;
}

.knowledge-scope__popover label span {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-scope__popover label small {
  color: #8c8c8c;
  font-size: 8px;
}

.workspace-picker {
  display: flex;
  gap: 8px;
}

.workspace-picker input {
  flex: 1;
}

.check-field {
  display: flex;
  align-items: center;
  color: #595959;
  cursor: pointer;
  font-size: 10px;
  gap: 8px;
}

.check-field input {
  width: 15px;
  height: 15px;
  accent-color: #1677ff;
}

.settings-section--danger {
  border-color: #ff4d4f;
  background: #fafafa;
}

.settings-section--danger strong {
  color: #ff4d4f;
  font-size: 11px;
}

.settings-section--danger p {
  margin: 5px 0 0;
  color: #595959;
  font-size: 9px;
  line-height: 1.55;
}

.danger-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  min-height: var(--control-height);
  padding: 0 13px;
  border: 1px solid var(--danger-solid);
  border-radius: var(--radius-control);
  background: var(--danger-solid);
  color: var(--text-on-accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  gap: 6px;
}

.danger-button:hover {
  filter: brightness(1.06);
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.danger-button--quiet {
  border-color: var(--danger-border);
  background: var(--danger-subtle);
  color: var(--danger);
}

.danger-confirm {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: var(--font-caption);
  gap: var(--space-2);
}

.heartbeat-settings__actions .danger-button,
.heartbeat-settings__actions .secondary-button {
  width: auto;
  min-width: 40px;
  min-height: 28px;
  padding: 4px 8px;
}

.heartbeat-settings__actions .danger-button {
  border-color: var(--danger-solid);
  background: var(--danger-solid);
  color: var(--text-on-accent);
}

.heartbeat-settings__actions .danger-button--quiet {
  border-color: var(--danger-border);
  background: var(--danger-subtle);
  color: var(--danger);
}

.heartbeat-settings__actions .secondary-button {
  border-color: var(--border-default);
  background: var(--surface-raised);
  color: var(--text-secondary);
}

.workspace-panel-scroll {
  min-height: 0;
  padding:
    var(--page-gutter)
    max(
      var(--page-gutter),
      calc((100% - var(--content-standard)) / 2)
    );
  overflow-y: auto;
}

.workspace-panel-scroll.page-shell--reading {
  display: grid;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto;
}

.page-shell--master-detail {
  padding: clamp(14px, 2vw, 28px);
  overflow-x: hidden;
  container-type: inline-size;
}

.page-shell--dashboard {
  padding-inline:
    max(
      var(--page-gutter),
      calc((100% - var(--content-dashboard)) / 2)
    );
  container-type: inline-size;
}

.page-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  gap: var(--space-6);
}

.page-header__content {
  min-width: 0;
  flex: 1;
}

.page-header__title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.page-header__icon {
  display: grid;
  color: var(--accent);
  place-items: center;
}

.page-header h1 {
  overflow: hidden;
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-page-title);
  font-weight: 550;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
}

.page-header__description {
  max-width: 680px;
  margin: var(--space-2) 0 0;
  color: var(--text-secondary);
  font-size: var(--font-body);
  line-height: 1.65;
}

.page-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.page-header__actions button {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.page-header--compact {
  display: block;
  padding-bottom: var(--space-3);
  border-bottom: 0;
}

.page-header--compact .eyebrow {
  margin-bottom: 5px;
}

.page-header--compact h1 {
  font-size: 17px;
}

.page-header--compact .page-header__description {
  font-size: var(--font-caption);
}

.scope-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--border-control);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: var(--font-caption);
  font-weight: 650;
  gap: 5px;
  line-height: 1;
}

.scope-badge > span {
  display: grid;
  place-items: center;
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.page-tabs__tab {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  gap: 6px;
}

.page-tabs__tab:hover {
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.page-tabs__tab--active {
  border-color: var(--border-control);
  background: var(--accent-subtle);
  color: var(--accent);
}

.page-tabs__count {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: var(--text-on-accent);
  font-size: 9px;
  place-items: center;
}

.page-tabs__icon {
  display: grid;
  place-items: center;
}

.segmented-control {
  display: inline-flex;
  max-width: 100%;
  padding: 3px;
  border: 1px solid var(--border-control);
  border-radius: calc(var(--radius-control) + 2px);
  overflow-x: auto;
  background: var(--surface-subtle);
  gap: 2px;
}

.segmented-control__option {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: calc(var(--radius-control) - 2px);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--font-caption);
  font-weight: 600;
  white-space: nowrap;
}

.segmented-control__option--active {
  background: var(--surface-raised);
  color: var(--accent);
  box-shadow: var(--shadow-card);
}

.empty-state {
  display: grid;
  place-content: center;
  justify-items: center;
  padding: var(--space-6);
  color: var(--text-muted);
  gap: var(--space-2);
  text-align: center;
}

.empty-state--page {
  min-height: 460px;
}

.empty-state--section {
  min-height: 200px;
}

.empty-state--table {
  min-height: 88px;
}

.empty-state__icon {
  display: grid;
  color: var(--text-muted);
  place-items: center;
}

.empty-state strong {
  color: var(--text-primary);
  font-size: var(--font-section-title);
}

.empty-state p {
  max-width: 480px;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-body);
  line-height: 1.6;
}

.empty-state__action {
  margin-top: var(--space-1);
}

.status-badge {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: var(--font-caption);
  font-weight: 650;
}

.knowledge-workspace {
  width: 100%;
  min-height: max(520px, calc(100dvh - 114px));
  grid-template-columns: clamp(230px, 20vw, 280px) minmax(0, 1fr);
  container-type: inline-size;
}

.knowledge-workspace__sidebar {
  min-width: 0;
  padding: 18px;
  overflow: hidden auto;
  border-right: 1px solid #f0f0f0;
}

.knowledge-workspace__library-nav {
  min-width: 0;
  overflow: hidden auto;
}

.knowledge-workspace__main {
  min-height: 0;
  overflow: hidden;
}

.knowledge-workspace__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 15px;
  border-bottom: 1px solid #f0f0f0;
  gap: 16px;
}

.knowledge-workspace__header > div:first-child {
  min-width: 0;
  flex: 1;
}

.knowledge-workspace__header h2 {
  overflow: hidden;
  text-overflow: ellipsis;
}

.knowledge-workspace__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-workspace__strategy {
  width: min(170px, 100%);
}

.knowledge-workspace__tabs {
  padding: 12px 22px 0;
}

.knowledge-workspace__tabs .page-tabs {
  width: 100%;
}

.knowledge-workspace__body {
  padding: clamp(16px, 2vw, 24px);
}

.knowledge-documents__section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.knowledge-documents__import-actions,
.knowledge-source-row__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-documents__url-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.knowledge-source-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.knowledge-documents__search {
  width: min(300px, 50%);
}

.knowledge-documents__table-scroll {
  margin-top: 12px;
  overflow-x: auto;
}

.knowledge-documents__table-scroll table {
  min-width: 680px;
}

.knowledge-graph {
  display: grid;
  min-height: clamp(500px, calc(100dvh - 260px), 780px);
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.knowledge-graph--with-details {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
}

.knowledge-graph__canvas {
  min-width: 0;
}

.knowledge-graph__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  gap: 8px;
}

.knowledge-graph__search {
  min-width: 220px;
  flex: 1 1 280px;
}

.knowledge-graph__filter {
  width: 150px;
  flex: 0 1 150px;
}

.knowledge-graph__svg {
  min-height: clamp(420px, calc(100dvh - 330px), 720px);
}

.knowledge-graph__detail {
  max-height: clamp(500px, calc(100dvh - 260px), 780px);
}

@container (max-width: 1120px) {
  .knowledge-graph--with-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-graph__detail {
    max-height: none;
  }
}

@container (max-width: 860px) {
  .knowledge-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-workspace__sidebar {
    padding: 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .knowledge-workspace__library-nav {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .knowledge-workspace__library-nav > ul {
    grid-auto-columns: minmax(190px, 240px);
    grid-auto-flow: column;
    padding-bottom: 2px !important;
  }

  .knowledge-workspace__header {
    padding: 17px 18px 13px;
  }

  .knowledge-workspace__tabs {
    padding: 10px 18px 0;
  }
}

@container (max-width: 640px) {
  .knowledge-workspace__header {
    flex-direction: column;
  }

  .knowledge-workspace__header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .knowledge-workspace__strategy {
    width: min(220px, 100%);
  }

  .knowledge-source-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-documents__search {
    width: 100%;
  }

  .knowledge-documents__url-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .knowledge-documents__url-form > input {
    grid-column: 1 / -1;
  }

  .knowledge-graph__search {
    min-width: 100%;
  }

  .knowledge-graph__filter {
    width: min(180px, 100%);
    flex-basis: 180px;
  }
}

.knowledge-panel {
  display: flex;
  width: 100%;
  max-width: var(--content-standard);
  min-height: 100%;
  flex-direction: column;
  margin: 0 auto;
}

.activity-panel {
  display: flex;
  width: 100%;
  min-height: 100%;
  flex-direction: column;
}

.knowledge-panel__limits {
  margin: 14px 0;
  color: #595959;
  font-size: 10px;
}

.knowledge-panel__error {
  padding: 10px 12px;
  border: 1px solid #ff4d4f;
  border-radius: 9px;
  background: #fafafa;
  color: #ff4d4f;
  font-size: 10px;
}

.knowledge-panel__empty,
.knowledge-panel__loading {
  display: grid;
  min-height: 260px;
  place-content: center;
  justify-items: center;
  color: #8c8c8c;
  gap: 8px;
  text-align: center;
}

.knowledge-panel__empty strong {
  color: #595959;
  font-size: 13px;
}

.knowledge-panel__empty span {
  margin: 0;
  font-size: 10px;
}

.knowledge-panel__summary {
  display: flex;
  align-items: center;
  margin: 4px 0 12px;
  color: #595959;
  font-size: 10px;
}

.knowledge-panel__summary > span:first-child {
  flex: 1;
}

.knowledge-panel__clear-confirm {
  display: flex;
  align-items: center;
  gap: 7px;
}

.knowledge-panel__list,
.activity-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.knowledge-panel__document {
  display: flex;
  align-items: center;
  padding: 13px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
  color: #1677ff;
  gap: 10px;
}

.knowledge-panel__document-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.knowledge-panel__document-info strong {
  overflow: hidden;
  color: #1f1f1f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-panel__document-info span {
  color: #8c8c8c;
  font-size: 9px;
}

.token-usage {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  margin-top: var(--space-4);
  background: var(--surface-raised);
}

.token-usage__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-usage__header h3 {
  flex: 1;
  margin: 0;
  color: #1f1f1f;
  font-size: 13px;
}

.token-usage__stats {
  display: grid;
  margin: 12px 0;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

.token-usage__stats div {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: #fafafa;
}

.token-usage__stats dt {
  overflow: hidden;
  color: #8c8c8c;
  font-size: var(--font-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-usage__stats dd {
  overflow: hidden;
  margin: 3px 0 0;
  color: #1677ff;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.token-usage__table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.token-usage table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--font-caption);
}

.token-usage th,
.token-usage td {
  padding: 7px 9px;
  border-top: 1px solid #f0f0f0;
  color: #595959;
  text-align: right;
  white-space: nowrap;
}

.token-usage thead th {
  color: #8c8c8c;
  font-size: var(--font-caption);
  font-weight: 600;
}

.token-usage th:first-child {
  position: sticky;
  left: 0;
  min-width: 120px;
  background: var(--surface-raised);
  color: var(--text-primary);
  text-align: left;
}

.token-usage tbody th span,
.token-usage tbody th small {
  display: block;
}

.token-usage tbody th small {
  margin-top: 2px;
  color: #8c8c8c;
  font-size: 8px;
  font-weight: 400;
}

.token-usage td.token-usage__empty {
  color: #8c8c8c;
  text-align: center;
}

.activity-panel__stats {
  display: grid;
  margin: 18px 0 14px;
  gap: 9px;
  grid-template-columns: repeat(3, 1fr);
}

.activity-panel__stats div {
  padding: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
}

.activity-panel__stats dt {
  color: #8c8c8c;
  font-size: var(--font-caption);
}

.activity-panel__stats dd {
  margin: 4px 0 0;
  color: #1677ff;
  font-size: 18px;
  font-weight: 700;
}

.activity-panel__filters {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 12px;
  gap: 6px;
}

.activity-item {
  padding: 13px 14px;
  border: 1px solid #d9d9d9;
  border-left: 3px solid #1677ff;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
}

.activity-item--failed,
.activity-item--denied {
  border-left-color: #ff4d4f;
}

.activity-item__header,
.activity-item__labels {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.activity-item__header time {
  margin-left: auto;
  color: #8c8c8c;
  font-size: 8px;
}

.activity-item__kind {
  padding: 3px 6px;
  border-radius: 6px;
  background: #e6f4ff;
  color: #1677ff;
  font-size: var(--font-caption);
}

.activity-item__status {
  background: var(--accent-subtle);
  color: var(--accent);
}

.activity-item__status--completed {
  background: var(--success-subtle);
  color: var(--success);
}

.activity-item__status--failed,
.activity-item__status--denied,
.activity-item__status--cancelled,
.activity-item__status--interrupted {
  background: var(--danger-subtle);
  color: var(--danger);
}

.activity-item h3 {
  margin: 9px 0 4px;
  color: #1f1f1f;
  font-size: 13px;
}

.activity-item p {
  margin: 0;
  color: #595959;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.activity-item__conversation {
  padding: 5px 0;
  margin-top: 7px;
  background: transparent;
  color: #1677ff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 650;
}

.heartbeat-center {
  display: flex;
  width: 100%;
  min-height: 100%;
  flex-direction: column;
  container: heartbeat-center / inline-size;
}

.heartbeat-center__latest > div:last-child,
.heartbeat-center__suggestion > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.heartbeat-center__latest button,
.heartbeat-center__suggestion button {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.heartbeat-center__error {
  padding: 9px 11px;
  border: 1px solid #ffccc7;
  border-radius: 8px;
  margin: 14px 0 0;
  background: #fff2f0;
  color: #cf1322;
  font-size: 10px;
}

.heartbeat-center > .page-tabs {
  padding: 14px 0;
}

.heartbeat-center__panel {
  display: flex;
  flex-direction: column;
  padding-bottom: 32px;
  gap: 14px;
}

.heartbeat-center__section {
  min-width: 0;
  padding: 16px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fff;
}

.heartbeat-center__section-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  margin-bottom: 13px;
  gap: 10px;
}

.heartbeat-center__section-heading > div {
  min-width: 0;
  flex: 1;
}

.heartbeat-center__section-heading h3 {
  display: flex;
  align-items: center;
  margin: 2px 0 0;
  color: #1f1f1f;
  font-size: var(--font-section-title);
  gap: 6px;
}

.heartbeat-center__section-heading > span,
.heartbeat-center__section-heading > time {
  color: #595959;
  font-size: 10px;
}

.heartbeat-center__live {
  display: inline-flex;
  align-items: center;
  color: #8c8c8c;
  font-size: 9px;
  font-weight: 650;
  gap: 6px;
}

.heartbeat-center__live > span,
.heartbeat-center__pulse-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #bfbfbf;
}

.heartbeat-center__live--active {
  color: #237804;
}

.heartbeat-center__live--active > span,
.heartbeat-center__pulse-dot--active {
  background: #52c41a;
  box-shadow: 0 0 0 4px rgb(82 196 26 / 12%);
}

.heartbeat-center__section-empty {
  margin: 0;
  color: #8c8c8c;
  font-size: 10px;
  line-height: 1.6;
}

.heartbeat-center__config-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.heartbeat-center__config-card {
  padding: 12px;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  background: #fafafa;
}

.heartbeat-center__config-card header {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.heartbeat-center__config-card header > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.heartbeat-center__config-card header strong {
  overflow: hidden;
  color: #1f1f1f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heartbeat-center__config-card header small {
  color: #595959;
  font-size: var(--font-caption);
}

.heartbeat-center__config-card dl {
  display: grid;
  margin: 11px 0;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.heartbeat-center__config-card dl div {
  min-width: 0;
}

.heartbeat-center__config-card dt {
  color: #595959;
  font-size: var(--font-caption);
}

.heartbeat-center__config-card dd {
  overflow: hidden;
  margin: 2px 0 0;
  color: #595959;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heartbeat-center__config-card > div:last-child {
  display: flex;
  gap: 6px;
}

.heartbeat-center__config-card button {
  padding: 5px 8px;
  border-radius: 7px;
  background: #fff;
  color: #1677ff;
  cursor: pointer;
  font-size: var(--font-caption);
  font-weight: 650;
}

.heartbeat-center__config-card button:hover {
  background: #e6f4ff;
}

.heartbeat-center__config-card button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.heartbeat-center__metrics {
  display: grid;
  margin: 0;
  gap: 9px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.heartbeat-center__metrics > div {
  display: flex;
  min-width: 0;
  min-height: 125px;
  flex-direction: column;
  padding: 13px;
  border: 1px solid #d9d9d9;
  border-radius: 11px;
  background: #fff;
}

.heartbeat-center__metrics dt {
  display: flex;
  align-items: center;
  color: #595959;
  font-size: 11px;
  font-weight: 650;
  gap: 6px;
}

.heartbeat-center__metrics dt svg {
  color: #1677ff;
}

.heartbeat-center__metrics dd {
  margin: 7px 0 2px;
  color: #1677ff;
  font-size: 21px;
  font-weight: 750;
}

.heartbeat-center__metrics small {
  color: #595959;
  font-size: var(--font-caption);
  line-height: 1.45;
}

.heartbeat-center__meter {
  height: 5px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f0f0;
}

.heartbeat-center__meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1677ff, #69b1ff);
}

.heartbeat-center__metric-note {
  display: flex;
  min-height: 23px;
  align-items: flex-end;
  margin-top: auto;
  color: #1677ff;
  font-size: 9px;
  font-weight: 650;
}

.heartbeat-center__overview-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.heartbeat-center__legend {
  display: flex;
  margin-bottom: 12px;
  color: #8c8c8c;
  font-size: 9px;
  gap: 12px;
}

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

.heartbeat-center__legend span::before {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #1677ff;
  content: "";
}

.heartbeat-center__legend--memory::before {
  background: #9254de !important;
}

.heartbeat-center__legend--task::before {
  background: #13c2c2 !important;
}

.heartbeat-center__trend {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.heartbeat-center__trend-row {
  display: grid;
  align-items: center;
  gap: 8px;
  grid-template-columns: 86px minmax(0, 1fr) 20px;
}

.heartbeat-center__trend-row time,
.heartbeat-center__trend-row small {
  color: #595959;
  font-size: 9px;
}

.heartbeat-center__trend-row small {
  text-align: right;
}

.heartbeat-center__trend-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #f5f5f5;
}

.heartbeat-center__trend-total {
  display: flex;
  height: 100%;
  min-width: 6px;
  overflow: hidden;
  border-radius: inherit;
}

.heartbeat-center__trend-insight {
  background: #1677ff;
}

.heartbeat-center__trend-memory {
  background: #9254de;
}

.heartbeat-center__trend-task {
  background: #13c2c2;
}

.heartbeat-center__latest > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 10px;
  color: #1f1f1f;
  font-size: 10px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.heartbeat-center__latest ul,
.heartbeat-center__timeline ul {
  padding: 0;
  margin: 0 0 12px;
  color: #595959;
  font-size: 9px;
  line-height: 1.6;
  list-style: none;
}

.heartbeat-center__latest li,
.heartbeat-center__timeline li {
  position: relative;
  padding-left: 12px;
  margin-top: 5px;
}

.heartbeat-center__latest li::before,
.heartbeat-center__timeline li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1677ff;
  content: "";
}

.heartbeat-center__suggestions,
.heartbeat-center__history {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.heartbeat-center__suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heartbeat-center__suggestion {
  padding: 12px;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  background: #fafafa;
}

.heartbeat-center__suggestion header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.heartbeat-center__suggestion header span {
  padding: 3px 6px;
  border-radius: 6px;
  background: #e6f4ff;
  color: #1677ff;
  font-size: 9px;
  font-weight: 650;
}

.heartbeat-center__suggestion header small {
  margin-left: auto;
  color: #595959;
  font-size: 9px;
}

.heartbeat-center__suggestion > strong {
  display: block;
  margin-bottom: 5px;
  color: #1f1f1f;
  font-size: 11px;
}

.heartbeat-center__suggestion > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 10px;
  color: #595959;
  font-size: 10px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.heartbeat-center__suggestion
  > p.heartbeat-center__suggestion-content--expanded {
  display: block;
  overflow: visible;
}

.heartbeat-center__timeline {
  position: relative;
  padding-left: 13px;
}

.heartbeat-center__timeline::before {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 3px;
  width: 1px;
  background: #d9d9d9;
  content: "";
}

.heartbeat-center__timeline > article {
  position: relative;
  padding: 0 0 17px 12px;
}

.heartbeat-center__timeline-dot {
  position: absolute;
  top: 4px;
  left: -14px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1677ff;
  box-shadow: 0 0 0 1px #91caff;
}

.heartbeat-center__timeline header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 6px;
  gap: 7px;
}

.heartbeat-center__timeline time {
  color: #1f1f1f;
  font-size: 10px;
  font-weight: 650;
}

.heartbeat-center__timeline header small {
  color: #595959;
  font-size: 9px;
}

.heartbeat-center__report-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 5px;
  color: #595959;
  font-size: 10px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: pre-wrap;
}

.heartbeat-center__report-summary--expanded {
  display: block;
  overflow: visible;
}

.heartbeat-center__link-button {
  padding: 3px 0;
  background: transparent;
  color: #1677ff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 650;
}

.heartbeat-center__run-list {
  display: flex;
  padding: 0;
  margin: 0;
  flex-direction: column;
  gap: 7px;
  list-style: none;
}

.heartbeat-center__run {
  display: flex;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #f0f0f0;
  border-radius: 9px;
  background: #fafafa;
  color: #8c8c8c;
  gap: 8px;
}

.heartbeat-center__run--completed {
  color: #389e0d;
}

.heartbeat-center__run--failed {
  color: #cf1322;
}

.heartbeat-center__run > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.heartbeat-center__run strong {
  color: #1f1f1f;
  font-size: 10px;
}

.heartbeat-center__run small {
  color: #595959;
  font-size: 9px;
}

.heartbeat-center__run em {
  margin-top: 3px;
  color: #cf1322;
  font-size: 9px;
  font-style: normal;
  line-height: 1.5;
  word-break: break-word;
}

.heartbeat-center__load-more {
  min-height: 34px;
  align-self: flex-start;
  margin-top: 12px;
}

.heartbeat-center__plans .heartbeat-settings {
  max-width: none;
  padding: 18px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fff;
}

.appearance-settings {
  gap: 14px;
}

.appearance-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.appearance-options label {
  display: flex;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.appearance-options label:has(input:checked) {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgb(22 119 255 / 12%);
}

.appearance-options label:has(input:focus-visible) {
  outline: 2px solid #1677ff;
  outline-offset: 2px;
}

.appearance-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.appearance-options__preview {
  display: grid;
  height: 76px;
  padding: 9px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #f5f5f5;
  gap: 5px;
  grid-template-columns: 30% 1fr;
  grid-template-rows: 12px 1fr;
}

.appearance-options__preview i {
  display: block;
  border-radius: 3px;
  background: #fff;
}

.appearance-options__preview i:first-child {
  grid-column: 1 / -1;
}

.appearance-options__preview i:nth-child(2) {
  grid-row: 2;
}

.appearance-options__preview i:nth-child(3) {
  background: #e6f4ff;
  grid-column: 2;
  grid-row: 2;
}

.appearance-options__preview--dark {
  border-color: #344258;
  background: #0b111b;
}

.appearance-options__preview--dark i {
  background: #1c2738;
}

.appearance-options__preview--dark i:nth-child(3) {
  background: #15345f;
}

.appearance-options__preview--system {
  background: linear-gradient(90deg, #f5f5f5 0 50%, #0b111b 50% 100%);
}

.appearance-options__preview--system i {
  background: linear-gradient(90deg, #fff 0 50%, #1c2738 50% 100%);
}

.appearance-options__preview--system i:nth-child(3) {
  background: linear-gradient(90deg, #e6f4ff 0 50%, #15345f 50% 100%);
}

:root[data-theme='dark'] {
  color: #edf4ff;
  background: #0b111b;
  --surface-canvas: #0b111b;
  --surface-raised: #111827;
  --surface-subtle: #172033;
  --surface-muted: #1f2a3d;
  --text-primary: #edf4ff;
  --text-secondary: #aebbd0;
  --text-muted: #9aa7ba;
  --text-on-accent: #fff;
  --border-default: #344258;
  --border-control: #66758f;
  --border-subtle: #293548;
  --accent: #8cc2ff;
  --accent-solid: #2b69c9;
  --accent-solid-hover: #365f9f;
  --accent-hover: #b3d7ff;
  --accent-selected: #245fa8;
  --accent-subtle: #15345f;
  --danger: #ffaaa7;
  --danger-solid: #b93a43;
  --danger-strong: #ff9c99;
  --danger-border: #703b3d;
  --danger-subtle: #351d22;
  --success: #a1e887;
  --success-subtle: #18351d;
  --warning: #f3c969;
  --overlay-backdrop: rgb(0 0 0 / 62%);
  --shadow-card: 0 2px 8px rgb(0 0 0 / 24%);
  --shadow-dialog: 0 12px 30px rgb(0 0 0 / 36%);
}

:root[data-theme='dark'] .app-shell {
  background: #0b111b;
  color: #edf4ff;
}

:root[data-theme='dark'] :where(
  .settings-page,
  .composer-wrap
) {
  background: #0b111b;
}

:root[data-theme='dark'] :where(
  .sidebar,
  .topbar,
  .assistant-sidebar,
  .project-create-card,
  .settings-panel,
  .composer,
  .runtime-picker__menu,
  .knowledge-scope__popover,
  .knowledge-panel__document,
  .token-usage,
  .activity-item,
  .heartbeat-center__section,
  .heartbeat-center__metrics > div,
  .heartbeat-center__plans .heartbeat-settings,
  .heartbeat-settings__item,
  .capability-card,
  .quick-actions button,
  .secondary-button
) {
  border-color: #293548;
  background: #111827;
}

:root[data-theme='dark'] :where(
  .app-shell,
  .sidebar,
  .topbar,
  .assistant-sidebar,
  .settings-panel,
  .project-create-card,
  .composer,
  .workspace-panel-scroll
) :where(input, textarea, select) {
  border-color: #344258;
  background: #172033;
  color: #edf4ff;
}

:root[data-theme='dark'] :where(
  .app-shell,
  .sidebar,
  .topbar,
  .assistant-sidebar,
  .settings-panel,
  .project-create-card,
  .composer
) :where(input, textarea)::placeholder {
  color: #718096;
}

:root[data-theme='dark'] :where(
  .sidebar-search,
  .settings-section,
  .settings-tabs,
  .settings-panel__footer,
  .assistant-sidebar__row,
  .assistant-sidebar__library,
  .assistant-sidebar__schedule,
  .assistant-sidebar__diff,
  .assistant-sidebar__preview pre,
  .tool-activity,
  .approval-card,
  .context-chip,
  .token-usage__stats div,
  .activity-panel__stats div,
  .heartbeat-center__config-card,
  .heartbeat-center__suggestion,
  .heartbeat-center__run,
  .heartbeat-settings--sidebar .heartbeat-settings__item,
  .knowledge-graph__toolbar,
  .markdown-content pre,
  .markdown-content :not(pre) > code
) {
  border-color: #293548;
  background: #172033;
}

:root[data-theme='dark'] :where(
  .primary-nav,
  .sidebar-footer,
  .topbar,
  .assistant-sidebar,
  .assistant-sidebar__header,
  .assistant-sidebar__tabs,
  .assistant-sidebar__context,
  .assistant-sidebar__preview > header,
  .message + .message,
  .divider,
  .runtime-picker__divider,
  .settings-panel__header,
  .settings-panel__footer,
  .knowledge-workspace__sidebar,
  .knowledge-workspace__header,
  .knowledge-panel__header,
  .heartbeat-center__config-card,
  .heartbeat-center__suggestion,
  .heartbeat-center__run
) {
  border-color: #293548;
}

:root[data-theme='dark'] :where(
  h1,
  h2,
  h3,
  h4,
  .conversation-title,
  .welcome h1,
  .message__meta strong,
  .markdown-content,
  .settings-section__title strong,
  .field,
  .capability-card strong,
  .knowledge-panel__document-info strong,
  .token-usage__header h3,
  .activity-item h3,
  .heartbeat-center__latest > p,
  .heartbeat-center__run strong
) {
  color: #edf4ff;
}

:root[data-theme='dark'] .app-shell strong {
  color: #edf4ff;
}

:root[data-theme='dark'] :where(
  .nav-item,
  .conversation-item,
  .user-card,
  .icon-button,
  .assistant-sidebar__row,
  .runtime-status,
  .welcome__description,
  .tool-activity,
  .context-chip,
  .settings-tabs button,
  .credential-state,
  .capability-card p,
  .secondary-button,
  .check-field,
  .knowledge-panel__limits,
  .knowledge-panel__summary,
  .token-usage th,
  .token-usage td,
  .activity-item p,
  .heartbeat-center__config-card,
  .heartbeat-center__suggestion > p,
  .heartbeat-center__run small
) {
  color: #aebbd0;
}

:root[data-theme='dark'] :where(
  .brand__copy span,
  .nav-item__hint,
  .section-label,
  .conversation-item small,
  .user-card__copy small,
  .assistant-sidebar__tab,
  .assistant-sidebar__empty,
  .runtime-picker__menu > strong,
  .runtime-picker__menu > button > small,
  .message__meta span,
  .message__status,
  .composer-hint,
  .settings-panel__description,
  .settings-tabs button small,
  .settings-section__title small,
  .field small,
  .settings-notice,
  .settings-empty,
  .knowledge-panel__empty,
  .knowledge-panel__loading,
  .heartbeat-center__live,
  .heartbeat-center__legend
) {
  color: #8290a6;
}

:root[data-theme='dark'] :where(
  .icon-button:hover,
  .icon-button--active,
  .nav-item:hover,
  .conversation-item:hover,
  .conversation-item--active,
  .user-card:hover,
  .secondary-button:hover,
  .settings-tabs button[aria-selected='true']
) {
  background: #1f2a3d;
}

:root[data-theme='dark'] .settings-page
  .settings-tabs
  button[aria-selected='true'] {
  background: #1f2a3d;
  color: #69adff;
}

:root[data-theme='dark'] :where(
  .nav-item--active,
  .brand__mark,
  .composer__mode--ask,
  .composer__mode--plan,
  .runtime-capability-badge,
  .model-capability-badge
) {
  border-color: #245fa8;
  background: #15345f;
  color: #69adff;
}

:root[data-theme='dark'] :where(
  .settings-warning,
  .approval-card,
  .heartbeat-center__error
) {
  border-color: #70511d;
  background: #302511;
  color: #f3c969;
}

:root[data-theme='dark'] .markdown-content blockquote {
  border-left-color: #4c9aff;
  color: #aebbd0;
}

:root[data-theme='dark'] .message--user .message__content {
  border-color: #245fa8;
  background: #15345f;
  color: #edf4ff;
}

:root[data-theme='dark'] .heartbeat-center__metrics small {
  color: #aebbd0;
}

:root[data-theme='dark'] .assistant-sidebar__tab--active {
  background: #15345f;
  color: #69adff;
}

:root[data-theme='dark'] :where(
  .runtime-picker__menu > button,
  .quick-actions strong,
  .user-card__copy strong
) {
  color: #edf4ff;
}

:root[data-theme='dark'] .markdown-content :where(th, td) {
  border-color: #344258;
}

:root[data-theme='dark'] .appearance-options label {
  border-color: #344258;
  background: #172033;
}

:root[data-theme='dark'] .appearance-options label:has(input:checked) {
  border-color: #4c9aff;
  box-shadow: 0 0 0 2px rgb(76 154 255 / 20%);
}

@container heartbeat-settings (max-width: 680px) {
  .heartbeat-settings__form,
  .heartbeat-settings__form--weekly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .heartbeat-settings__form .primary-button {
    grid-column: 1 / -1;
  }

  .heartbeat-settings__item {
    align-items: stretch;
    flex-direction: column;
  }

  .heartbeat-settings__actions {
    flex-wrap: wrap;
  }
}

@container heartbeat-settings (max-width: 420px) {
  .heartbeat-settings__form,
  .heartbeat-settings__form--weekly {
    grid-template-columns: 1fr;
  }

  .heartbeat-settings__form .primary-button {
    grid-column: auto;
  }

  .heartbeat-settings__actions button {
    padding-inline: 8px;
    flex: 1 1 auto;
  }
}

@container heartbeat-center (max-width: 820px) {
  .heartbeat-center__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .heartbeat-center__overview-grid,
  .heartbeat-center__suggestions,
  .heartbeat-center__history {
    grid-template-columns: 1fr;
  }
}

@container heartbeat-center (max-width: 620px) {
  .heartbeat-center > .page-header {
    flex-direction: column;
  }

  .heartbeat-center .page-header__actions {
    width: 100%;
  }

  .heartbeat-center .page-header__actions button {
    flex: 1;
  }

  .heartbeat-center__config-card > div:last-child {
    flex-wrap: wrap;
  }
}

@container heartbeat-center (max-width: 460px) {
  .heartbeat-center__metrics {
    grid-template-columns: 1fr;
  }

  .heartbeat-center > .page-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .heartbeat-center > .page-tabs .page-tabs__tab {
    justify-content: center;
  }

  .heartbeat-center__trend-row {
    grid-template-columns: 70px minmax(0, 1fr) 18px;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@media (max-width: 1279px) {
  .assistant-sidebar {
    position: absolute;
    z-index: 30;
    top: 58px;
    right: 0;
    bottom: 0;
    box-shadow: -12px 0 30px rgb(0 0 0 / 10%);
  }
}

@media (max-width: 1020px) {
  .sidebar {
    flex-basis: 236px;
  }

  .brand,
  .project-switcher,
  .new-chat,
  .sidebar-search,
  .primary-nav,
  .conversation-list,
  .sidebar-footer {
    min-width: 206px;
  }

  .assistant-sidebar--open {
    width: min(390px, calc(100vw - 36px));
    flex-basis: min(390px, calc(100vw - 36px));
  }

  .settings-page .settings-panel__body {
    display: flex;
    padding: 20px;
    align-items: stretch;
    justify-content: flex-start;
  }

  .settings-page .settings-tabs {
    position: static;
    display: grid;
    width: 100%;
    flex: 0 0 auto;
    grid-template-columns: repeat(3, 1fr);
  }

  .settings-page .settings-tabs button {
    min-height: 42px;
    align-items: center;
    text-align: center;
  }

  .settings-page .settings-tabs button small {
    display: none;
  }

  .heartbeat-center__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .workspace-panel-scroll {
    padding: 20px;
  }

  .page-header:not(.page-header--compact) {
    flex-direction: column;
  }

  .page-header:not(.page-header--compact) .page-header__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .heartbeat-center .page-header__actions button {
    flex: 1;
  }

  .heartbeat-center__overview-grid,
  .heartbeat-center__suggestions,
  .heartbeat-center__history {
    grid-template-columns: 1fr;
  }

  .appearance-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .workspace-panel-scroll {
    padding: 16px;
  }

  .heartbeat-center__metrics {
    grid-template-columns: 1fr;
  }

  .heartbeat-center > .page-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .heartbeat-center > .page-tabs .page-tabs__tab {
    justify-content: center;
  }

  .heartbeat-center__trend-row {
    grid-template-columns: 70px minmax(0, 1fr) 18px;
  }
}

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