:root {
  --ink: #18201f;
  --muted: #66706e;
  --line: #dce2df;
  --surface: #ffffff;
  --surface-soft: #f4f6f5;
  --green: #176b52;
  --green-dark: #10513e;
  --green-soft: #e8f3ee;
  --amber: #a75a12;
  --amber-soft: #fff4e7;
  --red: #a43d3d;
  --red-soft: #fff0f0;
  --blue: #315d8a;
  --shadow: 0 12px 36px rgba(20, 37, 33, 0.08);
}

* { box-sizing: border-box; }
html { background: var(--surface-soft); color: var(--ink); font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
a { color: var(--green); text-decoration: none; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 30px; line-height: 1.3; letter-spacing: 0; }
h2 { margin-bottom: 6px; font-size: 19px; line-height: 1.4; letter-spacing: 0; }
p { color: var(--muted); line-height: 1.7; }
small { display: block; color: var(--muted); }
code { padding: 3px 7px; border: 1px solid #d5e2dc; border-radius: 4px; background: #eff6f2; color: var(--green-dark); font-size: 13px; }

.app-header { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: 260px 1fr auto; align-items: center; min-height: 68px; padding: 0 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 6px; background: var(--green); color: white; font-weight: 700; }
.brand strong { display: block; font-size: 15px; }
.brand small { margin-top: 1px; font-size: 11px; }
.app-header nav { display: flex; align-self: stretch; gap: 4px; }
.app-header nav a { display: grid; place-items: center; min-width: 76px; padding: 0 16px; border-bottom: 2px solid transparent; color: #4c5654; font-size: 14px; }
.app-header nav a:hover, .app-header nav a.active { border-color: var(--green); color: var(--green); background: #f7faf8; }
.app-main { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 64px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.page-heading p { margin-bottom: 0; }
.page-heading.compact { align-items: center; }
.eyebrow { margin-bottom: 7px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.title-row, .button-row, .form-row, .tag-row, .copy-row { display: flex; align-items: center; gap: 10px; }
.title-row h1 { margin: 0; }
.button-row form { margin: 0; }
.muted { color: var(--muted); }
.align-right { text-align: right; }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid transparent; border-radius: 5px; cursor: pointer; font-weight: 700; font-size: 14px; }
.button.primary { background: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { border-color: var(--line); background: white; color: var(--ink); }
.button.ghost { background: transparent; color: var(--muted); }
.button.danger-quiet { border-color: #efcccc; background: white; color: var(--red); }
.button.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.button.large { min-height: 50px; }
.button.full { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .5; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 6px; background: white; }
.metric-grid > div { min-height: 124px; padding: 23px 26px; border-right: 1px solid var(--line); }
.metric-grid > div:last-child { border: 0; }
.metric-grid span { display: block; color: var(--muted); font-size: 13px; }
.metric-grid strong { display: block; margin-top: 16px; font-size: 32px; font-weight: 600; }
.workflow-band { margin: 32px 0; padding: 30px; border-radius: 6px; background: #18332c; color: white; }
.workflow-band h2, .workflow-band .eyebrow { color: white; }
.workflow { display: grid; grid-template-columns: repeat(5, 1fr); margin: 24px 0 0; padding: 0; list-style: none; }
.workflow li { position: relative; min-height: 92px; padding: 0 24px; border-left: 1px solid rgba(255,255,255,.18); }
.workflow li:first-child { padding-left: 0; border: 0; }
.workflow span { display: block; margin-bottom: 10px; color: #96c2b2; font-size: 12px; }
.workflow strong { display: block; font-size: 14px; }
.workflow small { margin-top: 6px; color: #afc2bc; line-height: 1.5; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.data-section { margin-top: 32px; padding: 28px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.data-section.flush { margin: 0; }
.data-section.top-gap { margin-top: 24px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
td { padding: 15px 14px; border-bottom: 1px solid #edf0ef; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
td small { margin-top: 4px; }
.status { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; border-radius: 999px; background: #eef1f0; color: #59625f; font-size: 12px; white-space: nowrap; }
.status.active, .status.submitted { background: var(--green-soft); color: var(--green-dark); }
.status.pending { background: var(--amber-soft); color: var(--amber); }
.status.draft { background: #e9f0f8; color: var(--blue); }
.empty { padding: 48px 20px; text-align: center; }
.empty strong { display: block; margin-bottom: 6px; }
.empty p { margin-bottom: 0; }
.compact-empty { padding: 28px 12px; }
.large-empty { margin-top: 30px; padding: 90px 24px; border: 1px dashed #c9d0cd; border-radius: 6px; background: white; }

.split-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.tool-panel { padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.account-panel { width: min(520px, 100%); }
details.tool-panel summary { cursor: pointer; font-size: 17px; font-weight: 700; }
details.tool-panel[open] summary { margin-bottom: 22px; }
.stack-form { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #3c4543; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #cbd2cf; border-radius: 5px; background: white; color: var(--ink); outline: none; }
input, select { min-height: 42px; padding: 0 12px; }
textarea { resize: vertical; padding: 11px 12px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,82,.1); }
.check-row { display: flex; align-items: flex-start; gap: 9px; }
.check-row input { width: 17px; min-height: 17px; margin-top: 1px; accent-color: var(--green); }
.field-hint { margin: -7px 0 0; font-size: 12px; }
.form-row > label { flex: 1; }

.notice { margin-bottom: 22px; padding: 14px 16px; border: 1px solid #cbe2d8; border-radius: 5px; background: var(--green-soft); color: var(--green-dark); }
.notice.error { border-color: #efcccc; background: var(--red-soft); color: var(--red); }
.notice.link { display: grid; gap: 12px; }
.copy-row input { flex: 1; background: white; }
.breadcrumb { display: flex; gap: 8px; margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; align-items: start; }
.side-column { display: grid; gap: 18px; }
.question-list { margin: 0; padding: 0; list-style: none; }
.question-list li { display: flex; gap: 15px; padding: 19px 0; border-bottom: 1px solid #edf0ef; }
.question-list li:last-child { border: 0; }
.question-number { display: grid; flex: 0 0 30px; height: 30px; place-items: center; border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.question-content { min-width: 0; }
.question-content > strong, .public-question legend { white-space: pre-line; }
.question-content p { margin: 10px 0 0; font-size: 13px; }
.tag-row { flex-wrap: wrap; margin-top: 8px; }
.tag-row > span { color: var(--muted); font-size: 12px; }
.tag-row > span.accent { color: var(--green); }
.item-list { border-top: 1px solid var(--line); }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-item small { margin-top: 5px; }

.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: #17312a; }
.auth-panel { display: grid; width: min(440px, 100%); gap: 28px; padding: 38px; border-radius: 6px; background: white; box-shadow: var(--shadow); }
.auth-brand { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.auth-panel h1 { font-size: 27px; }

.public-shell { min-height: 100vh; padding: 0 20px 130px; background: #edf2ef; }
.public-shell.centered { display: grid; place-items: center; padding: 24px; }
.public-header { display: flex; width: min(760px, 100%); min-height: 76px; align-items: center; justify-content: space-between; margin: 0 auto; color: var(--muted); font-size: 13px; }
.form-sheet { width: min(760px, 100%); margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; background: white; box-shadow: var(--shadow); }
.form-intro { padding: 40px 42px 30px; border-bottom: 1px solid var(--line); }
.form-intro h1 { font-size: 28px; }
.privacy-note { margin-top: 20px; padding: 12px 14px; border-left: 3px solid var(--green); background: var(--surface-soft); color: var(--muted); font-size: 13px; line-height: 1.6; }
.public-form { padding: 12px 42px 42px; }
.questionnaire-progress, .mobile-step-controls { display: none; }
.desktop-form-actions { position: fixed; z-index: 25; right: 24px; bottom: 20px; display: grid; width: min(420px, calc(100% - 48px)); grid-template-columns: minmax(120px, .35fr) 1fr; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); }
.public-question { margin: 0; padding: 28px 0; border: 0; border-bottom: 1px solid var(--line); }
.public-question legend { display: flex; width: 100%; align-items: center; gap: 9px; padding: 0; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.6; }
.public-question legend > span { color: var(--green); }
.public-question legend b { font-weight: 700; }
.public-question legend em { color: var(--red); font-size: 11px; font-style: normal; }
.question-note { margin: 12px 0 0; color: #4f5956; font-size: 13px; line-height: 1.75; }
.question-note.example { padding: 11px 13px; border-left: 3px solid #aeb8b4; background: var(--surface-soft); }
.public-question > input, .public-question > textarea, .public-question > label { margin-top: 16px; }
.choice-list { display: grid; gap: 10px; margin-top: 16px; }
.choice-block { display: grid; gap: 7px; }
.choice { display: flex; min-height: 46px; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; font-weight: 400; }
.choice:hover { border-color: #a8bdb5; background: #f8faf9; }
.choice input { width: 17px; min-height: 17px; accent-color: var(--green); }
.choice-detail { margin: 0 0 4px 30px; width: calc(100% - 30px); }
.choice-detail:disabled { display: none; }
.page-jump-controls { position: fixed; z-index: 26; right: 24px; bottom: 96px; display: grid; gap: 8px; }
.page-jump-controls button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #cbd2cf; border-radius: 50%; background: white; color: var(--green-dark); box-shadow: 0 6px 20px rgba(20,37,33,.12); cursor: pointer; font-size: 20px; font-weight: 700; }
.page-jump-controls button:hover { border-color: var(--green); background: var(--green-soft); }
.public-question.has-error { border-left: 3px solid var(--red); padding-left: 15px; }
.error-text { margin: 8px 0 0; color: var(--red); font-size: 12px; }
.verification { margin-bottom: 26px; border-bottom: 0; }
.result-panel { width: min(500px, 100%); padding: 48px; border-radius: 6px; background: white; text-align: center; box-shadow: var(--shadow); }
.result-icon { display: grid; width: 52px; height: 52px; place-items: center; margin: 0 auto 22px; border-radius: 50%; background: var(--green); color: white; font-size: 25px; }
.result-icon.neutral { background: var(--amber); }
.result-panel dl { margin: 28px 0 0; border-top: 1px solid var(--line); }
.result-panel dl div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; }
.result-panel dt { color: var(--muted); }
.result-panel dd { margin: 0; font-weight: 700; }

.response-stack { display: grid; gap: 20px; }
.response-section { padding: 26px; border: 1px solid var(--line); border-left: 4px solid #aeb8b4; border-radius: 6px; background: white; }
.response-section.difference { border-left-color: var(--amber); }
.response-question { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.response-question h2 { margin-top: 10px; font-size: 18px; }
.difference-label { flex: 0 0 auto; padding: 5px 9px; border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.difference .difference-label { background: var(--amber-soft); color: var(--amber); }
.numeric-summary { margin: 14px 0 0; color: var(--amber); font-size: 13px; }
.answer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 20px; }
.answer-item { min-width: 0; padding: 13px; border-radius: 4px; background: var(--surface-soft); }
.answer-item > span { display: block; color: var(--muted); font-size: 12px; }
.answer-item > span small { display: inline; margin-left: 5px; }
.answer-item strong { display: block; margin-top: 9px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; }
.decision-box { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.decision-box summary { cursor: pointer; color: var(--green); font-weight: 700; font-size: 13px; }
.decision-form { display: grid; gap: 15px; margin-top: 18px; }
.definition-list { display: grid; gap: 14px; }
.definition-list article { padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.definition-head, .definition-head > div, .definition-list footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.definition-head > div { justify-content: flex-start; }
.definition-head span, .definition-head time { color: var(--muted); font-size: 12px; }
.definition-list article > p { margin: 18px 0; color: var(--ink); }
.definition-list footer { justify-content: flex-start; color: var(--muted); font-size: 12px; }

@media (max-width: 860px) {
  .app-header { grid-template-columns: 1fr auto; padding: 0 18px; }
  .app-header nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; height: 58px; justify-content: space-around; border-top: 1px solid var(--line); background: white; }
  .app-header nav a { flex: 1; min-width: 0; padding: 0 6px; border-top: 2px solid transparent; border-bottom: 0; font-size: 12px; }
  .app-header > form { grid-column: 2; grid-row: 1; }
  .app-main { width: min(100% - 28px, 720px); padding: 28px 0 86px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid > div:nth-child(2) { border-right: 0; }
  .metric-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .workflow { grid-template-columns: 1fr; gap: 18px; }
  .workflow li { min-height: auto; padding: 0 0 0 20px; }
  .workflow li:first-child { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.18); }
  .split-layout, .detail-grid { grid-template-columns: 1fr; }
  .side-column { grid-row: 1; }
}

@media (max-width: 640px) {
  h1 { font-size: 25px; }
  .app-header { min-height: 62px; }
  .brand small { display: none; }
  .page-heading, .page-heading.compact { align-items: stretch; flex-direction: column; }
  .button-row { flex-wrap: wrap; }
  .metric-grid > div { min-height: 100px; padding: 17px; }
  .metric-grid strong { margin-top: 10px; font-size: 27px; }
  .workflow-band, .data-section, .tool-panel { padding: 20px; }
  .form-row { align-items: stretch; flex-direction: column; }
  .public-shell { padding: 0 10px 100px; }
  .public-header { min-height: 66px; padding: 0 8px; }
  .public-header > span { max-width: 45%; text-align: right; }
  .form-intro { padding: 28px 22px 22px; }
  .public-form { padding: 6px 22px 28px; }
  .public-form.questionnaire-enhanced { padding-bottom: 84px; }
  .questionnaire-enhanced .questionnaire-progress { position: sticky; z-index: 8; top: 0; display: block; margin: 0 -22px; padding: 14px 22px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
  .questionnaire-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .questionnaire-progress strong { font-size: 13px; }
  .questionnaire-progress span { color: var(--muted); font-size: 12px; }
  .progress-track { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 2px; background: #e3e8e5; }
  .progress-track span { display: block; width: 0; height: 100%; background: var(--green); transition: width .2s ease; }
  .questionnaire-enhanced .public-question { display: none; min-height: 330px; padding-top: 28px; }
  .questionnaire-enhanced .public-question.active-step { display: block; }
  .questionnaire-enhanced .choice { min-height: 50px; padding: 12px 13px; }
  .questionnaire-enhanced .mobile-step-controls { position: fixed; z-index: 25; right: 10px; bottom: 10px; left: 10px; display: grid; grid-template-columns: .9fr .8fr 1.2fr; gap: 8px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); }
  .questionnaire-enhanced [hidden] { display: none !important; }
  .questionnaire-enhanced .desktop-form-actions { display: none; }
  .page-jump-controls { right: 14px; bottom: 82px; }
  .page-jump-controls button { width: 40px; height: 40px; }
  .response-question { flex-direction: column; }
  .definition-head, .definition-list footer { align-items: flex-start; flex-direction: column; }
  .auth-panel, .result-panel { padding: 30px 24px; }
}
