:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --panel: #ffffff;
  --ink: #20231f;
  --muted: #697069;
  --line: #dfe4dc;
  --green: #24745a;
  --green-dark: #16563f;
  --amber: #d5892d;
  --blue: #376fa3;
  --soft-green: #e9f4ee;
  --soft-amber: #fff3df;
  --shadow: 0 16px 38px rgba(31, 45, 35, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(246, 247, 243, 0.92)),
    var(--bg);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
}

button,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
}

.step-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  padding: 9px 14px;
  font-size: 14px;
}

.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.side-panel,
.chat-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.side-panel {
  position: sticky;
  top: 18px;
  padding: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.progress-label strong {
  color: var(--ink);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebeee8;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 180ms ease;
}

.profile-summary {
  margin-top: 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.summary-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 800;
}

.chat-panel {
  padding: 22px;
}

.intro-card {
  padding: 18px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--soft-green);
  line-height: 1.8;
}

.intro-card p {
  margin: 0 0 8px;
}

.intro-card p:last-child {
  margin-bottom: 0;
}

.profile-form {
  margin-top: 20px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

label span,
.note-field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 14px;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

select {
  height: 46px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.6;
}

.question-card {
  display: grid;
  gap: 16px;
}

.question-kicker {
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: 0;
}

.options {
  display: grid;
  gap: 10px;
}

.option-button {
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px 16px;
  text-align: left;
  line-height: 1.55;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.option-button:hover {
  border-color: rgba(36, 116, 90, 0.45);
  transform: translateY(-1px);
}

.option-button.selected {
  border-color: var(--green);
  background: var(--soft-green);
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 50%;
  background: #eef1eb;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--green);
  color: #fff;
}

.primary-button:hover {
  background: var(--green-dark);
}

.primary-button:disabled {
  background: #b8c3b9;
  cursor: not-allowed;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.report {
  display: grid;
  gap: 16px;
}

.report-header {
  padding: 22px;
  border-radius: 8px;
  background: var(--soft-amber);
}

.report-header p {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.report-header h2 {
  color: #573a12;
}

.report-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1.8;
}

.report-section h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.report-section p {
  margin: 0 0 10px;
}

.report-section p:last-child {
  margin-bottom: 0;
}

.cta-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: var(--soft-green);
}

.cta-block h3 {
  margin: 0 0 6px;
}

.cta-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 31, 27, 0.45);
}

.modal-panel {
  position: relative;
  width: min(420px, 100%);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  box-shadow: var(--shadow);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.wechat-qr {
  display: block;
  width: min(280px, 100%);
  height: auto;
  margin: 18px auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.modal-tip {
  color: var(--muted);
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

@media (max-width: 840px) {
  .app-shell {
    width: min(100% - 24px, 1180px);
    padding: 14px 0;
  }

  .topbar,
  .actions,
  .cta-block {
    align-items: stretch;
    flex-direction: column;
  }

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

  .side-panel {
    position: static;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 21px;
  }
}
