/* Rook V1 widget. Self-contained; colors follow the site's navy / cool-blue / off-white tokens. */
.rook{--r-navy:#0b1530;--r-navy2:#141c4a;--r-blue:#2563eb;--r-cyan:#14d4f0;--r-off:#fbfcff;--r-tint:#f0f4fd;--r-line:#e2e8f6;--r-ink:#0f1b3d;--r-muted:#57638a;
  position:fixed;right:20px;bottom:20px;z-index:1000;font-family:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.rook *{box-sizing:border-box}
.rook-fab{width:64px;height:64px;border-radius:50%;border:0;padding:0;cursor:pointer;background:var(--r-navy);
  box-shadow:0 10px 28px -8px rgba(11,21,48,.55),0 0 0 2px rgba(37,99,235,.35);display:grid;place-items:center;transition:transform .15s}
.rook-fab:hover{transform:translateY(-2px)}
.rook-fab img{width:64px;height:64px;border-radius:50%}
.rook-fab .glyph{color:#fff;font-size:30px;line-height:1}
.rook-fab:focus-visible,.rook button:focus-visible,.rook textarea:focus-visible,.rook a:focus-visible{outline:3px solid var(--r-cyan);outline-offset:3px}

.rook-panel{position:absolute;right:0;bottom:78px;width:min(380px,calc(100vw - 32px));height:min(580px,calc(100dvh - 120px));
  background:var(--r-off);border:1px solid var(--r-line);border-radius:18px;overflow:hidden;display:flex;flex-direction:column;
  box-shadow:0 24px 60px -18px rgba(11,21,48,.45)}
.rook-panel[hidden]{display:none}
.rook-head{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 14px;background:linear-gradient(120deg,var(--r-navy),var(--r-navy2));color:#fff}
.rook-head img{width:36px;height:36px;border-radius:50%;flex:none}
.rook-head .t{flex:1;min-width:0}
.rook-head h2{margin:0;font-size:1rem;font-weight:800;letter-spacing:-.01em;color:#fff}
.rook-head p{margin:0;font-size:.78rem;color:#b8c3e6}
.rook-close{width:40px;height:40px;border:0;border-radius:10px;background:transparent;color:#dbe3fb;font-size:22px;cursor:pointer}
.rook-close:hover{background:rgba(255,255,255,.1)}

.rook-log{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;font-size:.93rem;line-height:1.55;color:var(--r-ink)}
.rook-msg{max-width:88%;padding:10px 13px;border-radius:14px;overflow-wrap:anywhere}
.rook-msg p{margin:0}
.rook-msg p+p,.rook-msg p+ul,.rook-msg ul+p{margin-top:8px}
.rook-msg ul{margin:0;padding-left:18px}
.rook-msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--r-line);border-bottom-left-radius:4px}
.rook-msg.me{align-self:flex-end;background:var(--r-blue);color:#fff;border-bottom-right-radius:4px}
.rook-msg.note{background:var(--r-tint)}
.rook-links{margin-top:9px;padding-top:8px;border-top:1px solid var(--r-line);display:grid;gap:4px;font-size:.85rem}
.rook-links a{color:var(--r-blue);font-weight:600;text-decoration:none}
.rook-links a:hover{text-decoration:underline}
.rook-starters{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.rook-starters button{font:inherit;font-size:.87rem;font-weight:600;color:var(--r-blue);background:#fff;border:1px solid #c9d6f5;border-radius:999px;
  padding:8px 13px;min-height:40px;cursor:pointer;text-align:left}
.rook-starters button:hover{background:var(--r-tint)}
.rook-typing{display:inline-flex;gap:4px;padding:4px 2px}
.rook-typing i{width:7px;height:7px;border-radius:50%;background:var(--r-muted);opacity:.35;animation:rook-dot 1s infinite}
.rook-typing i:nth-child(2){animation-delay:.15s}.rook-typing i:nth-child(3){animation-delay:.3s}
@keyframes rook-dot{50%{opacity:1}}

.rook-form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--r-line);background:#fff}
.rook-form textarea{flex:1;resize:none;font:inherit;font-size:16px;line-height:1.4;color:var(--r-ink);border:1px solid var(--r-line);border-radius:12px;padding:9px 11px;min-height:44px;max-height:110px}
.rook-form button{flex:none;min-width:64px;min-height:44px;border:0;border-radius:12px;background:var(--r-blue);color:#fff;font:inherit;font-weight:700;cursor:pointer}
.rook-form button:disabled{opacity:.5;cursor:default}
.rook-foot{padding:0 12px 8px;background:#fff;font-size:.72rem;color:var(--r-muted);display:flex;justify-content:space-between}
.rook-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@media (max-width:520px){
  .rook{right:16px;bottom:16px}
  .rook-fab,.rook-fab img{width:58px;height:58px}
  .rook-panel{position:fixed;right:16px;left:16px;bottom:86px;width:auto;height:calc(100dvh - 110px)}
}
@media (prefers-reduced-motion:reduce){.rook-typing i{animation:none;opacity:.7}.rook-fab{transition:none}}
