:root{
  --bg:#f4f6f8; --card:#ffffff; --ink:#1d2430; --sub:#6b7686; --line:#e6eaf0;
  --red:#e23b3b; --red-bg:#fdecec; --yellow:#e0a106; --yellow-bg:#fdf6e3;
  --green:#1f9d5b; --green-bg:#e9f8ef; --brand:#2b3a55; --accent:#3a6ea5;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0;padding:0;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  background:var(--bg); color:var(--ink); font-size:15px; line-height:1.6;
  max-width:640px; margin:0 auto; padding-bottom:40px;
}
.topbar{background:var(--brand); color:#fff; padding:16px 18px 14px;}
.brand{font-size:19px; font-weight:700; letter-spacing:1px;}
.sub{font-size:12.5px; opacity:.8; margin-top:3px;}

.screen{display:none; padding:14px 14px 0;}
.screen.active{display:block;}

/* 搜索 */
.search-wrap{padding:6px 0 10px;}
#search{width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:12px;
  font-size:15px; background:#fff; outline:none;}
#search:focus{border-color:var(--accent);}

/* 类型卡片 */
.type-list{display:flex; flex-direction:column; gap:14px;}
.cat-title{font-size:13px; color:var(--sub); font-weight:600; margin:6px 2px 2px;}
.type-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px;}
.type-card{background:var(--card); border:1px solid var(--line); border-radius:12px;
  padding:12px 12px; cursor:pointer; transition:.15s; position:relative;}
.type-card:active{transform:scale(.98);}
.type-card .tname{font-weight:600; font-size:14.5px;}
.type-card .tmeta{font-size:11.5px; color:var(--sub); margin-top:4px;}
.type-card .cap{display:inline-block; font-size:10.5px; padding:1px 6px; border-radius:6px; margin-top:6px;}
.cap.high{background:#fdeaea; color:var(--red);}
.cap.mid{background:#eef3fb; color:var(--accent);}
.cap.low{background:#eef1f4; color:var(--sub);}

.footnote{font-size:11.5px; color:var(--sub); text-align:center; margin:18px 6px;}

/* 自检屏 */
.crumb{font-size:13px; margin-bottom:8px;}
.crumb a{color:var(--accent); text-decoration:none;}
h2{font-size:19px; margin:4px 0 10px;}
.risk-map{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px;}
.risk-chip{font-size:12px; background:#eef3fb; color:var(--accent); padding:4px 10px; border-radius:20px;}
.block{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px; margin:14px 0;}
.block h3{font-size:15.5px; margin:0 0 10px;}
.hint{font-size:11.5px; color:var(--sub); font-weight:400;}

.redflag-list{display:flex; flex-direction:column; gap:8px;}
.rf-item{display:flex; gap:10px; align-items:flex-start; padding:11px 12px; border:1px solid var(--line);
  border-radius:10px; cursor:pointer; background:#fff;}
.rf-item.checked{background:var(--red-bg); border-color:#f3c0c0;}
.rf-box{flex:0 0 18px; width:18px; height:18px; border:2px solid #c4ccd6; border-radius:5px; margin-top:1px;
  text-align:center; line-height:14px; font-size:13px; color:#fff;}
.rf-item.checked .rf-box{background:var(--red); border-color:var(--red);}
.rf-main{flex:1 1 auto; min-width:0;}
.rf-head{display:flex; gap:8px; align-items:flex-start;}
.rf-text{flex:1 1 auto; min-width:0; font-size:14px; line-height:1.55; word-break:break-word;}
.rf-sig{display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-top:7px; font-size:11.5px; color:var(--sub);}
.rf-sig-h{margin-right:1px;}
.rf-chip{background:#f1f4f8; color:#57616f; border-radius:5px; padding:1px 7px; font-size:11.5px; line-height:1.65;}
.rf-item.checked .rf-chip{background:#f9dede; color:#a63333;}
.sev{flex:0 0 auto; font-size:10px; padding:1px 5px; border-radius:5px; margin-top:2px; white-space:nowrap;}
.sev.s3{background:var(--red); color:#fff;}
.sev.s2{background:var(--yellow); color:#fff;}
.sev.s1{background:#cfd6df; color:#fff;}

.iron-list{display:flex; flex-direction:column; gap:12px;}
.iron-q{font-size:14px; font-weight:500;}
.iron-opt{display:flex; gap:8px; margin-top:6px;}
.iron-opt button{flex:1; padding:9px 0; border:1px solid var(--line); border-radius:9px; background:#fff; font-size:13.5px; cursor:pointer;}
.iron-opt button.on-yes{background:var(--red-bg); border-color:var(--red); color:var(--red); font-weight:600;}
.iron-opt button.on-no{background:var(--green-bg); border-color:var(--green); color:var(--green); font-weight:600;}

.btn-primary{display:block; width:100%; padding:14px; background:var(--brand); color:#fff; border:none;
  border-radius:12px; font-size:16px; font-weight:600; margin:16px 0; cursor:pointer;}
.btn-primary:active{opacity:.9;}

/* 结论屏 */
.verdict-badge{font-size:24px; font-weight:800; text-align:center; padding:22px 10px; border-radius:16px; margin:6px 0 10px;}
.verdict-badge.red{background:var(--red-bg); color:var(--red);}
.verdict-badge.yellow{background:var(--yellow-bg); color:var(--yellow);}
.verdict-badge.green{background:var(--green-bg); color:var(--green);}
.verdict-words{font-size:15px; text-align:center; margin:0 8px 4px; line-height:1.7;}

.calc{display:flex; flex-direction:column; gap:10px;}
#idle-money{width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:10px; font-size:16px;}
.calc-out{font-size:15px; font-weight:600; color:var(--brand); min-height:22px;}
.calc-out .big{font-size:22px;}
.discipline{font-size:12px; color:var(--sub); margin:8px 2px 0;}

.hit-list{display:flex; flex-direction:column; gap:8px;}
.hit-item{font-size:13.5px; padding:9px 11px; background:var(--red-bg); border-left:3px solid var(--red); border-radius:0 8px 8px 0;}
.hit-item .sev{margin-left:6px; vertical-align:middle;}

.case-list{display:flex; flex-direction:column; gap:10px;}
.case-item{border:1px solid var(--line); border-radius:10px; padding:11px; background:#fafbfc;}
.case-item .ct{font-weight:600; font-size:14px;}
.case-item .cs{font-size:13px; color:var(--ink); margin-top:4px;}
.case-item .cl{font-size:12.5px; color:var(--green); margin-top:5px;}
.case-item .ctag{font-size:10.5px; color:var(--sub); float:right;}

.card-list{display:flex; flex-direction:column; gap:10px;}
.cap-card{border:1px solid var(--line); border-radius:10px; padding:11px; background:#fff;}
.cap-card .ch{font-weight:600; font-size:14px;}
.cap-card .co{font-size:12.5px; color:var(--accent); margin:4px 0 6px;}
.cap-card .cb{font-size:13px; color:var(--ink); line-height:1.7;}
.cap-card details{margin-top:6px;}
.cap-card summary{font-size:12.5px; color:var(--accent); cursor:pointer;}

.disclaimer{font-size:11.5px; color:var(--sub); background:#f0f2f5; border-radius:10px; padding:12px; margin:16px 0; line-height:1.7;}
.disclaimer strong{color:var(--ink);}

.empty{font-size:13px; color:var(--sub); text-align:center; padding:14px;}
