/* public/tools/money-categorize.css
   "How we categorize" (public/tools/money-categorize.js): the report card tiles, the grade banner, the why list, the grouped
   suggestions and the Teach drawer. Tokens only; both themes come from the tokens. Mockups approved 2026-11-22. */

.hc-grade { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-3); }
.hc-grade-st { font-size: var(--text-xs); color: var(--ink-3); font-weight: 600; }

/* The grade banner: which run, how it was graded, and the run picker. */
.hc-info { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink-2);
  border-radius: var(--r-md); padding: 12px 14px; margin-bottom: var(--s-3); font-size: var(--text-sm); line-height: 1.45; flex-wrap: wrap; }
.hc-info > .mw-i { flex: 0 0 auto; color: var(--accent-ink); margin-top: 2px; }
.hc-info p { margin: 0; flex: 1 1 360px; min-width: 0; }
.hc-info b { color: var(--ink); }
.hc-run { flex: 0 0 auto; }

/* The four numbers. */
.hc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface); margin-bottom: var(--s-4); }
.hc-k { display: flex; flex-direction: column; gap: 2px; padding: 13px var(--s-4) 12px; border-right: 1px solid var(--border-subtle); min-width: 0; }
.hc-k:last-child { border-right: 0; }
.hc-kl { font-size: var(--text-xs); color: var(--ink-3); font-weight: 650; }
.hc-kv { font-size: var(--text-2xl); font-weight: 750; letter-spacing: var(--tracking-tight); line-height: 1.15; }
.hc-kn { font-size: var(--text-xs); color: var(--ink-3); font-weight: 650; }
.hc-kn.is-ok { color: var(--success-ink); }
.hc-t td.hc-bad { color: var(--danger-ink); font-weight: 700; }

/* Why Homee left lines for a person. */
.hc-why { margin-top: var(--s-4); }
.hc-ch { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
.hc-ch h3 { margin: 0; font-size: var(--text-md); font-weight: 700; }
.hc-ch .mw-mute { font-size: var(--text-xs); }
.hc-why ul { list-style: none; margin: 0; padding: 0; }
.hc-why li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 9px 14px; border-bottom: 1px solid var(--border-subtle); font-size: var(--text-sm); }
.hc-why li:last-child { border-bottom: 0; }

/* Review suggestions: the account box, the reason under it, the actions. */
.hc-rq td { vertical-align: middle; }
.hc-why-line { margin-top: 4px; font-size: var(--text-xs); color: var(--ink-3); line-height: 1.4; max-width: 420px; white-space: normal; }
.hc-acts { white-space: nowrap; font-size: var(--text-xs); }
.hc-acts .sep { color: var(--border); margin: 0 6px; }
.hc-note { max-width: 380px; white-space: normal; font-size: var(--text-xs); line-height: 1.45; }

/* The Teach drawer. */
.hc-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.hc-mini td:first-child { width: 120px; color: var(--ink-3); text-align: left; font-weight: 500; white-space: normal; }
.hc-mini td:last-child { text-align: left; white-space: normal; font-weight: 650; }
.hc-ta { width: 100%; min-height: 76px; resize: vertical; font: inherit; line-height: 1.45; padding: 8px 10px; }
.hc-ch2 { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.hc-hist { list-style: none; margin: 0; padding: 0; }
.hc-hist li { position: relative; padding: 0 0 10px 18px; font-size: var(--text-xs); line-height: 1.45; }
.hc-hist li::before { content: ''; position: absolute; left: 2px; top: 4px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--brand-mint, var(--accent)); }
.hc-hist li.old { color: var(--ink-3); }
.hc-hist li.old::before { border-color: var(--border); }
.hc-hist b { display: block; font-weight: 650; }
.hc-hist span { display: block; }
.hc-hist small { display: block; color: var(--ink-3); }

@media (max-width: 900px) {
  .hc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-k:nth-child(2) { border-right: 0; }
  .hc-k:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); }
}
@media (max-width: 640px) {
  .hc-grade .ds-btn { flex: 1 1 100%; min-height: 44px; }
  .hc-acts { white-space: normal; }
  .hc-acts .ds-btn, .hc-acts .mw-link { min-height: 44px; }
}

/* The report card and the notes have a search and no chips: no empty chip row under the search. */
[data-pane="card"] .mw-fr, [data-pane="notes"] .mw-fr { display: none; }
.hc-run select { max-width: none; }
