.qa-launch,.qa-panel button,.qa-panel textarea {font:inherit}
.qa-launch {position:fixed;right:max(1.3rem,env(safe-area-inset-right));bottom:max(1.3rem,env(safe-area-inset-bottom));z-index:50;display:inline-flex;align-items:center;gap:.48rem;padding:.72rem 1rem;border:1px solid #8cb8d0;border-radius:2rem;background:#123e59;color:#fff;box-shadow:0 4px 18px #081c3340;cursor:pointer;font-weight:700}
.qa-launch:hover {background:#185574}
.qa-launch svg {width:1.4em;height:1.4em;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.65}
dialog.qa-panel {position:fixed;inset:0 0 0 auto;width:min(100%,29rem);max-width:100%;height:100%;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-inline-start:1px solid var(--line);border-radius:0;background:var(--panel,#fff);color:var(--ink,#17364a);box-shadow:-8px 0 40px #0a20352b;overflow:hidden;font-size:1rem}
dialog.qa-panel[open] {display:flex;flex-direction:column}
.qa-panel::backdrop {background:#0d24384f}
.qa-panel [hidden] {display:none!important}
.qa-panel button,.qa-launch {cursor:pointer}
.qa-panel button:disabled {opacity:.55;cursor:wait}
.qa-panel :focus-visible,.qa-launch:focus-visible {outline:3px solid var(--focus,#256e94);outline-offset:2px}
.qa-head {display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.2rem 1.25rem;background:#123e59;color:white}
.qa-head h2 {margin:0;font-size:1.32rem;color:white;line-height:1.5}
.qa-mode {color:#daeaf3;font-size:.88rem}
.qa-close {display:grid;place-items:center;background:transparent;color:white;border:1px solid #86a8be;border-radius:.55rem;width:2.6rem;height:2.6rem;font-size:1.5rem!important}
.qa-context {padding:.6rem 1.2rem;background:var(--panel2,#edf3f5);color:var(--muted,#415e70);border-bottom:1px solid var(--line);font-size:.9rem;line-height:1.5}
.qa-chat {flex:1;min-height:0;padding:1.1rem 1rem;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.qa-welcome {padding:.7rem .35rem}
.qa-welcome h3,.qa-msg h3 {font-size:1.07rem;margin:0 0 .4rem;color:var(--strong-ink)}
.qa-welcome p,.qa-msg p {line-height:1.65;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.qa-welcome p,.qa-note {color:var(--muted,#415e70)}
.qa-msg {margin:0 0 1rem;max-width:100%;font-size:var(--summary-size,1rem)}
.qa-msg.qa-user {margin-inline-start:auto;width:fit-content;max-width:89%;padding:.62rem .9rem;background:var(--selected,#d8ebf5);border-radius:.9rem .9rem .25rem .9rem}
.qa-msg h3:not(:first-child) {margin-top:.9rem}
.qa-ref {padding:.65rem 0;border-bottom:1px solid var(--line);line-height:1.5}
.qa-ref:last-child {border-bottom:0}
.qa-article-link,.qa-original {color:var(--cyan,#075c82);text-decoration:underline;text-underline-offset:3px;text-align:start}
.qa-article-link {display:block;font-weight:650}
.qa-original,.qa-note {font-size:.9rem}
.qa-excerpt {margin-top:.22rem!important}
.qa-prompts {display:flex;flex-wrap:wrap;gap:.45rem;padding:.5rem 1rem .9rem}
.qa-prompt {background:var(--control,#f6fbfe);color:var(--cyan,#075c82);border:1px solid var(--line);border-radius:1rem;padding:.45rem .7rem;text-align:start}
.qa-form {display:block;padding:.85rem 1rem max(.9rem,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--panel2,#edf3f5)}
.qa-row {display:flex;align-items:stretch;gap:.55rem}
.qa-row textarea {flex:1;min-width:0;resize:none;line-height:1.4;color:var(--ink);background:var(--field,#fff);border:1px solid var(--field-edge,#7290a2);border-radius:.6rem;padding:.6rem .7rem}
.qa-send {border:0;border-radius:.6rem;background:var(--cyan,#075c82);color:var(--on-accent,#fff);padding:0 .85rem}
.qa-clear {padding:.45rem 0 0;border:0;background:none;color:var(--muted,#415e70);text-decoration:underline;text-underline-offset:3px;font-size:.88rem!important}
@media(max-width:520px){.qa-launch{right:.75rem;bottom:max(.8rem,env(safe-area-inset-bottom));padding:.58rem .85rem}.qa-head{padding:.8rem 1rem}.qa-form{padding-inline:.75rem}.qa-chat{padding:.8rem}}
@media print{.qa-launch,.qa-panel{display:none!important}}
.qa-original {text-decoration:none;overflow-wrap:anywhere;user-select:all}
