:root {
  color-scheme: light;
  /* 北京赋界品牌色板（civright.com 2026-10-08 线上样式裁定）：
     ink #153b30 / paper #f4f3ec / paper-light #fcfcf8 / muted #56675e
     rule #d5dbd0 / accent #925133 / accent-dark #733f28 */
  --brand-primary: #153b30;
  --brand-hover: #1d5244;
  --brand-active: #0f2b23;
  --brand-soft: #e9efeb;
  --brand-border: #c2cfc7;
  --brand-text: #153b30;
  --text-primary: #153b30;
  --text-secondary: #3d554c;
  --text-tertiary: #56675e;
  --text-disabled: #8a978f;
  --surface: #fcfcf8;
  --surface-subtle: #f4f3ec;
  --rail: #f4f3ec;
  --header: #fcfcf8;
  --workspace: #f4f3ec;
  --border: #d5dbd0;
  --border-strong: #bcc7bb;
  --border-divider: #e4e8e1;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b42318;
  --ai-text: #733f28;
  --ai-fill: #925133;
  --ai-weak: #f7f1ec;
  --ai-border: #e5d3c7;
  --shadow-card: none;
  --shadow-overlay: 0 2px 8px rgb(21 59 48 / 5%), 0 8px 24px rgb(21 59 48 / 8%);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 12px;
  --focus-ring: 0 0 0 3px #c2cfc7;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--font-ui);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--workspace);
  color: var(--text-primary);
}

body {
  min-height: 100dvh;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled),
a,
summary {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.icon-rail button:disabled,
.top-actions button:disabled {
  cursor: default;
  opacity: 0.58;
}

.rail-nav button.is-active:disabled {
  opacity: 1;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--text-primary);
  color: white;
  padding: 10px 14px;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100dvh;
  display: flex;
}

.icon-rail {
  position: sticky;
  top: 0;
  z-index: 5;
  align-self: flex-start;
  width: 68px;
  flex: 0 0 68px;
  min-height: 100dvh;
  background: var(--rail);
  border-right: 1px solid #dedee7;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  gap: 14px;
}

.icon-rail button,
.top-actions button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 180ms ease, color 180ms ease;
}

.icon-rail button:hover,
.top-actions button:hover {
  background: rgb(255 255 255 / 72%);
}

.icon-rail svg,
.top-actions svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rail-nav button {
  color: #8a8a95;
}

