:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#212427;background:#f7f9f8;line-height:1.5}
*{box-sizing:border-box}body{margin:0}a{color:#076e6c}a:hover{text-decoration:underline}
.site-header{background:#fff;color:#212427;border-top:5px solid #076e6c;border-bottom:1px solid #d9e1de;box-shadow:0 2px 10px #2124270a;padding:.8rem max(1.2rem,calc((100vw - 1100px)/2));display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.site-header a,.site-header button{color:#212427}.site-header .brand{display:flex;align-items:center;gap:.7rem;font-weight:750;text-decoration:none}.site-header .brand img{display:block;width:auto;height:52px;max-width:220px;object-fit:contain}.site-header .brand span{border-left:1px solid #d9e1de;padding-left:.7rem;color:#076e6c;font-size:.92rem;letter-spacing:.11em;text-transform:uppercase}
.site-header nav{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem 1rem}.site-header nav a{text-decoration:none}.site-header nav a:hover,.site-header nav a:focus-visible{color:#076e6c;text-decoration:underline}
main{max-width:1100px;margin:2rem auto;padding:0 1.2rem;min-height:65vh}h1{font-size:1.8rem;line-height:1.2;margin:0 0 .7rem}h2{font-size:1.3rem}.heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.4rem}.heading p{margin:.2rem 0;color:#566260}
.card,.empty{background:white;border:1px solid #d9e1de;border-radius:.65rem;padding:1.5rem;box-shadow:0 2px 10px #21242708}.empty{margin-top:1.3rem}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem 1.4rem}.form-grid .wide{grid-column:1/-1}fieldset{border:1px solid #d9e1de;border-radius:.4rem;padding:1rem}legend{font-weight:700}label{display:flex;flex-direction:column;gap:.35rem;font-weight:600}
input,select,textarea{font:inherit;padding:.55rem .65rem;border:1px solid #a7b7b2;border-radius:.35rem;width:100%;background:#fff;color:#212427}input:focus,select:focus,textarea:focus{outline:2px solid #076e6c;outline-offset:1px}
button,.button{font:inherit;display:inline-block;background:#076e6c;color:white;border:1px solid #076e6c;padding:.56rem .9rem;border-radius:.35rem;cursor:pointer;text-decoration:none;font-weight:650;width:auto}.button:hover,button:hover{background:#055553;color:#fff;text-decoration:none}.secondary{background:#fff;color:#076e6c}.secondary:hover{background:#eaf4f2;color:#044c4a}
.link{background:none;border:0;padding:0;color:#076e6c;cursor:pointer;font-weight:inherit}.site-header .link{color:#212427}.link:hover{background:none;color:#044c4a;text-decoration:underline}.site-header .link:hover{color:#076e6c}.danger{color:#a32727}.inline{display:inline;margin:0}.filters{display:flex;gap:1rem;align-items:flex-end;flex-wrap:wrap;margin:1rem 0}.filters label{min-width:10rem}.filters button{margin-bottom:0}.muted{color:#566260;font-size:.9rem}
.table-wrap{overflow-x:auto;background:white;border:1px solid #d9e1de;border-radius:.65rem}table{border-collapse:collapse;width:100%;font-size:.94rem}th,td{text-align:left;padding:.75rem;border-bottom:1px solid #dfe8e4;vertical-align:top}th{background:#edf4f1;font-weight:700}tr:last-child td{border-bottom:0}td.actions{white-space:nowrap}td.actions>*{margin-right:.55rem}.alert{background:#eaf4f2;border-left:4px solid #076e6c;padding:.8rem 1rem;margin:0 0 1rem;border-radius:.3rem}.alert.error{background:#fcecec;border-color:#bb3030}.alert.success{background:#eaf8f0;border-color:#27845a}
details{border:1px solid #d9e1de;border-radius:.35rem;padding:.7rem 1rem}summary{cursor:pointer;font-weight:650}details label{margin-top:1rem}footer{background:#076e6c;color:#fff;font-size:.85rem;text-align:center;padding:1.5rem}@media(max-width:650px){.form-grid{grid-template-columns:1fr}.site-header{align-items:flex-start}.site-header .brand img{height:46px}.site-header .brand span{font-size:.82rem}.site-header nav{gap:.7rem}.filters label{width:100%}td.actions{white-space:normal}}
.payment-instructions{white-space:pre-line;max-width:35rem}
input[type="checkbox"]{width:auto;accent-color:#076e6c}label:has(input[type="checkbox"]){display:block}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:white;border:1px solid #d9e1de;padding:1rem;border-radius:.4rem}dl{display:grid;grid-template-columns:minmax(9rem,15rem) 1fr;gap:.5rem 1rem}dt{font-weight:700}dd{margin:0}
.result-card{margin:1rem 0;border-left:5px solid #076e6c}.result-card h2{margin:0 0 .3rem}.result-card strong{font-size:1.7rem;color:#076e6c}.result-card p{margin:.5rem 0 0}.product-image{display:block;max-width:min(100%,260px);max-height:270px;object-fit:contain;background:white;border:1px solid #d9e1de;border-radius:.4rem;margin:.7rem 0 1rem}
.feature-choice{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;padding:.45rem 0;border-bottom:1px solid #dfe8e4}.feature-choice>span{min-width:min(100%,20rem);font-weight:600}.feature-choice label{display:inline-flex;flex-direction:row;align-items:center;font-weight:400;gap:.35rem}.feature-choice input[type="radio"]{width:auto;accent-color:#076e6c}.worksheet-table{min-width:850px}.worksheet-table input,.worksheet-table select{min-width:7.5rem}.worksheet-table td:first-child select,.worksheet-table td:nth-child(2) select{min-width:11rem}.worksheet-table th,.worksheet-table td{padding:.55rem}.worksheet-table [data-edge]:disabled{background:#edf4f1}.worksheet-table+button,fieldset>.table-wrap+button{margin-top:.8rem}
.form-grid>fieldset{min-width:0}.form-grid>fieldset .table-wrap{max-width:100%}
.product-gallery{display:flex;gap:1rem;align-items:flex-start;flex-wrap:wrap;margin:.8rem 0}.product-gallery figure{margin:0;max-width:100%}.product-gallery figcaption{font-size:.85rem;color:#566260}.catalog-thumbnail{display:block;width:55px;height:75px;object-fit:contain}.catalog-group th{background:#eaf4f2;text-align:left}

/* Image-first product selection for a new U-value project. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.new-flow-intro{margin-bottom:1.35rem}
.new-flow-intro .eyebrow{color:#076e6c;text-transform:uppercase;letter-spacing:.09em;font-size:.77rem;font-weight:750;margin:0 0 .35rem}
.new-flow-intro h1{font-size:clamp(1.7rem,3vw,2.3rem)}
.new-flow-intro>p:last-child{max-width:73ch;color:#566260;margin:.35rem 0 0}
.section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:.35rem 1rem;margin-bottom:.85rem}
.section-heading h2{margin:0}
.section-heading p{margin:0;color:#566260;font-size:.87rem}
.design-search{margin-bottom:1.6rem}
.design-search-fields{display:grid;grid-template-columns:minmax(12rem,1.4fr) repeat(3,minmax(0,1fr));gap:1rem}
.design-search-fields label{min-width:0}
.design-search-fields select{text-overflow:ellipsis}
.design-search-actions{display:flex;align-items:center;gap:1rem;margin-top:1rem}
.new-calculation-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:1.2rem;align-items:start}
.design-results{min-width:0;padding:1.15rem;background:#fff;border:1px solid #d9e1de;border-radius:.65rem}
.design-choice{border:0;padding:0;margin:0;min-width:0}
.design-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start;gap:.7rem;max-height:344px;overflow-y:auto;padding:.2rem .45rem .2rem .2rem;scrollbar-gutter:stable}
.design-card{position:relative;display:flex;flex-direction:column;gap:0;min-width:0;background:#fff;border:2px solid #d9e1de;border-radius:.65rem;overflow:hidden;cursor:pointer;font-weight:400;box-shadow:0 2px 8px #2124270a}
.design-card:hover{border-color:#076e6c}
.design-card:focus-within{outline:3px solid #0b817e;outline-offset:2px}
.design-card:has(input:checked){border-color:#076e6c;background:#eaf4f2;box-shadow:0 0 0 2px #076e6c29}
.design-card input[type="radio"]{position:absolute;top:.55rem;right:.55rem;z-index:1;width:1.25rem;height:1.25rem;margin:0;accent-color:#076e6c;cursor:pointer}
.design-card-image{height:105px;width:100%;display:flex;align-items:center;justify-content:center;background:#e5efeb}
.design-card-image img{max-width:100%;max-height:100%;object-fit:contain}
.design-card-empty{font-size:.83rem;color:#566260;text-align:center;padding:.75rem}
.design-card-info{display:flex;flex-direction:column;gap:.2rem;min-width:0;padding:.7rem;font-size:.79rem;line-height:1.3;color:#566260;overflow-wrap:anywhere}
.design-card-info strong{color:#212427;font-size:.94rem;line-height:1.3}
.design-card-type{color:#076e6c;font-weight:700;text-transform:uppercase;letter-spacing:.05em;font-size:.67rem}
.project-setup{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(17rem,.8fr);gap:1rem 1.5rem;min-width:0}
.project-setup>.section-heading,.project-setup>p,.selection-summary{grid-column:1/-1;margin:0}
.project-setup .setup-options,.project-setup .setup-project{min-width:0;display:grid;align-content:start;gap:.85rem}
.project-setup .measurement-choice{border:0;padding:0;margin:0;display:grid;gap:.5rem}
.measurement-choice legend{margin-bottom:.4rem}
.measurement-choice label{display:flex;flex-direction:row;gap:.55rem;align-items:flex-start;padding:.65rem;border:1px solid #d9e1de;border-radius:.45rem;font-weight:400;cursor:pointer}
.measurement-choice label:has(input:checked){border-color:#076e6c;background:#eaf4f2}
.measurement-choice input[type="radio"]{width:auto;margin:.22rem 0 0;accent-color:#076e6c}
.measurement-choice small{display:block;margin-top:.15rem;font-size:.78rem;line-height:1.35;color:#566260}
.measurement-choice label:has(input:disabled){opacity:.55;background:#e9eeeb;border-color:#c8d3ce;cursor:not-allowed}
.project-setup button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:950px){.design-search-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.design-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:690px){.design-search-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.design-search-fields label:first-child,.design-search-fields label:last-child{grid-column:1/-1}.new-flow-intro>p:last-child{font-size:.93rem}.project-setup{grid-template-columns:1fr}.design-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:360px}.design-card-image{height:110px}.section-heading{align-items:flex-start;flex-direction:column}.design-search-actions{flex-wrap:wrap}}

/* Optional general worksheet rows; the server validates the area and gas sums. */
.worksheet-entry [data-glass-option][hidden]{display:none}
.worksheet-entry{background:#f7f9f8;border:1px solid #d9e1de;border-radius:.5rem;padding:1rem;margin:.8rem 0}
.worksheet-entry-heading{display:flex;align-items:center;justify-content:space-between;gap:.7rem;margin-bottom:.7rem}
.worksheet-entry-heading .secondary{padding:.25rem .6rem;font-size:.85rem}
.worksheet-entry .form-grid{gap:.65rem 1rem}
.gas-fractions{margin-top:1rem}
.gas-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.65rem}
.gas-fields label{min-width:0}
.worksheet-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:1rem}
.worksheet-actions button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:760px){.gas-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
.maker-password{max-width:28rem;width:calc(100% - 2rem);border:1px solid #d9e1de;border-radius:.65rem;padding:1.5rem;box-shadow:0 10px 40px #21242733;color:#212427}
.maker-password::backdrop{background:#21242799}
.maker-password h2{margin-top:0}
.maker-password-actions{display:flex;gap:.6rem;align-items:center;margin-top:1rem}
[hidden]{display:none!important}
.selection-summary{padding:.6rem .85rem;border-radius:.45rem;background:#eaf4f2;border:1px solid #bad8d0;font-size:.9rem}
.project-identity{display:grid;gap:.85rem}
.project-setup [data-option] label:has(select){display:grid;gap:.35rem;padding:.4rem 0;border:0}
.project-setup [data-option] label:has(select):hover{background:none}
.project-setup .setup-options>fieldset,.project-setup .setup-project>fieldset{min-width:0}
.project-setup .setup-project{padding:1rem;background:#f4f8f6;border:1px solid #d9e1de;border-radius:.55rem}
.project-setup .setup-project button{justify-self:start}
.stage-intro{margin-bottom:1.1rem}
.stage-intro .eyebrow{color:#076e6c;text-transform:uppercase;letter-spacing:.08em;font-size:.78rem;font-weight:750}
.stage-intro h1{margin-bottom:.3rem}
.stage-intro p{max-width:75ch;color:#566260;margin:.25rem 0 0}
.legacy-stage{display:grid;gap:1rem}
.stage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.stage-panel{min-width:0;padding:1rem;border:1px solid #d9e1de;border-radius:.55rem;background:#fff}
.stage-panel legend{padding:0 .3rem}
.stage-panel>p:first-of-type{margin-top:.3rem}
.stage-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;align-items:start}
.stage-fields>*{min-width:0}
.stage-diagram{margin:.8rem 0 0;padding:.8rem;border:1px solid #d9e1de;border-radius:.45rem;background:#f4f8f6;text-align:center}
.stage-diagram img{display:block;max-width:100%;max-height:260px;object-fit:contain;margin:auto}
.stage-diagram figcaption{margin:.5rem 0 0;color:#566260;font-size:.85rem;text-align:left}
.stage-optional{margin:.7rem 0 0;background:#f4f8f6}
.stage-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;margin-top:.45rem}
.glazing-pane,.glazing-gap{min-width:0;padding:.85rem;border:1px solid #d9e1de;border-radius:.55rem;background:#f4f8f6}
.glazing-pane h3,.glazing-gap h3{font-size:1rem;margin:0 0 .35rem}
.glazing-pane p,.glazing-gap p{font-size:.82rem;color:#566260;margin:0 0 .65rem}
.glazing-pane label,.glazing-gap label{font-size:.88rem}
.stage-panel .table-wrap input{min-width:6rem}
.glazing-advanced-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin-top:.7rem}
.glazing-advanced-fields label{min-width:0}
.glazing-pane-entries>.stage-panel{margin-top:1rem}
.dimensions-layout{grid-template-columns:minmax(0,1.45fr) minmax(0,.55fr);align-items:stretch}
.dimensions-layout .dimensions-entry{align-content:center}
.dimensions-diagram-fallback{padding:1rem;background:#f4f8f6;border:1px solid #d9e1de;border-radius:.55rem}
.panel-layers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
.panel-layers legend,.panel-layers>p{grid-column:1/-1;margin:0}
.panel-layer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;padding:.75rem;border:1px solid #d9e1de;border-radius:.45rem;background:#f4f8f6}
.panel-layer label{min-width:0}
.threshold-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem;padding:.8rem;border:1px solid #d9e1de;border-radius:.45rem}
.threshold-fields p{grid-column:1/-1;margin:0}
.frame-section-grid .stage-panel{background:#f4f8f6}
@media(max-width:760px){.stage-grid,.panel-layers,.threshold-fields{grid-template-columns:1fr}.stage-fields{grid-template-columns:1fr}.glazing-advanced-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.panel-layer{grid-template-columns:1fr}}
.project-setup .measurement-choice:first-child{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:690px){.project-setup .measurement-choice:first-child{grid-template-columns:1fr}}
.step-visual{margin:0;background:#f4f8f6;border:1px solid #d9e1de;border-radius:.55rem;padding:1rem}
.step-visual figcaption{font-size:.86rem;color:#566260;margin-top:.6rem}
.step-schematic svg{display:block;max-width:100%;max-height:165px;margin:auto}
.step-schematic-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem .9rem;padding-left:1.4rem;font-size:.87rem}
.design-preview{display:grid;gap:.5rem}
.design-preview-picture{display:grid;place-items:center;min-height:130px}
.design-preview-picture img{max-width:100%;max-height:180px;object-fit:contain}
.glazing-mode-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}
.glazing-mode-options label{position:relative;display:block;min-width:0;padding:.75rem 2.5rem .75rem .85rem;border:2px solid #d9e1de;border-radius:.5rem;background:#fff;cursor:pointer;font-weight:400}
.glazing-mode-options label:has(input:checked){border-color:#076e6c;background:#eaf4f2}
.glazing-mode-options label:focus-within{outline:3px solid #0b817e;outline-offset:2px}
.glazing-mode-options label::after{content:'';position:absolute;right:.75rem;top:.8rem;width:1.25rem;height:1.25rem;border:2px solid #a7b7b2;border-radius:.3rem;text-align:center;line-height:1.1}
.glazing-mode-options label:has(input:checked)::after{content:'✓';border-color:#076e6c;background:#076e6c;color:white;font-weight:800}
.glazing-mode-options input{position:absolute;opacity:0;width:1px;height:1px}
.glazing-mode-options small{display:block;color:#566260;font-size:.81rem}
.glazing-diagram{margin:.85rem 0}
.glazing-stack,.glazing-unit-visual{display:flex;align-items:center;justify-content:center;gap:.45rem;flex-wrap:wrap;font-size:.87rem;font-weight:650}
.glazing-stack>span,.glazing-unit-visual>span{padding:.5rem;border-radius:.35rem}
.glazing-stack .glass-slice{background:#eaf4f2;border:2px solid #076e6c}
.glazing-stack .gas-slice{background:white;border:2px dashed #77928a}
.glazing-unit-visual>span{background:#eaf4f2}
.glazing-sequence{display:flex;gap:.8rem;align-items:stretch;flex-wrap:wrap}
.glazing-sequence .glazing-pane{flex:0 1 11rem}
.glazing-sequence .glazing-gap{flex:1 1 21rem}
.glazing-gap .stage-fields{margin:.75rem 0}
.gas-mixture{margin-top:.75rem}
.gas-mixture>p{grid-column:1/-1;margin:.2rem 0}
.glazing-orientation{margin-top:1rem}
@media(max-width:760px){.glazing-mode-options,.step-schematic-sides{grid-template-columns:1fr}.glazing-sequence{display:grid;grid-template-columns:1fr}.glazing-stack{justify-content:flex-start}}
.opening-size-fields{min-width:0;border:1px solid #d9e1de;border-radius:.55rem;padding:1rem;background:#f4f8f6}
.opening-size-fields legend{font-weight:700;padding:0 .25rem}
.opening-size-fields p{font-size:.85rem;color:#566260;margin:.1rem 0 .7rem}
.opening-size-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.opening-size-inputs label{min-width:0}
.opening-diagram-stack{display:grid;align-content:start;gap:1rem;min-width:0}
.opening-preview{min-width:0;text-align:center}
.opening-preview svg{display:block;width:min(100%,320px);height:auto;margin:.5rem auto 0;color:#212427}
.opening-preview svg text,.step-schematic svg text{font-family:system-ui,sans-serif;font-size:11px;fill:currentColor}
.opening-preview figcaption{display:block;text-align:left;margin:0}
.opening-diagram-stack .stage-diagram{margin:0}
@media(max-width:480px){.opening-size-inputs{grid-template-columns:1fr}}
