/* =========================================================
   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; }
}

/* Playful theme — Baloo 2 + Nunito, coral/yellow duo-tone, bouncy buttons. */
:root{
  --bg:#fff3e0; --surface:#fff; --ink:#3a1f12; --muted:#8a6a52; --line:#ffd9a0;
  --coral:#ff6b5b; --coral2:#e5503f; --yellow:#ffc93c;
}
body{ margin:0; font-family:'Nunito',ui-sans-serif,system-ui,sans-serif; color:var(--ink); background:var(--bg); line-height:1.55; }
a{ color:inherit; text-decoration:none; }
h1,h2,.city-group__title{ font-family:'Baloo 2',ui-sans-serif,sans-serif; }
.btn{ display:inline-flex; align-items:center; justify-content:center; padding:14px 24px; background:var(--coral); color:#fff; border-radius:999px; font-weight:700; font-size:14px; border:none; box-shadow:0 7px 0 var(--coral2), 0 14px 22px rgba(255,107,91,.4); transition:transform .12s, box-shadow .12s; }
.btn:hover{ transform:translateY(3px); box-shadow:0 4px 0 var(--coral2), 0 8px 16px rgba(255,107,91,.35); }
.topbar{ position:sticky; top:0; z-index:50; display:flex; align-items:center; justify-content:space-between; padding:18px 44px; background:var(--bg); flex-wrap:wrap; gap:14px; }
.brand{ display:flex; align-items:center; gap:9px; font-family:'Baloo 2',sans-serif; font-weight:700; font-size:19px; }
.nav{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.nav a:not(.btn){ font-size:14px; color:var(--ink); font-weight:700; }
.hero{ display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:20px; padding:20px 44px 30px; }
.hero-left h1{ margin:0 0 14px; font-size:36px; line-height:1.14; }
.hero-left p{ margin:0 0 18px; color:var(--muted); font-size:15px; max-width:38ch; font-weight:700; }
.blob{ position:relative; aspect-ratio:1/1; border-radius:42% 58% 63% 37% / 41% 45% 55% 59%; background:var(--yellow); overflow:hidden; border:3px solid var(--ink); }
.blob img{ display:block; width:100%; height:100%; object-fit:cover; }
main{ max-width:920px; margin:0 auto; padding:10px 44px 20px; }
.quotebox{ background:var(--surface); border:3px solid var(--ink); border-radius:22px; box-shadow:5px 5px 0 var(--coral); padding:18px 20px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.quotebox-title{ font-weight:700; font-size:14px; white-space:nowrap; }
.quotebox input{ flex:1; min-width:160px; border:2px solid var(--line); border-radius:999px; padding:10px 16px; font-size:14px; }
.card{ padding-top:24px; }
h2{ margin:18px 0 8px; font-size:19px; }
p{ margin:0 0 8px; font-size:14px; color:var(--muted); font-weight:700; }
ul{ margin:0 0 8px; padding-left:20px; }
li{ margin:0 0 4px; font-size:14px; color:var(--muted); font-weight:700; }
strong{ color:var(--coral2); }
hr{ border:0; border-top:3px solid var(--ink); margin:24px 0; }
.muted{ color:var(--muted); font-size:13px; font-weight:700; }
.city-group__title{ margin:22px 0 8px; font-size:17px; padding-bottom:6px; border-bottom:3px solid var(--coral); }
.city-grid{ list-style:none; padding:0; margin:12px 0 0; display:flex; flex-wrap:wrap; gap:10px; }
.city-grid a{ background:var(--surface); border:2px solid var(--ink); border-radius:999px; padding:9px 16px; font-size:13px; font-weight:700; display:inline-block; }
.city-grid a:hover{ background:var(--yellow); }
footer{ border-top:3px solid var(--ink); margin-top:30px; }
.footer-inner{ max-width:920px; margin:0 auto; padding:26px 44px; display:grid; gap:14px; justify-items:start; }
.footer-cta-text{ margin:0; color:var(--ink); font-size:14px; font-weight:700; }
.footer-links{ margin:0; }
.footer-links a{ color:var(--muted); font-size:12px; font-weight:700; }
.footer-links a + a{ margin-left:12px; }
.footer-copy{ color:var(--muted); font-size:12px; font-weight:700; }
@media (max-width: 760px){
  .hero{ grid-template-columns:1fr; }
}

/* =========================================================
   QUOTE / ESTIMATE WIZARD
========================================================= */
.est-body{ height:100%; background:var(--bg); }
.est-page{ min-height:100vh; display:grid; grid-template-rows:auto 1fr auto; }
.topbar--estimate{ position:sticky; top:0; z-index:50; }
.topbar-inner--estimate{ justify-content:center; }
.brand--estimate{ gap:12px; }
.brand-logo--estimate{ width:38px; height:38px; }
.brand-name--estimate{ font-size:24px; }
.est-main{ display:grid; place-items:center; padding:30px 20px 50px; }
.est-shell{ width:min(760px,100%); }
.est-title{ margin:0 0 14px; font-size:32px; line-height:1.16; }
.est-weave{ width:min(1080px,100%); display:grid; grid-template-columns:1fr 1fr; gap:26px; align-items:center; }
.est-weave-media{ border-radius:42% 58% 63% 37% / 41% 45% 55% 59%; overflow:hidden; aspect-ratio:1/1; border:3px solid var(--ink); background:var(--yellow); }
.est-weave-media img{ display:block; width:100%; height:100%; object-fit:cover; }
@media (max-width:820px){ .est-weave{ grid-template-columns:1fr; } .est-weave-media{ max-width:320px; margin:0 auto; } }
.est-form{ background:var(--surface); border:3px solid var(--ink); border-radius:22px; box-shadow:6px 6px 0 var(--coral); padding:22px; }
.est-header{ margin-bottom:14px; }
.est-progress{ height:10px; background:var(--line); border-radius:999px; overflow:hidden; border:2px solid var(--ink); }
.est-bar{ height:100%; width:25%; background:var(--coral); }
.est-meta{ display:flex; justify-content:space-between; gap:10px; margin-top:10px; font-size:13px; color:var(--muted); font-weight:700; }
.est-error{ margin:10px 0; padding:10px 12px; border:2px solid var(--coral2); background:#ffe4df; border-radius:12px; font-size:13px; font-weight:700; }
.est-panel label{ display:block; margin:12px 0; font-size:13px; color:var(--ink); font-weight:700; }
.est-panel input, .est-panel select, .est-panel textarea{ width:100%; border:2px solid var(--line); border-radius:14px; padding:11px 14px; font-size:15px; background:#fff; color:var(--ink); font-family:'Nunito',sans-serif; }
.est-panel input:focus, .est-panel select:focus, .est-panel textarea:focus{ outline:none; border-color:var(--coral); }
.est-panel textarea{ resize:vertical; }
.est-tcpa{ margin-top:12px; font-size:10px; line-height:1.3; color:var(--muted); font-weight:500; }
.est-tcpa a{ color:var(--coral2); 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:18px; }
.btn.ghost{ background:transparent; color:var(--ink); box-shadow:none; border:2px solid var(--ink); }
.btn.ghost:hover{ transform:none; background:var(--bg); }
.est-page footer .footer-inner{ padding-top:18px; padding-bottom:18px; }
