:root {
  --ink: #16202b;
  --ink-soft: #3d4a57;
  --ink-mute: #6b7783;
  --navy: #16324f;
  --navy-deep: #0f253a;
  --navy-soft: #2b4c6f;
  --paper: #f3f4f1;
  --panel: #ffffff;
  --line: #dfe3df;
  --line-soft: #eceeea;
  --accent: #a63a2f;
  --accent-soft: #f7ebe8;
  --amber: #a1762c;
  --amber-soft: #f8f2e4;
  --green: #2f6b4f;
  --green-soft: #eaf3ee;
  --blue-soft: #e9f0f7;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(22, 32, 43, .06);
  --shadow-md: 0 6px 18px rgba(22, 32, 43, .08);
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }

.hidden { display: none !important; }

/* ---------- Header ---------- */
.topbar {
  background: var(--navy-deep);
  color: #eef2f5;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 220px; }

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 15px;
  letter-spacing: 0;
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.brand-name { font-size: 16px; font-weight: 600; letter-spacing: .06em; }

.brand-sub {
  font-size: 11px;
  color: rgba(238, 242, 245, .58);
  letter-spacing: .08em;
  border-left: 1px solid rgba(255, 255, 255, .18);
  padding-left: 10px;
  margin-left: 2px;
}

.main-nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }

.nav-item {
  background: none;
  border: none;
  color: rgba(238, 242, 245, .62);
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  letter-spacing: .04em;
}

.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav-item.active { color: #fff; background: rgba(255, 255, 255, .12); }

.source-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(238, 242, 245, .65);
  white-space: nowrap;
}

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #8a9299; }
.status-dot.online { background: #62b189; box-shadow: 0 0 0 3px rgba(98, 177, 137, .15); }
.status-dot.offline { background: #c26a5f; box-shadow: 0 0 0 3px rgba(194, 106, 95, .15); }

/* ---------- Stepper ---------- */
.stepper {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.stepper-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-mute);
  font-size: 13px;
  white-space: nowrap;
}

.step-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--ink-mute);
  background: #fff;
}

