@scope (.ea-estimator) {

/* Layout: inputs on the left, a sticky estimate-and-booking card on the right; one column on phones with the card below. */
:scope{
  --bg:#FAF9F5; --surface:#ECEEE6; --ink:#243028; --muted:#3E4B40;
  --sage:#6F8060; --sage-text:#566548; --line:#D9DDD3; --btn-bg:#243028; --btn-fg:#FAF9F5;
  --focus:#6F8060; --panel:#FFFFFF;
  --font-display:'Newsreader',Georgia,serif; --font-body:'Manrope',system-ui,sans-serif;
}
@media (prefers-color-scheme:dark){:scope:not([data-theme="light"]){
  --bg:#1B241E; --surface:#243028; --ink:#FAF9F5; --muted:#B9C4A8;
  --sage:#889575; --sage-text:#B9C4A8; --line:#34423A; --btn-bg:#FAF9F5; --btn-fg:#243028;
  --focus:#B9C4A8; --panel:#202B24; color-scheme:dark;}}
:scope[data-theme="dark"]{
  --bg:#1B241E; --surface:#243028; --ink:#FAF9F5; --muted:#B9C4A8;
  --sage:#889575; --sage-text:#B9C4A8; --line:#34423A; --btn-bg:#FAF9F5; --btn-fg:#243028;
  --focus:#B9C4A8; --panel:#202B24; color-scheme:dark;}
*{box-sizing:border-box}
:scope{background:var(--bg);color:var(--ink);font-family:var(--font-body);font-size:16px;line-height:1.5;
  padding-block:32px 48px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.estimate-wrap{max-width:1000px;margin:0 auto;display:flex;flex-direction:column;gap:28px}
header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:12px;font-family:var(--font-display);font-weight:500;font-size:26px;letter-spacing:-.3px}
.brand svg{width:34px;height:34px}
.lang{display:flex;border:1px solid var(--line);border-radius:999px;padding:3px;background:var(--panel)}
.lang button{font:600 13px var(--font-body);letter-spacing:.08em;border:0;background:none;color:var(--muted);padding:6px 14px;border-radius:999px;cursor:pointer}
.lang button[aria-pressed="true"]{background:var(--btn-bg);color:var(--btn-fg)}
h1{font-family:var(--font-display);font-weight:500;font-size:clamp(30px,5vw,46px);line-height:1.1;margin:0;text-wrap:balance;letter-spacing:-.5px}
.lede{color:var(--muted);max-width:60ch;margin:10px 0 0}
.grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:32px;align-items:start}
@media(max-width:820px){.grid{grid-template-columns:minmax(0,1fr)}}
form{display:flex;flex-direction:column;gap:26px}
fieldset{border:0;padding:0;margin:0;min-width:0}
legend,.lab{font-size:13px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--sage-text);padding:0;margin-bottom:10px}
.opts{display:flex;flex-wrap:wrap;gap:8px}
.chip{font:600 14px var(--font-body);padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);cursor:pointer}
.chip small{color:var(--muted);font-weight:400;margin-left:4px}
.chip:hover{border-color:var(--sage)}
.chip:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.opt input{position:absolute;opacity:0;pointer-events:none}
.opt span{display:inline-block;padding:10px 16px;border:1px solid var(--line);border-radius:10px;background:var(--panel);cursor:pointer;font-weight:600;font-size:15px}
.opt input:checked+span{background:var(--btn-bg);color:var(--btn-fg);border-color:var(--btn-bg)}
.opt input:focus-visible+span,button:focus-visible,a.cta:focus-visible,.num input:focus-visible,input[type=range]:focus-visible,.check input:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.size{display:flex;flex-direction:column;gap:12px}
.row2{display:flex;gap:24px;flex-wrap:wrap}
.num{display:flex;align-items:center;gap:8px}
.num input{width:110px;font:600 18px var(--font-body);padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);font-variant-numeric:tabular-nums}
.num small{color:var(--muted)}
input[type=range]{width:100%;accent-color:var(--sage)}
.checks{display:flex;flex-direction:column;gap:8px}
.check{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--panel);cursor:pointer}
.check input{margin-top:4px;accent-color:var(--sage);width:18px;height:18px;flex:none}
.check b{display:block;font-size:15px}
.check small{color:var(--muted);font-size:13px}
.result{position:sticky;top:16px;background:var(--surface);border-radius:16px;padding:28px;display:flex;flex-direction:column;gap:18px}
@media(max-width:820px){.result{position:static}}
.kicker{font-size:13px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--sage-text)}
.big{font-family:var(--font-display);font-weight:500;font-size:clamp(34px,7vw,52px);line-height:1.05;letter-spacing:-1px;font-variant-numeric:tabular-nums}
.big small{display:block;font-family:var(--font-body);font-size:15px;letter-spacing:0;color:var(--muted);font-weight:400;margin-top:6px}
dl{margin:0;display:flex;flex-direction:column}
dl div{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-top:1px solid var(--line)}
dt{color:var(--muted)}dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;text-align:right}
.book{display:flex;flex-direction:column;gap:12px;padding-top:6px;border-top:1px solid var(--line)}
.book h2{font-family:var(--font-display);font-weight:500;font-size:24px;line-height:1.15;margin:12px 0 0}
.cta{display:block;text-align:center;background:var(--btn-bg);color:var(--btn-fg);font-weight:700;font-size:17px;text-decoration:none;padding:16px 22px;border-radius:12px}
.cta:hover{opacity:.9}
.tick{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--muted)}
.tick li{display:flex;gap:10px}
.tick li::before{content:"";flex:none;width:7px;height:7px;margin-top:8px;border-radius:50%;background:var(--sage)}
.incl{font-size:14px;color:var(--muted);margin:0}
.incl b{color:var(--ink)}
.fine{font-size:13px;color:var(--muted);margin:0}
details.refine{border:1px solid var(--line);border-radius:12px;background:var(--panel)}
details.refine summary{cursor:pointer;padding:14px 16px;font-weight:700;display:flex;flex-direction:column;gap:2px;list-style:none}
details.refine summary::-webkit-details-marker{display:none}
details.refine summary::after{content:"+";position:absolute;right:16px;top:14px;font-size:20px;line-height:1}
details.refine{position:relative}
details.refine[open] summary::after{content:"\2212"}
details.refine summary small{font-weight:400;color:var(--muted);font-size:13px}
details.refine summary:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:12px}
.refine-:scope{display:flex;flex-direction:column;gap:26px;padding:6px 16px 18px}
.call{text-align:center;font-size:14px;color:var(--muted);margin:0}
.call b{color:var(--ink);font-variant-numeric:tabular-nums}
.bar{position:fixed;left:0;right:0;bottom:0;z-index:20;display:none;gap:12px;align-items:center;justify-content:space-between;background:var(--bg);border-top:1px solid var(--line);
  padding:10px max(16px,env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
.bar-price{font-family:var(--font-display);font-size:22px;font-weight:500;line-height:1.1;font-variant-numeric:tabular-nums;min-width:0}
.bar-price small{display:block;font-family:var(--font-body);font-size:12px;color:var(--muted);font-weight:400}
.bar .cta{font-size:15px;padding:12px 16px;white-space:nowrap}
@media(max-width:820px){.bar{display:flex}:scope{padding-bottom:100px}}
@media(prefers-reduced-motion:no-preference){.big{transition:opacity .15s}}
.mail{display:flex;flex-direction:column;gap:10px;padding-top:12px;border-top:1px solid var(--line)}
.mail h3{font-family:var(--font-display);font-weight:500;font-size:20px;margin:0}
.mail input[type=email]{font:600 16px var(--font-body);padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink)}
.mail input[type=email]:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.mail button.cta{border:0;cursor:pointer;font-family:var(--font-body)}
.mail a{color:var(--sage-text)}

:scope .check { width:auto; height:auto; margin-bottom:0; }
:scope input[type=checkbox],:scope input[type=radio]{min-height:0;padding:0;}
:scope .bar[hidden]{display:none;}

}

