Improve text readability and fix duplicate company scoring

- Increase font sizes from 11px to 12px for employment headers and notes
- Improve color contrast (gray-500 to gray-600) for WCAG AA compliance
- Increase opacity for white text on dark backgrounds (0.6/0.8 to 0.8/0.9)
- Fix duplicate company penalty display to only apply for sequential entries
- Non-sequential entries of same company now each show their own penalty

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-21 11:30:47 +00:00
parent cfe06788e2
commit 21a95a38f5
2 changed files with 40 additions and 24 deletions

View File

@@ -266,6 +266,10 @@
{ {
<span class="text-danger fw-medium">@companyPoints</span> <span class="text-danger fw-medium">@companyPoints</span>
} }
else if (!verification.IsVerified && !_firstOccurrenceIndices.Contains(index))
{
<span class="text-muted" title="Penalty counted on first occurrence">—</span>
}
else else
{ {
<span class="text-success">0</span> <span class="text-success">0</span>
@@ -592,7 +596,7 @@
} }
.stat-label { .stat-label {
color: rgba(255, 255, 255, 0.85); color: rgba(255, 255, 255, 0.95);
font-size: 0.875rem; font-size: 0.875rem;
} }
@@ -626,7 +630,7 @@
} }
.flag-description { .flag-description {
color: #6b7280; color: #4b5563;
font-size: 0.875rem; font-size: 0.875rem;
margin: 0.5rem 0 0 0; margin: 0.5rem 0 0 0;
} }
@@ -650,9 +654,9 @@
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
background-color: #f8fafc; background-color: #f8fafc;
border-bottom: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;
font-size: 0.6875rem; font-size: 0.75rem;
font-weight: 600; font-weight: 600;
color: #64748b; color: #475569;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.025em; letter-spacing: 0.025em;
align-items: center; align-items: center;
@@ -713,17 +717,17 @@
} }
.employment-note-inline { .employment-note-inline {
font-size: 0.6875rem; font-size: 0.75rem;
color: #6b7280; color: #4b5563;
line-height: 1.2; line-height: 1.4;
} }
.employment-dates { .employment-dates {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 0.75rem; font-size: 0.8125rem;
color: #6b7280; color: #4b5563;
white-space: nowrap; white-space: nowrap;
text-align: center; text-align: center;
} }
@@ -968,7 +972,7 @@
}; };
} }
// Lookup for first occurrence of each company (pre-computed when report loads) // Lookup for first occurrence of each sequential group of the same company (pre-computed when report loads)
private HashSet<int> _firstOccurrenceIndices = new(); private HashSet<int> _firstOccurrenceIndices = new();
private void ComputeFirstOccurrences() private void ComputeFirstOccurrences()
@@ -976,16 +980,28 @@
_firstOccurrenceIndices.Clear(); _firstOccurrenceIndices.Clear();
if (_report?.EmploymentVerifications is null) return; if (_report?.EmploymentVerifications is null) return;
var seenCompanies = new HashSet<string>(StringComparer.OrdinalIgnoreCase); // Only mark as duplicate if the PREVIOUS entry (sequential) is the same company
// Non-sequential entries of the same company should each count separately
for (int i = 0; i < _report.EmploymentVerifications.Count; i++) for (int i = 0; i < _report.EmploymentVerifications.Count; i++)
{ {
var company = _report.EmploymentVerifications[i].ClaimedCompany; var currentCompany = _report.EmploymentVerifications[i].ClaimedCompany;
if (seenCompanies.Add(company))
if (i == 0)
{
// First entry is always a first occurrence
_firstOccurrenceIndices.Add(i);
}
else
{
var previousCompany = _report.EmploymentVerifications[i - 1].ClaimedCompany;
// Only skip if same company as immediately preceding entry
if (!string.Equals(currentCompany, previousCompany, StringComparison.OrdinalIgnoreCase))
{ {
_firstOccurrenceIndices.Add(i); _firstOccurrenceIndices.Add(i);
} }
} }
} }
}
private int GetPointsForCompany(string claimedCompany, string? matchedCompany, int index) private int GetPointsForCompany(string claimedCompany, string? matchedCompany, int index)
{ {

View File

@@ -329,7 +329,7 @@ a:hover {
.stat-card .stat-label { .stat-card .stat-label {
font-size: 0.875rem; font-size: 0.875rem;
color: var(--truecv-gray-500); color: var(--truecv-gray-600);
font-weight: 500; font-weight: 500;
} }
@@ -396,7 +396,7 @@ a:hover {
font-size: 0.75rem; font-size: 0.75rem;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.05em; letter-spacing: 0.05em;
color: var(--truecv-gray-500); color: var(--truecv-gray-600);
border-bottom: 2px solid var(--truecv-gray-200); border-bottom: 2px solid var(--truecv-gray-200);
background-color: var(--truecv-bg-muted); background-color: var(--truecv-bg-muted);
} }
@@ -860,7 +860,7 @@ h1:focus {
} }
.text-muted { .text-muted {
color: var(--truecv-gray-500) !important; color: var(--truecv-gray-600) !important;
} }
/* Row selection highlight */ /* Row selection highlight */
@@ -964,7 +964,7 @@ h1:focus {
} }
.breadcrumb-item a { .breadcrumb-item a {
color: var(--truecv-gray-500); color: var(--truecv-gray-600);
text-decoration: none; text-decoration: none;
} }
@@ -973,7 +973,7 @@ h1:focus {
} }
.breadcrumb-item.active { .breadcrumb-item.active {
color: var(--truecv-gray-400); color: var(--truecv-gray-600);
} }
/* Security badge for upload */ /* Security badge for upload */
@@ -982,7 +982,7 @@ h1:focus {
align-items: center; align-items: center;
gap: 0.375rem; gap: 0.375rem;
font-size: 0.8125rem; font-size: 0.8125rem;
color: var(--truecv-gray-500); color: var(--truecv-gray-600);
margin-top: 1rem; margin-top: 1rem;
} }
@@ -1058,7 +1058,7 @@ h1:focus {
} }
.auth-subtitle { .auth-subtitle {
color: var(--truecv-gray-500); color: var(--truecv-gray-600);
margin-bottom: 2rem; margin-bottom: 2rem;
} }
@@ -1086,7 +1086,7 @@ h1:focus {
.auth-brand-text { .auth-brand-text {
font-size: 1.125rem; font-size: 1.125rem;
color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.9);
line-height: 1.6; line-height: 1.6;
margin-bottom: 2rem; margin-bottom: 2rem;
} }
@@ -1111,7 +1111,7 @@ h1:focus {
.auth-stat-label { .auth-stat-label {
font-size: 0.875rem; font-size: 0.875rem;
color: rgba(255, 255, 255, 0.6); color: rgba(255, 255, 255, 0.8);
margin-top: 0.25rem; margin-top: 0.25rem;
} }
@@ -1132,7 +1132,7 @@ h1:focus {
.auth-testimonial cite { .auth-testimonial cite {
font-size: 0.875rem; font-size: 0.875rem;
color: rgba(255, 255, 255, 0.6); color: rgba(255, 255, 255, 0.8);
font-style: normal; font-style: normal;
} }
@@ -1174,7 +1174,7 @@ h1:focus {
position: relative; position: relative;
background: var(--truecv-bg-surface); background: var(--truecv-bg-surface);
padding: 0 1rem; padding: 0 1rem;
color: var(--truecv-gray-500); color: var(--truecv-gray-600);
font-size: 0.875rem; font-size: 0.875rem;
} }