/* Native "Ask Ellis" live chat widget + founder face badges */
.sp-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  font-family: var(--sans);
}
.sp-chat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--night);
  color: var(--paper);
  border: 1px solid rgba(250, 247, 240, 0.14);
  border-radius: 999px;
  padding: 6px 16px 6px 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(28, 36, 32, 0.45);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.sp-chat-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -10px rgba(28, 36, 32, 0.55);
}
.sp-chat-av {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 30px;
  flex: none;
}
.sp-chat-av.is-lg { width: 38px; height: 38px; }
.sp-chat-av img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1.5px solid rgba(250, 247, 240, 0.28);
}
.sp-chat-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9CA3AF;
  border: 2px solid var(--night);
}
.sp-chat-dot.is-on { background: #34D399; }

.sp-chat-panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(28, 36, 32, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sp-chat-panel[hidden] { display: none; }

.sp-chat-head {
  background: var(--night);
  color: var(--paper);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.sp-chat-who { flex: 1; min-width: 0; }
.sp-chat-who strong { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.sp-chat-who span { display: block; font-size: 12px; color: var(--night-text); line-height: 1.35; margin-top: 2px; }
.sp-chat-close {
  background: transparent;
  border: 0;
  color: var(--night-text);
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}
.sp-chat-close:hover { color: var(--paper); }

.sp-chat-log {
  padding: 14px 14px 10px;
  max-height: 270px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--paper);
}
.sp-chat-msg {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.sp-chat-msg.is-ellis {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--rule);
  color: var(--ink);
}
.sp-chat-msg.is-visitor {
  align-self: flex-end;
  background: var(--spring);
  color: #fff;
}
.sp-chat-msg .sp-chat-link {
  color: var(--spring);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sp-chat-msg.is-visitor .sp-chat-link { color: #fff; }

.sp-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px 10px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.sp-chat-chips[hidden] { display: none; }
.sp-chat-chips button {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}
.sp-chat-chips button:hover { border-color: var(--spring); color: var(--spring); }

.sp-chat .hp,
.lp-qr .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.sp-chat-form {
  padding: 10px 12px 12px;
  background: var(--card);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sp-chat-email {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
}
.sp-chat-row { display: flex; gap: 8px; align-items: flex-end; }
.sp-chat-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  resize: none;
  background: var(--card);
}
.sp-chat-send {
  flex: none;
  background: var(--spring);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.sp-chat-send:disabled { opacity: 0.6; cursor: default; }
.sp-chat-err { margin: 0; font-size: 12.5px; color: #9B2226; }

/* Founder trust badge (used on /contact and inline quick requests) */
.founder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.founder-card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1.5px solid rgba(28, 36, 32, 0.14);
}
.founder-card strong { display: block; font-size: 14.5px; font-weight: 650; color: var(--ink); line-height: 1.25; }
.founder-card span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.35; margin-top: 2px; }

@media (max-width: 640px) {
  .sp-chat { right: 14px; bottom: 14px; }
  .sp-chat-panel { width: calc(100vw - 28px); bottom: 52px; }
  .sp-chat-email, .sp-chat-input { font-size: 16px; }
}