.rail-nav button.is-active {
  color: var(--brand-primary);
  background: linear-gradient(135deg, #e9efeb, #eef0e6);
}

.rail-nav .rail-new-chat {
  color: var(--brand-primary);
  background: linear-gradient(135deg, #e9efeb, #eef0e6);
  border: 1px solid var(--brand-border);
}

.rail-nav .rail-new-chat:hover {
  background: #d8e2d9;
  border-color: var(--brand-primary);
}

.workspace {
  min-width: 0;
  flex: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  flex: 0 0 64px;
  background: var(--header);
  border-bottom: 1px solid #e2e2e9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.breadcrumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb strong {
  color: #27272a;
  font-weight: 500;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-actions .avatar-button {
  width: 36px;
  height: 36px;
  margin-left: 6px;
  border-radius: 999px;
  background: linear-gradient(145deg, #1d5244, #0f2b23);
  color: white;
  font-weight: 600;
}

.top-actions .avatar-button:hover {
  background: linear-gradient(145deg, #245c4d, #153b30);
}

.consultation-layout {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  padding: 16px;
}

.chat-panel,
.orchestration-panel {
  min-height: 0;
  background: var(--surface);
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.chat-panel {
  display: flex;
  flex-direction: column;
}

.agent-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.agent-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--brand-primary);
  background: linear-gradient(145deg, #e9efeb, #f8f5ff);
  border: 1px solid #cfdcd2;
}

.agent-mark svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-heading {
  flex: 1;
  min-width: 0;
}

.title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-heading h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.agent-heading p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 500;
}

.status-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.text-button {
  min-width: 72px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: #3f3f46;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.text-button:hover {
  border-color: var(--brand-border);
  background: var(--brand-soft);
  color: var(--brand-primary);
}

.text-button:disabled {
  border-color: var(--border);
  background: #fafafa;
  color: #a1a1aa;
}

.messages {
  flex: 1 0 auto;
  background: linear-gradient(180deg, #faf9f4 0%, #f4f3ec 100%);
  padding: 22px clamp(18px, 4vw, 52px) 30px;
}

.assistant-message,
.user-message {
  width: min(100%, 820px);
  margin-inline: auto;
}

.assistant-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.message-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.agent-mini {
  background: #e2ebe3;
  border: 1px solid #d7e4ff;
  color: var(--brand-primary);
}

.agent-mini svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message-body {
  min-width: 0;
  flex: 1;
}

.welcome-card .message-body {
  padding: 20px;
  border: 1px solid #e7eaf2;
  border-radius: 6px 16px 16px 16px;
  background: white;
  box-shadow: 0 4px 18px rgb(30 50 90 / 5%);
}

.welcome-title {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  margin-bottom: 8px;
}

.welcome-card p {
  margin: 0;
  color: var(--text-secondary);
}

.capability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.capability-tags span,
.answer-tags span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 6px;
  padding: 2px 8px;
  background: #eef2ea;
  border: 1px solid #d8e2d9;
  color: #1d5244;
  font-size: 12px;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.prompt-grid button {
  min-height: 46px;
  padding: 9px 11px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafbfe;
  color: #3f3f46;
  line-height: 1.4;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.prompt-grid button:hover {
  border-color: var(--brand-border);
  background: var(--brand-soft);
  color: #1746ad;
}

.user-message {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 22px;
}

.user-bubble {
  max-width: min(84%, 640px);
  padding: 11px 14px;
  border-radius: 14px 4px 14px 14px;
  background: var(--brand-primary);
  color: white;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 5px 14px rgb(22 93 255 / 18%);
}

.answer-shell {
  border: 1px solid #e1e6f0;
  border-radius: 6px 16px 16px 16px;
  background: white;
  overflow: hidden;
  box-shadow: 0 4px 18px rgb(30 50 90 / 5%);
}

.answer-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid #e6e9e2;
  background: linear-gradient(180deg, #fbfaf6, #ffffff);
}

.answer-intro strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.answer-intro p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.perspective-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #edf8f3;
  color: #187354;
  font-size: 12px;
  white-space: nowrap;
}

.answer-card {
  padding: 17px;
}

.answer-card + .answer-card {
  border-top: 8px solid #f4f5f8;
}

.answer-question {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
}

.question-index {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--brand-primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.answer-question h3 {
  margin: 1px 0 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
}

.answer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px 33px;
}

.answer-section {
  margin-top: 15px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-weight: 600;
  color: #18181b;
}

.section-number {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #e9efeb;
  color: var(--brand-primary);
  font-size: 11px;
}

.answer-section p {
  margin: 0;
  color: #3f3f46;
  line-height: 1.75;
}

.answer-section ul,
.answer-section ol {
  margin: 0;
  padding-left: 25px;
  color: #3f3f46;
}

.answer-section li {
  margin: 5px 0;
  padding-left: 2px;
}

.answer-section li::marker {
  color: var(--brand-primary);
  font-weight: 600;
}

.advice-report-body {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--brand-primary);
  background: #f7f9f3;
  color: #3f3f46;
  line-height: 1.8;
  font-size: 13.5px;
  border-radius: 0 8px 8px 0;
}

.answer-meta {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid #e6e9e2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--text-tertiary);
  font-size: 12px;
}

.answer-meta .risk-alert {
  color: var(--danger);
  font-weight: 500;
}

.assumption-note,
.answer-notice {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.65;
}

.assumption-note {
  border: 1px solid #dbe7ff;
  background: #f4f6ef;
  color: #45546f;
}

.assumption-note strong {
  color: #244b96;
}

.answer-notice {
  border: 1px solid #f2d9a6;
  background: #fffbeb;
  color: #7c4a03;
}

.source-disclosure {
  margin-top: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfaf6;
  overflow: hidden;
}

.source-disclosure summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  color: #3f3f46;
  font-weight: 500;
  list-style: none;
  transition: background-color 180ms ease;
}

.source-disclosure summary:hover {
  background: #f3f5f9;
}

.source-disclosure summary::-webkit-details-marker {
  display: none;
}

.source-disclosure summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--brand-primary);
  background: #e9efeb;
  font-size: 17px;
  font-weight: 400;
}

.source-disclosure[open] summary::after {
  content: "−";
}

.source-list {
  margin: 0;
  padding: 0 12px 11px;
  list-style: none;
}

.source-item {
  padding: 11px 0;
  border-top: 1px solid #eceef2;
}

.source-item a {
  color: #1d5244;
  font-weight: 500;
  text-decoration: none;
}

.source-item a:hover {
  text-decoration: underline;
}

.source-item span {
  display: block;
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.clarification-card {
  margin: 0 17px 17px;
  padding: 15px;
  border: 1px solid #d5e0d6;
  border-radius: 12px;
  background: #f4f6ef;
}

.clarification-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.clarification-card p {
  margin: 0;
  color: var(--text-secondary);
}

.clarification-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.clarification-options button {
  min-height: 44px;
  border: 1px solid #b8caff;
  border-radius: 8px;
  padding: 8px 12px;
  background: white;
  color: #1d5244;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.clarification-options button:hover {
  background: #e2ebe3;
  border-color: var(--brand-primary);
}

.route-links {
  display: flex;
  min-height: 56px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 12px 17px;
  border-top: 1px solid #e6e9e2;
}

.route-links-label {
  color: var(--text-tertiary);
  font-size: 13px;
}

.route-links a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 28px;
  margin: 0;
  padding: 2px 0;
  color: var(--brand-primary);
  font-size: 13px;
  text-decoration: none;
  transition: color 160ms ease;
}

.route-links a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.route-links a svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.disclaimer {
  margin: 0;
  padding: 11px 17px;
  border-top: 1px solid #e6e9e2;
  background: #fbfbfc;
  color: var(--text-tertiary);
  font-size: 12px;
}

.error-card {
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 8px 14px 14px 14px;
  background: #fff7f7;
  color: #991b1b;
}

.loading-body {
  min-height: 76px;
  padding: 17px;
  border: 1px solid #e7eaf2;
  border-radius: 6px 16px 16px 16px;
  background: white;
}

.loading-body span {
  display: block;
  height: 10px;
  margin: 5px 0 12px;
  border-radius: 5px;
  background: linear-gradient(90deg, #eeece5 25%, #faf9f4 50%, #eeece5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.loading-body span:nth-child(1) { width: 78%; }
.loading-body span:nth-child(2) { width: 92%; }
.loading-body span:nth-child(3) { width: 56%; margin-bottom: 0; }

.live-status {
  min-height: 34px;
  padding: 7px 18px;
  border-top: 1px solid var(--border);
  background: #f7f9f3;
  color: #2851a3;
  font-size: 12px;
}

.composer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 13px 16px 14px;
  border-top: 1px solid var(--border);
  background: white;
  box-shadow: 0 -6px 16px rgb(15 23 42 / 3%);
}

.composer textarea {
  display: block;
  width: 100%;
  max-height: 160px;
  min-height: 52px;
  resize: none;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--text-primary);
  background: #fcfcf8;
  line-height: 1.55;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.composer textarea::placeholder {
  color: var(--text-tertiary);
}

.composer textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: white;
  box-shadow: var(--focus-ring);
}

.composer textarea:disabled {
  color: #8a8a95;
  background: #f4f4f5;
}

.send-button {
  min-width: 86px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--brand-primary);
  color: white;
  font-weight: 500;
  transition: background-color 180ms ease, opacity 180ms ease;
}

.send-button:hover {
  background: var(--brand-hover);
}

.send-button:active {
  background: var(--brand-active);
}

.send-button:disabled {
  cursor: not-allowed;
  background: #f4f4f5;
  color: #a1a1aa;
}

.send-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.orchestration-panel {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100dvh - 96px);
  padding: 18px;
  overflow-y: auto;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.state-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: #f4f4f5;
  color: var(--text-secondary);
  font-size: 12px;
}

.state-pill.is-running {
  background: #e9efeb;
  color: #1d5244;
}

.state-pill.is-done {
  background: #ecfdf5;
  color: #047857;
}

.state-pill.is-failed {
  background: #fef2f2;
  color: #991b1b;
}

.question-progress {
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: var(--brand-soft);
}

.question-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.question-progress-head strong {
  font-size: 12px;
  font-weight: 600;
  color: #1d5244;
}

.question-progress-count {
  font-size: 12px;
  font-weight: 600;
  color: #1d5244;
  font-variant-numeric: tabular-nums;
}

.qa-progress-track {
  height: 6px;
  border-radius: 999px;
  background: #d5e0d6;
  overflow: hidden;
}

.qa-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-primary);
  transition: width 240ms ease;
}

.question-progress-label {
  display: block;
  margin-top: 7px;
  color: #45546f;
  font-size: 12px;
}

.panel-description {
  margin: 10px 0 18px;
  color: var(--text-secondary);
  font-size: 13px;
}

.workflow {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 15px;
  width: 1px;
  background: #e2e5ed;
}

