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

/* Beehive theme: full-bleed photo under a smoked nav strip, a honey band,
   a hexagonal comb cell for the ZIP, then hive frames of airy wax panels. */
:root{
  --honey:#f2a81d; --honey-l:#ffd36b; --honey-d:#c98612; --comb:#3a2410; --comb-2:#2a190a; --wax:#fff6dc; --wax-2:#f7e7b6;
  --ink:#24180c; --soft:#6a5233; --wood:#b9824a; --wood-d:#8a5a2c;
  --hex:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23c98612' stroke-opacity='.45' stroke-width='2'/%3E%3C/svg%3E");
}
body{ margin:0; color:var(--ink); background:var(--wax); font:19px/1.65 Karla, 'Helvetica Neue', Arial, sans-serif; }
a{ color:inherit; }

.bhv-btn, .btn{
  display:inline-flex; align-items:center; justify-content:center; min-height:46px; padding:8px 22px;
  font:800 16px/1.1 Karla, sans-serif; letter-spacing:.04em; text-decoration:none; cursor:pointer; white-space:nowrap;
  color:var(--ink); background:var(--honey); border:2px solid var(--honey); border-radius:999px;
}
.bhv-btn:hover, .btn:hover{ background:var(--honey-l); border-color:var(--honey-l); }
.bhv-btn:focus-visible, .btn:focus-visible{ outline:3px solid var(--comb); outline-offset:3px; }
.bhv-btn--dark{ color:var(--honey-l); background:var(--comb); border-color:var(--comb); }
.bhv-btn--dark:hover{ background:#553517; border-color:#553517; }
.btn.ghost{ background:transparent; border-color:var(--ink); }

/* ---------- hero ---------- */
.bhv-hero{ position:relative; background:var(--comb); }
.bhv-smoke{
  position:sticky; z-index:50; top:0; margin-bottom:-74px; display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px max(28px, calc((100% - 1180px) / 2)); background:linear-gradient(rgba(28,18,8,.82), rgba(28,18,8,.55)); color:var(--wax);
}
.bhv-brand{ display:flex; align-items:center; gap:12px; text-decoration:none; font:400 23px/1.1 'DM Serif Display', Georgia, serif; }
.bhv-brand img{ display:block; width:38px; height:38px; border-radius:50%; border:2px solid var(--honey); background:#fff; }
.bhv-nav{ display:flex; align-items:center; gap:24px; }
.bhv-nav__a{ font:600 16px Karla, sans-serif; text-decoration:none; padding:6px 0; border-bottom:2px solid transparent; }
.bhv-nav__a[aria-current="page"]{ border-bottom-color:var(--honey); }
.bhv-nav__a:hover{ color:var(--honey-l); }
.bhv-photo{ margin:0; }
.bhv-photo img{ display:block; width:100%; height:62vh; min-height:420px; max-height:640px; object-fit:cover; }
.bhv-band{
  position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:40px; align-items:end;
  max-width:1180px; margin:-150px auto 0; padding:0 28px 0;
}
.bhv-band__title{ padding:34px 40px 38px; background:var(--honey); background-image:var(--hex); border-radius:4px 4px 0 0; }
.bhv-band__title h1{ margin:0; font:400 66px/1.02 'DM Serif Display', Georgia, serif; letter-spacing:-.01em; color:var(--comb-2); }

/* the comb cell (ZIP form) */
.bhv-cell{
  position:relative; width:330px; aspect-ratio:1 / 1.155; margin-bottom:-40px; padding:0 46px;
  display:flex; flex-direction:column; align-items:stretch; justify-content:center; gap:4px; text-align:center;
  background:var(--wax); color:var(--ink);
  clip-path:polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter:drop-shadow(0 0 0 transparent);
}
.bhv-cell::before{ /* honey rim */
  content:""; position:absolute; inset:0; z-index:-1; background:var(--honey-d);
  clip-path:polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%, 0 25%, 6% 28.5%, 6% 71.5%, 50% 93.2%, 94% 71.5%, 94% 28.5%, 50% 6.8%, 6% 28.5%, 0 25%);
}
.bhv-cell__form{ display:flex; flex-direction:column; gap:8px; }
.bhv-cell__lbl{ display:block; margin:0; font:400 20px/1.1 'DM Serif Display', serif; text-wrap:balance; }
.bhv-cell__zip{
  width:100%; height:52px; padding:0; border:0; border-bottom:3px solid var(--comb); background:transparent; text-align:center;
  font:800 30px Karla, sans-serif; letter-spacing:.24em; color:var(--comb);
}
.bhv-cell__zip::placeholder{ color:#d9c79a; letter-spacing:.04em; }
.bhv-cell__zip:focus{ outline:3px solid var(--honey); outline-offset:2px; }
.bhv-cell--call .bhv-btn{ white-space:normal; min-height:52px; font-size:18px; }

/* ---------- frames ---------- */
.bhv-main{ max-width:980px; margin:0 auto; padding:90px 28px 20px; }
.bhv-intro{ margin:0 0 60px; }
.bhv-intro p{ margin:0 0 14px; font:400 30px/1.4 'DM Serif Display', Georgia, serif; color:var(--comb); }
.bhv-super{ display:flex; flex-direction:column; gap:46px; }
.bhv-frame{ position:relative; padding:0 18px; }
.bhv-frame__bar{
  display:block; height:22px; margin:0 -18px; border-radius:3px; background:linear-gradient(var(--wood), var(--wood-d));
  box-shadow:0 3px 0 rgba(0,0,0,.18);
}
.bhv-frame__comb{
  padding:28px 30px 30px; background:var(--wax-2); background-image:var(--hex);
  border-left:10px solid var(--wood); border-right:10px solid var(--wood); border-bottom:10px solid var(--wood-d);
}
.bhv-wax{ max-width:720px; padding:26px 30px 18px; background:rgba(255,248,226,.95); border-radius:3px; box-shadow:0 2px 0 rgba(58,36,16,.1); }
.bhv-wax h2{ margin:0 0 12px; font:400 36px/1.12 'DM Serif Display', Georgia, serif; color:var(--comb-2); }
.bhv-wax p{ margin:0 0 12px; }
.bhv-wax ul{ margin:0 0 12px; padding-left:24px; }
.bhv-wax li{ margin:0 0 6px; }
.bhv-wax li::marker{ content:"\2B22  "; color:var(--honey); font-size:14px; }
.bhv-frame--honey .bhv-frame__comb{ background:linear-gradient(160deg, #ffcc4d, var(--honey) 50%, var(--honey-d)); background-image:var(--hex), linear-gradient(160deg, #ffcc4d, var(--honey) 50%, var(--honey-d)); }
.bhv-frame--honey strong{ color:var(--honey-d); font-weight:800; }
.bhv-wax .table-scroll table{ margin:8px 0 14px; background:#fff; border:2px solid var(--wood); border-radius:0; }
.bhv-wax .table-scroll th{ font:800 13px Karla, sans-serif; text-transform:uppercase; letter-spacing:.08em; background:var(--wax-2); }
/* keep a wide (min-width:720px) cost table from widening its grid column;
   it scrolls inside its wrapper instead */
.table-scroll{ contain:inline-size; }

/* ---------- forage range ---------- */
.bhv-range{ max-width:1180px; margin:50px auto 0; padding:0 28px; }
.bhv-range h2{ margin:0 0 4px; font:400 40px/1.1 'DM Serif Display', serif; color:var(--comb-2); }
.muted{ margin:0 0 8px; color:var(--soft); font-size:16px; }
.city-group__title{ margin:16px 0 4px; font:800 13px Karla, sans-serif; letter-spacing:.18em; text-transform:uppercase; color:var(--honey-d); }
.city-grid{ list-style:none; margin:0; padding:0; columns:6 150px; column-gap:18px; }
.city-grid li{ break-inside:avoid; }
.city-grid a{ display:block; padding:2px 0; font-size:15px; text-decoration:none; }
.city-grid a:hover{ color:var(--honey-d); text-decoration:underline; }

/* ---------- footer ---------- */
.bhv-foot{ margin-top:60px; background:var(--comb); background-image:var(--hex); color:var(--wax); }
.bhv-foot__in{ max-width:1180px; margin:0 auto; padding:34px 28px 34px; }
.bhv-foot__cta{ display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.bhv-foot__links{ display:flex; gap:20px; margin:22px 0 4px; font-size:15px; }
.bhv-foot__copy{ margin:0; font-size:14px; color:#d8c39a; }

/* ---------- responsive ---------- */
@media (max-width:960px){
  .bhv-band{ grid-template-columns:minmax(0,1fr) 290px; gap:24px; }
  .bhv-cell{ width:290px; padding:0 40px; }
  .bhv-band__title h1{ font-size:48px; }
}
@media (max-width:760px){
  body{ font-size:17px; }
  .bhv-smoke{ margin-bottom:0; flex-wrap:wrap; gap:10px; padding:12px 16px; background:var(--comb-2); }
  .bhv-brand{ font-size:19px; }
  .bhv-nav{ width:100%; gap:18px; }
  .bhv-nav .bhv-btn{ margin-left:auto; }
  .bhv-photo img{ height:46vw; min-height:0; }
  .bhv-band{ grid-template-columns:minmax(0,1fr); gap:0; margin-top:-26px; padding:0 14px; justify-items:center; }
  .bhv-band__title{ justify-self:stretch; padding:20px 20px 24px; border-radius:4px; }
  .bhv-band__title h1{ font-size:32px; }
  .bhv-cell{ width:300px; margin:16px 0 -10px; padding:0 40px; }
  .bhv-main{ padding:50px 14px 10px; }
  .bhv-intro{ margin-bottom:40px; }
  .bhv-intro p{ font-size:22px; }
  .bhv-super{ gap:30px; }
  .bhv-frame{ padding:0 8px; }
  .bhv-frame__bar{ margin:0 -8px; height:16px; }
  .bhv-frame__comb{ padding:14px 10px 14px; border-left-width:6px; border-right-width:6px; border-bottom-width:6px; }
  .bhv-wax{ padding:18px 16px 10px; }
  .bhv-wax h2{ font-size:27px; }
  .bhv-range{ padding:0 14px; }
  .bhv-range h2{ font-size:30px; }
  .city-grid{ columns:2; }
  .bhv-foot__in{ padding:26px 16px; }
}

/* =========================================================
   STANDALONE (estimate wizard + legal pages)
========================================================= */
.est-body{ background:var(--wax); }
.est-page{ min-height:100vh; display:grid; grid-template-rows:auto 1fr auto; }
.topbar--estimate{ padding:14px 24px; background:var(--comb-2); color:var(--wax); }
.topbar-inner--estimate{ max-width:1100px; margin:0 auto; display:flex; }
.brand--estimate{ display:flex; align-items:center; gap:12px; text-decoration:none; font:400 23px/1.1 'DM Serif Display', serif; }
.brand-logo--estimate{ display:block; width:40px; height:40px; border-radius:50%; border:2px solid var(--honey); background:#fff; }
.est-main{ width:100%; max-width:1100px; margin:0 auto; padding:34px 24px 44px; }
.est-weave{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:36px; align-items:start; }
.est-weave-media img{ display:block; width:100%; height:auto; aspect-ratio:1 / 1.155; object-fit:cover; clip-path:polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.est-shell{ min-width:0; padding:26px 28px; background:var(--honey); background-image:var(--hex); border-radius:4px; }
.est-title{ margin:0 0 14px; font:400 40px/1.05 'DM Serif Display', serif; color:var(--comb-2); }
.est-form{ padding:18px; background:var(--wax); border-radius:3px; }
.est-header{ margin-bottom:12px; }
.est-progress{ height:10px; border-radius:999px; background:var(--wax-2); overflow:hidden; }
.est-bar{ height:100%; width:20%; background:var(--honey-d); transition:width .25s; }
.est-error{ margin:10px 0; padding:8px 12px; border-left:5px solid #b3401a; background:#fde4d4; font-size:15px; }
.est-panel label{ display:block; margin:12px 0; font:800 13px Karla, sans-serif; letter-spacing:.14em; text-transform:uppercase; color:var(--soft); }
.est-panel input, .est-panel select, .est-panel textarea{
  display:block; width:100%; margin-top:5px; padding:10px 6px; border:0; border-bottom:3px solid var(--comb); background:#fff;
  font:17px Karla, sans-serif; color:var(--ink); text-transform:none; letter-spacing:0;
}
.est-panel textarea{ border:2px solid var(--comb); resize:vertical; }
.est-panel input:focus, .est-panel select:focus, .est-panel textarea:focus{ outline:3px solid var(--honey); outline-offset:1px; }
.est-row{ display:grid; grid-template-columns:1fr 110px 110px; gap:10px; }
.est-tcpa{ margin:12px 0 0; font-size:11px; line-height:1.4; color:var(--soft); }
.est-actions{ display:flex; justify-content:space-between; gap:10px; margin-top:16px; }
.est-actions .btn:not(.ghost){ color:var(--honey-l); background:var(--comb); border-color:var(--comb); }
.est-thanks{ padding:16px; background:var(--wax); border-radius:3px; font:400 24px/1.2 'DM Serif Display', serif; }
.legal-copy p{ margin:0 0 12px; font-size:16px; }
.est-shell:has(.legal-copy){ background:var(--wax-2); }
.est-page footer{ padding:16px 24px; background:var(--comb-2); color:#d8c39a; font-size:14px; text-align:center; }
@media (max-width:820px){
  .est-main{ padding:20px 14px 30px; }
  .est-weave{ grid-template-columns:minmax(0,1fr); gap:18px; }
  .est-weave-media{ width:170px; margin:0 auto; }
  .est-row{ grid-template-columns:1fr; }
  .est-shell{ padding:18px 14px; }
  .est-title{ font-size:30px; }
}

/* Slash-joined service names ("Handyman/Repair/Maintenance") are one long
   unbreakable word; render_page passes its length as --h1w so phones can fit it. */
@media (max-width:760px){ h1[style*="--h1w"]{ font-size:calc((100vw - 72px) / (var(--h1w) * .52)) !important; } }

/* ---------- sticky nav ----------
   The smoked strip floats over the photo and stays pinned while the page
   scrolls. Where scroll-driven animation is supported it darkens to solid
   comb over the first 200px; elsewhere it is simply a darker strip. */
.topbar--estimate{ position:sticky; top:0; z-index:50; }
@supports (animation-timeline: scroll()){
  .bhv-smoke, .topbar--estimate{ animation:bhv-lift linear both; animation-timeline:scroll(root); animation-range:0 200px; }
  @keyframes bhv-lift{ to{ background-color:var(--comb-2); box-shadow:0 8px 16px -10px rgba(0,0,0,.55); } }
}
@supports not (animation-timeline: scroll()){
  .bhv-smoke{ background-color:rgba(28,18,8,.55); }
}
