/* ═══════════════════════════════════════════════════════════
   AI 工具对比器 · 样式
   复用 AI 星图设计系统（翡翠绿）
   ═══════════════════════════════════════════════════════════ */

:root{
  --brand:#0da56b;
  --brand-deep:#0a8a58;
  --gold:#d99a1c;
  --text:#16301f;
  --text-dim:#5d7465;
  --text-faint:#94a99b;
  --stroke:#e2ebe5;
  --stroke-strong:#cddfd2;
  --bg:#f6f9f7;
  --bg2:#edf4ef;
  --white:#fff;
  --radius:10px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --mono:"SF Mono",Menlo,Consolas,"Courier New",monospace;
  --grad:linear-gradient(135deg,#0da56b,#1fbf7e);
  --sh:0 1px 2px rgba(22,48,31,.04),0 4px 16px rgba(22,48,31,.05);
  --sh2:0 2px 6px rgba(22,48,31,.06),0 12px 32px rgba(22,48,31,.08);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:var(--font);font-size:15px;line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
button{font-family:inherit;cursor:pointer}
h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.01em}

/* ── 顶栏 ─────────────────────────────────────────────────── */
.cf-header{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:0 20px;height:58px;
  background:rgba(255,255,255,.9);
  backdrop-filter:saturate(180%) blur(12px);
  -webkit-backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--stroke);
}
.cf-logo{display:flex;align-items:center;gap:9px;color:var(--text);flex:0 0 auto}
.cf-logo:hover{text-decoration:none}
.cf-logo-mark{
  width:28px;height:28px;border-radius:8px;background:var(--grad);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:800;
}
.cf-logo-txt{font-size:16px;font-weight:800;display:flex;align-items:baseline;gap:6px}
.cf-logo-sub{
  font-size:11px;font-weight:600;color:var(--brand);
  background:var(--bg2);border:1px solid var(--stroke-strong);
  padding:1px 6px;border-radius:5px;letter-spacing:0;
}
.cf-nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.cf-nav a{
  font-size:13.5px;color:var(--text-dim);padding:6px 10px;border-radius:7px;white-space:nowrap;
}
.cf-nav a:hover{color:var(--brand);background:var(--bg2);text-decoration:none}
.cf-nav a.is-on{color:var(--brand);font-weight:600;background:var(--bg2)}

/* ── 主容器 ──────────────────────────────────────────────── */
.cf-main{max-width:1440px;margin:0 auto;padding:34px 26px 60px}

/* ── 开场 ────────────────────────────────────────────────── */
.cf-hero{text-align:center;padding:12px 0 26px}
.cf-hero h1{font-size:clamp(23px,4.4vw,33px);line-height:1.32;margin-bottom:12px}
.cf-lead{max-width:560px;margin:0 auto;font-size:15px;color:var(--text-dim);line-height:1.8}

/* ── 选择器 ──────────────────────────────────────────────── */
.cf-picker{
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);padding:18px 18px 16px;
  box-shadow:var(--sh);margin-bottom:26px;
}
/* 步骤标签：让「先搜索 → 再选择」的顺序一眼可见 */
.cf-step{display:flex;align-items:center;gap:8px;margin-bottom:9px}
.cf-step-n{
  flex:0 0 auto;font-size:11px;font-weight:700;letter-spacing:.03em;
  color:var(--brand);background:rgba(13,165,107,.09);
  border-radius:5px;padding:2px 7px;
}
.cf-step-t{font-size:13px;font-weight:600;color:var(--text)}
.cf-step-sub{margin-top:16px}
.cf-step-sub .cf-step-n{color:var(--text-dim);background:var(--bg2)}
.cf-step-sub .cf-step-t{color:var(--text-dim);font-weight:600}

