/* =========================================================
   THEME-NEUTRAL BASELINE
   Prepended to every theme's CSS. Covers behavior that must work
   regardless of theme (anchor-scroll to the quote form under a sticky
   topbar) and a plain fallback for arbitrary site-authored HTML inside
   CONFIG["cost_body"] (tables, lists) that a theme's own CSS doesn't
   otherwise style.
========================================================= */
*{ box-sizing: border-box; }

/* Browsers default <figure> to `margin: 1em 40px`, which throws off any
   grid/flex pairing it sits in (e.g. an image beside a quote-form box) —
   the sibling box ends up looking like it "sticks out" below the image. */
figure{ margin: 0; }

html, body{ max-width: 100%; overflow-x: clip; }

html, body{
  scroll-behavior: smooth;
  scroll-padding-top: calc(110px + env(safe-area-inset-top));
}

#quote-panel{
  scroll-margin-top: calc(110px + env(safe-area-inset-top));
}

@media (min-width: 900px){
  html, body{ scroll-padding-top: 80px; }
  #quote-panel{ scroll-margin-top: 80px; }
}

[hidden]{ display: none !important; }

.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Fallback styling for arbitrary CONFIG["cost_body"] markup (tables, lists)
   that a theme's own stylesheet doesn't specifically target. */
