:root {
  --bg-app: #f6f8fb;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f4f8;
  --bg-muted: #e9eef5;

  --text-primary: #172033;
  --text-secondary: #5f6b85;
  --text-tertiary: #8a94aa;
  --text-inverse: #ffffff;

  --border-default: #dbe3ee;
  --border-strong: #c7d2e3;

  --brand-700: #1f4b99;
  --brand-600: #2b5fb8;
  --brand-500: #3f78d1;
  --brand-400: #6a98e5;
  --wordmark-rally: #011d5c;
  --wordmark-cat: #016cdf;

  --accent-cyan: #4da3c9;
  --accent-teal: #4f8f8b;

  --success-bg: #edf8f2;
  --success-text: #2f7a52;
  --warning-bg: #fff6e8;
  --warning-text: #a56a16;
  --danger-bg: #fff0f0;
  --danger-text: #b54747;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 6px 18px rgba(16, 24, 40, 0.06);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --cp-bg: var(--bg-app);
  --cp-panel: var(--bg-surface);
  --cp-panel-muted: var(--bg-subtle);
  --cp-ink: var(--text-primary);
  --cp-muted: var(--text-secondary);
  --cp-line: var(--border-default);
  --cp-line-strong: var(--border-strong);
  --cp-accent: var(--brand-700);
  --cp-accent-soft: rgba(63, 120, 209, 0.10);
  --cp-shadow: var(--shadow-md);
}

.cp-content {
  background: var(--cp-bg);
  padding: 20px 28px 28px;
}

.cp-page {
  max-width: 1240px;
  display: grid;
  gap: 14px;
}

.cp-page-header {
  display: grid;
  gap: 6px;
}

.cp-page-context {
  color: var(--cp-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cp-page-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.cp-page-lead {
  margin: 0;
  max-width: 760px;
  color: var(--cp-muted);
  font-size: 14px;
  line-height: 1.6;
}

.cp-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--cp-line);
}

.cp-segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-segmented-control .invite-mode {
  min-width: 0;
  padding: 7px 12px;
  border: 1px solid var(--cp-line);
  border-radius: 8px;
  background: var(--cp-panel);
  color: var(--cp-ink);
  font-size: 12px;
  font-weight: 600;
}

.cp-segmented-control .invite-mode.active {
  border-color: var(--cp-ink);
  background: var(--cp-ink);
  color: #fff;
}

.cp-toolbar-actions,
.cp-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cp-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--cp-line);
  border-radius: 10px;
  background: var(--cp-panel);
  overflow: hidden;
}

.cp-summary-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 56px;
  padding: 10px 14px;
}

.cp-summary-item + .cp-summary-item {
  border-left: 1px solid var(--cp-line);
}

