:root {
  --sidebar: #f3f3f4;
  --sidebar-active: #e7e7e8;
  --text: #15171c;
  --muted: #8c919a;
  --line: #e4e6eb;
  --blue: #2f66ff;
  --green: #179052;
  --amber: #b96b00;
  --red: #d93025;
  --white: #fff;
  --soft: #f7f8fa;
  --shadow: 0 22px 58px rgba(25, 31, 45, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
}

svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== 壳层：app / sidebar / brand / nav / history / account ===== */

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

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 10px 18px;
  background: var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding-left: 14px;
  margin-bottom: 22px;
  color: #202226;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f66ff 0%, #1d55f0 100%);
  box-shadow: 0 4px 10px rgba(47, 102, 255, .18);
}

.brand-logo svg {
  width: 20px;
  height: 20px;
}

.brand-logo svg path {
  stroke-width: 2;
}

.brand-title {
  color: #202226;
  font-size: 17px;
  font-weight: 800;
  line-height: 24px;
  letter-spacing: -.025em;
}

.primary-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 42px;
  padding: 0 20px;
  color: #202226;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 15px;
  font-weight: 650;
  line-height: 22px;
  text-align: left;
  transition: background-color .16s ease, color .16s ease;
}

.nav-item.active {
  background: var(--sidebar-active);
}

.nav-item:not(.active):hover {
  background: rgba(0, 0, 0, .035);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #2b2f36;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

.history {
  flex: 1;
  min-height: 0;
  margin-top: 38px;
  padding: 0 12px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%);
}

.history::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.history-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 2px 2px 4px 6px;
  background: var(--sidebar);
}

.history-title,
.history-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9a9fa8;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  line-height: 22px;
  transition: background-color .16s ease, color .16s ease;
}

.history-title {
  gap: 6px;
  padding: 0;
}

.history-search {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.history-title:hover,
.history-search:hover {
  color: #6f7480;
  background: rgba(0, 0, 0, .045);
}

.history-title svg,
.history-search svg {
  width: 14px;
  height: 14px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  min-height: 32px;
  padding: 5px 6px;
  color: #202226;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 14px;
  line-height: 22px;
  transition: background-color .16s ease, color .16s ease;
}

.history-item.is-current {
  background: rgba(47, 102, 255, .08);
}

.history-item:hover {
  background: rgba(0, 0, 0, .04);
}

.history-item span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.history-item time {
  color: #a2a6ad;
  font-weight: 400;
}

.account-wrap {
  position: relative;
  margin-top: auto;
  padding: 8px 12px 0;
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition: background-color .16s ease;
}

.account:hover,
.account.is-open {
  background: rgba(0, 0, 0, .045);
}

.avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe8df;
}

.account-text {
  flex: 1;
  min-width: 0;
}

.account strong {
  display: block;
  font-size: 14px;
}

.account span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-chevron {
  width: 16px;
  height: 16px;
  color: #a2a6ad;
}

.account-menu {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 10px);
  z-index: 20;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, .14),
    0 0 1px rgba(0, 0, 0, .18);
}

.account-menu[hidden] {
  display: none;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(0, 0, 0, .88);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  transition: background-color .16s ease, color .16s ease;
}

.account-menu-item:hover {
  background: rgba(0, 0, 0, .055);
}

.account-menu-item.logout,
.account-menu-item.logout svg {
  color: var(--red);
}

/* ===== 视图容器（壳层 main + 三个视图显隐） ===== */

.main {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #fff;
}

.view[hidden] {
  display: none;
}

.view {
  min-height: 100vh;
}

/* ===== Chatbot 视图（hero / intent / conversation / composer） ===== */

.view-chatbot.chat-mode {
  overflow: hidden;
}

.hero {
  width: min(980px, calc(100vw - 360px));
  margin: 0 auto;
  padding-top: clamp(112px, 19vh, 210px);
}

.view-chatbot.chat-mode .hero {
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100vw - 360px));
  height: 100vh;
  padding-top: 0;
}

.view-chatbot.chat-mode .hero h1,
.view-chatbot.chat-mode .hero > p {
  display: none;
}

.hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.055em;
}

.hero p {
  margin: 12px 0 clamp(36px, 7vh, 60px);
  color: #a6abb4;
  font-size: 17px;
  font-weight: 600;
}

