/* ==========================================================================
   职场压力自测表
   ========================================================================== */

.stress-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: start;
}

.stress-form {
  padding: 32px 30px 36px;
}

.stress-form .dim-block {
  border: none;
  border-top: 1px solid var(--line);
  padding: 44px 0 12px;
  margin: 0;
}
.stress-form .dim-block:first-of-type {
  border-top: none;
  padding-top: 8px;
}

.stress-form legend {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  margin-bottom: 14px;
}
.stress-form legend .dim-num {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--life);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.stress-form legend h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}
.stress-form legend h3 .en {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.55;
  letter-spacing: 0.04em;
}
.stress-form legend .dim-tip {
  flex: 0 0 100%;
  display: block;
  max-width: 460px;
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--ink-soft, #5a5a5a);
  opacity: 0.85;
  line-height: 1.5;
}

.stress-form .q-row {
  margin-bottom: 26px;
}
.stress-form .q-row:last-child {
  margin-bottom: 6px;
}

.stress-form .q-text {
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 10px;
  color: var(--ink);
}

/* 题目补充说明 */
.stress-form .q-hint {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-soft, #5a5a5a);
  opacity: 0.85;
  margin: -4px 0 10px;
  padding: 8px 12px;
  background: rgba(45, 106, 79, 0.05);
  border-left: 2px solid rgba(45, 106, 79, 0.35);
  border-radius: 0 6px 6px 0;
}

.stress-form .seg.scale {
  flex-wrap: wrap;
  gap: 8px;
}
.stress-form .seg.scale .seg-item {
  flex: 0 0 calc((100% - 16px) / 3);
  box-sizing: border-box;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  word-break: break-word;
}

/* 选中态：绿色描边 + 浅绿底 */
.stress-form .seg-item input { accent-color: #2d6a4f; }
.stress-form .seg.scale .seg-item:has(input:checked) {
  border-color: #2d6a4f;
  background: rgba(45, 106, 79, 0.08);
}
.stress-form .seg.scale .seg-item input:checked + span {
  color: #1b4332;
  font-weight: 500;
}

/* ===== 结果区 ===== */
.stress-result {
  background: var(--life);
  color: #fff;
  padding: 32px 28px;
  border-radius: 16px;
  position: sticky;
  top: 96px;
  /* 面板独立滚动：内容超出视口时内部滚动，保证底部 CTA 始终可达 */
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
}
.stress-result::-webkit-scrollbar { width: 6px; }
.stress-result::-webkit-scrollbar-track { background: transparent; }
.stress-result::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
}

.stress-result .result-hero {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  margin-bottom: 22px;
}

.stress-result .eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 8px;
}

.stress-result .big-number {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 4px 0 8px;
}

