fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; margin-bottom: 16px; }
select { width: 100%; min-height: 44px; font: inherit; padding: 10px; border: 1px solid #bbc7d5; border-radius: 6px; background: white; color: #1c2430; }
button:disabled { opacity: .55; cursor: not-allowed; }
.small-note { font-size: .9rem; line-height: 1.6; color: #495667; }
.save-choice { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.save-choice input, .line-tax input { width: 20px; min-height: 20px; }
.line-row { grid-template-columns: minmax(0, 1fr) 75px 100px; border-bottom: 1px solid #d7dee8; padding-bottom: 14px; }
.line-row .line-tax { display: flex; align-items: center; gap: 8px; }
.line-row button { width: auto; grid-column: 3; }
.invoice-sheet { min-width: 0; }
.invoice-sheet p, .invoice-sheet h2, .invoice-sheet strong { overflow-wrap: anywhere; }
.invoice-table { table-layout: fixed; width: 100%; font-size: .9rem; }
.invoice-table th:first-child { width: 37%; }
.invoice-table th:nth-child(2) { width: 13%; }
.invoice-table td { overflow-wrap: anywhere; }
.terms p { white-space: pre-wrap; }
.enhancement-content { margin: 44px 0; padding: 24px; background: white; border: 1px solid #d7dee8; border-radius: 12px; line-height: 1.7; }
.enhancement-content h2 { margin-top: 30px; }
.enhancement-content h2:first-child { margin-top: 0; }
.enhancement-content details { padding: 14px 0; border-bottom: 1px solid #d7dee8; }
.enhancement-content summary { cursor: pointer; font-weight: 700; }
.enhancement-content caption { text-align: left; font-weight: 600; padding-bottom: 10px; }
.enhancement-content ol { padding-left: 24px; }
.enhancement-content li { margin-bottom: 12px; }
[data-status] { min-height: 1.7em; color: #6e320a; }
.tool-top { grid-template-columns: minmax(0, 1fr) minmax(170px, 240px); }
#invoice-builder, #worked-example { scroll-margin-top: 110px; }
:focus-visible { outline: 3px solid #2268a2; outline-offset: 3px; }
@media (max-width: 700px) {
  #invoice-builder, #worked-example { scroll-margin-top: 190px; }
  .line-row, .tool-top { grid-template-columns: 1fr; }
  .line-row button { grid-column: auto; min-height: 44px; }
  .enhancement-content { padding: 18px; }
  .invoice-sheet { padding: 16px; }
  .invoice-sheet-head { flex-direction: column; gap: 12px; }
  .invoice-table { font-size: .8rem; }
  .invoice-table th, .invoice-table td { padding: 8px 4px; }
  .total-card { width: 100%; }
}
@media print {
  @page { size: auto; margin: 14mm; }
  .tool-top, .enhancement-content, [data-status], [data-replace-confirm], .tool-panel > .small-note, .tool-panel > noscript { display: none !important; }
  .invoice-preview { display: block; }
  .invoice-sheet-head { display: flex; flex-direction: row; }
  .invoice-table { font-size: 10pt; }
  .invoice-table thead { display: table-header-group; }
  .invoice-table tr, .totals, .invoice-sheet-head { break-inside: avoid; }
  .table-wrap { overflow: visible; }
  .invoice-sheet { font-size: 11pt; }
  .invoice-form { display: none !important; }
}
