/* Source Check: P6, AutoCount and Excel compared. Compact: one overview strip, then one section at a time. */
.src-page{display:grid;gap:12px;grid-template-columns:minmax(0,1fr);color:#1b2240}
.src-page *,.src-page *::before,.src-page *::after{box-sizing:border-box}
.src-page>*{min-width:0}
.src-page [data-tone="green"]{--src-tone:#15803d}
.src-page [data-tone="amber"]{--src-tone:#b54708}
.src-page [data-tone="red"]{--src-tone:#b42318}
.src-page [data-tone="neutral"]{--src-tone:#667085}

/* Overview: status, the three sources and the project totals in one card. */
.src-overview{display:grid;gap:10px;padding:14px;border:1px solid #e3e6ee;border-radius:18px;background:#fff}
.src-status{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:2px 2px 2px 12px;border-left:4px solid var(--src-tone)}
.src-status strong{display:block;font-size:15px;color:var(--src-tone)}
.src-status small{display:block;font-size:12px;color:#6b7385}

.src-sources{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.src-source{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid #e3e6ee;border-radius:15px;background:#fff;min-width:0}
.src-source[data-kind="p6"]{--src-kind:#1d4ed8}
.src-source[data-kind="autocount"]{--src-kind:#15803d}
.src-source[data-kind="excel"]{--src-kind:#5b4bc4}
.src-source[data-state="stale"]{border-color:#f4c27a}
.src-source-icon{flex:none;display:grid;place-items:center;width:32px;height:32px;border:1.5px solid var(--src-kind);border-radius:15px;color:var(--src-kind);background:#fff}
.src-source-body{display:grid;gap:2px;min-width:0;flex:1}
.src-source-top{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.src-source-top h3{margin:0;font-size:13px;color:#0f1b3d}
.src-state{font-size:11px;font-weight:700;color:#15803d}
.src-source[data-state="empty"] .src-state{color:#667085}
.src-source[data-state="stale"] .src-state{color:#b54708}
.src-source-meta,.src-source-scope{margin:0;font-size:12px;line-height:1.4;color:#5d6678;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.src-source-scope{font-weight:600;color:#154192}
.src-upload{position:relative;flex:none;display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:5px 10px;border:1px dashed #c9c1f2;border-radius:15px;background:#fff;color:#002366;font-size:12px;font-weight:700;cursor:pointer;transition:border-color .16s,color .16s}
.src-upload:hover,.src-upload.is-over{border-color:#5b4bc4;color:#5b4bc4}
.src-upload:focus-within{outline:2px solid #5b4bc4;outline-offset:2px}
.src-upload input[type=file]{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0;cursor:pointer;font-size:0}
.src-upload svg,.src-upload span{pointer-events:none}
.src-upload svg{width:15px;height:15px}

.src-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.src-total{display:grid;gap:1px;padding:8px 12px;border:1px solid #eef0f5;border-radius:15px;background:#fff;min-width:0}
.src-total small{font-size:11px;font-weight:650;color:#5d6678}
.src-total b{font-size:16px;color:#0f1b3d;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.src-total span{font-size:11px;color:#6b7385}
.src-total[data-tone]{border-color:var(--src-tone)}
.src-total[data-tone] b{color:var(--src-tone)}

/* One section at a time. */
.src-card{padding:14px;border:1px solid #e3e6ee;border-radius:18px;background:#fff;min-width:0}
.src-tabs{display:flex;gap:6px;margin:0 0 12px;padding-bottom:2px;overflow-x:auto;scrollbar-width:thin}
.src-tabs button{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 12px;border:1px solid #e3e6ee;border-radius:15px;background:#fff;color:#4b5565;font-size:13px;font-weight:650;cursor:pointer}
.src-tabs button span{min-width:20px;padding:0 6px;border:1px solid currentColor;border-radius:15px;font-size:11px;line-height:18px;text-align:center}
.src-tabs button:hover{color:#5b4bc4}
.src-tabs button[aria-selected="true"]{border-color:#002366;color:#002366}
.src-panel{min-width:0}
.src-panel-intro{margin:0 0 10px;font-size:12px;line-height:1.5;color:#5d6678}
.src-empty{margin:0;font-size:13px;line-height:1.5;color:#6b7385}
.src-empty-box{display:flex;align-items:center;gap:8px;padding:12px 14px;border:1px dashed #d9deea;border-radius:15px;color:#15803d;font-size:13px}
.src-empty-box p{margin:0;color:#4b5565}

/* Differences: one compact row each. */
.src-findings{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.src-findings.is-past{margin-top:8px}
.src-finding{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:4px 12px;align-items:center;padding:9px 12px;border:1px solid #e3e6ee;border-left:4px solid var(--src-tone);border-radius:15px;background:#fff}
.src-finding[data-status="cleared"],.src-finding[data-status="resolved"]{opacity:.8}
.src-finding-tag{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.src-finding-text{min-width:0}
.src-finding-text p{margin:0;font-size:13px;line-height:1.45;color:#1b2240;overflow-wrap:anywhere}
.src-finding-text small{font-size:11px;color:#6b7385}
.src-finding-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.src-chip{display:inline-flex;align-items:center;min-height:20px;padding:1px 9px;border-radius:15px;font-size:11px;font-weight:700;white-space:nowrap}
.src-chip[data-tone="red"]{background:#fde8e8;color:#b42318}
.src-chip[data-tone="amber"]{background:#fff4e0;color:#9a5b00}
.src-chip[data-tone="green"]{background:#e3f7ea;color:#15803d}
.src-chip[data-tone="neutral"]{background:#f1f3f6;color:#475467}
.src-kind{font-size:11px;font-weight:700;color:#4b5565}
.src-resolve{grid-column:1/-1;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.src-resolve input{flex:1 1 240px}
.src-history{margin-top:8px}

.src-page button{font:inherit}
.src-primary,.src-secondary,.src-ghost{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:6px 13px;border-radius:15px;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;transition:color .16s,border-color .16s}
.src-primary{border:1.5px solid #002366;background:#fff;color:#002366}
.src-primary:hover{border-color:#5b4bc4;color:#5b4bc4}
.src-secondary{border:1px solid #cfd6df;background:#fff;color:#002366}
.src-secondary:hover{border-color:#5b4bc4;color:#5b4bc4}
.src-ghost{border:1px solid transparent;background:#fff;color:#4b5565}
.src-ghost:hover{color:#5b4bc4}
.src-small{min-height:30px;padding:4px 10px;font-size:12px}
.src-small svg{width:15px;height:15px}
.src-page button:disabled{opacity:.55;cursor:not-allowed}
.src-actions{display:flex;gap:8px;flex-wrap:wrap}

.src-page input:not([type=file]),.src-page select,.src-page textarea{width:100%;min-width:0;max-width:100%;min-height:36px;padding:7px 12px;border:1px solid #d9deea;border-radius:15px;background:#fff;color:#1b2240;font:inherit;font-size:13px}
.src-page input:focus,.src-page select:focus,.src-page textarea:focus{border-color:#5b4bc4;outline:none}

.src-table-wrap{max-width:100%;max-height:520px;overflow:auto;border:1px solid #eef0f5;border-radius:15px}
.src-table{width:100%;min-width:860px;border-collapse:collapse;font-size:12px}
.src-table th{position:sticky;top:0;z-index:1;padding:8px 10px;border-bottom:1px solid #e3e6ee;text-align:left!important;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#667085;background:#fff;white-space:nowrap}
.src-table td{text-align:left!important;padding:7px 10px;border-bottom:1px solid #f0f2f6;vertical-align:top;color:#1b2240;white-space:nowrap}
.src-table td:first-child{white-space:normal;min-width:200px}
.src-table td strong{display:block}
.src-table td small{display:block;font-size:11px;color:#6b7385}
.src-table .src-linked{color:#5b4bc4}
.src-table tr.is-flagged td:first-child{box-shadow:inset 3px 0 0 #b54708}
.src-table tr:last-child td{border-bottom:0}

.src-suggest{margin-bottom:12px}
.src-suggest h3,.src-unmatched h3{margin:0 0 6px;font-size:12px;color:#1b2240}
.src-unmatched h3 span{margin-left:4px;padding:0 7px;border:1px solid #d9deea;border-radius:15px;font-size:11px;color:#4b5565}
.src-suggest ul,.src-unmatched ul{display:grid;gap:4px;margin:0;padding:0;list-style:none;max-height:360px;overflow:auto}
.src-suggest li,.src-unmatched li{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 10px;border:1px solid #eef0f5;border-radius:15px;font-size:12px;color:#4b5565}
.src-suggest li>span:not(.src-arrow),.src-unmatched li>span{flex:1 1 200px;min-width:0;overflow-wrap:anywhere}
.src-arrow{font-size:10px;font-weight:700;color:#98a2b3;text-transform:uppercase}
.src-unmatched+.src-unmatched{margin-top:12px}
.src-link-form{display:flex;gap:6px;flex:1 1 260px;min-width:0}
.src-link-form input{flex:1;min-height:30px!important;padding:4px 10px!important;font-size:12px!important}

.src-settings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end}
.src-settings label{display:grid;gap:5px;font-size:12px;font-weight:650;color:#4b5565}
.src-settings label small{font-size:11px;font-weight:500;color:#6b7385}
.src-settings .src-half{grid-column:span 2}
.src-wide{grid-column:1/-1}
.src-tip{margin:12px 0 0;padding-top:10px;border-top:1px solid #eef0f5;font-size:12px;line-height:1.55;color:#5d6678}
.src-tip a{color:#154192;font-weight:650}

@media (max-width:1100px){
  .src-sources{grid-template-columns:minmax(0,1fr)}
  .src-totals{grid-template-columns:repeat(2,minmax(0,1fr))}
  .src-settings{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .src-overview,.src-card{padding:12px}
  .src-finding{grid-template-columns:minmax(0,1fr)}
  .src-finding-tag{flex-direction:row;align-items:center}
  .src-finding-actions{justify-content:flex-start}
  .src-settings{grid-template-columns:minmax(0,1fr)}
  .src-settings .src-half{grid-column:1/-1}
  .src-status button{width:100%}
  .src-page input:not([type=file]),.src-page select,.src-page textarea{font-size:16px}
}
