*{margin:0;padding:0 24px;box-sizing:border-box}
body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;background:linear-gradient(180deg,#edf2f7 0%,#fff 100%);min-height:100vh;color:#1a202c}
a{color:#3182ce;text-decoration:none}a:hover{color:#2b6cb0}
.tb-wrap{max-width:1200px;margin:0 auto;padding:0 20px}

/* 导航栏 */
.tb-nav{background:#fff;border-bottom:1px solid #e2e8f0;padding:0 24px;position:sticky;top:0;z-index:100;box-shadow:0 1px 3px rgba(0,0,0,.06);height:180px;display:flex;align-items:center;justify-content:space-between}
.tb-nav-inner{height:180px;max-width:1200px;margin:0 auto;width:100%;display:flex;align-items:center;justify-content:space-between}
.tb-logo{display:flex;align-items:center;text-decoration:none;flex-shrink:0}
.tb-logo img{height:160px;width:auto;display:block;}
.tb-nav-links{display:flex;gap:16px;align-items:center;margin-left:100px !important;margin-right:0}
.tb-nav-links a{padding:8px 14px;border-radius:8px;color:#4a5568;font-size:14px;font-weight:500;transition:all .2s}
.tb-nav-links a:hover,.tb-nav-links a.active{color:#667eea;background:#f5f3ff}
.tb-nav-right{display:flex;align-items:center;gap:16px;flex-shrink:0;margin-left:auto}
.tb-btn-login{white-space:nowrap;border:1.5px solid #667eea;color:#667eea;padding:0.4rem 1.5rem;border-radius:6px;font-size:0.875rem;font-weight:600;transition:all .2s;display:inline-block;background:#fff}
.tb-btn-login:hover{background:#f5f3ff;color:#667eea}
.tb-btn-start{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:9px 20px;border-radius:9999px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s;display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.tb-btn-start:hover{opacity:.9;transform:translateY(-1px)}
.tb-avatar{display:flex;align-items:center;gap:8px;padding:6px 12px;border-radius:9999px;border:1.5px solid #e2e8f0;cursor:pointer;position:relative;font-size:14px;font-weight:500;color:#4a5568}
.tb-avatar-drop{position:absolute;top:calc(100% + 8px);right:0;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.12);min-width:180px;overflow:hidden;z-index:200}
.tb-avatar-drop a{display:block;padding:10px 16px;font-size:14px;color:#4a5568;transition:background .15s}
.tb-avatar-drop a:hover{background:#f5f3ff;color:#667eea}
.tb-avatar-drop .tb-logout{color:#dc2626;border-top:1px solid #e2e8f0}

/* Banner */
.tb-banner{margin:20px auto;max-width:1200px;padding:0 20px}
.tb-banner img{width:100%;height:auto;border-radius:16px;box-shadow:0 4px 12px rgba(0,0,0,.08);display:block}

/* Hero */
.tb-hero{text-align:center;padding:48px 20px 32px;max-width:900px;margin:0 auto}
.tb-badge{display:inline-flex;align-items:center;gap:8px;background:#ebf8ff;border:1px solid #bee3f8;border-radius:9999px;padding:8px 16px;font-size:14px;color:#2b6cb0;font-weight:500;margin-bottom:20px}
.tb-badge-dot{width:6px;height:6px;border-radius:50%;background:#3182ce}
.tb-hero h1{font-size:clamp(26px,5vw,48px);font-weight:700;color:#1a202c;margin:0 0 16px;line-height:1.25;letter-spacing:-.02em}
.tb-hero p{font-size:clamp(14px,2.5vw,17px);color:#4a5568;line-height:1.75;max-width:720px;margin:0 auto 32px}
.tb-btns{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:24px}
.tb-btn-primary{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:14px 36px;border-radius:9999px;font-size:17px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:8px;box-shadow:0 4px 12px rgba(102,126,234,.3);transition:all .2s;text-decoration:none}
.tb-btn-primary:hover{opacity:.9;transform:translateY(-1px)}
.tb-btn-secondary{background:#fff;color:#2d3748;border:1.5px solid #cbd5e0;padding:14px 36px;border-radius:9999px;font-size:17px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:all .2s;text-decoration:none}
.tb-btn-secondary:hover{border-color:#667eea;color:#667eea;background:#f5f3ff}

/* 14项因素 */
.tb-section{padding:0 20px 56px;max-width:1200px;margin:0 auto}
.tb-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:16px}
.tb-card-header{padding:20px 24px;border-bottom:1px solid #e2e8f0}
.tb-card-header h2{font-size:20px;font-weight:700;color:#1a202c;margin:0 0 4px}
.tb-card-header p{font-size:14px;color:#718096;margin:0}
.tb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1px;background:#e2e8f0}
.tb-factor{background:#fff;padding:14px 18px;display:flex;align-items:flex-start;gap:12px;transition:background .2s}
.tb-factor:hover{background:#f7fafc}
.tb-factor-n{width:30px;height:30px;border-radius:50%;background:#ebf8ff;color:#667eea;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.tb-factor-body{flex:1;min-width:0}
.tb-factor-name{font-size:13px;font-weight:600;color:#1a202c;line-height:1.4}
.tb-factor-foot{display:flex;align-items:center;justify-content:space-between;margin-top:4px}
.tb-factor-pct{font-size:12px;font-weight:700;color:#667eea;font-variant-numeric:tabular-nums}
.tb-factor-tag{display:flex;align-items:center;gap:4px;font-size:11px;color:#718096}
.tb-dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}
.tb-card-foot{padding:14px 24px;background:#f7fafc;text-align:center;font-size:13px;color:#718096}
.tb-note{font-size:13px;color:#a0aec0;line-height:1.75;text-align:center;margin-top:8px}

/* 三步 */
.tb-steps{padding:0 20px 56px;max-width:1200px;margin:0 auto}
.tb-steps h2{font-size:clamp(22px,4vw,30px);font-weight:700;color:#1a202c;text-align:center;margin:0 0 8px}
.tb-steps-sub{text-align:center;font-size:clamp(14px,2.5vw,17px);color:#4a5568;line-height:1.7;max-width:680px;margin:0 auto 32px}
.tb-steps-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-top:32px}
.tb-step{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:22px;box-shadow:0 2px 6px rgba(0,0,0,.04)}
.tb-step-n{width:38px;height:38px;border-radius:50%;background:#ebf8ff;color:#667eea;font-size:17px;font-weight:700;display:flex;align-items:center;justify-content:center;margin-bottom:14px}
.tb-step h3{font-size:15px;font-weight:700;color:#1a202c;margin:0 0 8px}
.tb-step p{font-size:13px;color:#4a5568;line-height:1.65;margin:0}

/* 评估问卷 */
.tb-quiz{max-width:680px;margin:0 auto;padding:40px 20px}
.tb-progress{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:13px;color:#718096}
.tb-bar{height:6px;background:#e2e8f0;border-radius:9999px;overflow:hidden;margin-bottom:32px}
.tb-bar-fill{height:100%;background:linear-gradient(90deg,#667eea,#764ba2);transition:width .3s ease}
.tb-q{font-size:clamp(18px,3vw,24px);font-weight:700;color:#1a202c;margin:0 0 24px;line-height:1.4}
.tb-qsub{color:#718096;font-size:15px;margin-bottom:20px}
.tb-options{display:flex;flex-direction:column;gap:10px;margin-bottom:32px}
.tb-opt{padding:16px 20px;background:#fff;border:1.5px solid #e2e8f0;border-radius:12px;cursor:pointer;transition:all .2s;font-size:15px;color:#2d3748;text-align:left}
.tb-opt:hover{border-color:#667eea;background:#f5f3ff}
.tb-opt.selected{border-color:#667eea;background:#f5f3ff;color:#667eea;font-weight:600}
.tb-navrow{display:flex;justify-content:space-between;gap:12px}
.tb-prev{padding:12px 24px;border-radius:9999px;border:1.5px solid #e2e8f0;background:#fff;color:#4a5568;font-size:15px;cursor:pointer;transition:all .2s}
.tb-prev:hover{border-color:#667eea;color:#667eea}
.tb-next{padding:12px 32px;border-radius:9999px;border:none;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:15px;font-weight:600;cursor:pointer;transition:all .2s}
.tb-next:hover{opacity:.9}
.tb-next.disabled{opacity:.4;cursor:not-allowed}

/* 结果页 */
.tb-result{max-width:720px;margin:0 auto;padding:40px 20px}
.tb-result-card{background:#fff;border:1px solid #e2e8f0;border-radius:20px;padding:32px;box-shadow:0 4px 16px rgba(0,0,0,.08);margin-bottom:24px;text-align:center}
.tb-result-score{padding:32px 0}
.tb-result-num{font-size:72px;font-weight:800;line-height:1;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.tb-result-label{font-size:16px;color:#718096;margin-top:8px}
.tb-result-level{display:inline-block;padding:6px 20px;border-radius:9999px;font-size:14px;font-weight:600;margin-top:12px}
.tb-result-domains{margin-top:32px;text-align:left}
.tb-result-domain{margin-bottom:16px}
.tb-result-domain-label{font-size:13px;font-weight:600;color:#4a5568;margin-bottom:6px;display:flex;justify-content:space-between}
.tb-result-domain-bar{height:8px;background:#e2e8f0;border-radius:9999px;overflow:hidden}
.tb-result-domain-fill{height:100%;border-radius:9999px;transition:width .8s ease}
.tb-result-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:24px}

/* 表单页 */
.tb-form-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);padding:20px}
.tb-form-card{background:#fff;border-radius:24px;padding:48px;box-shadow:0 20px 60px rgba(0,0,0,.3);width:100%;max-width:420px;text-align:center}
.tb-form-logo{font-size:26px;font-weight:800;color:#1a202c;margin-bottom:4px}
.tb-form-sub{color:#718096;font-size:14px;margin-bottom:32px}
.tb-form-group{margin-bottom:16px;text-align:left}
.tb-form-group label{display:block;font-weight:600;font-size:14px;margin-bottom:6px;color:#1a202c}
.tb-form-group input{width:100%;padding:12px 16px;border:1.5px solid #d1d5db;border-radius:10px;font-size:16px;transition:border-color .2s}
.tb-form-group input:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 3px rgba(102,126,234,.15)}
.tb-check{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:14px;color:#4a5568;margin-bottom:16px}
.tb-submit{width:100%;padding:14px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:10px;font-size:16px;font-weight:700;cursor:pointer;transition:opacity .2s}
.tb-submit:hover{opacity:.9}
.tb-error{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:12px;color:#dc2626;margin-bottom:16px;font-size:14px;text-align:left}
.tb-form-foot{text-align:center;margin-top:20px;font-size:14px;color:#718096}
.tb-form-foot a{color:#667eea;font-weight:600}

/* 内容页 */
.tb-content{max-width:800px;margin:0 auto;padding:48px 20px}
.tb-content h1{font-size:clamp(24px,4vw,36px);font-weight:700;color:#1a202c;margin-bottom:16px}
.tb-content h2{font-size:22px;font-weight:700;color:#1a202c;margin:32px 0 12px}
.tb-content p{font-size:16px;color:#4a5568;line-height:1.8;margin-bottom:16px}
.tb-content ul{margin:16px 0;padding-left:24px}
.tb-content li{font-size:16px;color:#4a5568;line-height:1.8;margin-bottom:8px}
.tb-content .highlight{background:#f5f3ff;border-left:4px solid #667eea;padding:16px 20px;border-radius:0 12px 12px 0;margin:24px 0}
.tb-content .highlight p{margin:0;color:#4a5568}

/* Footer */
.tb-footer{background:#fff;border-top:1px solid #e2e8f0;padding:24px;text-align:center}
.tb-footer p{font-size:13px;color:#a0aec0;margin:0}
.tb-footer a{color:#718096;text-decoration:none}
.tb-footer a:hover{color:#667eea}
.tb-footer-divider{margin:0 8px;color:#e2e8f0}

/* 移动端 */
@media(max-width:768px){
.tb-nav-links a{padding:8px 10px;font-size:13px}
.tb-nav-links span{display:none}
}
.tb-nav-left{display:flex;align-items:center;flex-shrink:0}

/* =====================
   移动端适配优化
   ===================== */
@media (max-width: 640px) { .tb-factors-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 0.75rem; padding: 1rem; } .tb-factor { flex: none !important; min-width: auto !important; border-radius: 0.75rem; } }
  html { font-size: 16px; }
  .tb-option { min-height: 56px !important; padding: 0.875rem 1rem !important; }
  .tb-option-label { font-size: 1rem !important; font-weight: 600; }
  .tb-option-desc { font-size: 0.875rem !important; }
  .tb-quiz-btn { min-height: 48px; font-size: 1rem; padding: 0.75rem 1.25rem; }
  .tb-btn-start, .tb-btn-primary, .tb-btn-secondary { min-height: 48px; font-size: 1rem; padding: 0.875rem 1.5rem; width: 100%; justify-content: center; }
  .tb-banner { border-radius: 0.5rem; margin: 0.5rem; }
  .tb-question-card { padding: 1.25rem; border-radius: 1rem; margin-bottom: 1rem; }
  .tb-progress-text { font-size: 0.875rem; }
  header nav a:not(.tb-btn-start) { padding: 0.5rem 0.75rem; font-size: 0.875rem; }
}

/* =====================
   字号切换功能
   ===================== */
.tb-font-switcher { display: flex; align-items: center; gap: 0.25rem; margin-left: 0.5rem; }
.tb-font-switcher button { width: 32px; height: 32px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; color: #374151; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.tb-font-switcher button:hover { border-color: #2563eb; color: #2563eb; }
.tb-font-switcher button.active { background: #2563eb; color: #fff; border-color: #2563eb; }
body.font-small { font-size: 14px; }
body.font-medium { font-size: 16px; }
body.font-large { font-size: 18px; }
body.font-large .tb-option { min-height: 64px !important; }
body.font-large .tb-question-title { font-size: 1.125rem; }
body.font-large .tb-option-label { font-size: 1.125rem; }


/* 手机端风险因子竖排 */
@media (max-width: 640px) {
  .tb-factors-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 0.75rem; padding: 1rem; }
  .tb-factor { flex: none !important; min-width: auto !important; border-radius: 0.75rem; }
}
