/* ==========================================================================
   兼容性说明（IE11 / 360 兼容模式 / QQ 浏览器 / 火狐 / Chrome）
   - 全局不用 flex / grid / gap / CSS 变量 / :is() / clamp()，
     只用 block + inline-block + 定位，IE7+ 都不会塌版。
   - 不使用 ::placeholder（IE10 用 :-ms-input-placeholder，两条都写）。
   - 不使用 position:sticky / fixed（IE 不支持，避免回退异常）。
   - 圆角、阴影、过渡在 IE9 以下会失效，但不影响可读与可点。
   ========================================================================== */

*,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #f4f6f4;
  color: #1b2420;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 16px 56px;
}

/* ---------- 头部 ---------- */
.hero {
  padding: 6px 4px 22px;
}

.eyebrow {
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.09em;
  color: #7c8a82;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.h1 {
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #12201a;
}

.lede {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.85;
  color: #56625b;
  word-wrap: break-word;
  word-break: break-word;
}

.progress {
  margin-top: 20px;
  height: 4px;
  background: #e3e8e4;
  border-radius: 99px;
  overflow: hidden;
}

.progress-b {
  display: block;
  width: 0;
  height: 4px;
  background: #157f5b;
  border-radius: 99px;
  font-size: 0;
  text-indent: -99em;
  overflow: hidden;
}

.progress-t {
  margin-top: 7px;
  font-size: 12px;
  color: #7c8a82;
}

/* ---------- 卡片与题目 ---------- */
.card {
  background: #fff;
  border: 1px solid #e6eae7;
  border-radius: 14px;
  padding: 4px 22px 22px;
}

.q {
  padding: 22px 0 4px;
  border-top: 1px solid #eef1ef;
}

.q-first,
.q:first-child {
  border-top: 0;
}

.q-head {
  display: block;
}

.q-no {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #157f5b;
  background: #edf5f1;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.q-title {
  display: inline;
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 600;
  color: #16221c;
  vertical-align: middle;
}

.q-req {
  display: inline-block;
  margin-left: 4px;
  color: #c0392b;
  font-weight: 400;
  vertical-align: middle;
}

.q-hint {
  margin: 6px 0 0 30px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #7c8a82;
  word-wrap: break-word;
}

/* ---------- 选项 ---------- */
.opts {
  margin: 12px 0 0 30px;
}

.opt {
  display: block;
  position: relative;
  padding: 11px 14px 11px 40px;
  margin-bottom: 8px;
  border: 1px solid #e4e8e5;
  border-radius: 10px;
  background: #fff;
  font-size: 14.5px;
  line-height: 1.5;
  color: #26332c;
  cursor: pointer;
  word-wrap: break-word;
  word-break: break-word;
}

.opt input {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  filter: alpha(opacity=0);
}

.mark {
  display: block;
  position: absolute;
  left: 13px;
  top: 13px;
  width: 16px;
  height: 16px;
  border: 1.5px solid #c4cdc7;
  background: #fff;
}

.opts-single .mark {
  border-radius: 50%;
}

.opts-multi .mark {
  border-radius: 4px;
}

.mark:after {
  content: "";
  position: absolute;
}

.opts-single .opt.is-on .mark {
  border-color: #157f5b;
  background: #157f5b;
}