.intent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 28px;
  margin-bottom: 20px;
  transition: opacity .18s ease, transform .18s ease;
}

.intent-row.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.view-chatbot.chat-mode .intent-row {
  order: 2;
  flex: 0 0 auto;
  margin: 0 0 12px;
}

.view-chatbot.chat-mode .intent-row.is-hidden {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.intent-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
  color: rgba(0, 0, 0, .88);
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font: 500 16px/24px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  transition: background-color .16s ease, color .16s ease;
}

.intent-pill svg {
  width: 20px;
  height: 20px;
  color: rgba(0, 0, 0, .82);
}

.intent-pill:hover {
  color: rgba(0, 0, 0, .95);
  background: rgba(0, 0, 0, .045);
}

.intent-pill:hover svg {
  color: rgba(0, 0, 0, .95);
}

.more-intent-wrap {
  position: relative;
  display: inline-flex;
}

.more-intent-btn.is-open,
.more-intent-btn:hover {
  background: rgba(0, 0, 0, .055);
}

.more-intent-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  gap: 2px;
  width: 304px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, .12),
    0 0 1px rgba(0, 0, 0, .18);
}

.more-intent-popover[hidden] {
  display: none;
}

.more-intent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(0, 0, 0, .90);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  text-align: left;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}

.more-intent-item:hover {
  background: rgba(0, 0, 0, .055);
}

.more-intent-item svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: rgba(0, 0, 0, .86);
}

.conversation {
  order: 1;
  flex: 1;
  min-height: 0;
  padding: 46px 0 24px;
  overflow-y: auto;
  scrollbar-width: none;
}

.conversation::-webkit-scrollbar {
  width: 0;
}

.message {
  display: flex;
  margin-bottom: 28px;
}

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

.message-bubble {
  max-width: 72%;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  background: #f3f4f6;
  color: rgba(0, 0, 0, .86);
  font-size: 15px;
  line-height: 24px;
}

.ai-message {
  align-items: flex-start;
  gap: 12px;
}

.ai-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 8px;
  background: #eef3ff;
  color: #2f66ff;
  font-size: 12px;
  font-weight: 800;
}

.answer-card {
  width: min(820px, 100%);
  color: #111;
}

.answer-kicker {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(0, 0, 0, .42);
  font-size: 14px;
  font-weight: 600;
}

.answer-contract {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.answer-contract span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(47, 102, 255, .18);
  border-radius: 999px;
  background: rgba(47, 102, 255, .06);
  color: #2458e8;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
}

.answer-card[data-response-type="knowledge_answer"] .answer-contract span {
  border-color: rgba(23, 144, 82, .18);
  background: rgba(23, 144, 82, .07);
  color: #147a47;
}

.answer-card[data-response-type="opportunity_insight"] .answer-contract span {
  border-color: rgba(180, 93, 0, .20);
  background: rgba(229, 138, 0, .09);
  color: #a85f00;
}

.answer-card[data-response-type="customer_research_report"] .answer-contract span {
  border-color: rgba(15, 118, 110, .20);
  background: rgba(15, 118, 110, .08);
  color: #0f766e;
}

.answer-card h2 {
  margin: 14px 0 18px;
  color: #0b0b0d;
  font-size: 28px;
  line-height: 38px;
  font-weight: 750;
  letter-spacing: -.025em;
}

.answer-card .answer-summary {
  margin: 0 0 28px;
  color: #16181d;
  font-size: 18px;
  line-height: 32px;
  font-weight: 400;
}

.answer-card .answer-summary strong {
  font-weight: 750;
}

.answer-section {
  margin-top: 30px;
}

.answer-section h3 {
  margin: 0 0 16px;
  color: #0b0b0d;
  font-size: 22px;
  line-height: 32px;
  font-weight: 750;
  letter-spacing: -.015em;
}

