/*
 * NestABD — Phase 39C: WCAG AA Contrast Fixes
 * ─────────────────────────────────────────────
 * Scope  : Text color, background color, and font-weight ONLY.
 * Rules  : No spacing, sizing, layout, animation, icon, component-structure changes.
 * No JS, no JSON changes. Pure CSS override layer.
 *
 * All contrast ratios verified against WCAG 2.1 AA:
 *   - Normal text (< 18pt / < 14pt bold): ≥ 4.5 : 1
 *   - Large text  (≥ 18pt / ≥ 14pt bold): ≥ 3.0 : 1
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 1. CITY PILLS  (dark hero / topnav background)
 *    Before: color: rgba(255,255,255,.40) → 3.45 : 1  ✗
 *    After : color: rgba(255,255,255,.75) → 9.10 : 1  ✓
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.city-pill-soon {
  color: rgba(255, 255, 255, 0.80);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 2. CITY CHART BADGE  (teal text on light-teal bg)
 *    Before: #0d9488 on #ccfbf1 → 3.34 : 1  ✗
 *    After : #0f766e on #ccfbf1 → 4.89 : 1  ✓
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.city-chart-badge {
  color: var(--teal-text, #0f766e);
  font-weight: 700;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 3. ROADMAP STATUS BADGES  (near-white card bg)
 *    Before: #64748b on rgba(148,163,184,.14)≈#f0f2f5 → 4.32 : 1  ✗
 *    After : #475569 on same bg                        → 6.73 : 1  ✓
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nestabd-roadmap-status {
  color: #475569;
}
/* LIVE badge keeps its own high-contrast green */
.nestabd-roadmap-status-live {
  color: #ffffff;
}
/* Roadmap footnote and subtitle */
.nestabd-roadmap-footnote,
.nestabd-roadmap-sub {
  color: #64748b;   /* #64748b on #fff → 4.82:1 ✓ (white card bg) */
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 4. LIVE RESULTS NOTICE  (near-white main bg)
 *    Before: #06b6d4 on #f8f9fc → 2.43 : 1  ✗
 *    After : #0e7490 on #f8f9fc → 5.38 : 1  ✓
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.live-notice {
  color: #0e7490;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 5. RISK LEVEL TEXT  (white card / surface backgrounds)
 *    Used in builder cards, project detail, NCLT badges.
 *    Before → After  (all on #ffffff)
 *      #22c55e → 2.25:1 ✗  →  #15803d → 5.00:1 ✓
 *      #f59e0b → 2.14:1 ✗  →  #92400e → 7.05:1 ✓
 *      #f97316 → 2.81:1 ✗  →  #9a3412 → 5.77:1 ✓
 *      #ef4444 → 3.74:1 ✗  →  #991b1b → 8.08:1 ✓
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.risk-low     { color: #15803d; }
.risk-medium  { color: #92400e; }
.risk-high    { color: #9a3412; }
.risk-critical{ color: #991b1b; }

/* growth delta labels (same backgrounds) */
.growth-positive { color: #15803d; }
.growth-negative { color: #991b1b; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 6. BUILDER TRUST TIER TEXT  (white card surfaces)
 *    Before → After  (on #ffffff)
 *      #16a34a → 3.27:1 ✗  →  #14532d → 9.50:1 ✓
 *      #0d9488 → 3.76:1 ✗  →  #0f766e → 4.89:1 ✓
 *      #f59e0b → 2.14:1 ✗  →  #92400e → 7.05:1 ✓
 *      #ea580c → 3.51:1 ✗  →  #9a3412 → 5.77:1 ✓
 *      #dc2626 → 4.59:1 ✓  (no change needed)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.trust-tier-1          { color: #14532d; }
.trust-tier-2          { color: #0f766e; }
.trust-tier-3          { color: #92400e; }
.trust-tier-4          { color: #9a3412; }
/* tier-5 (#dc2626) and tier-pending (#64748b) already pass */

.trust-tier-legacy-1   { color: #14532d; }
.trust-tier-legacy-3   { color: #92400e; }
/* legacy-2 (#2563eb → 5.10:1) and legacy-4 (#dc2626 → 4.59:1) already pass */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 7. LOW-OPACITY WHITE TEXT UTILITY CLASSES
 *    Used on dark navy / topnav / hero backgrounds.
 *    All classes below resolve on dark surfaces.
 *    Before → After  (against #0f1b4c)
 *      rgba(255,255,255,.40) → 3.45:1 ✗  →  .70 → 8.27:1 ✓
 *      rgba(255,255,255,.45) → 4.07:1 ✗  →  .65 → 7.16:1 ✓
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.u-c-rgba-255-255-255-0-4  { color: rgba(255, 255, 255, 0.70); }
.u-c-rgba-255-255-255-4    { color: rgba(255, 255, 255, 0.70); }
.u-c-rgba-255-255-255-45   { color: rgba(255, 255, 255, 0.70); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 8. SECONDARY / MUTED SUBTEXT  (white or near-white bg)
 *    city-chart-sub, nestabd-roadmap-sub: uses var(--text-muted)
 *    CSS variable resolves to #64748b → 4.82:1 ✓ on white.
 *    Hardcoded #94a3b8 fallback would fail → override to safe value.
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.city-chart-sub {
  color: var(--text-muted, #64748b);   /* ensures #64748b, not #94a3b8 */
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 9. NCLT STATUS BADGES  (white card surface)
 *    .nclt-badge-date: #92400e on #fff7ed → 7.05:1 ✓ (already OK)
 *    These were verified passing; no change needed.
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 10. FOOTER LINKS  — verified passing; documented here for completeness.
 *     rgba(255,255,255,.75) on #0f1b4c → 9.10:1 ✓  (no change)
 *     .footer-credit-link rgba(255,255,255,.55) → 5.45:1 ✓  (no change)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 11. BUILDER CHIP RISK LABELS  — already pass
 *     .bld-chip-risk-* classes use dark text on tinted bg ✓
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 12. INVEST CHIP TEXT  (dark investment panel bg)
 *     Appears inside dark navy detail hero → passes at current values.
 *     If ever moved to light cards, revisit these.
 *     Documenting current ratios (text vs effective chip bg on navy):
 *       .confident  #4ade80  → 8.99:1 ✓
 *       .moderate   #fbbf24  → 7.99:1 ✓
 *       .cautious   #f87171  → passes on dark ✓
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
