/* ==========================================================================
   Humanmetrics 中文版 — 站点补充样式
   原站样式表（hm-common.css / hm2-common.css）已完整保留，本文件只做：
   1) 中文字体栈  2) 测验交互  3) 结果页图形  4) 移动端补强  5) 分享条
   ========================================================================== */

:root {
  --hm-accent: #c61f1e;
  --hm-accent-soft: #f7e9e9;
  --hm-ink: #222;
  --hm-muted: #6b6b6b;
  --hm-line: #dcdcdc;
  --hm-win: #337ab7;
  --hm-lose: #d9534f;
}

html { -webkit-text-size-adjust: 100%; }

body,
button, input, select, textarea,
.navbar, h1, h2, h3, h4, h5, h6 {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", "WenQuanYi Micro Hei",
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body { color: var(--hm-ink); line-height: 1.75; }

p, li { line-height: 1.8; }

h1, h2, h3, h4 { line-height: 1.4; }

/* 中文正文比英文紧凑，行高略增、字距微调，避免出现大段生硬换行 */
.hm_cont p, .hm_cont li { letter-spacing: .01em; }

/* 页面正文容器（与首页 hm_cont_main 一致） */
.hm_cont_main { background: #fff; padding: 18px 20px 26px; }
.hm_cont_main > .col-xs-12 { padding-left: 0; padding-right: 0; }

/* 类型页副标题 */
.hm_subtitle, .heading2alt { color: var(--hm-accent); }

/* --------------------------------------------------------------------------
   1. 测验交互
   -------------------------------------------------------------------------- */
.hm-progress {
  margin: 10px 0 18px;
  font-size: .92em;
  color: var(--hm-muted);
}
.hm-progress-bar {
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 5px;
}
.hm-progress-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--hm-win);
  transition: width .2s ease;
}

/* 未作答高亮 */
.qe.hm-missing .re7 { outline: 2px solid var(--hm-lose); outline-offset: 2px; }
.qe.hm-missing .qt7 { color: var(--hm-lose); font-weight: 600; }

.hm-form-error {
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid #ebccd1;
  background: #f2dede;
  color: #a94442;
  border-radius: 4px;
}

#btsubg { margin-top: 22px; }
#btsub { min-width: 190px; }

/* 移动端：题干与选项更易点按 */
@media (max-width: 500px) {
  .re7 { max-width: 100%; }
  .ql7 { font-size: .95em; padding: 5px 1px; }
  .qe { margin-bottom: 1.25em; }
  #c_qsts { padding-left: 6px; padding-right: 6px; }
  #btsubg { text-align: center; }
  #btsub { width: 82%; }
  .hm_cont_main { padding: 12px 10px 20px; }
}

/* --------------------------------------------------------------------------
   2. 结果页
   -------------------------------------------------------------------------- */
.hm-result { padding: 4px 0 20px; }
.hm-result h1 { margin-top: 0; }
.hm-result .hm-type-code {
  font-size: 3.2em;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--hm-accent);
  line-height: 1.1;
  margin: 6px 0 2px;
}
.hm-result .hm-type-letters {
  color: var(--hm-muted);
  font-size: .98em;
  margin-bottom: 14px;
}
.hm-result .hm-summary {
  margin: 14px 0 18px;
  font-size: 1.03em;
}
.hm-result h2 {
  font-size: 1.5em;
  margin: 26px 0 10px;
}
.hm-formula {
  font-size: 1.15em;
  letter-spacing: .08em;
  margin: 8px 0 16px;
}
.hm-formula b { color: var(--hm-win); }

/* 双侧倾向条 */
.hm-bars { margin: 10px 0 6px; max-width: 640px; }
.hm-bar-row { margin-bottom: 14px; }
.hm-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: .92em;
  color: var(--hm-muted);
  margin-bottom: 3px;
}
.hm-bar-head .hm-left, .hm-bar-head .hm-right { width: 48%; }
.hm-bar-head .hm-right { text-align: right; }
.hm-bar-track {
  position: relative;
  height: 12px;
  background: #ececec;
  border-radius: 6px;
  overflow: hidden;
}
.hm-bar-track::after {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px; background: #c9c9c9;
}
.hm-bar-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--hm-win);
  border-radius: 6px;
}
.hm-bar-fill.hm-neg { background: var(--hm-lose); }
.hm-pref-line {
  font-size: .95em;
  color: #444;
  margin-top: 4px;
}
.hm-pref-line strong { color: var(--hm-ink); }

