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

/* Brutalist theme — Archivo Black + Space Mono, stark black/white/acid-lime. */
:root{
  --bg:#f5f5f0; --ink:#000; --lime:#d7ff3e; --line:#000;
}
body{ margin:0; font-family:'Space Mono',ui-monospace,monospace; color:var(--ink); background:var(--bg); line-height:1.5; }
a{ color:inherit; text-decoration:none; }
h1,h2,.city-group__title{ font-family:'Archivo Black',ui-sans-serif,sans-serif; text-transform:uppercase; }
.btn{ display:inline-flex; align-items:center; justify-content:center; padding:13px 20px; background:var(--ink); color:var(--lime); border-radius:0; font-weight:700; font-size:13px; text-transform:uppercase; letter-spacing:.02em; border:2px solid var(--ink); box-shadow:5px 5px 0 var(--ink); }
.btn:hover{ background:var(--lime); color:var(--ink); }
.topbar{ position:sticky; top:0; z-index:50; display:flex; align-items:center; justify-content:space-between; padding:18px 40px; border-bottom:3px solid var(--ink); background:var(--bg); flex-wrap:wrap; gap:14px; }
.brand{ display:flex; align-items:center; gap:10px; font-family:'Archivo Black',sans-serif; font-size:17px; text-transform:uppercase; }
.nav{ display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.nav a:not(.btn){ font-size:12px; font-weight:700; text-transform:uppercase; border-bottom:2px solid transparent; }
.nav a:not(.btn):hover, .nav a:not(.btn)[aria-current="page"]{ border-color:var(--ink); }
.hero{ padding:22px 40px; border-bottom:3px solid var(--ink); }
.hero h1{ margin:0; font-size:28px; line-height:1.08; }
.media{ border-bottom:3px solid var(--ink); aspect-ratio:21/6; overflow:hidden; }
.media img{ display:block; width:100%; height:100%; object-fit:cover; filter:grayscale(1) contrast(1.15); }
.strip{ margin:0; background:var(--lime); border-bottom:3px solid var(--ink); padding:14px 40px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.strip-label{ font-weight:700; font-size:12px; text-transform:uppercase; flex:0 0 auto; }
.strip input{ flex:1; min-width:160px; max-width:280px; border:2px solid var(--ink); border-radius:0; padding:10px 12px; font-size:13px; background:#fff; font-family:'Space Mono',monospace; }
main{ max-width:1040px; margin:0 auto; padding:26px 40px 50px; }
h2{ margin:22px 0 4px; font-size:16px; }
p{ margin:0 0 8px; font-size:13px; }
ul{ margin:0 0 8px; padding-left:20px; }
li{ margin:0 0 4px; font-size:13px; }
strong{ font-family:'Archivo Black',sans-serif; font-size:1.1em; }
hr{ border:0; border-top:2px solid var(--ink); margin:24px 0; }
.muted{ font-size:12px; }
.city-group__title{ margin:26px 0 6px; font-size:16px; padding-bottom:8px; border-bottom:4px solid var(--lime); }
.city-grid{ list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:0; border-top:2px solid var(--ink); border-left:2px solid var(--ink); }
.city-grid a{ display:flex; align-items:center; justify-content:space-between; background:#fff; border-right:2px solid var(--ink); border-bottom:2px solid var(--ink); padding:13px 15px; font-weight:700; font-size:13px; }
.city-grid a:hover{ background:var(--lime); }
footer{ border-top:3px solid var(--ink); background:var(--ink); color:var(--bg); }
.footer-inner{ max-width:1040px; margin:0 auto; padding:22px 40px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.footer-cta-text{ margin:0 0 10px; font-size:12px; text-transform:uppercase; color:var(--lime); font-weight:700; }
.footer-brand{ font-family:'Archivo Black',sans-serif; font-size:13px; text-transform:uppercase; }
.footer-copy{ color:#aaa; font-size:11px; margin-top:4px; }
.footer-right{ text-align:right; }
.footer-links a{ color:var(--lime); font-size:11px; text-transform:uppercase; }
.footer-links a + a{ margin-left:10px; }

/* =========================================================
   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; border-bottom:3px solid var(--ink); }
.topbar-inner--estimate{ justify-content:center; }
.brand--estimate{ gap:12px; }
.brand-logo--estimate{ width:34px; height:34px; }
.brand-name--estimate{ font-size:20px; }
.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:28px; line-height:1.1; }
.est-weave{ width:min(1080px,100%); display:grid; grid-template-columns:1fr 1fr; gap:0; align-items:stretch; border:2px solid var(--ink); }
.est-weave-media{ overflow:hidden; border-right:2px solid var(--ink); }
.est-weave-media img{ display:block; width:100%; height:100%; object-fit:cover; filter:grayscale(1) contrast(1.15); }
@media (max-width:820px){ .est-weave{ grid-template-columns:1fr; } .est-weave-media{ border-right:none; border-bottom:2px solid var(--ink); aspect-ratio:16/9; } }
.est-form{ background:#fff; border:none; padding:22px; }
.est-header{ margin-bottom:14px; }
.est-progress{ height:8px; background:var(--bg); border:2px solid var(--ink); }
.est-bar{ height:100%; width:25%; background:var(--lime); }
.est-meta{ display:flex; justify-content:space-between; gap:10px; margin-top:10px; font-size:12px; text-transform:uppercase; }
.est-error{ margin:10px 0; padding:10px 12px; border:2px solid var(--ink); background:var(--lime); font-size:13px; font-weight:700; }
.est-panel label{ display:block; margin:12px 0; font-size:12px; font-weight:700; text-transform:uppercase; }
.est-panel input, .est-panel select, .est-panel textarea{ width:100%; border:2px solid var(--ink); border-radius:0; padding:11px 12px; font-size:15px; background:#fff; color:var(--ink); font-family:'Space Mono',monospace; }
.est-panel input:focus, .est-panel select:focus, .est-panel textarea:focus{ outline:none; background:#fbffe8; }
.est-panel textarea{ resize:vertical; }
.est-tcpa{ margin-top:12px; font-size:10px; line-height:1.3; }
.est-tcpa a{ 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:#fff; color:var(--ink); }
.btn.ghost:hover{ background:var(--bg); color:var(--ink); }
.est-page footer .footer-inner{ padding-top:16px; padding-bottom:16px; justify-content:center; }
