@page{size:A4;margin:13mm 12mm 15mm}
@media print{
 body{color:#172c27;font-size:10pt;line-height:1.4}
 #print-root .print-sheet{break-before:page;page-break-before:always;break-after:auto;page-break-after:auto}
 #print-root .print-sheet:first-child{break-before:auto;page-break-before:auto}
 .detailed-print-report.paper{padding:0;border:0;border-radius:0;max-width:none;min-width:0;background:#fff;box-shadow:none;font-size:9pt}
 .detailed-print-report .doc-head{border-bottom:2px solid #153f36;padding-bottom:8px;margin:0 0 9px;display:flex;justify-content:space-between;align-items:flex-start;font-size:9pt}
 .detailed-print-report .doc-head>span{font-size:8pt;text-align:right}
 .print-report-title{font-size:16pt;margin:0 0 7px;line-height:1.3}
 .print-project-meta{display:grid;grid-template-columns:1fr 1fr;gap:3px 14px;margin:0 0 10px;padding-bottom:8px;border-bottom:1px solid #b6c7bf;font-size:9pt}
 .print-project-meta>div{display:flex;gap:7px;min-width:0}.print-project-meta dt{color:#52665c;flex:none}.print-project-meta dd{margin:0;overflow-wrap:anywhere}
 .detailed-print-report h2{font-size:11pt;margin:12px 0 6px;border-bottom:1px solid #b9c9c0;padding-bottom:4px;break-after:avoid}
 .print-input-table,.print-calculations{width:100%;border-collapse:collapse;table-layout:fixed;line-height:1.4;font-size:8.5pt}
 .print-input-table th,.print-input-table td,.print-calculations td,.print-calculations th{padding:5px 6px;border-bottom:1px solid #dde4df;text-align:left;vertical-align:middle;overflow-wrap:anywhere;font-weight:400}
 .print-input-table thead th,.print-calculations thead th{background:#eaf0ec;color:#153f36;font-weight:600;border-block:1px solid #b6c7bf}
 .print-input-table th{color:#3e5348}.print-input-table td{font-weight:500;color:#122b20}
 .print-input-table thead,.print-calculations thead{display:table-header-group}
 .print-input-table tr,.print-calculations tr{break-inside:avoid;page-break-inside:avoid}
 .print-calculations .print-step{font-size:8pt;color:#62776c;padding-left:2px;padding-right:2px}
 .print-calculations .print-result{text-align:left;font-variant-numeric:tabular-nums}
 .print-value{display:inline;white-space:normal}.print-value+.print-value{margin-left:4px}
 .print-equation .original-equation,.print-equation math{font-size:11pt;max-width:100%}
 .print-equation .original-equation{display:inline-block;margin:2px 4px 2px 0}
 .detailed-print-report .result-banner{margin:4px 0 8px;padding:7px 9px;break-inside:avoid}
 .detailed-print-report .result-banner strong{font-size:9pt}.detailed-print-report .result-banner p,.detailed-print-report .tag{font-size:8pt}
 .detailed-print-report .chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .detailed-print-report .chart{margin:0;break-inside:avoid;padding:4px;min-width:0}
 .detailed-print-report .chart svg{width:100%;height:auto;min-height:0;max-height:57mm}
 .detailed-print-report .chart h4{font-size:8pt;margin:2px 4px}
 .detailed-print-report .rc-section-panel{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:none;margin:8px 0;padding:8px;break-inside:avoid}
 .detailed-print-report .rc-section-heading{grid-column:1/-1}.detailed-print-report .rc-section-heading h3{font-size:10pt;margin:0}
 .detailed-print-report .rc-section-svg{max-height:67mm;min-height:0}.detailed-print-report .rc-rebar-legend{display:block;font-size:8pt;margin:0}.detailed-print-report .rc-rebar-legend div{padding:3px 0}
 .detailed-print-report .beam-load-diagram{margin:6px 0;padding:4px 0;break-inside:avoid}.detailed-print-report .beam-load-diagram h3{font-size:9pt;margin:3px 0}
 .detailed-print-report .beam-load-diagram svg{width:100%;height:auto;max-height:95mm}.detailed-print-report .beam-diagram-scroll{overflow:visible}
 .detailed-print-report .beam-load-diagram .muted{font-size:8pt;margin:3px 0}
 .detailed-print-report .section-panel{margin:8px 0}.detailed-print-report .section-panel-head{padding:6px 8px}.detailed-print-report .section-panel-head h2{border:0;margin:0;padding:0;font-size:10pt}
 .detailed-print-report .section-svg{max-height:55mm}.detailed-print-report .section-specs{display:grid;grid-template-columns:1fr 1fr;font-size:8pt;padding:6px}
 .detailed-print-report .section-content{grid-template-columns:1fr 1fr}.detailed-print-report .report-note{font-size:8pt;margin-top:10px;padding-top:6px}
 .detailed-print-report .pass{color:#176142}.detailed-print-report .bad{color:#a51f27;font-weight:600}
 .detailed-print-report,.print-input-table thead,.print-calculations thead{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
@page{@bottom-right{content:"หน้า " counter(page);font-family:SPTThai,Tahoma,sans-serif;font-size:8pt;color:#52665c}}
@media print{
 .print-calculations thead .print-continuation{background:white;color:#233b34;font-size:9pt;padding-top:6px;padding-bottom:6px}
 .detailed-print-report .section-specs{gap:6px 12px}.detailed-print-report .section-specs>div{display:block;padding:3px 0}.detailed-print-report .section-specs dd{margin:2px 0 0}
 .detailed-print-report .chart text{fill:#304e43;font-size:13px}
}
@media print{
 .print-expression-run{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-start}
 .print-expression-run .print-result{display:inline;flex:0 1 auto;text-align:left}
 .print-expression-run .original-equation{margin:0 3px 0 0}
 .print-input-table th,.print-input-table td,.print-calculations td,.print-calculations th{padding:3px 5px}
 .detailed-print-report h2{margin-top:8px;margin-bottom:4px}
 .print-project-meta{gap:2px 10px;margin-bottom:6px;padding-bottom:5px}
 .detailed-print-report .result-banner{margin:3px 0;padding:5px 7px}
}

@media print{.print-expression-run{display:block}.print-expression-line{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:2px 0}.print-calculations tr{break-inside:avoid}}

@media print{.rc-report-section{break-inside:avoid}.rc-report-section .rc-section-svg{display:block;width:85%;max-height:68mm;margin:0 auto}}

@media print{.print-meta-divider{border:0;border-top:1px solid #b6c7bf;margin:2px 0 7px}.print-project-meta{border-bottom:0;margin-bottom:2px}}

@media screen {
 .summary-reports{display:grid;gap:24px;min-width:0}
 .summary-member{background:#fff;border:1px solid #dce5de;border-radius:14px;overflow:hidden;min-width:0}
 .summary-running-head{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid #dce5de;font-size:14px;flex-wrap:wrap}
 .summary-running-head strong{font-weight:500}.summary-running-head button{margin-left:auto;min-height:40px;font-size:14px;padding:6px 12px}
 .summary-reports .detailed-print-report.paper{padding:18px;border:0;border-radius:0;box-shadow:none;width:100%;max-width:none;min-width:0;font-size:14px;line-height:1.5;margin:0}
 .summary-reports .print-report-title{font-size:20px;margin:12px 0}
 .summary-reports .print-project-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0;padding:0 0 12px;font-size:14px}
 .summary-reports .print-project-meta>div{min-width:0}.summary-reports .print-project-meta dt{color:#68786f}.summary-reports .print-project-meta dd{margin:0;overflow-wrap:anywhere}
 .summary-reports h2,.summary-reports h3{font-size:18px;margin:20px 0 8px;padding-bottom:5px;border-bottom:1px solid #dce5de;line-height:1.5}
 .summary-reports table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px;display:table}
 .summary-reports tr{display:table-row}.summary-reports th,.summary-reports td{display:table-cell;padding:8px 6px;border-bottom:1px solid #e0e6e1;text-align:left;vertical-align:middle;overflow-wrap:anywhere;line-height:1.5}
 .summary-reports th{font-weight:600}.summary-reports thead th{background:#eaf0ec}.summary-reports .print-continuation{display:none}
 .summary-reports .print-expression-line{display:flex;align-items:center;gap:3px;flex-wrap:wrap;min-width:0;margin:3px 0}
 .summary-reports .original-equation{display:inline-block;margin:0;max-width:100%}.summary-reports math{font-size:16px;max-width:100%;overflow-wrap:anywhere}
 .summary-reports .print-value{display:inline;white-space:normal}.summary-reports .print-value+.print-value{margin-left:4px}.summary-reports .print-result{font-variant-numeric:tabular-nums}
 .summary-reports .chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.summary-reports .chart{min-width:0;margin:0;padding:0;border:0}.summary-reports .chart h4{font-size:14px;margin:6px 0}
 .summary-reports svg{display:block;width:100%;height:auto;min-width:0;max-height:360px}
 .summary-reports .rc-report-section{display:block;margin:20px 0;padding:0;border:0;max-height:none}.summary-reports .rc-report-section svg{width:100%;max-height:320px;margin:auto}
 .summary-reports .section-content{display:block}.summary-reports .section-specs{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:14px}.summary-reports .section-specs dd{margin:0}
 .summary-reports .doc-image{max-width:100%;height:auto}.summary-reports .beam-diagram-scroll{overflow:visible}.summary-reports .beam-load-diagram{margin:12px 0;padding:0;border:0}
 .summary-reports .pass{color:#176142}.summary-reports .bad{color:#a51f27;font-weight:600}
 @media(max-width:480px){.summary-reports .detailed-print-report.paper{padding:12px}.summary-running-head{padding:10px 12px;gap:8px}.summary-reports th,.summary-reports td{padding:7px 4px}}
}

.print-steel-section .print-steel-caption{text-align:center;font-weight:700;margin:4px 0 12px;overflow-wrap:anywhere}
@media print{.print-steel-section{break-inside:avoid}.print-steel-section .print-steel-caption{font-size:10pt}.print-steel-section .section-svg{display:block;width:100%;margin:auto}}
@media screen{.summary-reports .print-steel-section .print-steel-caption{text-align:center;font-size:16px;margin:4px 0 12px}}

@media screen{.summary-reports .rc-report-section .rc-reference-pile-svg{max-height:720px}}
@media print{.detailed-print-report .rc-report-section .rc-reference-pile-svg{max-height:150mm;width:100%}}

.print-expression-line math{font-family:"Cambria Math","STIX Two Math",serif;line-height:1.2}.print-expression-run{line-height:1.5}.print-expression-line{padding-block:2px}.print-result{font-variant-numeric:tabular-nums}.formula-leading-equals{padding-right:4px}
@media print{.print-calculations th,.print-calculations td{padding-block:4px}.print-expression-line{break-inside:avoid}}

/* Concrete reports share the single-span beam's label, formula and answer layout. */
.rc-calculations .print-expression-line.has-formula{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:6px}
.rc-calculations .print-formula{flex:0 1 auto;max-width:100%;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.rc-calculations .print-result{flex:0 1 auto;max-width:100%;min-width:0;overflow-wrap:anywhere;text-align:left}
.rc-calculations .print-expression-line:not(.has-formula) .print-formula{display:none}
.rc-calculations .print-conclusion{font-weight:600}
.aligned-calculations .rc-calc-row{grid-template-columns:minmax(0,23fr) minmax(0,77fr);gap:12px}
.rc-calc-row .print-expression-run{min-width:0}
.rc-calc-row .print-expression-line{margin:4px 0}
.rc-calc-row .print-value[data-formula]{border:0;border-bottom:1px dotted #a9b9ae;background:transparent;border-radius:0;padding:2px 4px;color:inherit;font:inherit}
@media(max-width:760px){.aligned-calculations .rc-calc-row{grid-template-columns:minmax(0,1fr)}}

@media screen{.rc-calculations .print-formula{overflow-x:auto;overflow-y:hidden;padding-block:4px}.rc-calculations .print-formula .original-equation{flex-shrink:0}}

.print-cover-image{display:flex;align-items:center;justify-content:center;min-height:277mm}.print-cover-image img{display:block;width:100%;max-height:277mm;object-fit:contain}

.print-calculations .print-case-heading th{white-space:nowrap;font-weight:600;padding-block:7px}

/* Keep the two tall technical drawings proportional and readable, without clipping. */
.rc-section-panel .rc-stair-reference-svg,.rc-section-panel .rc-reference-pile-svg{display:block;width:100%;height:auto;max-height:none;margin:0 auto}
@media screen{.summary-reports .rc-report-section .rc-stair-reference-svg,.summary-reports .rc-report-section .rc-reference-pile-svg{max-height:none}}
@media print{
 .detailed-print-report .rc-report-section:has(.rc-stair-reference-svg),.detailed-print-report .rc-report-section:has(.rc-reference-pile-svg){display:block}
 .detailed-print-report .rc-report-section .rc-stair-reference-svg{width:100%;max-height:155mm}
 .detailed-print-report .rc-report-section .rc-reference-pile-svg{width:100%;max-height:205mm}
}

.detail-zoom-button{display:block;margin:12px auto 0;padding:9px 16px;border:1px solid #a7b9b0;border-radius:9px;background:#f7faf8;color:#233b34;font:inherit;font-size:14px;cursor:pointer}
.detail-drawing-dialog{width:min(96vw,1100px);height:min(92dvh,1000px);max-width:none;max-height:none;padding:0;border:0;border-radius:14px;background:#fff;color:#233b34;overflow:hidden}
.detail-drawing-dialog[open]{display:flex;flex-direction:column}
.detail-drawing-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:12px;border-bottom:1px solid #d7e1da;background:#f8faf8}
.detail-drawing-toolbar strong{flex:1;min-width:115px;font-size:16px}
.detail-drawing-toolbar button{padding:8px 12px;border:1px solid #c1d0c7;border-radius:8px;background:white;color:#233b34;font:inherit}
.detail-drawing-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px;touch-action:pan-x pan-y}
.detail-drawing-scroll svg{display:block;max-height:none;height:auto;margin:0}
@media print{.detail-zoom-button,.detail-drawing-dialog{display:none!important}}

/* Optional drawing details do not enter engineering calculations. */
.detail-input-panel{background:#fff;border:1px solid #d8e1db;border-radius:12px;padding:12px;margin:12px 0}
.detail-input-panel summary{font-weight:650;cursor:pointer;color:#233b34}
.detail-input-panel p{font-size:13px;color:#52675e;margin:8px 0}
.detail-input-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:10px}
.detail-input-grid label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:#344b40}
.detail-input-grid input,.detail-input-grid select{width:100%;min-width:0;font:inherit;font-size:16px;padding:9px;border:1px solid #bac9bf;border-radius:7px;background:#fff}
@media print{.detail-input-panel{display:none!important}}

/* Keep pile-foundation row names together in the A4 calculation table. */
@media print{.pile-calculations tbody th[scope="row"]{white-space:nowrap;overflow-wrap:normal}}
@media screen and (min-width:760px){.summary-reports .pile-calculations tbody th[scope="row"]{white-space:nowrap;overflow-wrap:normal}}

.report-radical{display:inline-flex;align-items:baseline;white-space:nowrap}.report-radicand{display:inline-block;border-top:1px solid currentColor;padding:0 .08em}
