:root {
  color-scheme: light;
  --ink: #1e302d;
  --muted: #65736e;
  --line: #dce5df;
  --accent: #266e5d;
  --accent-deep: #1d594b;
  --tint: #eaf3ee;
  --warm: #f4eee6;
  --error: #b33c35;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f7f9f7; }
button, select, input { font: inherit; }
button { cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 318px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 660px;
  display: flex;
  flex-direction: column;
  padding: 30px 29px 22px;
  border-right: 1px solid #d6dfd8;
  background: #edf2ec;
  overflow: hidden;
}
.sidebar-top { display: flex; align-items: center; gap: 11px; }
.brand-name { font-size: 14px; font-weight: 700; color: #314c40; white-space: nowrap; }
.brand-mark { display: flex; gap: 3px; width: 27px; height: 26px; align-items: flex-end; }
.brand-mark span { display: block; width: 7px; background: var(--accent); border-radius: 1px 1px 0 0; transform: skewY(-12deg); }
.brand-mark span:nth-child(1) { height: 13px; }
.brand-mark span:nth-child(2) { height: 21px; background: #e29d70; }
.brand-mark span:nth-child(3) { height: 17px; }
.sidebar-copy { margin-top: 60px; }
.eyebrow { margin: 0 0 15px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--accent); }
.sidebar h1 { margin: 0; font-size: 30px; line-height: 1.32; font-weight: 750; }
.sidebar-copy > p:last-child { margin: 18px 0 0; font-size: 13px; line-height: 1.8; color: #556b5f; }
.sidebar-photo { margin-top: auto; height: 146px; overflow: hidden; border-radius: 4px; }
.sidebar-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 56%; }
.sidebar-footer { margin: 14px 0 0; color: #65796d; font-size: 11px; }

.main { min-width: 0; background: #fff; }
.topbar { height: 64px; padding: 0 46px; border-bottom: 1px solid #edf0ed; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #496157; font-size: 12px; font-weight: 650; }
.topbar-meta { color: #8c9b91; font-weight: 500; }
.content-wrap { max-width: 850px; margin: 0 auto; padding: 37px 48px 70px; }
.progress-region { margin-bottom: 37px; }
.progress-labels { display: flex; justify-content: space-between; gap: 10px; color: #89978f; font-size: 12px; }
.progress-labels .current { color: var(--accent-deep); font-weight: 750; }
.progress-simple { display: flex; justify-content: space-between; color: #7b8d80; font-size: 12px; }
.progress-simple strong { color: var(--accent-deep); }
.progress-track { height: 4px; margin-top: 13px; background: #e7eee9; overflow: hidden; border-radius: 4px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .25s ease; }
.progress-0 { width: 0; }
.progress-1 { width: 33.33%; }
.progress-2 { width: 66.66%; }
.step-kicker { margin: 0 0 9px; color: var(--accent); font-size: 12px; font-weight: 750; }
.step-title { margin: 0; font-size: 28px; line-height: 1.36; font-weight: 750; }
.step-intro { max-width: 680px; margin: 12px 0 27px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.notice { padding: 16px 18px; border-left: 3px solid #d49a6b; background: #f8f4ed; color: #596156; font-size: 13px; line-height: 1.75; }
.notice strong { color: #314a3c; }
.block-title { margin: 32px 0 18px; font-size: 17px; line-height: 1.5; }
.question-plain, .scale-question { min-width: 0; margin: 0; border: 0; padding: 0; }
.question-plain + .question-plain { margin-top: 26px; }
.question-plain legend, .scale-question legend { width: 100%; padding: 0; font-size: 14px; font-weight: 650; line-height: 1.65; }
.required { margin-left: 4px; color: #bc6443; }
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.choice-pill { position: relative; }
.choice-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-pill span { display: block; min-width: 100px; padding: 10px 15px; border: 1px solid #cddbd1; border-radius: 4px; text-align: center; font-size: 13px; color: #4b6355; background: #fff; transition: background .15s ease, border-color .15s ease; }
.choice-pill input:checked + span { border-color: var(--accent); background: var(--tint); color: var(--accent-deep); font-weight: 700; }
.choice-pill input:focus-visible + span, .scale-option input:focus-visible + span, .priority-option input:focus-visible + span { outline: 3px solid #e6ab75; outline-offset: 2px; }
.select-wrap { position: relative; width: min(100%, 300px); margin-top: 11px; }
.select-wrap select { width: 100%; appearance: none; border: 1px solid #cddbd1; background: white; color: var(--ink); border-radius: 4px; padding: 12px 35px 12px 13px; font-size: 13px; }
.select-wrap::after { content: ""; position: absolute; right: 16px; top: 15px; width: 7px; height: 7px; border-right: 1.5px solid #4f665a; border-bottom: 1.5px solid #4f665a; transform: rotate(45deg); pointer-events: none; }
.consent { display: flex; align-items: flex-start; gap: 11px; margin-top: 33px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.75; color: #4a5d52; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.micro-note { margin: 8px 0 0 29px; font-size: 11px; line-height: 1.6; color: #829087; }
.platform-intro { display: flex; gap: 14px; padding: 17px 18px; border: 1px solid #d6e4d9; border-radius: 4px; background: #f4f8f4; }
.platform-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 5px; color: white; background: var(--accent); font-size: 22px; font-weight: 300; }
.platform-intro strong { display: block; margin: 2px 0 4px; font-size: 14px; }
.platform-intro p { margin: 0; color: #5b7062; font-size: 12px; line-height: 1.75; }
.form-section .platform-intro + .group { margin-top: 31px; }

.scenario { margin: 23px 0 30px; border: 1px solid #d9e4dd; border-radius: 5px; overflow: hidden; background: #fbfcfa; }
.scenario-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; background: #edf4ee; border-bottom: 1px solid #d9e4dd; color: #3f5d4a; font-size: 12px; font-weight: 700; }
.scenario-head span:last-child { color: #798e7b; font-size: 11px; font-weight: 500; }
.ai-notice.prominent { padding: 13px 18px; background: #e5eee8; border-bottom: 1px solid #ccddcf; color: #1d594b; font-size: 15px; font-weight: 750; }
.ai-notice.subtle { padding: 9px 18px 13px; color: #859088; font-size: 10px; text-align: right; }
.message { display: flex; gap: 11px; padding: 18px; }
.message + .message { border-top: 1px solid #e6ede7; }
.avatar { display: grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 4px; background: #dfece2; color: #446951; font-size: 11px; font-weight: 750; }
.message.ai .avatar { background: #e8ddd2; color: #816043; }
.message p { margin: 1px 0 0; font-size: 13px; line-height: 1.85; color: #2f4239; }
.message .answer { min-width: 0; }
.message .answer p + p { margin-top: 12px; }
.message .answer .risk-warning { color: #405449; }
.source-detail { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 18px; border-top: 1px solid #e3ebe4; background: #f7faf7; font-size: 11px; line-height: 1.6; color: #536958; }
.source-detail > span:first-child { color: #839185; }
.source-detail a { color: #216b5b; text-underline-offset: 2px; overflow-wrap: anywhere; }
.scenario-footnote { color: #829287; font-size: 12px; line-height: 1.7; }
.scale-hint { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 8px; color: #839187; font-size: 11px; }
.group { margin-top: 31px; }
.group:first-of-type { margin-top: 0; }
.group-heading { padding-bottom: 12px; border-bottom: 1px solid #d9e4dc; }
.group-heading h3 { margin: 0; font-size: 17px; }
.group-heading p { margin: 6px 0 0; color: #7b8980; font-size: 12px; }
.scale-question { display: block; padding: 16px 0; border-bottom: 1px solid #eef1ee; }
.scale-question legend { float: none; }
.scale-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; max-width: 360px; margin-top: 11px; }
.scale-option { position: relative; display: block; }
.scale-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale-option span { width: 100%; height: 37px; display: grid; place-items: center; border: 1px solid #d8e2d9; border-radius: 4px; background: white; color: #566a5c; font-size: 12px; transition: all .15s ease; }
.scale-option input:checked + span { border-color: var(--accent); background: var(--accent); color: white; font-weight: 750; }
.scale-option:hover span { border-color: #719784; }
.scale-question.missing legend, .question-plain.missing legend { color: var(--error); }
.scale-ends { display: flex; justify-content: space-between; margin: 7px 0 0; max-width: 360px; color: #88968d; font-size: 10px; }
.priority-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.priority-question { margin-top: 17px; }
.priority-option { display: block; position: relative; }
.priority-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.priority-option span { min-height: 49px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid #d5e0d6; border-radius: 4px; background: white; color: #495d51; font-size: 13px; line-height: 1.5; }
.priority-option span::before { content: ""; width: 16px; height: 16px; flex: none; border: 1.5px solid #9eb2a3; border-radius: 3px; }
.priority-option input:checked + span { border-color: var(--accent); background: var(--tint); color: var(--accent-deep); font-weight: 650; }
.priority-option input:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--tint); }
.priority-option input:disabled + span { opacity: .5; cursor: not-allowed; }
.priority-caption { margin: 9px 0 0; color: #879389; font-size: 11px; }
.error-box { margin: 24px 0 0; padding: 12px 14px; color: #8b2e29; border: 1px solid #efc8c2; border-radius: 4px; background: #fff7f5; font-size: 13px; line-height: 1.6; }
.action-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.action-bar:first-child { border-top: 0; }
.button { min-height: 43px; padding: 10px 21px; border-radius: 4px; border: 1px solid var(--accent); background: var(--accent); color: white; font-size: 13px; font-weight: 700; }
.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.button:disabled { opacity: .55; cursor: wait; }
.button.secondary { background: white; color: var(--accent-deep); border-color: #bfcfc3; }
.button.secondary:hover { background: #f2f7f3; }
.action-meta { margin-right: auto; color: #8b988e; font-size: 11px; }
.completion { margin-top: 60px; max-width: 570px; }
.completion-mark { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 50%; background: var(--tint); color: var(--accent); font-size: 25px; font-weight: 700; }
.completion h2 { margin: 23px 0 10px; font-size: 28px; }
.completion p { margin: 0 0 15px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.receipt { margin-top: 25px; padding: 16px 18px; background: #f2f6f2; border-left: 3px solid var(--accent); color: #3c5c4b; font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 244px minmax(0, 1fr); }
  .sidebar { padding: 24px 21px 20px; }
  .sidebar-copy { margin-top: 52px; }
  .sidebar h1 { font-size: 25px; }
  .content-wrap { padding: 34px 31px 65px; }
  .topbar { padding: 0 31px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; min-height: 0; height: auto; display: grid; grid-template-columns: 1fr 88px; gap: 12px; padding: 12px 18px; border-right: 0; border-bottom: 1px solid #dce6dd; }
  .sidebar-top { align-self: center; }
  .sidebar-copy, .sidebar-footer { display: none; }
  .sidebar-photo { grid-column: 2; grid-row: 1; height: 48px; margin: 0; }
  .brand-name { font-size: 13px; }
  .topbar { height: 48px; padding: 0 19px; font-size: 11px; }
  .topbar-meta { display: none; }
  .content-wrap { padding: 25px 19px 70px; }
  .progress-region { margin-bottom: 27px; }
  .step-title { font-size: 24px; }
  .step-intro { font-size: 13px; margin-bottom: 22px; }
  .scale-question { padding: 15px 0; }
  .scale-options, .scale-ends { max-width: none; }
  .priority-list { grid-template-columns: 1fr; }
  .action-bar { position: sticky; bottom: 0; z-index: 5; margin: 28px -19px -70px; padding: 12px 19px max(12px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); box-shadow: 0 -6px 25px #23392a0c; }
  .action-meta { display: none; }
  .button { flex: 1; }
  .button.secondary { flex: 0 0 92px; }
}

@media (max-width: 390px) {
  .progress-labels { font-size: 10px; }
  .brand-name { font-size: 12px; }
  .sidebar { grid-template-columns: 1fr 70px; }
  .sidebar-photo { height: 42px; }
}
