/* Get an estimate page — uses the site palette from css/styles.css */
.est-section { padding-top: 2rem; }
.est-draft { margin: 0 0 1.4rem; }
.est-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2rem; }
.est-step h2 { font-family: var(--font-display); font-weight: 650; font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.6rem; }
.est-step h2 .num { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--pine); color: var(--cream); font-family: var(--font-sans); font-size: 1rem; font-weight: 700; flex: none; }
.est-address label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.est-address-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.est-address-row input { flex: 1 1 18rem; min-width: 0; }
.est-address .small-note { margin-top: 0.5rem; }

.est-map-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 1px 0 rgba(19,38,28,0.04); }
.est-map { height: 440px; width: 100%; background: #dfe6dc; }
.est-map.tracing, .est-map.tracing .leaflet-interactive { cursor: crosshair; }
.est-map .leaflet-control-attribution { font-size: 10px; line-height: 1.35; max-width: 100%; }
.est-map-bar { padding: 0.9rem 1rem; display: grid; gap: 0.7rem; background: var(--cream); border-top: 1px solid var(--line); }
.est-map-bar p { margin: 0; }
.est-confirm { margin: 0; }
.est-attrib { margin-top: 0.45rem; }

.est-methods { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.est-tab { font: inherit; font-weight: 600; padding: 0.55rem 0.95rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.est-tab[aria-selected="true"] { background: var(--pine); color: var(--cream); border-color: var(--pine); }
.est-tab:disabled { opacity: 0.45; cursor: not-allowed; }
.est-panel { margin-bottom: 1rem; }
.est-panel p { margin: 0 0 0.6rem; }
.est-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.est-preset { font: inherit; text-align: left; padding: 0.8rem 0.9rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; gap: 0.15rem; color: var(--ink); }
.est-preset span { color: var(--muted); font-size: 0.92rem; }
.est-preset[aria-pressed="true"] { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay) inset; }

.est-areas h3 { margin: 0 0 0.8rem; font-size: 1.1rem; }
.est-area-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
.est-area-grid .field { margin: 0; }
.est-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.est-options fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.9rem 0.8rem; margin: 0; }
.est-options legend { font-weight: 600; padding: 0 0.3rem; }
.est-radio { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; margin: 0.3rem 0; }
.est-radio input { width: auto; min-height: 0; margin: 0; }

.est-result-head { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.2rem; align-items: start; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.est-result .kicker { margin: 0 0 0.2rem; }
.est-zones { font-family: var(--font-display); font-size: 1.6rem; margin: 0; }
.est-zones strong { font-size: 2.6rem; color: var(--pine); }
.est-mix { margin: 0.2rem 0 0; color: var(--muted); }
.est-range { font-family: var(--font-display); font-weight: 650; font-size: clamp(1.6rem, 3.6vw, 2.3rem); color: var(--clay-dark); margin: 0; line-height: 1.15; }
.est-final { margin: 0.35rem 0 0; font-weight: 600; color: var(--pine); }
.est-lines { list-style: none; padding: 0; margin: 0.9rem 0; display: grid; gap: 0.55rem; }
.est-lines li { display: grid; grid-template-columns: 14rem 1fr; gap: 0.8rem; }
.est-area-name { font-weight: 600; }
.est-how summary { cursor: pointer; font-weight: 600; color: var(--water); }
.est-how p { color: var(--muted); margin: 0.5rem 0 0; }
.est-send { margin-top: 1rem; display: grid; gap: 0.5rem; justify-items: start; }
.est-send .btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 860px) {
  .est-presets, .est-area-grid { grid-template-columns: 1fr 1fr; }
  .est-options, .est-result-head { grid-template-columns: 1fr; }
  .est-lines li { grid-template-columns: 1fr; gap: 0.1rem; }
  .est-map { height: 360px; }
}
@media (max-width: 420px) {
  .est-address-row .btn { width: 100%; }
  .est-send .btn { width: 100%; }
}

/* 3D hologram preview */
.est-county-callout, #est-county-callout { display: none !important; }
.est-3d { margin-top: 1rem; padding: 0; overflow: visible; background: #04131a; color: #e6faff; border-color: #0e3a44; }
.est-3d-head { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between; align-items: flex-end; padding: 1rem 1.1rem 0.8rem; }
.est-3d-head h3 { margin: 0.1rem 0 0; color: #fff; font-size: 1.25rem; }
.est-3d-head .kicker { color: #67e8f9; }
.est-3d-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.btn-sm { min-height: 38px; padding: 0.4rem 0.85rem; font-size: 0.88rem; }
.est-3d .btn-outline { background: rgba(255,255,255,0.06); color: #e6faff; border-color: rgba(103,232,249,0.35); }
.est-3d .btn-outline:hover { border-color: #67e8f9; color: #fff; }
.est-3d-stage { position: relative; height: clamp(320px, 52vw, 520px); background: radial-gradient(ellipse at 50% 30%, #0a2a33 0%, #04131a 70%); touch-action: none; }
.est-3d-stage canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.est-3d-stage canvas:active { cursor: grabbing; }
.est-3d-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5rem; color: #a5f3fc; font-weight: 600; pointer-events: none; }
.est-3d-foot { padding: 0.9rem 1.1rem 1.1rem; border-top: 1px solid #0e3a44; }
.est-3d-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.35rem 1rem; font-size: 0.9rem; color: #cbeff6; }
.est-3d-legend li { display: flex; align-items: center; gap: 0.5rem; }
.est-3d-legend .sw { flex: none; width: 14px; height: 14px; border-radius: 4px; box-shadow: 0 0 8px currentColor; }
.est-3d-legend .sw.line { height: 3px; border-radius: 2px; }
.est-3d-legend .sw.line.thick { height: 6px; }
.est-3d-legend .sw.line.dashed {
  height: 3px;
  background: repeating-linear-gradient(90deg, #fbbf24 0 6px, transparent 6px 11px);
  box-shadow: 0 0 8px #fbbf24;
}
.est-3d .small-note { color: #8fd3df; }
.est-3d { scroll-margin-top: calc(var(--header-h, 68px) + 9.5rem); }
.est-3d-key { margin: 0; border: 0; padding: 0; }
.est-3d-key > summary {
  cursor: pointer; font-weight: 700; color: #e6faff; padding: 0.1rem 0 0.35rem;
  list-style: none;
}
.est-3d-key > summary::-webkit-details-marker, .est-3d-key > summary::marker { display: none; content: none; }
.est-3d-key > summary::before { content: "▸ "; color: #67e8f9; }
.est-3d-key[open] > summary::before { content: "▾ "; }
.est-3d-key .est-3d-note { margin: 0 0 0.75rem; color: #8fd3df; font-size: 0.88rem; line-height: 1.45; }

.est-3d-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.est-3d-layout:has(> .est-3d-zones-panel) { grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 20rem); }
.est-3d-zones-panel { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.75rem 0.9rem 0.9rem; border-left: 1px solid #0e3a44; background: #06181f; min-height: 0; max-height: clamp(320px, 52vw, 520px); overflow: auto; }
.est-3d-zones-panel .kicker { margin: 0; color: #67e8f9; }
.est-3d-zones-hint { margin: 0; font-size: 0.82rem; line-height: 1.35; color: #8fd3df; }
.est-3d-zones { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.est-zone-item { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.45rem; border: 1px solid #0e3a44; border-radius: 10px; background: rgba(255,255,255,0.04); }
.est-zone-item.is-off { opacity: 0.45; }
.est-zone-check { display: flex; align-items: center; gap: 0.45rem; min-width: 0; flex: 1; cursor: pointer; color: #e6faff; font-size: 0.9rem; line-height: 1.25; }
.est-zone-check input { width: auto; min-height: 0; margin: 0; flex: none; accent-color: #67e8f9; }
.est-3d-zones .sw { flex: none; width: 14px; height: 14px; border-radius: 4px; box-shadow: 0 0 8px currentColor; }
.est-zone-copy { min-width: 0; }
.est-zone-copy strong { display: inline; margin-right: 0.2rem; }
.est-zone-remove { flex: none; font: inherit; font-size: 0.8rem; font-weight: 600; color: #fda4af; background: transparent; border: 1px solid rgba(253,164,175,0.35); border-radius: 999px; padding: 0.28rem 0.65rem; cursor: pointer; min-height: 2.1rem; }
.est-zone-remove:hover, .est-zone-remove:focus-visible { border-color: #fda4af; color: #fff; }
.est-3d-undo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.7rem; margin-top: 0.15rem; padding: 0.45rem 0.55rem; border-radius: 8px; background: rgba(103,232,249,0.08); border: 1px solid rgba(103,232,249,0.25); }
.est-3d-undo[hidden] { display: none; }
.est-3d-undo p { margin: 0; flex: 1; font-size: 0.85rem; color: #e6faff; }
.est-3d-zones-empty { margin: 0; color: #8fd3df; font-size: 0.9rem; }
@media (max-width: 860px) {
  .est-3d-layout { grid-template-columns: 1fr; }
  .est-3d-zones-panel { border-left: 0; border-top: 1px solid #0e3a44; max-height: none; }
  /* Keep the yard visible below the sticky site header as the user scrolls the card. */
  body:not(.designer-page) .est-3d-head {
    position: sticky;
    top: var(--header-h, 68px);
    z-index: 6;
    background: #04131a;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  body:not(.designer-page) .est-3d-stage {
    position: sticky;
    top: calc(var(--header-h, 68px) + var(--est3d-head-h, 7.25rem));
    z-index: 5;
  }
}


/* ---------- What's on your property? (landmarks preview) ---------- */
.est-lm { margin-bottom: 1rem; }
.est-lm h3 { margin: 0; font-size: 1.1rem; }
.est-lm-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.4rem; }
.est-lm-use { display: flex; gap: 0.45rem; align-items: center; font-weight: 600; font-size: 0.95rem; }
.est-lm-use input { width: auto; min-height: 0; margin: 0; }
.est-lm-list { list-style: none; margin: 0.6rem 0 0.9rem; padding: 0; display: grid; gap: 0.45rem; }
.lm-empty { color: var(--muted); font-size: 0.95rem; }
.lm-row { display: grid; grid-template-columns: auto minmax(10rem, 15rem) 1fr auto; gap: 0.6rem; align-items: center; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: box-shadow .3s; }
.lm-row.flash { box-shadow: 0 0 0 3px var(--clay); }
.lm-row select { font: inherit; font-size: 0.95rem; padding: 0.35rem 0.4rem; border-radius: 8px; border: 1px solid var(--line); width: 100%; min-height: 2.4rem; }
.lm-meta { font-size: 0.93rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; align-items: center; }
.lm-meta small { color: var(--muted); flex-basis: 100%; }
.lm-meta input.lm-r { width: 4.2rem; min-height: 2rem; padding: 0.15rem 0.35rem; display: inline-block; }
.lm-del { font: inherit; font-size: 0.9rem; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem; cursor: pointer; color: var(--ink-2); min-height: 2.2rem; }
.lm-del:hover { border-color: var(--clay); color: var(--clay-dark); }
.lm-sw { display: inline-block; width: 1rem; height: 1rem; border-radius: 4px; border: 2px solid; flex: none; }
.est-lm-add-label { margin: 0 0 0.4rem; font-weight: 600; font-size: 0.95rem; }
.est-lm-add { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.est-lm-btn { font: inherit; font-size: 0.92rem; display: inline-flex; gap: 0.4rem; align-items: center; padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; min-height: 2.5rem; }
.est-lm-btn[aria-pressed="true"] { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay) inset; }
.est-lm-draw { margin-top: 0.7rem; padding: 0.65rem 0.8rem; border-radius: 10px; background: var(--cream); border: 1px dashed var(--clay); display: grid; gap: 0.5rem; }
.est-lm-draw .btn-row { margin: 0; }
.est-lm-sum { margin-top: 0.8rem; color: var(--ink-2); }
@media (max-width: 640px) {
  .lm-row { grid-template-columns: auto 1fr auto; }
  .lm-row .lm-meta { grid-column: 2 / 4; }
}
.est-lm-add { flex-direction: column; gap: 0.55rem; }
.est-lm-group { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.est-lm-gname { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); flex-basis: 100%; }
.lm-sw.round { border-radius: 50%; }
.lm-sw.line { height: 0.35rem; width: 1.1rem; border-width: 1px; }

/* one-click auto layout */
.est-auto-btn { background: #14532d; border-color: #14532d; color: #fff; }
.est-auto-btn:hover { background: #166534; border-color: #166534; color: #fff; }
.est-auto-status { margin: 0.6rem 0 0; padding: 0.6rem 0.8rem; border-radius: 10px; background: #ecfdf3; border: 1px solid #bbf7d0; color: #14532d; font-weight: 600; }
.est-lm-conf { margin: 0.4rem 0 0.6rem; font-size: 0.92rem; line-height: 1.45; }
.lm-conf { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.85rem; margin-right: 0.3rem; }
.lm-conf-high { background: #dcfce7; color: #14532d; }
.lm-conf-medium { background: #fef3c7; color: #78350f; }
.lm-conf-low { background: #fee2e2; color: #7f1d1d; }
.lm-conf-why { color: var(--muted, #5b6b62); font-size: 0.85rem; }

/* Automatic layout: status, on/off switch, edit entry point and tap-to-edit popup */
.est-auto-status.busy::before { content: ""; display: inline-block; width: 0.85em; height: 0.85em; margin-right: 0.5em; vertical-align: -0.1em; border: 2px solid #86efac; border-top-color: #14532d; border-radius: 50%; animation: est-spin 0.8s linear infinite; }
@keyframes est-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .est-auto-status.busy::before { animation: none; } }
.est-lm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0.25rem 0 0.6rem; }
.lm-switch { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; font-size: 0.95rem; min-height: 44px; }
.lm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lm-switch-track { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; transition: background 0.15s; flex: none; }
.lm-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: transform 0.15s; }
.lm-switch input:checked + .lm-switch-track { background: #15803d; }
.lm-switch input:checked + .lm-switch-track::after { transform: translateX(18px); }
.lm-switch input:focus-visible + .lm-switch-track { outline: 3px solid #93c5fd; outline-offset: 2px; }
.est-lm-tools .btn-sm { min-height: 40px; }
.lm-edit { font: inherit; font-size: 0.9rem; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem; cursor: pointer; color: var(--ink-2); min-height: 2.2rem; margin-right: 0.3rem; }
.lm-popup .leaflet-popup-content { margin: 10px 12px; }
.lm-pop { display: grid; gap: 0.45rem; font-size: 0.9rem; min-width: 200px; }
.lm-pop select { width: 100%; font: inherit; padding: 0.35rem; margin-top: 0.2rem; }
.lm-pop-size { color: #5b6b62; font-size: 0.82rem; }
.lm-pop-row { display: flex; gap: 0.35rem; }
.lm-pop-row button { flex: 1; min-height: 40px; border-radius: 8px; border: 1px solid #94a3b8; background: #fff; font: inherit; font-size: 0.88rem; cursor: pointer; }
.lm-pop-row button[data-a="done"] { background: #14532d; border-color: #14532d; color: #fff; }
.lm-pop-row button.danger { color: #b91c1c; border-color: #fca5a5; }
.lm-editing .lot-legend { display: none; }   /* keep the edit popup tappable on small maps */

.est-lines li.est-travel { background: #f4f8f3; border: 1px solid #c5d9c8; border-radius: 10px; padding: 0.65rem 0.8rem; }
.est-lines li.est-travel .est-area-name { color: var(--pine, #0b2a20); }

/* Team view unlock (estimate map) */
.est-map-wrap { position: relative; }
.est-team-view {
  position: absolute; top: 76px; left: 10px; z-index: 1100;
  background: rgba(11, 42, 32, .92); color: #fff; border-radius: 10px;
  padding: 0.4rem 0.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  font: 600 12px/1.3 system-ui, sans-serif; max-width: 230px;
}
.est-team-open, .est-team-lock {
  appearance: none; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.12);
  color: #fff; border-radius: 6px; padding: 0.3rem 0.55rem; font: inherit; cursor: pointer;
}
.est-team-open:hover, .est-team-lock:hover { background: rgba(255,255,255,.22); }
.est-team-view.is-on { display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.45rem; }
.est-team-badge { background: #3f9a4f; color: #fff; border-radius: 999px; padding: 0.2rem 0.55rem; }
.est-team-form { display: grid; gap: 0.35rem; margin-top: 0.35rem; }
.est-team-form label { font-weight: 600; }
.est-team-form input[type="password"] {
  width: 100%; box-sizing: border-box; border-radius: 6px; border: 1px solid rgba(255,255,255,.35);
  padding: 0.35rem 0.45rem; font: 16px/1.3 system-ui, sans-serif;
}
.est-team-actions { display: flex; gap: 0.35rem; }
.est-team-err { color: #ffd0d0; margin: 0; font-weight: 600; }
.est-county-callout {
  margin: 0; padding: 0.55rem 0.85rem; background: #e7f3ea; color: #0b2a20;
  border-top: 1px solid #c5d9c8; font: 600 0.92rem/1.35 system-ui, sans-serif;
}
.est-designer-bridge { margin: 1.1rem 0 0; font-size: 1.02rem; }

/* Town dropdown + street suggest */
.addr-town, #est-addr-town, #design-addr-town {
  min-height: 44px; border-radius: 8px; border: 1px solid var(--line, #c5d0c8);
  background: #fff; font: 600 0.92rem system-ui, sans-serif; padding: 0.3rem 0.5rem;
  max-width: 14rem;
}
.addr-suggest {
  list-style: none; margin: 0; padding: 0.25rem 0; position: absolute;
  left: 0; right: 0; top: 100%; z-index: 1200;
  background: #fff; border: 1px solid var(--line, #c5d0c8); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 240px; overflow: auto;
}
.addr-suggest button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 0.45rem 0.75rem; font: 500 0.95rem system-ui, sans-serif; cursor: pointer;
}
.addr-suggest button:hover, .addr-suggest button:focus { background: #e7f3ea; }
#step-address .est-find, #step-address .address-bar, .est-step .address-bar { position: relative; }
#step-address .est-find { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: stretch; }
#step-address .est-find input { flex: 1 1 180px; }
.est-more { margin: 1rem 0 0; border: 1px solid var(--line, #c5d0c8); border-radius: 10px; padding: 0.2rem 0.85rem; background: #fff; }
.est-more summary { cursor: pointer; font-weight: 700; padding: 0.55rem 0; }
.est-more-body p { margin: 0 0 0.8rem; }

/* Team view: sit by the layers control so the mobile map-key/hint isn't covered */
.est-team-view { top: 10px; left: auto; right: 52px; }
@media (max-width: 640px) {
  .est-team-view { top: 10px; right: 52px; left: auto; max-width: 200px; }
  .est-owner-search { top: 52px; right: 10px; left: auto; width: min(260px, calc(100% - 70px)); }
}

/* Team-view owner search */
.est-owner-search {
  position: absolute; top: 52px; right: 52px; z-index: 1100;
  background: rgba(11, 42, 32, .94); color: #fff; border-radius: 10px;
  padding: 0.5rem 0.6rem; width: 240px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  font: 600 12px/1.35 system-ui, sans-serif;
}
.est-owner-search label { display: block; margin-bottom: 0.25rem; }
.est-owner-search input[type="search"] {
  width: 100%; box-sizing: border-box; border-radius: 6px; border: 1px solid rgba(255,255,255,.35);
  padding: 0.35rem 0.45rem; font: 16px/1.3 system-ui, sans-serif;
}
.est-owner-status { margin: 0.35rem 0 0; font-weight: 600; }
.est-owner-list { list-style: none; margin: 0.35rem 0 0; padding: 0; max-height: 220px; overflow: auto; }
.est-owner-list button {
  display: block; width: 100%; text-align: left; border: 0; background: rgba(255,255,255,.08);
  color: #fff; border-radius: 6px; padding: 0.35rem 0.45rem; margin: 0 0 0.25rem; cursor: pointer;
}
.est-owner-list button strong { display: block; }
.est-owner-list button span { font-weight: 500; opacity: .85; }

.est-3d-extras { margin: 0.7rem 1.1rem 0.4rem; border-top: 1px solid rgba(103,232,249,0.2); padding-top: 0.5rem; }
.est-3d-extras summary { cursor: pointer; font-weight: 700; color: #e6faff; padding: 0.35rem 0; }

/* ---------- One-flow levels (estimate page) ---------- */
/* Keep price + send pinned to the bottom on every level so the bar cannot
   cover "Also included", zone counts, the 3D toolbar, or the Map key. */
body.has-quote-bar { padding-bottom: calc(var(--quote-bar-h, 7rem) + 1rem); }
body.has-quote-bar .est-3d,
body.has-quote-bar #est-result,
body.has-quote-bar #est-level-1-next,
body.has-quote-bar #est-level-2,
body.has-quote-bar #est-level-3 {
  padding-bottom: calc(var(--quote-bar-h, 7rem) + 0.85rem);
  scroll-margin-bottom: calc(var(--quote-bar-h, 7rem) + 1rem);
  scroll-margin-top: calc(var(--header-h, 68px) + 12px);
}
.est-3d-foot, #est-3d-key, #est-want-detail, #est-customize {
  scroll-margin-bottom: calc(var(--quote-bar-h, 7rem) + 1rem);
}
/* Map key stays in normal flow under the 3D stage so the canvas keeps its
   full height whether the key is open or closed. Do not stick the key over
   the stage. Reserved space for the fixed price bar is on body.has-quote-bar. */
body.has-quote-bar .est-3d-foot {
  background: #04131a;
}
html[data-est-level="3"] .est-editor-mount {
  margin-bottom: 0.25rem;
}
html[data-est-level="3"] .est-editor-mount iframe {
  height: calc(100vh - var(--header-h, 88px) - var(--quote-bar-h, 7.5rem) - 9.5rem);
}
.est-quote-bar,
html[data-est-level="2"] .est-quote-bar,
html[data-est-level="3"] .est-quote-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(1160px, calc(100% - 2.5rem));
  top: auto;
  bottom: 0;
  z-index: 40;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.2rem;
  margin: 0;
  padding: 0.85rem 1.1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: #0b2a20; color: #fff;
  border: 1px solid #1c4a3a;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -8px 24px rgba(11, 42, 32, 0.18);
}
.est-quote-bar[hidden] { display: none !important; }
.est-quote-bar .kicker { margin: 0; color: #9cd6b8; }
.est-quote-range { margin: 0.15rem 0 0.2rem; font-family: var(--font-display); font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.est-quote-bar .small-note { color: #c9e8d8; margin: 0; }
.est-quote-bar #est-send { flex: none; }
.est-level { margin: 1.4rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--line); }
.est-level > h3 { margin: 0 0 0.35rem; }
.est-level-nav { margin: 1.1rem 0 0; display: grid; gap: 0.35rem; justify-items: start; }
.est-level-nav .btn { min-height: 48px; }
.est-editor-mount iframe {
  display: block; width: 100%;
  height: calc(100vh - var(--header-h, 88px) - var(--quote-bar-h, 7.5rem) - 9.5rem);
  min-height: 22rem;
  border: 1px solid var(--line); border-radius: 12px; background: #0f1a14;
}
#est-more.linkish, button.linkish {
  appearance: none; background: none; border: 0; padding: 0; margin: 0;
  color: var(--brand-600); font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.18em;
}
html[data-est-level="3"] .est-editor-mount iframe {
  height: calc(100vh - var(--header-h, 88px) - var(--quote-bar-h, 7.5rem) - 9.5rem);
  min-height: 22rem;
}
@media (max-width: 640px) {
  body.has-quote-bar { padding-bottom: calc(var(--quote-bar-h, 7.5rem) + 0.75rem); }
  .est-quote-bar,
  html[data-est-level="2"] .est-quote-bar,
  html[data-est-level="3"] .est-quote-bar {
    left: 0.4rem !important; right: 0.4rem !important; width: auto !important;
    max-width: none !important; transform: none !important;
    padding: 0.55rem 0.8rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    gap: 0.35rem 0.8rem;
  }
  .est-quote-bar .small-note { display: none; }
  .est-quote-bar .kicker { font-size: 0.7rem; }
  .est-quote-range { font-size: 1.12rem; line-height: 1.25; margin: 0; }
  .est-quote-bar #est-send { width: 100%; min-height: 44px; }
  .est-editor-mount iframe { min-height: 22rem; }
  html[data-est-level="3"] .est-editor-mount iframe {
    height: calc(100vh - var(--header-h, 88px) - var(--quote-bar-h, 7.5rem) - 8rem);
  }
}

/* Designer opened as an inline editor on the estimate page */
body.designer-embed { background: #0f1a14; }
body.designer-embed .site-header,
body.designer-embed .site-footer,
body.designer-embed .skip { display: none !important; }
body.designer-embed .designer-app {
  height: 100vh; max-height: 100vh;
}