.project-list {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 16px;
  background: #fff;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px 140px;
  gap: 16px;
  align-items: center;
  min-height: 82px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.project-row:last-child {
  border-bottom: 0;
}

.project-row strong {
  display: block;
  overflow: hidden;
  color: #16181d;
  font-size: 17px;
  line-height: 26px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-row span:not(.project-tag) {
  display: block;
  margin-top: 4px;
  color: rgba(0, 0, 0, .45);
  font-size: 15px;
  line-height: 22px;
}

.project-row time {
  color: rgba(0, 0, 0, .55);
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
  text-align: right;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: fit-content;
  min-width: 76px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.project-tag.doing {
  background: rgba(47, 102, 255, .09);
  color: #2f66ff;
}

.project-tag.done {
  background: rgba(22, 166, 90, .10);
  color: #179052;
}

.project-tag.blocked {
  background: rgba(229, 138, 0, .12);
  color: #b96b00;
}

.next-actions {
  margin: 0;
  padding-left: 24px;
  color: #16181d;
  font-size: 18px;
  line-height: 32px;
  font-weight: 400;
}

.next-actions li + li {
  margin-top: 6px;
}

.research-report {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.research-report-head {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: #fafafa;
  overflow: hidden;
}

.research-report-head div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid rgba(0, 0, 0, .08);
}

.research-report-head div:last-child {
  border-right: 0;
}

.research-report-head span,
.executive-summary span,
.snapshot-card span {
  display: block;
  color: rgba(0, 0, 0, .48);
  font-size: 13px;
  line-height: 20px;
  font-weight: 650;
}

.research-report-head strong,
.snapshot-card strong {
  display: block;
  margin-top: 4px;
  color: #111;
  font-size: 16px;
  line-height: 24px;
  font-weight: 750;
}

.executive-summary {
  padding: 18px 20px;
  border-left: 3px solid #1763ff;
  border-radius: 10px;
  background: rgba(23, 99, 255, .05);
}

.executive-summary p {
  margin: 8px 0 0;
  color: #111;
  font-size: 17px;
  line-height: 30px;
}

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

.snapshot-card {
  min-width: 0;
  min-height: 108px;
  padding: 14px 14px 16px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: #fff;
}

.snapshot-card strong {
  overflow-wrap: anywhere;
}

.report-accordion {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  overflow: hidden;
}

.report-accordion details {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
}

.report-accordion details:last-child {
  border-bottom: 0;
}

.report-accordion summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  color: #111;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
  font-weight: 750;
}

.report-accordion p {
  margin: 0;
  padding: 0 16px 16px;
  color: rgba(0, 0, 0, .70);
  font-size: 15px;
  line-height: 27px;
}

.evidence-map,
.verification-panel {
  padding: 18px 20px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: #fff;
}

.evidence-map h3,
.verification-panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 26px;
  font-weight: 750;
}

.evidence-row {
  display: grid;
  grid-template-columns: 150px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.evidence-row strong {
  color: #111;
  font-size: 15px;
  line-height: 23px;
  font-weight: 750;
}

.evidence-row span {
  display: inline-flex;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(15, 118, 110, .08);
  color: #0f766e;
  font-size: 13px;
  line-height: 24px;
  font-weight: 700;
}

.evidence-row p {
  margin: 0;
  color: rgba(0, 0, 0, .62);
  font-size: 15px;
  line-height: 24px;
}

.verification-panel ul {
  margin: 0;
  padding-left: 21px;
  color: #16181d;
  font-size: 16px;
  line-height: 29px;
}

.verification-panel li + li {
  margin-top: 4px;
}

.answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.answer-meta span {
  display: inline;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(0, 0, 0, .42);
  font-size: 14px;
  line-height: 22px;
}

.answer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
}

.answer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(0, 0, 0, .50);
  font-size: 13px;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.answer-action svg {
  width: 17px;
  height: 17px;
}

.answer-action:hover,
.answer-action.is-active {
  background: rgba(0, 0, 0, .055);
  color: rgba(0, 0, 0, .82);
}

.answer-action:active {
  transform: scale(.96);
}

.answer-action[data-action="like"].is-active {
  background: rgba(23, 99, 255, .10);
  color: #1763ff;
}

.answer-action[data-action="dislike"].is-active {
  background: rgba(217, 48, 37, .09);
  color: #d93025;
}

.answer-action.is-copied {
  background: rgba(22, 166, 90, .10);
  color: #179052;
}

.research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.business-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, .13);
  border-radius: 10px;
  background: #fff;
  color: rgba(0, 0, 0, .82);
  font-size: 14px;
  font-weight: 650;
  line-height: 22px;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.business-action svg {
  width: 17px;
  height: 17px;
}

.business-action:hover {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .18);
}

.business-action.primary {
  border-color: #1763ff;
  background: #1763ff;
  color: #fff;
}

