/* Every selector belongs to the assistant; existing page styles are untouched. */
.koc-assistant { --ka-primary:#6262d9; --ka-soft:#f0f0ff; --ka-text:#292b3d; --ka-muted:#858896; font-family:inherit; color:var(--ka-text); font-size:14px; }
.koc-assistant *, .koc-assistant *::before, .koc-assistant *::after { box-sizing:border-box; }
.koc-assistant button, .koc-assistant textarea { font:inherit; }
.koc-assistant button { cursor:pointer; }
.koc-assistant button:disabled { cursor:default; opacity:.45; }
.koc-assistant button:focus-visible, .koc-assistant a:focus-visible, .koc-assistant summary:focus-visible { outline:2px solid var(--ka-primary); outline-offset:3px; }
.koc-assistant .ka-launcher { position:fixed; right:26px; bottom:26px; z-index:1100; display:flex; align-items:center; gap:9px; height:48px; padding:0 18px 0 10px; border:1px solid #e6e5fb; border-radius:25px; background:#fff; color:#4b4bb8; font-weight:600; box-shadow:0 5px 22px #44449825; transition:transform .15s,box-shadow .15s; }
.koc-assistant .ka-launcher:hover { transform:translateY(-2px); box-shadow:0 8px 28px #44449835; }
.koc-assistant .ka-spark { display:grid; place-items:center; width:32px; height:32px; border-radius:11px; background:linear-gradient(140deg,#8b8bf5,#6560d8 65%,#a18af0); color:#fff; font-size:28px; line-height:1; }
.koc-assistant .ka-panel { position:fixed; z-index:1200; right:22px; bottom:22px; width:480px; max-width:calc(100vw - 32px); height:min(800px,calc(100dvh - 100px)); display:flex; flex-direction:column; overflow:hidden; border:1px solid #e3e3ec; border-radius:18px; background:#fff; box-shadow:0 16px 70px #25234b2b,0 2px 10px #25234b10; }
.koc-assistant .ka-panel.ka-wide { width:720px; }
.koc-assistant .ka-header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:19px 19px 15px; flex-shrink:0; background:linear-gradient(120deg,#f8f8ff,#fff); border-bottom:1px solid #efeff6; }
.koc-assistant .ka-brand { display:flex; align-items:center; gap:10px; }
.koc-assistant .ka-brand strong { display:block; font-size:16px; letter-spacing:.2px; }
.koc-assistant .ka-brand small { display:block; font-size:11px; color:var(--ka-muted); margin-top:3px; }
.koc-assistant .ka-tools { display:flex; gap:3px; }
.koc-assistant .ka-tools button { border:0; background:transparent; border-radius:7px; color:#777989; width:30px; height:32px; font-size:23px; line-height:1; }
.koc-assistant .ka-tools button:hover:not(:disabled) { background:var(--ka-soft); color:var(--ka-primary); }
.koc-assistant .ka-tools svg { width:18px; height:18px; vertical-align:middle; }
.koc-assistant .ka-context { display:flex; align-items:center; gap:7px; padding:10px 21px; font-size:11px; color:#6f7284; background:#fcfcfe; border-bottom:1px solid #f2f2f7; flex-shrink:0; }
.koc-assistant .ka-context-dot { width:5px; height:5px; background:#7b7bdc; border-radius:50%; }
.koc-assistant .ka-context-hint { margin-left:auto; color:#a2a4af; }
.koc-assistant .ka-messages, .koc-assistant .ka-history, .koc-assistant .ka-source-detail { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:22px; scrollbar-width:thin; }
.koc-assistant .ka-welcome { padding:12px 2px 18px; }
.koc-assistant .ka-welcome-mark { font-size:43px; color:#7b75dc; margin-bottom:13px; line-height:1; }
.koc-assistant .ka-welcome h2 { font-size:27px; line-height:1.5; font-weight:600; margin:0 0 12px; color:#313249; letter-spacing:-.6px; }
.koc-assistant .ka-welcome p { font-size:13px; line-height:1.9; color:#818393; margin:0 0 26px; }
.koc-assistant .ka-suggestion-label { font-size:11px; color:#989aa7; margin-bottom:10px; }
.koc-assistant .ka-suggestion { display:flex; justify-content:space-between; align-items:center; gap:15px; width:100%; padding:13px 14px; margin:0 0 9px; border:1px solid #ececf5; background:#fafaff; color:#525368; border-radius:10px; text-align:left; font-size:13px; line-height:1.5; }
.koc-assistant .ka-suggestion span { color:#9191b7; }
.koc-assistant .ka-suggestion:hover:not(:disabled) { border-color:#c9c8f3; background:#f4f3ff; }
.koc-assistant .ka-exchange { margin:0 0 28px; }
.koc-assistant .ka-question { width:fit-content; max-width:92%; margin:0 0 23px auto; padding:13px 16px; background:#eeeefa; color:#41425e; border-radius:13px 13px 3px 13px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; }
.koc-assistant .ka-answer-heading { display:flex; align-items:center; gap:7px; color:#77788b; font-size:11px; margin-bottom:12px; }
.koc-assistant .ka-mini-spark { font-size:23px; color:#7772da; line-height:1; }
.koc-assistant .ka-sources { margin-bottom:14px; border:1px solid #ededf6; background:#f9f9fd; border-radius:10px; padding:11px 12px; }
.koc-assistant .ka-sources summary { font-size:12px; color:#646780; cursor:pointer; }
.koc-assistant .ka-sources summary span { float:right; font-size:11px; color:#9596aa; }
.koc-assistant .ka-sources button { display:block; width:100%; border:0; background:transparent; text-align:left; color:#6462bd; font-size:12px; line-height:1.7; margin-top:10px; padding:0; }
.koc-assistant .ka-sources button span { display:inline-block; margin-right:7px; color:#9795c5; }
.koc-assistant .ka-answer { font-size:14px; line-height:1.95; white-space:pre-wrap; overflow-wrap:anywhere; color:#393b4f; }
.koc-assistant .ka-citation { display:inline-grid; place-items:center; vertical-align:super; background:#eeedff; color:#716ac8; border:0; border-radius:5px; height:18px; min-width:18px; font-size:10px; padding:0 4px; margin:0 2px; }
.koc-assistant .ka-cursor { display:inline-block; width:6px; height:14px; margin-left:4px; background:#8b84d8; animation:ka-blink 1s infinite; vertical-align:middle; }
@keyframes ka-blink { 50% { opacity:.3; } }
.koc-assistant .ka-answer-status { font-size:11px; color:#9895ab; margin-top:9px; }
.koc-assistant .ka-answer-tools { display:flex; gap:12px; flex-wrap:wrap; margin-top:13px; }
.koc-assistant .ka-answer-tools button, .koc-assistant .ka-text-button { font-size:11px; border:0; background:transparent; color:#9191a3; padding:2px 0; }
.koc-assistant .ka-answer-tools button:hover, .koc-assistant .ka-answer-tools .selected { color:var(--ka-primary); }
.koc-assistant .ka-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.koc-assistant .ka-action { display:inline-block; text-decoration:none; color:#6a64bd; background:#f7f6ff; border:1px solid #e8e6fa; padding:7px 11px; border-radius:7px; font-size:12px; line-height:1.5; }
.koc-assistant .ka-footer { flex-shrink:0; padding:13px 18px 11px; background:#fff; border-top:1px solid #f4f3f9; }
.koc-assistant .ka-composer { padding:12px 12px 9px; border:1px solid #c7c5ed; background:#fff; border-radius:12px; box-shadow:0 2px 9px #7066c708; }
.koc-assistant .ka-composer:focus-within { border-color:#8980d9; box-shadow:0 0 0 2px #7970db12; }
.koc-assistant .ka-composer textarea { display:block; width:100%; height:53px; resize:none; border:0; outline:0; background:transparent; color:#45455c; line-height:1.7; padding:0; font-size:13px; }
.koc-assistant .ka-composer textarea::placeholder { color:#adaebc; }
.koc-assistant .ka-composer-bottom { display:flex; align-items:center; justify-content:space-between; gap:6px; color:#acacba; font-size:10px; margin-top:4px; }
.koc-assistant .ka-send { width:31px; height:31px; display:grid; place-items:center; padding:0; border:0; border-radius:9px; background:#7069cc; color:#fff; font-size:23px; line-height:1; }
.koc-assistant .ka-send:disabled { background:#cac8e8; opacity:.8; }
.koc-assistant .ka-stop { font-size:11px; }
.koc-assistant .ka-disclaimer { font-size:10px; color:#a7a8b4; text-align:center; margin:9px 0 0; line-height:1.5; }
.koc-assistant .ka-composer-disabled { background:#fafafa; border-color:#e7e7ed; }
.koc-assistant .ka-error { position:relative; flex-shrink:0; background:#fff6eb; color:#946a38; margin:10px 15px 0; padding:9px 28px 9px 11px; font-size:12px; line-height:1.7; border-radius:8px; }
.koc-assistant .ka-error button { position:absolute; right:7px; top:8px; border:0; color:inherit; background:none; }
.koc-assistant .ka-notice { padding:8px; color:#6f68bb; background:#f6f5ff; text-align:center; font-size:12px; }
.koc-assistant .ka-loading { flex-shrink:0; padding:8px; color:#888; text-align:center; font-size:12px; }
.koc-assistant .ka-subhead { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:22px; font-size:10px; color:#999; }
.koc-assistant .ka-subhead button { background:transparent; color:#7570bb; border:0; padding:0; font-size:12px; }
.koc-assistant .ka-empty { color:#999; text-align:center; padding:70px 0; }
.koc-assistant .ka-history-item { display:flex; align-items:center; gap:10px; padding:13px 0; border-bottom:1px solid #f0f0f5; flex-wrap:wrap; }
.koc-assistant .ka-history-title { flex:1; min-width:0; border:0; background:transparent; text-align:left; color:#55566a; padding:0; }
.koc-assistant .ka-history-title strong { display:block; font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.koc-assistant .ka-history-title small { display:block; color:#aaa; font-size:10px; margin-top:5px; }
.koc-assistant .ka-delete-confirm { display:flex; gap:7px; font-size:10px; color:#a07575; align-items:center; }
.koc-assistant .ka-delete-confirm button { border:0; background:#f8f6f6; color:#946b6b; padding:4px; font-size:10px; }
.koc-assistant .ka-eyebrow { color:#9894b9; font-size:11px; margin-bottom:7px; }
.koc-assistant .ka-source-detail h3 { font-size:19px; margin:0 0 18px; color:#444159; line-height:1.5; }
.koc-assistant .ka-source-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.95; color:#5c5c70; margin-bottom:20px; }
.koc-assistant .ka-source-update { color:#9b7e48; font-size:12px; margin-bottom:10px; }
.koc-assistant .ka-recover { border:0; color:#746bc6; background:#f7f6ff; padding:8px; margin-bottom:8px; font-size:11px; border-radius:7px; width:100%; }
@media (max-width:600px) {
    .koc-assistant .ka-panel, .koc-assistant .ka-panel.ka-wide { right:0; bottom:0; width:100vw; max-width:none; height:100dvh; border:0; border-radius:0; }
    .koc-assistant .ka-launcher { right:16px; bottom:calc(18px + env(safe-area-inset-bottom)); height:44px; }
    .koc-assistant .ka-header { padding-top:calc(15px + env(safe-area-inset-top)); }
    .koc-assistant .ka-footer { padding-bottom:calc(11px + env(safe-area-inset-bottom)); }
    .koc-assistant .ka-expand { display:none; }
    .koc-assistant .ka-messages, .koc-assistant .ka-history, .koc-assistant .ka-source-detail { padding:19px; }
    .koc-assistant .ka-composer textarea { font-size:16px; }
}
@media (prefers-reduced-motion:reduce) {
    .koc-assistant .ka-cursor { animation:none; }
    .koc-assistant .ka-launcher { transition:none; }
}

/* Pointer gestures are restricted to the launcher so page scrolling stays unchanged. */
.koc-assistant .ka-launcher { touch-action:none; user-select:none; -webkit-user-select:none; cursor:grab; }
.koc-assistant .ka-launcher.ka-dragging { cursor:grabbing; transform:none; transition:none; }