.workflow li {
  position: relative;
  display: flex;
  gap: 11px;
  min-height: 66px;
  color: var(--text-tertiary);
}

.step-icon {
  position: relative;
  z-index: 1;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  border: 1px solid #e0e3ea;
  border-radius: 9px;
  background: white;
  font-size: 12px;
  font-weight: 600;
}

.workflow strong,
.workflow small {
  display: block;
}

.workflow strong {
  margin-top: 2px;
  color: #52525b;
  font-weight: 500;
}

.workflow small {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.workflow li.is-active .step-icon {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 0 0 4px #eaf0ff;
}

.workflow li.is-active strong {
  color: #1d5244;
}

.workflow li.is-complete .step-icon {
  border-color: #a7e2ca;
  background: #edf9f4;
  color: #087353;
}

.workflow li.is-complete strong {
  color: #3f3f46;
}

.agents-block {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.agents-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.agent-list {
  display: grid;
  gap: 7px;
}

.empty-agents {
  padding: 12px;
  border: 1px dashed #d8dae2;
  border-radius: 9px;
  color: var(--text-tertiary);
  text-align: center;
  font-size: 12px;
}

.agent-status-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid #e7e9ef;
  border-radius: 9px;
  background: #fbfaf6;
}

.agent-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #c4c7cf;
}

.agent-status-row.is-running .agent-dot {
  background: var(--brand-primary);
  box-shadow: 0 0 0 4px #e6edff;
}

.agent-status-row.is-completed .agent-dot {
  background: #10b981;
}

.agent-status-row.is-failed .agent-dot {
  background: #ef4444;
}

.agent-status-row div {
  min-width: 0;
  flex: 1;
}

.agent-status-row strong,
.agent-status-row small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.agent-status-row strong {
  font-size: 12px;
  font-weight: 500;
}

.agent-status-row small {
  margin-top: 1px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.privacy-note {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  padding: 11px;
  border-radius: 10px;
  background: #fff9ec;
  border: 1px solid #f4e5b9;
  color: #795b12;
}

.privacy-note svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-note strong,
.privacy-note span {
  display: block;
}

.privacy-note strong {
  font-size: 12px;
}

.privacy-note span {
  margin-top: 2px;
  color: #8a6a1d;
  font-size: 12px;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (max-width: 1199px) {
  .consultation-layout {
    grid-template-columns: minmax(0, 1fr) 288px;
  }

  .orchestration-panel {
    padding: 16px;
  }
}

@media (max-width: 991px) {
  .icon-rail {
    display: none;
  }

  .consultation-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .orchestration-panel {
    display: none;
  }
}

@media (min-width: 992px) {
  #clear-chat {
    display: none;
  }
}

@media (max-width: 767px) {
  .topbar {
    height: 56px;
    flex-basis: 56px;
    padding: 0 12px;
  }

  .breadcrumb span:first-child,
  .breadcrumb span:nth-child(2),
  .breadcrumb strong:nth-child(3),
  .breadcrumb span:nth-child(4),
  .top-actions button:not(.avatar-button) {
    display: none;
  }

  .consultation-layout {
    padding: 0;
  }

  .chat-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .agent-header {
    min-height: 68px;
    padding: 10px 12px;
  }

  .agent-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
  }

  .agent-heading h1 {
    font-size: 16px;
  }

  .agent-heading p,
  .status-badge {
    display: none;
  }

  .text-button {
    min-width: 64px;
    min-height: 44px;
  }

  .messages {
    padding: 16px 12px 22px;
  }

  .assistant-message {
    gap: 8px;
  }

  .message-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 9px;
  }

  .welcome-card .message-body,
  .answer-card {
    padding: 14px;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .user-bubble {
    max-width: 90%;
  }

  .answer-intro {
    display: block;
    padding: 13px 14px;
  }

  .perspective-chip {
    margin-top: 8px;
  }

  .answer-tags {
    margin-left: 0;
  }

  .clarification-card,
  .route-links {
    margin-left: 0;
    margin-right: 0;
  }

  .clarification-options {
    display: grid;
  }

  .clarification-options button {
    min-height: 44px;
    text-align: left;
  }

  .composer {
    padding: 10px 12px max(11px, env(safe-area-inset-bottom));
  }

  .composer textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .send-button {
    min-width: 74px;
    min-height: 44px;
  }
}

.job-cancel {
  align-self: center;
  margin: 0.35rem 0 0 0.5rem;
  border: 1px solid var(--line, #d9d5cc);
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #666057);
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.job-cancel:hover,
.job-cancel:focus-visible {
  border-color: currentColor;
  color: var(--ink, #24211d);
}

.job-cancel:disabled {
  cursor: wait;
  opacity: 0.6;
}

/* ---- 赋界 Foundation Token V2（原百鉴 Token V2 层，沿用类名不改布局）：咨询工作台统一层 ---- */
.workspace,
.messages {
  background: var(--workspace);
}

.icon-rail,
.topbar,
.chat-panel,
.orchestration-panel,
.welcome-card,
.composer,
.auth-card {
  box-shadow: none;
}

.icon-rail {
  width: 56px;
  flex-basis: 56px;
  padding-inline: 6px;
  background: var(--surface-subtle);
  border-color: var(--border);
}

.rail-brand {
  color: var(--brand-primary);
  text-decoration: none;
}

.topbar {
  background: var(--surface);
  border-color: var(--border-divider);
}

.breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-text);
}

.chat-panel,
.orchestration-panel,
.welcome-card,
.composer {
  border-color: var(--border);
}

.agent-mark,
.agent-mini,
.rail-nav button.is-active,
.rail-nav .rail-new-chat,
.send-button {
  background: var(--brand-primary);
  background-image: none;
}

.send-button:hover:not(:disabled),
.rail-nav .rail-new-chat:hover {
  background: var(--brand-hover);
}

.send-button:active:not(:disabled) {
  background: var(--brand-active);
}

.status-badge,
.state-pill.is-complete {
  color: #15803d;
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.workflow li.is-active .step-icon,
.qa-progress-fill {
  background: var(--brand-primary);
}

.workflow li.is-active,
.prompt-grid button:hover,
.history-list button:hover {
  background: var(--brand-soft);
}

.composer:focus-within {
  border-color: var(--brand-primary);
  box-shadow: var(--focus-ring);
}

.history-drawer {
  box-shadow: var(--shadow-overlay);
}

.auth-screen {
  background: var(--workspace);
}

.auth-card {
  border: 1px solid var(--border);
}

/* ---- 项目介绍页 ---- */
body.intro-page {
  overflow: auto;
  background: var(--workspace);
  color: var(--text-primary);
}

.intro-page a {
  text-underline-offset: 3px;
}

.intro-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-divider);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(10px);
}

