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

/* Luxury theme — Cormorant Garamond + Jost, champagne gold on near-black. */
:root{
  --bg:#0e0d0c; --panel:#17140f; --ink:#f2ecdd; --muted:#a99a7c; --line:rgba(255,255,255,.12);
  --gold:#c9a35a; --gold2:#e4c07f;
}
body{ margin:0; font-family:'Jost',ui-sans-serif,system-ui,sans-serif; font-weight:300; color:var(--ink); background:var(--bg); line-height:1.6; }
a{ color:inherit; text-decoration:none; }
h1,h2,.city-group__title{ font-family:'Cormorant Garamond',Georgia,serif; font-weight:600; }
.btn{ display:inline-flex; align-items:center; justify-content:center; padding:13px 26px; background:transparent; color:var(--gold2); border-radius:0; font-weight:500; font-size:11px; letter-spacing:.2em; text-transform:uppercase; border:1px solid var(--gold); transition:background .2s; }
.btn:hover{ background:rgba(201,163,90,.12); }
.topbar{ position:sticky; top:0; z-index:50; display:flex; align-items:center; justify-content:space-between; padding:26px 48px; background:var(--bg); flex-wrap:wrap; gap:16px; }
.brand{ display:flex; align-items:center; gap:12px; font-family:'Cormorant Garamond',serif; font-weight:600; font-size:22px; letter-spacing:.03em; }
.nav{ display:flex; align-items:center; gap:30px; flex-wrap:wrap; }
.nav a:not(.btn){ font-size:11px; color:var(--muted); letter-spacing:.16em; text-transform:uppercase; }
.nav a:not(.btn)[aria-current="page"]{ color:var(--gold2); }
.hero{ position:relative; overflow:hidden; }
.hero-bg{ position:absolute; inset:0; z-index:0; }
.hero-bg img{ display:block; width:100%; height:100%; object-fit:cover; opacity:.28; filter:grayscale(.35) contrast(1.1); }
.hero-bg::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(14,13,12,.55), var(--bg) 92%); }
.hero-inner{ position:relative; z-index:1; max-width:640px; margin:0 auto; text-align:center; padding:40px 30px 60px; }
.hero-inner h1{ margin:0 0 18px; font-size:44px; line-height:1.15; }
main{ max-width:920px; margin:0 auto; padding:0 44px 20px; }
.panel{ border:1px solid var(--line); background:var(--panel); padding:26px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:18px; margin-top:-40px; position:relative; z-index:2; }
.panel-title{ font-family:'Cormorant Garamond',serif; font-size:17px; white-space:nowrap; }
.panel input{ border:none; border-bottom:1px solid var(--line); background:transparent; color:var(--ink); padding:10px 2px; font-size:14px; width:100%; font-family:'Jost',sans-serif; }
.panel input:focus{ outline:none; border-color:var(--gold); }
.card{ padding:36px 0 0; }
h2{ margin:0 0 12px; font-size:22px; }
p{ margin:0 0 10px; font-size:14px; color:var(--muted); font-weight:300; }
ul{ margin:0 0 10px; padding-left:20px; }
li{ margin:0 0 4px; font-size:14px; color:var(--muted); font-weight:300; }
strong{ color:var(--gold2); font-weight:600; }
hr{ border:0; border-top:1px solid var(--line); margin:24px 0; }
.muted{ color:var(--muted); font-size:13px; font-weight:300; }
.city-group__title{ margin:28px 0 10px; font-size:18px; letter-spacing:.03em; padding-bottom:8px; border-bottom:1px solid var(--gold); }
.city-grid{ list-style:none; padding:0; margin:14px 0 0; display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:18px; }
.city-grid a{ font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink); border-bottom:1px solid var(--line); padding-bottom:2px; display:inline-block; }
.city-grid a:hover{ color:var(--gold); border-bottom-color:var(--gold); }
footer{ border-top:1px solid var(--line); margin-top:30px; }
.footer-inner{ max-width:640px; margin:0 auto; padding:44px 30px 36px; text-align:center; display:grid; gap:16px; justify-items:center; }
.footer-cta-text{ margin:0; color:var(--muted); font-size:14px; font-weight:300; }
.footer-links{ display:flex; gap:18px; margin:0; }
.footer-links a{ color:var(--muted); font-size:10px; letter-spacing:.12em; text-transform:uppercase; }
.footer-copy{ color:var(--muted); font-size:10px; letter-spacing:.08em; }
@media (max-width: 760px){
  .panel{ grid-template-columns:1fr; text-align:center; }
}

/* =========================================================
   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:36px; height:36px; }
.brand-name--estimate{ font-size:26px; }
.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:34px; line-height:1.18; }
.est-weave{ width:min(1080px,100%); display:grid; grid-template-columns:1fr 1fr; gap:30px; align-items:center; }
.est-weave-media{ border-radius:0; overflow:hidden; aspect-ratio:4/3; border:1px solid var(--line); }
.est-weave-media img{ display:block; width:100%; height:100%; object-fit:cover; filter:grayscale(.35) contrast(1.1); opacity:.9; }
@media (max-width:820px){ .est-weave{ grid-template-columns:1fr; } }
.est-form{ background:var(--panel); border:1px solid var(--line); padding:26px; }
.est-header{ margin-bottom:14px; }
.est-progress{ height:2px; background:var(--line); }
.est-bar{ height:100%; width:25%; background:var(--gold); }
.est-meta{ display:flex; justify-content:space-between; gap:10px; margin-top:10px; font-size:12px; color:var(--muted); letter-spacing:.06em; text-transform:uppercase; }
.est-error{ margin:10px 0; padding:10px 12px; border:1px solid rgba(220,80,90,.4); background:rgba(220,80,90,.12); font-size:13px; color:#f2b8bd; }
.est-panel label{ display:block; margin:14px 0; font-size:11px; color:var(--muted); letter-spacing:.1em; text-transform:uppercase; }
.est-panel input, .est-panel select, .est-panel textarea{ width:100%; border:none; border-bottom:1px solid var(--line); border-radius:0; padding:10px 2px; font-size:15px; background:transparent; color:var(--ink); font-family:'Jost',sans-serif; }
.est-panel input:focus, .est-panel select:focus, .est-panel textarea:focus{ outline:none; border-color:var(--gold); }
.est-panel textarea{ resize:vertical; }
.est-tcpa{ margin-top:14px; font-size:10px; line-height:1.4; color:var(--muted); }
.est-tcpa a{ color:var(--gold2); text-decoration:underline; }
.est-row{ display:grid; grid-template-columns:1fr 110px 110px; gap:14px; }
@media (max-width:720px){ .est-row{ grid-template-columns:1fr; } }
.est-actions{ display:flex; justify-content:space-between; gap:10px; margin-top:20px; }
.btn.ghost{ border-color:var(--line); color:var(--muted); }
.btn.ghost:hover{ background:rgba(255,255,255,.05); }
.est-page footer .footer-inner{ padding-top:22px; padding-bottom:22px; }