.ea-estimator .opt input {
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  clip-path: inset(50%);
}

@scope (.ea-estimator) {
  #types,#freqs { min-block-size: 94px; }
  #chips { min-block-size: 40px; }
  .big { min-block-size: 4.8rem; }
  #k + #estimate-price { margin-top: 8px; }
  #incl { min-block-size: 3.6rem; }
  .promise { font-weight: 700; margin: 8px 0 0; }
  .call a,.bar-call { color: var(--ink); font-weight: 700; text-decoration: underline; }
  .bar-call { display: flex; align-items: center; min-height: 44px; white-space: nowrap; font-size: 14px; }
  .email-option summary { color: var(--sage-text); cursor: pointer; font-weight: 650; }
  .email-option .mail { margin-top: 10px; }
  .mail button.cta { background: transparent; color: var(--ink); border: 1px solid var(--sage); }
  .refine-body { display: flex; flex-direction: column; gap: 26px; padding: 6px 16px 18px; }
  @media(max-width:820px) {
    .bar { gap: 8px; }
    .bar .cta { flex: 1; min-height: 44px; padding: 8px; white-space: normal; font-size: 14px; display: grid; place-items: center; }
    #chips { min-block-size: 88px; }
  }
}

@scope (.ea-estimator) {
  .estimator-offer { font-size: 14px; line-height: 1.45; }
  .estimator-offer p { margin: 0 0 4px; }
  .estimator-offer small { display: block; font-size: 12px; color: var(--muted); }
}