.intro-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
}

.intro-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-primary);
  color: #fff;
}

.intro-brand-mark svg,
.preview-agent-icon svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intro-brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.intro-brand strong {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.intro-brand small {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
}

.intro-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.intro-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
}

.intro-nav a:hover {
  color: var(--brand-text);
}

.intro-header-action {
  justify-self: end;
}

.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary {
  color: #fff;
  background: var(--brand-primary);
}

.button-primary:hover {
  background: var(--brand-hover);
}

.button-primary:active {
  background: var(--brand-active);
}

.button-secondary {
  color: var(--text-secondary);
  background: var(--surface);
  border-color: var(--border);
}

.button-secondary:hover {
  color: var(--brand-text);
  border-color: var(--brand-border);
  background: var(--brand-soft);
}

.section-shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.intro-hero {
  min-height: calc(100dvh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.86fr);
  align-items: center;
  gap: 48px;
  padding-block: 64px;
}

.hero-copy {
  max-width: 620px;
}

.ai-label,
.ai-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ai-text);
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
}

.ai-label {
  padding: 5px 9px;
  border: 1px solid var(--ai-border);
  border-radius: 6px;
  background: var(--ai-weak);
}

.ai-label > span,
.ai-inline {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  max-width: 620px;
  margin: 20px 0 16px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.hero-copy > p {
  max-width: 580px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions .button {
  min-height: 40px;
  padding-inline: 20px;
}

.hero-facts {
  display: flex;
  gap: 0;
  margin: 40px 0 0;
}

.hero-facts div {
  min-width: 112px;
  padding-right: 24px;
  margin-right: 24px;
  border-right: 1px solid var(--border-divider);
}

.hero-facts div:last-child {
  margin-right: 0;
  border-right: 0;
}

.hero-facts dt {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.hero-facts dd {
  margin: 2px 0 0;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
}

.agent-preview {
  align-self: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.preview-topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-divider);
}

.preview-agent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-agent-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-primary);
}

.preview-agent > span:last-child {
  display: flex;
  flex-direction: column;
}

.preview-agent strong {
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
}

.preview-agent small {
  color: #15803d;
  font-size: 12px;
  line-height: 18px;
}

.preview-agent small i {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: #16a34a;
}

.preview-status {
  padding: 4px 8px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  color: var(--brand-text);
  background: var(--brand-soft);
  font-size: 12px;
  line-height: 18px;
}

.preview-chat {
  min-height: 348px;
  padding: 24px 20px;
  background: var(--workspace);
}

.preview-question {
  width: fit-content;
  max-width: 82%;
  margin: 0 0 20px auto;
  padding: 10px 14px;
  border-radius: 8px 8px 2px 8px;
  color: #fff;
  background: var(--brand-primary);
  font-size: 14px;
  line-height: 22px;
}

.preview-answer {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.preview-answer .ai-inline {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ai-border);
  border-radius: 6px;
  background: var(--ai-weak);
}

.preview-answer strong {
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
}

.preview-answer p,
.preview-answer li {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.preview-answer p {
  margin: 6px 0 10px;
}

.preview-answer ul {
  margin: 0;
  padding-left: 18px;
}

.preview-answer li::marker {
  color: var(--brand-primary);
}

.preview-source-flow {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-divider);
  background: var(--surface);
}

.preview-source-flow span {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
}

.preview-source-flow span.is-complete {
  color: #15803d;
}

.preview-source-flow i {
  width: 28px;
  height: 1px;
  background: var(--border);
}

.intro-section {
  padding-block: 80px;
}

.section-heading {
  max-width: 660px;
  margin-bottom: 32px;
}

.section-heading > span,
.workflow-copy > span,
.boundary-panel > div:first-child > span {
  color: var(--brand-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}

.section-heading h2,
.workflow-copy h2,
.boundary-panel h2,
.intro-cta h2 {
  margin: 8px 0;
  font-size: 24px;
  line-height: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.section-heading p,
.workflow-copy > p,
.intro-cta p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 22px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.capability-card {
  min-height: 220px;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background-color 180ms ease;
}

.capability-card:hover {
  background: var(--surface-subtle);
}

.capability-card-wide {
  min-height: 248px;
  grid-column: span 7;
}

.capability-card-source {
  grid-column: span 5;
  background: var(--brand-soft);
}

.card-index {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}

.capability-card h3,
.workflow-steps h3 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.capability-card p,
.workflow-steps p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 22px;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.topic-list span {
  padding: 4px 9px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  color: var(--brand-text);
  background: var(--brand-soft);
  font-size: 12px;
  line-height: 18px;
}

.workflow-intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.workflow-copy {
  position: sticky;
  top: 104px;
}

.text-link {
  display: inline-flex;
  gap: 6px;
  margin-top: 20px;
  color: var(--brand-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.workflow-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.workflow-steps li {
  min-height: 128px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.workflow-steps li > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brand-border);
  border-radius: 50%;
  color: var(--brand-text);
  background: var(--brand-soft);
  font-size: 13px;
  line-height: 20px;
}

.boundary-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1fr);
  gap: 48px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.boundary-panel h2 {
  margin-bottom: 0;
}

.boundary-items {
  display: grid;
  gap: 0;
}

.boundary-items p {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-divider);
  font-size: 14px;
  line-height: 22px;
}

.boundary-items p:first-child {
  padding-top: 0;
}

.boundary-items p:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.boundary-items strong {
  font-weight: 500;
}

.boundary-items span {
  color: var(--text-secondary);
}

.intro-cta {
  min-height: 184px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-block: 40px 80px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.intro-cta > div {
  max-width: 720px;
}

.intro-cta .ai-label {
  margin-bottom: 4px;
}

.intro-cta .button {
  flex: 0 0 auto;
}

.intro-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--border-divider);
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
}

.intro-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.intro-reveal.is-visible,
.has-gsap .intro-reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .intro-header {
    grid-template-columns: 1fr auto;
  }

  .intro-nav {
    display: none;
  }

  .intro-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 56px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .agent-preview {
    width: min(100%, 680px);
  }

  .workflow-intro,
  .boundary-panel {
    grid-template-columns: 1fr;
  }

  .workflow-copy {
    position: static;
  }
}