.business-action.primary:hover {
  border-color: #0f56ef;
  background: #0f56ef;
}

.business-action.is-done,
.business-action.primary.is-done {
  border-color: rgba(22, 166, 90, .22);
  background: rgba(22, 166, 90, .10);
  color: #179052;
}

.business-action:active {
  transform: scale(.98);
}

.composer {
  order: 3;
  position: relative;
  min-height: 140px;
  max-height: 300px;
  padding: 12px 12px 48px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 10px rgba(0, 0, 0, .04), 0 0 1px rgba(0, 0, 0, .12);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.view-chatbot.chat-mode .composer {
  flex: 0 0 auto;
  min-height: 118px;
  margin: 0 0 24px;
  box-shadow:
    0 14px 40px rgba(25, 31, 45, .08),
    0 0 1px rgba(0, 0, 0, .16);
}

.composer:focus-within {
  border-color: rgba(47, 102, 255, .45);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, .05),
    0 0 0 4px rgba(47, 102, 255, .10),
    0 0 28px rgba(47, 102, 255, .18);
}

.composer textarea {
  width: 100%;
  min-height: 56px;
  padding: 0;
  color: rgba(0, 0, 0, .85);
  border: 0;
  outline: 0;
  resize: none;
  font: 400 16px/24px "system-ui", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: normal;
}

.composer textarea::placeholder {
  color: rgba(0, 0, 0, .3);
  font: 400 16px/24px "system-ui", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.composer-actions {
  position: absolute;
  left: 20px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.add-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #1e2228;
  border: 0;
  background: transparent;
}

.add-btn svg {
  width: 24px;
  height: 24px;
}

.action-divider {
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, .12);
}

.selected-intent {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  color: #1763ff;
  border: 0;
  border-radius: 17px;
  background: rgba(47, 102, 255, .08);
  font: 500 15px/22px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  transition: background-color .16s ease;
}

.selected-intent[hidden],
.action-divider[hidden] {
  display: none;
}

.selected-intent:hover {
  background: rgba(47, 102, 255, .12);
}

.selected-intent-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #1763ff;
}

.selected-intent-icon svg {
  width: 18px;
  height: 18px;
}

.selected-intent-close {
  width: 15px;
  height: 15px;
  color: rgba(23, 99, 255, .62);
}

.selected-intent-close path {
  stroke-width: 2;
}

.send-btn {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: #c8cdd5;
  transition: background-color .16s ease, transform .16s ease;
}

.send-btn:not(:disabled) {
  background: #1763ff;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(23, 99, 255, .20);
}

.send-btn:not(:disabled):hover {
  background: #0f56ef;
}

.send-btn:not(:disabled):active {
  transform: scale(.96);
}

.send-btn:disabled {
  background: #c8cdd5;
  cursor: not-allowed;
  box-shadow: none;
}

.send-btn svg {
  width: 21px;
  height: 21px;
}

.send-btn svg path {
  stroke-width: 2.2;
}

/* ===== 方案设计视图（workspace / form / plan / outline） ===== */

