/* Ask Nage — after the request explorer: quiet surface, one column, the send cue as the moment of motion. */
.xa-layout{--accent:var(--primary);--accent-soft:var(--primary-soft);--accent-border:#cfc8fb;--ease:cubic-bezier(.2,.7,.2,1);--xa-ink:#1b2130;--xa-muted:#687286;--xa-line:#e5e8ef;
 max-width:760px;width:100%;margin:0 auto;display:flex;flex-direction:column;min-height:calc(100vh - 150px);color:var(--xa-ink)}
.xa-layout .ui-icon{width:16px;height:16px;flex:none}

/* First question */
.xa-layout.is-empty{justify-content:center}
.xa-empty{display:flex;flex-direction:column;align-items:center;gap:0;padding:6vh 0 8vh}
.xa-empty h1{margin:0;font-size:26px;line-height:34px;font-weight:600;letter-spacing:-.4px;text-align:center;text-wrap:balance}
.xa-empty>p{margin:8px 0 26px;color:var(--xa-muted);font-size:14px;text-align:center}
.xa-empty .xa-composer{width:100%}
.xa-examples{width:100%;display:flex;flex-direction:column;gap:2px;margin-top:14px}
.xa-examples button{display:flex;align-items:center;gap:12px;width:100%;border:0;background:transparent;border-radius:10px;padding:10px 12px;text-align:left;color:#3b4354;font-size:13px;transition:background-color .16s ease,color .16s ease}
.xa-examples button span{flex:1}
.xa-examples button .ui-icon{color:#8a93a5}
.xa-examples button:hover,.xa-examples button:focus-visible{background:var(--accent-soft);color:var(--accent)}
.xa-examples button:hover .ui-icon,.xa-examples button:focus-visible .ui-icon{color:var(--accent)}
.xa-context{margin:14px 0 0;text-align:center;font-size:12px;color:#7a8496}

/* Conversation */
.xa-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:6px 0 18px}
.xa-head h1{margin:0;font-size:22px;line-height:30px;font-weight:600;letter-spacing:-.3px}
.xa-head p{margin:4px 0 0;font-size:12px;color:var(--xa-muted)}
.xa-new{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--xa-line);background:#fff;border-radius:10px;padding:8px 12px;font-size:12px;font-weight:500;color:#3b4354;white-space:nowrap}
.xa-new:hover{border-color:var(--accent-border);color:var(--accent)}
.xa-feed{flex:1;display:flex;flex-direction:column;gap:28px;padding-bottom:24px}
.xa-exchange{display:flex;flex-direction:column;gap:14px;animation:xaIn .28s var(--ease) both}
.xa-user{display:flex;justify-content:flex-end}
.xa-bubble{margin:0;max-width:78%;background:#eef0f5;border-radius:16px;padding:10px 16px;font-size:14px;line-height:21px;white-space:pre-wrap;overflow-wrap:anywhere}
.xa-reply{position:relative;display:flex;flex-direction:column;gap:10px}
.xa-answer{margin:0;font-size:15px;line-height:24px;white-space:pre-wrap;overflow-wrap:anywhere}
.xa-boundary{margin:0;display:flex;gap:8px;align-items:flex-start;font-size:12px;line-height:18px;color:#6e6150;background:#fbf6ee;border-radius:10px;padding:9px 12px}
.xa-boundary .ui-icon{margin-top:1px;color:#b0894f}
.xa-footer{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;font-size:12px;color:var(--xa-muted)}
.xa-source{display:inline-flex;align-items:center;gap:6px;color:#4a5264}
.xa-source .ui-icon{width:14px;height:14px}
.xa-num{font-size:11px;color:#8a93a5}
.xa-mode{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#8a93a5}
.xa-mode.is-live{color:#1f8a5b}
.xa-mode .ui-icon{width:13px;height:13px}
.xa-footer .result-badge{margin-left:0;font-size:10px;font-weight:600;letter-spacing:.04em}
.xa-inspect{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;padding:4px 8px;margin-left:-8px;border-radius:8px;font-size:12px;font-weight:500;color:#2d3445}
.xa-inspect:hover,.xa-inspect:focus-visible{background:var(--accent-soft);color:var(--accent)}
.xa-inspect .ui-icon{width:14px;height:14px;transition:transform .16s ease}
.xa-inspect:hover .ui-icon{transform:translateX(2px)}
.xa-views{display:flex;flex-wrap:wrap;gap:6px}
.xa-views button{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--xa-line);background:#fff;border-radius:9px;padding:6px 10px;font-size:12px;color:#3b4354;transition:border-color .16s ease,color .16s ease,background-color .16s ease}
.xa-views button .ui-icon{width:15px;height:15px;color:#7d8699}
.xa-views button:hover,.xa-views button:focus-visible{border-color:var(--accent-border);background:var(--accent-soft);color:var(--accent)}
.xa-views button:hover .ui-icon,.xa-views button:focus-visible .ui-icon{color:var(--accent)}
.xa-next{display:flex}
.xa-text{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;padding:0;font-size:12px;font-weight:500;color:var(--accent)}
.xa-text .ui-icon{width:14px;height:14px}
.xa-compare{border:1px solid var(--accent-border);background:#faf9ff;border-radius:12px;padding:12px 14px;font-size:12px;display:flex;flex-direction:column;gap:8px}
.xa-compare>span{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-weight:500}
.xa-compare>div{display:flex;align-items:center;gap:14px}
.xa-compare>div p{margin:0;display:flex;flex-direction:column}
.xa-compare>div small{color:var(--xa-muted);font-size:11px}
.xa-compare>div strong{font-size:18px;font-variant-numeric:tabular-nums}
.xa-compare>p{margin:0;color:var(--xa-muted)}

/* Pending: the explorer's send cue and request track */
.xa-layout .request-feedback{display:flex;align-items:center;gap:16px;padding:4px 0 12px;min-height:120px}
.xa-layout .request-progress{flex:1;min-width:0}
.xa-layout .request-status{display:flex;align-items:flex-start;flex-wrap:wrap;gap:4px 12px}
.xa-layout .request-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.xa-layout .request-copy strong{font-size:14px;line-height:20px;font-weight:500;color:var(--accent)}
.xa-layout .request-copy>span{font-size:12px;line-height:18px;color:#626773}
.xa-layout .request-simulation{font-size:11px;line-height:20px;color:#626773}
.xa-layout .request-simulation.is-live{color:#1f8a5b}
.xa-layout .request-track{display:flex;gap:12px;flex-wrap:wrap;padding:12px 0 0;font-size:11px;line-height:16px;color:#727782}
.xa-layout .request-track>span{display:flex;align-items:center;gap:6px}
.xa-layout .request-track i{width:5px;height:5px;border-radius:50%;background:#c9ced8;transition:background-color .2s ease}
.xa-layout .request-track :is(.current,.complete) i{background:var(--accent)}
.xa-layout .request-track .current{color:var(--accent)}
.xa-layout .request-track .current i{animation:request-pulse .9s ease-in-out infinite}
.xa-stop{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--xa-line);background:#fff;border-radius:8px;padding:5px 10px;font-size:12px;color:#4a5264}
.xa-stop .ui-icon{width:12px;height:12px}
.xa-stop:hover{border-color:var(--accent-border);color:var(--accent)}
.send-visual{position:relative;width:112px;flex:0 0 112px}
.send-visual svg{display:block;width:100%;overflow:visible;fill:none;stroke-linecap:round;stroke-linejoin:round}
.send-visual .knowledge-surface{fill:#f7f6ff;stroke:#8a82c9;stroke-width:3}
.send-visual .knowledge-side{fill:#e9e6fb;stroke:#8a82c9;stroke-width:3}
.send-visual .knowledge-side--dark{fill:#d9d4f6}
.send-visual .knowledge-detail{stroke:#a9a2d8;stroke-width:2.5}
.send-cap{transform:translateY(18px);opacity:.5;transition:transform .24s var(--ease),opacity .18s ease}
.send-base{animation:send-layer-in .28s var(--ease) both}
.send-threads{stroke:#c7c1ee;stroke-width:2;opacity:.25;transition:opacity .18s ease}
.send-signal{stroke:var(--accent);stroke-width:4;opacity:0;stroke-dasharray:12 88;stroke-dashoffset:0}
.request-feedback:is([data-stage="1"],[data-stage="2"]) .send-cap{transform:translateY(0);opacity:1}
.request-feedback:is([data-stage="1"],[data-stage="2"]) .send-threads{opacity:.75}
.request-feedback:is([data-stage="1"],[data-stage="2"]) [data-outcome="illustrated"] .send-signal{opacity:1;animation:send-thread-flow .8s linear infinite}
.request-feedback[data-stage="2"] [data-outcome="illustrated"] .send-cap .knowledge-surface{stroke:var(--accent)}
.send-visual[data-outcome="blocked"] :is(.send-threads,.send-signal){display:none}
.send-finish{position:absolute;left:50%;top:50%;width:6px;height:6px;margin:-3px;border-radius:50%;background:var(--accent);opacity:0}
.request-feedback[data-stage="2"] [data-outcome="illustrated"] svg{animation:send-gather .28s var(--ease) .08s both;transform-origin:center}
.request-feedback[data-stage="2"] [data-outcome="illustrated"] .send-finish{animation:send-point .18s ease .18s both}
.answer-handoff{position:absolute;left:-13px;top:9px;width:6px;height:6px;border-radius:50%;background:var(--accent);pointer-events:none;animation:xa-handoff 1.2s ease .2s both}
@keyframes send-layer-in{from{opacity:.3;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes send-thread-flow{to{stroke-dashoffset:-100}}
@keyframes send-gather{to{transform:scale(.18);opacity:0}}
@keyframes send-point{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}
@keyframes request-pulse{0%,100%{opacity:.4;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}
@keyframes xa-handoff{to{opacity:0}}
@keyframes xaIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.xa-exchange:not(.is-arriving):not(#pendingRequest){animation:none}

/* Composer */
.xa-dock{position:sticky;bottom:0;padding:12px 0 16px;background:linear-gradient(to bottom,transparent,var(--bg) 22%)}
.xa-composer{background:#fff;border:1px solid var(--xa-line);border-radius:18px;padding:14px 14px 10px 16px;box-shadow:0 6px 24px #1d22400a;transition:border-color .16s ease,box-shadow .16s ease}
.xa-composer:focus-within{border-color:var(--accent-border);box-shadow:0 6px 24px #6554e814}
.xa-composer.is-processing{border-color:var(--accent-border)}
.xa-composer textarea{display:block;width:100%;border:0;outline:0;resize:none;background:transparent;font-size:14px;line-height:22px;color:var(--xa-ink);padding:0 0 8px}
.xa-composer textarea::placeholder{color:#8a93a5}
.xa-composer-foot{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.xa-chip{position:relative;display:inline-flex;align-items:center;gap:6px;border-radius:8px;padding:0 4px 0 8px;color:#4a5264;font-size:12px}
.xa-chip:hover{background:#f3f4f8}
.xa-chip .ui-icon{width:14px;height:14px;color:#7d8699}
.xa-chip select{border:0;background:transparent;font-size:12px;color:inherit;padding:6px 2px;cursor:pointer}
.xa-chip select:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.xa-mode-chip{display:inline-flex;align-items:center;gap:5px;margin-left:auto;font-size:11px;color:#6b7385;padding:0 6px}
.xa-mode-chip.is-live{color:#1f8a5b}
.xa-mode-chip .ui-icon{width:13px;height:13px}
.xa-composer.is-processing .xa-mode-chip::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--accent);animation:request-pulse .9s ease-in-out infinite}
.xa-send{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;background:var(--accent);color:#fff;transition:background-color .16s ease,transform .16s ease}
.xa-send:hover{background:#5343d6}
.xa-send:active{transform:scale(.94)}
.xa-send.is-stop{background:#2d3445}
.xa-send .ui-icon{width:16px;height:16px}
.xa-dock .xa-context{margin-top:8px}

@media(max-width:620px){
 .xa-layout{min-height:calc(100vh - 110px)}
 .xa-empty{padding:3vh 0 5vh}
 .xa-empty h1{font-size:22px;line-height:29px}
 .xa-bubble{max-width:92%}
 .xa-layout .request-feedback{gap:12px;align-items:flex-start}
 .send-visual{width:80px;flex-basis:80px}
 .xa-head{flex-direction:column;gap:10px}
 .xa-mode-chip{margin-left:0}
 .xa-composer-foot .xa-send{margin-left:auto}
}
@media(prefers-reduced-motion:reduce){
 .send-base,.send-signal,.request-feedback svg,.xa-exchange,.answer-handoff,.xa-layout .request-track .current i{animation:none!important}
 .send-cap{transform:none;opacity:1;transition:none}
 .send-signal,.send-finish,.answer-handoff{display:none}
}

/* Inspector: explorer icons in the tabs and the interactive loom in the Knowledge view */
.ni-tabs button{display:inline-flex;align-items:center;gap:6px}
.ni-tabs button .ui-icon{width:14px;height:14px}
.ni-loom{display:grid;grid-template-columns:minmax(0,220px) minmax(0,1fr);gap:16px;align-items:center;margin:14px 0}
.ni-loom figure{margin:0}
.ni-loom figcaption{font-size:11px;line-height:16px;color:#7a8496;margin-top:6px}
.ni-loom-copy small{display:block;font-size:11px;color:#7a8496;margin-bottom:4px}
.ni-loom-copy p{margin:0;font-size:14px;line-height:21px}
.ni-loom-copy mark{background:var(--primary-soft);color:var(--primary);border-radius:4px;padding:0 3px}
.ni-loom-copy .ni-applied{margin-top:12px;padding-top:12px;border-top:1px solid #eceef4}
.ni-loom-copy .ni-applied strong{font-size:13px}
.ni-boundary{font-size:11px;line-height:16px;color:#7a8496;margin:0 0 12px}
.loom-figure{position:relative;width:100%;aspect-ratio:480/440;touch-action:pan-y;user-select:none;cursor:crosshair;background:#f3f2fb;border-radius:14px}
.loom-figure svg{display:block;width:100%;height:100%;fill:none;stroke-linejoin:round;stroke-linecap:round;overflow:visible}
.loom-figure :is(path,rect,circle){vector-effect:non-scaling-stroke}
.loom-figure:focus-within{outline:2px solid var(--primary);outline-offset:3px}
.loom-figure .knowledge-surface{fill:#fdfdff;stroke:#7a72b8;stroke-width:.85px}
.loom-figure .knowledge-side{fill:#ecebf8;stroke:#8c86b8;stroke-width:.85px}
.loom-figure .knowledge-side--dark{fill:#dedbf2}
.loom-figure .knowledge-seam{fill:none;stroke:#9a95c0;stroke-width:.65px}
.loom-figure :is(.field-guide,.field-grid){fill:none;stroke:#bcb8da;stroke-width:.5px}
.loom-figure .field-dashed{stroke-dasharray:2 5}
.loom-figure .field-port{fill:#f5f4fc;stroke:#8f89bb;stroke-width:.65px}
.loom-figure [data-selected="true"] .field-port{fill:#ebe8ff;stroke:var(--primary)}
.loom-figure .field-light{fill:var(--primary);stroke:none}
.loom-figure .field-engraving{fill:#6a6590;font:9px ui-monospace,monospace;letter-spacing:.04em}
.loom-figure .field-engraving--bright{fill:#3b3470}
.loom-figure .field-caption{fill:#77729a;font:9px ui-monospace,monospace;letter-spacing:.06em}
.loom-figure .field-caption--bright{fill:#3b3470}
.loom-figure .loom-fiber{fill:none;stroke:#8f89bb;stroke-width:.55px}
.loom-figure .loom-fiber[data-selected="true"]{stroke:var(--primary);stroke-width:.8px}
@media(max-width:520px){.ni-loom{grid-template-columns:1fr}.ni-loom figure{max-width:260px;margin:0 auto}}

/* Knowledge page: the user's VARVEs on NAGE */
.xa-varves{text-decoration:none;color:var(--primary)!important}
.xa-varves .ui-icon{color:var(--primary)!important}
.vv-section{background:#fff;border:1px solid #e8ebf2;border-radius:18px;padding:22px 24px;margin:0 0 22px;display:flex;flex-direction:column;gap:14px}
.vv-section .ui-icon{width:16px;height:16px;flex:none}
.vv-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.vv-head h2{margin:2px 0 4px;font-size:17px;font-weight:600;letter-spacing:-.2px;display:flex;align-items:center;gap:8px}
.vv-head p:last-child{margin:0;font-size:12px;line-height:18px;color:#6b7385;max-width:62ch}
.vv-head .lib-button{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.vv-head .lib-button:disabled{opacity:.45;cursor:not-allowed}
.vv-note{margin:0;display:flex;gap:8px;align-items:flex-start;font-size:12px;color:#6e6150;background:#fbf6ee;border-radius:10px;padding:9px 12px}
.vv-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border:1px solid #eceef4;border-radius:12px;overflow:hidden}
.vv-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;align-items:center;gap:14px;padding:12px 14px;border-top:1px solid #eceef4}
.vv-row:first-child{border-top:0}
.vv-row.is-attached{background:#fcfbff}
.vv-glyph{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary)}
.vv-main{display:flex;flex-direction:column;min-width:0}
.vv-main strong{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vv-main span{font-size:11px;color:#7a8496;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vv-state{font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;border-radius:6px;padding:3px 7px;background:#fcf4e7;color:#a0804f}
.vv-state.is-ready{background:#e8f6ee;color:#2f8a5c}
.vv-switch{position:relative;display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:11px;color:#6b7385}
.vv-switch input{position:absolute;opacity:0;width:1px;height:1px}
.vv-switch>span[aria-hidden]{width:30px;height:18px;border-radius:9px;background:#d9dce5;position:relative;transition:background-color .16s ease}
.vv-switch>span[aria-hidden]::after{content:'';position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0002;transition:transform .16s ease}
.vv-switch input:checked+span{background:var(--primary)}
.vv-switch input:checked+span::after{transform:translateX(12px)}
.vv-switch input:focus-visible+span{outline:2px solid var(--primary);outline-offset:2px}
.vv-switch input:disabled+span{opacity:.4}
.vv-switch em{font-style:normal;min-width:56px}
.vv-actions{display:flex;gap:4px}
.vv-icon{width:30px;height:30px;display:grid;place-items:center;border:0;background:transparent;border-radius:8px;color:#7d8699}
.vv-icon:hover{background:#f1f2f6;color:#2d3445}
.vv-icon.danger:hover{background:#fdecec;color:#b43c3c}
.vv-empty{display:flex;align-items:center;gap:14px;border:1px dashed #dcdfe8;border-radius:12px;padding:16px;margin:0;font-size:12px;color:#6b7385}
.vv-empty>span{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary)}
.vv-empty>div{flex:1}
.vv-empty strong{font-size:13px;color:#1b2130}
.vv-empty p{margin:2px 0 0}
.vv-foot{display:flex;gap:8px;align-items:flex-start;font-size:11px;line-height:16px;color:#7a8496}
.vv-source-choice{display:flex;gap:18px;font-size:13px;margin:4px 0 12px}
.vv-source-choice label{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.vv-dialog .lib-dialog-footer{display:flex;justify-content:space-between;align-items:center;gap:12px}
.vv-dialog [data-source][hidden]{display:none}
@media(max-width:700px){
 .vv-section{padding:18px 16px}
 .vv-head{flex-direction:column}
 .vv-row{grid-template-columns:auto minmax(0,1fr) auto;row-gap:8px}
 .vv-switch{grid-column:2}
 .vv-actions{grid-column:3;grid-row:2;justify-content:flex-end}
 .vv-empty{flex-wrap:wrap}
}

.vv-guest-warning{margin:0 0 12px;display:flex;gap:10px;align-items:flex-start;font-size:12px;line-height:18px;color:#7a4a12;background:#fff4e2;border:1px solid #f3d3a1;border-radius:10px;padding:10px 12px}
.vv-guest-warning .ui-icon{width:16px;height:16px;flex:none;margin-top:1px;color:#c27a1a}
.vv-guest-warning p{margin:0}
.vv-section>.vv-guest-warning{margin:0}

.xa-speculative{margin:0;display:flex;gap:10px;align-items:flex-start;font-size:12px;line-height:18px;color:#7a4a12;background:#fff4e2;border:1px solid #f3d3a1;border-radius:10px;padding:10px 12px}
.xa-speculative .ui-icon{margin-top:1px;color:#c27a1a}
.ni-verify .button{display:inline-flex;align-items:center;gap:7px;margin-top:6px}
.ni-verify .ui-icon{width:15px;height:15px}
.ni-verify-out{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.ni-verify-head{margin:0;font-weight:600;font-size:13px}
.ni-verify-head.supported{color:#2f8a5c}.ni-verify-head.blocked{color:#b43c3c}.ni-verify-head.unknown{color:#a0804f}
.ni-verify-narrative{margin:0;font-size:12px;line-height:18px;color:#4a5264;background:#f6f7fb;border-radius:8px;padding:8px 10px}
.ni-verify-checks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ni-verify-checks li{display:flex;gap:10px;align-items:flex-start}
.ni-verify-checks li .ni-pill{flex:none;min-width:92px;text-align:center}
.ni-verify-checks strong{font-size:12px}
.ni-verify-checks p{margin:2px 0 0;font-size:11px;line-height:16px;color:#6b7385}
.ni-verify-meta{margin:0;font-size:11px;line-height:16px;color:#7a8496}
.ni-verify-narrative{padding-left:26px!important}.ni-verify-narrative li{margin:2px 0}.ni-verify-sub{margin:8px 0 0;font-size:12px;font-weight:600}
/* Beta (2026-10-18): elapsed wait on a live question; a failed live question stays as a card with a retry */
.request-elapsed{font-variant-numeric:tabular-nums}
.xa-failed .xa-reply{border-left:3px solid #d9822b;padding-left:14px}
.xa-failed-title{display:flex;align-items:center;gap:8px;margin:0 0 6px;color:#8a4b00}
.xa-failed-title .ui-icon{width:16px;height:16px}
.xa-failed-detail{margin:0 0 10px;color:#4a5264;font-size:14px;line-height:1.55}
.xa-failed-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center}
.xa-text.is-quiet{color:#7d8699}