@media (max-width: 720px) {
  .intro-header {
    height: 56px;
    padding-inline: 16px;
  }

  .intro-brand small {
    display: none;
  }

  .section-shell {
    width: min(100% - 32px, 1180px);
  }

  .intro-hero,
  .intro-section {
    padding-block: 48px;
  }

  .hero-copy h1 {
    font-size: 32px;
    line-height: 42px;
  }

  .hero-copy h1 br {
    display: none;
  }

  .hero-copy > p {
    font-size: 14px;
    line-height: 24px;
  }

  .hero-facts {
    flex-wrap: wrap;
    gap: 16px 0;
  }

  .hero-facts div {
    min-width: 33.333%;
    margin-right: 0;
    padding-right: 12px;
  }

  .preview-chat {
    min-height: 320px;
    padding: 16px 12px;
  }

  .preview-status {
    display: none;
  }

  .capability-grid {
    display: block;
  }

  .capability-card,
  .capability-card-wide,
  .capability-card-source {
    min-height: 184px;
  }

  .boundary-panel,
  .intro-cta {
    padding: 24px 20px;
  }

  .boundary-items p {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .intro-cta {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 48px;
  }

  .intro-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .intro-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---- 2026 咨询工作台重构 ---- */
@media (min-width: 992px) {
  body {
    overflow: hidden;
  }
}

.icon-rail {
  width: 52px;
  flex-basis: 52px;
  padding: 10px 7px;
  gap: 20px;
  overflow: visible;
}

.rail-brand {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e9efeb;
  color: var(--brand-primary);
}

.rail-brand svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-nav {
  gap: 12px;
}

.icon-rail .rail-nav button {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.icon-rail .rail-nav button::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 30;
  padding: 6px 9px;
  border: 1px solid #dfe3ec;
  border-radius: 7px;
  background: #27272a;
  color: #f8fafc;
  box-shadow: 0 8px 20px rgb(15 23 42 / 14%);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%);
  transition: opacity 140ms ease, transform 140ms ease;
}

.icon-rail .rail-nav button:hover::after,
.icon-rail .rail-nav button:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.rail-nav .rail-new-chat {
  border: 0;
  background: transparent;
  color: #626574;
}

.rail-nav .rail-new-chat:hover {
  border-color: transparent;
  background: #e9eefb;
  color: var(--brand-primary);
}

.rail-nav button.is-active {
  background: #cfdcd2;
  color: var(--brand-primary);
}

.topbar {
  height: 58px;
  flex-basis: 58px;
  padding: 0 18px;
}

.consultation-layout {
  height: calc(100dvh - 58px);
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

.chat-panel,
.orchestration-panel {
  height: 100%;
  border-color: #e4e7ef;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgb(57 68 105 / 7%);
}

.chat-panel {
  overflow: hidden;
}

.agent-header {
  min-height: 64px;
  flex: 0 0 64px;
  gap: 10px;
  padding: 9px 14px;
}

.agent-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 12px;
}

.agent-mark svg {
  width: 24px;
  height: 24px;
}

.agent-heading h1 {
  font-size: 17px;
}

.agent-heading p {
  margin-top: 1px;
  font-size: 12px;
}

.status-badge {
  padding: 2px 7px;
  font-size: 11px;
}

.text-button {
  min-width: 66px;
  min-height: 36px;
  font-size: 12px;
}

.messages {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px clamp(20px, 3vw, 44px) 28px;
  background: #f7f8fb;
  scrollbar-gutter: stable;
}

.assistant-message,
.user-message {
  width: min(100%, 920px);
}

.assistant-message {
  margin-bottom: 18px;
}

.welcome-card {
  margin-bottom: 16px;
}

.welcome-card .message-body {
  max-width: 760px;
  padding: 13px 15px;
  border-radius: 6px 13px 13px 13px;
  box-shadow: 0 3px 12px rgb(30 50 90 / 4%);
}

.welcome-title {
  margin-bottom: 4px;
  font-size: 15px;
}

.welcome-card p {
  font-size: 13px;
}

.prompt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.prompt-grid button {
  width: auto;
  min-height: 32px;
  padding: 5px 10px;
  border-color: #dce2ec;
  border-radius: 7px;
  background: #fff;
  color: #454957;
  font-size: 12px;
  text-align: center;
}

.message-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 9px;
}

.agent-mini svg {
  width: 18px;
  height: 18px;
}

.user-message {
  margin-bottom: 18px;
}

.user-bubble {
  max-width: min(80%, 680px);
  padding: 9px 13px;
  font-size: 13px;
}

.answer-shell {
  border-radius: 6px 14px 14px 14px;
}

.answer-card {
  padding: 15px;
}

.answer-section p,
.answer-section li {
  font-size: 13px;
  line-height: 1.7;
}

.composer {
  position: relative;
  bottom: auto;
  flex: 0 0 auto;
  padding: 9px 14px 8px;
  box-shadow: 0 -4px 14px rgb(15 23 42 / 3%);
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-height: 48px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #fcfcf8;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.composer-row:focus-within {
  border-color: var(--brand-primary);
  background: #fff;
  box-shadow: var(--focus-ring);
}

.composer textarea {
  min-width: 0;
  min-height: 38px;
  max-height: 96px;
  flex: 1;
  border: 0;
  border-radius: 7px;
  padding: 8px 7px;
  background: transparent;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: none;
}

.composer textarea:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.composer textarea:disabled {
  background: transparent;
}

/* Progressive answer rendering and per-reply actions */
.answer-shell {
  position: relative;
}

