/* SurgePro chat funnel — no framework, system font stack only */
:root{
  --navy:#0b2340; --blue:#1673e6; --blue-dark:#0f56b3; --amber:#ffb627;
  --ink:#17212e; --muted:#5a6a7d; --line:#dbe4ef; --bot-bg:#eef3fa; --ok:#0e7a3d;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:#f7fafd;line-height:1.5;font-size:17px}
.topbar{background:var(--navy);color:#fff;padding:12px 16px;position:sticky;top:0;z-index:10}
.topbar .brand{display:flex;align-items:center;gap:8px}
.topbar .brand-shield{height:38px;width:34px;display:block}
.topbar .brand-word{height:22px;width:176px;display:block}
.topbar .brand span{color:var(--amber)}
.topbar .sub-line{font-size:13px;color:#cfe0f4;margin-top:3px}
.topbar .sub-line strong{color:#fff}
.brand-text{display:flex;flex-direction:column;justify-content:center}
.topbar a{color:#fff}
.progress-wrap{background:#dbe4ef;height:8px}
.progress-bar{background:var(--blue);height:8px;width:0%;transition:width .4s ease}
.progress-text{max-width:560px;margin:8px auto 0;padding:0 16px;font-size:12.5px;color:var(--muted)}
main{max-width:560px;margin:0 auto;padding:12px 16px 40px}
.chat{display:flex;flex-direction:column;gap:10px}
.bubble{border-radius:16px;padding:12px 15px;max-width:92%;font-size:16.5px;overflow-wrap:break-word}
.bubble .who{display:block;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;margin-bottom:4px}
.sparky-bubble{background:var(--bot-bg);border-bottom-left-radius:4px}
.msg-row{display:flex;gap:8px;align-items:flex-end;align-self:flex-start;max-width:100%}
.msg-row .bubble{max-width:100%}
.msg-row .typing{align-self:auto}
.topbar-shield{height:44px;width:auto;display:block}
.sparky-hero{text-align:center;padding:10px 0 2px}
.sparky-hero img{width:96px;height:96px;border-radius:50%;border:3px solid var(--amber);background:#fff;box-shadow:0 8px 24px rgba(11,35,64,.16);object-fit:cover}
@keyframes sparky-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-1.6px)}}
@media (prefers-reduced-motion: reduce){.sparky-hero img{animation:none}}
.user{background:var(--blue);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.user .who{color:#bcd7fb}
.bubble p{margin:0 0 8px}
.bubble p:last-child{margin-bottom:0}
.bubble ul{margin:6px 0;padding-left:20px}
.badge{display:inline-block;background:var(--amber);color:#231a00;font-weight:800;border-radius:999px;padding:3px 12px;font-size:14px;margin-bottom:8px}
.footnote{font-size:12.5px;color:var(--muted)}
.card-waiting p{margin:0 0 10px;font-weight:600}
.typing{display:inline-flex;gap:5px;padding:14px 16px;background:var(--bot-bg);border-radius:16px;border-bottom-left-radius:4px;align-self:flex-start}
.typing i{width:8px;height:8px;border-radius:50%;background:#8aa5c4;display:block;animation:blink 1s infinite}
.typing i:nth-child(2){animation-delay:.18s}
.typing i:nth-child(3){animation-delay:.36s}
@keyframes blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
.controls{margin-top:10px;display:flex;flex-direction:column;gap:10px;min-height:124px}
.controls[hidden]{display:none}
.btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:52px;padding:13px 18px;border-radius:999px;font-weight:700;font-size:16.5px;text-decoration:none;border:2px solid var(--blue);background:#fff;color:var(--blue-dark);cursor:pointer;font-family:inherit;text-align:center}
.btn.primary{background:var(--blue);color:#fff}
.btn.amber{background:var(--amber);border-color:var(--amber);color:#231a00}
.btn.selected{background:var(--navy);border-color:var(--navy);color:#fff}
.btn:disabled{opacity:.45;cursor:not-allowed}
.field label{display:block;font-weight:700;font-size:15px;margin:0 0 6px;color:var(--navy)}
.field input{width:100%;min-height:52px;border:1.5px solid var(--line);border-radius:10px;padding:12px 14px;font-size:17px;font-family:inherit;background:#fff}
.field{margin-bottom:12px}
.err{color:#b00020;font-size:14.5px;min-height:20px;margin:4px 0}
.tcpa{font-size:13px;color:var(--muted);margin:10px 0}
.confirm-icon{font-size:34px;line-height:1}
.foot{max-width:560px;margin:0 auto;padding:0 16px 28px;font-size:13px;color:var(--muted)}
.foot a{color:var(--blue-dark)}

@media(max-width:559px){
  .topbar{padding:9px 14px}
  .topbar-shield{height:36px}
  .topbar .brand-word{height:19px;width:152px}
  .topbar .sub-line{font-size:12.5px;margin-top:2px}
  .sub-name{display:none}
  .progress-text{margin-top:6px;font-size:12px}
  .sparky-hero{padding:6px 0 0}
  .sparky-hero img{width:84px;height:84px}
  .bubble{font-size:16px;padding:11px 13px}
  .chat{gap:8px}
}

.sub-line a{white-space:nowrap}

.field select{width:100%;min-height:52px;border:1.5px solid var(--line);border-radius:10px;padding:12px 14px;font-size:17px;font-family:inherit;background:#fff}
.custom-slot{border:1.5px dashed var(--line);border-radius:12px;padding:12px 12px 2px;background:#fff}

/* "New message" pill: appears only when the reader has scrolled up and a
   bubble lands below their position (see funnel29 reader-respecting scroll). */
.newmsg-pill {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 84px;
  z-index: 60;
  background: #0b2a4a;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(11, 42, 74, 0.35);
  cursor: pointer;
}

/* Build 42: Places suggestion dropdown, anchored to the address field.
   Absolutely positioned so it overlays the tray instead of pushing the
   chat — the scroll model's fixed tray geometry is untouched. */
.addr-wrap { position: relative; }
.addr-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: #fff; border: 1px solid #d5dde6; border-radius: 10px; box-shadow: 0 10px 28px rgba(16,32,54,.18); overflow: hidden; }
.addr-sugg button { display: block; width: 100%; text-align: left; padding: 11px 12px; background: none; border: 0; border-bottom: 1px solid #eef2f6; font: inherit; font-size: 15px; color: #16283f; cursor: pointer; }
.addr-sugg button:last-child { border-bottom: 0; }

/* Build 44: county-record line, offer photos + lightbox */
.record-line { font-size: 13px; opacity: .85; }
.offer-photos { display: flex; gap: 8px; margin: 10px 0 4px; }
.offer-photos img { flex: 1; width: 50%; height: 180px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.photo-hint { font-size: 12px; opacity: .65; margin: 0 0 2px; }
.sp-lightbox { position: fixed; inset: 0; background: rgba(10,18,30,.93); display: flex; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.sp-lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 8px; }
