/* Household Cash + STS emphasis-surface contrast (CSS-only a11y) */

:root {
  --on-emphasis: #fff;
  --on-emphasis-muted: rgba(255, 255, 255, .92);
  --forecast-value-color: #0f5132;
}

body[data-theme="cloud"] {
  --forecast-value-color: #134e3a;
}

body[data-theme="midnight"] {
  --on-emphasis-muted: rgba(255, 255, 255, .88);
  --forecast-value-color: #7eecc4;
}

/* 1) Dashboard STS gradient hero — secondary labels */
#safeToSpendCard.decision-hero {
  color: var(--on-emphasis);
}

#safeToSpendCard.decision-hero .section-kicker,
#safeToSpendCard.decision-hero small,
#safeToSpendCard.decision-hero .sts-meta,
#safeToSpendCard.decision-hero .sts-disclaimer {
  color: var(--on-emphasis-muted);
}

/* Beat pay-period-client.css cascade (loads before this sheet; IDs for extra specificity) */
#safeToSpendCard.decision-hero #safeToSpendConfidence,
#safeToSpendCard.decision-hero #safeToSpendAsOf,
#safeToSpendCard.decision-hero #safeToSpendDisclaimer,
#safeToSpendCard.decision-hero .sts-meta,
#safeToSpendCard.decision-hero .sts-disclaimer {
  color: var(--on-emphasis-muted);
}

#safeToSpendCard.decision-hero strong,
#safeToSpendCard.decision-hero #safeToSpend {
  color: var(--on-emphasis);
}

/* Buffer lives outside the STS card — keep input readable on light bar */
.dashboard-buffer-row #bufferAmount {
  color: var(--ink, #101a37);
  background: #fff;
}

/* 2) Updated / trust pill — glass on emphasis gradients; default chips unchanged on white */
#safeToSpendCard.decision-hero .trust-chip,
#safeToSpendCard.decision-hero .trust-chip.trust-current,
#safeToSpendCard.decision-hero .trust-chip.trust-syncing,
#safeToSpendCard.decision-hero .trust-chip.trust-stale,
#safeToSpendCard.decision-hero .trust-chip.trust-connection_error,
#safeToSpendCard.decision-hero .trust-chip.trust-manually_adjusted,
.household-total-card.primary .trust-chip,
.household-total-card.primary .trust-chip.trust-current,
.household-total-card.primary .trust-chip.trust-syncing,
.household-total-card.primary .trust-chip.trust-stale,
.household-total-card.primary .trust-chip.trust-connection_error,
.household-total-card.primary .trust-chip.trust-manually_adjusted {
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .18);
  color: var(--on-emphasis);
}

/* 3) White-tile forecast meta — not live-blue on cloud */
.account-forecast-tile .forecast-value {
  color: var(--forecast-value-color);
}

.account-forecast-tile.negative .forecast-value {
  color: var(--coral);
}

/* 4) Connected Accounts primary card — beat .account-summary strong { color: var(--green) } */
.account-summary .household-total-card.primary {
  color: var(--on-emphasis);
}

.account-summary .household-total-card.primary strong,
.household-total-card.primary strong {
  color: var(--on-emphasis) !important;
}

.account-summary .household-total-card.primary small,
.account-summary .household-total-card.primary span,
.household-total-card.primary small,
.household-total-card.primary span {
  color: var(--on-emphasis-muted);
  opacity: 1;
}