.workspace {
  width: min(1180px, calc(100vw - 340px));
  margin: 0 auto;
  padding: 48px 0 56px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.page-head h1 {
  margin: 0;
  font-size: 38px;
  line-height: 46px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.page-head p,
.section-title p {
  margin: 8px 0 0;
  color: #8a9099;
  font-size: 15px;
  line-height: 24px;
  font-weight: 600;
}

.head-actions,
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  transition: background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.primary-btn {
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(47, 102, 255, .20);
}

.primary-btn:hover {
  background: #235af0;
}

.secondary-btn,
.ghost-btn {
  padding: 0 14px;
  color: #22262d;
  background: #f2f4f7;
}

.secondary-btn:hover,
.ghost-btn:hover {
  background: #e9ecf1;
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active {
  transform: scale(.98);
}

.icon-btn {
  width: 34px;
  height: 34px;
  color: #666d78;
  background: transparent;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, .045);
}

.overview-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.metric-panel {
  min-height: 106px;
  padding: 18px 20px;
  border-right: 1px solid rgba(0, 0, 0, .08);
}

.metric-panel:last-child {
  border-right: 0;
}

.metric-panel span,
.field span {
  display: block;
  color: rgba(0, 0, 0, .50);
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
}

.metric-panel strong {
  display: block;
  margin-top: 7px;
  color: #111;
  font-size: 30px;
  line-height: 36px;
  font-weight: 800;
  letter-spacing: -.025em;
}

.metric-panel em {
  display: block;
  margin-top: 5px;
  color: #8a9099;
  font-size: 13px;
  line-height: 20px;
  font-style: normal;
}

.metric-panel.accent strong {
  color: var(--blue);
  font-size: 22px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.work-surface,
.side-panel,
.draft-section {
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(25, 31, 45, .06);
}

.work-surface {
  padding: 22px;
}

.side-panel {
  overflow: hidden;
}

.panel-block {
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.panel-block:last-child {
  border-bottom: 0;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title.compact {
  align-items: center;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  color: #121419;
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -.018em;
}

.section-title.compact h2 {
  font-size: 18px;
}

.segmented {
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  padding: 3px;
  border-radius: 12px;
  background: #f1f3f6;
}

.segment {
  min-width: 76px;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6f7681;
  font-size: 14px;
  font-weight: 800;
}

.segment.active {
  color: #111;
  background: #fff;
  box-shadow: 0 2px 8px rgba(25, 31, 45, .10);
}

.mode-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  min-height: 116px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 16px;
  background: #f6f8fc;
}

.mode-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--blue);
  background: rgba(47, 102, 255, .09);
}

.mode-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 800;
}

.mode-card p {
  margin: 6px 0 0;
  color: #5d6572;
  font-size: 14px;
  line-height: 23px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.wide {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: #1b1f27;
  font-size: 15px;
  line-height: 23px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.field input,
.field select {
  height: 44px;
  padding: 0 12px;
}

.field textarea {
  min-height: 88px;
  padding: 11px 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(47, 102, 255, .48);
  box-shadow: 0 0 0 4px rgba(47, 102, 255, .10);
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, .07);
}

.source-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(0, 0, 0, .72);
  font-size: 14px;
  font-weight: 650;
}

.source-item.active {
  color: var(--blue);
  background: rgba(47, 102, 255, .08);
}

.source-item:hover {
  background: rgba(0, 0, 0, .045);
}

.source-item svg {
  width: 18px;
  height: 18px;
}

.action-row {
  justify-content: flex-end;
  margin-top: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(47, 102, 255, .08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.status-pill.doing {
  background: rgba(22, 166, 90, .10);
  color: var(--green);
}

.plan-progress {
  position: relative;
  padding-left: 8px;
}

.progress-line {
  position: absolute;
  left: 15px;
  top: 12px;
  width: 2px;
  height: calc(100% - 24px);
  background: #e4e7ec;
}

.progress-line::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: var(--progress);
  background: var(--blue);
}

.plan-progress ol {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-progress li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8a9099;
  font-size: 14px;
  font-weight: 650;
}

.plan-progress li::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 3px solid #e4e7ec;
  border-radius: 50%;
  background: #fff;
}

.plan-progress li.done::before,
.plan-progress li.active::before {
  border-color: var(--blue);
}

.plan-progress li.done::before {
  background: var(--blue);
}

.plan-progress li.active {
  color: #1b1f27;
}

.issue-list {
  display: grid;
  gap: 10px;
}

.issue {
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: #fff;
}

.issue.high {
  border-color: rgba(217, 48, 37, .18);
  background: rgba(217, 48, 37, .035);
}

.issue strong {
  display: block;
  color: #191d24;
  font-size: 14px;
  line-height: 21px;
}

.issue.high strong {
  color: var(--red);
}

.issue span {
  display: block;
  margin-top: 4px;
  color: #737b87;
  font-size: 13px;
  line-height: 20px;
}

.draft-section {
  margin-top: 22px;
  padding: 22px;
}

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

.outline-item {
  min-height: 154px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 14px;
  background: #fff;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.outline-item:hover,
.outline-item.active {
  border-color: rgba(47, 102, 255, .30);
  background: #f7f9ff;
}

.outline-item:hover {
  transform: translateY(-1px);
}

.outline-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 24px;
  border-radius: 12px;
  background: #f0f2f6;
  color: #6f7681;
  font-size: 12px;
  font-weight: 800;
}

.outline-item.active span {
  color: #fff;
  background: var(--blue);
}

.outline-item strong {
  display: block;
  margin-top: 14px;
  color: #15171c;
  font-size: 16px;
  line-height: 23px;
}

.outline-item p {
  margin: 8px 0 0;
  color: #707884;
  font-size: 13px;
  line-height: 21px;
}

/* ===== 报告编制占位页 ===== */

.placeholder-block {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 56px 32px;
  border: 1px dashed rgba(0, 0, 0, .16);
  border-radius: 18px;
  background: var(--soft);
  text-align: center;
}

.placeholder-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  color: var(--blue);
  background: rgba(47, 102, 255, .09);
}