.opts-single .opt.is-on .mark:after {
  left: 4px;
  top: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.opts-multi .opt.is-on .mark {
  border-color: #157f5b;
  background: #157f5b;
}

.opts-multi .opt.is-on .mark:after {
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  -webkit-transform: rotate(40deg);
  -ms-transform: rotate(40deg);
  transform: rotate(40deg);
}

.opt.is-on {
  border-color: #157f5b;
  background: #f2f8f5;
}

.opt input:focus + .mark {
  border-color: #157f5b;
  -webkit-box-shadow: 0 0 0 3px rgba(21, 127, 91, 0.18);
  box-shadow: 0 0 0 3px rgba(21, 127, 91, 0.18);
}

.opt.is-full {
  border-color: #f0c0b8;
  background: #fdf4f2;
}

.q-count {
  margin: 2px 0 0 30px;
  font-size: 12px;
  color: #9aa49d;
  min-height: 0;
}

/* ---------- 文本题 ---------- */
.ipt,
.ta {
  display: block;
  width: 100%;
  margin: 12px 0 0 30px;
  width: -webkit-calc(100% - 30px);
  width: calc(100% - 30px);
  padding: 11px 14px;
  border: 1px solid #e4e8e5;
  border-radius: 10px;
  background: #fff;
  color: #1b2420;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  -webkit-appearance: none;
}

.ta {
  min-height: 110px;
  resize: vertical;
}

.ipt:focus,
.ta:focus {
  outline: 0;
  border-color: #157f5b;
  -webkit-box-shadow: 0 0 0 3px rgba(21, 127, 91, 0.14);
  box-shadow: 0 0 0 3px rgba(21, 127, 91, 0.14);
}

.ipt:-ms-input-placeholder,
.ta:-ms-input-placeholder {
  color: #b3bcb6;
}

.ipt::-webkit-input-placeholder,
.ta::-webkit-input-placeholder {
  color: #b3bcb6;
}

.ipt::-moz-placeholder,
.ta::-moz-placeholder {
  color: #b3bcb6;
  opacity: 1;
}

.ipt::placeholder,
.ta::placeholder {
  color: #b3bcb6;
}

.q-len {
  margin: 6px 0 0 30px;
  text-align: right;
  font-size: 12px;
  color: #9aa49d;
}

/* ---------- 错误提示 ---------- */
.q-err {
  margin: 0 0 0 30px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #c0392b;
}

.q-err:empty {
  display: none;
}

.q.has-err .opt,
.q.has-err .ipt,
.q.has-err .ta {
  border-color: #e8b4ac;
}

/* ---------- 提交 ---------- */
.alert {
  display: none;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid #f0c9c2;
  border-radius: 10px;
  background: #fdf3f1;
  color: #a33325;
  font-size: 13.5px;
  line-height: 1.7;
}

.alert.is-on {
  display: block;
}

.submit-row {
  margin-top: 20px;
}

.btn {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-radius: 12px;
  background: #157f5b;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  -webkit-transition: background-color 0.15s ease;
  transition: background-color 0.15s ease;
}

.btn:hover {
  background: #106a4b;
}

.btn:active {
  background: #0d5b40;
}

.btn[disabled] {
  background: #9db8ac;
  cursor: default;
}

.btn-ghost {
  background: #fff;
  border: 1px solid #d8e0db;
  color: #157f5b;
  margin-top: 22px;
}

.btn-ghost:hover {
  background: #f4f8f5;
}

.submit-tip {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: #93a09a;
  text-align: center;
}

/* ---------- 完成页 ---------- */
.done {
  padding-top: 20px;
}

.done-card {
  padding: 44px 26px 34px;
  text-align: center;
}

.done-ico {
  width: 54px;
  height: 54px;
  line-height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #edf5f1;
  color: #157f5b;
  font-size: 26px;
  font-weight: 700;
}

.done-h {
  font-size: 20px;
  font-weight: 700;
  color: #12201a;
}

.done-p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: #56625b;
}

.foot {
  margin-top: 26px;
  font-size: 12px;
  color: #9aa49d;
  text-align: center;
}

.hp {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  filter: alpha(opacity=0);
}

.noscript {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  background: #fdf3f1;
  border-top: 1px solid #f0c9c2;
  color: #a33325;
  font-size: 13px;
  text-align: center;
}

/* ---------- 小屏 ---------- */
@media screen and (max-width: 520px) {
  .wrap {
    padding: 22px 12px 44px;
  }

  .h1 {
    font-size: 21px;
  }

  .card {
    padding: 2px 16px 18px;
    border-radius: 12px;
  }

  .q {
    padding-top: 19px;
  }

  .q-title {
    font-size: 15px;
  }

  .q-hint,
  .opts,
  .ipt,
  .ta,
  .q-err,
  .q-len,
  .q-count {
    margin-left: 0;
  }

  .ipt,
  .ta {
    width: 100%;
  }

  .opt {
    font-size: 14px;
    padding: 11px 12px 11px 38px;
  }

  .mark {
    left: 12px;
    top: 12px;
  }
}