.reply-tools {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 12px 15px 0;
  padding: 10px 0 12px;
  border-top: 1px solid #e7e9ef;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.assistant-message:hover .reply-tools,
.assistant-message:focus-within .reply-tools {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reply-tool {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid #d7dce6;
  border-radius: 7px;
  background: #fff;
  color: #4a5060;
  font-size: 12px;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.reply-tool:hover:not(:disabled) {
  border-color: #96aef0;
  background: #f5f7ff;
  color: #174bb8;
  transform: translateY(-1px);
}

.reply-tool:active:not(:disabled) {
  transform: translateY(0) scale(.98);
}

.reply-tool.is-success {
  border-color: #8fc8ae;
  background: #effaf5;
  color: #176b4a;
}

.reply-tool svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.composer textarea {
  max-height: 144px;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scrollbar-color: #b7bdc9 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.composer textarea::-webkit-scrollbar {
  width: 7px;
}

.composer textarea::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #b7bdc9;
  background-clip: padding-box;
}

.composer-count.is-near-limit {
  color: #ad3f3f;
  font-weight: 650;
}

@media (hover: none) {
  .reply-tools {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

.composer-row .attach-button {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-color: transparent;
  background: transparent;
}

.composer-count {
  align-self: center;
  flex: 0 0 auto;
  color: #747787;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.composer-row .send-button {
  min-width: 74px;
  min-height: 38px;
  flex: 0 0 auto;
}

.composer-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 5px 0;
  color: #747787;
  font-size: 11px;
}

.file-chips {
  margin-bottom: 7px;
}

.orchestration-panel {
  position: relative;
  top: auto;
  align-self: stretch;
  max-height: none;
  padding: 16px;
  overflow-y: auto;
}

.panel-heading {
  display: block;
}

.panel-heading h2 {
  font-size: 16px;
}

.state-pill {
  width: 100%;
  min-height: 48px;
  justify-content: flex-start;
  gap: 9px;
  margin-top: 12px;
  border: 1px solid #cbd9ff;
  border-radius: 10px;
  padding: 9px 11px;
  background: #eef2ea;
  color: #1746ad;
  font-size: 13px;
  font-weight: 600;
}

.state-pill::before {
  content: "✓";
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 14px;
}

.state-pill.is-running::before {
  content: "…";
}

.state-pill.is-failed::before {
  content: "!";
}

.panel-description {
  margin: -20px 10px 19px 45px;
  color: #697083;
  font-size: 11px;
  pointer-events: none;
}

.workflow::before {
  left: 14px;
  background: #d8e2fb;
}

.workflow li {
  gap: 10px;
  min-height: 64px;
}

.step-icon {
  width: 29px;
  height: 29px;
  flex-basis: 29px;
  border: 0;
  border-radius: 50%;
  background: #e9efeb;
  color: var(--brand-primary);
}

.workflow strong {
  font-size: 13px;
}

.workflow small {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.45;
}

.agents-block {
  margin-top: 2px;
  padding-top: 13px;
}

.privacy-note {
  margin-top: 13px;
  padding: 10px;
  border-color: #f1d79a;
  border-radius: 10px;
  background: #fff9ed;
}

.privacy-note span {
  line-height: 1.5;
}

.attachment-summary {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e0e4ed;
  border-radius: 10px;
  background: #fbfaf6;
}

.attachment-summary svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: #515664;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.attachment-summary strong,
.attachment-summary span {
  display: block;
}

.attachment-summary strong {
  color: #2f3138;
  font-size: 12px;
  font-weight: 600;
}

.attachment-summary strong span {
  display: inline;
}

.attachment-summary div > span {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: 11px;
}

@media (max-width: 1199px) {
  .consultation-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 991px) {
  body {
    overflow: auto;
  }

  .consultation-layout {
    height: calc(100dvh - 58px);
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .topbar {
    height: 56px;
    flex-basis: 56px;
  }

  .consultation-layout {
    height: calc(100dvh - 56px);
    min-height: 0;
    padding: 0;
  }

  .chat-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .agent-header {
    flex-basis: 60px;
    min-height: 60px;
  }

  .messages {
    padding: 14px 12px 18px;
  }

  .prompt-grid {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }

  .prompt-grid button {
    flex: 0 0 auto;
  }

  .composer {
    padding: 8px 9px max(7px, env(safe-area-inset-bottom));
  }

  .composer-hint span:first-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .composer-hint .keyboard-hint {
    display: none;
  }
}

@media (max-width: 420px) {
  .composer-count {
    display: none;
  }

  .composer-row .send-button {
    min-width: 44px;
  }
}

@media (max-width: 420px) {
  .answer-question {
    display: block;
  }

  .question-index {
    margin-bottom: 7px;
  }

  .keyboard-hint {
    display: none;
  }

  .send-button span {
    display: none;
  }

  .send-button {
    min-width: 48px;
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- 登录 / 注册 ---- */
[hidden] {
  display: none !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(120% 140% at 20% 0%, #e9efeb 0%, #ece8ff 38%, #e8e8f0 100%);
}

.auth-card {
  width: min(100%, 400px);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-card);
  border: 1px solid #e4e7f0;
  padding: 28px 26px 24px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 20px;
}

.auth-brand .agent-mark {
  margin: 0 auto 12px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-brand p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f2f3f8;
  margin-bottom: 18px;
}

.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.auth-tabs button.is-active {
  background: white;
  color: var(--brand-primary);
  box-shadow: 0 1px 4px rgb(15 23 42 / 10%);
}

.auth-form {
  display: grid;
  gap: 7px;
}

.auth-form label {
  font-size: 13px;
  font-weight: 500;
  color: #3f3f46;
  margin-top: 4px;
}

.auth-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 12px;
  background: #fcfcf8;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: white;
  box-shadow: var(--focus-ring);
}

.auth-form .send-button {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
}

.auth-error {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff7f7;
  color: #991b1b;
  font-size: 13px;
}

/* ---- 历史对话抽屉 ---- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgb(15 23 42 / 30%);
  animation: fadeIn 180ms ease;
}

.history-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: min(100%, 330px);
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: 8px 0 30px rgb(15 23 42 / 12%);
  animation: slideIn 200ms ease;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 60px;
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.drawer-head button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: grid;
  place-items: center;
}

.drawer-head button:hover {
  background: #f2f3f8;
}

.drawer-head svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.history-group-label {
  padding: 8px 2px 2px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
}

.history-item {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfaf6;
  padding: 10px 12px;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.history-item:hover {
  border-color: var(--brand-border);
  background: var(--brand-soft);
}

.history-item.is-current {
  border-color: var(--brand-primary);
  background: #e9efeb;
}

.history-item-title,
.history-item-meta {
  display: block;
}

.history-item-title {
  color: #27272a;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.history-item-meta {
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
}

.drawer-footer button {
  min-height: 36px;
  min-width: 72px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--danger);
  font-size: 13px;
}

.drawer-footer button:hover {
  border-color: #fecaca;
  background: #fff7f7;
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- 输入框附件 ---- */
.attach-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
  color: var(--text-tertiary);
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.attach-button:hover {
  border-color: var(--brand-border);
  color: var(--brand-primary);
  background: var(--brand-soft);
}

.attach-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 34px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fbfaf6;
  font-size: 12px;
}

.file-chip.is-uploading {
  border-color: var(--brand-border);
  background: var(--brand-soft);
  color: #1d5244;
}

.file-chip.is-ready {
  border-color: #bfe6d4;
  background: #f0faf5;
  color: #0c6f4c;
}

.file-chip.is-error {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.file-chip svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-chip-name {
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}

.file-chip-state {
  flex: 0 0 auto;
  font-size: 11px;
}

.file-chip-remove {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  opacity: 0.75;
  font-size: 15px;
  line-height: 1;
}

.file-chip-remove:hover {
  background: rgb(127 127 140 / 14%);
  opacity: 1;
}

.user-bubble-files {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed rgb(255 255 255 / 45%);
  font-size: 12px;
  opacity: 0.92;
  overflow-wrap: anywhere;
}

.clarification-readonly {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.clarification-readonly li {
  margin: 4px 0;
}

/* ---- 顶部用户信息 ---- */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.user-chip-name {
  max-width: 120px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 62%);
  color: #3f3f46;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-chip button {
  width: auto;
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.user-chip button:hover {
  color: var(--danger);
}

@media (max-width: 767px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-card {
    padding: 22px 18px 20px;
  }

  .history-drawer {
    width: min(100%, 100%);
  }
}

/* ---- 赋界 Token V2：最终优先级收口 ---- */
.rail-brand {
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-primary);
}

.icon-rail .rail-nav button::after {
  border-color: var(--border);
  border-radius: 6px;
  background: var(--text-primary);
  color: var(--surface);
  box-shadow: var(--shadow-overlay);
}

.rail-nav .rail-new-chat {
  color: var(--text-tertiary);
}

.rail-nav .rail-new-chat:hover,
.rail-nav button.is-active {
  background: var(--brand-soft);
  color: var(--brand-text);
}

.chat-panel,
.orchestration-panel {
  border-color: var(--border);
  border-radius: 12px;
  box-shadow: none;
}

.messages {
  background: var(--workspace);
}

.welcome-card .message-body,
.composer {
  box-shadow: none;
}

.prompt-grid button,
.composer-row {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}

.composer-row:focus-within {
  border-color: var(--brand-primary);
  background: var(--surface);
}

.composer-count,
.composer-hint {
  color: var(--text-tertiary);
}

.state-pill {
  border-color: var(--brand-border);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-text);
}

.state-pill.is-complete {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #15803d;
}

.privacy-note {
  border-color: #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}

.attachment-summary {
  border-color: var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.auth-screen {
  background: var(--workspace);
}

.auth-card {
  border-color: var(--border);
  box-shadow: none;
}

.history-drawer {
  box-shadow: var(--shadow-overlay);
}

/* ---- 原始 Banner SVG 视觉映射：仅作用于项目介绍页（赋界色板） ---- */
.intro-page {
  --brand-primary: #153b30;
  --brand-hover: #1d5244;
  --brand-active: #0f2b23;
  --brand-soft: #e9efeb;
  --brand-border: rgb(21 59 48 / 18%);
  --brand-text: #153b30;
}

.intro-hero.section-shell {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: max(24px, calc((100% - 1180px) / 2));
  border-radius: 0 0 48px 48px;
  background: linear-gradient(180deg, #e4ebe6 0%, #eef2ea 75.71%, #fff 100%);
}

.intro-page .button-primary {
  background: radial-gradient(85.31% 80.58% at 100% 100%, #b06a45 0%, #925133 48%, #733f28 100%);
}

.intro-page .button-primary:hover {
  background: #733f28;
}

.intro-brand-mark,
.preview-agent-icon {
  background: #153b30;
}

.capability-icon {
  width: 48px;
  height: 48px;
  display: block;
  flex: 0 0 48px;
}

.capability-icon svg {
  width: 48px;
  height: 48px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capability-icon .icon-frame {
  fill: currentColor;
  fill-opacity: 0.05;
  stroke: currentColor;
  stroke-opacity: 0.1;
  stroke-width: 1;
}

.capability-icon-ai svg path:not(.icon-frame) {
  fill: currentColor;
  stroke: none;
}

.capability-icon-network,
.capability-icon-result {
  color: #153b30;
}

.capability-icon-ai {
  color: #925133;
}

.capability-icon-source {
  color: #3f6b58;
}

.capability-icon-document {
  color: #733f28;
}

.capability-card-source {
  background: rgb(233 239 235 / 72%);
}

@media (max-width: 720px) {
  .intro-hero.section-shell {
    padding-inline: 16px;
    border-radius: 0 0 24px 24px;
  }
}

.intro-brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 0;
  background: transparent;
}

.intro-brand-mark img {
  width: 28px;
  height: 28px;
  display: block;
}

.rail-brand img {
  width: 28px;
  height: 28px;
  display: block;
}

.icon-rail .rail-brand {
  background: transparent;
}

.agent-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: var(--brand-soft);
  background-image: none;
  color: var(--brand-primary);
  box-shadow: none;
}

.agent-mark svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.75;
}

.agent-mini {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--brand-border);
  border-radius: 50%;
  outline: 3px solid var(--brand-soft);
  background: var(--surface);
  background-image: none;
  color: var(--brand-primary);
  box-shadow: none;
}

.agent-mini svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

/* ---- 2026-09 确认稿：宽侧栏、单栏会话与轻量交互 ---- */
.rail-brand-name,
.rail-label,
.history-mobile {
  display: none;
}

.orchestration-panel {
  display: none !important;
}

.consultation-layout {
  grid-template-columns: minmax(0, 1fr);
}

.assistant-content {
  min-width: 0;
  flex: 1;
}

.reply-tools {
  min-height: 32px;
  justify-content: flex-start;
  gap: 2px;
  margin: 7px 0 0;
  padding: 0 2px;
  border: 0;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.reply-tool {
  position: relative;
  width: 30px;
  min-height: 30px;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #697181;
}

.reply-tool:hover:not(:disabled) {
  border-color: transparent;
  background: #e9edf3;
  color: #303846;
  transform: none;
}

.reply-tool.is-success {
  border-color: transparent;
  background: #e9f6ef;
  color: #176b4a;
}

.reply-tool svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
}

.reply-tool span {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 15;
  padding: 5px 7px;
  border-radius: 6px;
  background: #252a34;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.reply-tool:hover span,
.reply-tool:focus-visible span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.composer {
  border-top-color: #e5e8ee;
  box-shadow: none;
}

.composer:focus-within {
  border-color: #e5e8ee;
  box-shadow: none;
}

.composer-row,
.composer-row:focus-within {
  border-color: #d9dee7;
  background: #fff;
  box-shadow: none;
}

.composer-row:focus-within {
  border-color: #cbd2dd;
}

.composer textarea {
  padding-right: 11px;
  scrollbar-color: #aab2c0 transparent;
  scrollbar-width: thin;
}

.composer textarea::-webkit-scrollbar {
  width: 8px;
}

.composer textarea::-webkit-scrollbar-track {
  background: transparent;
}

.composer textarea::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #aab2c0;
  background-clip: padding-box;
}

.composer-row .send-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 11px;
  box-shadow: 0 4px 10px rgb(22 96 255 / 18%);
}

.composer-row .send-button:hover:not(:disabled) {
  box-shadow: 0 5px 13px rgb(22 96 255 / 24%);
}

.composer-row .send-button:active:not(:disabled) {
  transform: scale(.97);
}

.composer-row .send-button:disabled {
  box-shadow: none;
}

.composer-row .send-button span {
  display: none;
}

.composer-row .send-button svg {
  width: 19px;
  height: 19px;
}

@media (min-width: 992px) {
  .icon-rail {
    width: 220px;
    height: 100dvh;
    max-height: 100dvh;
    flex-basis: 220px;
    align-items: stretch;
    gap: 14px;
    overflow: hidden;
    padding: 14px 12px;
    background: #fbfcfe;
  }

  .icon-rail .rail-brand {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 8px;
    color: #182033;
  }

  .icon-rail .rail-brand img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  .rail-brand-name {
    display: block;
    color: #182033;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -.01em;
  }

  .icon-rail .rail-nav {
    align-items: stretch;
    gap: 7px;
  }

  .icon-rail .rail-nav button {
    width: 100%;
    height: 42px;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 11px;
    border-radius: 9px;
  }

  .icon-rail .rail-nav button::after {
    display: none;
  }

  .icon-rail .rail-nav button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .rail-label {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .icon-rail .rail-nav .rail-new-chat {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 5px 12px rgb(22 96 255 / 16%);
  }

  .icon-rail .rail-nav .rail-new-chat:hover {
    background: var(--brand-hover);
    color: #fff;
  }

  .rail-history-section {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding-top: 4px;
  }

  .rail-history-list .history-group-label {
    padding: 8px 11px 4px;
    color: #8991a1;
    font-size: 12px;
  }

  .rail-history-list {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    padding: 2px 0 10px;
    scrollbar-color: #c5cad3 transparent;
    scrollbar-width: thin;
  }

  .rail-history-list .history-item {
    position: relative;
    width: 100%;
    height: 40px;
    min-height: 40px;
    flex: 0 0 auto;
    display: block;
    padding: 0 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: left;
  }

  .rail-history-list .history-item:hover {
    border-color: transparent;
    background: #f1f4f8;
  }

  .rail-history-list .history-item.is-current {
    border-color: transparent;
    background: #e9efeb;
  }

  .rail-history-list .history-item.is-current::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 2px;
    border-radius: 999px;
    background: var(--brand-primary);
    content: "";
  }

  .rail-history-list .history-item-title {
    color: #303846;
    font-size: 13px;
    font-weight: 400;
    line-height: 40px;
  }

  .rail-history-list .history-item.is-current .history-item-title {
    color: var(--brand-primary);
    font-weight: 500;
  }

  .rail-history-list .history-item-meta {
    display: none;
  }

  .rail-history-list .empty-agents {
    padding: 8px 11px;
    border: 0;
    background: transparent;
    color: var(--text-tertiary);
    text-align: left;
  }

  .assistant-message,
  .user-message {
    width: min(100%, 1080px);
  }
}

@media (max-width: 991px) {
  .rail-history-section {
    display: none;
  }

  .history-mobile {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text-secondary);
  }

  .history-mobile svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentcolor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }
}

@media (hover: none) {
  .reply-tool span {
    display: none;
  }
}

/* ---- 输入区确认稿：右侧滚动条与独立聚焦高亮 ---- */
.composer-row {
  position: relative;
  display: block;
  min-height: 72px;
  padding: 0;
}

.composer-row:focus-within {
  border-color: #4f83f1;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 13%);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 70px;
  max-height: 144px;
  padding: 12px 14px 50px;
  border-radius: 11px;
}

.composer textarea::-webkit-scrollbar-track {
  margin-block: 8px 52px;
}

.composer-row .attach-button {
  position: absolute;
  bottom: 6px;
  left: 6px;
  z-index: 2;
}

.composer-count {
  position: absolute;
  right: 58px;
  bottom: 17px;
  z-index: 2;
  align-self: auto;
}

.composer-row .send-button {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
}

@media (max-width: 767px) {
  .composer textarea {
    min-height: 76px;
  }
}

/* ============================================================
   北京赋界品牌层（2026-10-08）
   文字标识沿用官网排版：赋界 / FUJIE TECHNOLOGY，无独立图片 Logo。
   本层只新增品牌组件样式并覆盖状态徽标配色，不改动既有布局类名。
   ============================================================ */

.brand-text-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--brand-primary);
  color: var(--surface);
  line-height: 1.1;
}

