:root{--ink:#18342e;--muted:#64756e;--green:#16775a;--green-bright:#21a77b;--forest:#123c31;--line:#dce7e0;--bg:#f4f7f5;--soft:#f1f6f2;--white:#fff;--danger:#b43f42;--shadow:0 12px 30px rgba(26,60,44,.045)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:15px;-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #42bf99;outline-offset:3px}.page-width{width:min(1200px,calc(100% - 48px));margin-inline:auto}
.sitebar{height:68px;padding:0 max(24px,calc((100% - 1200px)/2));display:flex;justify-content:space-between;align-items:center;background:var(--white)}.brand{text-decoration:none;display:flex;align-items:center;gap:10px;font-size:22px;letter-spacing:-1px;font-weight:800;color:var(--forest)}.brand-light{font-weight:500;color:#73867b}.brand-icon{display:grid;place-items:center;width:34px;height:34px;background:var(--forest);border-radius:10px;color:white;font-size:23px;font-weight:700}.backlink{text-decoration:none;font-size:13px;font-weight:650;color:#49665b;display:flex;align-items:center;gap:9px}.backlink:hover{color:var(--green)}
.hero{background:radial-gradient(circle at 90% 75%,rgba(60,156,110,.2) 0,rgba(60,156,110,.2) 12%,transparent 12.2%),radial-gradient(circle at 93% 12%,rgba(78,160,116,.16) 0,rgba(78,160,116,.16) 18%,transparent 18.2%),linear-gradient(115deg,#123b30,#1d5844);color:white;overflow:hidden}.hero-inner{padding:42px 0 39px}.eyebrow,.kicker{letter-spacing:.14em;font-size:10px;font-weight:800;color:var(--green);text-transform:uppercase}.eyebrow{display:flex;gap:9px;align-items:center;color:#b5dbc5;font-size:11px}.dot{width:7px;height:7px;border-radius:100%;background:#58d7a4}.version{border:1px solid #6aa889;background:#ffffff13;border-radius:20px;padding:3px 8px;letter-spacing:0;color:#ddf8e6;margin-left:4px}.hero h1{font-size:clamp(33px,5vw,52px);letter-spacing:-1.9px;line-height:1.08;margin:15px 0 11px;font-weight:790}.hero h1 em{color:#a7eac8;font-style:normal}.hero p{margin:0;max-width:610px;color:#c8e0d4;line-height:1.6}.hero-pills{display:flex;gap:9px;flex-wrap:wrap;margin-top:20px}.hero-pills span{padding:8px 12px;border:1px solid #ffffff27;background:#ffffff0c;border-radius:7px;font-size:12px;color:#dbf0e4}
main{padding-top:24px}.card{border:1px solid #e5ece7;background:white;border-radius:16px;box-shadow:var(--shadow);padding:25px}.project-card{margin-bottom:20px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:21px}.section-heading.compact{margin-bottom:22px}.section-heading h2{margin:7px 0 0;font-size:21px;letter-spacing:-.55px}.save-state{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:600;text-align:right}.save-dot{width:7px;height:7px;border-radius:50%;background:#bacbc0}.save-state.saved .save-dot{background:#21a77b}.save-state.warning .save-dot{background:#d69134}.project-controls{display:flex;align-items:end;flex-wrap:wrap;gap:9px;margin-bottom:18px}.project-controls .field.grow{flex:1 1 230px}.project-controls .btn{min-height:43px}.field{min-width:0;display:flex;flex-direction:column;gap:7px}.field label{color:#344c40;font-size:12px;font-weight:740}.field input,.field select{width:100%;height:47px;padding:11px 12px;border:1px solid #d3e1d8;border-radius:9px;background:#fff;color:#1b352c;outline:none;transition:border-color .15s,box-shadow .15s;min-width:0}.field select{padding-right:27px}.field input:hover,.field select:hover{border-color:#a7beb1}.field input:focus,.field select:focus{border-color:#32ab7e;box-shadow:0 0 0 3px #32ab7e20}.field input::placeholder{color:#aab9af}.field small{font-size:11px;color:#839288;line-height:1.35}.unit{color:#7c8e83;font-weight:500}.btn{display:inline-flex;align-items:center;justify-content:center;border-radius:9px;min-height:44px;border:1px solid transparent;padding:10px 15px;font-weight:740;font-size:13px;white-space:nowrap;transition:background .15s,transform .1s;text-decoration:none}.btn:active{transform:translateY(1px)}.btn-soft{background:#eaf4ee;color:#146146;border-color:#e2ede6}.btn-soft:hover{background:#d9ede2}.btn-ghost{background:#fff;border-color:#e0e9e3;color:#4d6759}.btn-ghost:hover{background:#f3f8f5}.danger-text{color:var(--danger)}.btn-primary{background:#198362;color:#fff;box-shadow:0 6px 15px #1983622d}.btn-primary:hover{background:#116c50}.btn-secondary{color:#29453b;background:#f4f7f5;border-color:#dfebe2}.btn-dark{background:#183d31;color:white}.btn-dark:hover{background:#2b5743}
.stat-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:12px}.stat{padding:18px 20px;border:1px solid #e0ebe4;border-radius:12px;background:#f9fcfa;display:flex;flex-direction:column;gap:7px}.stat-feature{background:#e8f5ed;border-color:#d3e8d9}.stat span{font-size:10px;font-weight:820;letter-spacing:.12em;color:#59806b}.stat strong{font-size:31px;line-height:1.25;letter-spacing:-.9px;color:#194734;font-variant-numeric:tabular-nums}.stat strong small{font-size:16px;color:#4a8566;font-weight:700}.stat>small{color:#769081;font-size:11px}
.workspace{display:grid;grid-template-columns:minmax(335px,410px) minmax(0,1fr);gap:20px;align-items:start}.form-no,.table-counter{font-size:12px;background:#edf6f0;border:1px solid #dcece2;border-radius:7px;padding:7px 10px;color:#48745c;font-weight:720}.fields-2{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-bottom:18px}#measure-form>.field{margin-bottom:18px}.choice-group{display:grid;grid-template-columns:1fr 1fr;gap:9px}.choice{display:block;position:relative;cursor:pointer}.choice input{position:absolute;inset:0;opacity:0;cursor:pointer}.choice span{display:flex;align-items:center;justify-content:center;padding:13px 8px;border-radius:9px;border:1px solid #d7e5dc;font-weight:750;color:#5b7465;font-size:13px;transition:background .15s,border-color .15s}.choice input:checked+span{background:#e2f3e8;color:#126346;border-color:#65ba91}.choice input:focus-visible+span{outline:3px solid #42bf99;outline-offset:2px}.qty-field input{max-width:140px}.preview{background:#f6faf7;border:1px solid #e1ece4;border-radius:12px;padding:16px;margin:19px 0 16px}.preview-top,.preview-line{display:flex;justify-content:space-between;align-items:center;gap:12px}.preview-top{margin-bottom:16px}.bark-chip{background:#e5f0e7;border-radius:6px;padding:5px 8px;font-size:11px;color:#337552;font-weight:700}.preview-line{padding:6px 0;font-size:12px;color:#668075}.preview-line strong{color:#284a3c;font-size:13px;font-variant-numeric:tabular-nums}.preview-final{border-top:1px solid #d7e9dd;margin-top:10px;padding:14px 0 1px;font-size:13px;font-weight:740;color:#315345}.preview-final strong{font-size:22px;color:#106b4a}.form-error{color:#a72732;font-size:12px;padding:10px;margin-top:9px;background:#fdf0f1;border-radius:7px}.add-btn{width:100%;min-height:51px;font-size:14px}.cancel-edit{width:100%;margin-top:9px}.form-hint{color:#7e9085;font-size:11px;line-height:1.55;margin:12px 0 0}.explain{border-top:1px solid #e8eee9;margin-top:24px;padding-top:16px}.explain+.explain{margin-top:13px}.explain summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:13px;font-weight:730;color:#365a46;line-height:1.5}.explain summary::-webkit-details-marker{display:none}.help-icon{width:23px;height:23px;display:inline-grid;place-items:center;background:#eaf5ee;color:#287b5a;border-radius:50%;font-size:12px;flex-shrink:0}.chevron{margin-left:auto;font-size:20px;font-weight:300}.explain[open] .chevron{transform:rotate(180deg)}.explain-body{font-size:12px;line-height:1.65;color:#526c5e}.explain-body p{margin:13px 0 9px}.explain-body a{color:#147b56}.source{font-size:11px}.help-table{margin-top:10px}.help-table table{font-size:10px}.help-table th,.help-table td{padding:9px 6px}
.measurements{min-height:380px}.empty-state{text-align:center;color:#7c8e84;padding:74px 22px}.empty-symbol{font-size:34px;color:#94b6a1;background:#f2f8f4;border-radius:50%;width:67px;height:67px;margin:0 auto 16px;display:grid;place-items:center}.empty-state strong{display:block;font-size:16px;color:#385648}.empty-state p{font-size:12px;max-width:310px;line-height:1.65;margin:10px auto}.table-wrap{max-width:100%;overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;white-space:nowrap}th{font-size:10px;letter-spacing:.02em;background:#f5f8f5;color:#638075;font-weight:800;padding:12px 10px;border-bottom:1px solid #e2ece6}td{font-size:11.5px;padding:13px 10px;border-bottom:1px solid #edf2ed;color:#3b5c4e;font-variant-numeric:tabular-nums}tbody tr:hover{background:#fafdfa}td b{color:#18543b}.record-muted{display:block;color:#86978c;font-size:10px;padding-top:3px}.row-actions{display:flex;gap:5px}.icon-btn{background:#f2f7f3;border:1px solid #e6eee8;border-radius:7px;min-width:28px;min-height:29px;color:#486d57;font-size:13px;padding:4px}.icon-btn:hover{background:#e1f0e7}.icon-btn.red{color:#b14c4c}.records-footer{border-top:1px solid #e1eee5;padding-top:18px;margin-top:17px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:#678272}.records-footer strong{color:#146f4e;font-size:23px}.mobile-records{display:none}.record-card{border:1px solid #e3eee6;border-radius:11px;padding:13px;margin-bottom:10px;background:#fff}.record-card-head{display:flex;align-items:center;gap:8px;justify-content:space-between}.record-card-head strong{font-size:13px}.record-card-head .row-actions{margin-left:auto}.record-card-meta{font-size:12px;color:#627c6d;margin:8px 0}.record-card-bottom{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #eef2ee;padding-top:10px;font-size:12px;color:#697e73}.record-card-bottom strong{font-size:17px;color:#167452}
.export-card{margin-top:20px}.muted{font-size:13px;line-height:1.6;color:#687c70;margin:0 0 16px}.export-actions{display:flex;flex-wrap:wrap;gap:9px}.small-note{font-size:11px;color:#829185;line-height:1.6;margin:14px 0 0}footer{padding:30px 0 35px;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;color:#849389;font-size:11px}#toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,15px);opacity:0;pointer-events:none;background:#193d2f;color:#fff;border-radius:12px;padding:12px 20px;min-width:230px;text-align:center;font-size:13px;box-shadow:0 10px 25px #174b3052;z-index:100;transition:opacity .2s,transform .2s}#toast.show{opacity:1;transform:translate(-50%,0)}[hidden]{display:none!important}#print-sheet{display:none}
@media(max-width:1000px){.workspace{grid-template-columns:1fr}.editor{max-width:none}.records-table{display:none}.mobile-records{display:block}.measurements{min-height:250px}.empty-state{padding:40px 22px}}
@media(max-width:580px){.page-width{width:calc(100% - 26px)}.sitebar{height:58px;padding:0 15px}.brand{font-size:20px}.hero-inner{padding:29px 0 32px}.hero h1{font-size:36px}.hero-pills{gap:6px}.hero-pills span{font-size:10.5px;padding:6px 7px}.card{padding:17px;border-radius:13px}.section-heading h2{font-size:19px}.project-controls .field.grow{flex-basis:100%}.project-controls .btn{flex:1 1 auto;padding-inline:8px;font-size:12px}.stat{padding:13px 12px}.stat strong{font-size:25px}.stat strong small{font-size:13px}.stat>small{font-size:10px}.stat span{font-size:9px}.workspace{gap:14px}.fields-2{gap:10px}.field input,.field select{font-size:16px}.records-footer strong{font-size:21px}.export-card{margin-top:14px}.export-actions .btn{flex:1 1 calc(50% - 10px);min-width:130px}.export-actions .btn:first-child{flex:1 1 100%}.save-state{font-size:11px}}
@media print{@page{size:A4;margin:14mm 12mm}html,body{background:white!important;color:#111!important;margin:0!important}#app,#toast{display:none!important}#print-sheet{display:block!important;color:#17271e;font-family:Arial,"Segoe UI",sans-serif;font-size:10pt}#print-sheet h1{font-size:20pt;margin:0 0 5px;color:#183f2a}#print-sheet p{margin:5px 0 13px;color:#444}#print-sheet .print-meta{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #ccc;padding:9px 0;margin-bottom:12px;font-size:9pt}#print-sheet table{width:100%;white-space:normal;border-collapse:collapse;table-layout:auto;font-size:8pt}#print-sheet thead{display:table-header-group}#print-sheet th{color:#222;background:#e9f0eb!important;border:1px solid #aaa;font-size:8pt;padding:6px 5px}#print-sheet td{color:#222;border:1px solid #bbb;padding:6px 5px;font-size:8pt}#print-sheet tr{break-inside:avoid}#print-sheet .print-total{margin-top:14px;border-top:2px solid #1a4d35;padding-top:10px;display:flex;justify-content:space-between;font-size:13pt;font-weight:700}#print-sheet .print-notes{font-size:8pt;color:#666;line-height:1.5;margin-top:12px}#print-sheet .print-foot{font-size:8pt;color:#555;margin-top:18px;padding-top:8px;border-top:1px solid #ccc}}

/* V2: ergonomiczny, skrócony formularz wpisywania kolejnych kłód */
.editor .section-heading.compact{margin-bottom:13px}
.editor .fields-2{margin-bottom:12px}
.editor #measure-form>.field{margin-bottom:12px}
.editor .field{gap:5px}
.editor .choice span{padding:10px 7px}
.editor .field input,.editor .field select{height:44px}
.editor .qty-field input{max-width:100%}
.editor .quick-result{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#e9f5ef;border:1px solid #d7eadf;border-radius:10px;padding:10px 12px;margin:8px 0 10px;font-size:12px;color:#315747;font-weight:650}
.editor .quick-result strong{font-size:21px;color:#106b4a;font-variant-numeric:tabular-nums;white-space:nowrap}
.editor .form-error{margin:5px 0 8px}
.editor .form-hint{margin:8px 0 0}
.editor .preview-details{margin-top:14px;border-top:1px solid #e5ede7;padding-top:10px}
.editor .preview-details summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;color:#3a6650;font-size:12px;font-weight:680;list-style:none}
.editor .preview-details summary::-webkit-details-marker{display:none}
.editor .preview-details[open] summary span{transform:rotate(180deg)}
.editor .preview-details .preview{margin:10px 0 0;padding:12px}
.editor .preview-details .preview-top{margin-bottom:8px}
@media(max-width:580px){
 .editor{padding:14px}
 .editor .section-heading h2{font-size:19px}
 .editor .fields-2{gap:9px}
 .editor .field small{font-size:10px}
 .editor .quick-result{padding:8px 10px}
 .editor .quick-result strong{font-size:19px}
 .editor .add-btn{min-height:48px}
 .project-card{padding:14px;margin-bottom:12px}
 .project-card .section-heading{margin-bottom:10px}
 .project-controls{margin-bottom:10px;gap:6px}
 .project-controls .btn{min-height:36px}
}

/* V10 — jeden ergonomiczny formularz, bez przełączania trybów */
.quick-tally{display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px;margin-bottom:12px;border:1px solid #d5eade;border-radius:10px;background:#edf9f2;color:#2d684c;font-weight:750;font-size:14px;font-variant-numeric:tabular-nums}
.quick-tally strong{color:#106b4a;font-size:18px}
.quick-separator{color:#79a58a}
.quick-inline-submit{display:none}
@media(max-width:580px){
  .editor .fields-2{grid-template-columns:minmax(0,.78fr) minmax(0,1fr) 56px;align-items:end;gap:7px;margin-bottom:11px}
  .editor .quick-inline-submit{display:flex;flex-direction:column;gap:0;min-width:0;width:56px;min-height:44px;padding:4px 2px;font-size:10px;line-height:1.15;border-radius:8px}
  .editor .quick-inline-submit span:first-child{font-size:23px;font-weight:700;line-height:1}
  .editor #submit-measure{display:none}
  .editor .fields-2 label{font-size:11px;line-height:1.3;min-height:28px;display:flex;align-items:end}
  .editor .fields-2 input{height:44px;padding:8px;font-size:16px}
  .editor .fields-2 .field small{display:none}
  .editor .quick-result{margin:7px 0 8px}
  .editor .quick-tally{margin-bottom:10px}
}
