/* Financial columns reserve room for multi-million amounts in every document.
   Subtotals span the final columns, never the narrow unit/notes cell alone. */
.formal-table .formal-col-item{width:34%}
.formal-table .formal-col-note{width:16%}
.formal-table .formal-col-quantity{width:7%}
.formal-table .formal-col-unit{width:6%}
.formal-table .formal-col-price{width:15%}
.formal-table .formal-col-amount{width:17%}
body .paper .reform-table{table-layout:fixed}
body .paper .reform-table th:nth-child(1),body .paper .reform-table th:nth-child(2){width:auto}
body .paper :is(.formal-table,.reform-table) .num{white-space:nowrap;overflow-wrap:normal;word-break:normal;font-variant-numeric:tabular-nums}
body .paper .formal-table tfoot td:last-child{text-align:right}
body .paper .formal-total{width:70%;grid-template-columns:120px minmax(0,1fr)}
body .paper .formal-total b{white-space:nowrap}
body .paper .issuer>div{min-width:0;overflow-wrap:anywhere}
/* Screen and PDF use identical dimensions, so measured wrapping stays valid. */
.estimate-compact-document{display:grid;gap:20px;overflow-x:auto}
.estimate-layout-status{display:inline-flex;align-items:center;padding:7px 10px;border-radius:6px;background:#e7f5ee;color:#176044;font-size:12px;font-weight:700}
body .paper.estimate-compact{box-sizing:border-box;width:210mm!important;min-width:210mm;max-width:210mm;height:297mm!important;min-height:0!important;margin:0 auto!important;padding:8mm 12mm 11mm!important;overflow:visible;font-size:12px;line-height:1.5}
.estimate-page-content{display:flow-root}
/* Mobile accessibility rules must not change wrapping in an A4 document. */
body #shell .paper.estimate-compact :is(td,th){font-size:12px!important;line-height:1.5}
body #shell .paper.estimate-compact :is(p,li,dt,dd){font-size:11px!important;line-height:1.5}
body #shell .paper.estimate-compact :is(small,em){font-size:10px!important;line-height:1.5}
body #shell .paper.estimate-compact h1{font-size:24px;line-height:1.5}
body #shell .paper.estimate-compact h2{font-size:12px;line-height:1.5}
.estimate-compact .page-number{bottom:4mm}
.estimate-compact .paper-head{margin:0 0 3mm;padding-bottom:2mm}
.estimate-compact .paper-head h1{font-size:24px}
.estimate-compact .formal-meta{margin:2mm 0;gap:6mm}
.estimate-compact .issuer .logo{width:150px;height:55px;max-width:100%;object-fit:contain}
.estimate-compact .issuer>div>br:first-of-type{display:none}
.estimate-compact .recipient{padding:1mm 0;font-size:15px}
.estimate-compact .doc-intro{margin:2mm 0}
.estimate-compact .formal-total{margin:2mm 0 3mm}
.estimate-compact .formal-table{font-size:12px}
.estimate-compact .formal-table th{padding:.8mm 1mm}
.estimate-compact .formal-table td{height:auto;padding:.8mm 1.5mm;font-size:12px;line-height:1.5}
.estimate-compact .formal-table tfoot td{height:auto}
.estimate-compact .tax-box{margin-top:2mm;grid-template-columns:1fr}
.estimate-compact .doc-footer-note{margin-top:2mm;min-height:0;padding:2mm}
.estimate-compact .formal-page-summary{margin:2mm 0 3mm;padding:1mm 0}
.estimate-compact.reform-cover> .estimate-page-content>h1{font-size:24px;margin:3mm 0 5mm;text-align:center;letter-spacing:.3em}
.estimate-compact .cover-date{font-size:10px}
.estimate-compact .cover-grid{grid-template-columns:1.2fr 1fr;gap:6mm}
.estimate-compact .cover-total{margin:4mm 0;font-size:15px;grid-template-columns:70px 1fr}
.estimate-compact .cover-total b{font-size:17px;white-space:nowrap}
.estimate-compact.reform-cover dl{grid-template-columns:70px 1fr;font-size:11px;margin:2mm 0}
.estimate-compact.reform-cover dt,.estimate-compact.reform-cover dd{padding:1.5mm 1mm;overflow-wrap:anywhere}
.estimate-compact .cover-issuer{padding:3mm 19mm 0 0;line-height:1.6;font-size:11px;overflow-wrap:anywhere}
.estimate-compact .cover-issuer .logo{width:150px;height:45px;max-width:100%;max-height:45px;object-fit:contain;margin-bottom:2mm}
.estimate-compact .cover-issuer .seal{width:17mm;height:17mm;top:3mm;right:0}
.estimate-compact .special-notes{margin-top:4mm}
.estimate-compact .special-notes h2{margin:0 0 1mm;font-size:12px}
.estimate-compact .special-notes ol{margin:0;padding-left:5mm}
.estimate-compact .special-notes li{margin:1mm 0;font-size:10px}
.estimate-compact .estimate-page-content>header{display:grid;grid-template-columns:1fr auto;align-items:end;border-bottom:2px solid #222;margin:0 0 3mm}
.estimate-compact .estimate-page-content>header.paper-head{display:flex}
.estimate-compact .estimate-page-content>header h1{font-size:22px;margin:0 0 2mm}
.estimate-compact .reform-project-name{margin:0 0 2mm}
.estimate-compact .category-title{font-size:12px;margin:3mm 0 1mm;padding:1.5mm 2mm}
.estimate-compact .reform-table{table-layout:fixed}
.estimate-compact .reform-table th,.estimate-compact .reform-table td{font-size:12px;line-height:1.5;padding:1mm;overflow-wrap:anywhere}
.estimate-compact .reform-table th:nth-child(1){width:25%}
.estimate-compact .reform-table th:nth-child(2){width:29%}
@media print{
  .estimate-compact-document{display:block;overflow:visible}
  body .paper.estimate-compact{border:0!important;box-shadow:none!important;break-after:page;page-break-after:always}
  body .paper.estimate-compact:last-child{break-after:auto;page-break-after:auto}
}
