/* Tshiamo's AI assistant: a chat widget on every page. Everything is prefixed
   fa- (founder assistant) so it can't clash with the page's own styles. */
.fa-root { --fa-ink: #18233A; --fa-night: #0C1324; --fa-amber: #F2A541; --fa-amber-ink: #8A4B07; --fa-paper: #fff; --fa-soft: #F4F6FA;
  --fa-line: #E3E7EE; --fa-slate: #5B6678; font-family: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; }
.fa-root *, .fa-root *::before, .fa-root *::after { box-sizing: border-box; }

/* Launcher: the founder's face, bottom right */
.fa-launch { position: fixed; right: 20px; bottom: 20px; z-index: 9998; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--fa-night); box-shadow: 0 0 0 3px var(--fa-amber), 0 10px 30px rgba(12,19,36,.35); transition: transform .2s, box-shadow .2s; }
.fa-launch:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 0 3px var(--fa-amber), 0 14px 36px rgba(12,19,36,.45); }
.fa-launch:focus-visible { outline: 3px solid var(--fa-ink); outline-offset: 4px; }
.fa-launch img { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; }
.fa-launch .fa-dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: #2DBE6C; border: 2px solid #fff; }
.fa-root.open .fa-launch { transform: scale(.9); }

/* "Hi, ask me anything" teaser */
.fa-teaser { position: fixed; right: 96px; bottom: 30px; z-index: 9998; max-width: 250px; padding: 12px 34px 12px 14px; border-radius: 16px 16px 4px 16px;
  background: var(--fa-paper); color: var(--fa-ink); font-size: 15px; line-height: 1.4; box-shadow: 0 12px 32px rgba(12,19,36,.18); border: 1px solid var(--fa-line);
  animation: fa-pop .35s cubic-bezier(.2,.8,.2,1) both; cursor: pointer; }
.fa-teaser b { display: block; font-size: 13px; color: var(--fa-slate); font-weight: 600; margin-bottom: 2px; }
.fa-teaser button { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; background: none; color: var(--fa-slate); border-radius: 6px; cursor: pointer; font-size: 18px; line-height: 1; }
.fa-teaser button:hover { background: var(--fa-soft); }

/* Panel */
.fa-panel[hidden] { display: none !important; }
.fa-panel { position: fixed; right: 20px; bottom: 96px; z-index: 9999; width: 380px; height: min(620px, calc(100vh - 120px)); display: flex; flex-direction: column;
  background: var(--fa-paper); color: var(--fa-ink); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 70px rgba(12,19,36,.3), 0 0 0 1px rgba(12,19,36,.06);
  animation: fa-pop .28s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom right; }
.fa-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--fa-ink); color: #fff; }
.fa-head img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 2px var(--fa-amber); flex: none; object-fit: cover; }
.fa-who { flex: 1; min-width: 0; line-height: 1.25; }
.fa-who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-who span { font-size: 12.5px; color: #C9D2E3; display: flex; align-items: center; gap: 6px; }
.fa-who span i { width: 8px; height: 8px; border-radius: 50%; background: #2DBE6C; display: inline-block; }
.fa-x { width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-size: 20px; line-height: 1; flex: none; }
.fa-x:hover { background: rgba(255,255,255,.16); }
.fa-x:focus-visible, .fa-send:focus-visible, .fa-chip:focus-visible, .fa-input:focus-visible { outline: 2px solid var(--fa-amber); outline-offset: 2px; }

.fa-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--fa-soft); scroll-behavior: smooth; }
.fa-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: flex-end; animation: fa-rise .25s ease both; }
.fa-row.me { justify-content: flex-end; }
.fa-row > img { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; }
.fa-msg { max-width: 82%; padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: var(--fa-paper); border: 1px solid var(--fa-line); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.fa-row.me .fa-msg { background: var(--fa-amber); border-color: var(--fa-amber); color: var(--fa-night); border-radius: 16px 16px 4px 16px; }
.fa-msg p { margin: 0 0 6px; } .fa-msg p:last-child { margin: 0; }
.fa-msg a { color: var(--fa-ink); font-weight: 600; text-underline-offset: 2px; }
.fa-msg ul { margin: 4px 0 6px; padding-left: 18px; } .fa-msg li { margin: 2px 0; }
.fa-card { display: flex; gap: 10px; align-items: center; margin: 2px 0 8px; padding: 8px 10px; border-radius: 12px; background: var(--fa-soft); }
.fa-card img { width: 40px; height: 40px; flex: none; }
.fa-card b { display: block; font-size: 15px; }
.fa-card span { font-size: 12.5px; color: var(--fa-slate); }
.fa-price { font-variant-numeric: tabular-nums; }
.fa-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.fa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9AA4B5; animation: fa-blink 1.2s infinite ease-in-out; }
.fa-typing i:nth-child(2) { animation-delay: .15s; } .fa-typing i:nth-child(3) { animation-delay: .3s; }

.fa-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 10px; background: var(--fa-soft); }
.fa-chip { border: 1px solid #C9D1DE; background: var(--fa-paper); color: var(--fa-ink); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13.5px; cursor: pointer; transition: background .15s, border-color .15s; }
.fa-chip:hover { border-color: var(--fa-ink); background: #FFF8EC; }

.fa-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--fa-line); background: var(--fa-paper); }
.fa-input { flex: 1; min-width: 0; height: 42px; border: 1px solid #C9D1DE; border-radius: 12px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--fa-ink); background: #fff; }
.fa-input::placeholder { color: #8A94A6; }
.fa-send { width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--fa-ink); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.fa-send:hover { background: #24324F; }
.fa-send svg { width: 18px; height: 18px; }
.fa-foot { padding: 0 14px 10px; background: var(--fa-paper); font-size: 11.5px; color: var(--fa-slate); text-align: center; }
.fa-foot a { color: var(--fa-ink); }

@keyframes fa-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fa-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes fa-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .fa-root *, .fa-teaser, .fa-panel { animation: none !important; transition: none !important; } }

/* Phones: the chat takes the whole screen */
@media (max-width: 520px) {
  .fa-panel { right: 0; bottom: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
  .fa-root.open .fa-launch, .fa-root.open .fa-teaser { display: none; }
  .fa-launch { right: 16px; bottom: 16px; width: 58px; height: 58px; }
  .fa-teaser { right: 84px; bottom: 24px; max-width: calc(100vw - 110px); }
}
