/* The SI Assistant's page (views/assistant.mjs): conversations, the thread with its composer, the sources. */
.as { flex: 1; min-width: 0; min-height: 0; display: flex; overflow: hidden; position: relative; }
.as-left { flex: none; width: 248px; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); }
.as-lhd { flex: none; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px 0 14px; }
.as-chats { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; padding: 0 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.as-pad { padding: 4px 6px; }
.as-chat { flex: none; display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--tx-3); text-align: left; min-width: 0; }
.as-chat span { font-size: 12.5px; }
.as-chat .m { font-size: 11px; color: var(--mut); }
.as-chat[aria-pressed="true"] { border-color: var(--line-2); background: var(--panel); color: var(--tx); }
.as-chat:hover { color: var(--tx); }
.as-who { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.as .btn.wide { width: 100%; justify-content: center; }

.as-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; }
.as-bar { display: none; flex: none; width: 100%; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.as-thread { flex: 1; min-height: 0; width: 100%; max-width: 900px; display: flex; flex-direction: column; gap: 18px; padding: 16px 24px 14px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.as-welcome { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 24px 0; }
.as-welcome h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.as-welcome p { max-width: 58ch; font-size: 13.5px; line-height: 1.6; color: var(--tx-3); }
.as-welcome p.note { font-size: 12px; color: var(--mut); }
.si-mark.as-big { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; }

.as-turn { flex: none; display: flex; flex-direction: column; gap: 12px; }
.as-q { align-self: flex-end; max-width: 80%; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px 12px 3px 12px; background: var(--line); font-size: 13.5px; overflow-wrap: anywhere; }
.as-ans { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.si-mark.as-mk { width: 22px; height: 22px; margin-top: 1px; border-radius: 6px; font-size: 9.5px; }
.as-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.as-text { font-size: 13.5px; line-height: 1.6; color: var(--tx-2); overflow-wrap: anywhere; }
.as-text p + p { margin-top: 8px; }
.as-text ul { margin: 6px 0 0; padding-left: 18px; }
.as-text li + li { margin-top: 3px; }
.as-text .cite { margin-left: 2px; vertical-align: 1px; }
.as-sec h3 { margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--tx); }
.as-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); }
.as-mode i { width: 6px; height: 6px; border-radius: 50%; background: var(--rec); }
.as-mode.web i { background: var(--si); }
.as-mode.no i, .as-mode.err i { background: var(--dim); }
.as-mode.dec i, .as-mode.lock i { background: var(--amber); }
.as-mode span { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--dim); }
.as-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--mut); }
.as-steps li { display: flex; align-items: center; gap: 8px; }
.as-steps i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line-hover); }
.as-steps li.done i { background: var(--rec); border-color: var(--rec); }
.as-steps li.doing { color: var(--tx-2); }
.as-steps li.doing i { border-color: var(--si); animation: asPulse 1.1s ease-in-out infinite; }
@keyframes asPulse { 50% { background: var(--si); } }