@scope (.ea-estimator) {
  .task-row { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
  .task-row .check { min-height: 44px; border: 0; background: transparent; }
  .task-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 180ms ease; }
  .task-expanded .task-panel { grid-template-rows: 1fr; }
  .task-panel-clip { min-height: 0; overflow: hidden; }
  .task-panel-body { padding: 4px 14px 14px; }
  .task-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .task-chips[hidden] { display: none; }
  .task-chip { min-height: 44px; padding: 8px 12px; }
  .task-chip[aria-pressed=true] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
  @media (prefers-reduced-motion: reduce) { .task-panel { transition: none; } }
}

@scope (.ea-estimator) {
  .estimator-request { scroll-margin-top: 100px; }
  .estimator-request fieldset { display: grid; gap: 6px; }
  .estimator-request label { font-weight: 650; font-size: 14px; }
  .estimator-request input:not([type=checkbox]) {
    width: 100%; min-height: 44px; padding: 8px 10px; font: inherit;
    color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  }
  .estimator-request input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .estimator-request [aria-invalid=true] { border-color: currentColor; }
  .estimator-request .request-error { font-size: 13px; margin: 0; }
  .estimator-request .request-error:empty { display: none; }
  .estimator-request [hidden] { display: none; }
  .estimator-request .request-copy { font-size: 13px; margin-block: 4px; }
  .request-copy a { display: inline-block; margin-top: 4px; color: var(--sage-text); text-decoration: underline; }
  .estimator-request button.cta { border: 0; cursor: pointer; }
  .estimator-request .estimator-offer { margin-top: 4px; }
  .request-trap { position: absolute; left: -9999px; }
}

@scope (.ea-estimator) {
  .schedule-chip { min-height: 44px; }
  .schedule-chip[aria-pressed=true] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
  .frequency-review { grid-column: 1 / -1; overflow-x: auto; }
  .frequency-review table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .frequency-review th, .frequency-review td { padding: 8px; border-bottom: 1px solid var(--line); text-align: start; }
}

@scope (.ea-estimator) {
  .estimate-scope summary {
    width: fit-content; cursor: pointer; color: var(--sage-text); font-size: 14px;
    font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  }
  .estimate-scope > div { display: grid; gap: 12px; padding-top: 10px; }
  .estimate-scope h3 { margin: 0 0 3px; font: 700 14px var(--font-body); }
  .estimate-scope p, .estimate-scope ul { margin: 0; font-size: 14px; color: var(--muted); }
  .estimate-scope ul { padding-inline-start: 20px; }
}

@scope (.ea-estimator) {
  #interior-glass .opt { min-height: 44px; white-space: normal; }
}
