/* ---- knowledge assistant (bottom right) ----------------------------------
   Sits where the dead telephone button was. It answers from published records
   only, and says so plainly when it does not know — a confident wrong answer
   about MOQ or a certificate is the failure mode worth designing against. */
.kb{position:fixed;right:20px;bottom:20px;z-index:80;display:grid;justify-items:end;gap:10px}

.kb__btn{width:52px;height:52px;border-radius:var(--r-pill);border:0;cursor:pointer;
  background:var(--ink);color:#fff;display:grid;place-items:center;
  box-shadow:0 6px 18px rgba(14,31,24,.22);transition:transform .15s ease}
.kb__btn:hover{transform:translateY(-3px)}
.kb__btn::after{content:'';position:absolute;width:0;height:0}

.kb__panel{width:min(400px,calc(100vw - 32px));max-height:min(620px,calc(100vh - 120px));
  background:#fff;border:1px solid var(--line);border-radius:16px;
  box-shadow:0 18px 48px rgba(14,31,24,.20);display:flex;flex-direction:column;
  overflow:hidden;transform-origin:bottom right}
.kb__panel[hidden]{display:none}

.kb__h{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;
  padding:15px 18px;background:var(--ink);color:#fff}
.kb__h b{display:block;font-family:Archivo,Helvetica,Arial,sans-serif;font-size:15px}
.kb__h span{font-size:12px;opacity:.72}
.kb__x{background:none;border:0;color:#fff;cursor:pointer;font-size:20px;line-height:1;
  padding:4px 6px;border-radius:6px}
.kb__x:hover{background:rgba(255,255,255,.14)}

.kb__log{flex:1;overflow-y:auto;padding:16px 18px;display:grid;gap:12px;align-content:start}

.kb__m{max-width:88%;padding:11px 14px;border-radius:13px;font-size:14px;line-height:1.55}
.kb__m--q{justify-self:end;background:var(--brand-050);color:var(--ink);
  border-bottom-right-radius:4px}
.kb__m--a{background:#F7FAF8;border:1px solid var(--line);border-bottom-left-radius:4px;
  white-space:pre-wrap}
.kb__m--miss{background:#FFF8EC;border-color:#E8C98A;color:#6B4A00}

.kb__src{display:block;margin-top:9px;padding-top:9px;border-top:1px dashed var(--line);
  font-size:12.5px}
.kb__src a{color:var(--brand);font-weight:700;text-decoration:none}
.kb__src a:hover{text-decoration:underline}
.kb__src img{max-width:100%;margin-top:9px;border-radius:8px;border:1px solid var(--line);
  display:block}

.kb__chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.kb__chips button{font:inherit;font-size:12.5px;padding:6px 11px;border-radius:99px;
  border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer}
.kb__chips button:hover{border-color:var(--brand);color:var(--brand)}

.kb__cta{display:block;margin-top:11px;padding:10px 13px;background:var(--brand);
  color:#fff;border-radius:9px;text-decoration:none;font-weight:700;font-size:13.5px;
  text-align:center}
.kb__cta:hover{background:#0F5C3C}

.kb__form{display:flex;gap:8px;padding:12px 14px;border-top:1px solid var(--line);background:#FBFCFB}
.kb__form input{flex:1;min-width:0;font:inherit;font-size:14px;padding:11px 13px;
  border:1px solid var(--line);border-radius:10px;background:#fff}
.kb__form input:focus{outline:2px solid var(--brand);outline-offset:1px}
.kb__form button{font:inherit;font-weight:700;font-size:14px;padding:11px 18px;
  border:0;border-radius:10px;background:var(--brand);color:#fff;cursor:pointer;white-space:nowrap}
.kb__form button:hover{background:#0F5C3C}
.kb__form button:disabled{opacity:.5;cursor:default}

.kb__foot{padding:0 14px 12px;font-size:11.5px;color:var(--muted);background:#FBFCFB;
  line-height:1.45}

@media (max-width:640px){
  .kb{right:14px;bottom:14px}
  .kb__panel{width:calc(100vw - 28px)}
}

/* Respect a reduced-motion preference: the panel appears instantly rather than
   animating, so nothing on this path is decorative time. */
@media (prefers-reduced-motion:reduce){
  .kb__btn{transition:none}
}