/* VIPL Assistant panel (assistant.js) — design-system tokens only.
   Shell: same geometry as the side drawer (560 wide, 12 from top / right / bottom, radius 20, shadow level 2, drawer slide-in), but non-modal: no scrim, the page stays usable. The FAB hides while it is open. */
.as-panel{position:fixed;top:12px;right:12px;bottom:12px;width:560px;animation:drawerIn var(--dur-slow,.24s) var(--ease-drawer,ease);display:flex;flex-direction:column;background:var(--bg-surface);border-radius:var(--r-3xl);box-shadow:var(--shadow-2);z-index:20;overflow:hidden}
.as-panel[hidden]{display:none}
/* header: reuses the drawer header (.ov-head / .ttl / .close) unchanged */
.as-ctx{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.icon-btn.as-ghost{border:0;background:none;color:var(--text-brand)}
.icon-btn.as-ghost:hover{background:var(--bg-brand-subtle)}
/* body scrolls; footer is fixed */
.as-body{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px}
.as-clamp{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.as-msgs{display:flex;flex-direction:column;gap:12px}
.as-row{display:flex;gap:8px;align-items:flex-start}
.as-row.you{justify-content:flex-end}
.as-bubble{background:var(--bg-subtle);border-radius:var(--r-xl);padding:12px 16px;max-width:80%;display:flex;flex-direction:column;gap:8px;overflow-wrap:anywhere}
.as-bubble.you{background:var(--bg-brand-subtle);color:var(--text-primary)}
.as-bubble b{font-weight:700}
.as-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px}
.as-file{display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:16px;font-weight:600;color:var(--text-brand)}
/* footer: suggestions · mode segment · composer · note (top stroke, 16 padding) */
.as-foot{flex:none;display:flex;flex-direction:column;gap:12px;padding:16px;border-top:1px solid var(--border-default)}
.as-sug{display:flex;flex-wrap:wrap;gap:8px}
.as-foot .segment{max-width:100%}
.as-foot .seg{padding:0 12px}
/* one field: the outer box draws the border + focus ring; the textarea inside is borderless and transparent, inset by the padding so it never covers the ring */
.as-compose{display:flex;flex-direction:column;gap:8px;border:1px solid var(--border-default);border-radius:var(--r-md);padding:8px;background:var(--bg-surface)}
.as-compose:hover{border-color:var(--border-strong)}
.as-compose:focus-within{border-color:var(--border-focus);box-shadow:inset 0 0 0 0.5px var(--border-focus),0 0 0 1px var(--border-focus)}
.as-input.input,.as-input.input:hover,.as-input.input:focus{height:auto;min-height:44px;max-height:120px;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none;padding:4px 8px;resize:none;font:inherit;line-height:20px}
.as-attached{display:flex;align-items:center;gap:8px;margin:0 4px;padding:4px 4px 4px 12px;border-radius:var(--r-md);background:var(--bg-subtle);font-size:12px;font-weight:600}
.as-crow{gap:4px;align-items:center}
.icon-btn.as-send{border:0;background:var(--bg-brand);color:#fff}
.icon-btn.as-send:hover{background:var(--bg-brand-hover)}
.icon-btn.as-send:disabled{opacity:.4;cursor:default;background:var(--bg-brand)}
.btn.ghost.s:has(input[type=file]){cursor:pointer}
/* FAB pressed while the panel is open */
.fab.on{display:none}
/* phone width: full width with the 16 px gutter */
@media (max-width:600px){.as-panel{left:12px;width:auto}}
/* ---------- reply types (all from existing pieces: bordered card, tiles, link/secondary buttons, chips, pbar, infobar, empty) ---------- */
.as-stack{flex:1;min-width:0;align-items:flex-start}
.as-stack>.as-card,.as-stack>.as-esc{align-self:stretch}
.as-g4{gap:4px}.as-g8{gap:8px}.as-g12{gap:12px}
/* bordered card inside the chat: 1 px border/default, radius 16, pad 16, gap 12 */
.as-card{border:1px solid var(--border-default);border-radius:var(--r-2xl);padding:16px;display:flex;flex-direction:column;gap:12px;background:var(--bg-surface)}
.as-ctop{display:flex;align-items:center;gap:8px}
.as-ctop>.grow,.as-link>.grow{flex:1;min-width:0}
.as-link{display:flex;align-items:center;gap:12px}
.as-link .btn{flex:none}
.as-res{align-items:center;padding:8px}
.as-res .as-arrow{color:var(--text-tertiary);display:grid}
.as-res:hover .as-arrow{color:var(--text-brand)}
.as-res .chip{flex:none}
.as-bal{display:grid;grid-template-columns:minmax(0,1fr) 120px max-content;align-items:center;gap:12px}
.as-num{text-align:right;white-space:nowrap}
.as-esc{align-items:flex-start;font-weight:600}
.as-esc>svg{flex:none;margin-top:1px}
.as-card .empty.as-empty{padding:8px}
.as-day{display:flex;justify-content:center}
.as-day .np-group{padding:0}
.as-fb{gap:4px;align-items:center}
.as-fb .btn.s{height:28px}
/* typing: three dots */
.as-dots{display:inline-flex;gap:4px;padding:4px 0}
.as-dots i{width:6px;height:6px;border-radius:999px;background:var(--text-tertiary);animation:asDot 1s infinite ease-in-out}
.as-dots i:nth-child(2){animation-delay:.15s}.as-dots i:nth-child(3){animation-delay:.3s}
@keyframes asDot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.as-dots i{animation:none;opacity:.6}}
