/* Scoped command, activity, change review, and Zordex workbench polish. */
.segment2-command-menu {
  overflow: hidden;
  border: 1px solid #343a40;
  border-radius: 8px;
  padding: 6px;
  background: #111518;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}
.segment2-command-menu::before {
  content: "COMMANDS";
  display: block;
  padding: 8px 10px 7px;
  color: #87929a;
  font: 700 .68rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .1em;
}
.segment2-command-item {
  min-height: 52px;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
}
.segment2-command-item:hover,
.segment2-command-item.active {
  background: #20262a;
  box-shadow: inset 2px 0 #61c8a5;
}
.segment2-command-item strong { font-size: .88rem; font-weight: 650; }
.segment2-command-item small { margin-top: 3px; color: #9aa4aa; font-size: .75rem; line-height: 1.35; }
.segment2-command-item em {
  border: 1px solid #3a4248;
  border-radius: 5px;
  padding: 4px 6px;
  color: #aab4ba;
  background: #151a1d;
  font: 600 .65rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.message.assistant.segment2-generation-card { min-height: 34px !important; }
.segment2-generation-trigger {
  min-height: 34px;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 6px;
  color: #aeb7bd;
}
.segment2-generation-trigger:hover,
.segment2-generation-trigger:focus-visible { background: #1b2024; color: #eef3f5; }
.segment2-generation-trigger-chevron { transform: rotate(90deg); }
.segment2-generation-drawer { width: min(460px, 94vw); }
.segment2-generation-privacy-note { border-style: dashed; background: transparent; }
.segment2-live-work { margin-bottom: 16px; border-bottom: 1px solid #30363b; padding-bottom: 14px; }
.segment2-live-work-heading strong { font-size: .85rem; }
.segment2-live-work ol { margin-top: 9px; }
.segment2-live-work li { min-height: 30px; }
.segment2-live-files { margin-top: 12px; }

.change-review-card {
  width: min(720px, 100%);
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid #343b40;
  border-radius: 8px;
  background: #171b1e;
}
.change-review-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 12px;
  border-bottom: 1px solid #30363b;
}
.change-review-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #3a4349;
  border-radius: 6px;
  color: #bfc8cd;
  background: #111518;
  font-weight: 800;
}
.change-review-header > div { display: grid; gap: 4px; min-width: 0; }
.change-review-header strong { color: #edf2f4; font-size: .9rem; font-weight: 650; }
.change-review-header .diff-stats { gap: 8px; font: 650 .72rem/1 ui-monospace, Consolas, monospace; }
.change-review-button,
.change-review-toggle {
  border: 1px solid #3b444a;
  border-radius: 6px;
  background: #20262a;
  color: #edf2f4;
  cursor: pointer;
}
.change-review-button { min-height: 32px; padding: 6px 10px; font-weight: 650; }
.change-review-button:hover,
.change-review-toggle:hover { background: #293137; border-color: #56636b; }
.change-review-files { display: grid; }
.change-review-card .message-change-file {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 7px 12px;
  border-bottom: 1px solid #292f33;
}
.change-review-card .message-change-file code {
  overflow: hidden;
  color: #b5bec3;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
}
.change-review-file-stats { display: flex; align-items: center; gap: 7px; font: 650 .72rem/1 ui-monospace, Consolas, monospace; }
.change-review-file-stats b { color: #57d38c; }
.change-review-file-stats i { color: #ff6b72; font-style: normal; }
.change-review-file-stats em { color: #e5bd59; font-style: normal; }
.change-review-extra.hidden { display: none !important; }
.change-review-toggle {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  padding: 7px 12px;
  color: #aeb8bd;
  text-align: left;
}

.chat-main.zordex-active .zordex-v5-nav { min-height: 58px; padding: 10px 14px; }
.chat-main.zordex-active .zordex-v5-nav > div:first-child strong { font-size: .9rem; }
.chat-main.zordex-active .zordex-v5-nav > div:first-child span { font-size: .72rem; }
.chat-main.zordex-active .zordex-v5-nav button,
.chat-main.zordex-active .zordex-v5-editor > header nav button {
  min-height: 32px;
  padding: 6px 11px;
  font-size: .75rem;
  clip-path: none;
  border-radius: 5px !important;
}
.chat-main.zordex-active .zordex-v5-progress { padding: 13px 15px; }
.chat-main.zordex-active .zordex-v5-progress > header span { font-size: .68rem; }
.chat-main.zordex-active .zordex-v5-progress > header strong { font-size: .82rem; }
.chat-main.zordex-active .zordex-v5-progress li { font-size: .72rem; }
.chat-main.zordex-active .zordex-v5-body { grid-template-columns: 210px minmax(0, 1fr); }
.chat-main.zordex-active .zordex-v5-files > header strong { font-size: .78rem; }
.chat-main.zordex-active .zordex-v5-files > header span { font-size: .67rem; }
.chat-main.zordex-active .zordex-v5-folder summary,
.chat-main.zordex-active .zordex-v5-file { min-height: 32px; font-size: .75rem; }
.chat-main.zordex-active .zordex-v5-file { clip-path: none; border-radius: 5px !important; }
.chat-main.zordex-active .zordex-v5-file span { font-size: .72rem; }
.chat-main.zordex-active .zordex-v5-file small { font-size: .59rem; }
.chat-main.zordex-active .zordex-v5-editor > header { min-height: 48px; padding: 7px 10px; }
.chat-main.zordex-active .zordex-v5-tabs button { min-height: 33px; padding: 6px 9px; font-size: .7rem; clip-path: none; border-radius: 5px !important; }
.chat-main.zordex-active .zordex-v5-code,
.chat-main.zordex-active .zordex-v5-preview { grid-template-rows: 40px minmax(0, 1fr); }
.chat-main.zordex-active .zordex-v5-code > header span,
.chat-main.zordex-active .zordex-v5-preview > header span { font-size: .7rem; }
.chat-main.zordex-active .zordex-v5-code > header small,
.chat-main.zordex-active .zordex-v5-preview > header small { font-size: .65rem; }
.chat-main.zordex-active .zordex-v5-code pre { padding: 16px 18px; font-size: 13px; line-height: 1.62; }
.chat-main.zordex-active .zordex-v5-preview > div strong { font-size: .84rem; }
.chat-main.zordex-active .zordex-v5-preview > div span { font-size: .72rem; }

.zct-sketch-shell { width: min(900px, 100%); }
.zct-sketch-canvas {
  min-height: 360px;
  padding: 18px;
  border-color: #33463d;
  border-radius: 8px;
  background-color: #0a100d;
  background-image: linear-gradient(rgba(119, 211, 157, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(119, 211, 157, .035) 1px, transparent 1px);
  background-size: 24px 24px;
}
.zct-sketch-canvas svg { min-width: 680px; }
.zct-sketch-grid path { fill: none; stroke: rgba(126, 210, 163, .04); stroke-width: 1; }
.zct-sketch-node { opacity: 0; transform-box: fill-box; transform-origin: center; animation: zctStructuredNodeIn .42s cubic-bezier(.2,.75,.25,1) forwards; animation-delay: var(--delay); }
.zct-sketch-node .zct-sketch-node-shadow { fill: rgba(0, 0, 0, .26); stroke: none; }
.zct-sketch-node > rect:not(.zct-sketch-node-shadow) { fill: url(#zctNodeGlow); stroke: #3b594a; stroke-width: 1.5; }
.zct-sketch-node circle { fill: #182c23; stroke: #65c38f; stroke-width: 1.5; }
.zct-sketch-node.is-decision > rect:not(.zct-sketch-node-shadow) { stroke: #d2aa61; }
.zct-sketch-node.is-decision circle { fill: #302719; stroke: #d2aa61; }
.zct-sketch-node.is-result > rect:not(.zct-sketch-node-shadow) { stroke: #77c7d7; }
.zct-sketch-node.is-result circle { fill: #17282d; stroke: #77c7d7; }
.zct-sketch-step { fill: #e9fff2; font: 750 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.zct-sketch-title { fill: #f0f7f3; font: 650 15px/1.35 system-ui, sans-serif; }
.zct-sketch-detail { fill: #9eafa6; font: 12px/1.35 system-ui, sans-serif; }
.zct-sketch-arrow { stroke: #79d8a0; stroke-width: 2.2; stroke-dasharray: 10 8; filter: drop-shadow(0 0 4px rgba(121,216,160,.18)); }
@keyframes zctStructuredNodeIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .change-review-header { grid-template-columns: 30px minmax(0, 1fr); }
  .change-review-button { grid-column: 1 / -1; width: 100%; }
  .segment2-command-menu::before { padding-inline: 8px; }
}