.cf-slots-block{padding-top:2px}
.cf-slots{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.cf-slot{
  flex:1;min-width:150px;
  display:flex;align-items:center;gap:9px;
  background:var(--bg);border:1.5px dashed var(--stroke-strong);
  border-radius:9px;padding:11px 13px;
  font-size:13.5px;color:var(--text-faint);
  transition:all .16s ease;
}
.cf-slot.is-filled{
  border-style:solid;border-color:var(--brand);
  background:linear-gradient(180deg,#f4fdf9,#fff);
  color:var(--text);
}
.cf-slot-n{
  flex:0 0 auto;width:20px;height:20px;border-radius:5px;
  background:var(--bg2);color:var(--text-faint);
  font-size:11px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
.cf-slot.is-filled .cf-slot-n{background:var(--grad);color:#fff}
.cf-slot-txt{flex:1;min-width:0;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cf-slot-txt small{display:block;font-size:11.5px;color:var(--text-faint);font-weight:400}
.cf-slot-x{
  flex:0 0 auto;background:none;border:none;color:var(--text-faint);
  font-size:15px;line-height:1;padding:2px 4px;border-radius:4px;
}
.cf-slot-x:hover{color:#c0553a;background:#fdf1ec}

.cf-picker-hint{margin:0 0 12px;font-size:12.5px;color:var(--text-faint)}

/* 搜索框 */
.cf-search-wrap{position:relative;margin-bottom:6px}
.cf-search-box{
  display:flex;align-items:center;gap:9px;
  background:var(--bg2);border:1.5px solid var(--stroke-strong);
  border-radius:9px;padding:0 13px;height:46px;
  transition:all .16s ease;
}
.cf-search-box:focus-within{
  background:var(--white);border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(13,165,107,.1);
}
.cf-search-ico{font-size:14px;opacity:.5;flex:0 0 auto}
.cf-search-box input{
  flex:1;min-width:0;border:none;background:none;outline:none;
  font-size:14.5px;font-family:inherit;color:var(--text);
}
.cf-search-box input::placeholder{color:var(--text-faint)}
.cf-clear{
  flex:0 0 auto;background:none;border:none;color:var(--text-faint);
  font-size:14px;padding:2px 4px;border-radius:4px;
}
.cf-clear:hover{color:var(--text)}

/* 搜索建议 */
.cf-sug{
  position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:20;
  background:var(--white);border:1px solid var(--stroke-strong);
  border-radius:var(--radius);box-shadow:var(--sh2);
  max-height:340px;overflow-y:auto;padding:5px;
}
.cf-sug-item{
  display:flex;align-items:center;gap:10px;
  padding:9px 11px;border-radius:7px;cursor:pointer;
  transition:background .12s ease;
}
.cf-sug-item:hover,.cf-sug-item.is-cur{background:var(--bg2)}
.cf-sug-item.is-dis{opacity:.42;cursor:not-allowed}
.cf-sug-body{flex:1;min-width:0}
.cf-sug-n{font-size:14px;font-weight:600;display:flex;align-items:center;gap:6px}
.cf-sug-d{
  font-size:12.5px;color:var(--text-faint);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.cf-sug-go{
  flex:0 0 auto;font-size:12px;color:var(--brand);font-weight:600;
  white-space:nowrap;
}
.cf-sug-empty{
  padding:16px 12px;text-align:center;
  font-size:13px;color:var(--text-faint);
}

/* ── 按钮 ────────────────────────────────────────────────── */
.cf-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  font-size:14.5px;font-weight:600;color:#fff;background:var(--grad);
  border:none;border-radius:9px;padding:11px 26px;
  box-shadow:0 2px 8px rgba(13,165,107,.22);
  transition:transform .12s ease,box-shadow .16s ease,filter .16s ease;
}
.cf-btn:hover{filter:brightness(1.05);box-shadow:0 4px 14px rgba(13,165,107,.3);text-decoration:none}
.cf-btn:active{transform:translateY(1px)}
.cf-btn-ghost{
  background:var(--white);color:var(--text-dim);
  border:1px solid var(--stroke-strong);box-shadow:none;
}
.cf-btn-ghost:hover{color:var(--brand);border-color:var(--brand);filter:none}
.cf-btn[disabled]{opacity:.42;cursor:not-allowed;box-shadow:none}
.cf-btn[disabled]:hover{filter:none}
.cf-actions{display:flex;flex-wrap:wrap;gap:10px}
.cf-actions-2{margin-top:32px}

/* ── 快捷组合 ────────────────────────────────────────────── */
.cf-presets{margin-bottom:30px}
.cf-presets-head{margin-bottom:14px}
.cf-presets-head h2{font-size:16px}
.cf-presets-head p{margin:4px 0 0;font-size:13px;color:var(--text-faint)}
.cf-preset-list{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}
.cf-preset{
  text-align:left;background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);padding:12px 14px;
  transition:border-color .16s ease,box-shadow .16s ease,transform .12s ease;
}
.cf-preset:hover{
  border-color:var(--brand);box-shadow:0 2px 10px rgba(13,165,107,.13);
  transform:translateY(-1px);
}
.cf-preset-t{display:block;font-size:13.5px;font-weight:600;margin-bottom:3px}
.cf-preset-n{display:block;font-size:12.5px;color:var(--text-faint);line-height:1.5}
.cf-preset-tools{
  display:flex;gap:5px;flex-wrap:wrap;margin-top:7px;
}
.cf-preset-tools i{
  font-style:normal;font-size:11px;color:var(--brand);
  background:var(--bg2);border-radius:4px;padding:1px 7px;
}

/* ── 结果 ────────────────────────────────────────────────── */
.cf-result{padding:4px 0 0}
.cf-concl{
  background:var(--white);border:1px solid var(--stroke);
  border-left:3px solid var(--brand);
  border-radius:var(--radius);padding:19px 21px;margin-bottom:20px;
  box-shadow:var(--sh);
}
.cf-concl p{margin:0 0 9px;font-size:15.5px;line-height:1.85}
.cf-concl p:last-child{margin-bottom:0}
.cf-concl b{color:var(--brand);font-weight:700}

/* 工具卡片 */
.cf-tools{display:grid;gap:11px;margin-bottom:26px;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.cf-tool{
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);padding:14px 15px;
  box-shadow:var(--sh);position:relative;
}
.cf-tool.is-top{border-color:var(--brand);background:linear-gradient(180deg,#f4fdf9,#fff)}
.cf-tool-badge{
  position:absolute;top:11px;right:12px;
  font-size:10.5px;font-weight:700;color:#fff;
  background:var(--grad);border-radius:4px;padding:1.5px 7px;
}
.cf-tool-n{
  font-size:15px;font-weight:700;margin:0 0 4px;
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  padding-right:46px;
}
.cf-tool-n a{color:var(--text)}
.cf-tool-n a:hover{color:var(--brand);text-decoration:none}
.cf-tool-sc{
  font-size:11.5px;color:var(--text-faint);font-weight:500;
}
.cf-tool-d{font-size:12.5px;color:var(--text-dim);line-height:1.6;margin:0}
.cf-tool-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}
.cf-tool-tag{
  font-size:11.5px;color:var(--text-dim);
  background:var(--bg);border:1px solid var(--stroke);
  border-radius:5px;padding:2px 8px;
}
.cf-tool-tag.is-bad{color:#a2502f;background:#fdf1ec;border-color:#f2d9cd}
.cf-tool-tag.is-good{color:var(--brand-deep);background:#e6f6ee;border-color:#c2e6d4}

/* 表格 */
.cf-sec-head{margin:26px 0 13px}
.cf-sec-head h2{font-size:17px}
.cf-sec-head-2{margin-top:36px}
.cf-sec-sub{margin:4px 0 0;font-size:13px;color:var(--text-faint)}

.cf-table-wrap{
  overflow-x:auto;border:1px solid var(--stroke);border-radius:var(--radius);
  background:var(--white);box-shadow:var(--sh);
  -webkit-overflow-scrolling:touch;
}
.cf-table{border-collapse:collapse;width:100%;min-width:520px;font-size:13.5px}
.cf-table th,.cf-table td{
  padding:11px 14px;text-align:left;vertical-align:top;
  border-bottom:1px solid var(--stroke);
}
.cf-table tr:last-child td{border-bottom:none}
.cf-table thead th{
  background:var(--bg2);font-size:12.5px;font-weight:700;
  color:var(--text-dim);white-space:nowrap;
  position:sticky;top:0;
}
.cf-table tbody th{
  font-weight:600;color:var(--text-dim);font-size:12.5px;
  background:var(--bg);width:96px;white-space:nowrap;
}
.cf-cell{position:relative}
.cf-cell.is-best{background:#f4fdf9}
.cf-cell.is-best::after{
  content:"更优";position:absolute;top:6px;right:8px;
  font-size:10px;font-weight:700;color:var(--brand);
  background:#e6f6ee;border-radius:3px;padding:0 5px;
}
.cf-cell-v{display:block;font-weight:600}
.cf-cell-sub{
  display:block;font-size:12px;color:var(--text-faint);
  margin-top:3px;line-height:1.5;
}
.cf-cell-sub.is-uniq{color:var(--brand)}
.cf-row-diff th::after{
  content:"•";color:var(--brand);margin-left:5px;
}
.cf-feat-list{display:flex;flex-wrap:wrap;gap:4px}
.cf-feat{
  font-size:11.5px;background:var(--bg2);border-radius:4px;padding:1.5px 7px;
  color:var(--text-dim);
}
.cf-feat.is-uniq{background:#e6f6ee;color:var(--brand-deep);font-weight:600}
.cf-note{
  font-size:12.5px;color:var(--text-faint);
  background:var(--bg);border-radius:7px;
  padding:9px 13px;margin:11px 0 0;line-height:1.7;
}
.cf-note b{color:var(--text-dim)}

/* 定位卡片 */
.cf-picks{display:flex;flex-direction:column;gap:10px}
.cf-pick{
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);padding:14px 16px;
  box-shadow:var(--sh);
}
/* 首选卡：左侧加绿条 + 轻微提亮，让「先试哪个」一眼可见 */
.cf-pick.is-top{
  border-color:var(--brand);position:relative;
  padding-left:19px;
  box-shadow:0 2px 14px rgba(13,165,107,.10);
}
.cf-pick.is-top::before{
  content:'';position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--grad);border-radius:var(--radius) 0 0 var(--radius);
}
.cf-pick-badge{
  font-size:11px;font-weight:700;letter-spacing:.04em;
  color:#fff;background:var(--grad);border-radius:4px;padding:2px 8px;
}
.cf-pick-n{
  font-size:14.5px;font-weight:700;margin-bottom:7px;
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.cf-pick-n i{
  font-style:normal;font-size:11px;font-weight:600;
  color:var(--brand);background:var(--bg2);border-radius:4px;padding:1px 7px;
}
.cf-pick-rs{display:flex;flex-wrap:wrap;gap:6px}
.cf-pick-r{
  font-size:12.5px;color:var(--text);
  background:var(--bg2);border-radius:6px;padding:3px 10px;
}
.cf-pick-r.is-bad{color:#a2502f;background:#fdf1ec}
.cf-dis{
  margin:20px 0 0;font-size:12px;color:var(--text-faint);line-height:1.75;
}

/* ── 空态 ────────────────────────────────────────────────── */
.cf-empty{
  text-align:center;padding:44px 20px;
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);
}
.cf-empty h2{font-size:17px;margin-bottom:9px}
.cf-empty p{font-size:13.5px;color:var(--text-dim);max-width:400px;margin:0 auto;line-height:1.8}

/* ── 页脚 ────────────────────────────────────────────────── */
.cf-footer{
  border-top:1px solid var(--stroke);background:var(--white);
  padding:28px 20px 34px;text-align:center;
}
.cf-foot-links{
  margin:0 0 10px;font-size:13px;color:var(--text-faint);
  display:flex;justify-content:center;flex-wrap:wrap;gap:8px;
}
.cf-foot-links a{color:var(--text-dim)}
.cf-foot-links span{color:var(--stroke-strong)}
.cf-foot-note{margin:0;font-size:12px;color:var(--text-faint)}
.p-beian{
  margin-top:10px;display:flex;justify-content:center;
  align-items:center;gap:8px 16px;flex-wrap:wrap;
  font-size:12px;color:var(--text-faint);
}
.p-beian a{color:var(--text-faint);text-decoration:none}
.p-beian a:hover{color:var(--brand);text-decoration:none}

/* ── Toast ───────────────────────────────────────────────── */
.cf-toast{
  position:fixed;left:50%;bottom:34px;transform:translate(-50%,14px);
  background:#16301f;color:#fff;font-size:13px;
  padding:10px 20px;border-radius:9px;
  box-shadow:0 8px 28px rgba(22,48,31,.28);
  opacity:0;pointer-events:none;transition:opacity .22s ease,transform .22s ease;
  z-index:60;max-width:86vw;text-align:center;
}
.cf-toast.is-on{opacity:1;transform:translate(-50%,0)}

/* ── 响应式 ──────────────────────────────────────────────── */
@media (max-width:680px){
  .cf-header{padding:0 14px;height:54px;gap:10px}
  .cf-logo-sub{display:none}
  .cf-nav a{padding:6px 8px;font-size:13px}
  .cf-nav a:nth-child(2){display:none}
  .cf-main{padding:24px 15px 48px}
  .cf-preset-list{grid-template-columns:1fr}
  .cf-hero h1{font-size:22px}
  .cf-slot{min-width:100%}
  .cf-actions .cf-btn{flex:1;min-width:130px}
  .cf-tools{grid-template-columns:1fr}
  /* 手机上表格改为卡片式：每个工具一块，避免横向滚动 */
  .cf-table{min-width:0}
  .cf-table thead{display:none}
  .cf-table tbody th{
    display:block;width:auto;border-bottom:none;
    padding:12px 14px 0;background:transparent;
  }
  .cf-table tr{
    display:block;border-bottom:1px solid var(--stroke);padding-bottom:10px;
  }
  .cf-table tr:last-child{border-bottom:none}
  .cf-table td{
    display:block;border-bottom:none;padding:8px 14px 0;
  }
  .cf-table td::before{
    content:attr(data-tool);display:block;
    font-size:11.5px;color:var(--text-faint);margin-bottom:2px;
  }
  .cf-cell.is-best::after{display:none}
  .cf-cell.is-best{background:transparent;border-left:2px solid var(--brand);
    padding-left:12px;margin-left:2px}
}

@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}
