/* Groundup chat widget (js/chat.js). Self-contained: brand ink / paper / lime, no dependency on style.css variables. */
.gu-chat{--gc-ink:#0E0E0D;--gc-lift:#191817;--gc-line:rgba(239,236,229,.16);--gc-paper:#EFECE5;--gc-muted:#B3AEA2;--gc-lime:#CBF442;--gc-err:#ff9d8f;
  position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));z-index:60;
  font-family:"DM Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:15px;line-height:1.5;color:var(--gc-paper)}
.gu-chat *,.gu-chat *::before,.gu-chat *::after{box-sizing:border-box}
.gu-chat [hidden]{display:none!important}
.gu-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.gu-chat svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* Floating button */
.gu-chat-fab{display:flex;align-items:center;gap:8px;margin-left:auto;min-height:52px;padding:0 20px 0 16px;border:2px solid var(--gc-ink);border-radius:999px;
  background:var(--gc-lime);color:var(--gc-ink);font-weight:700;font-size:15px;line-height:1;font-family:inherit;letter-spacing:.02em;cursor:pointer;
  box-shadow:0 6px 24px rgba(14,14,13,.35);transition:transform .2s cubic-bezier(.22,.8,.24,1),box-shadow .2s}
.gu-chat-fab svg{fill:var(--gc-ink);stroke:none}
.gu-chat-fab:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(14,14,13,.45)}
.gu-chat-fab:focus-visible,.gu-chat button:focus-visible,.gu-chat a:focus-visible,.gu-chat input:focus-visible{outline:3px solid var(--gc-lime);outline-offset:2px}
.gu-chat-fab:focus-visible{outline-color:var(--gc-ink);box-shadow:0 0 0 5px var(--gc-lime)}

/* Panel */
.gu-chat-panel{position:absolute;right:0;bottom:66px;width:min(390px,calc(100vw - 32px));height:min(600px,calc(100vh - 110px));height:min(600px,calc(100dvh - 110px));
  display:flex;flex-direction:column;background:var(--gc-ink);border:1px solid var(--gc-line);border-radius:18px;overflow:hidden;
  box-shadow:0 24px 60px rgba(0,0,0,.45);animation:gu-in .22s cubic-bezier(.22,.8,.24,1)}
@keyframes gu-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.gu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 14px 12px 18px;border-bottom:1px solid var(--gc-line);
  background:linear-gradient(90deg,var(--gc-lime) 0 6px,transparent 6px)}
.gu-title{margin:0;font-family:"Barlow Condensed","Arial Narrow",Impact,sans-serif;font-weight:800;font-size:22px;line-height:1;text-transform:uppercase;letter-spacing:.01em}
.gu-sub{margin:4px 0 0;font-size:12px;color:var(--gc-lime);font-family:"JetBrains Mono",ui-monospace,Consolas,monospace;letter-spacing:.06em;text-transform:uppercase}
.gu-close{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--gc-line);border-radius:12px;background:transparent;color:var(--gc-paper);cursor:pointer}
.gu-close:hover{border-color:var(--gc-lime)}

