:root {
  --ink: #0b1220;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f7f9fc;
  --card: #ffffff;
  --accent: #1d4ed8;
  --accent-2: #0e7490;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(15, 23, 42, .28);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 520px at 12% -12%, #e8efff 0%, rgba(232, 239, 255, 0) 62%),
    radial-gradient(900px 480px at 96% 4%, #e6f7f8 0%, rgba(230, 247, 248, 0) 60%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

.shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 22px 56px;
}

/* ---------------- topbar ---------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 2px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px -10px rgba(29, 78, 216, .8);
}
.brand-text { font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.brand-text em {
  font-style: normal;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--muted);
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--line-2);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-2);
}
.pill[data-state="ok"]::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(21, 128, 61, .14); }
.pill[data-state="warn"]::before { background: var(--warn); }
.pill[data-state="bad"]::before { background: var(--bad); }

/* ---------------- hero ---------------- */
.hero { padding: 12px 2px 26px; }
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.4vw, 33px);
  line-height: 1.28;
  letter-spacing: -.015em;
  font-weight: 750;
}
.lede {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 14.5px;
}
.lede strong { color: var(--ink); font-weight: 650; }

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  counter-reset: none;
}
.steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 7px 13px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  transition: color .18s, border-color .18s, background .18s;
}
.steps li span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.steps li.is-active { color: var(--accent); border-color: #bfceff; background: #f3f6ff; }
.steps li.is-active span { background: var(--accent); color: #fff; }
.steps li.is-done { color: var(--ok); border-color: #bbf7d0; background: #f4fdf6; }
.steps li.is-done span { background: var(--ok); color: #fff; }

/* ---------------- stage / card ---------------- */
.stage { min-height: 240px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  animation: rise .26s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---------------- dropzone ---------------- */
.drop {
  display: grid;
  place-items: center;
  gap: 6px;
  text-align: center;
  padding: 40px 20px;
  border-radius: 12px;
  border: 2px dashed #aebfe4;
  background: linear-gradient(180deg, #fbfdff, #eef3fb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.drop:hover { border-color: #9fb4e8; background: #f2f6ff; }
.drop.is-over { border-color: var(--accent); background: #eef3ff; transform: scale(.997); }
.drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
  box-shadow: 0 6px 16px -12px rgba(29, 78, 216, .9);
}
.drop-title { font-weight: 650; font-size: 15px; }
.drop-hint { color: var(--muted); font-size: 12.5px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfe;
}
.file-icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: #eef2ff;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .03em;
}
.file-meta { min-width: 0; flex: 1; }
.file-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { color: var(--muted); font-size: 12px; }

/* ---------------- buttons / inputs ---------------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  transition: transform .12s, box-shadow .18s, background .18s, opacity .18s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary:disabled {
  background: #e8eefb;
  color: #7c8db3;
  box-shadow: none;
  border: 1px solid #d3ddee;
  opacity: 1;
}
.btn-primary {
  background: linear-gradient(140deg, var(--accent), #3b6fd8);
  color: #fff;
  box-shadow: 0 12px 24px -16px rgba(29, 78, 216, .95);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 14px 28px -14px rgba(29, 78, 216, .95); }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-quiet { background: transparent; color: var(--muted); border-color: transparent; padding: 8px 10px; }
.btn-quiet:hover { color: var(--bad); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
.btn-row .spacer { flex: 1; }

.progress { margin-top: 16px; }
.progress-track { height: 7px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .18s ease-out; }
.progress-label { display: flex; justify-content: space-between; margin-top: 7px; font-size: 12px; color: var(--muted); }

.code-input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-family: var(--mono);
  font-size: 19px;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.code-input::placeholder { letter-spacing: .12em; color: #b6c2d4; }
.code-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(29, 78, 216, .12); }
.code-input.is-bad { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(185, 28, 28, .1); }

.hint { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.notice {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink-2);
}
.notice.is-error { border-color: #fecaca; background: #fef2f2; color: var(--bad); }
.notice.is-ok { border-color: #bbf7d0; background: #f0fdf4; color: var(--ok); }
.notice code { font-family: var(--mono); font-size: 12px; }

/* ---------------- result ---------------- */
.result-top { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.gauge {
  --p: 0;
  width: 122px; height: 122px;
  flex: 0 0 122px;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    conic-gradient(var(--gauge-color, var(--accent)) calc(var(--p) * 1%), #edf1f7 0);
  position: relative;
}
.gauge::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #fff;
}
.gauge-inner { position: relative; z-index: 1; text-align: center; }
.gauge-score { font-size: 30px; font-weight: 780; line-height: 1; letter-spacing: -.02em; }
.gauge-unit { font-size: 11px; color: var(--muted); margin-top: 3px; }

.verdict-block { flex: 1; min-width: 260px; }
.verdict-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc; color: var(--ink-2);
}
.verdict-badge.is-critical { border-color: #fecaca; background: #fef2f2; color: var(--bad); }
.verdict-badge.is-high { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.verdict-badge.is-medium { border-color: #fde68a; background: #fffbeb; color: var(--warn); }
.verdict-badge.is-ok { border-color: #bbf7d0; background: #f0fdf4; color: var(--ok); }
.verdict-text { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.verdict-sub { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }

.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.metric {
  flex: 1 1 92px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: #fbfcfe;
}
.metric-k { font-size: 11.5px; color: var(--muted); }
.metric-v { font-size: 17px; font-weight: 720; }
.metric.sev-critical .metric-v { color: var(--bad); }
.metric.sev-high .metric-v { color: #c2410c; }
.metric.sev-medium .metric-v { color: var(--warn); }

.findings { margin: 22px 0 0; display: grid; gap: 9px; }
.finding {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.finding > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 15px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.finding > summary::-webkit-details-marker { display: none; }
.finding[open] > summary { border-bottom: 1px solid var(--line); background: #fbfdff; }
.sev {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 2px;
}
.sev-critical { background: #fee2e2; color: var(--bad); }
.sev-high { background: #ffedd5; color: #c2410c; }
.sev-medium { background: #fef3c7; color: var(--warn); }
.sev-low { background: #e0f2fe; color: #0369a1; }
.sev-info { background: #f1f5f9; color: var(--ink-2); }
.finding-title { font-weight: 620; font-size: 13.8px; }
.finding-cat { color: var(--muted); font-size: 12px; margin-top: 1px; }
.finding-body { padding: 12px 15px 14px 15px; font-size: 13.2px; color: var(--ink-2); }
.finding-body dl { margin: 0; display: grid; grid-template-columns: 74px 1fr; gap: 6px 12px; }
.finding-body dt { color: var(--muted); font-size: 12.5px; }
.finding-body dd { margin: 0; }

.next-steps { margin-top: 22px; }
.next-steps h3 { margin: 0 0 8px; font-size: 14px; }
.next-steps ol { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13.4px; }
.next-steps li { margin: 5px 0; }

/* ---------------- footer ---------------- */
.guarantees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 34px;
}
.guarantees article {
  padding: 16px 17px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
}
.guarantees h3 { margin: 0 0 6px; font-size: 13.5px; letter-spacing: -.005em; }
.guarantees p { margin: 0; font-size: 12.6px; color: var(--muted); line-height: 1.6; }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.mono { font-family: var(--mono); font-size: 11.5px; }

.spin {
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  vertical-align: -2px;
}
.spin-dark { border-color: rgba(29, 78, 216, .25); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 640px) {
  .shell { padding: 16px 15px 40px; }
  .card { padding: 18px 16px; }
  .code-input { font-size: 16px; letter-spacing: .12em; }
  .gauge { width: 104px; height: 104px; flex-basis: 104px; }
  .gauge-score { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ===================================================================
   兼容层：视图层使用的语义类名（.btn.primary / .dropzone / .ext ...）
   与早期骨架样式并存，二者任取其一都能得到同一个外观。
   =================================================================== */

.main { padding: 0 0 8px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.lead { color: var(--ink-2); font-size: 14px; line-height: 1.65; margin: 0 0 18px; }
.micro { color: var(--muted); font-size: 12px; margin: 12px 0 0; line-height: 1.6; }
.note { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 16px 0 0; padding-left: 10px; border-left: 2px solid var(--line-2); }
.note.warn, .micro.warn { color: #b45309; }
.kn { color: var(--ink-2); font-size: 14px; margin: 6px 0 14px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.row.gap { gap: 10px; margin-top: 20px; }
.tight { margin-top: 8px; }
.small { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.ms { font-size: 12px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* 按钮：.btn 是基底，.primary/.ghost/.quiet 是语义变体 */
.btn.primary { background: linear-gradient(140deg, var(--accent), #3b6fd8); color: #fff; box-shadow: 0 12px 24px -16px rgba(29,78,216,.95); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 14px 28px -14px rgba(29,78,216,.95); }
.btn.primary:disabled { background: #e8eefb; color: #7c8db3; border: 1px solid #d3ddee; box-shadow: none; opacity: 1; }
.btn.ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn.quiet { background: transparent; color: var(--muted); padding: 8px 10px; }
.btn.quiet:hover { color: var(--bad); }
.btn.small + .btn.small { margin-left: 8px; }

/* 说明清单 */
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 7px; }
.facts li { position: relative; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.facts li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 6px; height: 6px; border-radius: 999px; background: #b6c6e6; }

/* 行内动作链接 */
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: #1e3a8a; }

/* 拖拽上传区 */
.dropzone {
  display: grid; place-items: center; gap: 6px; text-align: center;
  padding: 40px 20px; border-radius: 12px;
  border: 2px dashed #aebfe4;
  background: linear-gradient(180deg, #fbfdff, #eef3fb);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9);
  cursor: pointer; transition: border-color .18s, background .18s, transform .18s;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: #eef3ff; }
.dropzone.dragging { transform: scale(.997); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.dropzone.has-file { border-style: solid; border-color: #9db6ea; background: #f5f9ff; }
.dropzone.is-busy { opacity: .7; pointer-events: none; }
.dz-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: #fff; border: 1px solid var(--line); color: var(--accent); box-shadow: 0 6px 16px -12px rgba(29,78,216,.9); }
.dz-title { font-weight: 650; font-size: 15px; word-break: break-all; }
.dz-hint { color: var(--muted); font-size: 12.5px; }

/* 进度条（同时支持 .progress-bar 单独使用与 .progress > .progress-bar） */
.progress { margin-top: 16px; height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; position: relative; }
.progress > .progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s ease-out; }
.progress-label { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* 提示条 */
.alert { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin: 14px 0 0; padding: 11px 13px; border-radius: 10px; font-size: 13px; line-height: 1.6; border: 1px solid; }
.alert.error, .alert.bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert strong { font-weight: 700; }
.code-chip { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; padding: 2px 7px; font-size: 12.5px; }

/* 键值表 */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 18px; padding: 14px 16px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 11px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--ink); font-size: 13px; word-break: break-all; }

/* 激活码输入 */
.code-input { width: 100%; margin: 4px 0 0; padding: 15px 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 19px; letter-spacing: .22em; text-align: center; color: var(--ink); background: #fff; border: 1.5px solid var(--line-2); border-radius: 11px; transition: border-color .15s, box-shadow .15s; }
.code-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,78,216,.14); }
.code-input.is-complete { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.13); }

/* 报告页：结论块、统计、明细 */
.report .verdict { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: #fbfcfe; margin-bottom: 16px; }
.report .verdict.ok { background: #f0fdf4; border-color: #bbf7d0; }
.report .verdict.warn { background: #fffbeb; border-color: #fde68a; }
.report .verdict.bad { background: #fef2f2; border-color: #fecaca; }
.verdict-grade { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.verdict-body { color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
/* 评分条（与圆形仪表 .gauge 区分开，二者互不覆盖） */
.score-bar { position: relative; height: 10px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin: 14px 0 6px; }
.gauge-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s ease-out; }
.score-bar .gauge-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.gauge-label { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.score-bar + .gauge-label { margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.stat-k { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.stat-v { display: block; font-weight: 650; font-size: 14px; word-break: break-word; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.chip.sev-critical { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.chip.sev-high { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.chip.sev-medium { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.chip.sev-low { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.chip.sev-info { background: #f8fafc; color: #475569; border-color: #e2e8f0; }

.finding { list-style: none; padding: 13px 15px; border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.finding.sev-critical { border-left-color: #dc2626; }
.finding.sev-high { border-left-color: #ea580c; }
.finding.sev-medium { border-left-color: #d97706; }
.finding.sev-low { border-left-color: #0284c7; }
.finding.sev-info { border-left-color: #94a3b8; }
.finding-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.finding-title { font-weight: 650; font-size: 14px; color: var(--ink); }
.finding-cat { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.finding-detail { color: var(--ink-2); font-size: 13px; line-height: 1.65; margin: 8px 0 0; }
.finding-fix { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 6px 0 0; }
.sev { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.sev-critical { background: #fef2f2; color: #991b1b; }
.sev-high { background: #fff7ed; color: #9a3412; }
.sev-medium { background: #fffbeb; color: #92400e; }
.sev-low { background: #eff6ff; color: #1e40af; }
.sev-info { background: #f8fafc; color: #475569; }
ul.findings { list-style: none; padding: 0; margin: 0; }

/* 外部检测（Originality.report）区 */
.ext { border: 1px solid #c7d2fe; border-radius: 12px; background: linear-gradient(180deg,#f7f9ff,#eef2ff); padding: 15px 17px; margin: 6px 0 4px; }
.ext.is-failed { border-color: #fecaca; background: #fef2f2; }
.ext-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ext-head h3 { margin: 0; font-size: 14.5px; }
.ext-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.ext-metric { background: #fff; border: 1px solid #dbe3f6; border-radius: 10px; padding: 10px 12px; }
.ext-num { display: block; font-size: 22px; font-weight: 800; color: var(--accent); line-height: 1.15; }
.ext-num.is-bad { color: #b91c1c; }
.ext-cap { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.attach { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px dashed #c7d2fe; }

/* 作业进度 */
.job-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.job-head h2 { margin: 0; }
.job-steps { list-style: none; display: grid; gap: 9px; padding: 0; margin: 16px 0 18px; }
.job-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.job-step .dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 999px; background: #cbd5e1; }
.job-step.is-done { color: var(--ink-2); }
.job-step.is-done .dot { background: #16a34a; }
.job-step.is-active { color: var(--accent); font-weight: 650; }
.job-step.is-active .dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(29,78,216,.16); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(29,78,216,.14); } 50% { box-shadow: 0 0 0 6px rgba(29,78,216,.06); } }
.job-card.is-failed .progress-bar { background: #dc2626; }

/* 链路说明 */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; font-size: 12.5px; color: var(--ink-2); }
.chain .node { padding: 5px 10px; border-radius: 8px; background: #f1f5f9; border: 1px solid var(--line); }
.chain .break { color: #b91c1c; font-weight: 650; }

/* ===================================================================
   控制台（admin.html）—— 复用用户端设计语言，只加后台需要的布局
   =================================================================== */

.admin .shell { max-width: 1180px; }
.admin-main { display: grid; gap: 18px; }
.admin-stage { display: grid; gap: 16px; }

.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; position: sticky; top: 10px; z-index: 5; }
.admin-tab { appearance: none; border: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--muted); padding: 9px 15px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; }
.admin-tab:hover { color: var(--ink-2); background: #f3f6fc; }
.admin-tab.is-active { background: var(--ink); color: #fff; }
.admin-tab .count { margin-left: 6px; font-weight: 500; opacity: .7; }

.login-form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.login-form .code-input { flex: 1 1 320px; }

/* 指标卡 */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin-top: 4px; }
.kpi { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.kpi-v { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-k { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

/* 表格 */
.table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th { text-align: left; font-weight: 650; color: var(--ink-2); background: #f6f8fc; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.grid td { padding: 10px 12px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tr.is-selected td { background: #f5f8ff; }
table.grid .nowrap { white-space: nowrap; }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid .clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.field { display: grid; gap: 5px; margin-top: 12px; }
.field > label { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field > .micro { margin: 0; }
.input { appearance: none; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font: inherit; font-size: 13.5px; color: var(--ink); }
.input:focus { outline: 2px solid rgba(29, 78, 216, .35); outline-offset: 1px; border-color: var(--accent); }
.input.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }

/* 状态徽标 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; letter-spacing: .01em; }
.tag.ok { background: #e7f7ee; color: #15803d; }
.tag.warn { background: #fef3c7; color: #b45309; }
.tag.bad { background: #fee2e2; color: #b91c1c; }
.tag.info { background: #e0edff; color: #1d4ed8; }
.tag.mute { background: #eef2f7; color: #64748b; }

/* 发码结果 */
.issued { margin-top: 12px; padding: 13px 14px; border: 1px solid #bbf7d0; border-radius: 11px; background: #f2fdf6; }
.issued-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.issued-list code { padding: 5px 9px; border-radius: 7px; background: #fff; border: 1px solid #cdebd8; font-size: 13px; letter-spacing: .04em; }

pre.audit { max-height: 420px; overflow: auto; margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #0b1220; color: #cbd5e1; font-size: 12px; line-height: 1.7; }
pre.audit .ev { color: #7dd3fc; }
.alarm { padding: 12px 14px; border-radius: 11px; border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; font-size: 13px; }

/* 凭检测码查询结果 */
.lookup-entry { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: #f8fafc; border: 1px dashed #cbd5e1; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lookup-progress { margin-top: 6px; }
.lookup-progress .progress { margin-top: 12px; }