.placeholder-icon svg {
  width: 28px;
  height: 28px;
}

.placeholder-block h2 {
  margin: 6px 0 0;
  color: #15171c;
  font-size: 22px;
  line-height: 30px;
  font-weight: 800;
}

.placeholder-block p {
  margin: 0;
  max-width: 620px;
  color: #5d6572;
  font-size: 15px;
  line-height: 26px;
}

.placeholder-note {
  margin-top: 4px !important;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(217, 48, 37, .06);
  color: var(--red) !important;
  font-size: 14px !important;
  font-weight: 650;
}

/* ===== 反馈弹窗（全局） ===== */

.feedback-modal[hidden] {
  display: none;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .46);
}

.feedback-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 48px));
  padding: 30px 32px 32px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .22);
}

.feedback-dialog h2 {
  margin: 0 40px 24px 0;
  color: rgba(0, 0, 0, .86);
  font-size: 22px;
  line-height: 30px;
  font-weight: 760;
  letter-spacing: -.02em;
}

.feedback-close {
  position: absolute;
  top: 26px;
  right: 28px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(0, 0, 0, .72);
}

.feedback-close:hover {
  background: rgba(0, 0, 0, .055);
}

.feedback-box {
  position: relative;
  height: 190px;
  border-radius: 8px;
  background: #f5f5f6;
}

.feedback-box textarea {
  width: 100%;
  height: 100%;
  padding: 22px 24px 46px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: rgba(0, 0, 0, .82);
  font-size: 16px;
  line-height: 24px;
}

.feedback-box textarea::placeholder {
  color: rgba(0, 0, 0, .26);
  font-weight: 600;
}

#feedbackCount {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: rgba(0, 0, 0, .38);
  font-size: 14px;
}

.feedback-submit {
  display: block;
  width: 104px;
  height: 48px;
  margin: 28px 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: #94c9ff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.feedback-submit:disabled {
  opacity: .72;
  cursor: not-allowed;
}

/* ===== 响应式 ===== */

@media (max-width: 1200px) {
  .hero {
    width: min(900px, calc(100vw - 340px));
    padding-top: clamp(72px, 14vh, 120px);
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero p {
    margin-bottom: 36px;
  }

  .intent-pill {
    height: 32px;
    font-size: 16px;
  }

  .composer {
    min-height: 168px;
  }

  .view-chatbot.chat-mode .composer {
    min-height: 118px;
  }

  .business-action {
    flex: 1 1 180px;
  }

  .research-report-head,
  .profile-snapshot,
  .evidence-row {
    grid-template-columns: 1fr;
  }

  .research-report-head div {
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
  }

  .research-report-head div:last-child {
    border-bottom: 0;
  }

  .snapshot-card {
    min-height: auto;
  }

  .evidence-row span {
    justify-self: start;
  }
}

@media (max-width: 1180px) {
  .app {
    grid-template-columns: 240px minmax(680px, 1fr);
  }

  .workspace {
    width: calc(100vw - 290px);
  }

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

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

@media (max-width: 860px) {
  .app {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    min-height: auto;
  }

  .history {
    display: none;
  }

  .hero {
    width: min(100% - 28px, 720px);
    padding-top: 28px;
  }

  .view-chatbot.chat-mode .hero {
    height: auto;
    min-height: 100vh;
  }

  .workspace {
    width: min(100% - 28px, 720px);
    padding: 28px 0 40px;
  }

  .page-head,
  .section-title {
    display: grid;
  }

  .head-actions,
  .action-row {
    justify-content: stretch;
  }

  .head-actions > *,
  .action-row > * {
    flex: 1;
  }

  .overview-band,
  .intake-form,
  .outline-grid {
    grid-template-columns: 1fr;
  }

  .metric-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
  }

  .metric-panel:last-child {
    border-bottom: 0;
  }
}
