:root{--ink:#142e3c;--blue:#075a78;--accent:#efae32;--muted:#586b76;--line:#dce4e8;--paper:#fff}*{box-sizing:border-box}body{margin:0;font:16px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ink);background:#eef2f5}.top{height:78px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;position:sticky;top:0;z-index:5}.sun{font-size:30px;color:#b97800;vertical-align:middle}.version{font-size:12px;color:var(--muted);margin-left:10px}button{font-family:inherit;font-size:14px;font-weight:600;line-height:1.3;border:1px solid #b8cbd4;background:#fff;color:var(--blue);padding:12px 18px;border-radius:7px;cursor:pointer}button:hover{background:#edf5f8}button.primary{background:var(--blue);color:white;border-color:var(--blue)}button:disabled{opacity:.6;cursor:wait}.workspace{display:grid;grid-template-columns:minmax(360px,450px) minmax(0,1fr);max-width:1650px;margin:auto}.editor{background:white;padding:30px 26px;border-right:1px solid var(--line)}.eyebrow{font-size:12px;letter-spacing:2px;font-weight:700;color:#8b5d0b}h1{font-size:29px;line-height:1.15;margin:12px 0}p{margin:10px 0}.intro p,.hint,.privacy{color:var(--muted);font-size:14px}.intro{margin-bottom:30px}details{border-top:1px solid var(--line);padding:17px 0}summary{font-size:14px;color:#8b5d0b;font-weight:700;cursor:pointer}summary span{color:var(--ink);font-size:16px;margin-left:10px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px;padding:20px 0 3px}label{font-size:14px;font-weight:600;display:flex;flex-direction:column;gap:6px;min-width:0}.wide{grid-column:1/-1}input,textarea{width:100%;font-family:inherit;font-size:16px;font-weight:400;line-height:1.5;border:1px solid #c6d3da;border-radius:6px;padding:10px;color:var(--ink);background:#fff}input:focus,textarea:focus{outline:2px solid #0085ab;outline-offset:1px}textarea{resize:vertical;min-height:80px}input[type=file]{font-size:13px}small{font-size:12px;font-weight:400;color:var(--muted)}.textbutton{align-self:flex-start;padding:0;border:0;font-size:12px;text-decoration:underline}.power{padding:12px 14px;background:#eff5f7;display:flex;justify-content:space-between;font-size:14px}#status{font-size:14px;color:var(--muted)}#status.error{color:#b42318}.privacy{border-top:1px solid var(--line);padding-top:20px}.preview{padding:28px;min-width:0}.previewbar{display:flex;justify-content:space-between;max-width:794px;margin:0 auto 20px;font-size:12px;font-weight:600;letter-spacing:1px;color:var(--muted)}.sheet{position:relative;background:white;width:100%;max-width:794px;aspect-ratio:210/297;margin:0 auto 26px;padding:6%;box-shadow:0 5px 22px #132c3d14;overflow:hidden;font-size:clamp(11px,1.1vw,15px);display:flex;flex-direction:column}.sheet h2{font-size:2em;line-height:1.18;margin:18px 0 22px;letter-spacing:-.5px}.sheet h3{font-size:1.12em;margin:0 0 8px}.sheet p{margin:8px 0}.reporthead{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px;border-bottom:3px solid var(--accent);gap:12px}.reporthead img{max-width:120px;max-height:48px;object-fit:contain}.reporthead strong{max-width:65%;overflow-wrap:anywhere}.reporthead span{font-size:.75em;letter-spacing:1px}.footer{margin-top:auto;padding-top:14px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:15px;font-size:.73em;overflow-wrap:anywhere}.footer div{max-width:92%}.cover{background:#123749;color:#fff;justify-content:space-between}.cover .bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.cover .shade{position:absolute;inset:0;background:linear-gradient(180deg,#082a3cd9,#082a3c30 45%,#082a3cf2)}.cover>*:not(.bg):not(.shade){position:relative}.cover .reporthead{border-bottom-color:#ffffff55}.cover .reporthead img{background:white;padding:6px;border-radius:4px}.cover h2{font-size:3.6em;max-width:90%;margin:25px 0}.cover .kw{display:inline-block;border:1px solid #ffffff99;padding:10px 20px;font-size:1.6em}.cover .client{font-size:1.5em;font-weight:650;overflow-wrap:anywhere}.cover .meta{padding-top:20px;font-size:.9em}.cover .footer{margin-top:30px;border-color:#ffffff55}.kicker{letter-spacing:2px;font-size:.8em;font-weight:650}.band{background:#edf4f7;border-left:4px solid var(--accent);padding:16px;margin:12px 0}.metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.metric{background:#edf4f7;padding:16px}.metric strong{display:block;font-size:1.7em;color:var(--blue)}.metric span{font-size:.85em}.chart{width:100%;height:auto;margin-top:12px}.monthly{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin:10px 0}.monthly div{background:#f1f5f7;padding:7px 3px;text-align:center;font-size:.78em}.monthly strong{display:block}.note{font-size:.78em;color:var(--muted)}.empty{padding:35px 18px;background:#f1f5f7;border:1px dashed #bdcbd4;text-align:center;color:var(--muted)}.mapimage{width:100%;height:42%;object-fit:contain;background:#f1f5f7;margin:20px 0}.mapempty{margin:20px 0;height:38%;display:grid;place-content:center}.specs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.specs div{border-top:2px solid var(--accent);padding-top:12px;font-size:.9em}.specs strong{display:block;font-size:1.15em}.equipment{display:grid;grid-template-columns:1fr 1fr;gap:12px}.equipment article{background:#f1f5f7;padding:16px;overflow-wrap:anywhere}.equipment img{height:115px;width:100%;object-fit:contain;margin-bottom:8px}.equipment .noimage{height:60px;display:flex;align-items:center;color:var(--blue);font-size:.75em;letter-spacing:2px;font-weight:700}.equipment p{font-size:.88em}.services{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.services h3{font-size:.95em}.services p{font-size:.8em}.pricebox{display:grid;grid-template-columns:1fr 1.1fr;gap:20px;padding:20px;background:#fff4dc;margin:12px 0}.pricebox h3{font-size:.8em}.pricebox strong{font-size:2.1em;display:block;white-space:nowrap}.pricebox p{font-size:.76em}.conditions{font-size:.73em;color:var(--muted);white-space:pre-line}.wrap{overflow-wrap:anywhere;white-space:pre-line}@media(min-width:1400px){.sheet{padding:46px}}@media(max-width:1000px){.workspace{grid-template-columns:360px minmax(0,1fr)}.preview{padding:15px}.sheet{font-size:10px}.equipment img{height:70px}}@media(max-width:760px){.top{padding:0 16px}.workspace{display:block}.editor{border:0}.preview{padding:18px 10px}.sheet{font-size:clamp(9px,2.15vw,14px);padding:6%}.previewbar{padding:0 10px}.equipment img{height:85px}.sheet h2{margin:12px 0}.pricebox{padding:12px;gap:10px}.services{margin:10px 0;gap:8px}}@page{size:A4;margin:0}@media print{html,body{margin:0;padding:0;background:white;-webkit-print-color-adjust:exact;print-color-adjust:exact}.top,.editor,.previewbar{display:none!important}.workspace,.preview,#report{display:block;margin:0;padding:0;max-width:none}.sheet{width:210mm;height:297mm;max-width:none;aspect-ratio:auto;padding:16mm;margin:0;box-shadow:none;break-after:page;font-size:11pt;overflow:hidden}.sheet:last-child{break-after:auto}.equipment img{height:30mm}.sheet h2{margin:6mm 0}.pricebox{padding:5mm;gap:5mm}.services{margin:5mm 0}.cover h2{font-size:40pt}}

.sheet .equipment,.sheet .services,.sheet .pricebox,.sheet .metrics,.sheet .chart,.sheet .monthly,.sheet .mapimage{flex-shrink:0}

/* v1.2: restrained green energy palette */
:root{--ink:#19382e;--blue:#286547;--accent:#7da785;--muted:#587065}body{background:#eff4f1}.eyebrow,summary{color:#39765b}.sun{font-size:26px}.power,.band,.metric,.equipment article{background:#eff5f0}.cover{background:#173e30}.cover .shade{background:linear-gradient(180deg,#0b302bd9,#0b302b30 45%,#0b302bf2)}.pricebox{background:#eef5e9}.fixed-settings{background:#f3f6f3;border:1px solid #dce7dd;border-radius:6px;padding:14px;font-size:14px}.fixed-settings p{font-size:13px}.has-battery{grid-template-columns:repeat(3,minmax(0,1fr))}.has-battery article{padding:12px}.has-battery h3{font-size:1em}.has-battery img{height:95px}select{width:100%;padding:10px;font:inherit;border:1px solid #b9ccbf;border-radius:6px;background:white;color:var(--ink)}[hidden]{display:none!important}#locationChoice{margin-top:14px}a{color:var(--blue)}@media print{.has-battery img{height:25mm}}
/* v1.3: proposal pages use compact editorial cards, keeping price on page four. */
.sheet img{border-radius:8px}.cover .bg{border-radius:0}.page-function h2,.page-placement h2{font-style:italic;color:#173e30;border-bottom:2px solid #a4bd79;padding-bottom:8px;margin:15px 0 12px}.function-intro{display:grid;grid-template-columns:38% minmax(0,1fr);align-items:center;gap:8px;min-height:148px}.intro-copy{background:#f0f6e8;border-radius:8px;padding:14px;line-height:1.3}.intro-copy strong{font-size:1em}.intro-copy p{font-size:.82em}.energy-flow{width:100%;height:auto;max-height:170px}.night-note{background:#f4f7ef;padding:8px 13px;border-radius:7px;font-size:.83em}.production-section{min-height:0}.production-section>h3{color:#296149;border-bottom:1px solid #c6d8c6;padding-bottom:4px;margin:11px 0 3px}.production-section .metrics{margin:7px 0;gap:8px}.production-section .metric{padding:10px}.production-section .metric strong{font-size:1.35em}.production-section .chart{max-height:185px;margin:2px 0}.production-section .monthly{margin:3px 0;gap:4px}.production-section .monthly div{padding:4px 2px}.page-placement h3{margin:7px 0 8px}.placement-points{display:grid;gap:8px}.placement-points p{margin:0;position:relative;padding-left:19px}.placement-points p:before{content:'→';position:absolute;left:0;color:#39765b}.placement-points strong{color:#214b39}.placement-photo{height:38%;min-height:190px;display:grid;place-items:center;margin:9px 0}.placement-photo .mapimage{height:100%;width:100%;object-fit:contain;margin:0;background:#f3f7f3}.placement-photo .mapempty{height:100%;width:100%;margin:0}.page-placement>.wrap{margin:4px 0}.page-offer .offer-heading{text-align:center;font-size:1.55em;letter-spacing:.02em;border:1px solid #d8c780;border-top:5px solid #b5d19b;padding:9px 7px;margin:14px 0 12px}.offer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:180px 150px;gap:8px}.offer-card{position:relative;background:#f3f6f3;border-radius:8px;padding:10px;text-align:center;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}.offer-card h3{font-size:.83em;margin:4px 0 2px;line-height:1.15}.offer-card p{font-size:.72em;line-height:1.2;margin:2px 0;overflow-wrap:anywhere}.panel-card{grid-column:1;grid-row:1}.inverter-card{grid-column:2;grid-row:1}.electric-card{grid-column:1;grid-row:2;justify-content:center}.labor-card{grid-column:2;grid-row:2;justify-content:center}.monitor-card{grid-column:3;grid-row:1/span 2;justify-content:center}.with-battery .monitor-card{grid-row:1}.battery-card{grid-column:3;grid-row:2}.card-visual{height:85px;width:100%;display:flex;align-items:center;justify-content:center}.card-visual img{height:100%;width:100%;object-fit:contain}.visual-empty{font-size:.74em;color:#688271;border:1px dashed #b8cab9;padding:9px;border-radius:7px}.warranty{position:absolute;top:10px;left:10px;max-width:85px;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;background:#67a348;color:#fff;font-size:.65em;line-height:1.1;padding:8px;overflow-wrap:anywhere;box-shadow:0 2px 7px #183b2622}.warranty + h3{margin-top:5px}.service-icon svg{width:74px;height:74px;fill:none;stroke:#d09235;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.phone-visual svg{width:80px;height:120px;fill:none;stroke:#6e8179;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.with-battery .phone-visual svg{height:74px}.with-battery .battery-card .card-visual{height:66px}.with-battery .offer-grid{}.page-offer .pricebox{margin:9px 0 5px;padding:12px;gap:12px;border-radius:8px}.page-offer .pricebox strong{font-size:1.6em}.page-offer .pricebox p{font-size:.68em;margin:4px 0}.page-offer .conditions{margin:2px 0;font-size:.68em}.page-offer .footer{padding-top:8px}.page-offer .pricebox h3{font-size:.75em}
@media(max-width:1000px){.offer-grid{grid-template-rows:155px 132px}.card-visual{height:68px}.offer-card{padding:6px}.warranty{max-width:55px;font-size:.52em;padding:5px}.service-icon svg{height:54px}.phone-visual svg{height:88px}}
@media(max-width:760px){.function-intro{min-height:90px}.intro-copy{padding:7px}.energy-flow{max-height:100px}.offer-grid{grid-template-rows:clamp(130px,33vw,175px) clamp(120px,30vw,158px);gap:4px}.offer-card{padding:5px}.card-visual{height:clamp(56px,15vw,78px)}.offer-card h3{font-size:.75em}.offer-card p{font-size:.64em}.warranty{max-width:48px;font-size:.5em}.service-icon svg{height:50px}.phone-visual svg{height:75px}.page-offer .pricebox strong{font-size:1.3em}.page-offer .offer-heading{margin:8px 0}}
@media print{.sheet img{border-radius:2mm}.page-function h2,.page-placement h2{margin:4mm 0 3mm}.function-intro{min-height:37mm}.intro-copy{padding:3mm}.energy-flow{max-height:39mm}.production-section .chart{max-height:43mm}.production-section .monthly div{font-size:8pt}.page-placement .placement-photo{height:95mm;min-height:0}.page-offer .offer-heading{margin:3mm 0 3mm;padding:2mm}.offer-grid{grid-template-rows:46mm 37mm;gap:2mm}.offer-card{padding:2mm}.offer-card h3{font-size:9pt}.offer-card p{font-size:7.5pt}.card-visual{height:23mm}.with-battery .battery-card .card-visual{height:16mm}.service-icon svg{height:17mm}.phone-visual svg{height:28mm}.with-battery .phone-visual svg{height:17mm}.warranty{max-width:19mm;max-height:19mm;font-size:6.7pt;padding:2mm}.page-offer .pricebox{margin:3mm 0 1mm;padding:3mm;gap:3mm}.page-offer .pricebox strong{font-size:18pt}.page-offer .conditions{font-size:7pt}}

.header-actions{display:flex;align-items:center;gap:10px}.reset-button{border-color:#b5c9ba;color:#2b6043;background:#f5f8f5}.reset-button:hover{background:#e8f0e9}@media(max-width:540px){.top{height:auto;min-height:78px;gap:8px;padding:12px 14px}.top strong{font-size:14px}.top .version{display:none}.header-actions{gap:6px}.header-actions button{font-size:12px;padding:9px 10px;white-space:nowrap}}@media print{.header-actions{display:none!important}}