.gu-log{flex:1;min-height:0;overflow-y:auto;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.gu-log:focus-visible{outline:2px solid var(--gc-lime);outline-offset:-2px}
.gu-msg{display:flex}
.gu-user{justify-content:flex-end}
.gu-bubble{max-width:86%;padding:10px 13px;border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.gu-bot .gu-bubble{background:var(--gc-lift);border:1px solid var(--gc-line);border-bottom-left-radius:4px}
.gu-user .gu-bubble{background:var(--gc-lime);color:var(--gc-ink);border-bottom-right-radius:4px;font-weight:500}
.gu-bubble a{color:var(--gc-lime);text-decoration:underline;text-underline-offset:2px}
.gu-user .gu-bubble a{color:var(--gc-ink)}
.gu-links{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px;white-space:normal}
.gu-links a::after{content:" \2192"}
.gu-wa-inline{display:block;width:fit-content;margin-top:8px;font-weight:700}
.gu-typing .gu-bubble{display:flex;gap:5px;padding:14px}
.gu-typing span{width:7px;height:7px;border-radius:50%;background:var(--gc-muted);animation:gu-dot 1s infinite ease-in-out}
.gu-typing span:nth-child(2){animation-delay:.15s}.gu-typing span:nth-child(3){animation-delay:.3s}
@keyframes gu-dot{0%,80%,100%{opacity:.3;transform:none}40%{opacity:1;transform:translateY(-3px)}}

.gu-quick{display:flex;flex-wrap:wrap;gap:8px;padding:6px 14px 10px;max-height:176px;overflow-y:auto;flex-shrink:0}
.gu-chip{min-height:40px;padding:8px 14px;border:1px solid var(--gc-lime);border-radius:999px;background:transparent;color:var(--gc-paper);font-weight:500;font-size:14px;line-height:1.2;font-family:inherit;cursor:pointer}
.gu-chip:hover{background:var(--gc-lime);color:var(--gc-ink)}

.gu-input{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--gc-line)}
.gu-input input{flex:1;min-width:0;min-height:46px;padding:0 14px;border:1px solid rgba(239,236,229,.3);border-radius:12px;background:#141312;color:var(--gc-paper);font-size:16px;line-height:1.3;font-family:inherit}
.gu-input input::placeholder{color:#8C877C}
.gu-send{display:grid;place-items:center;width:46px;min-height:46px;border:0;border-radius:12px;background:var(--gc-lime);color:var(--gc-ink);cursor:pointer}
.gu-send:disabled{opacity:.5;cursor:progress}

.gu-actions{display:flex;gap:8px;padding:0 12px 8px}
.gu-btn{flex:1;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border-radius:12px;font-weight:700;font-size:14px;line-height:1.2;font-family:inherit;text-decoration:none;cursor:pointer;text-align:center}
.gu-btn-primary{background:var(--gc-lime);color:var(--gc-ink);border:1px solid var(--gc-lime)}
.gu-btn-primary:disabled{opacity:.6;cursor:progress}
.gu-btn-wa{background:transparent;color:var(--gc-paper);border:1px solid rgba(239,236,229,.35)}
.gu-btn-wa::before{content:"";width:9px;height:9px;margin-right:8px;border-radius:50%;background:#25D366}
.gu-btn-wa:hover{border-color:var(--gc-lime)}
.gu-fine{margin:0;font-size:12px;color:var(--gc-muted)}
.gu-fine a{color:var(--gc-paper)}
.gu-foot{padding:0 14px 12px}

/* Lead form inside the conversation */
.gu-lead{display:grid;gap:10px;padding:14px;border:1px solid var(--gc-lime);border-radius:14px;background:var(--gc-lift)}
.gu-field label{display:block;margin-bottom:4px;font-size:13px;font-weight:700}
.gu-field input{width:100%;min-height:44px;padding:0 12px;border:1px solid rgba(239,236,229,.3);border-radius:10px;background:#141312;color:var(--gc-paper);font-size:16px;line-height:1.3;font-family:inherit}
.gu-field input[aria-invalid="true"]{border-color:var(--gc-err)}
.gu-err{margin:0;color:var(--gc-err);font-size:13px}
.gu-err:empty{display:none}
.gu-hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Mobile: bottom sheet */
@media (max-width:520px){
  .gu-chat{right:12px;bottom:12px}
  .gu-chat.is-open{left:0;right:0;bottom:0}
  .gu-chat.is-open .gu-chat-fab{display:none}
  .gu-chat-panel{position:fixed;left:0;right:0;bottom:0;width:100%;height:88vh;height:88dvh;border-radius:18px 18px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom)}
  .gu-chat-fab{min-height:52px;padding:0 16px 0 14px}
}
@media (prefers-reduced-motion:reduce){
  .gu-chat *,.gu-chat-panel{animation:none!important;transition:none!important}
}
.gu-reduce .gu-chat-panel,.gu-reduce .gu-typing span{animation:none}
@media print{.gu-chat{display:none}}
/* 2026-11-27 upgrade: Buddy avatar (the site mascot, js/buddy.js), streaming reveal, lead fields, powered-by line */
.gu-head{justify-content:flex-start}
.gu-head .gu-close{margin-left:auto}
.gu-av{position:relative;flex:none;width:34px;height:34px;border-radius:50%;overflow:hidden;background:#EFECE5;border:1.5px solid var(--gc-lime);align-self:flex-end}
.gu-av svg{position:absolute;left:-34px;top:-40px;width:110px;height:auto}
.gu-av .bd-svg *{stroke:#0E0E0D;stroke-width:3}
.gu-av-lg{width:44px;height:44px;align-self:center}
.gu-av-lg svg{left:-44px;top:-52px;width:142px}
.gu-bot{gap:8px;align-items:flex-end}
.gu-typing .gu-av .bd-head{animation:gu-nod .9s ease-in-out infinite;transform-box:view-box;transform-origin:60px 62px}
@keyframes gu-nod{50%{transform:rotate(-6deg)}}
.gu-stream{white-space:pre-wrap}
.gu-bubble{white-space:pre-line}
.gu-field textarea{width:100%;min-height:64px;padding:10px 12px;border:1px solid rgba(239,236,229,.3);border-radius:10px;background:#141312;color:var(--gc-paper);font-size:16px;line-height:1.4;font-family:inherit;resize:vertical}
.gu-field textarea:focus-visible{outline:2px solid var(--gc-lime);outline-offset:2px}
.gu-hint{margin:-4px 0 2px}
.gu-powered{font-weight:600;color:var(--gc-lime)!important;text-decoration:none!important}
.gu-powered::before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:var(--gc-lime);vertical-align:1px}
.gu-reduce .gu-typing .gu-av .bd-head{animation:none}
/* Phones: a 56px round icon-only button in the safe area (aria-label "Chat with Groundup" is set in js/chat.js). */
@media (max-width:599.98px){
  .gu-chat{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom))}
  .gu-chat-fab{width:56px;height:56px;min-height:56px;padding:0;justify-content:center;border-radius:50%}
  .gu-chat-fab .gu-fab-t{display:none}
  .gu-chat-fab svg{width:22px;height:22px}
}
