.flush { margin-top: 0; }
.card { margin-bottom: 20px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin-bottom: 12px; }
.top-gap { margin-top: 12px; }
.field { min-width: 0; }
textarea { resize: vertical; }
.item-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item-row .it-desc { grid-column: 1 / -1; }
.item-row .it-rm { grid-column: 1 / -1; justify-self: start; }
.item-row .line { align-self: end; font-family: var(--mono); padding-bottom: 10px; text-align: right; }
.totals { margin: 12px 0; }
.totals th { font-weight: 600; }
.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.err-msg { color: var(--warn); font-weight: 600; margin: 8px 0; }
.warn-box { background: var(--chip); border: 1px solid var(--warn); color: var(--warn); padding: 10px 12px; border-radius: 8px; }
.list { list-style: none; padding: 0; margin: 12px 0 0; }
.list li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.list .title { font-weight: 600; overflow-wrap: anywhere; flex: 1 1 140px; }
.list .meta { flex: 1 1 100%; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.list li.is-void .title, .rc-void .rc-body { text-decoration: line-through; }
.rc-head { font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.rc-body { overflow-wrap: anywhere; }
.rc-lines td, .rc-lines th { padding: 4px 4px; font-size: 14px; }
.rc-lines { table-layout: auto; }
.rc-stamp { color: var(--warn); font-weight: 700; margin: 6px 0; }
.months td, .months th { font-family: var(--mono); font-size: 14px; }
code { font-family: var(--mono); font-size: 13px; }
@media (min-width: 560px) {
  .item-row { grid-template-columns: 3fr 1fr 1fr 1fr auto; align-items: end; }
  .item-row .it-desc, .item-row .it-rm { grid-column: auto; }
}
@media print {
  .no-print, header.top, footer { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: none; padding: 0; }
  section[hidden] { display: none !important; }
}
.rc-body > div { white-space: pre-line; }