.step.active { color: var(--navy); font-weight: 600; }
.step.active .step-index { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.done { color: var(--green); }
.step.done .step-index { border-color: var(--green); color: var(--green); background: var(--green-soft); }

.step-line { flex: 1; height: 1px; background: var(--line); min-width: 24px; }

/* ---------- Layout ---------- */
.page { animation: fadeIn .25s ease; }
.page-wrap { max-width: 1440px; margin: 0 auto; padding: 28px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-title { font-size: 22px; font-weight: 600; letter-spacing: .02em; color: var(--ink); }
.page-desc { margin-top: 5px; color: var(--ink-mute); font-size: 13px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.panel-sub { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.panel-body { padding: 20px; }
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: .02em;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  white-space: nowrap;
}

.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-soft); }

.btn-outline { border-color: var(--line); color: var(--ink-soft); background: #fff; }
.btn-outline:hover:not(:disabled) { border-color: var(--navy-soft); color: var(--navy); }

.btn-ghost { color: var(--navy); padding: 0 10px; }
.btn-ghost:hover { background: var(--blue-soft); }

.btn-danger-outline { border-color: #d9b6b0; color: var(--accent); background: #fff; }
.btn-danger-outline:hover { background: var(--accent-soft); }

.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 26px; font-size: 14px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Upload ---------- */
.dropzone {
  border: 1.5px dashed #c9d0cc;
  border-radius: var(--radius);
  background: #fbfcfa;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}

.dropzone:hover, .dropzone.dragover { border-color: var(--navy-soft); background: var(--blue-soft); }

.dropzone-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-size: 20px;
  background: #fff;
}

.dropzone-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.dropzone-hint { margin-top: 6px; font-size: 13px; color: var(--ink-mute); }
.dropzone-formats { margin-top: 16px; font-size: 12px; color: #8a949b; letter-spacing: .02em; }

.upload-result { margin-top: 18px; }
.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: #fff;
}
.file-mark {
  width: 40px; height: 44px; border: 1px solid var(--line); border-radius: 3px;
  display: grid; place-items: center; font-size: 10px; letter-spacing: .04em;
  color: var(--navy); background: var(--blue-soft); font-weight: 600;
}
.file-meta { flex: 1; min-width: 0; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { margin-top: 3px; font-size: 12px; color: var(--ink-mute); }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px; font-size: 11px;
  background: var(--line-soft); color: var(--ink-soft); white-space: nowrap;
}
.badge.navy { background: var(--blue-soft); color: var(--navy); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--accent-soft); color: var(--accent); }

/* ---------- Mode selector ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 4px; }
.mode-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.mode-card:hover { border-color: #b8c6d2; }
.mode-card.active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #fbfcfe; }
.mode-name { font-weight: 600; font-size: 14px; color: var(--ink); display: flex; align-items: center; justify-content: space-between; }
.mode-tag { font-size: 10px; color: var(--ink-mute); border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px; font-weight: 400; }
.mode-desc { margin-top: 6px; font-size: 12px; color: var(--ink-mute); line-height: 1.55; }
.mode-time { margin-top: 10px; font-size: 11px; color: var(--navy-soft); letter-spacing: .03em; }

.section-label {
  font-size: 12px; color: var(--ink-mute); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---------- Policy card ---------- */
.policy-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px; background: #fbfcfa; border: 1px solid var(--line-soft); border-radius: var(--radius);
}
.policy-type { font-size: 18px; font-weight: 600; color: var(--ink); }
.policy-path { font-size: 12px; color: var(--ink-mute); margin-top: 4px; }
.confidence { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-mute); }
.confidence-bar { flex: 1; max-width: 160px; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.confidence-fill { height: 100%; background: var(--navy-soft); }

/* ---------- Laws ---------- */
.law-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.law-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.law-item:hover { border-color: #b8c6d2; }
.law-item.selected { border-color: var(--navy); background: #fbfcfe; }
.law-check { width: 16px; height: 16px; accent-color: var(--navy); flex-shrink: 0; }
.law-main { flex: 1; min-width: 0; }
.law-name { font-size: 13px; font-weight: 500; line-height: 1.45; }
.law-meta { margin-top: 3px; font-size: 11px; color: var(--ink-mute); display: flex; gap: 10px; flex-wrap: wrap; }
.law-keywords { font-size: 11px; color: var(--navy-soft); background: var(--blue-soft); padding: 1px 8px; border-radius: 20px; white-space: nowrap; }

.notice {
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  padding: 12px 14px;
  font-size: 12.5px;
  color: #6d5423;
  border-radius: 0 4px 4px 0;
  line-height: 1.6;
}
.notice.info { border-left-color: var(--navy-soft); background: var(--blue-soft); color: #24425f; }
.notice.danger { border-left-color: var(--accent); background: var(--accent-soft); color: #7c2f26; }

/* ---------- Internal docs ---------- */
.internal-drop {
  margin-top: 12px; border: 1px dashed #c9d0cc; border-radius: var(--radius);
  background: #fbfcfa; padding: 20px; text-align: center; cursor: pointer;
  font-size: 12.5px; color: var(--ink-mute); transition: border-color .15s, background .15s;
}
.internal-drop:hover { border-color: var(--navy-soft); background: var(--blue-soft); }
.internal-drop.active { border-color: var(--navy-soft); background: var(--blue-soft); }
.internal-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.internal-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 4px; background: #fff; font-size: 12.5px;
}
.internal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Running ---------- */
.run-layout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 22px; align-items: start; }
.run-side { position: sticky; top: 86px; }

.progress-card { padding: 18px 20px; }
.progress-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 10px; }
.progress-stage { font-size: 14px; font-weight: 600; color: var(--navy); }
.progress-percent { font-size: 24px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-track { height: 5px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--navy-soft), var(--navy)); transition: width .4s ease; }
.progress-meta { margin-top: 10px; display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-mute); }

.stage-rail { display: flex; gap: 6px; margin-top: 14px; }
.stage-pill {
  flex: 1; text-align: center; font-size: 11px; padding: 5px 0; border-radius: 3px;
  background: var(--line-soft); color: var(--ink-mute); border: 1px solid transparent;
}
.stage-pill.active { background: var(--blue-soft); color: var(--navy); border-color: #c9d9e8; font-weight: 600; }
.stage-pill.done { background: var(--green-soft); color: var(--green); }

.run-stats { display: flex; gap: 18px; margin-top: 14px; }
.run-stat { flex: 1; border-left: 1px solid var(--line-soft); padding-left: 14px; }
.run-stat:first-child { border-left: none; padding-left: 0; }
.run-stat-num { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.run-stat-label { font-size: 11px; color: var(--ink-mute); margin-top: 1px; }

.live-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
}
.live-title { font-size: 15px; font-weight: 600; }
.live-count { font-size: 12px; color: var(--ink-mute); }
.live-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; }
.live-empty { padding: 36px 20px; text-align: center; color: var(--ink-mute); font-size: 13px; }
.live-empty .bar { width: 36px; height: 2px; background: var(--line); margin: 14px auto 0; position: relative; overflow: hidden; }
.live-empty .bar::after { content: ""; position: absolute; left: -40%; width: 40%; height: 100%; background: var(--navy-soft); animation: sweep 1.2s infinite; }
@keyframes sweep { to { left: 100%; } }

