.kb-launch{position:fixed;right:1.25rem;bottom:1.25rem;z-index:40;display:flex;align-items:center;gap:.65rem;border:0;border-radius:999px;background:var(--navy);color:#fff;font:800 .82rem "Source Sans 3",Inter,sans-serif;letter-spacing:.02em;padding:.85rem 1.15rem;box-shadow:0 12px 30px rgba(4,29,53,.28);cursor:pointer}
.kb-launch:hover{background:#0b3b63}
.kb-dialog{position:fixed;right:1.25rem;bottom:4.8rem;z-index:41;width:min(420px,calc(100vw - 1.5rem));height:min(620px,calc(100vh - 7rem));display:none;flex-direction:column;background:#fff;border:1px solid var(--line);box-shadow:0 24px 60px rgba(4,29,53,.22)}
.kb-dialog.is-open{display:flex}
.kb-dialog header{background:var(--navy-deep);color:#fff;padding:1rem 1.1rem .9rem;display:flex;justify-content:space-between;gap:1rem}
.kb-dialog header p{margin:.25rem 0 0;color:#c5d5e2;font-size:.78rem;line-height:1.45}
.kb-dialog header strong{display:block;font-size:.95rem;letter-spacing:.01em}
.kb-dialog header button{border:0;background:transparent;color:#fff;font-size:1.2rem;cursor:pointer}
.kb-thread{flex:1;overflow:auto;padding:1rem;background:var(--mist);display:flex;flex-direction:column;gap:.75rem}
.kb-msg{max-width:92%;padding:.75rem .85rem;font-size:.86rem;line-height:1.55;border:1px solid var(--line);background:#fff}
.kb-msg.user{align-self:flex-end;background:var(--navy);color:#fff;border-color:var(--navy)}
.kb-msg .kb-meta{display:block;margin-top:.55rem;font-size:.72rem;color:#5b7286}
.kb-msg.user .kb-meta{color:#c5d5e2}
.kb-sources{margin:.55rem 0 0;padding:0;list-style:none}
.kb-sources li{font-size:.72rem;color:#275146;margin:.2rem 0}
.kb-related{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.55rem}
.kb-related button{border:1px solid var(--line);background:#fff;color:var(--navy);font:700 .72rem inherit;padding:.3rem .5rem;cursor:pointer}
.kb-chips{display:flex;flex-wrap:wrap;gap:.35rem;padding:.55rem .8rem 0;background:#fff;border-top:1px solid var(--line)}
.kb-chip{border:1px solid var(--line);background:#fff;color:var(--navy);font:700 .68rem inherit;padding:.28rem .5rem;cursor:pointer;border-radius:99px}
.kb-chip.is-on{background:var(--navy);color:#fff;border-color:var(--navy)}
.kb-query{white-space:pre-wrap;font:600 .72rem/1.45 ui-monospace,monospace;margin:.55rem 0 0;color:#275146}
.kb-form{display:flex;gap:.45rem;padding:.8rem;border-top:1px solid var(--line);background:#fff}
.kb-form textarea{flex:1;min-height:2.6rem;max-height:6.5rem;resize:vertical;border:1px solid var(--line);font:inherit;padding:.55rem .65rem}
.kb-form button{border:0;background:var(--emerald);color:#fff;font:800 .78rem inherit;padding:0 .9rem;cursor:pointer}
.kb-form button:disabled{opacity:.55;cursor:wait}
.kb-launch[hidden]{display:none!important}
.kb-dialog.kb-inline{position:static;right:auto;bottom:auto;z-index:1;width:100%;height:auto;min-height:28rem;display:flex;box-shadow:none;border:0}
.kb-dialog.kb-inline .kb-thread{min-height:10rem;max-height:16rem}
.kb-dialog.kb-inline header button{display:none}
@media(max-width:640px){
  .kb-dialog{right:.5rem;left:.5rem;width:auto;bottom:4.4rem;height:min(70vh,560px)}
  .kb-launch{right:.75rem;bottom:.75rem}
}
