:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e6e9ef;
  --line-soft: #eef1f6;
  --text: #1e2430;
  --text-2: #4a5568;
  --muted: #7b8697;
  --primary: #2563eb;
  --primary-soft: #eff4ff;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --r: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------- topbar */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .5px;
  flex: 0 0 auto;
}

.brand h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .2px;
}

.brand p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ------------------------------------------------------- topbar 快速检测 */
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

a.brand {
  text-decoration: none;
  color: inherit;
  flex: 0 1 auto;
  min-width: 0;
}

.quick-form {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 400px;
  min-width: 0;
}

.quick-form input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfd;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.quick-form input::placeholder { color: #a7b0be; }

.quick-form input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.quick-form button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}

.quick-form button:hover { background: #1d4ed8; }

/* ---------------------------------------------------------------- 报告 tab */
.tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 17px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.tab:hover { background: #f4f6fa; }

.tab.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.tab-score {
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef1f6;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.tab.active .tab-score {
  background: #dbe7ff;
  color: var(--primary);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ------------------------------------------------------------ 双分并排 */
.score-pair {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  flex: 0 0 auto;
}

.score-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.score-name {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.score-layer {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  cursor: help;
}

.score-layer b {
  font-weight: 600;
  color: var(--text-2);
}

.score-layer i {
  font-style: normal;
  opacity: .5;
  margin: 0 1px;
}

.score-card.seo-good { color: var(--ok); }
.score-card.seo-ok   { color: var(--primary); }
.score-card.seo-warn { color: var(--warn); }
.score-card.seo-bad  { color: var(--bad); }

.badge.seo-good { background: #eafaf0; color: #15803d; }
.badge.seo-ok   { background: var(--primary-soft); color: var(--primary); }
.badge.seo-warn { background: #fef6e7; color: #b45309; }
.badge.seo-bad  { background: #fef2f2; color: #b91c1c; }

/* ---------------------------------------------------------------- panels */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 18px;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.panel-head p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ form */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
}

input[type=text],
input[type=password],
input[type=number] {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, background .15s;
}

input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

input::placeholder {
  color: #a8b1c0;
}

.ftp-block {
  margin: 4px 0 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0 16px;
  background: #fbfcfe;
}

.ftp-block[open] {
  padding-bottom: 4px;
}

.ftp-block summary {
  cursor: pointer;
  padding: 13px 0;
  font-size: 13px;
  color: var(--text-2);
  list-style: none;
}

.ftp-block summary::-webkit-details-marker { display: none; }

.ftp-block summary::before {
  content: "+";
  display: inline-block;
  width: 16px;
  color: var(--primary);
  font-weight: 600;
}

.ftp-block[open] summary::before { content: "−"; }

.tip {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.ftp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 14px;
}

.ftp-grid .span2 { grid-column: span 2; }

.btn-primary {
  height: 44px;
  padding: 0 30px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}

.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #9db4e8; cursor: default; }

.form-hint {
  margin-left: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: 13px;
}

/* ----------------------------------------------------------------- intro */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.intro-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 22px;
}

.intro-card h3 {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.intro-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
}

/* ------------------------------------------------------------ score card */
.result-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px 28px 26px;
  margin-bottom: 18px;
}

.head-tip {
  position: absolute;
  top: 11px;
  right: 26px;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: .2px;
}

.score-card {
  position: relative;
  width: 128px;
  height: 128px;
  flex: 0 0 auto;
  color: var(--primary);
}

.score-card.grade-ai-ready { color: var(--ok); }
.score-card.grade-good { color: var(--primary); }
.score-card.grade-fair { color: var(--warn); }
.score-card.grade-poor { color: var(--bad); }

.score-card .ring {
  width: 128px;
  height: 128px;
  display: block;
}

.score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.score-text strong {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.5px;
}

.score-text span {
  font-size: 11px;
  color: var(--muted);
}

.head-meta { min-width: 0; }

.site-title {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.grade-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.grade-desc {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-2);
}

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.grade-ai-ready { background: #eafaf0; color: #15803d; }
.badge.grade-good { background: var(--primary-soft); color: var(--primary); }
.badge.grade-fair { background: #fef6e7; color: #b45309; }
.badge.grade-poor { background: #fef2f2; color: #b91c1c; }

.target {
  margin: 10px 0 12px;
  font-size: 13px;
  color: var(--primary);
  word-break: break-all;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stats li {
  font-size: 12px;
  color: var(--text-2);
  background: #f5f7fa;
  border-radius: 6px;
  padding: 3px 9px;
}

.note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ----------------------------------------------------------------- radar */
.radar-panel {
  display: flex;
  align-items: center;
  gap: 32px;
}

.radar-wrap {
  flex: 0 0 400px;
  max-width: 400px;
}

.radar-wrap svg { display: block; }

.dim-bars {
  flex: 1;
  min-width: 0;
}

.dim-bar { margin-bottom: 16px; }
.dim-bar:last-child { margin-bottom: 0; }

.dim-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.dim-name { font-size: 13px; color: var(--text-2); }

.dim-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.dim-val i {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  font-size: 11.5px;
}

.track {
  height: 6px;
  background: #eef1f6;
  border-radius: 3px;
  overflow: hidden;
}

.fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s ease;
}

.fill.lv-a { background: var(--ok); }
.fill.lv-b { background: var(--primary); }
.fill.lv-c { background: var(--warn); }
.fill.lv-d { background: var(--bad); }

.dim-hint {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ----------------------------------------------------------------- fixes */
.prio-title {
  font-size: 13px;
  font-weight: 600;
  margin: 22px 0 10px;
  padding-left: 2px;
}

.prio-title:first-of-type { margin-top: 0; }

.prio-title.prio-p0 { color: var(--bad); }
.prio-title.prio-p1 { color: var(--warn); }
.prio-title.prio-p2 { color: var(--muted); }

.prio-title .count {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}

.fix-list {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}

.fix-item {
  display: flex;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: flex-start;
}

.fix-item:last-child { border-bottom: 0; }
.fix-item:nth-child(even) { background: #fcfdff; }

/* 从另一份报告跳过来时，短暂标出落点 */
.fix-item.flash {
  background: #f2f6ff;
  box-shadow: inset 3px 0 0 var(--primary);
  transition: background .25s, box-shadow .25s;
}

.fix-main { flex: 1; min-width: 0; }

.fix-title {
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: .3px;
}

.tag-p0 { background: #fef2f2; color: #b91c1c; }
.tag-p1 { background: #fef6e7; color: #b45309; }
.tag-p2 { background: #f1f3f7; color: #64748b; }

.gain {
  font-size: 11.5px;
  color: var(--ok);
  font-weight: 500;
}

.effort {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
}

/* 与另一份报告重复的项：点一下跳过去看那条 */
.cross-tag {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 1px 9px;
  border: 1px solid #d6e0ff;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}

.cross-tag:hover {
  background: #e3ebff;
  border-color: #c2d2ff;
}

/* 合并项的拆分明细：一条动作覆盖多个缺口时列出来 */
.fix-subs {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line-soft);
}

.fix-subs li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  position: relative;
  padding: 2px 0 2px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.fix-subs li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfd6e2;
}

.fix-subs .sub-title {
  flex: 0 0 auto;
  color: var(--text-2);
  font-weight: 500;
}

.fix-subs .sub-lost {
  flex: 0 0 auto;
  color: var(--bad);
  font-size: 11.5px;
}

.fix-subs li.auto .sub-lost {
  color: var(--muted);
}

/* 证据压成一行，超出省略，悬停看全文 */
.fix-subs em {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  color: var(--muted);
  font-size: 11.5px;
}

.fix-why {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.fix-how {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.7;
}

.fix-how b { color: var(--text); font-weight: 500; }

.how-hint {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--primary);
}

.fix-dim {
  flex: 0 0 130px;
  text-align: right;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  padding-top: 2px;
  white-space: nowrap;
}

/* ----------------------------------------------------------------- table */
.table-scroll { overflow-x: auto; }

.bot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.bot-table th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  padding: 0 12px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.bot-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.bot-table tr:last-child td { border-bottom: 0; }
.bot-table tbody tr:hover { background: #fbfcfe; }

.mono {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
}

.muted { color: var(--muted); }

.pill {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.pill-search { background: #eef4ff; color: #1d4ed8; }
.pill-train { background: #f4f5f8; color: #64748b; }

.st {
  font-size: 12px;
  white-space: nowrap;
}

.st::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

.st-ok { color: #15803d; }
.st-ok::before { background: var(--ok); }
.st-bad { color: #b91c1c; }
.st-bad::before { background: var(--bad); }
.st-warn { color: #b45309; }
.st-warn::before { background: var(--warn); }

/* ------------------------------------------------------------------ dims */
.dim-block {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.dim-block summary {
  display: grid;
  grid-template-columns: 150px 70px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  background: #fbfcfe;
}

.dim-block summary::-webkit-details-marker { display: none; }
.dim-block[open] summary { border-bottom: 1px solid var(--line-soft); background: #fff; }

.dim-block-name { font-size: 13.5px; font-weight: 500; }

.dim-block-score {
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.dim-block-bar {
  height: 5px;
  background: #eef1f6;
  border-radius: 3px;
  overflow: hidden;
  max-width: 320px;
}

.dim-block-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}

.items { padding: 4px 18px 12px; }

.item {
  padding: 12px 0 12px 18px;
  border-bottom: 1px dashed var(--line-soft);
  position: relative;
}

.item:last-child { border-bottom: 0; }

.item .dot {
  position: absolute;
  left: 0;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.item.st-pass .dot { background: var(--ok); }
.item.st-partial .dot { background: var(--warn); }
.item.st-fail .dot { background: var(--bad); }
.item.st-skip .dot { background: #cbd5e1; }

.item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.item-title { font-size: 13px; font-weight: 500; }

.item-score {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item-ev {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.7;
}

.item-fix {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 7px 11px;
  line-height: 1.65;
}

.item-fix::before {
  content: "怎么改：";
  font-weight: 600;
}

/* ------------------------------------------------------------- boundary */
.boundary h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.boundary ul {
  margin: 0;
  padding-left: 18px;
}

.boundary li {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 4px;
}

.boundary b { color: var(--text); font-weight: 500; }

.coverage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cov-col {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px 18px;
  background: #fbfcfe;
}

.cov-col h3 {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ok);
}

.cov-none h3 { color: var(--muted); }

.cov-col ul {
  margin: 0;
  padding-left: 16px;
}

.cov-col li {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.8;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* --------------------------------------------------------------- footer */
.footer {
  padding: 8px 0 40px;
  font-size: 12px;
  color: #a0aab8;
}

.footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* -------------------------------------------------------------- loading */
.loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(244, 246, 249, .82);
  backdrop-filter: blur(2px);
  z-index: 99;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.loading.show { display: flex; }

.loading p { margin: 0; font-size: 13px; color: var(--text-2); }

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dbe4f5;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .radar-panel { flex-direction: column; align-items: stretch; }
  .radar-wrap { flex: none; max-width: 100%; margin: 0 auto; }
  .result-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .ftp-grid { grid-template-columns: 1fr 1fr; }
  .ftp-grid .span2 { grid-column: span 2; }
  .intro-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .panel { padding: 18px; }
  .dim-block summary { grid-template-columns: 1fr 60px; }
  .dim-block-bar { display: none; }
  .fix-item { flex-direction: column; gap: 6px; }
  .fix-dim { text-align: left; }
  .form-hint { display: block; margin: 10px 0 0; }
  .ftp-grid { grid-template-columns: 1fr; }
  .ftp-grid .span2 { grid-column: span 1; }
}

/* -------------------------------------------------------------- verdict */
.verdict {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f0f6ff;
  border: 1px solid #d6e4ff;
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.verdict-tag {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  padding-top: 1px;
  white-space: nowrap;
}

.verdict p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
}

.verdict { flex-wrap: wrap; }

.verdict-sub {
  flex: 1 1 100%;
  padding-left: 60px;
  font-size: 12.5px !important;
  color: var(--muted) !important;
}

/* ------------------------------------------------------------- code box */
.code-box {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfe;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: #eef2f7;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.code-label {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.code-where {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  margin-left: auto;
  flex: 0 0 auto;
  height: 26px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.code-toggle {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.code-toggle:hover { background: #e6eefc; }

.code-box.collapsed pre { display: none; }

.copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.copy-btn.done { border-color: var(--ok); color: var(--ok); }

.code-box pre {
  margin: 0;
  padding: 12px 14px;
  max-height: 300px;
  overflow: auto;
  background: #fbfcfe;
  font-family: ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.65;
  color: #24303f;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-box code { font-family: inherit; }

.ev-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  background: #f1f4f8;
  border-radius: 3px;
  padding: 0 5px;
  margin-right: 7px;
  vertical-align: 1px;
}

/* --------------------------------------------------- PDF 导出（html2pdf） */
/* 生成中按钮置灰 */
.btn-ghost[disabled] { opacity: 0.55; pointer-events: none; }
/* 生成 PDF 时排除页面底部的操作按钮区 */
.pdf-capture .actions { display: none !important; }
/* 分页时不把条目拦腰截断（print 与 html2pdf 的 css 模式共用） */
.fix-item, .dim-block, .bot-table tr, .verdict { break-inside: avoid; page-break-inside: avoid; }

/* ---------------------------------------------------------------- print */
@media print {
  body { background: #fff; }
  .topbar, .footer, .actions, .loading, .btn-ghost, .btn-primary, .tabs { display: none !important; }
  .wrap { max-width: 100%; padding: 0; }
  .panel, .result-head {
    border: 1px solid #dfe3ea;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 12px;
  }
  /* 打印时两份报告都要出现 */
  .tab-pane { display: block !important; }
  #pane-seo { page-break-before: always; }
  details.dim-block { overflow: visible; }
  details.dim-block > .items { display: block !important; }
  details.dim-block summary { background: #fff !important; border-bottom: 1px solid #dfe3ea; }
  a { text-decoration: none; color: var(--text); }
}

/* ------------------------------------------------------------- 响应式 */
@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; gap: 14px; }
  .quick-form { flex: 1 1 100%; margin-left: 0; }
  .score-pair { width: 100%; justify-content: center; }
}

@media (max-width: 520px) {
  .score-card, .score-card .ring { width: 104px; height: 104px; }
  .score-text strong { font-size: 25px; }
  .tab { padding: 8px 12px; font-size: 12.5px; }
}

/* ------------------------------------------------- 历史域名下拉 */
.has-hist { position: relative; }

.hist-drop {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 80;
  box-sizing: border-box;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
  max-height: 420px;
  overflow: auto;
}

.hist-drop[hidden] { display: none; }

.hist-drop .hist-item {
  display: block;
  width: 100%;
  height: auto;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-drop .hist-row {
  display: flex;
  align-items: center;
  padding-right: 3px;
  border-radius: 7px;
}

.hist-drop .hist-row:hover,
.hist-drop .hist-row:focus-within {
  background: var(--primary-soft);
}

.hist-drop .hist-row .hist-item {
  flex: 1;
  min-width: 0;
  border-radius: 7px 0 0 7px;
}

.hist-drop .hist-row:hover .hist-item {
  background: none;
  color: var(--primary);
}

.hist-drop .hist-item.on {
  background: var(--primary-soft);
  color: var(--primary);
}

.hist-drop .hist-del {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #b8c0cf;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s, background .15s;
}

.hist-drop .hist-del:hover {
  color: var(--bad);
  background: rgba(220, 38, 38, .09);
}

.hist-empty {
  padding: 9px 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.hist-drop .hist-clear {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
  padding: 8px 10px 5px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--muted);
  text-align: left;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.hist-drop .hist-clear:hover {
  background: none;
  color: var(--bad);
}
