.firewood-calculator{--fw-ink:#203d32;--fw-muted:#56665c;--fw-line:#d5dcd2;--fw-paper:#f4f4ed;color:var(--fw-ink);scroll-margin-top:100px;width:100%;min-width:0}
.firewood-calculator[hidden]{display:none!important}
.firewood-heading{display:flex;justify-content:space-between;align-items:end;gap:32px;margin:30px 0}
.firewood-heading h2{font-size:clamp(32px,4vw,55px);line-height:1.06;letter-spacing:-.045em;margin:14px 0 0;font-weight:500}
.firewood-heading h2 em{font-family:Georgia,serif;font-weight:400}
.firewood-heading>p{max-width:350px;color:var(--fw-muted);font-size:15px;line-height:1.65;margin:0}
.fw-batch-bar{display:grid;grid-template-columns:1fr 1.4fr auto;align-items:end;gap:16px;padding:22px;background:var(--fw-paper);border:1px solid var(--fw-line);border-radius:14px;margin-bottom:22px}
.firewood-calculator label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;line-height:1.45;min-width:0}
.firewood-calculator :is(input:not([type=checkbox]),select,textarea){width:100%;box-sizing:border-box;border:1px solid #b8c2b8;background:#fff;color:var(--fw-ink);border-radius:7px;min-height:48px;padding:12px 13px;font:inherit;font-size:15px;font-weight:400}
.firewood-calculator textarea{resize:vertical}
.firewood-calculator :is(input,select,textarea,button,a,summary):focus-visible{outline:3px solid #795b28;outline-offset:3px}
.firewood-calculator .button{border:1px solid #a9b8ad;border-radius:7px;min-height:48px;padding:12px 18px;background:#fff;color:var(--fw-ink);display:inline-flex;justify-content:center;align-items:center;gap:14px;font:inherit;font-size:13px;font-weight:650;cursor:pointer;line-height:1.4;text-decoration:none}
.firewood-calculator .button.primary{background:var(--fw-ink);border-color:var(--fw-ink);color:#fff}
.firewood-calculator .button:hover:not(:disabled){background:#eaf0e8}
.firewood-calculator .button.primary:hover:not(:disabled){background:#315342;color:#fff}
.firewood-calculator .button:disabled{opacity:.48;cursor:not-allowed}
.fw-workbench{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(265px,1fr);gap:22px;align-items:start}
.fw-form{padding:28px;border:1px solid var(--fw-line);border-radius:14px;background:#fff;min-width:0}
.fw-step{display:flex;align-items:center;gap:12px;margin:0 0 20px}
.fw-step:not(:first-child){margin-top:30px;padding-top:26px;border-top:1px solid var(--fw-line)}
.fw-step>span{font:12px monospace;color:var(--fw-muted);border:1px solid var(--fw-line);border-radius:50%;width:32px;height:32px;display:grid;place-items:center;flex-shrink:0}
.fw-step h3{font-size:21px;font-weight:500;line-height:1.2;margin:0;letter-spacing:-.03em}
.fw-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.fw-wide{grid-column:1/-1}
.fw-help{font-size:12px;line-height:1.65;color:var(--fw-muted);margin:14px 0}
.fw-checks{display:grid;gap:12px;margin:22px 0}
.fw-checks label{flex-direction:row;align-items:start;gap:12px;font-size:13px;font-weight:400;cursor:pointer;padding:7px 0}
.fw-checks label[hidden]{display:none}
.fw-checks input{width:21px;height:21px;margin:0;flex-shrink:0;accent-color:var(--fw-ink)}
.fw-add{width:100%}
.fw-result{position:sticky;top:105px;background:#eaf0e8;border-radius:14px;padding:28px;border:1px solid #d0daca;min-width:0}
.fw-result>.eyebrow{font-size:10px;letter-spacing:.12em}
.fw-stack-diagram{width:100%;height:auto;max-height:240px;display:block;margin:15px 0 25px}
.fw-preview-metric{padding:18px 0;border-top:1px solid #bfcdbc}
.fw-preview-metric>span,.fw-totals span{display:block;font-size:12px;font-weight:600;line-height:1.4}
.fw-preview-metric strong{display:block;font-size:clamp(28px,3vw,40px);letter-spacing:-.04em;line-height:1.25;margin:6px 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.fw-preview-metric small{display:block;font-size:12px;line-height:1.5;color:var(--fw-muted)}
.fw-formula{font-size:12px;line-height:1.6;border-top:1px solid #bfcdbc;padding-top:15px;font-variant-numeric:tabular-nums}
.fw-ledger{margin:25px 0;background:#fff;border:1px solid var(--fw-line);border-radius:14px;padding:28px;min-width:0}
.fw-ledger-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin-bottom:18px}
.fw-ledger-head h3{margin:0;font-size:22px;font-weight:500;letter-spacing:-.03em}
.fw-ledger-head>span{font:12px monospace;color:var(--fw-muted)}
.fw-empty{padding:32px 22px;background:var(--fw-paper);font-size:14px;line-height:1.7;border-radius:8px;color:var(--fw-muted)}
.fw-table-scroll{overflow:auto;max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.fw-table-scroll table{border-collapse:collapse;width:100%;min-width:820px;font-size:12px;line-height:1.5;text-align:left}
.fw-table-scroll th{font-size:11px;background:var(--fw-paper);font-weight:600;padding:14px 12px;border-bottom:1px solid var(--fw-line)}
.fw-table-scroll td{padding:16px 12px;border-bottom:1px solid var(--fw-line);vertical-align:top;font-variant-numeric:tabular-nums;max-width:230px;overflow-wrap:anywhere}
.fw-table-scroll td small{display:block;color:var(--fw-muted);margin-top:5px}
.fw-table-scroll button{background:transparent;border:1px solid var(--fw-line);border-radius:6px;padding:10px;min-height:44px;min-width:44px;cursor:pointer;color:var(--fw-ink);font-size:13px}
.fw-totals{background:var(--fw-ink);color:#fff;padding:24px 28px;display:grid;grid-template-columns:1fr 1fr;gap:20px;border-radius:8px;margin:24px 0}
.fw-totals strong{display:block;font-size:clamp(24px,3vw,34px);font-weight:500;letter-spacing:-.025em;margin-top:7px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.fw-actions{display:flex;gap:10px;flex-wrap:wrap}
#fw-status{font-size:13px;line-height:1.6;color:#2c5340;overflow-wrap:anywhere}
#fw-status.error,#fw-entry-status.error{color:#973c2c}
.fw-reference{border-top:1px solid var(--fw-line);padding-top:28px;margin-top:35px}
.fw-reference h3{font-size:26px;letter-spacing:-.03em;font-weight:500;margin:12px 0 24px}
.fw-reference details{border-top:1px solid var(--fw-line);padding:0 3px}
.fw-reference summary{font-size:15px;font-weight:600;padding:21px 4px;cursor:pointer;line-height:1.45}
.fw-reference details p{font-size:14px;line-height:1.75;color:var(--fw-muted);max-width:900px;margin:0 0 20px}
.fw-source-links{display:flex;gap:10px 25px;flex-wrap:wrap;margin-top:20px}
.fw-source-links a{color:var(--fw-ink);text-decoration:underline;text-underline-offset:4px;font-size:12px;padding:10px 0;line-height:1.5}
@media(max-width:1000px){.fw-workbench{grid-template-columns:minmax(0,1fr) 290px;gap:16px}.fw-form,.fw-result,.fw-ledger{padding:22px}.fw-batch-bar{grid-template-columns:1fr 1fr}.fw-batch-bar>.button{grid-column:1/-1;justify-self:start}.fw-fields{gap:14px}}
@media(max-width:760px){.firewood-heading{align-items:start;flex-direction:column;gap:18px}.firewood-heading>p{max-width:100%}.fw-workbench{grid-template-columns:1fr}.fw-result{position:static;display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.fw-result>.eyebrow,.fw-result>.fw-help,.fw-formula{grid-column:1/-1}.fw-stack-diagram{grid-column:1/-1;max-height:180px;margin-bottom:10px}.fw-preview-metric strong{font-size:28px}.fw-result .fw-help{margin-bottom:0}}
@media(max-width:480px){.fw-batch-bar,.fw-fields{grid-template-columns:1fr}.fw-batch-bar{padding:17px}.fw-batch-bar>.button{width:100%;justify-self:stretch}.fw-form,.fw-result,.fw-ledger{padding:18px}.fw-ledger-head{align-items:start;flex-direction:column;gap:7px}.fw-totals{padding:20px;grid-template-columns:1fr;gap:20px}.fw-actions>.button{width:100%}.fw-preview-metric strong{font-size:24px}.firewood-heading h2{font-size:35px}.fw-reference summary{font-size:14px}}
@media(prefers-reduced-motion:reduce){.firewood-calculator *{scroll-behavior:auto!important;transition:none!important}}
.legacy-archive{margin-top:24px;padding:24px;border:1px solid #c9cabb;border-radius:16px;background:#f3f2e9;color:#20382d}.legacy-archive>p{max-width:76ch;line-height:1.6;color:#4d5c50}.legacy-archive h3,.legacy-archive h4{margin:0 0 10px;font-family:inherit}.legacy-records{display:grid;gap:12px;margin-top:20px}.legacy-record{padding:18px;background:#fffdf6;border:1px solid #dedfd2;border-radius:12px;overflow-wrap:anywhere}.legacy-record p{margin:0 0 12px;color:#4d5c50;font-size:14px}.legacy-record .button{min-height:44px;white-space:normal}.legacy-archive[hidden]{display:none}
@media(max-width:480px){.legacy-archive{padding:16px}.legacy-record{padding:14px}.legacy-record .fw-actions{display:grid}.legacy-record .button{width:100%}}
.fw-table-scroll{position:relative;max-width:100%}
.firewood-calculator .fw-batch-details{border:1px solid #d7ded5;border-radius:14px;margin-bottom:14px;background:#fff;overflow:hidden}
.firewood-calculator .fw-batch-details>summary{display:flex;align-items:center;gap:12px;min-height:52px;padding:12px 16px;cursor:pointer;list-style:none;font-size:12px}
.firewood-calculator .fw-batch-details>summary strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.firewood-calculator .fw-batch-details>summary::-webkit-details-marker{display:none}
.firewood-calculator .fw-batch-details .fw-batch-bar{border:0;margin:0;padding:8px 16px 16px}
.firewood-calculator .fw-field-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:12px;font-size:12px;font-variant-numeric:tabular-nums}
.firewood-calculator .fw-field-actions .button{min-height:44px;padding:10px 14px;font-size:12px}