.brand-text-mark .brand-cn {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-text-mark .brand-en {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.82;
  white-space: nowrap;
}

.intro-brand .brand-text-mark {
  width: auto;
  height: auto;
}

.rail-brand .brand-text-mark {
  width: 34px;
  height: 34px;
  padding: 0;
  align-items: center;
  border-radius: 10px;
}

.rail-brand .brand-text-mark .brand-cn {
  font-size: 13px;
  letter-spacing: 0.06em;
}

.rail-brand-name {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* 登录卡副标题 */
.auth-subtitle {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

/* 真实服务状态徽标（与 /api/status 联动，禁止常驻"服务中"） */
.status-badge[data-status="checking"] {
  background: var(--surface-subtle);
  color: var(--text-tertiary);
}

.status-badge[data-status="checking"] span {
  background: var(--text-disabled);
}

.status-badge[data-status="ok"] {
  background: #ecf3ee;
  color: #1d6a45;
}

.status-badge[data-status="ok"] span {
  background: #2f9e63;
}

.status-badge[data-status="degraded"] {
  background: #fdf3e7;
  color: #96690f;
}

.status-badge[data-status="degraded"] span {
  background: #d9a441;
}

.status-badge[data-status="unavailable"],
.status-badge[data-status="unknown"] {
  background: #fdeceb;
  color: #b42318;
}

.status-badge[data-status="unavailable"] span,
.status-badge[data-status="unknown"] span {
  background: #e0574c;
}

/* 介绍页头部状态 chip */
.service-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.service-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-disabled);
}

.service-status[data-status="ok"] { color: #1d6a45; border-color: #bcd6c6; }
.service-status[data-status="ok"]::before { background: #2f9e63; }
.service-status[data-status="degraded"] { color: #96690f; border-color: #e4cf9f; }
.service-status[data-status="degraded"]::before { background: #d9a441; }
.service-status[data-status="unavailable"],
.service-status[data-status="unknown"] { color: #b42318; border-color: #e7c4c0; }
.service-status[data-status="unavailable"]::before,
.service-status[data-status="unknown"]::before { background: #e0574c; }

@media (max-width: 900px) {
  .service-status {
    display: none;
  }
}

/* 页脚品牌链接 */
.footer-brand-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
}

.footer-brand-link:hover {
  color: var(--brand-text);
  border-bottom-color: var(--brand-text);
}

@media (max-width: 767px) {
  .agent-header {
    gap: 6px;
  }

  .agent-heading h1 {
    font-size: 14px;
    white-space: nowrap;
  }

  .agent-heading .title-line {
    display: block;
  }

  .agent-heading .status-badge {
    display: inline-flex;
    margin-top: 3px;
    padding: 2px 5px;
    font-size: 10px;
  }
}
