:root {
  --weve-ai-ink: #090909;
  --weve-ai-paper: #f0eee8;
  --weve-ai-acid: #d7ff3f;
  --weve-ai-accent: #ff5a36;
  --weve-ai-line: rgba(240, 238, 232, .16);
  --weve-ai-ease: cubic-bezier(.22, 1, .36, 1);
}

.weve-ai, .weve-ai * { box-sizing: border-box; }
.weve-ai { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 99990; color: var(--weve-ai-paper); font-family: Arial, Helvetica, sans-serif; }
.weve-ai button, .weve-ai input, .weve-ai textarea { font: inherit; }

.weve-ai__launcher {
  display: flex; align-items: center; gap: .75rem; min-height: 58px; padding: .45rem 1rem .45rem .45rem;
  color: var(--weve-ai-ink); background: var(--weve-ai-acid); border: 1px solid var(--weve-ai-ink); border-radius: 999px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, .28); cursor: pointer; transition: transform .3s var(--weve-ai-ease), box-shadow .3s;
}
.weve-ai__launcher:hover { transform: translateY(-3px); box-shadow: 0 22px 55px rgba(0, 0, 0, .34); }
.weve-ai__launcher:focus-visible, .weve-ai button:focus-visible, .weve-ai input:focus-visible, .weve-ai textarea:focus-visible { outline: 3px solid var(--weve-ai-accent); outline-offset: 3px; }
.weve-ai__launcher-mark { position: relative; display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; color: var(--weve-ai-paper); background: var(--weve-ai-ink); border: 2px solid var(--weve-ai-ink); border-radius: 50%; font-size: .8rem; font-weight: 900; letter-spacing: -.04em; }
.weve-ai__launcher-mark::after { position: absolute; inset: -2px; border: 2px solid rgba(215, 255, 63, .55); border-radius: inherit; content: ''; animation: weve-ai-avatar-ring 2.4s ease-in-out infinite; }
.weve-ai__launcher-mark img, .weve-ai__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.weve-ai__launcher-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.weve-ai__launcher-copy strong { font-size: .76rem; letter-spacing: .02em; }
.weve-ai__launcher-copy small { margin-top: .25rem; font-size: .64rem; font-weight: 700; opacity: .68; text-transform: uppercase; letter-spacing: .07em; }
.weve-ai.is-open .weve-ai__launcher { opacity: 0; pointer-events: none; transform: translateY(10px); }

