.builder-cash-status {
  flex: 0 0 auto;
  max-height: 50vh;
  margin: 12px 16px;
  padding: 16px;
  border: 1px solid var(--border, #c6c1b8);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--text, #1a1813);
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  overflow: auto;
  font-variant-numeric: tabular-nums;
}
.builder-cash-status[hidden] { display: none; }
.builder-cash-status strong { display: block; font-size: 1rem; }
.builder-cash-status p { margin: 6px 0 12px; max-width: 70ch; }
.builder-cash-status a, .builder-cash-status button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  margin-right: 8px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.builder-cash-status a:hover, .builder-cash-status button:hover { text-decoration: underline; text-underline-offset: 3px; }
.builder-cash-status :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.builder-cash-status button:disabled { cursor: wait; border-style: dashed; }

/* Pre-arm readiness checklist (PRD B7): review bar and arm dialog. */
.prearm-checklist { margin: 6px 0 10px; font-size: .8rem; line-height: 1.45; }
.prearm-checklist[hidden] { display: none; }
.prearm-heading { font-weight: 700; margin: 6px 0 4px; }
.prearm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prearm-row { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.prearm-icon { flex: 0 0 1.1em; font-weight: 700; text-align: center; }
.prearm-text { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
.prearm-row.is-ok .prearm-icon { color: #0E6B52; }
.prearm-row.is-fail .prearm-icon, .prearm-row.is-fail strong { color: #B3261E; }
.prearm-row.is-warn .prearm-icon { color: #7A5A10; }
.prearm-row.is-info .prearm-icon,
.prearm-row.is-pending .prearm-icon,
.prearm-row.is-unknown .prearm-icon { color: var(--text-dim, #57534a); }
.prearm-fix {
  flex: 0 0 auto; min-height: 32px; padding: 4px 10px;
  border: 1px solid currentColor; border-radius: 8px; background: transparent;
  color: inherit; font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer;
}

/* The repair question follows the last turn, including when the thread is short. */
.chat-messages:has(> .market-repair-guide:not([hidden])) .chat-messages-list {
  flex: 0 0 auto; min-height: 0; padding-bottom: 0;
}
.chat-messages.is-empty:has(> .market-repair-guide:not([hidden])) .chat-empty-state { display: none; }
.market-repair-guide { flex: 0 0 auto; margin: 0 16px 18px; overflow-wrap: anywhere; }
.market-repair-guide [hidden] { display: none; }
.market-repair-guide p, .market-repair-guide h3 { margin: 0; }
.market-repair-guide small { display: block; margin-top: 8px; color: var(--text-dim); font-size: .8rem; }
