/* Paper and Save as PDF share this layout. Loaded only for print media. */
@page { margin: 16mm; background: #fff; }

:root { color-scheme: light !important; }
*, *::before, *::after {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  border-color: #000 !important;
  opacity: 1 !important;
}
html, body, #root, .app-shell, .workspace, .document-area {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0;
}
html, body { background: #fff !important; }
.sidebar, .sidebar-scrim, .toolbar, .selection-toolbar, .native-editor,
.modal-backdrop, .toast-region, .popover-menu, .reauth-banner, .conflict-banner { display: none !important; }
.document-area { scrollbar-gutter: auto; }
.print-title { display: block; margin: 0 0 8mm; font-size: 18pt; line-height: 1.2; overflow-wrap: anywhere; break-after: avoid-page; }
.print-editor, .summary-wrap {
  display: block;
  position: static;
  width: 100%;
  min-height: 0;
  height: auto !important;
  margin: 0;
  padding: 0;
}
/* Normal-flow rows allow pagination; cells keep each expression with its result. */
.editor-line {
  display: table;
  table-layout: fixed;
  width: 100%;
  min-height: 0;
  height: auto !important;
  break-inside: avoid-page;
  page-break-inside: avoid;
}
.line-source, .result-line {
  display: table-cell;
  vertical-align: top;
  min-height: 0;
  padding: 2pt 0;
  font-size: 10pt;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: visible;
}
.line-source { width: 65%; padding-right: 12pt; }
.result-line { width: 35%; text-align: right; }
.result-value { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.result-line small { display: block; font-size: 8pt; line-height: 1.4; }
.line-source-text { visibility: visible !important; }
.line-gutter { display: none; }
.line-heading { break-after: avoid-page; page-break-after: avoid; }
.line-heading .line-source { padding-top: 7pt; font-weight: bold; }
.line-subtotal, .line-total { break-before: avoid-page; }
.line-subtotal { border-top: 0.5pt solid; }
.line-total { border-top: 1pt solid; font-weight: bold; }
.summary-intro > div { min-width: 0; overflow-wrap: anywhere; }
.summary-total { max-width: 65%; }
.summary-intro { break-inside: avoid-page; break-after: avoid-page; }
.summary-table-wrap { overflow: visible; border: 0; }
.summary-table { display: table; width: 100%; table-layout: fixed; }
.summary-table thead { display: table-header-group; }
.summary-table tbody { display: table-row-group; }
.summary-table tr { display: table-row; break-inside: avoid-page; }
.summary-table th, .summary-table td, .summary-table td:nth-child(3) {
  display: table-cell;
  padding: 6pt;
  font-size: 10pt;
  overflow-wrap: anywhere;
  border-bottom: 0.5pt solid;
}