.stress-result .result-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.stress-result .result-tag.tier-healthy   { background: #2d6a4f; }
.stress-result .result-tag.tier-good      { background: #52b788; }
.stress-result .result-tag.tier-subhealthy{ background: #f4a261; color: #fff; }
.stress-result .result-tag.tier-risk      { background: #e76f51; }

.stress-result .en {
  display: block;
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* 雷达图 */
.radar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px 8px;
  margin-bottom: 22px;
}
.radar-wrap svg {
  width: 100%;
  height: auto;
  max-width: 360px;
  display: block;
  margin: 0 auto;
}
.radar-wrap .axis-line { stroke: rgba(255,255,255,0.18); stroke-width: 1; }
.radar-wrap .grid-poly { fill: none; stroke: rgba(255,255,255,0.16); stroke-width: 1; }
.radar-wrap .grid-label { fill: rgba(255,255,255,0.55); font-size: 10px; font-family: var(--sans); }
.radar-wrap .axis-label { fill: #fff; font-size: 12px; font-family: var(--sans); font-weight: 500; }
.radar-wrap .user-poly { fill: rgba(82,183,136,0.35); stroke: #b7e4c7; stroke-width: 2; }
.radar-wrap .user-vertex { fill: #b7e4c7; }

/* 维度明细 */
.dim-grid {
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: 16px;
}

.dim-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
  font-size: 0.92rem;
}
.dim-row:last-child { border-bottom: none; }
.dim-row .dim-name {
  font-weight: 500;
}
.dim-row .dim-name .dim-en {
  display: block;
  font-size: 0.7rem;
  opacity: 0.6;
  font-weight: 400;
  margin-top: 2px;
}
.dim-row .dim-bar-wrap {
  width: 100px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
}
.dim-row .dim-bar {
  height: 100%;
  background: #b7e4c7;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.dim-row .dim-bar.tier-good      { background: #b7e4c7; }
.dim-row .dim-bar.tier-subhealthy{ background: #f4a261; }
.dim-row .dim-bar.tier-risk      { background: #e76f51; }
.dim-row .dim-score {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  min-width: 36px;
  text-align: right;
}
.dim-row.placeholder {
  opacity: 0.45;
}
.dim-row.placeholder .dim-score::after {
  content: '—';
}

/* 维度建议卡 */
.dim-advice {
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.55;
  opacity: 0.85;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  display: none;
}
.dim-row.has-advice .dim-advice {
  display: block;
}

.stress-result .result-note {
  font-size: 0.75rem;
  line-height: 1.6;
  opacity: 0.65;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.18);
}

/* CTA 按钮：绿底面板上用白底深绿字，形成强对比 */
.stress-result .btn.life {
  background: #fff;
  color: #1b4332;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.stress-result .btn.life:hover {
  background: #eef9f2;
  color: #1b4332;
}

/* CTA 停靠区：钉在结果面板可视区底部 */
.stress-result .cta-dock {
  position: sticky;
  bottom: 0;
  margin: 14px -28px -32px;
  padding: 22px 28px 32px;
  background: linear-gradient(to top, var(--life) 62%, rgba(8, 80, 65, 0));
  text-align: center;
  transition: background 0.35s ease, padding 0.25s ease;
}

/* 弱化态：刚答完时降低视觉重量，只提示继续下滑，避免被误认为页面已到底 */
.cta-dock .dock-hint { display: none; }
.stress-result .cta-dock.quiet {
  background: linear-gradient(to top, rgba(8, 80, 65, 0.28) 55%, rgba(8, 80, 65, 0));
  padding: 12px 28px 18px;
}
.stress-result .cta-dock.quiet .dock-hint {
  display: block;
  margin: 0 0 8px;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  opacity: 0.8;
}
.stress-result .cta-dock.quiet .btn.life {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
  font-weight: 500;
}
.stress-result .cta-dock.quiet .btn.life:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* 响应式 */
@media (max-width: 860px) {
  .stress-grid { grid-template-columns: 1fr; }
  .stress-result {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .stress-form .seg.scale .seg-item {
    flex: 0 0 calc((100% - 8px) / 2);
  }
  .dim-row { grid-template-columns: 1fr; gap: 6px; }
  .dim-row .dim-bar-wrap { width: 100%; }
  .dim-row .dim-score { text-align: left; }
}

/* ---- 页首引言不换行（窄屏允许换行防溢出） ---- */
.page-hero .lead { white-space: nowrap; }
@media (max-width: 860px) { .page-hero .lead { white-space: normal; } }

/* ---- hidden 兜底：防止全局 .btn 等 display 规则覆盖 hidden 属性 ---- */
[hidden] { display: none !important; }

/* ---- 咨询师预约留存的说明小字 ---- */
.cta-dock .dock-consent {
  font-size: 0.62rem;
  opacity: 0.6;
  margin: 8px 0 0;
}

/* ---- 咨询师视图（?admin=1 / #admin 时显示） ---- */
.admin-panel { max-width: 1080px; margin: 0 auto; padding: 26px 24px 0; }
.admin-panel .admin-box {
  border: 2px dashed #b4443c;
  border-radius: 12px;
  padding: 22px 24px 26px;
  background: #fffaf8;
}
.admin-panel h3 { margin: 0 0 6px; font-size: 1rem; }
.admin-panel .admin-meta { font-size: 0.8rem; opacity: 0.8; margin: 0 0 14px; }
.admin-panel .admin-empty { font-size: 0.8rem; opacity: 0.7; margin: 0; }
.admin-panel .admin-dims { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.admin-panel .admin-dim {
  font-size: 0.74rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 4px 10px;
}
.admin-panel .admin-dim b { font-family: var(--serif, serif); }
.admin-panel .admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-panel .admin-actions .btn { font-size: 0.78rem; padding: 8px 14px; cursor: pointer; }
.admin-panel .admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.74rem; }
.admin-table th, .admin-table td { border: 1px solid rgba(0,0,0,0.1); padding: 6px 8px; text-align: left; vertical-align: top; }
.admin-table th { background: #f6f1ef; font-weight: 600; white-space: nowrap; }

/* 窄屏允许 lead 换行：单行 nowrap 在移动端会横向溢出（2026-09-22 全站视觉打磨） */
@media (max-width: 680px) {
  .page-hero .lead,
  .lead { white-space: normal; }
}

/* 与上一次的对比（2026-11-05） */
.sc-compare {
  margin: 10px 0 4px;
  padding: 7px 10px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
}
