/* Ask the Brain: summarize card (Explore tab) and chat (Ask tab). Same tokens as the rest of the atlas; no new colours. */
.tabs .tab { padding-inline: 13px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.card-actions .btn.summarize, .selcard .btn.summarize { width: 100%; justify-content: flex-start; border-color: var(--accent-line); background: var(--accent-soft); color: #fff; }
.card-actions .btn.summarize:hover { background: rgba(80,125,235,.26); }

.summarycard { padding: 14px 16px; margin: 12px 0 14px; display: grid; gap: 10px; border-color: var(--accent-line); }
.sumhead { display: flex; align-items: center; gap: 8px; }
.sumhead h3 { font-size: 15px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.sumhead .grow { flex: 1; }
.ask-wait { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--accent); animation: askspin .8s linear infinite; }
@keyframes askspin { to { transform: rotate(360deg); } }
html[data-motion="reduced"] .spin { animation-duration: 3s; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick .btn { gap: 8px; }

/* answer text */
.ask-text { display: grid; gap: 8px; font-size: 13.5px; line-height: 1.55; color: #dbe2f6; overflow-wrap: anywhere; }
.ask-text strong { color: #fff; font-weight: 600; }
.ask-list { display: grid; gap: 5px; padding-left: 18px; list-style: disc; }
.ask-list li::marker { color: var(--faint); }
.ask-h { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 6px; }
.cite { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin: 0 1px 0 3px; padding: 0 5px; vertical-align: 1px; border: 1px solid var(--accent-line); border-radius: 9px; background: var(--accent-soft); color: #cfe0ff; font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; }
.cite:hover { background: rgba(80,125,235,.32); color: #fff; }
.ask-basis { margin-top: 8px; }
.ask-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; }
.ask-note .ico { flex: none; margin-top: 2px; }
.ask-note.warn { color: #f0c27c; }
.ask-src { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--raise); }
.ask-src > summary { cursor: pointer; padding: 8px 12px; font-size: 12.5px; color: #b7c1da; list-style: none; }
.ask-src > summary::-webkit-details-marker { display: none; }
.ask-src > summary::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform .15s; }
.ask-src[open] > summary::before { transform: rotate(90deg); }
.ask-sources { padding: 2px 10px 10px; }
.ask-sources .srcn { font-size: 11px; color: var(--accent); font-variant-numeric: tabular-nums; }
.ask-sources > li.flash { animation: askflash 1.4s var(--ease); }
@keyframes askflash { 0%, 40% { background: rgba(106,167,255,.22); } 100% { background: rgba(255,255,255,.025); } }
.ev-meta .chip { max-width: 100%; }

/* chat tab: the log scrolls, the composer stays put */
.pane.askpane { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-top .linkbtn { white-space: nowrap; }
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 18px 6px; flex: none; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 14px; display: grid; align-content: start; gap: 12px; scrollbar-width: thin; scrollbar-color: rgba(150,170,225,.25) transparent; }
.chat-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 26px 4px 8px; }
.chat-empty h3 { font-size: 16px; font-weight: 600; }
.suggest { display: grid; gap: 6px; width: 100%; margin-top: 6px; }
.suggest .btn { justify-content: flex-start; text-align: left; height: auto; min-height: 34px; padding-block: 6px; white-space: normal; }
.msg { max-width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); min-width: 0; }
.msg.me { justify-self: end; max-width: 88%; background: var(--accent-soft); border-color: var(--accent-line); color: #fff; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.brain { background: var(--raise); }
.msg.error { border-color: rgba(255,122,147,.45); background: rgba(255,122,147,.06); }
.msg .saved { display: flex; align-items: center; gap: 8px; color: #9cf0cf; }
.composer { flex: none; padding: 10px 18px 14px; border-top: 1px solid var(--line); background: rgba(10,14,25,.97); display: grid; gap: 8px; }
.chat-input { width: 100%; resize: none; min-height: 56px; max-height: 160px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 11px; background: #0e1424; color: var(--text); font: inherit; line-height: 1.45; field-sizing: content; }
.chat-input:focus { outline: 0; border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(80,125,235,.14); }
.chat-input::placeholder { color: var(--muted); }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
