/* Shared text roles: existing values and states, with no new business thresholds. */
:root{--text-main:#f0f3fb;--text-muted:#909bb1;--text-danger:#ff2f58;--text-warning:#ffac51;--text-growth:#32d397;--text-opportunity:#5da4ff;--text-focus:#b295ff}
html[data-theme=light]{--text-main:#1d2a40;--text-muted:#5e6f87;--text-danger:#d91f4a;--text-warning:#a65b00;--text-growth:#087f5b;--text-opportunity:#245ec4;--text-focus:#7550b6}
html[data-theme] body{color:var(--text-main)}
html[data-theme] :is(.product-identity-name>span:first-child,.growth-title,.pw-title strong,.pw-title>button,.detail-heading a,.detail-product-facts strong){color:var(--text-main)}
html[data-theme] :is(.muted,small,footer,.product-id,.variant-history,.breadcrumb,.workspace-label,.pw-small,.pw-empty,.pw-pagination,.pw-job-summary,.pw-stat span,.settings-glossary dd,.benchmark-help){color:var(--text-muted)}
html[data-theme] :is(main a,#workspace table a,dialog a,.pw-link,.growth-trend-link){color:var(--text-opportunity)}
html[data-theme] .detail-heading a{color:var(--text-main)}
/* Explicit roles override older page-specific text rules; supporting notes stay muted. */
html [data-tone=danger]{color:var(--text-danger)!important}
html [data-tone=warning]{color:var(--text-warning)!important}
html :is([data-tone=growth],[data-tone=success]){color:var(--text-growth)!important}
html :is([data-tone=opportunity],[data-tone=info]){color:var(--text-opportunity)!important}
html [data-tone=focus]{color:var(--text-focus)!important}
html [data-tone=muted]{color:var(--text-muted)!important}
html [data-tone] small{color:var(--text-muted)!important}
html[data-theme] :is(.pw-error,.pw-count-failed,.access-note[role=alert],#passwordError,#loginError,#accessHost [role=alert]){color:var(--text-danger)}
html[data-theme] :is(.pw-count-failed strong,.pw-count-failed span){color:var(--text-danger)}
html[data-theme] :is(.pw-count-success,.pw-count-success strong,.pw-count-success span){color:var(--text-growth)}
html[data-theme] :is(.pw-count-skipped,.pw-count-skipped strong,.pw-count-skipped span,#reviewRunStatus){color:var(--text-warning)}
html[data-theme] :is(.pw-count-completed,.pw-count-completed strong,.pw-count-completed span){color:var(--text-opportunity)}
html[data-theme] .pw-error{border-left-color:var(--text-danger)}
html[data-theme] #pendingAnomalies{color:var(--text-danger);border-color:color-mix(in srgb,var(--text-danger) 40%,transparent)}
html[data-theme] .growth-value strong{color:var(--text-growth)}
html[data-theme] .settings-result{color:var(--text-main)}
