.aligned-calculations{border-top:1px solid #c8d4cc}.aligned-calc-row{display:grid;grid-template-columns:minmax(0,31fr) minmax(0,32fr) minmax(0,37fr);gap:12px;align-items:center;padding:12px 6px;border-bottom:1px solid #dde5df;break-inside:avoid}.aligned-calc-label{font-weight:500;overflow-wrap:anywhere}.aligned-calc-equation{min-width:0;overflow-x:auto}.aligned-calc-values{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;min-width:0;font-variant-numeric:tabular-nums}.aligned-calc-values button{border:0;border-bottom:1px dotted #a9b9ae;padding:2px 4px;background:transparent;border-radius:0}.aligned-calc-values .pass{color:#176142;font-weight:600}.aligned-calc-values .bad{color:#a51f27}.aligned-calc-row .original-equation{font-size:1rem}.aligned-calc-row math{font-size:1.1rem}
@media(max-width:760px){.aligned-calc-row{grid-template-columns:minmax(0,1fr);gap:6px;padding:12px 0}.aligned-calc-equation:empty,.aligned-calc-label:empty{display:none}.aligned-calc-label{font-weight:600}.aligned-calc-values .calc-token{font-size:.93rem}}
#pdf-preview-dialog{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#e6eae7;overflow:hidden}#pdf-preview-dialog[open]{display:flex;flex-direction:column}.pdf-preview-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#fff;border-bottom:1px solid #d7e0da;padding:12px 18px;padding-top:calc(12px + env(safe-area-inset-top));flex:none}.pdf-preview-toolbar h2{font-size:1.1rem;margin:0 auto 0 0}.pdf-preview-actions{display:flex;gap:8px;flex-wrap:wrap}.pdf-preview-actions button{min-height:44px;font-size:.95rem}.pdf-preview-status{font-size:.9rem;color:#52665b;margin:0;padding:10px 18px;background:#f4f7f4}.pdf-preview-pages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 12px 40px;touch-action:pan-x pan-y}.pdf-preview-page{width:min(794px,100%);margin:0 auto 24px}.pdf-preview-page img{display:block;width:100%;height:auto;box-shadow:0 3px 18px #1d3b3520;background:white}.pdf-preview-page figcaption{text-align:center;margin-top:8px;font-size:.875rem;color:#52665b}.pdf-preview-empty{padding:35px;text-align:center}.pdf-preview-error{color:#a51f27}#pdf-preview-dialog.pdf-preview-zoom .pdf-preview-page{width:794px;max-width:none}#pdf-preview-dialog.pdf-preview-zoom .pdf-preview-pages{display:block}
@media(max-width:600px){.pdf-preview-toolbar{padding-inline:12px;gap:8px}.pdf-preview-toolbar h2{font-size:1rem}.pdf-preview-actions{width:100%}.pdf-preview-actions button{flex:1;padding:8px}.pdf-preview-pages{padding:12px 8px 30px}}
@media print{#pdf-preview-dialog{display:none!important}}
.aligned-calc-equation{padding-block:6px;overflow-y:hidden}.aligned-calc-equation math{line-height:1.8}

.pdf-preview-actions [data-pdf-save]{background:#153f36;color:#fff;border-color:#153f36;width:100%}.pdf-preview-actions{width:100%}html,body{touch-action:pan-x pan-y}input,select,textarea{font-size:max(16px,1rem)}
.pdf-preview-toolbar .pdf-sheet-button{min-height:44px;white-space:nowrap;padding:8px 12px}#pdf-sheet-picker{width:min(550px,calc(100vw - 24px));max-height:85dvh;overflow:auto;padding:20px}.pdf-sheet-list{max-height:55dvh;overflow:auto}.pdf-sheet-list input{min-width:20px;height:20px}.pdf-sheet-list .export-option{font-size:16px}#pdf-sheet-picker [data-picker-apply]{width:100%}
.pdf-view-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:none;padding:8px 12px;background:#fff;border-bottom:1px solid #d7e0da}.pdf-view-tools button{min-height:40px;padding:6px 12px}.pdf-view-tools small{font-size:12px;color:#52665b}.pdf-preview-pages.pdf-is-zoomed .pdf-preview-page{width:calc(var(--pdf-base-width) * var(--pdf-zoom));max-width:none}.pdf-preview-pages{touch-action:pan-x pan-y}.print-steel-caption[hidden]{display:none!important}

.pdf-preview-status{display:none}.pdf-preview-status.pdf-preview-error{display:block}

.pdf-preview-pages{position:relative;-webkit-overflow-scrolling:touch;overflow-anchor:none}.pdf-zoom-space{position:relative;margin:0 auto}.pdf-zoom-surface{transform-origin:0 0;display:flow-root}.pdf-zoom-surface .pdf-preview-page{width:100%;max-width:none;margin:0 0 24px}.pdf-pinching .pdf-zoom-surface{will-change:transform}.pdf-pinching{scroll-behavior:auto;user-select:none}.pdf-zoom-surface img{height:auto}

.pdf-preview-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pdf-preview-actions button{width:100%;min-width:0;white-space:normal;line-height:1.4;padding:10px 8px}.pdf-preview-actions [data-pdf-project]{background:#153f36;border-color:#153f36;color:#fff}@media(max-width:380px){.pdf-preview-actions button{font-size:.875rem}}

.pdf-front-matter-options{display:flex;flex-wrap:wrap;gap:12px 20px;width:100%;font-size:1rem}.pdf-front-matter-options label{display:flex;align-items:center;gap:7px;cursor:pointer}.pdf-front-matter-options input{width:20px;height:20px;min-height:20px;accent-color:#153f36}

/* Keep the preview controls inside the viewport, separate from scrollable pages. */
#pdf-preview-dialog{inset:0;width:100%;max-width:100%;box-sizing:border-box}
#pdf-preview-dialog .pdf-preview-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;column-gap:12px;padding-right:calc(18px + env(safe-area-inset-right));padding-left:calc(18px + env(safe-area-inset-left));min-width:0}
#pdf-preview-dialog .pdf-preview-toolbar h2{min-width:0;margin:0;overflow-wrap:anywhere}
#pdf-preview-dialog .pdf-preview-toolbar>[data-pdf-close],#pdf-preview-dialog .pdf-preview-toolbar>[data-pdf-sheets]{position:static;min-width:48px;min-height:44px;width:auto;margin:0;white-space:nowrap;line-height:1.5;padding:8px 12px;justify-self:end}
#pdf-preview-dialog .pdf-preview-actions,#pdf-preview-dialog .pdf-front-matter-options{grid-column:1/-1;min-width:0}
@media(max-width:600px){#pdf-preview-dialog .pdf-preview-toolbar{column-gap:8px;padding-right:calc(12px + env(safe-area-inset-right));padding-left:calc(12px + env(safe-area-inset-left))}}

.pdf-preview-toolbar h2{font-size:18px;line-height:1.4}
.pdf-preview-toolbar>button,.pdf-preview-actions button{min-height:44px;padding:6px 10px;font-size:14px}
.pdf-front-matter-options{gap:4px 14px;font-size:14px}
.pdf-front-matter-options label{min-height:40px;gap:6px}
.pdf-front-matter-options input{width:18px;height:18px;min-height:18px}

/* Saved-sheet badge and one compositor-only success animation. */
#pdf-preview-dialog .pdf-preview-toolbar>[data-pdf-sheets]{position:relative;overflow:visible}
.pdf-saved-count{position:absolute;top:-7px;right:-6px;min-width:20px;height:20px;padding:0 4px;box-sizing:border-box;border:1.5px solid #fff;border-radius:999px;background:#d6ad56;color:#233b34;font-size:11px;font-weight:700;line-height:17px;text-align:center;pointer-events:none;font-variant-numeric:tabular-nums}
.pdf-saved-flight{position:fixed;z-index:120;pointer-events:none;width:46px;height:46px;transform-origin:center;will-change:transform,opacity;filter:drop-shadow(0 3px 3px #45371535)}
.pdf-saved-flight svg{display:block;width:100%;height:100%}
@media(prefers-reduced-motion:reduce){.pdf-saved-flight{display:none}}

/* The saved-sheet preview action keeps the same right-hand button footprint. */
#pdf-preview-dialog[data-saved-sheets-preview] .pdf-preview-toolbar{grid-template-columns:minmax(0,1fr) auto}
#pdf-preview-dialog[data-saved-sheets-preview] [data-pdf-sheets],#pdf-preview-dialog[data-saved-sheets-preview] [data-pdf-project]{display:none!important}
#pdf-preview-dialog[data-saved-sheets-preview] .pdf-preview-actions [data-pdf-save]{grid-column:2;grid-row:1}
