:root {
  --blue: #1f6feb;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #667085;
  --border: #e4e8ee;
  --green: #1a7f37;
  --amber: #b35900;
  --red: #cf222e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 17px; color: var(--blue); text-decoration: none; }
main { max-width: 880px; margin: 0 auto; padding: 28px 20px 80px; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px 24px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card h2 .sub { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }

.btn {
  background: var(--blue); color: #fff; border: none; border-radius: 8px;
  padding: 10px 22px; font-size: 15px; cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 6px 14px; font-size: 13px; }
input[type=text], input[type=password] {
  width: 100%; padding: 11px 14px; font-size: 15px;
  border: 1px solid var(--border); border-radius: 8px; outline: none;
}
input:focus { border-color: var(--blue); }
.row { display: flex; gap: 10px; }
.row input { flex: 1; }

.login-box { max-width: 360px; margin: 80px auto; text-align: center; }
.login-box h1 { font-size: 20px; }
.err { color: var(--red); font-size: 13px; min-height: 20px; margin: 8px 0; }

.list-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #fafbfc; }
.list-item .meta { color: var(--muted); font-size: 12px; margin-left: 10px; }
.li-main { font-weight: 500; }
.li-tags { display: flex; gap: 6px; flex-shrink: 0; }

/* 竞争对手广告素材画廊 */
.ad-links { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ad-tab {
  padding: 5px 14px; font-size: 13px; border: 1px solid var(--border); background: #fff;
  border-radius: 999px; cursor: pointer; color: var(--muted);
}
.ad-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ad-card { text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: box-shadow .15s; }
.ad-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.ad-thumb { position: relative; background: #f2f5f9; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.ad-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ad-thumb.no-img::after { content: "点击查看完整广告 →"; color: var(--blue); font-size: 12px; padding: 0 10px; text-align: center; }
.ad-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; padding: 0 10px; text-align: center; }
.ad-ph-icon { font-size: 30px; line-height: 1; }
.ad-fmt-badge {
  position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
}
.ad-meta { padding: 6px 8px; font-size: 12px; color: var(--text); }
.ad-link { text-decoration: none; color: var(--text); display: block; }
.ad-card { position: relative; }
.ad-pick { position: absolute; top: 6px; right: 6px; z-index: 2; background: rgba(255,255,255,.9); border-radius: 5px; padding: 2px 4px; cursor: pointer; line-height: 0; }
.ad-pick input { width: 16px; height: 16px; cursor: pointer; }
.ad-ops { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-op {
  flex: 1; min-width: 240px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--blue); background: #f3f8ff; border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; transition: background .15s;
}
.ad-op:hover { background: #e7f0ff; }
.ad-op-t { font-size: 16px; font-weight: 700; color: var(--blue); }
.ad-op-d { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; align-items: center; justify-content: center; padding: 20px; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 22px 24px; max-width: 380px; width: 100%; }
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal input { width: 100%; padding: 11px 14px; font-size: 15px; border: 1px solid var(--border); border-radius: 8px; margin: 10px 0 0; }
.modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.saas-alert {
  background: #fff1f0; border: 2px solid var(--red); border-left: 6px solid var(--red);
  border-radius: 10px; padding: 16px 20px; margin-bottom: 16px;
}
.saas-alert-title { font-size: 17px; font-weight: 800; color: var(--red); margin-bottom: 6px; }
.saas-alert p { margin: 0; font-size: 14px; color: #5c1d1a; line-height: 1.7; }
.saas-alert b { color: var(--red); }

.records-head { display: flex; justify-content: space-between; align-items: center; }
.filters { display: flex; gap: 8px; margin: 4px 0 14px; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 160px; padding: 8px 12px; font-size: 14px; }
.filters select {
  padding: 8px 10px; font-size: 14px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--text); cursor: pointer;
}
.list-more { text-align: center; margin-top: 14px; }

.badge {
  display: inline-block; padding: 1px 10px; border-radius: 999px;
  font-size: 12px; white-space: nowrap;
}
.badge.pass, .badge.complete, .badge.ok { background: #dafbe1; color: var(--green); }
.badge.warn, .badge.running, .badge.pending { background: #fff1e0; color: var(--amber); }
.badge.fail, .badge.failed, .badge.error { background: #ffebe9; color: var(--red); }
.badge.info, .badge.na { background: #eef1f5; color: var(--muted); }

.kv { display: flex; padding: 5px 0; font-size: 14px; }
.kv > span { width: 160px; flex-shrink: 0; color: var(--muted); }
.kv > b { font-weight: 600; word-break: break-all; }

table.checks { width: 100%; border-collapse: collapse; font-size: 14px; }
table.checks td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.checks td:first-child { width: 140px; white-space: nowrap; }
table.checks td:nth-child(2) { width: 70px; }
table.checks tr:last-child td { border-bottom: none; }
.detail { color: var(--muted); font-size: 13px; }

.score-wrap { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.score {
  font-size: 38px; font-weight: 800; min-width: 110px; text-align: center;
  border-radius: 10px; padding: 8px 0;
}
.score.good { background: #dafbe1; color: var(--green); }
.score.mid { background: #fff1e0; color: var(--amber); }
.score.bad { background: #ffebe9; color: var(--red); }

.progress-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 15px; border-bottom: 1px dashed var(--border); }
.progress-line:last-child { border-bottom: none; }
.spinner {
  width: 15px; height: 15px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
.dot { width: 15px; text-align: center; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.summary .good-li { color: var(--green); }
.summary .bad-li { color: var(--red); }
.summary ul { margin: 6px 0; padding-left: 22px; }
.summary li { margin: 4px 0; }
.disclaimer { color: var(--muted); font-size: 12px; margin-top: 10px; }

.ai-bar { background: #eef1f5; border-radius: 6px; height: 10px; width: 160px; display: inline-block; vertical-align: middle; }
.ai-bar > i { display: block; height: 100%; border-radius: 6px; background: var(--amber); }

.ps-wrap { display: flex; gap: 18px; flex-wrap: wrap; }
.ps-col { flex: 1; min-width: 230px; }
.ps-label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ps-col .score { display: inline-block; padding: 4px 0; }

.report-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.report-head h1 { font-size: 20px; margin: 0; word-break: break-all; }
.muted { color: var(--muted); }
.hidden { display: none; }
a { color: var(--blue); }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: 1px solid #ccc; break-inside: avoid; }
  main { max-width: 100%; padding: 0; }
}

.ad-empty { text-align: center; padding: 28px 16px 20px; color: var(--muted); }
.ad-empty-icon { font-size: 36px; line-height: 1; margin-bottom: 10px; }
.ad-empty-msg { font-size: 15px; color: var(--text); margin: 0; font-weight: 500; }

/* /ads/ 公开版 hero + 页脚 */
.hdr-right { float: right; display: inline-flex; align-items: center; gap: 10px; }
.cache-note { font-size: 12px; color: var(--muted); font-weight: 400; }
.btn.sm { padding: 4px 12px; font-size: 13px; }
.hl { background: #fff3cd; color: #b54708; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.nav-link { color: var(--blue); font-weight: 600; font-size: 14px; text-decoration: none; }
.nav-link:hover { text-decoration: underline; }
.site-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }
.hero { text-align: center; max-width: 640px; margin: 30px auto 18px; }
.hero h1 { font-size: 24px; margin: 0 0 8px; }
.hero p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
