/* ==========================================================================
   Better Build - house configurator
   Same type, colours and buttons as the website; the site step is laid out
   like a load-zone map tool: location panel on the left, zones on the map.
   ========================================================================== */

@font-face { font-family: Helveticaneue; src: url('../fonts/HelveticaNeue-Light.otf') format('opentype'); font-weight: 300; font-display: swap; }
@font-face { font-family: Helveticaneue; src: url('../fonts/HelveticaNeue-Roman.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Helveticaneue; src: url('../fonts/HelveticaNeue-Medium.otf') format('opentype'); font-weight: 500; font-display: swap; }

:root {
  --ink: #050f15;
  --ink-2: #0c1b25;
  --ink-3: #152733;
  --ink-line: #1c2e3a;
  --brand: #1988ff;
  --brand-dark: #0d6fd8;
  --brand-tint: #e8f2ff;
  --paper: #ffffff;
  --ground: #f2f4f6;
  --line: #e1e5e9;
  --line-2: #cfd6dc;
  --text-2: #050f15bf;
  --muted: #5b6873;
  --r: 4px;
  --font: Helveticaneue, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.33, 1, .68, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-dark); }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- app shell ---------- */
/* minmax(0,1fr): without it the column grows to the header's full width and the page scrolls sideways on phones */
.cfg { height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; background: var(--ground); }

.cfg-bar {
  display: flex; align-items: center; gap: 28px;
  height: 68px; padding: 0 22px;
  background: var(--ink); color: #fff;
  border-bottom: 1px solid var(--ink-line);
}
.cfg-brand { flex: 0 0 auto; display: block; line-height: 0; }
.cfg-brand img { width: 120px; height: auto; }

.cfg-steps { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cfg-steps::-webkit-scrollbar { display: none; }
.cfg-steps button {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px 0 6px;
  border: 0; border-radius: 2px; background: transparent;
  color: #ffffff8c; font-size: 14px; white-space: nowrap;
  transition: color .2s ease, background-color .2s ease;
}
.cfg-steps button:hover:not(:disabled) { color: #fff; }
.cfg-steps button:disabled { opacity: .4; cursor: not-allowed; }
.cfg-steps .n {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 2px;
  background: var(--ink-3); color: #ffffffa6; font-size: 12px; font-variant-numeric: tabular-nums;
}
.cfg-steps .done { color: #ffffffd9; }
.cfg-steps .done .n { background: #1988ff29; color: #7fbcff; }
.cfg-steps .now { color: #fff; background: var(--ink-3); }
.cfg-steps .now .n { background: var(--brand); color: #fff; }

.cfg-bar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.cfg-barprice { display: none; text-align: right; line-height: 1.15; }
.cfg-barprice span { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff80; }
.cfg-barprice b { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cfg-icon {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--ink-line); border-radius: 2px; background: transparent; color: #ffffffb3;
  text-decoration: none; transition: color .2s ease, border-color .2s ease;
}
.cfg-icon:hover { color: #fff; border-color: #33495a; }

.cfg-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 0; }
.cfg-body.is-map { grid-template-columns: minmax(0, 1fr); }
.cfg-body.is-map .cfg-rail { display: none; }
.cfg-body.is-map ~ .cfg-foot .cfg-footprice,
.cfg.is-map .cfg-barprice { display: block; }

.cfg-stage { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 48px 48px 64px; }
.cfg-stage.flush { padding: 0; overflow: hidden; }
.cfg-inner { max-width: 880px; margin: 0 auto; }

.cfg-foot {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px; background: var(--ink); color: #fff; border-top: 1px solid var(--ink-line);
}
.cfg-prog { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.cfg-track { flex: 0 1 240px; height: 2px; background: var(--ink-3); overflow: hidden; }
.cfg-track i { display: block; height: 100%; background: var(--brand); transition: width .45s var(--ease); }
.cfg-prog-l { font-size: 13px; color: #ffffff8c; white-space: nowrap; }
.cfg-footprice { display: none; text-align: right; line-height: 1.15; }
.cfg-footprice span { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff80; }
.cfg-footprice b { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- buttons (website CTA pattern: text block + square arrow) ---------- */
.cta { display: inline-flex; align-items: stretch; gap: 2px; padding: 0; border: 0; background: none; text-decoration: none; }
.cta .t, .cta .i { display: flex; align-items: center; height: 46px; border-radius: 2px; background: var(--brand); color: #fff; transition: background-color .25s ease; }
.cta .t { padding: 0 22px; font-size: 15px; }
.cta .i { width: 46px; justify-content: center; }
.cta:hover:not(:disabled) .t, .cta:hover:not(:disabled) .i { background: var(--brand-dark); }
.cta:disabled { cursor: not-allowed; }
.cta:disabled .t, .cta:disabled .i { background: var(--ink-3); color: #ffffff59; }
.cta.full { display: flex; width: 100%; }
.cta.full .t { flex: 1; justify-content: center; }

.btn-ghost {
  height: 46px; padding: 0 20px; border: 1px solid var(--ink-line); border-radius: 2px;
  background: transparent; color: #ffffffb3; font-size: 15px; transition: color .2s ease, border-color .2s ease;
}
.btn-ghost:hover:not(:disabled) { color: #fff; border-color: #33495a; }
.btn-ghost:disabled { opacity: .35; cursor: not-allowed; }
.btn-light {
  display: inline-flex; align-items: center; height: 42px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: 2px; background: #fff; color: var(--ink);
  font-size: 14px; text-decoration: none;
}
.btn-light:hover { border-color: var(--ink); }

/* ---------- step headings ---------- */
.step-h { display: grid; gap: 14px; margin-bottom: 36px; }
.label {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand); font-size: 14px; font-weight: 500; letter-spacing: -.1px; text-transform: uppercase;
}
.label img { width: 20px; height: 20px; }
.h-lg { margin: 0; font-size: 44px; font-weight: 500; line-height: 1.1; letter-spacing: -1.4px; text-wrap: balance; }
.h-lg span, .h-md span { font-weight: 300; }
.h-md { margin: 0; font-size: 28px; font-weight: 500; line-height: 1.15; letter-spacing: -.8px; }
.lede { margin: 0; max-width: 60ch; color: var(--text-2); font-size: 16px; font-weight: 300; line-height: 1.55; }
.block { margin-top: 40px; }
.block-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.block-h h2 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.3px; }
.block-h p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- option cards ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stack { display: grid; gap: 12px; }

.opt {
  position: relative; display: flex; gap: 16px; width: 100%; padding: 14px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease);
}
.opt:hover:not(:disabled) { border-color: var(--line-2); }
.opt[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.opt:disabled { cursor: not-allowed; background: #fafbfc; }
.opt:disabled .opt-name, .opt:disabled .opt-ds, .opt:disabled .opt-meta { color: #8c969e; }
.opt-check {
  position: absolute; top: 10px; right: 10px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 2px; background: var(--brand); color: #fff;
}
.opt-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.opt-top { display: flex; align-items: center; gap: 10px; padding-right: 26px; }
.opt-name { font-size: 16px; font-weight: 500; letter-spacing: -.2px; }
.opt-ds { color: var(--text-2); font-size: 13.5px; font-weight: 300; line-height: 1.45; }
.opt-meta { color: var(--muted); font-size: 12.5px; }
.opt-why { margin-top: 2px; color: #9a5a0a; font-size: 12.5px; }

.opt-photo { flex-direction: column; gap: 14px; padding: 10px 10px 16px; }
.opt-photo img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 2px; }
.opt-photo .opt-body { padding: 0 6px; }
.opt-photo:disabled img { filter: grayscale(1); opacity: .5; }
.facts-top { margin: -12px 0 24px; }
.roof-media { position: relative; display: block; }
.opt-roof .roof-media img { height: 240px; }
.roof-art { position: absolute; left: 10px; bottom: 10px; width: 84px; height: 56px; padding: 6px 8px; border-radius: 2px; background: #fffffff2; color: var(--ink); }
.roof-art svg { display: block; width: 100%; height: 100%; }
.opt-roof[aria-pressed="true"] .roof-art { color: var(--brand-dark); }

.opt-art { flex: 0 0 96px; height: 64px; color: var(--ink); }
.opt-art svg { width: 100%; height: 100%; }
.opt[aria-pressed="true"] .opt-art { color: var(--brand-dark); }
.opt:disabled .opt-art { opacity: .35; }

.opt-mini { flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 14px 12px; }
.opt-mini .opt-name { font-size: 18px; }
.opt-mini .opt-meta { font-size: 12px; }
.opt-mini .opt-why { font-size: 11.5px; line-height: 1.35; }

.pill {
  display: inline-block; padding: 3px 7px 2px; border-radius: 2px;
  background: var(--ground); color: var(--muted);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.pill.brand { background: var(--brand-tint); color: var(--brand-dark); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { padding: 3px 8px; border-radius: 2px; background: var(--ground); color: var(--muted); font-size: 12px; }
.opt[aria-pressed="true"] .tag { background: var(--brand-tint); color: var(--brand-dark); }

/* ---------- facts, notes, fields ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.facts div { padding: 14px 16px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }

.note { display: flex; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.note svg { flex: 0 0 16px; margin-top: 2px; color: var(--brand); }
.note.warn { background: #fff8ec; border-color: #f3dcb2; }
.note.warn svg { color: #c07a12; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.f { display: grid; gap: 6px; }
.f > span { color: var(--muted); font-size: 12.5px; }
.f input, .f select, .f textarea {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 2px; background: #fff; font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.f textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #1988ff26; }
.wide { grid-column: 1 / -1; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; color: var(--text-2); font-size: 13.5px; }
.consent input { margin-top: 3px; accent-color: var(--brand); }
.slide input[type=range] { width: 100%; accent-color: var(--brand); }
.slide-v { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; }

.readout { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.rr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rr:last-child { border-bottom: 0; }
.rr span:first-child { color: var(--muted); }
.rr b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.rr small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }

/* ---------- file drop ---------- */
.drop { padding: 24px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: #fbfcfd; text-align: center; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-tint); }
.drop b { display: block; font-weight: 500; }
.drop span { color: var(--muted); font-size: 13px; }
.files { display: grid; gap: 8px; margin-top: 12px; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; font-size: 13.5px; }
.file b { flex: 1; min-width: 0; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file span { color: var(--muted); font-variant-numeric: tabular-nums; }
.file button { border: 0; background: none; color: var(--muted); padding: 4px; line-height: 0; }
.file button:hover { color: #c0392b; }

/* ---------- recap ---------- */
.recap { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.recap-r { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.recap-r:last-child { border-bottom: 0; }
.recap-r .k { color: var(--muted); font-size: 13px; }
.recap-r .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.recap-r .p { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.recap-r button { border: 0; background: none; padding: 0; color: var(--brand-dark); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- price rail ---------- */
.cfg-rail { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--ground); }
.rail-cap { padding: 24px 24px 22px; background: var(--ink); color: #fff; }
.rail-lb { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #ffffff80; }
.rail-pr { margin-top: 8px; font-size: 38px; font-weight: 500; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; }
.rail-rg { margin-top: 4px; font-size: 12.5px; color: #ffffff99; font-variant-numeric: tabular-nums; }
.rail-lines { flex: 1; overflow-y: auto; padding: 6px 24px; }
.li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.li:last-child { border-bottom: 0; }
.li .k { color: var(--muted); font-size: 12.5px; min-width: 0; }
.li .k b { display: block; color: var(--ink); font-size: 14px; font-weight: 500; }
.li .v { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.li.empty .v { color: var(--muted); font-weight: 400; }
.li.tot { border-top: 1px solid var(--ink); border-bottom: 0; margin-top: 2px; }
.rail-bot { padding: 18px 24px; border-top: 1px solid var(--line); background: var(--paper); }
.rail-w { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }

/* ==========================================================================
   Site step - location panel + zone map
   ========================================================================== */
.site { display: grid; grid-template-columns: 372px minmax(0, 1fr); height: 100%; min-height: 0; }
.site-panel { position: relative; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--paper); border-right: 1px solid var(--line); }

.site-search { position: sticky; top: 0; z-index: 5; padding: 16px; background: var(--ink); }
.site-search input {
  width: 100%; height: 46px; padding: 0 46px 0 14px; border: 0; border-radius: 2px; background: #fff; color: var(--ink); font-size: 15px;
}
.site-search input:focus { outline: 2px solid var(--brand); outline-offset: 0; }
.site-search .ico { position: absolute; right: 30px; top: 30px; color: var(--muted); pointer-events: none; }
.site-results {
  position: absolute; left: 16px; right: 16px; top: 62px; z-index: 6;
  max-height: 340px; overflow-y: auto; border-radius: 2px; background: #fff;
  box-shadow: 0 16px 40px #050f1533;
}
.site-results button { display: block; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 14px; }
.site-results button:last-child { border-bottom: 0; }
.site-results button:hover, .site-results button:focus-visible { background: var(--ground); outline: none; }
.site-results small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-results .empty { padding: 12px 14px; color: var(--muted); font-size: 13.5px; }

.site-intro { padding: 28px 22px; display: grid; gap: 14px; }
.site-intro p { margin: 0; color: var(--text-2); font-weight: 300; }
.site-list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.site-list li { display: flex; gap: 12px; align-items: baseline; color: var(--text-2); font-size: 14px; counter-increment: s; }
.site-list li::before { content: counter(s); display: grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 2px; background: var(--ground); color: var(--ink); font-size: 12px; }

.sec-h { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 8px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.kv { margin: 0 22px; }
.kv div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.alt-in { width: 78px; height: 28px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 2px; font-weight: 500; text-align: right; }

.zone-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 14px; }
.zone-chip { display: grid; place-items: center; min-width: 44px; height: 32px; padding: 0 8px; border-radius: 2px; background: var(--z); color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.result { padding: 18px 22px 20px; background: var(--ink); color: #fff; }
.result-l { color: #ffffffa6; font-size: 13px; }
.result-v { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 14px 16px; border-radius: 2px; background: var(--ink-3); }
.result-v svg { flex: 0 0 18px; color: #ff6b5b; }
.result-v span { font-size: 18px; }
.result-v b { font-size: 28px; font-weight: 500; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.result-p { margin-top: 10px; color: #ffffffd9; font-size: 13.5px; line-height: 1.45; }
.result-s { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; color: #ffffff99; font-size: 12.5px; }
.result-s a { color: #7fbcff; }
.src { display: inline-flex; align-items: center; gap: 6px; }
.src i { width: 7px; height: 7px; border-radius: 50%; background: #ffffff59; }
.src.is-exact i { background: #3ecf8e; }
.src.is-estimate i { background: #f5b84b; }
.src.is-you i { background: #7fbcff; }

.minis { display: grid; }
.mini { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 22px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 13.5px; }
.mini:hover { background: var(--ground); }
.mini .k { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.mini .v { font-weight: 500; font-variant-numeric: tabular-nums; }
.mini .v small { color: var(--muted); font-weight: 400; }

.fix { border-bottom: 1px solid var(--line); }
.fix summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; cursor: pointer; list-style: none; font-size: 13.5px; color: var(--brand-dark); }
.fix summary::-webkit-details-marker { display: none; }
.fix summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s var(--ease); }
.fix[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.fix-body { display: grid; gap: 12px; padding: 0 22px 18px; }
.fix-body p { margin: 0; color: var(--muted); font-size: 12.5px; }
.fix-row { display: grid; gap: 6px; }
.fix-row > span { color: var(--muted); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips button {
  min-width: 38px; height: 30px; padding: 0 6px; border: 1px solid transparent; border-radius: 2px;
  background: var(--z); color: var(--ink); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.chips button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.fix .fields { grid-template-columns: 1fr 1fr; gap: 10px; }
.fix .f input { height: 40px; }

.site-more { padding: 16px 22px 22px; display: grid; gap: 14px; }
.site-more .fields { gap: 10px; }
.site-more .f input { height: 42px; }
.site-more .note { margin-top: 0; }

.spin { width: 12px; height: 12px; border: 1.5px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- map ---------- */
.site-map { position: relative; min-width: 0; background: #dfe4e8; }
#map { position: absolute; inset: 0; background: #eef0f2; }
#map .maplibregl-canvas-container.maplibregl-interactive { cursor: crosshair; }
#map .maplibregl-canvas-container.maplibregl-interactive:active { cursor: grabbing; }
#map .maplibregl-ctrl-group { border-radius: 2px; box-shadow: 0 4px 16px #050f1526; }
#map .maplibregl-ctrl-group button { width: 36px; height: 36px; }
#map .maplibregl-ctrl-attrib { font-family: var(--font); font-size: 10.5px; }
.map-fail { padding: 24px; color: var(--muted); }

.map-top { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 500; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 2px; background: #fff; box-shadow: 0 4px 16px #050f1526; }
.seg button { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-radius: 2px; background: none; color: var(--muted); font-size: 13.5px; transition: background-color .2s ease, color .2s ease; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: #fff; }
.map-right { display: grid; justify-items: end; gap: 8px; }
.std { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 2px; background: #fff; box-shadow: 0 4px 16px #050f1526; color: var(--muted); font-size: 12.5px; }
.std select { height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); font-size: 13px; }
.legend { display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 2px; background: #fff; box-shadow: 0 4px 16px #050f1526; }
.legend-t { margin-right: 8px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.lz { display: grid; place-items: center; min-width: 36px; height: 34px; padding: 0 4px; background: var(--z); color: var(--ink); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lz.hi { box-shadow: inset 0 0 0 2px var(--ink); }

.map-hint {
  position: absolute; left: 50%; bottom: 28px; z-index: 500; transform: translateX(-50%);
  padding: 12px 18px; border-radius: 2px; background: var(--ink); color: #fff; font-size: 14px; white-space: nowrap;
  box-shadow: 0 12px 32px #050f1540;
}
.map-hint[hidden] { display: none; }

.cfg-pin { position: relative; width: 30px; height: 40px; }
.cfg-pin svg { display: block; filter: drop-shadow(0 6px 8px #050f1566); }
.cfg-pin::after {
  content: ""; position: absolute; left: 50%; bottom: -3px; width: 14px; height: 6px; margin-left: -7px;
  border-radius: 50%; background: #050f1540;
}

/* ---------- dialog ---------- */
dialog { width: min(560px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--r); }
dialog::backdrop { background: #050f15a6; }
.dlg { padding: 28px; display: grid; gap: 12px; }
.dlg h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.4px; }
.dlg p { margin: 0; color: var(--muted); font-size: 14px; }
.dlg pre { max-height: 44vh; overflow: auto; margin: 4px 0 0; padding: 16px; border-radius: 2px; background: var(--ground); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.dlg-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- arriving from the website through its page curtain ---------- */
html.bb-enter body::before {
  content: ""; position: fixed; inset: 0; z-index: 10001; pointer-events: none;
  background: var(--ink); box-shadow: inset 0 -3px 0 var(--brand);
  animation: bb-curtain-out .55s cubic-bezier(.76, 0, .24, 1) .05s both;
}
@keyframes bb-curtain-out { from { transform: translateY(0); } to { transform: translateY(-100%); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cfg-body { grid-template-columns: minmax(0, 1fr); }
  .cfg-rail { display: none; }
  .cfg-footprice { display: block; }
  .cfg-track { display: none; }
  .site { grid-template-columns: 330px minmax(0, 1fr); }
  .seg button span { display: none; }
}
@media (max-width: 800px) {
  .cfg-bar { gap: 12px; padding: 0 12px; height: 60px; }
  .cfg-brand img { width: 96px; }
  .cfg-steps .t { display: none; }
  .cfg-steps button { padding: 0 6px; }
  .cfg-stage { padding: 28px 18px 40px; }
  .h-lg { font-size: 32px; letter-spacing: -.9px; }
  .grid2, .fields { grid-template-columns: minmax(0, 1fr); }
  .opt-roof .roof-media img { height: 180px; }
  .grid5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(300px, 48vh) auto; overflow-y: auto; }
  .cfg-stage.flush { overflow-y: auto; }
  .site-map { order: -1; }
  .site-panel { overflow: visible; border-right: 0; }
  .map-top { flex-direction: column; }
  .legend-t { display: none; }
  .lz { min-width: 28px; height: 28px; font-size: 11px; }
  .std span { display: none; }
  .recap-r { grid-template-columns: minmax(0, 1fr) auto; }
  .recap-r .k { grid-column: 1 / -1; }
  .cfg-prog-l { display: none; }
  /* the footer carries the price on phones, so the top bar does not */
  .cfg.is-map .cfg-barprice { display: none; }
  .cfg-foot { gap: 10px; padding: 10px 12px; }
  .btn-ghost { padding: 0 14px; }
  .cfg-foot .cta .t { padding: 0 16px; }
  .cfg-foot .cta .i { display: none; }
  .cfg-footprice b { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
