/* =========================================================
   问卷页样式（复用 style.css 的变量）
   ========================================================= */

body.survey-page { background: var(--white); }

.survey-topbar {
  max-width: 860px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line);
}
.survey-back { font-size: 13.5px; color: var(--muted); }
.survey-back:hover { color: var(--blue); }

.survey { max-width: 720px; margin: 0 auto; padding: 48px 24px 72px; }
.survey-head h1 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; margin-bottom: 16px; }
.survey-lede { color: var(--ink-2); font-size: 15.5px; }

.survey-progress { margin: 32px 0 8px; }
.survey-progress-bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.survey-progress-bar i { display: block; height: 100%; width: 0; background: var(--blue); transition: width 0.3s ease; }
.survey-progress-text {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}

.step { display: none; padding-top: 32px; }
.step.is-on { display: block; animation: fade 0.25s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.step h2 { font-size: 22px; margin-bottom: 20px; }

.consent-list { margin: 0 0 24px; padding: 0; list-style: none; }
.consent-list li {
  position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line);
  font-size: 14.5px; color: var(--ink-2);
}
.consent-list li::before {
  content: ""; position: absolute; left: 4px; top: 19px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--blue);
}

.field { display: block; border: 0; padding: 0; margin: 0 0 30px; }
.field legend, .field-label {
  display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 12px;
}
.field legend em { color: var(--blue); font-style: normal; }
.field-note { display: block; font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.options { display: flex; flex-wrap: wrap; gap: 8px; }
.options label {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  font-size: 14px; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.options label:hover { border-color: #b9c8ea; }
.options input { position: absolute; opacity: 0; pointer-events: none; }
.options input:checked + span { color: var(--blue-dark); }
.options label:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
.options input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 4px; }

.field input[type="text"], .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--white); resize: vertical;
}
.field input[type="text"]:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint);
}

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--blue); flex: none; }
.check-row { margin-bottom: 24px; }

.field-error { color: #c0392b; font-size: 13.5px; margin: 6px 0 0; }
.field-error[hidden] { display: none; }

.survey-actions { display: flex; gap: 12px; margin-top: 40px; align-items: center; }
.survey-actions .btn { min-width: 112px; justify-content: center; }
#prevBtn { margin-right: auto; }

.survey-done { padding-top: 32px; }
.survey-done h2 { font-size: 26px; margin-bottom: 16px; }
.survey-done p { color: var(--ink-2); font-size: 15px; }

.survey-footer {
  border-top: 1px solid var(--line); background: var(--soft);
  padding: 28px 24px; text-align: center; font-size: 12.5px;
}
.survey-footer p { margin: 0 0 4px; }
.survey-footer .muted { color: var(--muted); }

@media (max-width: 640px) {
  .survey { padding: 32px 20px 56px; }
  .options label { flex: 1 1 45%; justify-content: center; }
  .survey-actions { flex-wrap: wrap; }
  .survey-actions .btn { flex: 1 1 100%; }
  #prevBtn { margin-right: 0; }
}

.survey-closed {
  margin: 24px 0 0; padding: 20px 22px; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--soft); color: var(--muted); font-size: 14.5px;
}

.survey-block { padding-top: 26px; }
.survey-block h2 { font-size: 20px; margin-bottom: 16px; }
.survey-block .field { margin-bottom: 26px; }
#submitBtn { min-width: 160px; }

.embed-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.embed-wrap iframe { width: 100%; height: 80vh; min-height: 620px; border: 0; display: block; }
