/* improve — Correlations + AI feature styles */

/* ---- Correlations (local math) ---- */
.corr-sub {
  margin: 0 0 10px; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

.corr-list { display: flex; flex-direction: column; }

.corr-item {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.corr-item:last-child { border-bottom: none; }

.corr-dir {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.corr-item.up .corr-dir { color: var(--accent-2); background: color-mix(in srgb, var(--gain) 14%, transparent); }
.corr-item.down .corr-dir { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.corr-label { flex: 1; min-width: 0; line-height: 1.4; }

.corr-meta {
  margin-left: auto; color: var(--text-faint); font-size: 11.5px; white-space: nowrap;
  font-variant-numeric: tabular-nums; }

.corr-foot { margin: 10px 0 0; font-size: 11.5px; color: var(--text-faint); font-style: italic; }

/* narrow screens: drop the meta onto its own line, indented past the chip */
@media (max-width: 760px) {
  .corr-item { padding: 8px 2px; }
  .corr-meta { flex-basis: 100%; margin-left: 32px; }
}

.improve-ai-sub {
  margin: 0 0 12px; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

/* container for the generated analysis + its action buttons */
.improve-ai-out:not(:empty) { margin-top: 14px; }

.improve-ai-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* brighten-on-dark danger hex lacks contrast on white (same fix as settings.css) */
:root[data-theme="light"] .corr-item.down .corr-dir { color: #c93b3b; background: rgba(201, 59, 59, 0.10); }
