/* mrktpro dashboard: a trade looked at again (src/dashboard/trade-review.js, docs/trade-review.md). Phone first: one column, figures in a grid that wraps. */
.tr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 18px; margin: 10px 0 4px; }
.tr-stats.two { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tr-stat .k { font-size: 12px; color: var(--muted); }
.tr-stat .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tr-stat .v.pos { color: var(--pos); }
.tr-stat .v.neg { color: var(--neg); }
.tr-stat .s { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tr-basis { margin-top: 10px; }
.tr-after { width: 100%; }
.tr-after th[scope="row"] { text-align: start; font-weight: 500; }
.tr-after .num { white-space: normal; }
.tr-history { margin-top: 8px; }
.tr-chart { min-height: 120px; }

/* Tags */
.tr-tag-editor { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tr-picked, .tr-offer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tr-chip { display: inline-flex; align-items: center; gap: 4px; }
.tr-x { border: 0; background: transparent; color: inherit; font: inherit; line-height: 1; padding: 2px 6px; margin-inline-end: -4px; cursor: pointer; min-width: 24px; min-height: 24px; border-radius: 6px; }
.tr-x:focus-visible, .tr-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tr-option { border: 1px dashed var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 3px 9px; }
.tr-add { display: flex; gap: 8px; align-items: center; }
.tr-tags-card .tr-add { margin-top: 10px; }
.tr-edit-row { margin-top: 10px; }
.tr-add .in { flex: 1 1 auto; min-width: 0; }
.tr-note:empty { display: none; }

/* The tag list on the Trades tab */
.tr-summary { cursor: pointer; padding: 14px 16px; list-style-position: inside; }
.tr-summary h2 { display: inline; margin: 0; }
.tr-tag-list { margin: 0 0 10px; padding: 0; }
.tr-tag-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.tr-tag-row:first-child { border-top: 0; }
.tr-tag-row .tr-figures { flex: 1 1 200px; min-width: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.tr-tag-row .in { flex: 1 1 140px; min-width: 0; }
.tr-row-actions { display: inline-flex; gap: 6px; }
.tr-h3 { font-size: 14px; margin: 16px 0 6px; }
.tr-check summary { cursor: pointer; }
.tr-checklist { margin: 6px 0 0; }
.tr-check-edit textarea { width: 100%; box-sizing: border-box; }
.tr-fills li { padding: 3px 0; }
.trip-edit .tr-check { margin-top: 10px; }
.trip-edit .tr-open-trade { margin-top: 10px; }

@media (min-width: 760px) {
  .tr-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