.as-list { border-radius: 10px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.as-lh, .as-lr { display: flex; align-items: center; gap: 0; min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.as-lh { min-height: 28px; border-bottom: 1px solid var(--line); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut); white-space: nowrap; }
.as-lr { border-top: 1px solid var(--line-3); color: var(--tx); }
a.as-lr:hover { background: rgba(148, 163, 184, 0.05); }
.as-lh .n, .as-lr .n { flex: 0 0 24px; font-size: 11px; color: var(--mut); }
.as-lh .co, .as-lr .co { flex: 2; min-width: 0; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; overflow: hidden; }
.as-lr .co .tk { flex: none; width: 52px; font-weight: 600; }
.as-lr .co .cut { color: var(--tx-3); }
.as-lh .g, .as-lr .g { flex: 0 0 56px; text-align: right; font-weight: 600; }
.as-lh .why, .as-lr .why { flex: 1.6; min-width: 0; padding-left: 18px; color: var(--tx-3); }
.as-viss { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.as-vis { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.as-vbars { height: 70px; display: flex; align-items: flex-end; gap: 5px; }
.as-vbars span { flex: 1; border-radius: 2px 2px 0 0; background: var(--rec); opacity: 0.8; }
.as-vbars span.neg { background: var(--slate-bar); }
.as-vax { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--mut); }
.as-follow { display: flex; flex-wrap: wrap; gap: 8px; }
.as-fq { min-height: 28px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--tx-2); font-size: 12px; font-weight: 500; text-align: left; }
.as-fq:hover { border-color: var(--line-hover); color: var(--tx); }
.as-cites { display: flex; flex-wrap: wrap; gap: 6px; }
.as-cite { max-width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 2px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 11px; line-height: 20px; color: var(--mut); }
.as-cite b { flex: none; min-width: 18px; padding: 0 4px; border-radius: 4px; background: var(--si-bg); color: var(--si-tx); font-family: var(--mono); font-size: 10px; text-align: center; line-height: 16px; }
.as-cite .cut { max-width: 260px; }
a.as-cite:hover { border-color: var(--si-bd); color: var(--tx); }
.as-foot { font-size: 11px; color: var(--dim); }
.as-a { color: var(--si-tx); }
.as-a:hover { text-decoration: underline; }
.as-ok { font-size: 13px; line-height: 1.6; color: var(--tx-2); }
.as-sign { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; border: 1px solid var(--si-bd); background: var(--si-bg); }
.as-sign label { font-size: 12px; font-weight: 600; color: var(--tx-2); }
.as-signrow { display: flex; gap: 8px; }
.as-signrow input { flex: 1; min-width: 0; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--tx); font-size: 13px; }
.as-said { font-size: 12px; color: var(--amber); }
.as-said:empty { display: none; }

.as-comp { flex: none; width: 100%; max-width: 900px; padding: 0 24px 14px; }
.as-state { margin-bottom: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.06); font-size: 12.5px; line-height: 1.5; color: var(--tx-3); }
.as-state b { color: var(--tx); }
.as-form { display: flex; align-items: flex-end; gap: 8px; min-height: 46px; padding: 6px 7px 6px 14px; border-radius: 12px; border: 1px solid rgba(59, 130, 246, 0.32); background: var(--panel); }
.as-form:focus-within { border-color: rgba(59, 130, 246, 0.6); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14); }
.as-form textarea { flex: 1; min-width: 0; min-height: 32px; max-height: 160px; padding: 6px 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--tx); font: inherit; font-size: 14px; line-height: 1.45; }
.as-form textarea::placeholder { color: var(--mut); }
.si-send.as-send { width: 32px; height: 32px; border-radius: 9px; }
.si-send.as-send:disabled { opacity: 0.4; cursor: not-allowed; }
.as-hint { margin-top: 7px; font-size: 11px; color: var(--mut); text-align: center; }

.as-right { flex: none; width: 264px; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--panel-2); }
.as-rhd { flex: none; display: flex; align-items: center; height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.as-srcs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.as-src { display: flex; gap: 8px; font-size: 12.5px; min-width: 0; }
.as-src b { flex: none; width: 18px; font-size: 10.5px; color: var(--si-tx); padding-top: 2px; }
.as-src > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.as-src a { font-weight: 500; }
.as-src a:hover { text-decoration: underline; }
.as-src .k { font-size: 11px; color: var(--mut); }
.as-src-co { display: flex; flex-direction: column; gap: 6px; }
.as-src-co > div { display: flex; flex-wrap: wrap; gap: 5px; }

@media (max-width: 1240px) { .as-right { display: none; } }
@media (max-width: 1000px) {
  .as-bar { display: flex; }
  .as-left { position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; transform: translateX(-102%); transition: transform 0.18s ease; box-shadow: 18px 0 50px rgba(0, 0, 0, 0.5); }
  .as.chats-open .as-left { transform: none; }
}
@media (max-width: 640px) {
  .as-thread { padding: 12px 14px; }
  .as-comp { padding: 0 12px 10px; }
  .as-q { max-width: 92%; }
  .as-lh .why, .as-lr .why { display: none; }
  .as-signrow { flex-direction: column; }
  .as-cite .cut { max-width: 200px; }
}
