/* Readable text and status colors across the compact workspace. */
:root {
  --bg: #f1f4f8;
  --surface: #ffffff;
  --ink: #1e293b;
  --text: #334155;
  --muted: #475569;
  --faint: #526177;
  --border: #cbd5e1;
  --blue: #3048ac;
  --blue-dark: #253a90;
  --blue-light: #eaf0ff;
  --green: #166b4e;
  --green-light: #e7f4ed;
  --amber: #8a5000;
  --amber-light: #fff2cc;
  --red: #a52b38;
  --red-light: #fff0f1;
}
body { background: var(--bg); color: var(--text); }
.card,.stat-card,.reference-card,.person-card,.legal-item,.source-document { background: var(--surface); border-color: var(--border); }
.card-foot,.scope-grid,.readiness-note,.document-row,.requirement-row,.person-card-bottom,.reference-card-bottom { border-color: #dce3ec; }
.product-header,.workspace > .topbar,.comments-panel { background: var(--surface); border-color: var(--border); }

/* Headings and primary values. */
.hero-heading h1,.card-title h2,.card-head > h2,.card-head h3,.section-heading h2,
.row-title,.data-table .row-title,.reference-card h3,.person-card-top h3,.legal-item h3,
.timeline-item h3,.submission-check strong,.source-document strong,.stat-value,.scope-number,
.criteria-grid strong,.readiness-number > strong,.progress-ring > span,.meta-item strong,
.deadline-row > div > strong,.activity-copy strong,.source-meta strong,.source-evidence h3,
.drawer-body h3,.modal-header h2,.drawer-header h2,.recipient-card strong,.document-preview-mini strong,
.signature-history strong,.document-management h3,.reference-choice-head h3,.detail-list strong,
.invite-item strong,.invite-details strong,.signer-details h3,.success-state h3,.guide-steps strong,
.notification-item strong,.tender-list-item strong,.decision-option strong,.submission-package h2,
.final-review-box h3,.source-paper h3,.source-paper strong,.signer-paper h3,.signer-paper strong,
.comments-tender-title,.comments-list-toolbar h3,.comments-empty h3,.package-lines strong { color: var(--ink); }
.stat-card h3 { color: var(--text); font-weight: 600; }

/* Body copy and secondary text use a consistent slate instead of pastel gray. */
.summary-text,.row-content p,.table-description,.legal-item > p,.reference-card > p,
.reference-card .reference-description,.person-card-top p,.document-info p,.timeline-item p,
.section-heading p,.section-note,.source-evidence > p,.source-paper p,.signer-paper p,
.modal-intro,.drawer-body > p,.modal-body > p,.final-review-box > p,.submission-package > p,
.signer-details > p,.guide-steps p,.check-list li,.success-state p,.comment-body { color: var(--text); }
.meta-label,.meta-item strong > span,.hero-decision > span,.hero-subtitle,.fiction-label,
.hero-top .eyebrow,.tender-id,.subtle-count,.ai-label,.section-kicker,.section-label,
.card-foot > span,.scope-item > span:last-child,.readiness-note,.readiness-number > span:not(.badge),
.readiness-number > strong > span,.progress-ring > span > small,.stat-value > span,
.criteria-grid strong small,.criteria-grid > div > span:last-child,.blocker-item,
.deadline-row > div > span,.deadline-foot,.activity-copy > span,.activity-time,
.table-category,.requirement-id,.person-inline,.proof-label,.legal-item-bottom > span,
.legal-item-bottom small,.reference-rule,.reference-facts small,.person-proof small,
.person-proof > span,.person-experience span,.signature-summary > div > span:last-child,
.document-info small,.document-status small,.source-document small,.timeline-title time,
.timeline-meta,.event-id,.page-footer,.page-footer button,.submission-check small,
.package-lines > span,.submission-package > .package-note,.document-detail-status > span:last-child,
.source-meta > div > span,.recipient-card div > span,.recipient-card small,.detail-list > div > span,
.document-preview-mini span,.signature-history small,.archive-note p,.archive-note small,
.reference-choice-head p,.small-note,.invite-item div > span,.invite-item small,.invite-details > span,
.signer-banner > span,.success-state small,.notification-item small,.tender-list-item small,
.decision-option small,.source-evidence dt,.signer-details dt,.paper-header,.paper-label,.paper-footer,
.signature-line > small,.receipt-card .card-body > p,.receipt-card .card-body > span,
.comments-tender-buyer,.comments-local-note,.comment-author-meta time,.comment-status-text,
.comments-panel-foot,.comments-empty,#comments-open-count { color: var(--muted); }
.source-evidence dd,.signer-details dd,.receipt-card .card-body > strong { color: var(--text); }
.reference-proof,.stat-bottom.complete,.comment-status input:checked + .comment-status-text { color: var(--green); }
.stat-bottom { color: var(--amber); }
.date-tile { background: #f4f7fa; border-color: var(--border); }
.date-tile strong,.date-tile small { color: var(--text); }
.date-tile.blue { background: var(--blue-light); border-color: #c8d4f3; }
.date-tile.blue strong,.date-tile.blue small { color: var(--blue); }

/* Navigation and enabled controls remain visibly interactive. */
.product-nav-item,.account-menu,.language-option,.breadcrumb,.breadcrumb button,
.breadcrumb > span:last-child,.demo-tag,.prototype-label,.tab-button,.segmented button,
.icon-btn,.icon-button,.meta-icon,.stat-top,.search-field > svg { color: var(--muted); }
.product-nav-item.active,.product-nav-item[aria-current="page"],.language-option.active { color: var(--ink); }
.tab-button.active,.tab-button[aria-selected="true"],.segmented button.active { color: var(--blue); }
.tab-count,.segmented button > span,.comments-count,.comments-toggle-count { background: #e5ebf3; color: #42536c; opacity: 1; }
.tab-button.active .tab-count { color: var(--blue); background: #dde6ff; }
.source-link,.text-button,.text-btn,.link-btn { color: var(--blue); }
.source-link:hover,.text-button:hover,.text-btn:hover,.link-btn:hover { color: var(--blue-dark); }
.action-list > button,.search-result { color: var(--text); }
.btn { color: var(--text); border-color: #bac6d5; }
.btn.primary,.btn-primary { color: #fff; background: #3048c6; border-color: #3048c6; }
.btn.primary:hover,.btn-primary:hover { background: #263ca5; border-color: #263ca5; }
.comments-composer-footer .btn.primary { background: #12674d; border-color: #12674d; }
.btn:disabled,.comments-composer-footer .btn:disabled { opacity: 1; color: #526177; background: #e9eef4; border-color: #cbd5e1; box-shadow: none; cursor: not-allowed; }
.search-field input,.form-field input:not([type=checkbox]):not([type=radio]),.form-field textarea,
.form-field select,.comments-composer textarea { color: var(--ink); border-color: #94a3b8; background: #fff; }
input::placeholder,textarea::placeholder,.comments-composer textarea::placeholder { color: #526177; opacity: 1; }
.comments-composer textarea:focus { border-color: #3048c6; box-shadow: 0 0 0 3px #3048c61a; }
.form-field,.form-field > label,.form-meta,.checkbox-label { color: var(--text); }
.data-table th { color: #42536c; background: #edf2f7; border-color: var(--border); }
.data-table td { color: var(--text); border-color: #dce3ec; }

/* Status colors pair dark text with a light, distinct surface. */
.badge,.pill,.status-pill,.badge.gray { color: #42536c; background: #e9eef4; }
.badge.green,.pill.green,.badge.success,.status-pill.green { color: var(--green); background: var(--green-light); }
.badge.amber,.pill.amber,.badge.warning,.status-pill.amber,.days-pill { color: var(--amber); background: var(--amber-light); }
.badge.blue,.pill.blue,.status-pill.blue { color: var(--blue); background: var(--blue-light); }
.badge.red,.pill.red,.badge.danger,.status-pill.red { color: var(--red); background: var(--red-light); }
.hero-decision > .status-pill { border-color: #e6cb8c; }
.hero-decision > .status-pill.green { border-color: #a9d5bd; }
.hero-decision > .status-pill.red { border-color: #e8b5bc; }
.check-state { color: var(--amber); background: var(--amber-light); border-color: #e5c98e; }
.check-state.checked { color: var(--green); background: var(--green-light); border-color: #a5cdb7; }
.tech-tag { color: var(--text); background: #edf2f7; border-color: #d6dee9; }
.tech-tag.suggested { color: var(--blue); background: var(--blue-light); border-color: #c8d4f3; }
.tech-tag small,.tech-tag.suggested small { color: #425b96; }
.next-step-card { background: #eaf0ff; border-color: #c5d1ef; }
.next-step-card h2 { color: #263e7c; }
.next-step-card p,.next-step-label { color: #425574; }
.next-step-label > span { background: #d7e2fc; color: #3048ac; }
.info-banner { color: #3d506e; background: #edf3ff; border-color: #cbd7ee; }
.info-banner strong { color: #263e65; }
.info-banner.warning,.info-banner.warning strong { color: #7b4b06; }
.source-paper > mark,.source-paper blockquote { color: #754c0b; }
.card-icon,.card-icon.blue { color: #435eaa; background: #eaf0ff; }
.card-icon.teal { color: #247359; background: #e7f4ed; }
.mini-progress { background: #e0e6ee; }
.mini-progress > span,.mini-progress > div { background: #596ec9; }
.progress-ring { background: conic-gradient(#5268c4 var(--progress),#e0e6ee 0); }

/* The chosen ribbon keeps its form; pending and completed copy gains contrast. */
.flow-heading h2 { color: var(--ink); }
.flow-progress,.flow-progress strong > span { color: var(--muted); }
.flow-progress strong { color: var(--ink); }
.flow-step { background: #e2e8f0; color: #334155; }
.flow-copy strong { font-weight: 600; }
.flow-copy small { color: #475569; }
.flow-marker { color: #334155; background: #f4f7fb; border-color: #a8b6c8; }
.flow-stage.is-current .flow-step { background: #263445; color: #fff; }
.flow-stage.is-current .flow-copy small { color: #e2e8f0; }
.flow-stage.is-current .flow-marker { background: #ffffff14; border-color: #92a3b8; color: #fff; }
.flow-stage.is-done .flow-step { background: #dcefe4; color: #17583f; }
.flow-stage.is-done .flow-copy small { color: #285d47; }
.flow-stage.is-done .flow-marker { color: #17583f; background: #eaf7ef; border-color: #92bea7; }
