:root {
  --bg: #f5f2ec; --card: #fff; --ink: #24221f; --muted: #6e675e; --line: #e3ddd2; --soft: #efe9df;
  --accent: #b23a2a; --accent-dark: #8f2c1f; --green: #2f6b4f; --dark: #2b2a28;
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --top: 62px; --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }

/* header */
.top { position: sticky; top: 0; z-index: 50; height: var(--top); display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  background: var(--dark); color: #f6f1e7; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 21px; letter-spacing: .2px; }
.brand svg { width: 34px; height: 28px; color: #e9a03b; }
.brand b { font-weight: 800; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a { color: #e9e2d4; text-decoration: none; font-size: 15px; font-weight: 600; }
.top nav a:hover { color: #fff; }
.top nav .fb { display: inline-flex; align-items: center; gap: 7px; background: #1877f2; color: #fff; padding: 7px 12px; border-radius: 999px; }
.top nav .callbtn { border: 1.5px solid #e9a03b; background: none; color: #f6e2bd; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14.5px; }
.top nav .callbtn:hover { background: #e9a03b; color: #2b2a28; }
.top nav .fb svg { width: 17px; height: 17px; }

/* builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 440px; min-height: calc(100vh - var(--top)); }
.stage { position: sticky; top: var(--top); height: calc(100vh - var(--top)); background: linear-gradient(#bcd6ea 0%, #e3eef3 55%, #f0ede4 100%); overflow: hidden; }
#view { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.stage-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.stage-top > * { pointer-events: auto; }
.dims { background: rgba(255,255,255,.88); border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: 17px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.seg { display: inline-flex; background: rgba(255,255,255,.9); border-radius: 999px; padding: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--dark); color: #fff; }
.stage-bottom { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.stage-bottom > * { pointer-events: auto; }
.hint { font-size: 13px; color: #4b5560; background: rgba(255,255,255,.7); padding: 4px 10px; border-radius: 999px; transition: opacity .6s; }
.ghost { border: 1px solid var(--line); background: rgba(255,255,255,.9); padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.ghost:hover { border-color: var(--muted); }
.loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); pointer-events: none; transition: opacity .4s; }

.panel { background: var(--card); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.intro { padding: 22px 24px 6px; }
.intro h1 { margin: 0 0 4px; font-size: 30px; line-height: 1.15; letter-spacing: -.3px; }
.intro p { margin: 0; color: var(--muted); }
#steps { padding: 6px 24px 18px; flex: 1; }
.step { border-top: 1px solid var(--line); padding: 16px 0 14px; }
.step:first-child { border-top: 0; }
.step h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; }
.step h3 em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 14px; font-weight: 700; }
.sub { font-size: 14px; font-weight: 700; margin: 12px 0 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 15px; min-width: 52px; text-align: center; transition: border-color .15s, background .15s; }
.chip:hover { border-color: #b9b0a2; }
.chip.on { border-color: var(--dark); background: var(--dark); color: #fff; }
.chip:disabled { opacity: .35; cursor: not-allowed; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card { border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius); padding: 10px 12px; text-align: left; font-size: 14px; font-weight: 700; line-height: 1.3; }
.card small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.card.on { border-color: var(--dark); box-shadow: inset 0 0 0 1px var(--dark); }
.card:disabled { opacity: .4; cursor: not-allowed; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); padding: 0; }
.sw.on { box-shadow: 0 0 0 2.5px var(--dark); }
.sw:hover { transform: scale(1.06); }
.winrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.stepper { display: flex; align-items: center; justify-content: space-between; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 12px; font-size: 14px; font-weight: 600; }
.stepper div { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--soft); font-size: 18px; font-weight: 700; line-height: 1; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper b { min-width: 18px; text-align: center; }
.toggles { display: flex; flex-direction: column; gap: 7px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 14.5px; font-weight: 600; background: #fff; text-align: left; }
.toggle .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #c9c0b2; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; font-size: 14px; }
.toggle.on { border-color: var(--dark); }
.toggle.on .box { background: var(--green); border-color: var(--green); }
.toggle:disabled { opacity: .4; cursor: not-allowed; }

/* price */
.pricecard { position: sticky; bottom: 0; background: #fffdf9; border-top: 1px solid var(--line); padding: 14px 24px 16px; box-shadow: 0 -8px 24px rgba(40,30,20,.06); }
.pc-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pc-label { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pc-price { white-space: nowrap; font-size: 31px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.pc-price small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.pc-price.busy span { opacity: .55; }
.pc-sub { font-size: 13px; color: var(--muted); }
.cta { white-space: nowrap; border: 0; background: var(--accent); color: #fff; font-weight: 800; padding: 13px 15px; border-radius: 10px; font-size: 15px; box-shadow: 0 3px 0 var(--accent-dark); }
.cta:hover { background: #c04532; }
.cta:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--accent-dark); }
.cta:disabled { opacity: .6; cursor: default; }
.cta.wide { width: 100%; margin-top: 6px; }
.pc-more { margin-top: 8px; border: 0; background: none; padding: 2px 0; color: var(--accent); font-weight: 700; font-size: 14px; }
.pc-links { display: flex; justify-content: space-between; gap: 10px; }
.dlg label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: 13.5px; } .dlg label.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.pc-lines { margin-top: 6px; font-size: 13.5px; max-height: 34vh; overflow: auto; }
.pc-lines table { width: 100%; border-collapse: collapse; }
.pc-lines td { padding: 5px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.pc-lines td:last-child { text-align: right; white-space: nowrap; padding-left: 10px; font-weight: 700; }
.pc-lines tr.tot td { border-bottom: 0; font-weight: 800; padding-top: 7px; }
.pc-notes { margin-top: 8px; font-size: 13px; background: #fff4df; border: 1px solid #f0d9a8; border-radius: 8px; padding: 7px 10px; }

/* below the builder */
.how { max-width: 1040px; margin: 0 auto; padding: 56px 24px 40px; }
.how h2 { font-size: 30px; margin: 0 0 18px; }
.how ol { list-style: none; padding: 0; margin: 0 0 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.how li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 60px; position: relative; counter-increment: s; color: var(--muted); }
.how li b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.how li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--dark); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.quality { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; }
.quality h3 { margin: 0 0 8px; }
.quality ul { margin: 0; padding-left: 20px; color: var(--muted); }
.quality li { margin: 3px 0; }
.fbcard { display: inline-flex; align-items: center; gap: 14px; background: #1877f2; color: #fff; text-decoration: none; padding: 14px 20px; border-radius: var(--radius); line-height: 1.35; }
.fbcard svg { width: 34px; height: 34px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 20px 24px 90px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); max-width: 1040px; margin: 0 auto; }
.foot a { color: var(--muted); }

/* quote dialog */
.dlg { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dlg::backdrop { background: rgba(30,25,20,.55); }
.dlg form { padding: 22px 24px 24px; position: relative; }
.dlg h2 { margin: 0 0 6px; font-size: 24px; }
.dlg .x { position: absolute; right: 12px; top: 10px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); }
.q-sum { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.q-price { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.q-price small { font-size: 14px; color: var(--muted); font-weight: 600; }
.dlg label { display: block; font-size: 14px; font-weight: 700; margin: 10px 0 0; }
.dlg input, .dlg select, .dlg textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 500; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; }
.dlg input:focus, .dlg select:focus, .dlg textarea:focus { outline: none; border-color: var(--dark); }
.dlg textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg .row2 .cta, .dlg .row2 .ghost { margin-top: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fine { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.err { color: var(--accent); font-weight: 700; font-size: 14px; margin: 8px 0 0; }

@media (max-width: 920px) {
  .builder { grid-template-columns: 1fr; }
  .stage { position: relative; top: 0; height: 52vh; min-height: 300px; }
  .panel { border-left: 0; }
  .pricecard { position: sticky; bottom: 0; z-index: 20; }
  .how ol { grid-template-columns: 1fr; }
  .top nav a:not(.fb) { display: none; }
  .top nav .callbtn { padding: 5px 10px; font-size: 13.5px; }
}
@media (max-width: 480px) {
  .intro h1 { font-size: 25px; }
  #steps, .intro, .pricecard { padding-left: 16px; padding-right: 16px; }
  .pc-price { font-size: 28px; }
  .cta { padding: 12px 14px; font-size: 14.5px; }
  .winrow { grid-template-columns: 1fr; }
  .top nav .fb span { display: none; }
  .hint { display: none; }
}

/* Eco shed */
.eco { display: block; width: calc(100% - 48px); margin: 14px 24px 4px; text-align: left; border: 2px solid var(--green); background: #f1f7f2; border-radius: var(--radius); padding: 12px 14px; }
.eco:hover { background: #e7f2ea; }
.eco.on { background: var(--green); color: #fff; }
.eco-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; color: #fff; background: var(--green); border-radius: 999px; padding: 3px 9px; }
.eco.on .eco-tag { background: #fff; color: var(--green); }
.eco-main { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-size: 18px; }
.eco-price { font-size: 15px; } .eco-price b { font-size: 20px; }
.eco-blurb { display: block; font-size: 13.5px; margin-top: 3px; opacity: .85; }

/* quote preview */
.dlg.wide { width: min(1040px, calc(100vw - 24px)); }
.q-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
.q-sub { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.q-paper { background: #e9e5de; border-radius: 12px; padding: 16px; max-height: calc(100vh - 110px); overflow: auto; }
.paper { background: #fff; box-shadow: 0 3px 14px rgba(0,0,0,.15); padding: 26px 28px; font-size: 12.5px; line-height: 1.45; color: var(--ink); aspect-ratio: 8.5 / 11; min-height: 100%; height: auto; }
.pp-head { display: flex; justify-content: space-between; border-top: 6px solid var(--dark); padding-top: 12px; }
.pp-brand { font-size: 21px; } .pp-dim { color: var(--muted); font-size: 11.5px; }
.pp-num { text-align: right; display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); } .pp-num b { color: var(--accent); font-size: 14px; }
.pp-k { font-size: 10px; font-weight: 800; letter-spacing: 1.3px; color: var(--accent); text-transform: uppercase; margin-top: 14px; }
.pp-for { margin-top: 4px; }
.pp-img { display: block; width: 100%; max-height: 240px; object-fit: contain; background: #ecf2f4; margin-top: 12px; }
.pp-sum { font-weight: 700; margin: 10px 0 8px; }
.pp-tab, .pp-tot { width: 100%; border-collapse: collapse; }
.pp-tab th { background: var(--dark); color: #fff; text-align: left; font-size: 10.5px; letter-spacing: 1px; padding: 5px 8px; }
.pp-tab th:last-child, .pp-tab td:last-child, .pp-tot td:last-child { text-align: right; white-space: nowrap; }
.pp-tab td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pp-tot { width: 52%; margin: 8px 0 0 auto; } .pp-tot td { padding: 3px 8px; } .pp-tot tr:first-child td, .pp-tot .big td { font-weight: 800; } .pp-tot .big td { font-size: 14px; }
.pp-specs { margin: 4px 0 0; padding-left: 18px; }
.pp-fine { margin-top: 14px; font-size: 10.5px; color: var(--muted); }
.ok { color: var(--green); font-weight: 700; font-size: 14px; margin: 8px 0 0; }
@media (max-width: 820px) {
  .q-grid { grid-template-columns: 1fr; }
  .q-paper { max-height: none; padding: 8px; }
  .paper { aspect-ratio: auto; padding: 16px; font-size: 11.5px; }
}
