:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --primary: #2f4f90;
  --primary-strong: #243f78;
  --line: #dbe3f1;
  --line-strong: #c4d1e7;
  --text: #1f2a3d;
  --muted: #67758f;
  --success: #1f7a45;
  --danger: #c03c31;
  --shadow: 0 10px 30px rgba(32, 60, 114, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.powered-by {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.powered-by:hover {
  color: var(--primary);
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 20px 16px 28px;
}

.layout {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
  flex: 1;
}

.page-intro {
  margin-bottom: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #4968a9, var(--primary));
  box-shadow: var(--shadow);
}

.dashboard-hero {
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 8px;
}

.dashboard-hero h1,
.dashboard-hero .intro-copy {
  color: var(--text);
}

h1, h2, h3, p {
  margin-top: 0;
}

.intro-inner,
.dashboard-hero {
  padding: 28px 32px;
}

.intro-tag {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  color: #eff4ff;
  font-size: 13px;
}

.dashboard-hero .intro-tag {
  background: #eef3ff;
  color: var(--primary);
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.2;
}

.page-intro h1,
.page-intro .intro-copy {
  color: #ffffff;
}

.intro-copy {
  margin: 0;
  max-width: 760px;
  line-height: 1.8;
  color: var(--muted);
}

.content-section,
.summary-topline,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.section-heading p {
  margin-bottom: 0;
  line-height: 1.7;
  color: var(--muted);
}

.content-section {
  padding: 0 24px 24px;
  margin-top: 18px;
}

.section-heading {
  padding: 22px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.survey-form {
  display: grid;
  gap: 0;
}

.question-block {
  padding: 22px 0;
  border-bottom: 1px solid #edf1f8;
}

.question-block:last-child {
  border-bottom: none;
}

.option-row,
.option-grid {
  display: grid;
  gap: 14px;
}

.option-row {
  grid-template-columns: repeat(auto-fit, minmax(120px, 180px));
}

.option-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
}

.question-title {
  display: block;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.7;
}

label {
  display: flex;
  align-items: center;
  min-height: 44px;
  line-height: 1.6;
  color: var(--text);
}

input[type="radio"],
input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--primary);
  transform: scale(1.05);
}

textarea {
  width: 100%;
  min-height: 132px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  resize: vertical;
  font: inherit;
  color: var(--text);
  background: var(--surface-soft);
}

textarea:focus,
input:focus {
  outline: 2px solid rgba(47, 79, 144, 0.14);
  outline-offset: 1px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding-top: 24px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.primary-btn:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.form-message {
  margin: 0;
  color: var(--muted);
}

.required-mark {
  margin-left: 6px;
  color: #cf3f35;
  font-size: 14px;
  font-weight: 400;
}

.dashboard-layout {
  display: grid;
  gap: 18px;
}

.summary-topline,
.dashboard-section-list,
.suggestions-list {
  display: grid;
  gap: 16px;
}

.summary-topline {
  padding: 20px 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.metric-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.metric-value {
  font-size: 40px;
  line-height: 1;
}

.danger-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.danger-btn {
  min-width: 160px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #d9534f;
  border-radius: 6px;
  background: #fff3f2;
  color: #b42318;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.danger-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.action-message {
  margin: 0;
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
}

.summary-panel {
  padding: 24px;
}

.summary-panel h3 {
  margin-bottom: 16px;
  font-size: 20px;
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-row {
  display: grid;
  gap: 8px;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.bar-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e9eff9;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5d7dbc, #2f4f90);
}

.suggestion-item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  line-height: 1.75;
}

.suggestion-meta,
.empty-state {
  color: var(--muted);
  font-size: 14px;
}

.suggestion-meta {
  margin-bottom: 8px;
}

.success-shell {
  margin: 72px auto 0;
  max-width: 760px;
  padding: 56px 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 36px;
  margin-bottom: 20px;
  padding: 0 16px;
  border-radius: 999px;
  background: #edf6f0;
  color: var(--success);
  font-weight: 700;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.success-btn {
  text-decoration: none;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.secondary-button {
  cursor: pointer;
  font: inherit;
}

.review-panel {
  padding: 24px;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.review-head h2 {
  margin-bottom: 6px;
}

.review-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.review-head-actions {
  display: flex;
  gap: 12px;
}

.review-list {
  display: grid;
}

.review-item {
  padding: 18px 0;
  border-bottom: 1px solid #edf1f8;
}

.review-item:last-child {
  border-bottom: none;
}

.review-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.review-value {
  line-height: 1.8;
  font-size: 18px;
  word-break: break-word;
}

.review-empty {
  display: grid;
  gap: 16px;
  padding: 12px 0 4px;
}

@media (max-width: 720px) {
  .brand,
  .layout,
  .header-bar {
    width: min(100% - 20px, 1120px);
  }

  .brand-title {
    font-size: 16px;
  }

  .header-bar {
    min-height: auto;
    padding: 12px 0;
  }

  .layout {
    padding-top: 16px;
  }

  .intro-inner,
  .dashboard-hero,
  .content-section,
  .summary-topline,
  .summary-panel {
    padding: 20px;
  }

  .content-section {
    padding-top: 0;
  }

  .review-panel {
    padding: 20px;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .option-row {
    grid-template-columns: 1fr 1fr;
  }

  .primary-btn {
    width: 100%;
  }

  .secondary-link {
    width: 100%;
  }

  .form-actions {
    align-items: stretch;
  }

  .success-shell {
    margin-top: 32px;
    padding: 40px 20px;
  }

  .success-actions,
  .review-head,
  .review-head-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-topline {
    grid-template-columns: 1fr;
  }

  .danger-actions {
    justify-items: stretch;
  }

  .danger-btn {
    width: 100%;
  }
}
