:root {
  --navy: #073d73;
  --navy-2: #0a2f57;
  --blue: #0878dd;
  --blue-soft: #eaf4ff;
  --ink: #172033;
  --muted: #758094;
  --line: #e1e7ef;
  --surface: #fff;
  --canvas: #f4f7fb;
  --red: #e52d32;
  --red-dark: #b52c2c;
  --red-soft: #fff0f0;
  --amber: #c97809;
  --green: #2f971d;
  --shadow: 0 10px 28px rgba(28, 63, 104, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px 18px; display: flex; flex-direction: column; color: #eaf3fd; background: linear-gradient(180deg, var(--navy-2), #062849 72%, #041f39); box-shadow: 8px 0 24px rgba(4, 38, 70, .08); }
.brand { padding: 4px 10px 27px; }
.brand img { display: block; width: 168px; max-height: 62px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.brand span { display: block; margin-top: 5px; color: #97b7d5; font-size: 11px; letter-spacing: .04em; }
nav { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 0; padding: 12px 13px; text-align: left; color: #b7cce0; background: transparent; border-radius: 9px; transition: .18s ease; }
.nav-item span { display: inline-grid; width: 24px; margin-right: 8px; place-items: center; color: #d6e5f4; font-size: 17px; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.11); }
.nav-item.active { box-shadow: inset 3px 0 0 #55adff; }
.sidebar-help { margin: 22px 5px 0; padding: 14px; color: #a9c4dc; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 11px; }
.sidebar-help strong { color: #e7f2fc; font-size: 12px; }
.sidebar-help p { margin: 5px 0 0; font-size: 11px; line-height: 1.6; }
.sidebar-footer { margin-top: auto; padding: 15px 7px 0; border-top: 1px solid rgba(255,255,255,.12); }
/* 合作伙伴授权标识: 登录卡底部 + 侧栏边角 */
.partner-attr { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.partner-attr-sidebar { border-top: none; padding-top: 4px; color: #7d93ab; }
.sidebar-footer label { color: #9eb9d1; font-size: 11px; }
.sidebar-footer a { display: inline-block; margin-top: 12px; color: #c4daed; text-decoration: none; font-size: 12px; }
.secret-field { display: grid; grid-template-columns: 1fr 34px; gap: 6px; margin-top: 6px; }
.secret-field input { width: 100%; min-width: 0; padding: 9px; color: white; background: rgba(0,0,0,.18); border: 1px solid #42698d; border-radius: 7px; outline: none; }

main { min-width: 0; padding: 26px 32px 54px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.topbar h1 { margin: 1px 0 0; font-size: 27px; line-height: 1.2; letter-spacing: -.02em; }
.eyebrow { margin: 0; color: var(--blue); font-weight: 800; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }
.service-state { display: flex; gap: 8px; align-items: center; padding: 8px 13px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 4px 14px rgba(25,58,99,.04); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(201,120,9,.12); }
.dot.online { background: #24a35a; box-shadow: 0 0 0 4px rgba(36,163,90,.12); }
.dot.offline { background: var(--red); box-shadow: 0 0 0 4px rgba(229,45,50,.12); }

.view { display: none; }
.view.active { display: block; animation: reveal .2s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }

.hero { min-height: 224px; padding: 34px 38px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); align-items: center; overflow: hidden; background: linear-gradient(122deg, #fff 12%, #f1f8ff 62%, #e5f2ff); position: relative; }
.hero::after { content: ""; position: absolute; right: -70px; top: -115px; width: 310px; height: 310px; border: 55px solid rgba(8,120,221,.055); border-radius: 50%; }
.hero-copy, .hero-brand { position: relative; z-index: 1; }
.hero h2 { max-width: 720px; margin: 13px 0 8px; color: var(--navy); font-size: clamp(27px, 3vw, 42px); line-height: 1.18; letter-spacing: -.035em; }
.hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 15px; }
.hero-action { margin-top: 20px; }
.pill, .step-chip { display: inline-block; padding: 5px 10px; color: #0669bf; background: #dceeff; border-radius: 999px; font-size: 11px; font-weight: 800; }
.hero-brand { justify-self: end; width: 285px; min-height: 145px; padding: 22px; display: grid; align-content: center; background: rgba(255,255,255,.72); border: 1px solid rgba(130,182,229,.42); border-radius: 18px; backdrop-filter: blur(4px); }
.hero-brand img { width: 235px; max-height: 88px; object-fit: contain; }
.hero-brand strong, .hero-brand span { display: block; text-align: center; }
.hero-brand strong { margin-top: 8px; color: var(--navy); }
.hero-brand span { color: var(--muted); font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.service-metrics { margin: 16px 0; }
.metric { padding: 18px 20px; }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { display: block; margin: 5px 0 0; color: var(--navy); font-size: 26px; }

.result-dashboard { margin-top: 18px; padding: 28px; border-top: 4px solid var(--blue); }
.result-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.result-heading h2 { margin: 4px 0 2px; color: #101828; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.35; }
.result-meta { margin: 0; color: var(--muted); }
.result-heading-actions { display: flex; gap: 9px; flex-shrink: 0; }
.result-artifact-buttons { display: inline-flex; gap: 9px; flex-wrap: wrap; }
.result-artifact-buttons:empty { display: none; }
.risk-overview { padding: 24px; text-align: center; background: linear-gradient(135deg, #fff3f3, #ffe9e9); border: 1px solid #ff999d; border-radius: 16px; }
.risk-overview > span { color: var(--muted); }
.risk-overview > strong { display: block; margin: 3px 0 6px; color: var(--red); font-size: 37px; line-height: 1.2; }
.risk-overview p { max-width: 850px; margin: 0 auto 6px; color: #667085; }
.risk-overview small { display: block; color: #7c6670; }
/* 一个检测方法都没跑成时风险等级不成立：底色必须退成中性灰，
   否则「风险等级无法判定」那行字下面还铺着一整片高风险红底，配色先把结论说反了。 */
.result-dashboard[data-risk-level="unknown"] .risk-overview { background: linear-gradient(135deg, #f6f8fa, #eef1f5); border-color: var(--line); }
.result-dashboard[data-risk-level="unknown"] .risk-overview > strong { color: var(--muted); font-size: 26px; }
.risk-basis { max-width: 850px; margin: 6px auto 0; font-size: 12px; }
/* 老引擎结果横幅：整页顶部。配色取 HTML 报告 .legacy-banner 的同一套紫（报告里
   也是这一档），既与报告对得上，又不会和「不适用」的琥珀档撞色被读成同一件事。 */
.legacy-banner { margin: 0 0 16px; padding: 14px 18px; color: #42307d; background: #f6f3ff; border: 1px solid #c7b7f7; border-left: 5px solid #5925dc; border-radius: 12px; line-height: 1.7; }
.result-kpis { margin: 17px 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.result-kpis article { min-height: 112px; padding: 17px; background: #f2f0eb; border-radius: 12px; }
.result-kpis span, .result-kpis small { display: block; color: #888b91; }
.result-kpis strong { display: block; margin: 6px 0 0; color: var(--navy); font-size: 32px; line-height: 1.15; overflow-wrap: anywhere; }
.result-kpis article:first-child strong, .result-kpis article:nth-child(2) strong { color: var(--red-dark); }
.result-kpis article:nth-child(3) strong, .result-kpis article:nth-child(4) strong { color: var(--amber); }
.result-detail { margin-top: 20px; padding: 21px; border: 1px solid var(--line); border-radius: 13px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.section-heading.compact { margin-bottom: 14px; }
.section-heading h2, .section-heading h3 { margin: 3px 0 0; }
.risk-legend { display: flex; gap: 13px; color: var(--muted); font-size: 11px; }
.risk-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; }
.risk-legend .high::before { background: var(--red-dark); }
.risk-legend .medium::before { background: var(--amber); }
.risk-legend .low::before { background: #5d9e20; }
.risk-bars { display: grid; gap: 11px; }
.risk-bar { display: grid; grid-template-columns: minmax(150px, 220px) minmax(160px, 1fr) 92px; gap: 11px; align-items: center; }
.risk-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #586174; }
.risk-bar-track { height: 27px; overflow: hidden; background: repeating-linear-gradient(90deg, #f5f7fa 0, #f5f7fa calc(10% - 1px), #e4e9f0 calc(10% - 1px), #e4e9f0 10%); border-radius: 4px; }
.risk-bar-fill { height: 100%; min-width: 7px; background: #5d9e20; border-radius: 4px; transition: width .35s ease; }
.risk-bar-fill.high { background: var(--red-dark); }
.risk-bar-fill.medium { background: var(--amber); }
.risk-bar-value { color: #687386; text-align: right; font-variant-numeric: tabular-nums; }
.empty-copy { margin: 0; padding: 18px; text-align: center; color: var(--muted); }
/* 空状态操作指南（检测结果页无任何任务时显示，显隐由 app.js 按 state.jobs 控制） */
.empty-guide { margin-top: 18px; padding: 26px 28px 28px; text-align: center; }
.empty-guide h3 { margin: 5px 0 18px; color: var(--navy); font-size: 19px; }
.empty-guide-steps { max-width: 880px; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; list-style: none; counter-reset: guide-step; }
.empty-guide-steps li { padding: 18px 16px; background: #f8fafc; border: 1px dashed var(--line); border-radius: 12px; counter-increment: guide-step; }
.empty-guide-steps li::before { content: counter(guide-step); display: inline-grid; width: 26px; height: 26px; place-items: center; margin-bottom: 8px; color: white; background: var(--blue); border-radius: 50%; font-size: 13px; font-weight: 700; }
.empty-guide-steps b { display: block; margin-bottom: 4px; color: var(--ink); }
.empty-guide-steps span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.core-finding { margin-top: 17px; padding: 19px 21px; color: #6d3638; background: var(--red-soft); border: 1px solid #ff9da0; border-radius: 14px; }
.core-finding h3 { margin: 0 0 7px; color: #b53539; }
.core-finding ul { margin: 0; padding-left: 21px; }
.core-finding li + li { margin-top: 4px; }
.result-footer { margin-top: 15px; padding: 14px 17px; display: flex; gap: 24px; align-items: center; background: #f7f9fc; border-radius: 10px; }
.result-footer div { display: flex; gap: 7px; align-items: baseline; }
.result-footer span { color: var(--muted); }
.result-footer strong { color: var(--navy); font-size: 19px; }
.result-footer p { margin: 0 0 0 auto; color: var(--muted); font-size: 11px; }

/* 报价仪表盘（scoped to data-mode=prices，不影响文档结果页） */
.result-dashboard[data-mode="prices"][data-risk-level="medium"] .risk-overview { background: linear-gradient(135deg, #fff8ec, #fff1d6); border-color: #f0c069; }
.result-dashboard[data-mode="prices"][data-risk-level="medium"] .risk-overview > strong { color: var(--amber); }
.result-dashboard[data-mode="prices"][data-risk-level="low"] .risk-overview { background: linear-gradient(135deg, #eefaf0, #e2f5e6); border-color: #93d29d; }
.result-dashboard[data-mode="prices"][data-risk-level="low"] .risk-overview > strong { color: var(--green); }
.result-dashboard[data-mode="prices"] .result-kpis strong { color: var(--navy); }
.result-dashboard[data-mode="prices"] .result-kpis strong.tone-danger { color: var(--red-dark); }
.result-dashboard[data-mode="prices"] .result-kpis strong.tone-warn { color: var(--amber); }
.result-dashboard[data-mode="prices"] .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.result-dashboard[data-mode="prices"] .table-note { margin: 10px 2px 0; color: var(--muted); font-size: 12px; }
.risk-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.risk-chip.extreme { color: #fff; background: var(--red-dark); }
.risk-chip.high { color: var(--red-dark); background: var(--red-soft); border: 1px solid #f2b0b2; }
.risk-chip.medium { color: var(--amber); background: #fff3d9; border: 1px solid #f0cd8a; }
.risk-chip.low { color: var(--green); background: #e6f6e9; border: 1px solid #a9dcb2; }
/* info=「提示」级（智能识别把证据降级后的标注），不是第四个风险等级：与报告 _risk_chip
   同款——琥珀空心，视觉上与高/中/低三档的实底芯片明确分开，不会被读成一个风险档。 */
.risk-chip.info { color: var(--amber); background: #fff; border: 1px solid #f0cd8a; }
.risk-chip.unknown { color: var(--muted); background: #eef1f5; border: 1px solid var(--line); }
.price-block { margin-top: 18px; padding: 20px 21px; border: 1px solid var(--line); border-radius: 13px; }
.price-block-title { margin: 0 0 13px; color: var(--navy); font-size: 15px; }
.group-row { display: flex; gap: 11px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.group-row:last-child { border-bottom: 0; }
.group-tag { flex-shrink: 0; padding: 2px 9px; color: var(--red-dark); background: var(--red-soft); border: 1px solid #f2b0b2; border-radius: 999px; font-size: 11px; font-weight: 700; }
.group-names { color: var(--ink); overflow-wrap: anywhere; }
.clue-list { margin: 0; padding-left: 20px; color: #445066; }
.clue-list li + li { margin-top: 6px; }
.clue-list strong { color: var(--navy); }
.clue-detail { margin-left: 6px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.two-column { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.overview-support { margin-top: 17px; }
.content-card, .form-card { padding: 25px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span { padding: 6px 9px; color: #32638f; background: #eef6fd; border: 1px solid #dceaf7; border-radius: 7px; font-size: 12px; }
.notice { margin: 0; padding-left: 14px; color: var(--muted); border-left: 3px solid var(--amber); }

label { display: grid; gap: 7px; color: #405166; font-weight: 650; }
label input[type="text"], label input[type="number"], label > input:not([type]) { width: 100%; padding: 12px 13px; color: var(--ink); background: white; border: 1px solid #cbd5e1; border-radius: 8px; outline: none; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,120,221,.1); }
.field-row, .upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 18px 0; }
.drop-zone { min-height: 150px; padding: 24px; place-content: center; text-align: center; color: #096abf; background: #f3f9ff; border: 1px dashed #7bb3e5; border-radius: 12px; cursor: pointer; }
.drop-zone:hover { background: #eaf5ff; border-color: var(--blue); }
.drop-zone.secondary { color: #56677a; background: #fafcff; border-color: #b8c5d4; }
.drop-zone.full { margin: 18px 0; }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
/* 拖拽上传高亮态（由 app.js 的 dragenter/dragover 加、dragleave/drop 摘） */
.drop-zone.drag-over { background: #dceeff; border-style: solid; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,120,221,.14); }
.drop-zone.drag-over b { color: var(--blue); }
.drop-zone b, .drop-zone span, .drop-zone small { display: block; }
.drop-zone b { margin-bottom: 3px; font-size: 15px; }
.drop-zone small { margin-top: 6px; color: var(--muted); font-weight: 400; }
fieldset { margin: 22px 0; padding: 17px; border: 1px solid var(--line); border-radius: 11px; }
legend { padding: 0 7px; color: var(--muted); }
.option-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }
.option-grid label { display: flex; gap: 7px; align-items: center; font-weight: 500; }
.option-grid input { accent-color: var(--blue); }
/* 增强检测区：默认不启用的开关与档位下拉，沿用 option-grid 的栅格语言 */
.option-note { margin: -2px 0 13px; color: var(--muted); font-size: 12px; }
/* 从属开关：主开关关掉时置灰，提示「勾了也不生效」（见 app.js wireOptionDependencies） */
.option-grid label.option-blocked { color: var(--muted); opacity: .55; cursor: not-allowed; }
.option-select-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 15px; }
.option-select-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.option-select-grid select { padding: 9px 10px; color: var(--ink); background: white; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 13px; }
.option-select-grid select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(8,120,221,.1); }
.option-preset-bar { margin: 16px 0 18px; padding: 14px 15px; background: #f8fbff; border: 1px solid #d7e7f5; border-radius: 11px; }
.option-preset-fields { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr); gap: 11px; }
.option-preset-fields label { color: var(--muted); font-size: 12px; font-weight: 600; }
.option-preset-fields select, .option-preset-fields input { width: 100%; min-width: 0; padding: 9px 10px; color: var(--ink); background: white; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 13px; }
.option-preset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.option-preset-actions button { padding: 7px 11px; color: #0869c2; background: white; border: 1px solid #bfd8ed; border-radius: 7px; font: inherit; font-size: 12px; }
.option-preset-actions button.danger { color: var(--red-dark); border-color: #f2b0b2; }
.option-preset-actions button:disabled { color: #9aa5b3; background: #f2f4f7; border-color: #dfe4ea; cursor: not-allowed; }
.option-preset-note { margin: 9px 0 0; color: var(--muted); font-size: 11px; font-weight: 400; }
.form-actions { display: flex; gap: 13px; align-items: center; margin-top: 20px; }
.primary-button, .secondary-button, .icon-button { border: 0; border-radius: 8px; }
.primary-button { padding: 11px 18px; color: white; background: linear-gradient(135deg, #0878dd, #0866bc); box-shadow: 0 6px 15px rgba(8,120,221,.16); }
.primary-button:hover { background: #0566bd; }
.secondary-button { padding: 10px 14px; color: #0869c2; background: var(--blue-soft); }
.icon-button { width: 34px; height: 34px; color: inherit; background: rgba(255,255,255,.12); }
.inline-status, .form-note { color: var(--muted); }
.batch-preview { padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.batch-preview.empty { color: var(--muted); }
.price-preflight { margin: 12px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.price-preflight.empty { color: var(--muted); }
.preflight-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 9px; }
.preflight-summary { color: var(--muted); font-size: 12px; }
.preflight-files { display: grid; gap: 7px; width: 100%; margin-top: 8px; }
.preflight-file { display: grid; grid-template-columns: minmax(150px, 1.25fr) minmax(120px, .9fr) 90px 130px auto; gap: 9px; align-items: center; padding: 8px 10px; border: 1px solid #dce6ef; border-radius: 8px; background: white; font-size: 12px; }
.preflight-file.ready { border-left: 3px solid var(--green); }
.preflight-file.error { border-left: 3px solid var(--red-dark); }
.preflight-file .file-name, .preflight-file .reason { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.preflight-file .reason { color: var(--red-dark); }
.preflight-file button { padding: 5px 8px; color: #176aa8; background: white; border: 1px solid #cfdbe7; border-radius: 6px; }
.batch-project.price-project { display: block; }
.batch-project-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.batch-project.invalid .batch-project-head strong { color: var(--red-dark); }
.file-type-overrides { margin: 12px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.file-type-overrides > p { margin: 0 0 9px; color: var(--muted); font-size: 12px; }
.file-type-row { display: flex; gap: 10px; align-items: center; margin-top: 7px; }
.file-type-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.file-type-row select { width: 170px; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; color: var(--ink); }
.batch-project .file-type-overrides { width: 100%; margin-bottom: 0; }
.batch-project { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.batch-project:last-child { border-bottom: 0; }

@media (max-width: 760px) {
  .preflight-file { grid-template-columns: 1fr auto; }
  .preflight-file > :not(.file-name):not(button) { grid-column: 1 / -1; }
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); background: #f8fafc; font-size: 11px; letter-spacing: .05em; }
th:first-child { border-radius: 8px 0 0 0; }
th:last-child { border-radius: 0 8px 0 0; }
td code { font-size: 11px; }
.status-badge { padding: 4px 8px; color: #556070; background: #eef1f5; border-radius: 999px; font-size: 11px; }
.status-badge.completed { color: #117b45; background: #dcf5e7; }
.status-badge.failed { color: #aa3034; background: #fde4e5; }
.status-badge.running { color: #a46508; background: #fff0d4; }
.progress-track { width: 120px; height: 6px; overflow: hidden; background: #e8edf3; border-radius: 5px; }
.progress-track i { display: block; height: 100%; background: var(--blue); }
.row-actions { display: flex; gap: 6px; }
.row-actions button { padding: 5px 8px; color: #176aa8; background: white; border: 1px solid #cfdbe7; border-radius: 6px; }
/* 任务历史「删除」按钮：危险操作用红色系区分 */
.row-actions button.danger { color: var(--red-dark); border-color: #f2b0b2; }
.row-actions button.danger:hover { background: var(--red-soft); }
.empty-cell { padding: 34px; text-align: center; color: var(--muted); }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 420px; padding: 12px 16px; color: white; background: #153a5e; border-radius: 9px; box-shadow: 0 16px 45px rgba(17,48,78,.22); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #873a3d; }
.job-completion-notices { position: fixed; right: 24px; bottom: 76px; z-index: 49; width: min(390px, calc(100vw - 32px)); display: grid; gap: 9px; pointer-events: none; }
.job-completion-notice { padding: 13px 14px; display: flex; gap: 14px; align-items: center; justify-content: space-between; color: #17324d; background: #f4fbf7; border: 1px solid #a9d9bb; border-left: 4px solid var(--green); border-radius: 10px; box-shadow: 0 14px 38px rgba(17,48,78,.16); pointer-events: auto; }
.job-completion-copy { min-width: 0; }
.job-completion-copy strong, .job-completion-copy span { display: block; }
.job-completion-copy span { margin-top: 2px; color: #557064; font-size: 12px; overflow-wrap: anywhere; }
.job-completion-actions { flex-shrink: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.job-completion-actions button { padding: 6px 8px; color: #0869c2; background: white; border: 1px solid #b9d5e9; border-radius: 7px; font: inherit; font-size: 11px; }
.job-completion-actions .job-completion-close { color: var(--muted); }
dialog { width: min(980px, 92vw); max-height: 84vh; padding: 0; border: 0; border-radius: 13px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(5,31,55,.55); }
.dialog-head { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; color: white; background: var(--navy); }
.dialog-head h3 { margin: 0; }
dialog pre { margin: 0; padding: 20px; max-height: 70vh; overflow: auto; background: #f7f9fc; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* 相似图片人工复核：缩略图由鉴权产物接口取回后转成有界 data URL，
   这些样式只负责展示，不把任何图像路径当作公开静态地址。 */
.image-review-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.image-review-card { min-width: 0; padding: 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 11px; }
.image-review-card-head { margin: 0 0 8px; color: #405166; font-size: 12px; overflow-wrap: anywhere; }
.image-review-thumbnails { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.image-review-thumbnails figure { min-width: 0; margin: 0; }
.image-review-thumbnails img { width: 100%; height: 150px; display: block; object-fit: contain; background: #eef1f5; border: 1px solid var(--line); border-radius: 8px; }
.image-review-thumbnails figcaption { margin-top: 4px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-review-load-status { min-height: 20px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.image-review-load-status.error { color: var(--red-dark); }
.image-review-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.image-review-actions button, .image-review-mode-tabs button { padding: 6px 11px; color: #0869c2; background: var(--blue-soft); border: 1px solid #cbe2f7; border-radius: 7px; font: inherit; font-size: 12px; }
.image-review-actions button:disabled { color: var(--muted); background: #eef1f5; border-color: var(--line); cursor: not-allowed; }
.image-review-dialog { width: min(1080px, 94vw); max-height: 92vh; }
.image-review-dialog-body { padding: 16px 18px 18px; overflow-y: auto; max-height: calc(92vh - 58px); }
.image-review-dialog-meta { margin: 0 0 11px; color: #405166; overflow-wrap: anywhere; }
.image-review-mode-tabs { display: flex; gap: 7px; margin-bottom: 12px; }
.image-review-mode-tabs button[aria-pressed="true"] { color: white; background: var(--blue); border-color: var(--blue); }
.image-review-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.image-review-side figure { min-width: 0; margin: 0; }
.image-review-side img, .image-review-overlay img, .image-review-slider-stage img { width: 100%; height: min(58vh, 560px); display: block; object-fit: contain; background: #eef1f5; }
.image-review-side img { border: 1px solid var(--line); border-radius: 9px; }
.image-review-side figcaption { margin-top: 5px; text-align: center; color: var(--muted); font-size: 12px; }
.image-review-overlay, .image-review-slider-stage { position: relative; min-height: min(58vh, 560px); overflow: hidden; background: #eef1f5; border: 1px solid var(--line); border-radius: 9px; }
.image-review-overlay img, .image-review-slider-stage img { position: absolute; inset: 0; }
.image-review-overlay img:last-child { opacity: .5; }
.image-review-slider-stage img:last-child { clip-path: inset(0 50% 0 0); }
.image-review-range { margin-top: 10px; display: grid; grid-template-columns: max-content minmax(160px, 1fr); gap: 12px; align-items: center; color: var(--muted); font-size: 12px; }
.image-review-range input { width: 100%; accent-color: var(--blue); }
.image-review-caveat { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.typo-context-cell { min-width: 230px; max-width: 390px; white-space: normal; line-height: 1.65; }
.typo-context { overflow-wrap: anywhere; }
.typo-context-hit { padding: 0 2px; color: #8b1e22; background: #ffe08a; border-radius: 3px; font-weight: 800; }
.page-review-dialog { width: min(1440px, 97vw); max-height: 95vh; }
.page-review-dialog-body { max-height: calc(95vh - 58px); padding: 14px 16px 18px; overflow: auto; }
.page-review-dialog-meta { margin: 0 0 6px; color: #33475e; font-weight: 700; overflow-wrap: anywhere; }
.page-review-caveat { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.page-review-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.page-review-side { min-width: 0; padding: 11px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.page-review-side h4 { margin: 0 0 8px; color: var(--navy); font-size: 13px; overflow-wrap: anywhere; }
.page-review-stage { position: relative; height: min(66vh, 760px); overflow: auto; background: #e7ecf2; border: 1px solid var(--line); border-radius: 8px; }
.page-review-stage img { display: block; width: 100%; height: auto; min-height: 220px; object-fit: contain; transform-origin: top left; transition: transform .12s ease; }
.page-review-boxes { position: absolute; inset: 0; pointer-events: none; transform-origin: top left; transition: transform .12s ease; }
.page-review-box { position: absolute; background: rgba(255, 214, 64, .24); border: 2px solid #e39a00; box-shadow: 0 0 0 1px rgba(255,255,255,.8); }
.page-review-status { min-height: 20px; margin: 7px 0; color: var(--muted); font-size: 11px; }
.page-review-status.error { color: var(--red-dark); }
.page-review-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.page-review-controls button { padding: 5px 8px; color: #0869c2; background: var(--blue-soft); border: 1px solid #cbe2f7; border-radius: 6px; font: inherit; font-size: 11px; }
.page-review-controls button:disabled { color: var(--muted); background: #eef1f5; border-color: var(--line); cursor: not-allowed; }
.page-review-controls span { min-width: 92px; color: #405166; text-align: center; font-size: 11px; }

/* 顶栏账户区（登录后显示当前用户与登出） */
.topbar-right { display: flex; gap: 12px; align-items: center; }
.account { display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; background: white; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 4px 14px rgba(25,58,99,.04); }
.account-user { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-weight: 700; }
.account .secondary-button { padding: 7px 12px; }

/* 登录界面：全屏遮罩，覆盖并阻断主应用 */
/* 鉴权判定前隐藏应用主体: 未登录用户绝不先看到主界面一闪。判定后由 JS 摘除 auth-pending。 */
body.auth-pending .app-shell { visibility: hidden; }
body.auth-pending::before { content: "载入中…"; position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.login-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: linear-gradient(150deg, #08315c 0%, #062849 55%, #041f39 100%); overflow-y: auto; }
.login-card { width: min(400px, 100%); padding: 34px 32px 30px; display: grid; gap: 14px; background: var(--surface); border-radius: 16px; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.login-brand { display: grid; justify-items: center; gap: 6px; margin-bottom: 4px; }
.login-brand img { width: 176px; max-height: 60px; object-fit: contain; }
.login-brand span { color: var(--muted); font-size: 12px; letter-spacing: .03em; }
.login-card h2 { margin: 6px 0 0; text-align: center; color: var(--navy); font-size: 21px; }
.login-sub { margin: 0 0 4px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-card label { gap: 6px; }
.login-card input { width: 100%; padding: 12px 13px; color: var(--ink); background: white; border: 1px solid #cbd5e1; border-radius: 8px; outline: none; }
.login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,120,221,.1); }
.login-card .primary-button { margin-top: 4px; padding: 12px 18px; width: 100%; text-align: center; }
.login-error { margin: 0; padding: 9px 12px; color: var(--red-dark); background: var(--red-soft); border: 1px solid #f2b0b2; border-radius: 8px; font-size: 13px; }

@media (max-width: 1120px) {
  .metric-grid, .result-kpis { grid-template-columns: 1fr 1fr; }
  .option-grid { grid-template-columns: repeat(3, 1fr); }
  .option-select-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-brand { display: none; }
}
@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px; }
  .brand { padding-bottom: 12px; }
  .brand img { width: 140px; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sidebar-help, .sidebar-footer { display: none; }
  main { padding: 18px 13px 40px; }
  .hero, .two-column, .field-row, .upload-grid { grid-template-columns: 1fr; }
  .hero { padding: 25px; }
  .result-heading, .result-footer { align-items: flex-start; flex-direction: column; }
  .result-footer p { margin-left: 0; }
  .risk-bar { grid-template-columns: 110px minmax(100px, 1fr) 70px; }
  .empty-guide-steps { grid-template-columns: 1fr; }
  .image-review-gallery, .image-review-side { grid-template-columns: 1fr; }
  .image-review-side img { height: min(34vh, 320px); }
  .image-review-overlay, .image-review-slider-stage { min-height: min(52vh, 440px); }
  .image-review-overlay img, .image-review-slider-stage img { height: min(52vh, 440px); }
}
@media (max-width: 560px) {
  .metric-grid, .result-kpis, .option-grid, .option-select-grid { grid-template-columns: 1fr; }
  .option-preset-fields { grid-template-columns: 1fr; }
  .topbar { align-items: flex-end; }
  .result-dashboard, .content-card, .form-card { padding: 18px; }
  .result-heading-actions { width: 100%; flex-wrap: wrap; }
  .job-completion-notices { right: 12px; bottom: 64px; width: calc(100vw - 24px); }
  .job-completion-notice { align-items: flex-start; flex-direction: column; }
  .job-completion-actions { justify-content: flex-start; }
}

/* ---------------------------------------------------------------------------
   文档检测仪表盘扩展：检测覆盖条 / 十格 KPI / 参检文件 / 逐维度证据面板。
   全部沿用既有 card / metric / risk-chip / section-heading / table-wrap 语言与
   配色变量，不引入新框架、新字体、新配色。
   --------------------------------------------------------------------------- */

/* 检测方法执行状态：四态各自一套视觉，绝不互相顶替 */
.coverage-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.coverage-count { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 11px; color: var(--muted); background: #f8fafc; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }
.coverage-count i { font-style: normal; }
.coverage-count b { color: var(--navy); font-size: 13px; font-variant-numeric: tabular-nums; }
.coverage-count.state-done b { color: var(--green); }
.coverage-count.state-partial b { color: #0869c2; }
.coverage-count.state-legacy b { color: #5925dc; }
.coverage-count.state-disabled b { color: var(--muted); }
.coverage-count.state-skipped b { color: var(--amber); }
.coverage-count.state-failed b { color: var(--red-dark); }
.coverage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.coverage-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.coverage-item.state-disabled { background: #f4f6f8; }
.coverage-item.state-legacy { background: #faf8ff; border-color: #c7b7f7; }
.coverage-item.state-skipped { background: #fffaf0; border-color: #f0cd8a; }
.coverage-item.state-failed { background: var(--red-soft); border-color: #f2b0b2; }
.coverage-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #405166; }
.coverage-legend { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }

/* 状态芯片：配色沿用变量表，但【形态与风险等级芯片互斥】——
   风险等级是实底色块（.high/.medium/.low），状态是「描边 + 状态点」的空心药丸。
   同一面板里既有状态芯片又有风险芯片，只靠颜色区分会互撞（绿=已完成 vs 绿=低风险、
   红=执行失败 vs 红=高风险），形态不同才能一眼读对。 */
.risk-chip.state-done, .risk-chip.state-partial, .risk-chip.state-skipped,
.risk-chip.state-failed, .risk-chip.state-disabled, .risk-chip.state-legacy {
  display: inline-flex; gap: 6px; align-items: center; padding: 2px 10px 2px 8px;
  background: var(--surface); border-style: solid; border-width: 1px; font-weight: 600;
}
.risk-chip.state-done::before, .risk-chip.state-partial::before, .risk-chip.state-skipped::before,
.risk-chip.state-failed::before, .risk-chip.state-disabled::before, .risk-chip.state-legacy::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.risk-chip.state-done { color: var(--green); border-color: #a9dcb2; }
.risk-chip.state-partial { color: #0869c2; border-color: #cbe2f7; }
.risk-chip.state-skipped { color: var(--amber); border-color: #f0cd8a; }
.risk-chip.state-failed { color: var(--red-dark); border-color: #f2b0b2; }
.risk-chip.state-disabled { color: var(--muted); border-color: var(--line); }
.risk-chip.state-legacy { color: #5925dc; border-color: #c7b7f7; }

/* 区块渲染失败提示：无内容时不占位（JS 用空串清除） */
.block-error { margin: 10px 2px 0; color: var(--red-dark); font-size: 12px; }
.block-error:empty, .evidence-note:empty, .table-note:empty { display: none; margin: 0; }

/* 文档模式 KPI：十格两行，数值配色改由 JS 按「有没有命中 / 模块跑没跑」下发 */
.result-dashboard[data-mode="documents"] .result-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.result-dashboard[data-mode="documents"] .result-kpis article { min-height: 104px; padding: 15px 16px; }
.result-dashboard[data-mode="documents"] .result-kpis strong { color: var(--navy); font-size: 26px; }
.result-dashboard[data-mode="documents"] .result-kpis strong.tone-danger { color: var(--red-dark); }
.result-dashboard[data-mode="documents"] .result-kpis strong.tone-warn { color: var(--amber); }
.result-dashboard[data-mode="documents"] .result-kpis strong.tone-muted { color: var(--muted); font-size: 19px; }
.result-dashboard[data-mode="documents"] .result-kpis small { font-size: 11px; line-height: 1.5; }
.result-dashboard[data-mode="documents"] .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.result-dashboard[data-mode="documents"] .table-note { margin: 10px 2px 0; color: var(--muted); font-size: 12px; }
.result-dashboard[data-mode="documents"] .result-footer p { margin-left: 0; }

/* 逐维度证据面板：details/summary 原生折叠 */
.evidence-panel { margin-top: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.evidence-panel > summary { display: flex; gap: 12px; align-items: center; padding: 12px 15px; color: var(--navy); background: #f8fafc; font-weight: 700; cursor: pointer; list-style: none; }
.evidence-panel > summary::-webkit-details-marker { display: none; }
.evidence-panel > summary::before { content: "▸"; color: var(--blue); font-size: 11px; }
.evidence-panel[open] > summary::before { content: "▾"; }
.evidence-panel > summary:hover { background: var(--blue-soft); }
.evidence-title { flex: 1; min-width: 0; }
/* 状态闸容器：只用于把「已放行的结论」在 DOM 上圈成一块（便于排障与断言），
   不参与布局，故 display:contents——加闸前后的版式逐像素一致。 */
.stated-body, .fact-body { display: contents; }
.evidence-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.evidence-count { padding: 2px 9px; color: #32638f; background: #eef6fd; border: 1px solid #dceaf7; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.evidence-body { padding: 14px 15px 16px; border-top: 1px solid var(--line); }
.evidence-body .clue-list { margin: 6px 0 0; }
.evidence-note { margin: 0 0 10px; color: #445066; }
.evidence-body > .evidence-note:last-child { margin-bottom: 0; }
.snippet-cell { white-space: normal; min-width: 200px; max-width: 460px; }
.exact-match-cell { background: #fff8c9; box-shadow: inset 0 0 0 1px #f4df78; }
.evidence-table-workbench { position: relative; min-width: 0; padding: 10px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; }
.evidence-table-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 9px; }
.evidence-table-search, .evidence-risk-filter { min-height: 34px; padding: 6px 9px; color: var(--ink); background: white; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; font-size: 12px; }
.evidence-table-search { min-width: min(260px, 100%); flex: 1 1 220px; }
.compact-button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.evidence-column-panel { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 0 0 9px; padding: 8px 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.evidence-column-panel[hidden] { display: none; }
.evidence-column-panel label { display: inline-flex; gap: 3px; align-items: center; color: #405166; font-size: 12px; white-space: nowrap; }
.evidence-sortable { cursor: pointer; user-select: none; }
.evidence-sortable::after { content: " ⇅"; color: #8a98aa; font-size: 10px; }
.evidence-sortable[aria-sort="ascending"]::after { content: " ▲"; color: var(--blue); }
.evidence-sortable[aria-sort="descending"]::after { content: " ▼"; color: var(--blue); }
.evidence-row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 150px; }
.evidence-favorite-button { padding: 5px 8px; color: #805300; background: #fffaf0; border: 1px solid #ead38d; border-radius: 6px; font: inherit; font-size: 11px; white-space: nowrap; }
.evidence-favorite-button.is-active { color: #9a5d00; background: #fff1b8; border-color: #d9a300; }
.evidence-table-workbench.is-fullscreen { position: fixed; inset: 12px; z-index: 90; overflow: auto; padding: 18px; background: white; box-shadow: 0 20px 70px rgba(8,31,55,.38); }
.evidence-table-workbench:fullscreen { overflow: auto; padding: 22px; background: white; }
.evidence-favorites-open { position: fixed; right: 22px; bottom: 22px; z-index: 48; padding: 9px 14px; color: white; background: var(--blue); border: 0; border-radius: 999px; box-shadow: 0 10px 28px rgba(8,71,126,.28); font: inherit; font-size: 12px; font-weight: 700; }
.evidence-favorites-open span { display: inline-grid; min-width: 20px; min-height: 20px; margin-left: 4px; place-items: center; color: var(--navy); background: white; border-radius: 999px; }
.evidence-favorites-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(520px, 94vw); overflow: auto; padding: 20px; background: white; box-shadow: -18px 0 60px rgba(8,31,55,.28); transform: translateX(110%); transition: transform .18s ease; visibility: hidden; }
.evidence-favorites-drawer.is-open { transform: translateX(0); visibility: visible; }
.evidence-favorites-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.evidence-favorites-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.evidence-favorite-item { padding: 13px 0; border-top: 1px solid var(--line); }
.evidence-favorite-item b { display: block; color: var(--navy); }
.evidence-favorite-item p { margin: 6px 0 9px; color: #475467; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
/* 证据面板内的二级标题与可折叠子块：沿用既有字号/配色变量，不引入新配色新字体 */
.evidence-subhead { margin: 16px 0 8px; color: var(--navy); font-size: 13px; font-weight: 700; }
.evidence-body > .evidence-subhead:first-child { margin-top: 0; }
.evidence-panel.nested { margin-top: 8px; border-radius: 10px; }
.evidence-panel.nested > summary { padding: 9px 12px; font-size: 13px; font-weight: 600; }
.evidence-panel.nested > .evidence-body { padding: 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }

@media (max-width: 1120px) {
  .result-dashboard[data-mode="documents"] .result-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .result-dashboard[data-mode="documents"] .result-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coverage-grid { grid-template-columns: 1fr; }
  .coverage-block .section-heading.compact { flex-direction: column; gap: 10px; }
  .coverage-strip { width: 100%; }
  .evidence-panel > summary { flex-wrap: wrap; }
  .evidence-chips { justify-content: flex-start; }
  .snippet-cell { min-width: 160px; max-width: 260px; }
}
@media (max-width: 560px) {
  .result-dashboard[data-mode="documents"] .result-kpis { grid-template-columns: 1fr; }
  .page-review-sides { grid-template-columns: 1fr; }
  .page-review-stage { height: min(56vh, 560px); }
  .evidence-favorites-open { right: 12px; bottom: 12px; }
}

@media print {
  .evidence-table-tools, .evidence-column-panel, .evidence-favorites-open, .evidence-favorites-drawer,
  .evidence-favorite-button, .job-completion-notices, .option-preset-bar { display: none !important; }
  .evidence-table-workbench { padding: 0; border: 0; }
  .evidence-table-workbench tbody tr { display: table-row !important; }
}

/* 原页对照不可用时，把原因直接显示在按钮旁（此前只在 title 里，用户看不到） */
.evidence-page-reason { flex-basis: 100%; max-width: 18em; white-space: normal; color: #64748b; font-size: 12px; line-height: 1.4; }
.evidence-page-reason::after { content: attr(data-reason); }

/* 增强与高级检测：与基础「检测项目」用两套色调区分（基础=蓝，增强=紫），表单与结果页共用 */
:root { --enh: #6d28d9; --enh-ink: #4c1d95; --enh-soft: #f3eefc; --enh-line: #c4b5fd; }
fieldset.enhanced { border-color: var(--enh-line); background: linear-gradient(180deg, #faf8ff, #fff 60%); }
fieldset.enhanced legend { color: var(--enh-ink); font-weight: 700; }
.enhanced-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; color: #fff; background: var(--enh); border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; vertical-align: 1px; }
fieldset.enhanced .option-grid input { accent-color: var(--enh); }
fieldset.enhanced .option-grid label:has(input:checked) { color: var(--enh-ink); font-weight: 700; background: var(--enh-soft); border-radius: 6px; padding: 2px 6px; margin: -2px -6px; }
fieldset.enhanced .option-select-grid select:not([value=""]):has(option:checked:not([value=""])) { border-color: var(--enh-line); background: var(--enh-soft); }
/* 结果页：增强项的面板与状态格带紫色标识；顶部「本次启用的增强项」导航条 */
.evidence-panel.enhanced { border-left: 4px solid var(--enh); }
.evidence-panel.enhanced > summary .evidence-title::before, .coverage-item.enhanced .coverage-name::before { content: "增强"; display: inline-block; margin-right: 6px; padding: 0 6px; color: #fff; background: var(--enh); border-radius: 999px; font-size: 10px; font-weight: 800; vertical-align: 1px; }
.enhancement-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; padding: 10px 12px; background: var(--enh-soft); border: 1px solid var(--enh-line); border-radius: 10px; }
.enhancement-strip > b { color: var(--enh-ink); font-size: 13px; margin-right: 4px; }
.enhancement-strip a, .enhancement-strip span.enh-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; background: #fff; border: 1px solid var(--enh-line); border-radius: 999px; color: var(--enh-ink); font-size: 12.5px; text-decoration: none; }
.enhancement-strip a:hover { background: var(--enh); color: #fff; }
.enhancement-strip .enh-status { padding: 0 6px; border-radius: 999px; font-size: 11px; background: #eef1f5; color: #475569; }
.enhancement-strip .enh-status.ok { background: #e3f2ea; color: #237a57; }
.enhancement-strip .enh-status.warn { background: #f7efdb; color: #9a6b12; }
.enhancement-strip .enh-status.found { background: #fdecea; color: #b5472a; font-weight: 700; }
.enhancement-strip .enh-toggle { margin-left: auto; display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--enh-ink); }
.evidence-panel.is-empty[data-hide-empty] { display: none; }
.panel-target-flash { animation: panelFlash 1.6s ease-out; }
@keyframes panelFlash { 0% { box-shadow: 0 0 0 3px var(--enh); } 100% { box-shadow: 0 0 0 0 transparent; } }
