:root {
  --ink: #132b31;
  --ink-soft: #536a6f;
  --muted: #73878b;
  --paper: #ffffff;
  --canvas: #f4f7f6;
  --teal-900: #083f3e;
  --teal-800: #0c5c5a;
  --teal-700: #14716e;
  --teal-100: #def1ee;
  --teal-50: #edf8f6;
  --blue-100: #e9f2f9;
  --line: #dfe8e6;
  --danger: #b9413e;
  --danger-bg: #fff1ef;
  --warning: #a76b1c;
  --shadow: 0 24px 70px rgba(28, 66, 65, .10);
  --shadow-soft: 0 10px 32px rgba(28, 66, 65, .08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }

.demo-warning {
  position: relative;
  z-index: 1000;
  width: 100%;
  padding: 9px 18px;
  text-align: center;
  color: #6b3600;
  background: #fff1d6;
  border-bottom: 1px solid #edc77f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 18%, rgba(201, 234, 229, .5), transparent 26rem),
    linear-gradient(135deg, #f8faf9 0%, #eef5f3 100%);
  color: var(--ink);
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 35rem;
  height: 35rem;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .42;
}
.ambient-a { left: -18rem; top: 10rem; background: #cfe9e4; }
.ambient-b { right: -20rem; bottom: -17rem; background: #dceaf4; }

.site-header {
  height: 88px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--teal-800);
  box-shadow: 0 8px 22px rgba(12, 92, 90, .22);
}

.brand-mark svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; font-size: 19px; letter-spacing: .14em; line-height: 1; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: .24em; }

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #50a886; box-shadow: 0 0 0 5px rgba(80,168,134,.1); }

main { min-height: calc(100vh - 88px); }

.welcome-view {
  max-width: 1200px;
  min-height: calc(100vh - 120px);
  margin: 0 auto;
  padding: 70px 36px 80px;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  align-items: center;
  gap: 82px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--teal-700);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
}
.eyebrow span { width: 28px; height: 2px; background: #67aaa2; }

.welcome-copy h1 {
  margin: 22px 0 22px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(48px, 5.3vw, 74px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.04em;
}
.welcome-copy h1 em { color: var(--teal-700); font-style: normal; }
.lead { max-width: 600px; margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.9; }

.assurance-list { display: grid; gap: 18px; margin: 38px 0; }
.assurance-item { display: flex; align-items: center; gap: 15px; }
.assurance-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e8e5;
  border-radius: 13px;
  color: var(--teal-700);
  background: rgba(255,255,255,.65);
}
.assurance-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.assurance-item strong, .assurance-item small { display: block; }
.assurance-item strong { margin-bottom: 5px; font-size: 14px; }
.assurance-item small { color: var(--muted); font-size: 12px; line-height: 1.5; }

.mode-picker { max-width: 620px; margin: 0 0 24px; padding: 0; border: 0; }
.mode-picker legend { margin-bottom: 10px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.mode-option { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.65); cursor: pointer; }
.mode-option:has(input:checked) { border-color: #70aaa5; background: var(--teal-50); }
.mode-option input { margin-top: 3px; accent-color: var(--teal-700); }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { font-size: 13px; }
.mode-option small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.welcome-actions { display: flex; gap: 12px; align-items: center; }
.button {
  min-height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(39, 126, 121, .25); outline-offset: 2px; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { color: white; background: var(--teal-800); box-shadow: 0 12px 26px rgba(12,92,90,.2); }
.button-primary:hover { background: var(--teal-900); box-shadow: 0 15px 30px rgba(12,92,90,.25); }
.button-secondary { color: var(--teal-800); border: 1px solid #cbdedb; background: rgba(255,255,255,.7); }
.button-danger { width: 100%; color: white; background: var(--danger); }

.clinical-note {
  max-width: 570px;
  margin: 28px 0 0;
  padding-top: 20px;
  display: flex;
  gap: 9px;
  border-top: 1px solid rgba(172,195,191,.55);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.clinical-note svg { flex: 0 0 auto; width: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.welcome-visual { position: relative; display: grid; place-items: center; min-height: 560px; }
.visual-card {
  width: min(100%, 470px);
  min-height: 520px;
  padding: 28px 30px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 34px;
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.visual-card-head, .visual-summary { display: flex; justify-content: space-between; align-items: center; }
.mini-label { color: var(--ink); font-size: 14px; font-weight: 700; }
.mini-badge { padding: 6px 10px; border-radius: 99px; color: var(--teal-700); background: var(--teal-50); font-size: 10px; font-weight: 700; }
.radar-wrap { margin: 18px 0 2px; display: grid; place-items: center; }
.radar { width: 100%; max-width: 355px; overflow: visible; }
.radar .grid { fill: rgba(235,244,242,.45); stroke: #dce8e6; stroke-width: 1; }
.radar-fill { fill: rgba(32, 126, 119, .14); stroke: #267f79; stroke-width: 2; }
.radar-dots { fill: #267f79; stroke: white; stroke-width: 3; }
.radar-labels { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.visual-summary { padding: 18px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.summary-line { display: flex; align-items: center; gap: 7px; }
.summary-line i { width: 7px; height: 7px; border-radius: 50%; }
.summary-line i.teal { background: #267f79; }
.summary-line i.gray { background: #c4cfcd; }

.floating-chip {
  position: absolute;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 13px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
  font-size: 11px;
  font-weight: 700;
}
.floating-chip svg { width: 18px; fill: none; stroke: var(--teal-700); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.chip-one { left: -9px; top: 92px; }
.chip-two { right: -10px; top: 185px; }
.chip-three { right: 18px; bottom: 61px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #5aaa86; box-shadow: 0 0 0 5px rgba(90,170,134,.13); }

.assessment-view { min-height: calc(100vh - 88px); display: grid; grid-template-columns: 290px 1fr; border-top: 1px solid rgba(199,216,213,.6); }
.assessment-sidebar { padding: 34px 28px; display: flex; flex-direction: column; background: rgba(245,249,248,.82); border-right: 1px solid var(--line); }
.back-home { display: flex; align-items: center; gap: 7px; align-self: flex-start; padding: 7px 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.back-home svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sidebar-title { margin-top: 34px; display: flex; align-items: end; justify-content: space-between; }
.sidebar-title small { color: var(--muted); font-size: 12px; }
.sidebar-title strong { color: var(--teal-700); font-size: 24px; font-family: Georgia, serif; font-weight: 500; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #dce8e6; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal-700); transition: width .3s ease; }
.assessment-sidebar > .progress-track { margin-top: 12px; }

.module-nav { margin-top: 36px; display: grid; gap: 4px; }
.module-item {
  position: relative;
  min-height: 47px;
  padding: 0 10px 0 44px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  color: #7b8c8f;
  font-size: 12px;
}
.module-item::before {
  content: "";
  position: absolute;
  left: 17px;
  width: 8px;
  height: 8px;
  border: 1.5px solid #afbfbd;
  border-radius: 50%;
  background: #f5f9f8;
}
.module-item::after { content: ""; position: absolute; left: 21px; top: 31px; width: 1px; height: 25px; background: #d8e4e2; }
.module-item:last-child::after { display: none; }
.module-item.active { color: var(--teal-900); background: rgba(222,241,238,.72); font-weight: 700; }
.module-item.active::before { border-color: var(--teal-700); background: var(--teal-700); box-shadow: 0 0 0 5px rgba(38,127,121,.11); }
.module-item.done { color: #4d736e; }
.module-item.done::before { border-color: #61a097; background: #61a097; }

.save-state { margin-top: auto; padding: 16px; display: flex; gap: 10px; border: 1px solid #dfe9e7; border-radius: 14px; background: rgba(255,255,255,.64); }
.save-state svg { width: 18px; fill: none; stroke: var(--teal-700); stroke-width: 1.4; }
.save-state strong, .save-state small { display: block; }
.save-state strong { font-size: 11px; }
.save-state small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.assessment-main { padding: 50px 48px; display: grid; align-items: center; }
.mobile-progress { display: none; }
.question-layout { width: min(100%, 1000px); margin: auto; display: grid; grid-template-columns: minmax(0, 640px) 245px; gap: 28px; align-items: start; }
.question-card { min-height: 570px; padding: 42px 48px 34px; display: flex; flex-direction: column; border: 1px solid rgba(218,231,228,.95); border-radius: var(--radius-lg); background: rgba(255,255,255,.94); box-shadow: var(--shadow-soft); }
.question-meta { display: flex; align-items: center; gap: 10px; color: var(--teal-700); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.strategy-badge { padding: 4px 8px; border-radius: 99px; color: var(--teal-700); background: var(--teal-50); font-size: 9px; letter-spacing: 0; }
.required-badge { padding: 4px 8px; border-radius: 99px; color: #727f82; background: #f0f4f3; font-size: 9px; }
.question-card h2 { max-width: 560px; margin: 22px 0 10px; font-family: "Songti SC", "STSong", serif; font-size: 28px; line-height: 1.45; font-weight: 600; letter-spacing: -.01em; }
.question-hint { margin: 0; min-height: 26px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.answer-area { margin-top: 25px; display: grid; gap: 10px; }
.option-button {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #dfe8e6;
  border-radius: 13px;
  color: var(--ink-soft);
  background: white;
  text-align: left;
  transition: border .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}
.option-button:hover { transform: translateY(-1px); border-color: #a9cbc6; background: #f9fcfb; }
.option-button.selected { border-color: var(--teal-700); color: var(--teal-900); background: var(--teal-50); box-shadow: inset 0 0 0 1px rgba(20,113,110,.1); }
.option-dot { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border: 1.5px solid #b9c8c6; border-radius: 50%; }
.option-button.multi .option-dot { border-radius: 5px; }
.option-button.selected .option-dot { border-color: var(--teal-700); background: var(--teal-700); box-shadow: inset 0 0 0 4px var(--teal-50); }
.option-button.multi.selected .option-dot { box-shadow: none; }
.option-button.multi.selected .option-dot::after { content: "✓"; color: white; font-size: 11px; font-weight: 800; }

.field-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #d9e5e3;
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fbfdfc;
  transition: border .16s ease, box-shadow .16s ease;
}
textarea.field-input { min-height: 130px; padding-top: 14px; resize: vertical; line-height: 1.7; }
.field-input:focus { border-color: var(--teal-700); box-shadow: 0 0 0 4px rgba(38,127,121,.09); background: white; }
.field-help { color: var(--muted); font-size: 11px; }
.validation-message { min-height: 20px; margin: 12px 0 0; color: var(--danger); font-size: 11px; }
.question-actions { margin-top: auto; padding-top: 30px; display: flex; justify-content: space-between; border-top: 1px solid #edf1f0; }
.question-actions .button { min-width: 112px; min-height: 46px; font-size: 12px; }
.question-actions .button:disabled { cursor: not-allowed; opacity: .38; transform: none; }

.context-panel { padding: 26px 24px; border: 1px solid #dce8e6; border-radius: var(--radius-md); background: rgba(244,249,248,.86); }
.context-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: var(--teal-700); background: var(--teal-100); }
.context-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.context-panel h3 { margin: 18px 0 10px; font-size: 13px; }
.context-panel p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.75; }
.context-rule { margin: 20px 0; height: 1px; background: #dce7e5; }
.context-panel .context-help { color: var(--muted); font-size: 10px; }

.complete-view { min-height: calc(100vh - 88px); padding: 60px 24px; display: grid; place-items: center; }
.complete-card { width: min(100%, 720px); padding: 56px; border: 1px solid var(--line); border-radius: 32px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); text-align: center; }
.complete-mark { width: 72px; height: 72px; margin: 0 auto 26px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal-700); box-shadow: 0 14px 28px rgba(20,113,110,.2); }
.complete-mark svg { width: 36px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.complete-card .eyebrow { justify-content: center; }
.complete-card h1 { margin: 18px 0 14px; font-family: "Songti SC", "STSong", serif; font-size: 36px; }
.complete-card > p { color: var(--ink-soft); line-height: 1.8; }
.backend-status {
  width: fit-content;
  margin: 20px auto 0;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8e8e5;
  border-radius: 999px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-size: 10px;
}
.backend-status.warning { color: #8a5a17; border-color: #ead9b9; background: #fff8eb; }
.backend-status.error { color: var(--danger); border-color: #efcfcb; background: var(--danger-bg); }
.complete-stats { margin: 35px 0; padding: 25px 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.complete-stats span + span { border-left: 1px solid var(--line); }
.complete-stats strong, .complete-stats small { display: block; }
.complete-stats strong { color: var(--teal-700); font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.complete-stats small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.flag-summary { margin: 0 0 28px; padding: 16px 18px; border-radius: 14px; color: #7a4c13; background: #fff7e9; text-align: left; font-size: 12px; line-height: 1.7; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding: 24px; display: grid; place-items: center; background: rgba(10,31,34,.55); backdrop-filter: blur(8px); }
.safety-modal { width: min(100%, 500px); padding: 38px; border-radius: 26px; background: white; box-shadow: 0 35px 100px rgba(5,23,26,.3); text-align: center; }
.safety-icon { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: var(--danger-bg); }
.safety-icon svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.safety-modal > small { color: var(--danger); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.safety-modal h2 { margin: 12px 0; font-family: "Songti SC", "STSong", serif; font-size: 28px; }
.safety-modal > p { color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.safety-callout { margin: 24px 0; padding: 16px; border-left: 3px solid var(--danger); border-radius: 8px; color: #6f3533; background: var(--danger-bg); font-size: 12px; line-height: 1.7; text-align: left; }
.safety-modal .safety-footnote { margin: 14px 0 0; color: var(--muted); font-size: 9px; }

@media (max-width: 1020px) {
  .welcome-view { gap: 40px; }
  .welcome-visual { min-height: 510px; }
  .assessment-view { grid-template-columns: 240px 1fr; }
  .assessment-main { padding: 40px 28px; }
  .question-layout { grid-template-columns: minmax(0, 1fr); }
  .context-panel { display: none; }
}

@media (max-width: 760px) {
  .site-header { height: 72px; padding: 0 20px; }
  .header-status { font-size: 0; }
  .header-status::after { content: "临床辅助"; font-size: 10px; }
  main { min-height: calc(100vh - 72px); }
  .welcome-view { min-height: auto; padding: 44px 22px 60px; grid-template-columns: 1fr; }
  .welcome-copy h1 { margin-top: 18px; font-size: 46px; }
  .lead { font-size: 15px; }
  .welcome-visual { display: none; }
  .welcome-actions { align-items: stretch; flex-direction: column; }
  .welcome-actions .button { width: 100%; }

  .assessment-view { min-height: calc(100vh - 72px); grid-template-columns: 1fr; }
  .assessment-sidebar { display: none; }
  .assessment-main { padding: 0; display: block; }
  .mobile-progress { padding: 15px 20px 13px; display: grid; grid-template-columns: 1fr auto; gap: 9px; background: rgba(247,250,249,.94); border-bottom: 1px solid var(--line); }
  .mobile-progress > span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
  .mobile-progress > strong { color: var(--teal-700); font-size: 11px; }
  .mobile-progress .progress-track { grid-column: 1 / -1; height: 4px; }
  .question-layout { display: block; }
  .question-card { min-height: calc(100vh - 126px); padding: 30px 21px 22px; border: 0; border-radius: 0; box-shadow: none; }
  .question-card h2 { font-size: 24px; }
  .option-button { min-height: 52px; }
  .question-actions { position: sticky; bottom: 0; margin: 20px -21px -22px; padding: 17px 21px 22px; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
  .complete-view { min-height: calc(100vh - 72px); padding: 22px; }
  .complete-card { padding: 38px 22px; border-radius: 24px; }
  .complete-card h1 { font-size: 30px; }
  .complete-stats { gap: 8px; }
  .complete-stats strong { font-size: 17px; }
  .safety-modal { padding: 32px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