.status-log {
  margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px;
  max-height: 120px; overflow-y: auto; font-size: 11.5px; color: var(--ink-mute);
  display: flex; flex-direction: column; gap: 4px;
}
.status-log-item { display: flex; gap: 8px; }
.status-log-item::before { content: "·"; color: #a9b2b8; }

/* ---------- Document ---------- */
.doc-panel { display: flex; flex-direction: column; max-height: calc(100vh - 170px); }
.doc-scroll { overflow-y: auto; padding: 20px 24px; }
.doc-chapter { font-size: 14px; font-weight: 600; color: var(--navy); margin: 20px 0 8px; letter-spacing: .02em; }
.doc-chapter:first-child { margin-top: 0; }
.doc-article {
  padding: 9px 12px; border-left: 2px solid transparent; border-radius: 0 4px 4px 0;
  font-size: 13.5px; line-height: 1.8; color: var(--ink-soft); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.doc-article:hover { background: #f7f8f6; }
.doc-article.highlight { background: #fbf6e8; border-left-color: var(--amber); }
.doc-article .art-no { font-weight: 600; color: var(--ink); margin-right: 6px; }

/* ---------- Issue cards ---------- */
.issue-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 13px 15px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.issue-card:hover { box-shadow: var(--shadow-md); }
.issue-card.active { box-shadow: var(--shadow-md); border-color: #b8c6d2; background: #fbfcfe; }
.issue-card.high { border-left-color: var(--accent); }
.issue-card.medium { border-left-color: var(--amber); }
.issue-card.low { border-left-color: var(--navy-soft); }
.issue-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.issue-sev { font-size: 10px; padding: 1px 7px; border-radius: 3px; letter-spacing: .04em; }
.issue-sev.high { background: var(--accent-soft); color: var(--accent); }
.issue-sev.medium { background: var(--amber-soft); color: var(--amber); }
.issue-sev.low { background: var(--blue-soft); color: var(--navy-soft); }
.issue-dim { font-size: 11px; color: var(--ink-mute); }
.issue-title { font-size: 13.5px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.issue-loc { margin-top: 4px; font-size: 11.5px; color: var(--ink-mute); }
.issue-analysis { margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.issue-foot { margin-top: 8px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.feedback-state { font-size: 11px; color: var(--green); }
.feedback-state.ignored { color: var(--ink-mute); }

/* ---------- Results ---------- */
.summary-band {
  background: var(--navy-deep); color: #eef2f5; border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 20px;
  display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 22px;
}
.summary-title { font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.summary-sub { margin-top: 5px; font-size: 12px; color: rgba(238, 242, 245, .6); }
.summary-metric { border-left: 1px solid rgba(255, 255, 255, .14); padding-left: 20px; }
.summary-num { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.summary-label { font-size: 11.5px; color: rgba(238, 242, 245, .6); margin-top: 3px; }
.summary-num.high { color: #e6a49b; }
.summary-num.medium { color: #e3c489; }

.result-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.result-col { min-width: 0; }
.result-side { position: sticky; top: 86px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 20px; padding: 3px 12px; font-size: 11.5px; cursor: pointer;
}
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip:hover:not(.active) { border-color: #b8c6d2; }

.issue-list-scroll { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }

.detail-panel { display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.detail-scroll { overflow-y: auto; padding: 20px 22px; }
.detail-empty { padding: 60px 20px; text-align: center; color: var(--ink-mute); font-size: 13px; }
.detail-head { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.detail-title { font-size: 16px; font-weight: 600; line-height: 1.5; }
.detail-meta { margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.detail-section { margin-top: 18px; }
.detail-section:first-child { margin-top: 0; }
.detail-label {
  font-size: 11px; letter-spacing: .1em; color: var(--ink-mute);
  margin-bottom: 6px; text-transform: uppercase;
}
.detail-text { font-size: 13px; line-height: 1.75; color: var(--ink-soft); white-space: pre-wrap; }
.quote-block {
  background: #f7f8f6; border-left: 2px solid var(--line); padding: 10px 14px;
  font-size: 12.5px; line-height: 1.75; color: var(--ink-soft); border-radius: 0 4px 4px 0;
}
.basis-block { background: var(--blue-soft); border: 1px solid #d5e1ec; border-radius: 4px; padding: 12px 14px; }
.basis-law { font-size: 13px; font-weight: 600; color: var(--navy); }
.basis-article { font-size: 12px; color: var(--navy-soft); margin-top: 2px; }
.basis-content { margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); }
.risk-block, .case-block {
  border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; background: #fff;
}
.risk-title, .case-title { font-size: 13px; font-weight: 600; }
.risk-row { margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
.risk-row b { font-weight: 600; color: var(--ink); }
.suggestion-block {
  background: var(--green-soft); border: 1px solid #cfe3d7; border-radius: 4px; padding: 12px 14px;
  font-size: 12.5px; line-height: 1.75; color: #25523c; white-space: pre-wrap;
}
.verify-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
  padding: 3px 9px; border-radius: 20px; border: 1px solid var(--line);
}
.verify-badge.green { background: var(--green-soft); color: var(--green); border-color: #cfe3d7; }
.verify-badge.yellow { background: var(--amber-soft); color: var(--amber); border-color: #e8d9b5; }
.verify-badge.red { background: var(--accent-soft); color: var(--accent); border-color: #e6c5c0; }
.verify-badge.orange { background: #fbf0e6; color: #9a5c24; border-color: #ecd3bb; }

.detail-actions { padding: 14px 22px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; }

/* ---------- Coverage ---------- */
.coverage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.coverage-cell { border: 1px solid var(--line-soft); border-radius: 4px; padding: 10px 12px; background: #fbfcfa; }
.coverage-num { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.coverage-label { font-size: 11px; color: var(--ink-mute); margin-top: 1px; }

/* ---------- History ---------- */
.history-list { display: flex; flex-direction: column; }
.history-row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 140px 120px 150px 130px 100px;
  gap: 16px; align-items: center; padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .15s;
}
.history-row:hover { background: #fbfcfa; }
.history-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-sub { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }
.history-cell { font-size: 12.5px; color: var(--ink-soft); }
.history-counts { display: flex; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.history-counts .high { color: var(--accent); }
.history-counts .medium { color: var(--amber); }
.history-head { background: #f8f9f7; font-size: 11.5px; color: var(--ink-mute); letter-spacing: .04em; cursor: default; }
.history-head:hover { background: #f8f9f7; }
.empty-state { padding: 64px 20px; text-align: center; color: var(--ink-mute); }
.empty-state-title { font-size: 15px; color: var(--ink-soft); margin-bottom: 6px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 76px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 240px; max-width: 380px; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--navy); border-radius: 4px; box-shadow: var(--shadow-md);
  padding: 12px 16px; font-size: 13px; color: var(--ink-soft);
  animation: toastIn .2s ease;
}
.toast.error { border-left-color: var(--accent); }
.toast.success { border-left-color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ---------- Loading ---------- */
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite;
}
.spinner.dark { border-color: var(--line); border-top-color: var(--navy); }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block { padding: 50px 20px; text-align: center; color: var(--ink-mute); font-size: 13px; }
.loading-block .spinner { margin: 0 auto 12px; width: 24px; height: 24px; border-width: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .result-layout { grid-template-columns: 300px minmax(0, 1fr); }
  .result-layout .detail-col { grid-column: 1 / -1; }
  .result-side { position: static; max-height: none; }
  .detail-panel { max-height: none; }
}

@media (max-width: 980px) {
  .topbar-inner { padding: 0 18px; gap: 12px; }
  .brand-sub { display: none; }
  .page-wrap { padding: 20px 18px; }
  .grid-2, .run-layout { grid-template-columns: 1fr; }
  .run-side { position: static; }
  .summary-band { grid-template-columns: 1fr 1fr; }
  .summary-metric:nth-child(3) { border-left: none; padding-left: 0; }
  .result-layout { grid-template-columns: 1fr; }
  .coverage-grid { grid-template-columns: repeat(2, 1fr); }
  .history-row { grid-template-columns: minmax(0, 1fr) 100px 100px; }
  .history-row > .history-cell:nth-child(2),
  .history-row > .history-cell:nth-child(3),
  .history-row > .history-cell:nth-child(6) { display: none; }
  .mode-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stepper-inner { padding: 10px 14px; overflow-x: auto; }
  .step span:not(.step-index) { display: none; }
  .summary-band { grid-template-columns: 1fr; }
  .summary-metric { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; }
}

/* ================= 首页 ================= */
:root {
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
}

.home-shell { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---- Hero ---- */
.home-hero {
  position: relative;
  overflow: hidden;
  color: #eef2f5;
  background:
    radial-gradient(1100px 540px at 84% -12%, rgba(76, 120, 162, .4), transparent 62%),
    linear-gradient(160deg, #14304c 0%, var(--navy-deep) 56%, #0a1c2c 100%);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent 82%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent 82%);
}

.home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 64px;
  padding-top: 84px;
  padding-bottom: 96px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .22em;
  color: rgba(238, 242, 245, .6);
}

.hero-eyebrow-line { width: 34px; height: 1px; background: var(--accent); }

.hero-title {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .015em;
  color: #f6f8f9;
}

.hero-title em {
  font-style: normal;
  color: #e8c9a0;
  background: linear-gradient(transparent 80%, rgba(232, 201, 160, .26) 80%);
}

.hero-lede {
  margin-top: 24px;
  max-width: 540px;
  font-size: 15.5px;
  line-height: 1.95;
  color: rgba(238, 242, 245, .72);
}

.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn-hero,
.btn-hero-ghost {
  height: 46px;
  padding: 0 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.btn-hero { background: var(--accent); color: #fff; }
.btn-hero:hover { background: #b74a3c; }
.btn-hero:active { transform: translateY(1px); }

.btn-hero-ghost {
  background: transparent;
  color: #eef2f5;
  border-color: rgba(255, 255, 255, .28);
}

.btn-hero-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .45); }

.hero-arrow { margin-left: 8px; transition: transform .16s ease; }
.btn-hero:hover .hero-arrow { transform: translateX(3px); }

.hero-trust {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 12.5px;
  color: rgba(238, 242, 245, .56);
}

.hero-trust-item { display: inline-flex; align-items: center; gap: 7px; }

.trust-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b97a1;
  flex-shrink: 0;
}

.trust-dot.online { background: #5cba8c; box-shadow: 0 0 0 3px rgba(92, 186, 140, .18); }
.trust-dot.offline { background: #d0705f; box-shadow: 0 0 0 3px rgba(208, 112, 95, .16); }

/* ---- Hero 示例报告卡 ---- */
.hero-visual { position: relative; }

.audit-card {
  position: relative;
  background: #fbfbf8;
  color: var(--ink);
  border-radius: 8px;
  padding: 28px 28px 24px;
  box-shadow: 0 32px 64px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .09);
}

.audit-card::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  z-index: -1;
}

.audit-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.audit-card-kicker { font-size: 11.5px; letter-spacing: .16em; color: var(--ink-mute); }

.audit-status {
  font-size: 11.5px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(47, 107, 79, .22);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

.audit-card-title {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .04em;
}

.audit-stats {
  display: flex;
  gap: 28px;
  margin-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.audit-stat b {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}

.audit-stat:nth-child(1) b { color: var(--accent); }
.audit-stat:nth-child(2) b { color: var(--amber); }
.audit-stat:nth-child(3) b { color: var(--ink-soft); }
.audit-stat span { font-size: 12px; color: var(--ink-mute); }

.audit-issue {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}

.audit-issue-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent);
}

.sev-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sev-dot.high { background: var(--accent); }
.sev-dot.medium { background: var(--amber); }
.sev-dot.low { background: var(--navy-soft); }

.audit-issue-title { margin-top: 6px; font-size: 15px; font-weight: 600; }

.audit-issue-quote {
  margin-top: 8px;
  padding: 8px 11px;
  background: var(--paper);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.audit-issue-law { margin-top: 9px; font-size: 12.5px; font-weight: 500; color: var(--navy); }

.audit-issue-verify {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--green);
}

.audit-issue-verify span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audit-card-foot {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink-mute);
}

.audit-card-foot span::before { content: "·"; margin-right: 5px; color: var(--line); }

.audit-note {
  margin-top: 14px;
  text-align: right;
  font-size: 11.5px;
  letter-spacing: .08em;
  color: rgba(238, 242, 245, .36);
}

/* ---- 数据指标 ---- */
.home-metrics { background: #fff; border-bottom: 1px solid var(--line); }

.metrics-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }

.metric { padding: 26px 10px 24px 22px; border-left: 1px solid var(--line-soft); }
.metric:first-child { border-left: none; padding-left: 0; }

.metric-num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}

.metric-label { margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.metric-sub { margin-top: 3px; font-size: 11.5px; color: var(--ink-mute); }

/* ---- 区块通用 ---- */
.home-section { max-width: 1180px; margin: 0 auto; padding: 78px 32px 0; }

.section-head { max-width: 760px; margin-bottom: 36px; }

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--accent);
}

.section-kicker::before { content: ""; width: 26px; height: 1px; background: var(--accent); }

.section-head h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .015em;
}

.section-sub { margin-top: 12px; font-size: 14px; line-height: 1.85; color: var(--ink-mute); }

/* ---- 能力卡片 ---- */
.cap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.cap-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 24px 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cap-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cfd6d0;
}

.cap-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }

.cap-num {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--ink-mute);
}

.cap-tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 11px;
  letter-spacing: .14em;
}

.cap-card h3 { font-size: 16.5px; font-weight: 600; letter-spacing: .01em; line-height: 1.5; }
.cap-card p { margin-top: 10px; font-size: 13px; line-height: 1.85; color: var(--ink-mute); }

.cap-card.is-feature {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-color: var(--navy-deep);
}

.cap-card.is-feature .cap-num { color: rgba(238, 242, 245, .5); }
.cap-card.is-feature .cap-tag { background: rgba(255, 255, 255, .1); color: #e8c9a0; }
.cap-card.is-feature h3 { color: #f6f8f9; }
.cap-card.is-feature p { color: rgba(238, 242, 245, .68); }

/* ---- 对比表 ---- */
.compare-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }

.compare-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1.25fr);
  border-top: 1px solid var(--line-soft);
}

.compare-row:first-child { border-top: none; }
.compare-row > div { padding: 16px 20px; display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.7; }

.compare-head { background: var(--navy-deep); color: #eef2f5; font-size: 12px; letter-spacing: .12em; }
.compare-head > div { padding: 13px 20px; }
.compare-head > div:nth-child(3) { color: #e8c9a0; }

.compare-dim { font-weight: 600; color: var(--ink); }
.compare-cell.muted { color: var(--ink-mute); }
.compare-cell.strong { color: var(--ink); font-weight: 500; }
.compare-yes { color: var(--green); font-weight: 700; }

/* ---- 流程 ---- */
.flow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }

.flow-step { padding: 28px 26px 32px 0; }
.flow-step + .flow-step { border-left: 1px solid var(--line); padding-left: 26px; }

.flow-num {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  color: rgba(166, 58, 47, .34);
  font-variant-numeric: tabular-nums;
}

.flow-title { margin-top: 14px; font-size: 15px; font-weight: 600; }
.flow-step p { margin-top: 8px; padding-right: 6px; font-size: 12.5px; line-height: 1.8; color: var(--ink-mute); }

/* ---- CTA / 页脚 ---- */
.home-cta {
  position: relative;
  overflow: hidden;
  max-width: 1180px;
  margin: 78px auto 0;
  padding: 52px 56px;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--navy-deep) 0%, #17395a 100%);
  color: #eef2f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.home-cta::after {
  content: "§";
  position: absolute;
  right: -6px;
  bottom: -70px;
  font-family: var(--serif);
  font-size: 230px;
  line-height: 1;
  color: rgba(255, 255, 255, .045);
  pointer-events: none;
}

.home-cta-kicker { font-size: 12px; letter-spacing: .2em; color: #e8c9a0; }

.home-cta h2 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.5;
}

.home-cta p { margin-top: 12px; font-size: 13px; color: rgba(238, 242, 245, .62); }

.home-cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

.home-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 32px 44px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 11.5px;
  color: var(--ink-mute);
}

/* ---- 首页响应式 ---- */
@media (min-width: 1081px) {
  .hero-title em { white-space: nowrap; }
}

@media (max-width: 1080px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 48px; padding-top: 64px; padding-bottom: 76px; }
  .hero-visual { max-width: 560px; }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric:nth-child(3n + 1) { border-left: none; padding-left: 0; }
  .metric:nth-child(n + 4) { border-top: 1px solid var(--line-soft); }
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-grid { grid-template-columns: 1fr 1fr; gap: 4px 32px; }
  .flow-step + .flow-step { border-left: none; padding-left: 0; }
  .flow-step { border-top: 1px solid var(--line-soft); }
  .flow-step:nth-child(-n + 2) { border-top: none; }
  .home-cta { margin-left: 32px; margin-right: 32px; flex-direction: column; align-items: flex-start; padding: 42px 40px; }
}

@media (max-width: 720px) {
  .topbar-inner { padding: 0 14px; gap: 8px; }
  .brand { min-width: 0; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; font-size: 14px; }
  .brand-name { font-size: 14px; white-space: nowrap; }
  .main-nav { margin-left: 0; gap: 0; }
  .nav-item { padding: 7px 8px; font-size: 12.5px; white-space: nowrap; }
  .source-status { display: none; }
  .home-shell { padding: 0 20px; }
  .home-hero-grid { padding-top: 48px; padding-bottom: 60px; gap: 38px; }
  .hero-title { font-size: clamp(26px, 7.4vw, 34px); }
  .hero-lede { font-size: 14.5px; }
  .hero-actions .btn-hero,
  .hero-actions .btn-hero-ghost { flex: 1 1 100%; }
  .audit-card { padding: 20px 18px 18px; }
  .audit-card::before { inset: 10px -8px -10px 8px; }
  .audit-stats { gap: 18px; }
  .audit-card-foot { gap: 4px 12px; }
  .audit-note { text-align: left; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3n + 1) { border-left: 1px solid var(--line-soft); padding-left: 22px; }
  .metric:nth-child(2n + 1) { border-left: none; padding-left: 0; }
  .metric:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .home-section { padding: 56px 20px 0; }
  .section-head { margin-bottom: 26px; }
  .cap-grid { grid-template-columns: 1fr; }
  .compare-row { display: block; min-width: 0; padding: 8px 0; border-top: none; border-bottom: 1px solid var(--line-soft); }
  .compare-row:last-child { border-bottom: none; }
  .compare-head { display: none; }
  .compare-row > div { padding: 5px 18px; align-items: flex-start; }
  .compare-dim { padding-top: 12px; font-family: var(--serif); font-size: 15px; }
  .compare-cell::before { content: attr(data-label); flex: 0 0 78px; font-size: 11.5px; color: var(--ink-mute); padding-top: 1px; }
  .flow-grid { grid-template-columns: 1fr; gap: 0; }
  .flow-step { padding: 22px 0 24px; }
  .flow-step:nth-child(2) { border-top: 1px solid var(--line-soft); }
  .home-cta { margin: 56px 20px 0; padding: 34px 26px; }
  .home-cta-actions { width: 100%; }
  .home-cta-actions .btn-hero,
  .home-cta-actions .btn-hero-ghost { flex: 1 1 100%; }
  .home-footer { padding: 26px 20px 38px; flex-direction: column; }
}

/* ================= 首页质感与动效 ================= */
/* 自定义滚动条 */
html { scrollbar-width: thin; scrollbar-color: var(--navy-soft) var(--paper); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--navy-soft); border-radius: 6px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--navy); }

.topbar { transition: box-shadow .25s ease; }
.topbar.scrolled { box-shadow: 0 8px 24px -12px rgba(10, 25, 40, .55); }

/* Hero 光晕与颗粒 */
.hero-aurora {
  position: absolute;
  inset: -30% -10%;
  pointer-events: none;
  background:
    radial-gradient(42% 34% at 78% 18%, rgba(90, 140, 190, .30), transparent 70%),
    radial-gradient(30% 26% at 18% 78%, rgba(166, 58, 47, .16), transparent 70%);
  filter: blur(10px);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.home-hero-grid { position: relative; z-index: 1; }

/* 滚动显现（仅在 JS 就绪后隐藏，保证降级可见） */
body.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
body.motion-ready [data-reveal].revealed { opacity: 1; transform: none; }

/* 对比表行 hover */
.compare-row:not(.compare-head) { transition: background .18s ease; }
.compare-row:not(.compare-head):hover { background: var(--blue-soft); }

/* 示例卡指针视差 */
.hero-visual { perspective: 900px; }
.audit-card { transform-style: preserve-3d; will-change: transform; }

@media (prefers-reduced-motion: no-preference) {
  .hero-aurora { animation: auroraDrift 16s ease-in-out infinite alternate; }
  .audit-issue-verify span { animation: verifyPulse 2.6s ease-in-out infinite; }
}

@keyframes auroraDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

@keyframes verifyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 107, 79, .25); }
  50% { box-shadow: 0 0 0 5px rgba(47, 107, 79, 0); }
}

@media (prefers-reduced-motion: reduce) {
  body.motion-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-aurora, .audit-issue-verify span { animation: none !important; }
  .audit-card { transform: none !important; }
}

/* ================= 会员登录 ================= */
.user-zone { display: flex; align-items: center; gap: 6px; margin-left: 4px; }
.user-name {
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: rgba(238, 242, 245, .72);
}
.user-btn {
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #f2f6f9; border-radius: 4px; padding: 4px 11px;
  font-size: 12px; letter-spacing: .03em; cursor: pointer; white-space: nowrap;
}
.user-btn:hover { background: rgba(255, 255, 255, .16); }
.user-btn.ghost { background: transparent; border-color: transparent; color: rgba(238, 242, 245, .58); padding: 4px 6px; }
.user-btn.ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.auth-gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-backdrop {
  position: absolute; inset: 0;
  background: rgba(9, 19, 29, .66);
  backdrop-filter: blur(5px);
}
.auth-dialog {
  position: relative; z-index: 1;
  width: min(880px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  display: grid; grid-template-columns: .92fr 1.08fr;
  background: var(--panel); border-radius: 10px;
  box-shadow: 0 30px 80px rgba(5, 15, 25, .4);
  animation: authIn .32s cubic-bezier(.2, .7, .2, 1);
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.auth-close {
  position: absolute; top: 10px; right: 14px; z-index: 2;
  width: 32px; height: 32px; border: none; background: transparent;
  color: var(--ink-mute); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 4px;
}
.auth-close:hover { background: var(--line-soft); color: var(--ink); }

.auth-aside {
  position: relative; overflow: hidden;
  padding: 46px 38px 40px;
  background: linear-gradient(158deg, #10263b 0%, #183651 52%, #21486a 100%);
  color: #e9eff5; display: flex; flex-direction: column;
}
.auth-aside::after {
  content: ""; position: absolute; inset: auto -30% -45% -20%; height: 70%;
  background: radial-gradient(circle at 30% 30%, rgba(120, 170, 215, .28), transparent 65%);
  pointer-events: none;
}
.auth-aside-mark {
  width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 5px; display: grid; place-items: center; font-size: 17px;
  background: rgba(255, 255, 255, .06); margin-bottom: 26px;
}
.auth-aside-kicker {
  font-size: 11px; letter-spacing: .22em; color: rgba(233, 239, 245, .58);
  text-transform: uppercase; margin-bottom: 14px;
}
.auth-aside h2 {
  font-family: var(--serif); font-size: 27px; line-height: 1.42; font-weight: 600;
  letter-spacing: .02em; color: #fff;
}
.auth-aside p {
  margin-top: 18px; font-size: 13px; line-height: 1.85; color: rgba(233, 239, 245, .72);
}
.auth-aside ul {
  margin-top: auto; padding-top: 30px; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 12.5px; color: rgba(233, 239, 245, .68);
}
.auth-aside li { display: flex; align-items: center; gap: 9px; }
.auth-aside li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #8fb6d4; }

.auth-main { padding: 44px 44px 34px; display: flex; flex-direction: column; }
.auth-kicker { font-size: 11px; letter-spacing: .16em; color: var(--accent); font-weight: 600; }
.auth-main h3 { margin-top: 8px; font-size: 24px; letter-spacing: .01em; color: var(--ink); }
.auth-sub { margin-top: 6px; font-size: 12.5px; color: var(--ink-mute); }

.auth-tabs {
  display: flex; gap: 24px; margin: 26px 0 20px;
  border-bottom: 1px solid var(--line);
}
.auth-tab {
  background: none; border: none; padding: 0 0 10px; cursor: pointer;
  font-size: 13.5px; color: var(--ink-mute); position: relative;
}
.auth-tab.active { color: var(--navy); font-weight: 600; }
.auth-tab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--navy);
}

.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.auth-field input {
  height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px;
  background: #fbfbfa; color: var(--ink); font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus {
  border-color: var(--navy-soft); background: #fff;
  box-shadow: 0 0 0 3px rgba(43, 76, 111, .1);
}
.auth-code-row { display: flex; gap: 10px; }
.auth-code-row input { flex: 1; min-width: 0; }
.auth-code-row .btn { height: 42px; white-space: nowrap; }
.auth-submit { height: 44px; margin-top: 4px; letter-spacing: .08em; }
.auth-hint { font-size: 12px; color: var(--green); background: var(--green-soft); border-radius: 4px; padding: 8px 10px; }
.auth-error {
  margin-top: 16px; font-size: 12.5px; line-height: 1.7; color: var(--accent);
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0; padding: 10px 12px;
}
.auth-membership { margin-top: 12px; }
.auth-note {
  margin-top: auto; padding-top: 24px; font-size: 11.5px; line-height: 1.75; color: var(--ink-mute);
}

@media (max-width: 760px) {
  .user-name { display: none; }
  .user-zone { margin-left: 0; }
  .auth-gate { padding: 12px; align-items: flex-end; }
  .auth-dialog { grid-template-columns: 1fr; max-height: calc(100vh - 24px); }
  .auth-aside { display: none; }
  .auth-main { padding: 32px 22px 24px; }
  .auth-main h3 { font-size: 21px; }
  .auth-tabs { margin-top: 22px; }
  .auth-note { padding-top: 18px; }
  .auth-close { top: 4px; right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-dialog { animation: none; }
}

@media (max-width: 900px) {
  .brand-sub { display: none; }
  .source-status { display: none; }
  .topbar-inner { gap: 14px; padding: 0 18px; }
}