.weve-ai__panel {
  position: absolute; right: 0; bottom: 0; display: grid;
  grid-template-areas: 'header' 'notice' 'qualification' 'messages' 'suggestions' 'estimate' 'lead' 'composer' 'footer';
  grid-template-rows: auto auto auto minmax(90px, 1fr) auto auto auto auto auto;
  width: min(430px, calc(100vw - 2rem)); height: min(720px, calc(100vh - 2rem)); height: min(720px, calc(100dvh - 2rem));
  margin: 0; padding: 0; overflow: hidden; color: var(--weve-ai-paper); background: var(--weve-ai-ink); border: 1px solid rgba(240, 238, 232, .24); border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48); animation: weve-ai-enter .42s var(--weve-ai-ease) both;
}
.weve-ai__header { grid-area: header; }
.weve-ai__notice { grid-area: notice; }
.weve-ai__qualification { grid-area: qualification; }
.weve-ai__messages { grid-area: messages; }
.weve-ai__suggestions { grid-area: suggestions; }
.weve-ai__estimate { grid-area: estimate; }
.weve-ai__lead { grid-area: lead; }
.weve-ai__composer { grid-area: composer; }
.weve-ai__footer { grid-area: footer; }
.weve-ai__panel[hidden] { display: none; }
@keyframes weve-ai-enter { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.weve-ai__header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: .85rem 1rem; border-bottom: 1px solid var(--weve-ai-line); }
.weve-ai__identity { display: flex; align-items: center; gap: .7rem; }
.weve-ai__avatar { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; color: var(--weve-ai-ink); background: #151515; border: 2px solid var(--weve-ai-acid); border-radius: 50%; box-shadow: 0 0 0 4px rgba(215, 255, 63, .08), 0 0 22px rgba(215, 255, 63, .18); font-size: 1rem; font-weight: 900; }
.weve-ai__identity > div { display: flex; flex-direction: column; gap: .2rem; }
.weve-ai__identity strong { font-size: .88rem; }
.weve-ai__identity span { display: flex; align-items: center; gap: .35rem; color: rgba(240, 238, 232, .65); font-size: .64rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.weve-ai__identity i { width: 7px; height: 7px; background: var(--weve-ai-acid); border-radius: 50%; box-shadow: 0 0 14px var(--weve-ai-acid); }
.weve-ai__close { width: 40px; height: 40px; color: var(--weve-ai-paper); background: transparent; border: 1px solid var(--weve-ai-line); border-radius: 50%; font-size: 1.6rem; font-weight: 300; line-height: 1; cursor: pointer; }

.weve-ai__notice { padding: .6rem 1rem; color: rgba(240, 238, 232, .66); background: rgba(240, 238, 232, .045); border-bottom: 1px solid var(--weve-ai-line); font-size: .62rem; line-height: 1.45; }
.weve-ai__notice strong { display: inline-block; margin-right: .35rem; padding: .12rem .35rem; color: var(--weve-ai-ink); background: var(--weve-ai-acid); border-radius: 999px; font-size: .61rem; letter-spacing: .08em; }

.weve-ai__qualification { padding: .45rem 1rem .5rem; color: rgba(240, 238, 232, .56); background: rgba(240, 238, 232, .025); border-bottom: 1px solid var(--weve-ai-line); }
.weve-ai__qualification[hidden] { display: none; }
.weve-ai__qualification > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .56rem; font-weight: 850; letter-spacing: .08em; }
.weve-ai__qualification b { color: rgba(240, 238, 232, .82); font-size: .64rem; }
.weve-ai__qualification > div:nth-child(2) { height: 2px; margin: .34rem 0; overflow: hidden; background: rgba(240, 238, 232, .12); border-radius: 999px; }
.weve-ai__qualification > div:nth-child(2) span { display: block; height: 100%; background: var(--weve-ai-acid); border-radius: inherit; transition: width .35s var(--weve-ai-ease); }
.weve-ai__qualification small { display: block; overflow: hidden; font-size: .57rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.weve-ai__messages { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 1rem; scrollbar-color: rgba(240, 238, 232, .3) transparent; }
.weve-ai__message { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 1rem; }
.weve-ai__message--user { align-items: flex-end; }
.weve-ai__message-label { display: flex; align-items: center; gap: .35rem; margin: 0 0 .32rem .2rem; color: rgba(240, 238, 232, .52); font-size: .57rem; font-weight: 800; letter-spacing: .1em; }
.weve-ai__message-label img { width: 18px; height: 18px; object-fit: cover; object-position: 50% 22%; background: #151515; border: 1px solid rgba(215, 255, 63, .7); border-radius: 50%; }
.weve-ai__message--user .weve-ai__message-label { margin-right: .2rem; }
.weve-ai__bubble { max-width: 88%; padding: .75rem .85rem; color: var(--weve-ai-paper); background: #191919; border: 1px solid var(--weve-ai-line); border-radius: 4px 14px 14px 14px; font-size: .82rem; line-height: 1.5; white-space: pre-wrap; }
.weve-ai__message--user .weve-ai__bubble { color: var(--weve-ai-ink); background: var(--weve-ai-acid); border-color: var(--weve-ai-acid); border-radius: 14px 4px 14px 14px; }
.weve-ai__message[data-pending] .weve-ai__bubble { color: rgba(240, 238, 232, .58); animation: weve-ai-pulse 1.1s ease-in-out infinite alternate; }
@keyframes weve-ai-pulse { to { opacity: .55; } }

.weve-ai__suggestions { display: flex; gap: .45rem; overflow-x: auto; padding: 0 1rem .8rem; scrollbar-width: none; }
.weve-ai__suggestions:empty { display: none; }
.weve-ai__suggestions::-webkit-scrollbar { display: none; }
.weve-ai__suggestions button { flex: 0 0 auto; padding: .55rem .7rem; color: var(--weve-ai-paper); background: transparent; border: 1px solid rgba(240, 238, 232, .28); border-radius: 999px; font-size: .66rem; font-weight: 700; cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.weve-ai__suggestions button:hover { color: var(--weve-ai-ink); background: var(--weve-ai-paper); border-color: var(--weve-ai-paper); }

.weve-ai__estimate { max-height: min(390px, calc(100dvh - 260px)); margin: 0 1rem .8rem; padding: .9rem; overflow-y: auto; overscroll-behavior: contain; color: var(--weve-ai-ink); background: var(--weve-ai-acid); border-radius: 14px; scrollbar-color: rgba(9, 9, 9, .4) transparent; }
.weve-ai__estimate[hidden] { display: none; }
.weve-ai__estimate-kicker { display: block; margin-bottom: .3rem; font-size: .6rem; font-weight: 900; letter-spacing: .11em; }
.weve-ai__estimate > strong { display: block; font-size: .88rem; }
.weve-ai__estimate-range { display: grid; grid-template-columns: .8fr 1.2fr; gap: .5rem; margin: .8rem 0; }
.weve-ai__estimate-range span { display: flex; flex-direction: column; padding: .6rem; background: rgba(9, 9, 9, .08); border: 1px solid rgba(9, 9, 9, .15); border-radius: 9px; }
.weve-ai__estimate-range b { font-size: .9rem; letter-spacing: -.03em; }
.weve-ai__estimate-range small { margin-top: .2rem; font-size: .59rem; font-weight: 700; text-transform: uppercase; }
.weve-ai__estimate p { margin: 0; font-size: .63rem; line-height: 1.45; }
.weve-ai__entry-offer { display: grid; grid-template-columns: 1fr auto; gap: .3rem .7rem; align-items: center; margin: .75rem 0; padding: .7rem; color: var(--weve-ai-paper); background: var(--weve-ai-ink); border-radius: 10px; }
.weve-ai__entry-offer > span { display: flex; flex-direction: column; gap: .14rem; }
.weve-ai__entry-offer small { color: var(--weve-ai-acid); font-size: .56rem; font-weight: 900; letter-spacing: .09em; }
.weve-ai__entry-offer b { font-size: .72rem; }
.weve-ai__entry-offer > strong { color: var(--weve-ai-acid); font-size: 1rem; white-space: nowrap; }
.weve-ai__entry-offer p { grid-column: 1 / -1; color: rgba(240, 238, 232, .58); }
.weve-ai__estimate-details { margin: 0 0 .7rem; border-top: 1px solid rgba(9, 9, 9, .18); border-bottom: 1px solid rgba(9, 9, 9, .18); }
.weve-ai__estimate-details summary { padding: .55rem 0; font-size: .62rem; font-weight: 850; cursor: pointer; }
.weve-ai__estimate-lines { max-height: 220px; overflow-y: auto; padding: 0 .2rem .35rem 0; scrollbar-color: rgba(9, 9, 9, .4) transparent; }
.weve-ai__estimate-lines > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .6rem; padding: .48rem 0; border-top: 1px solid rgba(9, 9, 9, .12); }
.weve-ai__estimate-lines span { display: flex; flex-direction: column; gap: .15rem; font-size: .6rem; line-height: 1.25; }
.weve-ai__estimate-lines span small { align-self: flex-start; padding: .1rem .25rem; color: var(--weve-ai-paper); background: var(--weve-ai-ink); border-radius: 3px; font-size: .51rem; font-weight: 900; letter-spacing: .05em; }
.weve-ai__estimate-lines b { align-self: center; font-size: .64rem; white-space: nowrap; }
.weve-ai__estimate-lines > div > small { grid-column: 2; color: rgba(9, 9, 9, .62); font-size: .56rem; font-weight: 750; text-align: right; }
.weve-ai__estimate-cta { width: 100%; margin-top: .7rem; padding: .68rem .75rem; color: var(--weve-ai-paper); background: var(--weve-ai-ink); border: 0; border-radius: 8px; font-size: .64rem; font-weight: 900; cursor: pointer; }
.weve-ai__estimate-cta:hover { color: var(--weve-ai-ink); background: var(--weve-ai-paper); }

.weve-ai__lead { margin: 0 1rem .8rem; padding: .9rem; border: 1px solid var(--weve-ai-line); border-radius: 14px; }
.weve-ai__website { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.weve-ai__lead[hidden] { display: none; }
.weve-ai__lead-heading { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .75rem; }
.weve-ai__lead-heading strong { font-size: .78rem; }
.weve-ai__lead-heading span { color: rgba(240, 238, 232, .6); font-size: .6rem; }
.weve-ai__field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.weve-ai__lead label:not(.weve-ai__consent) { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .55rem; color: rgba(240, 238, 232, .68); font-size: .61rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.weve-ai__lead input[type="text"], .weve-ai__lead input[type="email"] { width: 100%; padding: .62rem .68rem; color: var(--weve-ai-paper); background: #151515; border: 1px solid rgba(240, 238, 232, .22); border-radius: 7px; font-size: .74rem; text-transform: none; }
.weve-ai__consent { display: flex; align-items: flex-start; gap: .45rem; margin: .2rem 0 .7rem; color: rgba(240, 238, 232, .65); font-size: .63rem; line-height: 1.4; }
.weve-ai__consent input { margin-top: .1rem; accent-color: var(--weve-ai-acid); }
.weve-ai__submit-lead { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .7rem .8rem; color: var(--weve-ai-ink); background: var(--weve-ai-acid); border: 0; border-radius: 8px; font-size: .68rem; font-weight: 900; cursor: pointer; }
.weve-ai__submit-lead:disabled { cursor: wait; opacity: .55; }
.weve-ai__lead-status { margin: .55rem 0 0; color: var(--weve-ai-acid); font-size: .62rem; line-height: 1.4; }
.weve-ai__lead.is-sent > :not(.weve-ai__lead-status) { display: none; }

.weve-ai__composer { display: grid; grid-template-columns: 38px minmax(0, 1fr) 42px; gap: .5rem; align-items: end; padding: .8rem 1rem; border-top: 1px solid var(--weve-ai-line); }
.weve-ai__attachment { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-width: 0; padding: .45rem .55rem; color: var(--weve-ai-ink); background: var(--weve-ai-acid); border-radius: 8px; font-size: .62rem; font-weight: 750; }
.weve-ai__attachment[hidden] { display: none; }
.weve-ai__attachment.is-error { color: #fff; background: #a62a1b; }
.weve-ai__attachment span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weve-ai__attachment button { flex: 0 0 auto; width: 24px; height: 24px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 50%; font-size: .95rem; line-height: 1; }
.weve-ai__composer textarea { width: 100%; max-height: 128px; resize: none; padding: .72rem .8rem; color: var(--weve-ai-paper); background: #151515; border: 1px solid rgba(240, 238, 232, .22); border-radius: 10px; font-size: .78rem; line-height: 1.4; }
.weve-ai__composer textarea::placeholder { color: rgba(240, 238, 232, .38); }
.weve-ai__composer button { display: grid; place-items: center; width: 42px; height: 42px; color: var(--weve-ai-ink); background: var(--weve-ai-acid); border: 0; border-radius: 50%; font-size: 1.25rem; font-weight: 700; cursor: pointer; }
.weve-ai__composer .weve-ai__attachment button { width: 24px; height: 24px; color: inherit; background: transparent; border: 1px solid currentColor; font-size: .95rem; }
.weve-ai__composer .weve-ai__attach { width: 38px; height: 38px; margin-bottom: 2px; color: var(--weve-ai-paper); background: transparent; border: 1px solid rgba(240, 238, 232, .3); font-size: 1.05rem; }
.weve-ai__composer .weve-ai__attach:hover { color: var(--weve-ai-ink); background: var(--weve-ai-paper); }
.weve-ai__composer button:disabled { opacity: .45; cursor: wait; }
.weve-ai__footer { display: flex; justify-content: space-between; padding: 0 1rem .7rem; color: rgba(240, 238, 232, .48); font-size: .57rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.weve-ai__footer button { padding: .22rem .42rem; color: var(--weve-ai-paper); background: rgba(240, 238, 232, .08); border: 1px solid rgba(240, 238, 232, .2); border-radius: 999px; font-size: inherit; text-transform: inherit; cursor: pointer; }
.weve-ai__footer button:hover { color: var(--weve-ai-ink); background: var(--weve-ai-acid); border-color: var(--weve-ai-acid); }

@media (max-width: 620px) {
  body.weve-ai-open { overflow: hidden; }
  .weve-ai { right: .75rem; bottom: .75rem; }
  .weve-ai__launcher-copy { display: none; }
  .weve-ai__launcher { min-height: 54px; padding: .35rem; }
  .weve-ai__launcher-mark { width: 46px; height: 46px; }
  .weve-ai__panel { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
  .weve-ai__field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .weve-ai__panel, .weve-ai__message[data-pending] .weve-ai__bubble { animation: none; }
  .weve-ai__launcher { transition: none; }
  .weve-ai__launcher-mark::after { animation: none; }
}

@keyframes weve-ai-avatar-ring { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: 1; transform: scale(1); } }