table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 14px 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  overflow: hidden;
}
thead th{
  background: rgba(0,0,0,.04);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,.12);
  white-space: nowrap;
  font-size: 13px;
}
td{
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px solid rgba(0,0,0,.10);
  font-size: 14px;
}
tbody tr:last-child td{ border-bottom: none; }
.table-scroll{ max-width: 100%; }
@media (max-width: 640px){
  .table-scroll{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-scroll table{ min-width: 720px; }
}

/* Startup theme — Outfit, indigo→cyan gradient on white. */
:root{
  --bg:#ffffff; --surface:#f7f8fc; --ink:#14132b; --muted:#6a6791; --line:#e6e7f5;
  --i1:#4f46e5; --i2:#06b6d4;
}
body{ margin:0; font-family:'Outfit',ui-sans-serif,system-ui,sans-serif; color:var(--ink); background:var(--bg); line-height:1.55; }
a{ color:inherit; text-decoration:none; }
/* overflow:hidden lives on this wrapper (not body/html) so it clips the glow
   without disabling position:sticky on the topbar — an ancestor with
   non-visible overflow on either axis breaks sticky for its descendants. */
.glow-clip{ position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
.glow{ position:absolute; top:-160px; right:-160px; width:520px; height:520px; border-radius:50%; background:radial-gradient(circle, rgba(79,70,229,.20), transparent 70%); }
.btn{ display:inline-flex; align-items:center; justify-content:center; padding:13px 22px; background:linear-gradient(120deg, var(--i1), var(--i2)); color:#fff; border-radius:999px; font-weight:600; font-size:14px; border:none; box-shadow:0 10px 24px rgba(79,70,229,.32); }
.btn:hover{ filter:brightness(1.06); }
.topbar{ position:sticky; top:0; z-index:50; display:flex; align-items:center; justify-content:space-between; padding:20px 48px; background:var(--bg); flex-wrap:wrap; gap:14px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:700; font-size:17px; }
.nav{ display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.nav a:not(.btn){ font-size:14px; color:var(--muted); font-weight:500; }
.nav a:not(.btn)[aria-current="page"]{ color:var(--i1); }
.hero{ position:relative; text-align:center; padding:20px 30px 10px; max-width:680px; margin:0 auto; z-index:1; }
.hero h1{ margin:0 0 12px; font-size:38px; letter-spacing:-.03em; line-height:1.14; font-weight:700; }
main{ position:relative; z-index:1; max-width:880px; margin:0 auto; padding:16px 44px 20px; }
.media{ border-radius:20px; overflow:hidden; aspect-ratio:16/7; margin-bottom:18px; }
.media img{ display:block; width:100%; height:100%; object-fit:cover; }
.quotecard{ background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:22px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.quotecard-title{ font-weight:600; font-size:14px; white-space:nowrap; }
.quotecard input{ flex:1; min-width:160px; border:1px solid var(--line); border-radius:12px; padding:12px 14px; font-size:14px; background:#fff; }
.card{ padding-top:24px; }
h2{ margin:22px 0 8px; font-size:17px; font-weight:600; }
p{ margin:0 0 8px; font-size:14px; color:var(--muted); }
ul{ margin:0 0 8px; padding-left:20px; }
li{ margin:0 0 4px; font-size:14px; color:var(--muted); }
strong{ color:var(--i1); }
hr{ border:0; border-top:1px solid var(--line); margin:20px 0; }
.muted{ color:var(--muted); font-size:13px; }
.city-group__title{ margin:22px 0 8px; font-size:15px; font-weight:600; padding-bottom:8px; border-bottom:2px solid transparent; border-image:linear-gradient(120deg, var(--i1), var(--i2)) 1; }
.city-grid{ list-style:none; padding:0; margin:12px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.city-grid a{ background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:9px 15px; font-size:13px; font-weight:500; display:inline-block; }
.city-grid a:hover{ border-color:var(--i1); color:var(--i1); }
footer{ position:relative; z-index:1; border-top:1px solid var(--line); }
.footer-inner{ max-width:880px; margin:0 auto; padding:28px 44px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.footer-cta-text{ margin:0 0 10px; color:var(--muted); font-size:13px; }
.footer-links{ margin:8px 0 0; }
.footer-links a{ color:var(--muted); font-size:12px; }
.footer-links a + a{ margin-left:12px; }
.footer-copy{ color:var(--muted); font-size:12px; }

/* =========================================================
   QUOTE / ESTIMATE WIZARD
========================================================= */
.est-body{ height:100%; background:var(--bg); }
.est-page{ min-height:100vh; display:grid; grid-template-rows:auto 1fr auto; position:relative; }
.topbar--estimate{ position:sticky; top:0; z-index:50; }
.topbar-inner--estimate{ justify-content:center; }
.brand--estimate{ gap:12px; }
.brand-logo--estimate{ width:36px; height:36px; }
.brand-name--estimate{ font-size:22px; font-weight:700; }
.est-main{ position:relative; z-index:1; display:grid; place-items:center; padding:30px 20px 50px; }
.est-shell{ width:min(760px,100%); }
.est-title{ margin:0 0 14px; font-size:34px; font-weight:700; letter-spacing:-.02em; line-height:1.16; }
.est-weave{ width:min(1080px,100%); display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:center; }
.est-weave-media{ border-radius:20px; overflow:hidden; aspect-ratio:4/3; }
.est-weave-media img{ display:block; width:100%; height:100%; object-fit:cover; }
@media (max-width:820px){ .est-weave{ grid-template-columns:1fr; } }
.est-form{ background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:24px; }
.est-header{ margin-bottom:12px; }
.est-progress{ height:8px; background:var(--line); border-radius:999px; overflow:hidden; }
.est-bar{ height:100%; width:25%; background:linear-gradient(120deg, var(--i1), var(--i2)); border-radius:999px; }
.est-meta{ display:flex; justify-content:space-between; gap:10px; margin-top:10px; font-size:13px; color:var(--muted); }
.est-error{ margin:10px 0; padding:10px 12px; border:1px solid rgba(220,38,38,.25); background:rgba(220,38,38,.08); border-radius:12px; font-size:13px; color:#b91c1c; }
.est-panel label{ display:block; margin:12px 0; font-size:13px; color:var(--muted); font-weight:500; }
.est-panel input, .est-panel select, .est-panel textarea{ width:100%; border:1px solid var(--line); border-radius:12px; padding:12px 14px; font-size:15px; background:#fff; color:var(--ink); font-family:'Outfit',sans-serif; }
.est-panel input:focus, .est-panel select:focus, .est-panel textarea:focus{ outline:none; border-color:var(--i1); box-shadow:0 0 0 3px rgba(79,70,229,.15); }
.est-panel textarea{ resize:vertical; }
.est-tcpa{ margin-top:12px; font-size:10px; line-height:1.3; color:var(--muted); }
.est-tcpa a{ color:var(--i1); text-decoration:underline; }
.est-row{ display:grid; grid-template-columns:1fr 120px 120px; gap:10px; }
@media (max-width:720px){ .est-row{ grid-template-columns:1fr; } }
.est-actions{ display:flex; justify-content:space-between; gap:10px; margin-top:16px; }
.btn.ghost{ background:transparent; color:var(--i1); border:1px solid var(--line); box-shadow:none; }
.btn.ghost:hover{ background:var(--surface); filter:none; }
.est-page footer .footer-inner{ padding-top:18px; padding-bottom:18px; }
