:root {
  --ink: #172126;
  --muted: #647178;
  --line: #d9e0e2;
  --line-dark: #bfc9cc;
  --paper: #ffffff;
  --canvas: #edf1f2;
  --teal: #46c7c3;
  --teal-dark: #136f72;
  --teal-pale: #e8f8f7;
  --navy: #17343b;
  --danger: #a33d3d;
  --font: "Inter", Arial, sans-serif;
  --display: "Manrope", "Inter", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.app-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.app-header__inner { min-height: 68px; max-width: 1500px; margin: 0 auto; padding: 10px 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand-lockup { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; width: max-content; }
.brand-lockup__logo { display: block; height: 32px; width: auto; max-width: 220px; object-fit: contain; }
.mode-switch { display: inline-flex; border: 1px solid var(--line-dark); padding: 3px; background: #f7f9f9; }
.mode-switch__button { border: 0; background: transparent; padding: 8px 16px; font-weight: 600; color: var(--muted); }
.mode-switch__button.is-active { background: var(--navy); color: #fff; }
.header-actions { justify-self: end; display: flex; flex-wrap: wrap; gap: 7px; }
.button { min-height: 36px; padding: 8px 13px; border: 1px solid var(--line-dark); background: #fff; font-weight: 600; transition: .15s ease; }
.button:hover { border-color: var(--teal-dark); }
.button--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.button--quiet { background: #fff; }
.button--block { display: flex; align-items: center; justify-content: center; width: 100%; text-align: center; }
.button--small { min-height: 32px; padding: 6px 11px; }
.file-button input { display: none; }
.workspace { max-width: 1500px; margin: 0 auto; padding: 28px 24px 56px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.control-panel { position: sticky; top: 96px; }
.control-group { padding: 0 0 21px; margin-bottom: 21px; border-bottom: 1px solid var(--line-dark); }
.control-group h2 { margin: 0 0 10px; font: 700 12px/1.2 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--navy); }
.control-grid { display: grid; gap: 8px; }
.control-help { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.validation-summary { padding: 10px 11px; background: #fff; border-left: 3px solid var(--teal-dark); font-size: 12px; }
.validation-summary.has-errors { border-color: var(--danger); color: var(--danger); }
.document-stage { min-width: 0; overflow: auto; }
.document {
  width: 210mm;
  max-width: 100%;
  min-height: 297mm;
  margin: 0 auto;
  padding: 16mm 15mm 13mm;
  background: var(--paper);
  box-shadow: 0 10px 35px rgba(29,49,55,.13);
  container-type: inline-size;
  container-name: document;
  box-sizing: border-box;
}
.document h2 { margin: 0 0 11px; font: 700 16px/1.25 var(--display); color: var(--navy); }
.document-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 300px);
  gap: 24px 42px;
  align-items: start;
  padding-bottom: 19px;
  border-bottom: 2px solid var(--navy);
}
@container document (max-width: 620px) {
  .document-header {
    grid-template-columns: 1fr;
  }
  .document-identity { text-align: left; }
  .field--number,
  .identity-grid .field { text-align: left; }
}
.document-logo { display: inline-flex; align-items: center; max-width: 100%; }
.document-logo img { display: block; height: 52px; width: auto; max-width: min(300px, 100%); object-fit: contain; }
.company-details { display: grid; gap: 3px; margin-top: 10px; font-size: 10.5px; color: var(--muted); line-height: 1.4; max-width: 360px; }
.company-details strong { color: var(--ink); font-size: 11px; }
.document-identity { text-align: right; min-width: 0; }
.eyebrow { margin: 0 0 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--teal-dark); }
.field--number { width: 100%; text-align: right; border: 0 !important; padding: 0 !important; font: 700 24px/1.2 var(--display); color: var(--navy); }
.identity-grid {
  display: grid;
  grid-template-columns: auto auto;
  gap: 12px 28px;
  margin-top: 13px;
  margin-left: auto;
  width: max-content;
  max-width: 100%;
  text-align: right;
  justify-content: end;
}
/* Only the caption — not pdf-static-field value spans replaced into the same label. */
label > span:first-child { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.field { width: 100%; border: 1px solid var(--line-dark); background: #fff; padding: 8px 9px; min-height: 36px; border-radius: 0; }
.field:focus, .table-field:focus { outline: 2px solid rgba(70,199,195,.28); border-color: var(--teal-dark); }
textarea.field { resize: vertical; }
.identity-grid .field { text-align: right; font-size: 12px; }
.identity-grid label > span:first-child { letter-spacing: .04em; text-align: right; }
.party-section { padding: 24px 0 20px; }
.form-grid { display: grid; gap: 10px; min-width: 0; }
.form-grid--two { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.span-two { grid-column: 1 / -1; }
.project-section { padding: 18px 0 21px; border-top: 1px solid var(--line); }
.field--description { min-height: 78px; }
.items-section { border-top: 2px solid var(--navy); padding-top: 16px; }
.section-heading-row { display: flex; justify-content: space-between; align-items: end; margin-bottom: 13px; }
.section-heading-row h2 { margin-bottom: 0; }
.items-table-wrap { overflow-x: auto; }
.items-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.items-table th { padding: 9px 8px; background: var(--navy); color: #fff; font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.items-table th.col-qty, .items-table th.col-rate, .items-table th.col-amount { text-align: right; }
.items-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.col-order { width: 28px; }
.col-item { width: auto; }
.col-qty { width: 88px; }
.col-rate { width: 110px; }
.col-amount { width: 100px; }
.col-actions { width: 36px; }
.table-field { width: 100%; min-width: 0; border: 1px solid var(--line); background: #fff; padding: 7px 8px; font-size: 12px; border-radius: 4px; }
.table-field:hover, .table-field:focus { border-color: var(--teal-dark); }
textarea.table-field { resize: none; overflow: hidden; min-height: 34px; line-height: 1.35; }
.item-quantity, .item-price { text-align: right; }
.rate-cell { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.rate-cell .table-field { padding-left: 4px; }
.line-total { text-align: right; font-weight: 700; font-size: 12px; white-space: nowrap; padding-right: 8px !important; }
.item-order { vertical-align: middle !important; }
.drag-handle { border: 0; background: transparent; color: var(--muted); padding: 3px; cursor: grab; }
.row-actions { text-align: center; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; }
.delete-item:hover { color: var(--danger); }
.item-row.is-dragging { opacity: .45; }
.commercial-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  padding: 24px 0;
  align-items: start;
  min-width: 0;
}
.summary-notes { display: grid; gap: 12px; min-width: 0; }
.totals-panel {
  border-top: 2px solid var(--navy);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  container-type: inline-size;
  container-name: totals;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.total-row span { min-width: 0; }
.total-row strong { white-space: nowrap; flex: 0 0 auto; }
.total-row--grand {
  background: var(--teal-pale);
  border-bottom: 0;
  font-size: 15px;
  color: var(--navy);
  position: relative;
  z-index: 1;
}
.total-row--grand strong { font-size: 18px; }
.total-input {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.totals-panel .total-input > span {
  display: inline;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}
.totals-panel .total-input > .money-field,
.totals-panel .total-input > .field.money-field,
.totals-panel .total-input > .pdf-static-field.money-field {
  display: block;
  width: auto;
  flex: 0 1 96px;
  min-width: 72px;
  max-width: 110px;
  box-sizing: border-box;
}
.total-input--option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto;
  align-items: center;
  gap: 8px;
}
.total-input--option > span { flex: unset; }
.total-input--option strong { text-align: right; white-space: nowrap; min-width: 56px; }
.total-option {
  display: grid;
  grid-template-columns: minmax(52px, 64px) minmax(36px, 40px);
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
}
.total-option .field,
.total-input--option > .money-field,
.total-input--option > .pdf-static-field {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  max-width: none;
  flex: none;
  box-sizing: border-box;
}
.money-field { text-align: right; min-height: 30px; padding: 4px 6px; }
.total-row--balance { background: var(--navy); color: #fff; border: 0; font-size: 14px; }

@container totals (max-width: 300px) {
  .total-input--option {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "label amount"
      "controls amount";
  }
  .total-input--option > span { grid-area: label; }
  .total-input--option .total-option { grid-area: controls; justify-self: start; }
  .total-input--option > select.money-field,
  .total-input--option > select.field,
  .total-input--option > .pdf-static-field.money-field {
    grid-area: controls;
    justify-self: start;
    width: auto;
    min-width: 72px;
    max-width: 110px;
  }
  .total-input--option strong { grid-area: amount; align-self: center; }
}
.payment-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.payment-section > * { min-width: 0; }
.payment-section > :only-child { grid-column: 1 / -1; }
.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 9px;
  min-width: 0;
}
.notes-terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  padding: 22px 0;
  min-width: 0;
}
.notes-terms-grid > :only-child { grid-column: 1 / -1; }
.acceptance-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.acceptance-section p { color: var(--muted); font-size: 11px; }
.signature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  min-width: 0;
}
.signature-field { font-style: italic; }
.accreditations { padding: 17px 0 15px; border-top: 2px solid var(--navy); }
.partner-mark { display: flex; align-items: center; margin-bottom: 14px; }
.partner-mark__octopus { display: block; height: 52px; width: auto; max-width: 260px; max-height: 52px; object-fit: contain; }
.accreditation-list {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}
.accreditation {
  width: 52px;
  height: 52px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.accreditation img {
  display: block;
  width: 52px;
  height: 52px;
  max-width: 52px;
  max-height: 52px;
  margin: 0;
  object-fit: contain;
}
.document-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 25px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 8.5px;
  color: var(--muted);
}
.document-footer strong { color: var(--ink); margin-right: 7px; }
.footer-legal { display: flex; gap: 12px; }
.document--quote #invoicePaymentSection, .document--quote #paymentStatusField, .document--quote #amountPaidField { display: none; }
.document--invoice #acceptanceSection { display: none; }
.required-invalid { border-color: var(--danger) !important; background: #fff8f8 !important; }
body.preview-mode .document .field, body.preview-mode .document .table-field {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
  appearance: none;
  padding-left: 0;
  padding-right: 0;
}
body.preview-mode .document textarea { resize: none; overflow: hidden; }
body.preview-mode #addItemButton, body.preview-mode .row-actions, body.preview-mode .item-order { display: none !important; }
body.preview-mode .col-order, body.preview-mode .col-actions { width: 0; padding: 0; }
body.preview-mode .rate-cell span { color: var(--ink); }
body.preview-mode .document input::placeholder,
body.preview-mode .document textarea::placeholder { color: transparent !important; opacity: 0 !important; }
body.preview-mode .document .output-empty,
body.preview-mode .document .pdf-static-field.output-empty {
  display: block;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  -webkit-text-fill-color: transparent !important;
}
body.preview-mode .totals-panel .money-field {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  min-height: 30px !important;
  height: auto !important;
  text-align: right;
}
body.preview-mode .totals-panel .output-empty {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}
body.preview-mode .document .signature-grid .output-empty,
body.preview-mode .document .signature-grid .pdf-static-field.output-empty {
  border-bottom: 1px solid var(--line-dark) !important;
}
body.preview-mode .document input[type="date"].output-empty::-webkit-datetime-edit,
body.preview-mode .document input[type="date"].output-empty::-webkit-calendar-picker-indicator {
  color: transparent !important;
  opacity: 0 !important;
  display: none !important;
}
body.preview-mode .document label.label-empty,
body.preview-mode .document .section-empty,
body.preview-mode .document #paymentInstructions.output-empty {
  display: none !important;
}
body.preview-mode .document .signature-grid label.label-empty {
  display: block !important;
}
body.preview-mode .document .signature-grid label.label-empty > span {
  display: block;
}
body.preview-mode .document .signature-grid label.label-empty .output-empty,
body.preview-mode .document .signature-grid label.label-empty .pdf-static-field.output-empty {
  display: block !important;
  border-bottom: 1px solid var(--line-dark) !important;
  min-height: 28px !important;
  height: 28px !important;
}
.pdf-static-field {
  display: block;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  border: 0;
  background: transparent;
}
#pdf-render-host .document { box-shadow: none; margin: 0; width: 210mm; max-width: 210mm; padding: 16mm 15mm 13mm; }
#pdf-render-host label.label-empty,
#pdf-render-host .section-empty,
#pdf-render-host #paymentInstructions.output-empty { display: none !important; }
#pdf-render-host .signature-grid label.label-empty { display: block !important; }
#pdf-render-host .signature-grid .output-empty {
  display: block !important;
  border-bottom: 1px solid var(--line-dark) !important;
  min-height: 28px;
}
@media (max-width: 1180px) {
  .app-header__inner { grid-template-columns: 1fr auto; }
  .mode-switch { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .workspace { grid-template-columns: 1fr; }
  .control-panel { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .document-stage { padding-bottom: 10px; }
}
@media (max-width: 760px) {
  .app-header__inner { padding: 10px 13px; }
  .header-actions { justify-self: end; }
  .workspace { padding: 14px 0 35px; }
  .control-panel { padding: 0 13px; grid-template-columns: 1fr; }
  .document-stage { overflow-x: auto; padding: 0 10px; }
  .document-stage .document {
    width: 100%;
    min-width: 0;
    padding: 18px 14px 16px;
  }
  .identity-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .items-table { table-layout: auto; }
  .col-qty { width: 70px; }
  .col-rate { width: 90px; }
  .col-amount { width: 84px; }
}
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; }
  .no-print { display: none !important; }
  .workspace { display: block; padding: 0; max-width: none; }
  .document-stage { overflow: visible; }
  .document { width: 210mm; min-height: 297mm; margin: 0; padding: 14mm 14mm 12mm; box-shadow: none; }
  .field, .table-field { border: 0 !important; background: transparent !important; padding-left: 0; padding-right: 0; appearance: none; }
  textarea { resize: none !important; overflow: hidden !important; }
  input::placeholder, textarea::placeholder { color: transparent !important; opacity: 0 !important; }
  .output-empty, .pdf-static-field.output-empty {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    -webkit-text-fill-color: transparent !important;
  }
  .totals-panel .money-field {
    color: var(--ink) !important;
    -webkit-text-fill-color: var(--ink) !important;
    min-height: 30px !important;
    height: auto !important;
    width: auto !important;
    max-width: 110px !important;
  }
  .totals-panel .total-input > span {
    display: inline !important;
    margin: 0 !important;
    color: var(--muted) !important;
    -webkit-text-fill-color: var(--muted) !important;
  }
  label.label-empty,
  .section-empty,
  #paymentInstructions.output-empty {
    display: none !important;
  }
  .signature-grid label.label-empty {
    display: block !important;
  }
  .signature-grid .output-empty,
  .signature-grid .pdf-static-field.output-empty {
    display: block !important;
    border-bottom: 1px solid #bfc9cc !important;
    min-height: 28px !important;
    height: 28px !important;
  }
  input[type="date"].output-empty::-webkit-datetime-edit,
  input[type="date"].output-empty::-webkit-calendar-picker-indicator {
    color: transparent !important;
    opacity: 0 !important;
    display: none !important;
  }
  .items-table-wrap { overflow: visible; }
  .items-table { page-break-inside: auto; }
  .items-table thead { display: table-header-group; }
  .item-row { break-inside: avoid; page-break-inside: avoid; }
  .commercial-summary, .payment-section, .notes-terms-grid, .acceptance-section, .accreditations { break-inside: avoid; page-break-inside: avoid; }
  .document-footer { break-inside: avoid; }
}
/* Stable, deterministic layout used only by the html2pdf export clone. */
#pdf-render-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 210mm;
  margin: 0;
  padding: 0;
  background: #fff;
  overflow: visible;
  pointer-events: none;
}
#pdf-render-host .document--pdf {
  width: 210mm;
  max-width: none;
  min-height: 297mm;
  margin: 0;
  padding: 14mm 14mm 12mm;
  box-shadow: none;
  box-sizing: border-box;
  container-type: normal;
}
#pdf-render-host .document--pdf .document-header {
  grid-template-columns: minmax(0, 1fr) 72mm;
  gap: 10mm;
}
#pdf-render-host .document--pdf .form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#pdf-render-host .document--pdf .form-grid label,
#pdf-render-host .document--pdf .bank-grid label,
#pdf-render-host .document--pdf .signature-grid label,
#pdf-render-host .document--pdf .identity-grid label,
#pdf-render-host .document--pdf .summary-notes > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
#pdf-render-host .document--pdf label > span:first-child {
  margin-bottom: 0;
}
#pdf-render-host .document--pdf .identity-grid {
  display: grid !important;
  grid-template-columns: auto auto !important;
  gap: 12px 28px !important;
  margin-left: auto !important;
  width: max-content !important;
  max-width: 100% !important;
  text-align: right !important;
  justify-content: end !important;
}
#pdf-render-host .document--pdf .identity-grid label,
#pdf-render-host .document--pdf .identity-grid label > span:first-child,
#pdf-render-host .document--pdf .identity-grid .pdf-static-field,
#pdf-render-host .document--pdf .identity-grid .field {
  text-align: right !important;
  letter-spacing: normal;
}
#pdf-render-host .document--pdf .pdf-static-field,
#pdf-render-host .document--pdf .pdf-static-field.field,
#pdf-render-host .document--pdf .pdf-static-field.table-field {
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  text-align: left !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: var(--ink) !important;
  box-sizing: border-box !important;
}
#pdf-render-host .document--pdf .identity-grid .pdf-static-field {
  text-align: right !important;
}
#pdf-render-host .document--pdf .pdf-static-field.field--number {
  font: 700 24px/1.2 var(--display) !important;
  color: var(--navy) !important;
  text-align: right !important;
  padding: 0 !important;
}
#pdf-render-host .document--pdf .totals-panel .pdf-static-field.money-field,
#pdf-render-host .document--pdf .item-quantity.pdf-static-field,
#pdf-render-host .document--pdf .item-price.pdf-static-field {
  text-align: right !important;
}
#pdf-render-host .document--pdf .commercial-summary {
  grid-template-columns: minmax(0, 1fr) 78mm;
  gap: 10mm;
}
#pdf-render-host .document--pdf .payment-section,
#pdf-render-host .document--pdf .notes-terms-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10mm;
}
#pdf-render-host .document--pdf .acceptance-section {
  grid-template-columns: 58mm minmax(0, 1fr);
  gap: 10mm;
}
#pdf-render-host .document--pdf .bank-grid,
#pdf-render-host .document--pdf .signature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#pdf-render-host .document--pdf .items-table-wrap {
  overflow: visible;
}
#pdf-render-host .document--pdf .items-table {
  width: 100%;
  table-layout: fixed;
}
#pdf-render-host .document--pdf .total-input,
#pdf-render-host .document--pdf .total-row {
  break-inside: avoid;
  page-break-inside: avoid;
}
#pdf-render-host .document--pdf .item-row,
#pdf-render-host .document--pdf .document-header,
#pdf-render-host .document--pdf .section-heading-row,
#pdf-render-host .document--pdf .commercial-summary,
#pdf-render-host .document--pdf .payment-section,
#pdf-render-host .document--pdf .notes-terms-grid,
#pdf-render-host .document--pdf .acceptance-section,
#pdf-render-host .document--pdf .accreditations,
#pdf-render-host .document--pdf .document-footer {
  break-inside: avoid;
  page-break-inside: avoid;
}
/* html2canvas ignores max-width on large intrinsic images — lock badge sizes. */
#pdf-render-host .document--pdf .partner-mark__octopus {
  width: auto !important;
  height: 52px !important;
  max-width: 260px !important;
  max-height: 52px !important;
}
#pdf-render-host .document--pdf .accreditation-list {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: center !important;
}
#pdf-render-host .document--pdf .accreditation {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  overflow: hidden !important;
}
#pdf-render-host .document--pdf .accreditation img {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
}
#pdf-render-host .document--pdf .pdf-static-field {
  overflow-wrap: anywhere;
  word-break: break-word;
}
#pdf-render-host .document--pdf .line-total,
#pdf-render-host .document--pdf .total-row strong,
#pdf-render-host .document--pdf .total-input strong {
  white-space: nowrap;
}
