/* ====== 全局基础 ====== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #1f2937;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: #5B8DEF; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ====== 容器 ====== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}
@media (min-width: 900px) {
  .container { max-width: 820px; padding: 40px 32px 80px; }
}

/* ====== 卡片 ====== */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  padding: 24px 20px;
  margin-bottom: 16px;
}
@media (min-width: 600px) { .card { padding: 32px 28px; } }

/* ====== 标题 ====== */
.h1 { font-size: 24px; font-weight: 700; color: #111827; margin: 0 0 8px; }
.h2 { font-size: 18px; font-weight: 600; color: #1f2937; margin: 0 0 12px; }
.h3 { font-size: 15px; font-weight: 600; color: #374151; margin: 0 0 8px; }
.subtitle { color: #6b7280; font-size: 13px; margin: 0 0 24px; }
.text-muted { color: #6b7280; }
.text-center { text-align: center; }

/* ====== 表单 ====== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: #374151; margin-bottom: 6px; font-weight: 500; }
.form-control {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none;
  border-color: #5B8DEF;
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.15);
}
.form-control[disabled] { background: #f3f4f6; color: #9ca3af; }

textarea.form-control { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }

/* ====== 按钮 ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .05s, opacity .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #5B8DEF; color: #fff; }
.btn-primary:hover { background: #4A78D8; }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger { background: #fff; color: #ef4444; border: 1px solid #fecaca; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 120px; }

/* ====== 提示 ====== */
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin: 8px 0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* ====== 进度条 ====== */
.progress {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 24px;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #5B8DEF, #7B68EE);
  transition: width .3s ease;
}
.progress-text { font-size: 12px; color: #6b7280; }

/* ====== 单选/选择题 ====== */
.choice-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.choice {
  display: block;
  padding: 14px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
  background: #fff;
}
.choice:hover { border-color: #5B8DEF; background: #f8faff; }
.choice input { display: none; }
.choice.selected { border-color: #5B8DEF; background: #eff6ff; }
.choice .key {
  display: inline-block;
  width: 22px; height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  margin-right: 10px;
}
.choice.selected .key { background: #5B8DEF; color: #fff; }

/* ====== Offer 卡片 ====== */
.offer-card { border: 1.5px solid #e5e7eb; border-radius: 14px; margin-bottom: 16px; overflow: hidden; }
.offer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: #f9fafb; cursor: pointer; user-select: none;
}
.offer-header .name { font-weight: 600; font-size: 15px; }
.offer-header .toggle { color: #6b7280; transition: transform .2s; }
.offer-card.collapsed .offer-header .toggle { transform: rotate(-90deg); }
.offer-body { padding: 18px; }
.offer-card.collapsed .offer-body { display: none; }

/* ====== 结果展示 ====== */
.weight-bar {
  display: flex; align-items: center; gap: 12px; margin: 8px 0;
}
.weight-bar .label { width: 90px; font-size: 13px; color: #374151; }
.weight-bar .track { flex: 1; height: 10px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.weight-bar .fill { height: 100%; background: linear-gradient(90deg, #5B8DEF, #7B68EE); border-radius: 999px; }
.weight-bar .pct { width: 48px; text-align: right; font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; }

.score-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.score-table th, .score-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid #f1f5f9; }
.score-table th { background: #f8fafc; font-weight: 600; color: #374151; }
.score-table td.name { text-align: left; font-weight: 500; }
.score-table tr.top { background: #fef3c7; }
.score-table tr.top td.name::before { content: "⭐ "; }

.risk-card { border-left: 4px solid #d1d5db; padding: 10px 14px; background: #f9fafb; margin: 8px 0; border-radius: 0 8px 8px 0; }
.risk-card.high { border-color: #ef4444; background: #fef2f2; }
.risk-card.medium { border-color: #f59e0b; background: #fffbeb; }
.risk-card.low { border-color: #6b7280; }
.risk-card .title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.risk-card .body { font-size: 13px; color: #4b5563; line-height: 1.55; }

/* ====== 维度评分 1-5 ====== */
.dim-score { display: flex; gap: 8px; margin: 8px 0; }
.dim-score .pill {
  flex: 1; height: 40px; line-height: 40px; text-align: center;
  border: 1.5px solid #e5e7eb; border-radius: 8px; cursor: pointer; font-weight: 500;
}
.dim-score .pill.selected { background: #5B8DEF; color: #fff; border-color: #5B8DEF; }
.dim-score .pill.skipped { background: #f3f4f6; color: #9ca3af; }

/* ====== 工具 ====== */
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spacer-12 { height: 12px; }
.spacer-24 { height: 24px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #eef2ff; color: #4338ca; }
.tag.warn { background: #fffbeb; color: #b45309; }
.tag.success { background: #f0fdf4; color: #15803d; }

/* ====== 全站防伪标识：「瘦蛙设计」 ====== */

/* 1. 顶部品牌导航栏（sticky） */
.brand-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  font-size: 12px;
  color: #475569;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.04);
}
.brand-nav .brand-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-nav .brand-logo .brand-mark {
  -webkit-text-fill-color: initial;
  background: none;
  font-size: 14px;
  margin-right: 2px;
}
.brand-nav .brand-divider {
  -webkit-text-fill-color: initial;
  color: #cbd5e1;
  margin: 0 2px;
}
.brand-nav .brand-product {
  -webkit-text-fill-color: initial;
  color: #475569;
  font-weight: 500;
}
.brand-nav .brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  letter-spacing: 0.5px;
}

/* 2. 全站背景水印（极低透明度，倾斜重复） */
.brand-watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='220'><g transform='rotate(-22 140 110)' fill='%237c3aed' font-family='PingFang SC,Microsoft YaHei,sans-serif' font-size='22' font-weight='700' letter-spacing='2'><text x='6' y='50'>瘦蛙设计</text><text x='130' y='120'>瘦蛙设计</text><text x='40' y='200'>瘦蛙设计</text></g></svg>");
  background-repeat: repeat;
  opacity: 0.045;
  user-select: none;
}

/* 3. 页脚版权 */
.brand-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 18px 16px 28px;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.3px;
  line-height: 1.7;
  margin-top: 8px;
  border-top: 1px dashed rgba(124, 58, 237, 0.12);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.4));
}
.brand-footer .brand-name {
  color: #7c3aed;
  font-weight: 600;
  margin: 0 2px;
}
.brand-footer .brand-copy {
  display: block;
  margin-top: 2px;
  color: #cbd5e1;
  font-size: 10px;
  letter-spacing: 1px;
}

/* 4. 结果页"瘦蛙设计 出品"徽章 */
.brand-badge {
  display: inline-block;
  padding: 2px 9px;
  margin-left: 8px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.18);
  color: #7c3aed;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  opacity: 0.75;
  white-space: nowrap;
}
.brand-badge::before {
  content: "© ";
  opacity: 0.7;
}