/* 子量表柱状图（幸福感测验） */
.hm-subscale { margin: 8px 0 4px; max-width: 640px; }
.hm-subscale-row {
  display: flex;
  align-items: center;
  margin-bottom: 9px;
  font-size: .95em;
}
.hm-subscale-label { width: 42%; padding-right: 10px; }
.hm-subscale-track {
  flex: 1;
  height: 16px;
  background: #ececec;
  border-radius: 3px;
  overflow: hidden;
}
.hm-subscale-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5bc0de, #337ab7);
}
.hm-subscale-value { width: 52px; text-align: right; color: var(--hm-muted); }

.hm-explore-links { margin: 6px 0 0; padding-left: 0; list-style: none; }
.hm-explore-links li { display: inline-block; margin: 0 14px 8px 0; }

.hm-result-actions { margin-top: 26px; }

@media (max-width: 500px) {
  .hm-result .hm-type-code { font-size: 2.4em; }
  .hm-subscale-label { width: 46%; font-size: .9em; }
}

/* --------------------------------------------------------------------------
   3. 分享条 / 社交按钮（原站 btn-social-icon 来自未随附的 bootstrap-social）
   -------------------------------------------------------------------------- */
#share.navbar { margin-bottom: 0; border-radius: 0; min-height: 0; }
#share .share-label { margin-right: 10px; color: #fff; font-size: .9em; letter-spacing: .1em; }
.btn-social-icon {
  display: inline-block;
  width: 34px; height: 34px;
  line-height: 34px;
  padding: 0;
  margin: 0 4px;
  border-radius: 50%;
  color: #fff;
  text-align: center;
  border: none;
}
.btn-social-icon:hover, .btn-social-icon:focus { color: #fff; opacity: .85; }
.btn-social-icon .fa { line-height: 34px; }
.btn-facebook { background-color: #3b5998; }
.btn-twitter { background-color: #55acee; }
.btn-tumblr { background-color: #35465c; }
.btn-pinterest { background-color: #cb2027; }

/* --------------------------------------------------------------------------
   4. 模态框 / 提示
   -------------------------------------------------------------------------- */
.modal-hm .modal-title { font-size: 1.25em; }
.modal-hm .modal-body p { margin-bottom: 10px; }
#nousDialog {
  position: fixed;
  right: 18px; bottom: 18px;
  width: 340px; max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid var(--hm-line);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  z-index: 1040;
  padding: 0 0 12px;
}
#nousDialog .modal-header { padding: 10px 14px; border-bottom: 1px solid #eee; }
#nousDialog .modal-body { padding: 12px 14px; font-size: .95em; }
#nousDialog .modal-footer { padding: 0 14px; border-top: none; }

/* 付费测验 CTA */
.hm-premium-cta { cursor: pointer; }

/* 404 */
.hm-404 { padding: 60px 0 80px; }
.hm-404 h1 { font-size: 5em; color: var(--hm-accent); margin: 0 0 10px; }

/* --------------------------------------------------------------------------
   5. 移动端补强
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .hm-brand-name { font-size: .95em; }
  .navbar-hm .nav > li > a { padding-left: 7px; padding-right: 7px; }
  .hm_cont_main { border-radius: 0; }
  h1 { font-size: 1.7em; }
  h2 { font-size: 1.35em; }
  #share .share-label { display: none; }
  .btn-social-icon { width: 30px; height: 30px; line-height: 30px; }
  .btn-social-icon .fa { line-height: 30px; }
}

/* 表格在窄屏可横向滚动，避免撑破布局 */
@media (max-width: 640px) {
  .hm_cont table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* 打印 */
@media print {
  #share, #nousDialog, .no-print { display: none !important; }
}