.cp-summary-item-label,
.cp-summary-card-label {
  color: var(--cp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cp-summary-item-value,
.cp-summary-card-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cp-summary-item-value.is-text,
.cp-summary-card-value.is-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

.cp-summary-card-copy {
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.5;
}

.cp-surface {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-panel);
}

.cp-surface-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cp-surface-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cp-surface-copy {
  margin: 4px 0 0;
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.home-hub-page {
  gap: 12px;
}

.home-hub-page .cp-page-header {
  gap: 4px;
}

.home-context-surface {
  gap: 10px;
}

.home-context-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-context-main {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.home-context-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.home-context-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.home-context-role-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--cp-accent-soft);
  color: var(--cp-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-context-identity-row {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.home-context-inline-label {
  color: var(--cp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-context-inline-value {
  color: var(--cp-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.home-context-location {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.home-context-location-value {
  color: var(--cp-ink);
  font-weight: 600;
}

.home-context-actions {
  flex: 0 1 360px;
}

.home-context-rail {
  padding-top: 0;
}

.home-derived-note {
  color: var(--cp-muted);
  font-size: 11px;
  line-height: 1.5;
}

.home-summary-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-summary-strip .cp-summary-item {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 84px;
}

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

.home-traffic-metric {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-panel-muted);
}

.home-traffic-metric-label {
  color: var(--cp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-traffic-metric-value {
  color: var(--cp-ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-traffic-metric-value.is-text {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.home-traffic-window {
  color: var(--cp-muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-traffic-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.home-traffic-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cp-muted);
  font-size: 12px;
  font-weight: 600;
}

.home-traffic-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.home-traffic-swatch.visit {
  background: #1d4ed8;
}

.home-traffic-swatch.download {
  background: #f97316;
}

.home-traffic-chart {
  overflow-x: auto;
  padding-bottom: 4px;
}

.home-traffic-plot {
  display: grid;
  grid-template-columns: repeat(24, minmax(18px, 1fr));
  gap: 8px;
  min-width: 720px;
  align-items: end;
}

.home-traffic-bucket {
  display: grid;
  gap: 8px;
  align-items: end;
}

.home-traffic-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 160px;
  padding: 8px 0 0;
  border-radius: 12px 12px 10px 10px;
  border: 1px solid var(--cp-line);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.home-traffic-bar {
  display: block;
  width: 8px;
  min-height: 0;
  border-radius: 999px 999px 4px 4px;
}

.home-traffic-bar.visit {
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

.home-traffic-bar.download {
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
}

.home-traffic-axis-label {
  color: var(--cp-muted);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.home-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-entry {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-panel-muted);
  color: var(--cp-ink);
  text-decoration: none;
}

.home-entry:hover {
  border-color: var(--cp-line-strong);
  background: #fff;
}

.home-entry-label {
  color: var(--cp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-entry-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-entry-copy {
  color: var(--cp-muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-action-feed {
  display: grid;
  gap: 10px;
}

.home-action-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-panel-muted);
}

.home-action-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-action-type {
  color: var(--cp-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-action-target {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-action-note {
  color: var(--cp-muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-action-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  flex-shrink: 0;
}

.home-action-time {
  color: var(--cp-muted);
  font-size: 12px;
  font-weight: 600;
}

.home-object-row .cp-registry-row-primary {
  align-items: flex-start;
  gap: 10px;
}

.knowledge-detail-header {
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
}

.knowledge-detail-page-header {
  gap: 10px;
}

.knowledge-detail-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-detail-back {
  min-width: 0;
}

.knowledge-detail-top-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.knowledge-detail-actions-wrap {
  position: relative;
  display: inline-flex;
}

.knowledge-detail-actions-toggle {
  min-width: 0;
}

.knowledge-detail-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.knowledge-detail-object {
  display: grid;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.knowledge-detail-object-type {
  color: var(--cp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.knowledge-detail-title {
  font-size: 28px;
}

.knowledge-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: none;
}

.knowledge-detail-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.knowledge-detail-meta-label {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.knowledge-detail-meta-value {
  color: #344054;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.knowledge-detail-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
  color: var(--cp-muted);
  font-size: 12px;
}

.knowledge-detail-identity-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.knowledge-detail-identity-label {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.knowledge-detail-identity-value {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: var(--cp-ink);
  font-size: 12px;
  font-weight: 700;
  word-break: break-all;
}

.knowledge-detail-actions {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 48px));
  min-width: 340px;
  padding: 16px;
  border: 1px solid var(--cp-line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.92));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.knowledge-detail-actions-head {
  display: grid;
  gap: 4px;
}

.knowledge-detail-actions-title {
  color: var(--cp-ink);
  font-size: 13px;
  font-weight: 700;
}

.knowledge-detail-actions-copy {
  color: var(--cp-muted);
  font-size: 12px;
  line-height: 1.55;
}

.knowledge-detail-action-group {
  display: grid;
  gap: 7px;
}

.knowledge-detail-action-group + .knowledge-detail-action-group {
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.knowledge-detail-action-group .cp-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-detail-action-group-label {
  color: var(--cp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.knowledge-detail-action-group-primary .action.primary {
  flex: 1 1 180px;
}

.knowledge-detail-action-group-primary .action.secondary,
.knowledge-detail-action-group-secondary .action,
.knowledge-detail-action-group-utility .action,
.knowledge-detail-action-group-danger .action {
  flex: 1 1 124px;
}

.knowledge-detail-actions .action.danger {
  background: #fff7f5;
}

.knowledge-detail-state-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  padding: 1px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-line);
  overflow: hidden;
}

.knowledge-detail-state-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  min-height: 58px;
  background: var(--cp-panel);
}

.knowledge-detail-state-label {
  color: var(--cp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.knowledge-detail-state-value {
  color: var(--cp-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.share-modal-sheet {
  width: min(760px, 100%);
}

.share-status-summary {
  display: none;
  gap: 4px;
}

.share-status-summary.is-success {
  border-color: rgba(22, 107, 93, 0.16);
  background: rgba(22, 107, 93, 0.08);
  color: var(--cp-accent);
}

.share-status-summary.is-warning {
  border-color: rgba(166, 42, 42, 0.16);
  background: rgba(166, 42, 42, 0.06);
  color: #8f2a2a;
}

.share-status-summary.is-neutral {
  border-color: var(--cp-line);
  background: var(--cp-panel-muted);
  color: var(--cp-muted);
}

.share-result-card {
  display: none;
  padding: 16px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-panel-muted);
}

.knowledge-access-shell {
  gap: 18px;
}

.knowledge-access-surface {
  display: grid;
  gap: 12px;
}

.knowledge-access-row .cp-registry-row-meta {
  text-align: right;
  white-space: nowrap;
}

.share-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.share-result-title {
  font-size: 15px;
  font-weight: 700;
}

.share-result-copy {
  margin-top: 4px;
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.share-result-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.share-result-row {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--cp-line);
}

.share-result-row:first-child {
  padding-top: 0;
  border-top: none;
}

.share-result-label {
  color: var(--cp-muted);
  font-size: 12px;
  font-weight: 700;
}

.share-result-value {
  color: var(--cp-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-all;
}

.share-result-loading {
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.share-copy-actions {
  justify-content: flex-start;
}

.share-control-panel {
  gap: 14px;
}

.share-control-head {
  display: grid;
  gap: 4px;
}

.share-warning {
  margin-bottom: 0;
}

.share-secondary {
  display: none;
  border-top: 1px solid var(--cp-line);
  padding-top: 12px;
}

.share-secondary summary {
  cursor: pointer;
  color: var(--cp-muted);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

.share-secondary-content {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.share-secondary-block {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--cp-line);
  border-radius: 10px;
  background: var(--cp-panel-muted);
}

.share-secondary-label {
  color: var(--cp-muted);
  font-size: 12px;
  font-weight: 700;
}

.share-secondary-copy {
  color: var(--cp-ink);
  font-size: 13px;
  line-height: 1.7;
  word-break: break-word;
}

.cp-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

#issues-token-layout {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
}

.cp-registry-surface {
  gap: 10px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.cp-registry-surface .cp-surface-header {
  padding: 0;
}

.cp-registry-surface .cp-filterbar {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--cp-line);
}

.cp-form-grid,
.cp-modal-sheet form {
  display: grid;
  gap: 16px;
}

.cp-side-panel {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 20px;
}

.cp-note-block {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-panel-muted);
}

.cp-note-title {
  font-size: 14px;
  font-weight: 700;
}

.cp-note-copy {
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.cp-filterbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cp-filterbar.cp-filterbar-compact {
  grid-template-columns: 180px minmax(0, 1fr) auto;
}

.cp-filterbar.cp-filterbar-slim {
  grid-template-columns: 180px minmax(0, 1fr);
}

.cp-filter-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-registry-list {
  display: grid;
  gap: 0;
}

.cp-registry-row {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--cp-line);
}

.cp-registry-row:first-child {
  border-top: none;
  padding-top: 0;
}

.cp-registry-row:last-child {
  padding-bottom: 0;
}

.cp-registry-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.cp-object-band {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 auto;
}

.cp-registry-row-primary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.cp-registry-row-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.knowledge-registry-row .cp-object-headline {
  display: grid;
  gap: 2px;
  align-items: start;
}

.knowledge-registry-row .cp-object-title {
  font-size: 16px;
}

.knowledge-registry-row .cp-object-subtitle {
  font-size: 12px;
  color: #98a2b3;
}

.knowledge-registry-row .cp-registry-row-bottom {
  justify-content: flex-start;
}

.knowledge-registry-row .cp-registry-row-primary {
  align-items: flex-start;
  gap: 10px;
}

.knowledge-registry-row .cp-inline-row-actions {
  align-items: center;
}

.knowledge-registry-row .cp-row-primary-action {
  border-color: var(--cp-ink);
  background: var(--cp-ink);
  color: #fff;
}

.knowledge-registry-row .cp-row-primary-action:hover {
  background: #252220;
  border-color: #252220;
}

.knowledge-square-row .cp-object-headline,
.knowledge-token-row .cp-object-headline {
  display: grid;
  gap: 2px;
  align-items: start;
}

.knowledge-square-row .cp-object-title,
.knowledge-token-row .cp-object-title {
  font-size: 16px;
}

.knowledge-square-row .cp-object-subtitle {
  font-size: 12px;
  color: #98a2b3;
}

.knowledge-token-row .cp-object-subtitle {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: #98a2b3;
}

.knowledge-square-row .cp-registry-row-primary,
.knowledge-token-row .cp-registry-row-primary {
  align-items: flex-start;
  gap: 10px;
}

.knowledge-square-row .cp-inline-row-actions,
.knowledge-token-row .cp-inline-row-actions {
  align-items: center;
}

.knowledge-square-row .cp-row-primary-action,
.knowledge-token-row .cp-row-primary-action {
  border-color: var(--cp-ink);
  background: var(--cp-ink);
  color: #fff;
}

.knowledge-square-row .cp-row-primary-action:hover,
.knowledge-token-row .cp-row-primary-action:hover {
  background: #252220;
  border-color: #252220;
}

.knowledge-square-excerpt {
  color: #475467;
  font-size: 13px;
  line-height: 1.7;
}

.invitation-registry-row .cp-object-headline,
.issue-registry-row .cp-object-headline {
  display: grid;
  gap: 2px;
  align-items: start;
}

.invitation-registry-row .cp-object-title,
.issue-registry-row .cp-object-title {
  font-size: 16px;
}

.invitation-registry-row .cp-object-subtitle,
.issue-registry-row .cp-object-subtitle {
  font-size: 12px;
  color: #98a2b3;
}

.invitation-registry-row .cp-registry-row-primary,
.issue-registry-row .cp-registry-row-primary {
  align-items: flex-start;
  gap: 10px;
}

.invitation-registry-row .cp-inline-row-actions,
.issue-registry-row .cp-inline-row-actions {
  align-items: center;
}

.invitation-registry-row .cp-row-primary-action,
.issue-registry-row .cp-row-primary-action {
  border-color: var(--cp-ink);
  background: var(--cp-ink);
  color: #fff;
}

.invitation-registry-row .cp-row-primary-action:hover,
.issue-registry-row .cp-row-primary-action:hover {
  background: #252220;
  border-color: #252220;
}

.invitation-result-card,
.issue-submit-card {
  gap: 14px;
}

.cp-registry-row-copy {
  color: #475467;
  font-size: 13px;
  line-height: 1.7;
}

.cp-registry-row-details {
  border-top: 1px solid var(--cp-line);
  padding-top: 10px;
}

.cp-registry-row-details summary {
  cursor: pointer;
  color: var(--cp-muted);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

.cp-registry-row-details-content {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  color: #475467;
  font-size: 13px;
  line-height: 1.7;
}

.issue-row-details .issue-pre {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--cp-line);
  border-radius: 10px;
  background: var(--cp-panel-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.token-result-card {
  gap: 14px;
}

#issue-token-result .share-result-grid {
  gap: 8px;
}

#issue-token-result .share-result-row {
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: start;
  gap: 8px 12px;
}

#issue-token-result .share-result-label {
  padding-top: 2px;
}

#issue-token-result-name,
#issue-token-result-code,
#issue-token-result-plain,
#issue-token-result-type,
#issue-token-result-expire,
#issue-token-result-limit {
  min-width: 0;
  word-break: break-all;
}

#issue-token-result-code,
#issue-token-result-plain {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  user-select: all;
}

.token-result-next {
  display: grid;
  gap: 6px;
}

.token-result-link a {
  color: var(--cp-ink);
  font-weight: 600;
  word-break: break-all;
}

.issue-token-row {
  position: relative;
}

.issue-token-row.is-expanded {
  margin-inline: -12px;
  padding-inline: 12px;
  border-radius: 12px;
  background: rgba(22, 107, 93, 0.05);
  box-shadow: inset 3px 0 0 rgba(22, 107, 93, 0.7);
}

.issue-token-inline-detail {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(22, 107, 93, 0.16);
  border-radius: 12px;
  background: #fff;
}

.issue-token-inline-title {
  font-size: 14px;
  font-weight: 700;
}

.issue-token-inline-copy,
.issue-token-inline-note {
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.issue-token-inline-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.issue-token-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.issue-token-inline-item {
  display: grid;
  gap: 4px;
}

.issue-token-inline-label {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 700;
}

.issue-token-inline-value {
  color: #344054;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-all;
}

.cp-object-headline {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cp-object-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

.cp-object-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.cp-object-status {
  flex-shrink: 0;
}

.cp-object-subtitle {
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-all;
}

.cp-inline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: start;
  min-width: 0;
}

.cp-inline-meta-primary {
  flex: 1 1 560px;
}

.cp-inline-meta-secondary {
  justify-content: flex-end;
  flex: 0 1 auto;
  margin-left: auto;
}

.cp-inline-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.cp-inline-meta-primary .cp-inline-meta-item {
  position: relative;
  padding-right: 16px;
}

.cp-inline-meta-primary .cp-inline-meta-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 12px;
  background: var(--cp-line);
  transform: translateY(-50%);
}

.cp-inline-meta-term {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
}

.cp-inline-meta-value {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: #344054;
  word-break: break-word;
}

.cp-inline-meta-item.is-muted .cp-inline-meta-term,
.cp-inline-meta-item.is-muted .cp-inline-meta-value {
  color: #98a2b3;
}

.cp-inline-meta-item.is-compact {
  gap: 4px;
}

.cp-inline-meta-item.is-wide {
  min-width: 180px;
}

.cp-inline-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.cp-row-overflow {
  position: relative;
}

.cp-row-overflow summary {
  list-style: none;
}

.cp-row-overflow summary::-webkit-details-marker {
  display: none;
}

.cp-row-overflow-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--cp-line);
  border-radius: 8px;
  background: transparent;
  color: var(--cp-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cp-row-overflow[open] .cp-row-overflow-trigger {
  color: var(--cp-ink);
  border-color: var(--cp-line-strong);
  background: var(--cp-panel-muted);
}

.cp-row-overflow-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  display: grid;
  gap: 6px;
  min-width: 132px;
  padding: 8px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-panel);
  box-shadow: 0 12px 30px rgba(23, 21, 18, 0.08);
}

.cp-row-overflow-menu .mini-btn {
  justify-content: flex-start;
}

.cp-page .status,
.cp-modal-sheet .status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.cp-page .action,
.cp-page .mini-btn,
.cp-modal-sheet .action,
.cp-modal-sheet .mini-btn {
  min-width: 0;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.cp-page .action.primary,
.cp-modal-sheet .action.primary {
  background: var(--cp-ink);
  color: #fff;
}

.cp-page .action.secondary,
.cp-page .mini-btn,
.cp-modal-sheet .action.secondary,
.cp-modal-sheet .mini-btn {
  background: var(--cp-panel);
  color: var(--cp-ink);
  border: 1px solid var(--cp-line-strong);
}

.cp-page .action.danger,
.cp-modal-sheet .action.danger {
  background: #a62a2a;
  color: #fff;
  border: 1px solid #a62a2a;
}

.cp-page .mini-btn.danger-text,
.cp-modal-sheet .mini-btn.danger-text {
  color: #8f2a2a;
  border-color: rgba(166, 42, 42, 0.22);
  background: #fff7f5;
}

.cp-page .field,
.cp-modal-sheet .field {
  margin-top: 0;
}

.cp-page label,
.cp-modal-sheet label {
  margin-bottom: 6px;
  color: var(--cp-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.cp-page input,
.cp-page textarea,
.cp-page select,
.cp-modal-sheet input,
.cp-modal-sheet textarea,
.cp-modal-sheet select {
  border: 1px solid var(--cp-line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  box-shadow: none;
}

.cp-page textarea,
.cp-modal-sheet textarea {
  min-height: 160px;
}

.cp-page .field-inline,
.cp-modal-sheet .field-inline {
  gap: 12px;
}

.cp-page .sheet-actions,
.cp-modal-sheet .sheet-actions {
  gap: 8px;
  margin-top: 0;
}

.cp-page .choice-card,
.cp-modal-sheet .choice-card {
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--cp-line-strong);
  border-radius: 10px;
}

.cp-page .choice-card.active,
.cp-modal-sheet .choice-card.active {
  border-color: rgba(22, 107, 93, 0.45);
  background: rgba(22, 107, 93, 0.05);
  box-shadow: none;
}

.cp-page .message,
.cp-modal-sheet .message {
  margin-bottom: 0;
  border-radius: 10px;
}

.cp-page .message.warning,
.cp-modal-sheet .message.warning {
  background: rgba(180, 118, 22, 0.12);
  color: #9a6a19;
}

.cp-page .empty {
  margin: 0;
  border-color: var(--cp-line);
  background: var(--cp-panel-muted);
  color: var(--cp-muted);
}

.cp-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 0;
}

.cp-modal-sheet {
  border: 1px solid var(--cp-line);
  border-radius: 16px;
  box-shadow: var(--cp-shadow);
  padding: 24px;
}

.cp-modal-sheet .sheet-title {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.cp-modal-sheet .sheet-copy {
  margin-top: 6px;
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.cp-confirm-modal {
  max-width: 520px;
}

.cp-confirm-modal-body {
  display: grid;
  gap: 14px;
}

.cp-confirm-target {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-panel-muted);
}

.cp-confirm-target-label {
  color: var(--cp-muted);
  font-size: 12px;
  font-weight: 700;
}

.cp-confirm-target-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.cp-danger-note {
  padding: 12px 14px;
  border: 1px solid rgba(166, 42, 42, 0.16);
  border-radius: 12px;
  background: rgba(166, 42, 42, 0.06);
  color: #8f2a2a;
  font-size: 13px;
  line-height: 1.6;
}

body[data-admin-users-mode="create"] .cp-mode-list-only {
  display: none !important;
}

body[data-admin-users-mode="list"] .cp-mode-create-only {
  display: none !important;
}

body[data-knowledge-mode="square"] .cp-mode-mine-only,
body[data-knowledge-mode="token"] .cp-mode-mine-only,
body[data-knowledge-mode="create"] .cp-mode-mine-only {
  display: none !important;
}

body[data-invitations-mode="direct"] .cp-mode-invite-records-only,
body[data-invitations-mode="public"] .cp-mode-invite-records-only {
  display: none !important;
}

body[data-issues-mode="submit"] .cp-mode-issues-list-only {
  display: none !important;
}

body[data-issues-mode="submit"] .cp-mode-issues-token-only,
body[data-issues-mode="list"] .cp-mode-issues-submit-only,
body[data-issues-mode="list"] .cp-mode-issues-token-only,
body[data-issues-mode="token"] .cp-mode-issues-list-only,
body[data-issues-mode="token"] .cp-mode-issues-submit-only {
  display: none !important;
}

body[data-openclaw-mode="create"] .cp-mode-openclaw-list-only {
  display: none !important;
}

body[data-openclaw-mode="list"] .cp-mode-openclaw-create-only {
  display: none !important;
}

.openclaw-node-object {
  gap: 16px;
}

.openclaw-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f4;
  color: #506172;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.openclaw-status-badge.online {
  background: #e8f5ed;
  color: #17663c;
}

.openclaw-status-badge.busy {
  background: #fff4df;
  color: #9b5a08;
}

.openclaw-status-badge.offline,
.openclaw-status-badge.active,
.openclaw-status-badge.paused {
  background: #eef2f4;
  color: #5f6b7d;
}

.openclaw-status-badge.error {
  background: #fdecec;
  color: #a53f3f;
}

.openclaw-node-session-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.openclaw-node-session {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--cp-panel-muted);
  border: 1px solid rgba(17, 24, 39, 0.06);
}

.openclaw-node-session-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.openclaw-node-session-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.openclaw-node-session-title {
  font-size: 15px;
  font-weight: 700;
  color: #18212a;
}

.openclaw-node-session-copy,
.openclaw-node-session-meta {
  color: var(--cp-muted);
  font-size: 12px;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.openclaw-node-session-summary {
  color: #31404e;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.openclaw-node-session-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.openclaw-chat-page {
  display: flex;
  flex-direction: column;
}

body[data-openclaw-chat="true"] .cp-page-header,
body[data-openclaw-chat="true"] .cp-page-toolbar {
  display: none;
}

body[data-openclaw-chat="true"] .shell {
  grid-template-columns: minmax(0, 1fr);
}

body[data-openclaw-chat="true"] .sidebar {
  display: none;
}

body[data-openclaw-chat="true"] .content.cp-content {
  padding: 0;
}

body[data-openclaw-chat="true"] .cp-page.openclaw-chat-page {
  height: 100vh;
  max-width: none;
  padding: 0;
}

.openclaw-chat-empty,
.openclaw-chat-layout {
  min-height: 560px;
}

.openclaw-chat-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.openclaw-chat-layout {
  height: 100vh;
  border-radius: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.openclaw-chat-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--cp-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.openclaw-chat-header-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.openclaw-chat-kicker,
.openclaw-chat-composer-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cp-muted);
}

.openclaw-chat-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.openclaw-chat-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  margin-left: auto;
}

.openclaw-chat-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.openclaw-chat-menu-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.openclaw-chat-menu-meta {
  gap: 6px;
}

.openclaw-chat-menu-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: start;
  gap: 10px;
  font-size: 12px;
}

.openclaw-chat-menu-row span {
  color: #738193;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.openclaw-chat-menu-row strong {
  color: #18212a;
  word-break: break-word;
}

.openclaw-chat-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.openclaw-chat-view-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
}

.openclaw-chat-view-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--cp-line);
  background: #fff;
  color: #526171;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.openclaw-chat-view-button.active {
  background: #18212a;
  border-color: #18212a;
  color: #fff;
}

.openclaw-chat-pane {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.openclaw-chat-history-bar {
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  border: 0;
  background: transparent;
}

.openclaw-chat-history-copy {
  font-size: 12px;
  color: #617083;
}

.openclaw-chat-history-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.openclaw-chat-transcript {
  flex: 1;
  min-height: 0;
  padding: 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  background: #fff;
}

.openclaw-chat-event-copy {
  padding: 12px 20px;
  font-size: 12px;
  color: #617083;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fbfcfd;
}

.openclaw-chat-events {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

.openclaw-chat-bubble {
  max-width: min(820px, 78%);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
  box-shadow: none;
}

.openclaw-chat-bubble.theirs {
  align-self: flex-start;
}

.openclaw-chat-bubble.mine {
  align-self: flex-end;
  background: #18212a;
  color: #f8fafc;
  border-color: #18212a;
}

.openclaw-chat-bubble-role,
.openclaw-chat-bubble-time {
  font-size: 11px;
  color: #6f7d8b;
}

.openclaw-chat-bubble-source {
  font-size: 11px;
  color: #8a98a8;
  margin-top: -2px;
}

.openclaw-chat-bubble.mine .openclaw-chat-bubble-role,
.openclaw-chat-bubble.mine .openclaw-chat-bubble-time,
.openclaw-chat-bubble.mine .openclaw-chat-bubble-source {
  color: rgba(226, 232, 240, 0.74);
}

.openclaw-chat-bubble-content {
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.openclaw-chat-system-event {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left-width: 4px;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.openclaw-chat-system-event.level-info {
  border-left-color: #0f766e;
}

.openclaw-chat-system-event.level-warn {
  border-left-color: #d97706;
  background: #fffaf0;
}

.openclaw-chat-system-event.level-error {
  border-left-color: #dc2626;
  background: #fff5f5;
}

.openclaw-chat-system-event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.openclaw-chat-system-event-title {
  font-size: 14px;
  font-weight: 700;
  color: #18212a;
}

.openclaw-chat-system-event-meta {
  font-size: 12px;
  color: #738193;
  white-space: nowrap;
}

.openclaw-chat-system-event-details {
  font-size: 12px;
  line-height: 1.65;
  color: #445365;
  white-space: pre-wrap;
  word-break: break-word;
}

.openclaw-chat-composer {
  border-top: 1px solid var(--cp-line);
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  flex: 0 0 auto;
}

.openclaw-chat-composer textarea {
  min-height: 76px;
  max-height: 200px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid var(--cp-line);
  background: #fff;
  padding: 14px 16px;
  line-height: 1.6;
}

.openclaw-chat-composer-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .openclaw-chat-empty,
  .openclaw-chat-layout {
    min-height: 100vh;
    height: 100vh;
  }

  body[data-openclaw-chat="true"] .cp-page.openclaw-chat-page {
    height: 100vh;
    padding-top: 0;
  }

  .openclaw-chat-header,
  .openclaw-chat-event-copy,
  .openclaw-chat-events,
  .openclaw-chat-composer,
  .openclaw-chat-transcript {
    padding-left: 14px;
    padding-right: 14px;
  }

  .openclaw-chat-bubble {
    max-width: 92%;
  }

  .openclaw-chat-menu {
    width: min(340px, calc(100vw - 32px));
  }

  .home-context-summary,
  .home-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .home-traffic-summary {
    grid-template-columns: 1fr;
  }

  .home-action-meta {
    justify-items: start;
  }

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

  #issues-token-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-detail-header-top,
  .knowledge-detail-header-main {
    flex-direction: column;
    align-items: stretch;
  }

  .knowledge-detail-top-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .knowledge-detail-actions {
    min-width: min(100%, 340px);
  }

  .knowledge-detail-actions-head {
    gap: 3px;
  }

  .knowledge-detail-action-group + .knowledge-detail-action-group {
    padding-top: 8px;
  }

  .cp-summary-strip,
  .cp-form-layout {
    grid-template-columns: 1fr;
  }

  .cp-filterbar {
    grid-template-columns: 1fr;
  }

  .cp-summary-item + .cp-summary-item {
    border-left: none;
    border-top: 1px solid var(--cp-line);
  }

  .cp-summary-item {
    min-height: 0;
  }

  .cp-side-panel {
    position: static;
  }

  #issue-token-result .share-result-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .issue-token-inline-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cp-registry-row-top {
    flex-direction: column;
    align-items: stretch;
  }

  .cp-registry-row-primary {
    justify-content: flex-start;
  }

  .cp-registry-row-bottom,
  .cp-inline-row-actions,
  .cp-filter-actions {
    justify-content: flex-start;
  }

.cp-registry-row-bottom {
  flex-direction: column;
}
}

.openclaw-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.openclaw-page-header-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.openclaw-page-title {
  margin: 0;
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.openclaw-page-lead {
  margin: 0;
  max-width: 760px;
  color: var(--cp-muted);
  line-height: 1.65;
}

.openclaw-page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.openclaw-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.openclaw-toolbar-metric {
  min-width: 136px;
  border: 1px solid var(--cp-line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.openclaw-toolbar-metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cp-muted);
}

.openclaw-toolbar-metric strong {
  font-size: 24px;
  line-height: 1;
}

.openclaw-workspace {
  padding: 0;
  overflow: hidden;
  min-height: calc(100vh - 214px);
  display: grid;
  grid-template-columns: 260px 340px minmax(0, 1fr);
}

.openclaw-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.openclaw-pane + .openclaw-pane {
  border-left: 1px solid var(--cp-line);
}

.openclaw-node-pane,
.openclaw-session-pane {
  background: #fafbfc;
}

.openclaw-detail-pane {
  background: #ffffff;
}

.openclaw-pane-head {
  padding: 16px 16px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.openclaw-pane-count {
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2f4;
  color: #30404f;
  font-size: 12px;
  font-weight: 700;
}

.openclaw-pane-tools {
  padding: 0 16px 14px;
  display: grid;
  gap: 10px;
}

.openclaw-pane-tools input,
.openclaw-pane-tools select {
  height: 40px;
  border-radius: 12px;
  background: #fff;
}

.openclaw-node-list,
.openclaw-session-list {
  flex: 1;
  padding: 0 10px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.openclaw-node-row,
.openclaw-session-row {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.openclaw-node-row:hover,
.openclaw-session-row:hover {
  background: #f4f7f8;
  border-color: rgba(17, 24, 39, 0.08);
}

.openclaw-node-row.active,
.openclaw-session-row.active {
  background: #ffffff;
  border-color: rgba(17, 24, 39, 0.12);
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.03);
}

.openclaw-node-row {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  align-items: stretch;
}

.openclaw-node-row-accent {
  border-radius: 12px 0 0 12px;
  background: #dbe4ea;
}

.openclaw-node-row-accent.online {
  background: #22a35a;
}

.openclaw-node-row-accent.busy {
  background: #d08700;
}

.openclaw-node-row-accent.offline {
  background: #96a0ad;
}

.openclaw-node-row-accent.error {
  background: #cb4a4a;
}

.openclaw-node-row-main,
.openclaw-session-row {
  padding: 12px 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.openclaw-node-row-top,
.openclaw-session-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.openclaw-node-row-title,
.openclaw-session-row-title {
  font-size: 14px;
  font-weight: 700;
  color: #18212a;
}

.openclaw-node-row-sub,
.openclaw-node-row-meta,
.openclaw-session-row-meta,
.openclaw-session-row-foot {
  font-size: 12px;
  color: #657487;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.openclaw-session-row-summary {
  font-size: 13px;
  line-height: 1.55;
  color: #2e3b48;
}

.openclaw-status-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.openclaw-status-dot.online {
  background: #e8f5ed;
  color: #17663c;
}

.openclaw-status-dot.busy {
  background: #fff4df;
  color: #9b5a08;
}

.openclaw-status-dot.offline,
.openclaw-status-dot.paused,
.openclaw-status-dot.active {
  background: #eef2f4;
  color: #5f6b7d;
}

.openclaw-status-dot.error {
  background: #fdecec;
  color: #a53f3f;
}

.openclaw-detail-empty {
  min-height: calc(100vh - 214px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 40px;
}

.openclaw-detail-empty-kicker,
.openclaw-detail-kicker,
.openclaw-composer-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cp-muted);
  font-weight: 700;
}

.openclaw-detail-empty h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.openclaw-detail-empty p {
  max-width: 540px;
  margin: 0;
  color: var(--cp-muted);
  line-height: 1.7;
}

.openclaw-detail-shell {
  min-height: calc(100vh - 214px);
  display: flex;
  flex-direction: column;
}

.openclaw-detail-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--cp-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.openclaw-detail-header-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.openclaw-detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.openclaw-detail-header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  word-break: break-word;
}

.openclaw-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.openclaw-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f4f6f8;
  color: #425263;
  font-size: 12px;
}

.openclaw-detail-meta-item strong {
  color: #18212a;
}

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

.openclaw-more-menu {
  min-width: 180px;
}

.openclaw-transcript-shell {
  flex: 1;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(250, 251, 252, 0.96), rgba(255, 255, 255, 1)),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.02) 1px, transparent 1px, transparent 44px);
}

.openclaw-message-stream {
  height: 100%;
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.openclaw-stream-bubble {
  max-width: min(760px, 82%);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.openclaw-stream-bubble.theirs {
  align-self: flex-start;
  background: #ffffff;
}

.openclaw-stream-bubble.mine {
  align-self: flex-end;
  background: #18212a;
  color: #f8fafc;
  border-color: #18212a;
}

.openclaw-stream-bubble-role,
.openclaw-stream-bubble-time {
  font-size: 12px;
  color: #6f7d8b;
}

.openclaw-stream-bubble.mine .openclaw-stream-bubble-role,
.openclaw-stream-bubble.mine .openclaw-stream-bubble-time {
  color: rgba(226, 232, 240, 0.74);
}

.openclaw-stream-bubble-content {
  line-height: 1.72;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}

.openclaw-stream-event {
  align-self: center;
  max-width: min(520px, 90%);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.78);
  color: #526171;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.openclaw-stream-event-time {
  font-size: 11px;
  color: #738193;
}

.openclaw-composer {
  border-top: 1px solid var(--cp-line);
  padding: 16px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
}

.openclaw-composer-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.openclaw-composer-copy {
  margin-top: 4px;
  color: var(--cp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.openclaw-composer textarea {
  min-height: 96px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid var(--cp-line);
  background: #fafbfc;
  padding: 14px 16px;
  line-height: 1.7;
}

.openclaw-composer-actions {
  display: flex;
  justify-content: flex-end;
}

.openclaw-create-sheet {
  max-width: 960px;
}

/* Rallycat Calm Infrastructure UI baseline */
.cp-page-title,
.cp-surface-title,
.panel-title,
.knowledge-detail-title,
.openclaw-chat-header h2 {
  color: var(--text-primary);
}

.cp-page-context,
.home-action-type,
.invite-kicker,
.mini-link {
  color: var(--brand-700);
}

.cp-page-lead,
.cp-surface-copy,
.field-help,
.cp-summary-item-label,
.cp-summary-card-label,
.home-traffic-window,
.home-traffic-legend-item,
.openclaw-chat-history-copy,
.openclaw-chat-event-copy {
  color: var(--text-secondary);
}

.cp-surface,
.cp-summary-strip,
.cp-note-block,
.panel-block,
.share-result-card,
.cp-registry-surface,
.openclaw-pane,
.openclaw-chat-layout {
  border-color: var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.cp-summary-strip,
.cp-note-block,
.home-traffic-metric,
.home-entry,
.home-action-row,
.cp-registry-row,
.share-result-card {
  background: var(--bg-surface);
}

.cp-page-toolbar,
.cp-summary-item + .cp-summary-item,
.openclaw-pane + .openclaw-pane,
.openclaw-chat-header,
.openclaw-chat-composer,
.openclaw-chat-event-copy {
  border-color: var(--border-default);
}

.cp-segmented-control .invite-mode,
.openclaw-chat-view-button,
.cp-row-overflow-trigger {
  border-color: var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.cp-segmented-control .invite-mode.active,
.openclaw-chat-view-button.active {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: var(--text-inverse);
}

.cp-page .action.primary,
.cp-modal-sheet .action.primary,
.knowledge-registry-row .cp-row-primary-action,
.knowledge-square-row .cp-row-primary-action,
.knowledge-token-row .cp-row-primary-action {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: var(--text-inverse);
}

.cp-page .action.primary:hover,
.cp-modal-sheet .action.primary:hover,
.knowledge-registry-row .cp-row-primary-action:hover,
.knowledge-square-row .cp-row-primary-action:hover,
.knowledge-token-row .cp-row-primary-action:hover {
  border-color: var(--brand-600);
  background: var(--brand-600);
}

.cp-page .action.secondary,
.cp-page .mini-btn,
.cp-modal-sheet .action.secondary,
.cp-modal-sheet .mini-btn {
  border-color: var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.cp-page .action.danger,
.cp-modal-sheet .action.danger {
  border-color: var(--danger-text);
  background: var(--danger-text);
  color: var(--text-inverse);
}

.cp-page .mini-btn.danger-text,
.cp-modal-sheet .mini-btn.danger-text {
  border-color: rgba(181, 71, 71, 0.24);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.cp-page .status,
.cp-modal-sheet .status,
.share-status-summary.is-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.cp-page .status.gray,
.share-status-summary.is-neutral {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.share-status-summary.is-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.cp-page input,
.cp-page textarea,
.cp-page select,
.cp-modal-sheet input,
.cp-modal-sheet textarea,
.cp-modal-sheet select {
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.cp-page input:focus,
.cp-page textarea:focus,
.cp-page select:focus,
.cp-modal-sheet input:focus,
.cp-modal-sheet textarea:focus,
.cp-modal-sheet select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(63, 120, 209, 0.12);
}

.cp-page .choice-card.active,
.cp-modal-sheet .choice-card.active {
  border-color: rgba(63, 120, 209, 0.42);
  background: rgba(63, 120, 209, 0.08);
}

.cp-page .message.success,
.cp-modal-sheet .message.success,
.cp-page .message:not(.error):not(.warning),
.cp-modal-sheet .message:not(.error):not(.warning) {
  border-color: rgba(47, 122, 82, 0.18);
  background: var(--success-bg);
  color: var(--success-text);
}

.cp-page .message.warning,
.cp-modal-sheet .message.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.cp-page .message.error,
.cp-modal-sheet .message.error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.cp-page .empty {
  border-color: var(--border-default);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.home-traffic-swatch.visit,
.home-traffic-bar.visit {
  background: var(--brand-500);
}

.home-traffic-swatch.download,
.home-traffic-bar.download {
  background: var(--accent-teal);
}

.home-traffic-bars,
.openclaw-transcript-shell,
.openclaw-chat-transcript,
.openclaw-chat-events {
  background: var(--bg-surface);
}

.openclaw-chat-menu,
.cp-row-overflow-menu,
.cp-modal-sheet {
  border-color: var(--border-default);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
}

.openclaw-chat-bubble {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}

.openclaw-chat-bubble.mine,
.openclaw-stream-bubble.mine {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: var(--text-inverse);
}

.openclaw-chat-system-event {
  border-color: var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.openclaw-chat-system-event.level-info {
  border-left-color: var(--accent-teal);
}

.openclaw-chat-system-event.level-warn {
  border-left-color: var(--warning-text);
  background: var(--warning-bg);
}

.openclaw-chat-system-event.level-error {
  border-left-color: var(--danger-text);
  background: var(--danger-bg);
}

@media (max-width: 900px) {
  .home-entry-grid {
    grid-template-columns: 1fr;
  }

  .cp-content {
    padding: 16px;
  }

  .knowledge-detail-title {
    font-size: 24px;
  }

  .knowledge-detail-actions {
    padding: 12px;
    min-width: 0;
    width: min(360px, calc(100vw - 40px));
  }

  .knowledge-detail-action-group .cp-action-bar {
    flex-direction: column;
  }

  .knowledge-detail-meta,
  .knowledge-detail-identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .share-result-head {
    flex-direction: column;
  }

  .cp-page-toolbar,
  .cp-surface-header {
    flex-direction: column;
    align-items: stretch;
  }

  .cp-summary-item-value,
  .cp-summary-card-value {
    font-size: 24px;
  }

  .openclaw-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .openclaw-page-header-actions {
    justify-content: flex-start;
  }

  .openclaw-workspace {
    grid-template-columns: 1fr;
  }

  .openclaw-pane + .openclaw-pane {
    border-left: none;
    border-top: 1px solid var(--cp-line);
  }

  .openclaw-detail-header {
    flex-direction: column;
    align-items: stretch;
  }

  .openclaw-stream-bubble {
    max-width: 100%;
  }
}
