*{box-sizing:border-box}body{margin:0;background:#f5f7fa;color:#111827;font:14px ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}button{font:inherit;cursor:pointer;transition:background .15s,border-color .15s}button:focus-visible{outline:2px solid #1890ff;outline-offset:3px}::selection{background:#dbeafe;color:#1e3a8a}[hidden]{display:none!important}main{max-width:1504px;margin:auto;padding:32px}.card{padding:24px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 1px 2px #0000000d}.header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:24px;border-bottom:1px solid #f3f4f6}h1{font-size:18px;line-height:28px;margin:0;font-weight:700;letter-spacing:-.025em}.legend{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:12px;color:#6b7280;white-space:nowrap}.gradient{width:96px;height:8px;border-radius:99px;background:linear-gradient(to right,#42b96e,#eab308,#b8471e)}.note{margin-left:8px}.controls,.filters,.views{display:flex;align-items:center}.controls{gap:12px;flex-wrap:wrap}.filters{gap:6px}.filters button,.views button{padding:6px 12px;line-height:20px;font-weight:500;background:#fff;color:#4b5563;border:1px solid #e5e7eb;border-radius:4px;white-space:nowrap}.filters button:hover{border-color:#9ca3af}.filters .active{border-color:#1890ff;color:#1890ff;background:#eff6ff80}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;background:var(--risk-color)}[data-filter=high]{--risk-color:#ef4444}[data-filter=medium]{--risk-color:#f59e0b}[data-filter=normal]{--risk-color:#10b981}[data-filter=high].active{border-color:#ef4444;color:#dc2626;background:#fef2f280}[data-filter=medium].active{border-color:#f59e0b;color:#b45309;background:#fffbeb80}[data-filter=normal].active{border-color:#10b981;color:#047857;background:#ecfdf580}.views{border:1px solid #e5e7eb;border-radius:4px;overflow:hidden}.views button{display:flex;align-items:center;gap:6px;border:0;border-radius:0}.views button+button{border-left:1px solid #e5e7eb}.views .active{background:#1890ff;color:#fff}.views button:not(.active):hover{background:#f9fafb}svg{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}#content{padding-top:24px}.matrix-scroll{overflow-x:auto;padding:8px 0 48px;scrollbar-color:#cbd5e1 #f5f7fa;scrollbar-width:thin}.matrix{width:max-content;user-select:none}.matrix-head,.matrix-row{display:flex;align-items:center;gap:8px}.matrix-head{margin-bottom:8px}.matrix-row+.matrix-row{margin-top:8px}.row-label{width:104px;flex-shrink:0;text-align:right;padding-right:4px}.column-label{width:88px;text-align:center;padding:0 4px}.row-label,.column-label{font-weight:500;color:#374151;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell{width:88px;height:64px;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:0;border-radius:8px;background:#42b96e;color:#fff;box-shadow:0 1px 2px #0000000d}.cell.triggered{background:#b8471e}.cell:hover,.cell:focus-visible{background:#38a760;outline:2px solid #3b82f6;outline-offset:2px}.cell.triggered:hover,.cell.triggered:focus-visible{background:#a33d18}.cell.dimmed{opacity:.25;filter:grayscale(.5)}.cell strong{font-size:18px;font-weight:600;letter-spacing:-.025em}.unit{font-size:12px;opacity:.9;margin-left:2px}.self-badge{position:absolute;top:4px;right:4px;font-size:9px;line-height:12px;font-weight:400;padding:0 4px;border-radius:3px;background:#00000026;color:#ffffffe6}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap;font-variant-numeric:tabular-nums}th{padding:12px 16px;background:#f9fafbb3;border-bottom:1px solid #e5e7eb;font-weight:500;color:#374151}td{padding:14px 16px;border-bottom:1px solid #f3f4f6}th:not(:nth-child(2)),td:not(:nth-child(2)){text-align:center}th:nth-child(2){min-width:340px}tbody tr[data-pair]{cursor:pointer}tbody tr[data-pair]:hover{background:#eff6ff66}.sequence{color:#6b7280}.pair-name{color:#1f2937}.pair-name .dot{width:10px;height:10px;margin-right:10px;background:#52c41a}.risk-row .dot{background:#dc2626}.pair-button{border:0;background:none;padding:0;color:inherit;text-align:left}.vs{color:#9ca3af;margin:0 8px;font-weight:400}.metric{color:#52c41a}.risk-row .metric,.danger{color:#dc2626}.risk-row .metric.nonzero{font-weight:600}.empty{padding:48px 16px;color:#6b7280}.popover{position:fixed;z-index:40;width:320px;max-width:calc(100vw - 16px);padding:14px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 20px 25px -5px #00000026,0 8px 10px -6px #00000026;color:#1f2937;font-size:12px}.popover-title{display:flex;align-items:center;padding-bottom:10px;border-bottom:1px solid #f3f4f6;font-weight:600}.popover-title span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-title span:last-child{text-align:right}.popover-title span:only-child{text-align:left}.popover-title em{margin:0 6px;color:#9ca3af;font-weight:400;font-style:normal}.popover-summary{display:flex;align-items:center;justify-content:space-between;margin:10px 0;padding-bottom:10px;border-bottom:1px solid #f3f4f6}.popover-summary strong{font-size:20px}.good{color:#42b96e}.bad{color:#b8471e}.badge{font-size:11px;border-radius:99px;padding:2px 10px;border:1px solid #a7f3d0;background:#ecfdf5;color:#059669}.badge-danger{border-color:#fecaca;background:#fef2f2;color:#dc2626}.metric-line{display:flex;justify-content:space-between;align-items:center;color:#4b5563}.metric-line+.metric-line{margin-top:8px}.popover-footer{margin-top:14px;padding-top:10px;border-top:1px solid #f3f4f6;text-align:center}.link{border:0;background:none;color:#1890ff;font-size:12px;font-weight:500;padding:2px 8px}.link:hover{color:#1d4ed8}.backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:#0006;backdrop-filter:blur(2px);padding:16px}.modal{width:100%;max-width:512px;max-height:calc(100dvh - 32px);overflow:auto;background:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 25px 50px -12px #0004}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 24px;border-bottom:1px solid #f3f4f6;background:#f9fafbb3}.modal-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}h2{font-size:16px;margin:0;font-weight:600}.notice-badge{font-size:12px;line-height:18px;padding:1px 8px;border:1px solid #fde68a;border-radius:99px;background:#fffbeb;color:#b45309}.close{background:none;border:0;color:#9ca3af;padding:4px;border-radius:6px;line-height:0}.close:hover{background:#f3f4f6;color:#4b5563}#modal-body{padding:24px}.notice{display:flex;align-items:flex-start;gap:12px;padding:14px;background:#eff6ffcc;border:1px solid #bfdbfeb3;border-radius:8px;color:#1e40af}.notice svg{width:20px;height:20px;color:#1890ff;margin-top:2px}.notice p{margin:0}.notice p+p{font-size:12px;line-height:1.625;margin-top:2px;color:#1d4ed8}.companies{display:flex;align-items:center;gap:8px;margin-top:20px;padding:16px;background:#f9fafb;border:1px solid #f3f4f6;border-radius:8px;font-weight:600;color:#1f2937}.companies span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.companies span:last-child{text-align:right}.companies span:only-of-type{text-align:left}.companies small,.muted{color:#6b7280;font-size:12px;font-weight:400}.status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;padding:14px;border:1px solid #e5e7eb;border-radius:8px}.status-value{margin-top:2px;font-weight:700}.status-total{text-align:right}.status-total strong{display:block;font-size:20px}.breakdown-title{margin:20px 0 8px;font-size:12px;color:#6b7280;font-weight:500}.breakdown{display:grid;grid-template-columns:1fr 1fr;gap:8px}.breakdown .metric-line{margin:0;padding:12px;border:1px solid #f3f4f6;border-radius:8px;background:#f9fafbcc;font-size:12px;gap:8px}.modal footer{display:flex;justify-content:flex-end;padding:14px 24px;background:#f9fafb;border-top:1px solid #f3f4f6}.primary{padding:8px 16px;color:#fff;background:#1890ff;border:0;border-radius:6px;font-weight:500}.primary:hover{background:#1677ff}
@media(max-width:1100px){.header{align-items:flex-start;flex-direction:column}}@media(max-width:639px){main{padding:16px}.card{padding:20px}.note{display:none}.filters button,.views button{font-size:12px}.cell,.column-label{width:80px}.cell{height:56px}.cell strong{font-size:16px}.row-label,.column-label{font-size:12px}.modal-header,#modal-body{padding:16px}.breakdown{grid-template-columns:1fr}}

/* 规则分类与完整单位名称：移植优化版布局，沿用静态详情路由。 */
.rule-search{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-top:16px;font-size:12px}.rule-search label{font-weight:600;color:#374151}.rule-search select{min-width:170px;padding:6px 12px;border:1px solid #d1d5db;border-radius:4px;background:white;color:#1f2937;font:500 12px/20px inherit;cursor:pointer}.rule-search select:hover{border-color:#60a5fa}.rule-search select:focus-visible{outline:2px solid #1890ff;outline-offset:2px}#scope-note{color:#6b7280;margin-left:4px}#content{padding-top:8px}.matrix-head{height:64px;align-items:flex-end}.matrix-head .row-label{height:100%}.row-label{width:224px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;padding-right:16px;font-weight:600;line-height:1.4;color:#1f2937}.column-label{width:112px;padding:0 4px 8px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.35}.company-prefix{display:block;font-weight:600;color:#1f2937;letter-spacing:-.025em;overflow-wrap:anywhere}.company-suffix{display:block;font-size:11px;font-weight:400;color:#6b7280;margin-top:2px}.cell{width:112px}.popover-title{gap:6px;align-items:flex-start}.popover-title span{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.5}.popover-title em{margin:0;flex-shrink:0}.metric-line{gap:12px}.table-scroll th{white-space:nowrap}
@media(max-width:639px){.row-label{width:192px;font-size:12px}.cell,.column-label{width:96px}.rule-search{align-items:flex-start}#scope-note{flex-basis:100%;margin-left:0;line-height:1.5}.company-prefix{font-size:12px}.matrix-head{height:64px}}

.table-pager{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:6px;padding:16px 0 0;color:#5c5c5c;font-size:12px}.table-pager button,.table-pager select,.table-pager input{height:28px;border:1px solid #d6d6d6;border-radius:4px;background:#fff;color:inherit;font:inherit}.table-pager button{display:inline-flex;min-width:28px;align-items:center;justify-content:center;padding:0 7px}.table-pager button:hover:not(:disabled){border-color:#1890ff;color:#1890ff}.table-pager button[aria-current]{border-color:#1890ff;color:#1890ff;background:#eff6ff}.table-pager button:disabled{color:#c9cdd2;cursor:not-allowed}.table-pager select{padding:0 6px;margin-left:6px}.table-pager input{width:50px;padding:0 4px;text-align:center}.page-status{margin-right:8px;font-variant-numeric:tabular-nums}.page-jump-label{display:flex;align-items:center;gap:4px;margin-left:6px}.table-pager :focus-visible{outline:2px solid #1890ff;outline-offset:2px}@media(max-width:639px){.table-pager{justify-content:flex-start}.page-status{flex-basis:100%;margin-bottom:4px}}
