.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}

/* ---- the product guide: a launcher in the corner, a panel above it (a full-screen sheet on phones) ---- */
.chat-widget{position:fixed;z-index:60;right:24px;bottom:24px;display:flex;flex-direction:column;align-items:flex-end;gap:14px;font-family:var(--body);color:var(--ink)}
.chat-widget :focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* launcher: the pill while closed, a round button to fold the panel away while open */
.chat-launch{position:relative;display:flex;align-items:center;gap:12px;height:62px;padding:6px 18px 6px 6px;border:1px solid #ffffff1f;border-radius:20px;background:var(--dark);color:#fff;box-shadow:0 14px 36px #102f3740,0 2px 6px #102f3726;transition:transform .2s ease,box-shadow .2s ease,width .25s ease,padding .25s ease,border-radius .25s ease}
.chat-launch:hover{transform:translateY(-2px);box-shadow:0 18px 44px #102f374d,0 2px 6px #102f3726}
.chat-launch-mark{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--orange);color:var(--dark);flex:none}
.chat-launch-mark .icon{width:23px;height:23px;stroke-width:1.9}
.chat-launch-copy{display:grid;gap:3px;text-align:left}
.chat-launch-copy strong{font:700 13px/1.2 var(--display);letter-spacing:-.02em}
.chat-launch-copy small{font-size:11px;line-height:1.2;color:#c5d5d4}
.chat-launch-arrow{align-self:flex-start;margin-top:4px;font-size:15px;line-height:1;color:#f6a16d}
.chat-launch-close{display:none}
.chat-launch-close .icon{width:24px;height:24px;stroke-width:2}
.chat-widget.is-open .chat-launch{width:58px;height:58px;padding:0;justify-content:center;border-radius:50%}
.chat-widget.is-open :is(.chat-launch-mark,.chat-launch-copy,.chat-launch-arrow){display:none}
.chat-widget.is-open .chat-launch-close{display:grid;place-items:center}

/* panel */
.chat-panel{width:400px;max-width:calc(100vw - 48px);height:min(640px,calc(100dvh - 124px));display:flex;flex-direction:column;overflow:hidden;border-radius:24px;background:#fff;box-shadow:0 30px 80px #0b232b40,0 0 0 1px #102f3714;transform-origin:bottom right;animation:chat-open .26s cubic-bezier(.2,.9,.3,1.1)}
.chat-panel.is-closing{animation:chat-close .18s ease-in forwards}
.chat-panel:focus{outline:0}
.chat-head{display:flex;align-items:center;gap:12px;padding:16px 16px 16px 18px;background:radial-gradient(120% 140% at 100% 0,#1d4e8970,#1d4e8900 60%),var(--dark);color:#fff;flex:none}
.chat-avatar{width:40px;height:40px;border-radius:12px;flex:none;box-shadow:0 0 0 2px #ffffff26}
.chat-head-text{min-width:0;flex:1}
.chat-head h2{margin:0;font:700 16px/1.25 var(--display);letter-spacing:-.025em}
.chat-head p{display:flex;align-items:center;gap:7px;margin:3px 0 0;font-size:12px;color:#bfd1d0}
.chat-status{width:7px;height:7px;border-radius:50%;background:#4fd08a;box-shadow:0 0 0 3px #4fd08a33;flex:none}
.chat-close{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#ffffff14;color:#fff;flex:none;transition:background .15s}
.chat-close:hover{background:#ffffff26}
.chat-close .icon{width:18px;height:18px;stroke-width:2}

/* conversation */
.chat-transcript{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:6px;padding:20px 16px 12px;background:linear-gradient(#f7f9f6,#fff 140px);scrollbar-width:thin;scrollbar-color:#cdd8d2 transparent}
.chat-transcript:focus-visible{outline-offset:-2px}
.chat-row{display:flex;align-items:flex-end;gap:8px;max-width:100%;animation:chat-in .22s ease-out}
.chat-row.guide{padding-right:28px}
.chat-row.user{justify-content:flex-end;padding-left:44px}
.chat-row+.chat-row:not(.guide+.guide):not(.user+.user),.chat-quick+.chat-row{margin-top:8px}
.chat-row-avatar{width:28px;height:28px;border-radius:9px;flex:none}
/* the avatar sits beside the last line of a group, like most messengers */
.chat-row.guide:has(+ .chat-row.guide) .chat-row-avatar{visibility:hidden}
.chat-bubble{min-width:0;padding:11px 14px;border-radius:18px;font-size:13.5px;line-height:1.55;overflow-wrap:anywhere;white-space:pre-line}
.chat-bubble p{margin:0}
.chat-row.guide .chat-bubble{background:#eef2ee;color:var(--ink);border-bottom-left-radius:6px}
.chat-row.user .chat-bubble{background:var(--brand);color:#fff;border-bottom-right-radius:6px}
.chat-row.typing .chat-bubble{display:flex;gap:4px;padding:14px 15px}
.chat-row.typing .chat-bubble span{width:7px;height:7px;border-radius:50%;background:#8a9a93;animation:chat-typing 1s infinite ease-in-out}
.chat-row.typing .chat-bubble span:nth-child(2){animation-delay:.15s}
.chat-row.typing .chat-bubble span:nth-child(3){animation-delay:.3s}
.chat-cta{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:8px 12px;border-radius:10px;background:#fff;color:var(--brand);font-size:12.5px;font-weight:650;box-shadow:inset 0 0 0 1px #c6d6ec;transition:background .15s}
.chat-cta:hover{background:var(--brand-soft)}
.chat-cta .icon{width:15px;height:15px;stroke-width:2}

/* suggested replies, under the latest answer */
.chat-quick{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;padding:0 12px 0 36px;animation:chat-in .22s ease-out}
.chat-quick button{padding:8px 13px;border-radius:999px;background:#fff;border:1px solid #c6d6ec;color:var(--brand);font-size:12.5px;font-weight:600;line-height:1.2;transition:background .15s,border-color .15s}
.chat-quick button:hover{background:var(--brand-soft);border-color:#a9c1e2}
.chat-quick button.team{border-color:#f2c9ab;color:#a2471a}
.chat-quick button.team:hover{background:#fff4ec;border-color:#eba57a}

/* "reach out" card */
.chat-row.contact{padding-right:0}
.chat-row.contact .chat-bubble{flex:1;white-space:normal}
.chat-contact{display:grid;gap:10px;margin-top:12px}
.chat-segment{display:inline-flex;justify-self:start;gap:2px;padding:3px;border-radius:10px;background:#dfe6e0}
.chat-segment button{min-width:64px;padding:6px 12px;border-radius:8px;background:transparent;color:var(--muted);font-size:12px;font-weight:650;transition:background .15s,color .15s}
.chat-segment button[aria-pressed="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 3px #102f371f}
.chat-contact-entry{display:flex;gap:6px;padding:4px;border:1px solid #d3ddd6;border-radius:12px;background:#fff;transition:border-color .15s,box-shadow .15s}
.chat-contact-entry:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px #1d4e891f}
.chat-contact-entry:has([aria-invalid]){border-color:#c2413d}
.chat-contact-entry input{flex:1;min-width:0;height:36px;border:0;padding:0 8px;background:transparent;font-size:13px;color:var(--ink)}
.chat-contact-entry input:focus-visible{outline:0}
.chat-contact-entry button{padding:0 14px;border-radius:9px;background:var(--orange);color:var(--dark);font-size:12.5px;font-weight:700;transition:background .15s}
.chat-contact-entry button:hover{background:#ff9658}
.chat-contact .chat-error{margin:-2px 0 0;font-size:12px;color:#b13a36}
.chat-contact small{font-size:11px;line-height:1.5;color:var(--muted)}
.chat-contact small a{color:var(--brand);text-decoration:underline;text-underline-offset:2px}

/* composer */
.chat-compose{display:flex;align-items:center;gap:8px;padding:12px 14px 14px;border-top:1px solid #edf1ee;background:#fff;flex:none}
.chat-compose input{flex:1;min-width:0;height:46px;padding:0 16px;border:1px solid #dbe3de;border-radius:999px;background:#f5f7f5;font-size:14px;color:var(--ink);transition:border-color .15s,background .15s,box-shadow .15s}
.chat-compose input::placeholder{color:#88958f}
.chat-compose input:focus-visible{outline:0;border-color:var(--brand);background:#fff;box-shadow:0 0 0 3px #1d4e891f}
.chat-compose button{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:var(--orange);color:var(--dark);flex:none;transition:background .15s,transform .15s}
.chat-compose button:hover:not(:disabled){background:#ff9153;transform:translateX(1px)}
.chat-compose button:disabled{background:#e8ece9;color:#9aa69f;cursor:default}
.chat-compose button .icon{width:19px;height:19px;stroke-width:2}

@keyframes chat-open{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:none}}
@keyframes chat-close{to{opacity:0;transform:translateY(8px) scale(.97)}}
@keyframes chat-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes chat-typing{0%,60%,100%{opacity:.35;transform:none}30%{opacity:1;transform:translateY(-3px)}}

/* phones: a compact round launcher; the open guide fills the screen */
@media(max-width:600px){
  .chat-widget{right:14px;bottom:calc(14px + env(safe-area-inset-bottom))}
  .chat-launch{width:58px;height:58px;padding:0;justify-content:center;border-radius:50%;background:var(--orange);border-color:#ffffff40}
  .chat-launch-mark{width:auto;height:auto;background:transparent}
  .chat-launch-mark .icon{width:26px;height:26px}
  .chat-launch:not([aria-expanded="true"]) :is(.chat-launch-copy,.chat-launch-arrow){display:none}
  .chat-widget.is-open .chat-launch{display:none}
  .chat-panel{position:fixed;inset:0;width:auto;max-width:none;height:auto;border-radius:0;transform-origin:bottom center}
  .chat-head{padding-top:calc(14px + env(safe-area-inset-top))}
  .chat-compose{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .chat-compose input{font-size:16px}
  html.chat-open,html.chat-open body{overflow:hidden}
}
@media(prefers-reduced-motion:reduce){
  .chat-panel,.chat-panel.is-closing,.chat-row,.chat-quick{animation:none}
  .chat-row.typing .chat-bubble span{animation:none}
  .chat-launch{transition:none}
}
