.qlm-estimate {
  box-sizing: border-box;
  width: min(35rem, calc(100% - 2rem));
  max-width: none;
  max-height: min(90dvh, 58rem);
  padding: 0;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: .65rem;
  color: var(--pine);
  background: var(--cream);
  box-shadow: 0 1.5rem 6rem #102a1f40;
  overflow: auto;
  overscroll-behavior: contain;
  font-family: var(--sans);
  line-height: 1.45;
}
.qlm-estimate::backdrop { background: rgb(11 26 15 / 65%); }
.qlm-estimate [hidden] { display: none !important; }
.qlm-estimate *, .qlm-estimate *::before, .qlm-estimate *::after { box-sizing: border-box; }
.qlm-estimate .qe-shell { position: relative; padding: clamp(1.35rem, 4vw, 2.2rem); }
.qlm-estimate .qe-head { display: flex; justify-content: space-between; align-items: start; gap: .55rem; }
.qlm-estimate h2 { min-width: 0; margin: .15rem 0 .5rem; color: var(--pine); text-align:left; font: bold clamp(1.8rem, 5vw, 2.45rem)/1.08 var(--serif); letter-spacing: -.045em; }
.qlm-estimate h2:focus { outline: none; }
.qlm-estimate .qe-close { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: var(--white); color: var(--pine); font: 1.65rem/1 Arial,sans-serif; cursor: pointer; }
.qlm-estimate .qe-intro { margin: 0 0 1.4rem; color: var(--muted); font-size: 1rem; }
.qlm-estimate .qe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .95rem 1.05rem; }
.qlm-estimate .qe-wide { grid-column: 1/-1; }
.qlm-estimate label { display: block; min-width: 0; color: var(--pine); font-size: .93rem; font-weight: 600; text-align: left; }
.qlm-estimate .qe-optional { color: var(--muted); font-size: .87rem; font-weight: 400; }
.qlm-estimate input, .qlm-estimate select, .qlm-estimate textarea { display: block; width: 100%; max-width: 100%; margin: .35rem 0 0; padding: .72rem .83rem; border: 1px solid #adbca8; border-radius: .45rem; color: var(--pine); background: #fff; font: 400 1rem/1.4 var(--sans); }
.qlm-estimate select { appearance:none; padding-right:2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%23395138' stroke-linecap='round' stroke-width='1.6' d='m3 5 4 4 4-4'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right .85rem center; }
.qlm-estimate textarea { resize: vertical; min-height: 4.8rem; }
.qlm-estimate .qe-message { min-height: 9rem; }
.qlm-estimate :is(a,button,input,textarea,select):focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }
.qlm-estimate .qe-primary, .qlm-estimate .qe-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; margin: 0; padding: .72rem 1.35rem; border: 1px solid var(--garden); border-radius: .5rem; text-decoration: none; text-align: center; font: 600 1rem/1.25 var(--sans); cursor: pointer; }
.qlm-estimate .qe-primary { color: var(--white); background: var(--garden); }
.qlm-estimate .qe-primary:hover { background: var(--pine); }
.qlm-estimate .qe-secondary { color: var(--pine); background: transparent; }
.qlm-estimate .qe-secondary:hover, .qlm-estimate .qe-close:hover { background: var(--white); }
.qlm-estimate .qe-form > .qe-primary { width: 100%; margin-top: 1.2rem; }
.qlm-estimate .qe-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.qlm-estimate .qe-actions > * { flex: 1 0 auto; }
.qlm-estimate .qe-tools { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.qlm-estimate :is(.qe-back,.qe-copy) { min-height: 2.75rem; cursor: pointer; padding: .6rem 0; border: 0; background: none; color: var(--pine); font: 600 .95rem/1.3 var(--sans); text-decoration: underline; text-underline-offset: .2rem; }
.qlm-estimate .qe-status { margin: 0; color: var(--pine); font-size: .9rem; }
.qlm-estimate .qe-foot { border-top: 1px solid var(--line); margin: 1.3rem 0 0; padding-top: 1rem; color: var(--muted); text-align:center; font-size:.94rem; }
.qlm-estimate .qe-foot a { display: inline-block; max-width: 100%; min-height: 2.75rem; padding-block: .7rem; vertical-align: middle; color: var(--garden); font-weight: 650; text-decoration: underline; text-underline-offset: .17em; }
@media (max-width: 29rem) {
  .qlm-estimate .qe-shell { padding: 1.35rem 1.05rem; }
  .qlm-estimate .qe-grid { grid-template-columns: 1fr; gap: .7rem; }
  .qlm-estimate .qe-actions > * { flex-basis: 100%; }
}

.qlm-estimate .qe-foot-email a { overflow-wrap: anywhere; }
.qlm-estimate .qe-review:not([hidden]) + .qe-foot .qe-foot-email { display: none; }

@media (max-width: 29rem), (pointer: coarse) and (max-height: 35rem) {
  .qlm-estimate {
    --qe-safe-top: max(.5rem, env(safe-area-inset-top, 0px));
    --qe-safe-bottom: max(.5rem, env(safe-area-inset-bottom, 0px));
    top: calc(var(--qe-viewport-top, 0px) + var(--qe-safe-top));
    bottom: auto;
    margin: 0 auto;
    width: calc(100% - 1rem);
    max-height: calc(var(--qe-viewport-height, 100dvh) - var(--qe-safe-top) - var(--qe-safe-bottom));
    scroll-padding-block: 5rem 1rem;
  }
  .qlm-estimate .qe-head {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: -1.35rem -1.05rem .75rem;
    padding: .8rem .85rem .45rem 1.05rem;
    align-items: center;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
  }
  .qlm-estimate .qe-head h2 { margin: 0; }
  .qlm-estimate :is(input,textarea,select) { scroll-margin-block: 1rem; }
}

#calculator { background:#fcf1dd; scroll-margin-top:6rem }
.calc-layout { display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:clamp(1rem,5vw,5rem);align-items:start;margin-top:2rem }
#price-form label {display:grid;gap:.35rem;font-weight:650}
#price-form input:not([type=checkbox]),#price-form select {width:100%;min-height:46px;padding:.55rem .75rem;border:1px solid #7d907c;border-radius:5px;background:white;color:#123c2b;font:inherit;font-size:16px}
#price-form fieldset {min-width:0;border:0;margin:1.2rem 0 0;padding:0}
#price-form legend {font-size:1.15rem;font-weight:bold;margin-bottom:.6rem}
#price-form p,.calc-result p {margin:.7rem 0;line-height:1.5}
#price-form .check {display:flex;align-items:center;min-height:44px;gap:.65rem}
#price-form input[type=checkbox] {width:19px;height:19px;accent-color:#197021}
.bush-row {display:grid;grid-template-columns:1fr 1fr;gap:.45rem 1rem;border-top:1px solid #cfc9b8;padding:.75rem 0}
.bush-row strong {grid-column:1/-1}
.calc-result {background:#fffaf2;border:1px solid #cfc9b8;border-radius:12px;padding:clamp(1rem,3vw,2.5rem)}
#price-result {display:block;font:bold clamp(1.5rem,3vw,2.5rem) Georgia,serif;color:#123c2b}
#price-lines,.qe-quote {white-space:pre-line}
#send-price:disabled {opacity:.55;cursor:default}
@media(max-width:720px){.calc-layout{grid-template-columns:1fr}}
