/* task-chat.css - the layout and chrome of the Requests drawer that task-chat.js
   injects. Everything here is scoped under `.cic-task-chat` / `.ctc-*`; nothing
   in this file styles a page.

   WHO ELSE LOADS THIS. The same NINE pages that load task-chat.js: the seven CIC
   pages by relative path, plus jslc/shell/public/index.html and
   musix/shell/dist/index.html as `/cic/task-chat.css` over Caddy's `/cic/` route.
   One physical file, three families. Editing it while thinking it is CIC-local
   changes the JSLC Mainframe and Musix too. `node tools/docs-map/map.mjs` reports
   8 consumers, not 9 - it does not scan built `dist/` mirrors.

   THE OTHER HALF LIVES ELSEWHERE. `.ctc-query-group`, `.ctc-indicator` and the
   per-state dot colours are in task-status.css, which only the seven CIC pages
   load. A rule added here reaches all nine surfaces; a rule added there reaches
   seven. Put a rule in the wrong file and it silently does nothing on two of
   them.

   INVARIANTS, both enforced by cic/topology/tools/test-shell.js and both
   load-bearing rather than stylistic:
     - NO LITERAL COLOURS. Every colour is a `var(--...)` from shell-tokens.css, so
       the drawer follows the theme the shell is in. test-shell.js:303 fails on a
       hex or rgb() literal outside a comment, and :305 requires specific tokens
       by name.
     - `inset:2.5rem auto 0 0` plus `grid-template-rows` on `.ctc-workspace` IS
       the contract (test-shell.js:307): a taskbar-aligned LEFT drawer with the
       query browser above the conversation. Changing the drawer's edge or
       collapsing the split fails that assertion by design.
   The file is minified in place - there is no build step and no source file to
   edit instead. Format it if you must, but keep the two invariants above intact.

   WHERE A CHANGE GOES. Drawer geometry: `.ctc-drawer`. The scrim and its
   transition: `.ctc-scrim` (opacity, driven by `.open`). Composer and buttons:
   `.ctc-composer`, `.ctc-actions`, `.ctc-close`. The feed: `.ctc-feed`,
   `.ctc-event`. Request lifecycle strip: `.ctc-lifecycle`. Selected-text
   Orchestration control: `.ctc-orchestration-action`. */
.cic-task-chat{position:fixed;inset:0;z-index:1000;min-width:0;pointer-events:none;font-family:inherit}.cic-task-chat.open{pointer-events:auto}.ctc-scrim{position:absolute;inset:0;border:0;background:var(--overlay-scrim);opacity:0;transition:.2s}.open .ctc-scrim{opacity:1}.ctc-drawer{position:absolute;inset:2.5rem auto 0 0;width:min(42rem,100%);max-width:100%;min-width:0;display:flex;flex-direction:column;gap:.65rem;overflow:hidden;padding:1rem;background:var(--surface-overlay);color:var(--ink);border-right:1px solid var(--line);box-shadow:var(--shadow-drawer);transform:translate3d(-105%,0,0);transition:transform .22s ease;backdrop-filter:blur(18px)}.open .ctc-drawer{transform:translate3d(0,0,0)}.ctc-drawer>header,.ctc-actions,.ctc-section-heading,.ctc-event>div{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.ctc-drawer>header{flex:0 0 auto;flex-flow:row nowrap;padding:0;border:0;align-items:center}.ctc-drawer h2,.ctc-drawer h3{margin:.1rem 0;font-size:1rem}.ctc-drawer small,.ctc-muted{color:var(--muted)}.ctc-close{font-size:1.5rem}.ctc-close,.ctc-drawer button,.ctc-drawer select{border:1px solid var(--line);border-radius:.2rem;background:var(--control-surface);color:inherit;padding:.45rem .7rem;font-weight:800}.ctc-workspace{display:grid;grid-template-rows:minmax(7rem,1fr) minmax(9rem,1fr);flex:1 1 auto;min-width:0;min-height:0;border-block:1px solid var(--line)}.ctc-query-browser,.ctc-conversation{display:flex;min-width:0;min-height:0;flex-direction:column;padding:.6rem 0}.ctc-query-browser{border-bottom:1px solid var(--line)}.ctc-query-list,.ctc-feed{overflow:auto;min-width:0;min-height:0}.ctc-query-list{display:grid;gap:.35rem;margin-top:.4rem}.ctc-query-list button{display:grid;grid-template-columns:minmax(6rem,9rem) minmax(0,1fr);gap:.7rem;text-align:left}.ctc-query-list button[aria-selected=true]{border-color:var(--accent);background:var(--accent-subtle)}.ctc-query-list time{font-size:.7rem;color:var(--muted)}.ctc-query-list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ctc-feed{flex:1}.ctc-feed article,.ctc-event{margin:.4rem 0;padding:.65rem;border:1px solid var(--line);border-radius:.2rem;background:var(--surface-subtle);white-space:pre-wrap}.ctc-event{display:grid;gap:.2rem}.ctc-event.operator{border-color:var(--accent)}.ctc-event p,.ctc-feed article p{margin:.35rem 0 0}.ctc-state{padding:.2rem .45rem;border-radius:.2rem;background:var(--accent-subtle)}.ctc-composer{display:grid;flex:0 0 auto;min-width:0;gap:.45rem}.ctc-composer>label{display:grid;gap:.2rem;font-size:.78rem}.ctc-composer input,.ctc-composer textarea{box-sizing:border-box;width:100%;min-width:0;border:1px solid var(--line);border-radius:.2rem;background:var(--field-surface);color:inherit;padding:.55rem}.ctc-composer textarea{max-height:7rem;resize:vertical}.ctc-compose-meta{display:grid;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}.ctc-compose-meta>*{min-width:0;max-width:100%}.ctc-compose-meta select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;text-overflow:ellipsis}.ctc-provider-status{grid-column:1/-1;order:1;overflow-wrap:anywhere}.ctc-compose-meta label{display:grid;min-width:0;gap:.2rem;font-size:.72rem}.ctc-drop{padding:.55rem;text-align:center;border:1px dashed var(--line-strong);border-radius:.2rem}.ctc-drop.over{border-color:var(--accent);background:var(--accent-subtle)}.ctc-file{display:none}.ctc-file-label{display:inline!important;color:var(--link);cursor:pointer}.ctc-previews{display:flex;gap:.35rem;flex-wrap:wrap}.ctc-previews span{padding:.3rem .45rem;border-radius:.2rem;background:var(--surface-subtle);font-size:.75rem}.ctc-previews button{padding:.05rem .25rem;margin-left:.3rem}.ctc-actions{justify-content:flex-start;flex-wrap:wrap}.ctc-actions button:disabled,.ctc-compose-meta :disabled{opacity:.42;cursor:not-allowed;filter:grayscale(1)}.ctc-status{min-width:0;overflow-wrap:anywhere;min-height:1.2em;font-size:.75rem;color:var(--status-info)}@media(max-width:600px){.ctc-drawer{inset-block-start:2.5rem;padding:.7rem}.ctc-query-list button{grid-template-columns:1fr}.ctc-actions button{flex:1}.ctc-compose-meta{grid-template-columns:1fr}}@media(max-height:700px){.ctc-drawer{overflow-y:auto}.ctc-workspace{flex-basis:18rem;min-height:18rem}.ctc-composer textarea{max-height:4.5rem}}
.ctc-indicators{display:grid;gap:.2rem;min-width:0;pointer-events:none}.ctc-lifecycle{display:flex;flex-wrap:wrap;gap:.18rem;margin:0;padding:0;list-style:none;pointer-events:none}.ctc-lifecycle-step{display:inline-flex;align-items:center;gap:.15rem;margin:0;padding:.08rem .28rem;border:1px solid var(--line);border-radius:.2rem;font-size:.65rem;line-height:1.2;white-space:nowrap;pointer-events:none}.ctc-lifecycle-mark{display:inline-grid;place-items:center;min-width:.7rem;font-size:.7rem}.ctc-lifecycle-step[data-state=complete] .ctc-lifecycle-mark::before{content:"✓"}.ctc-lifecycle-step[data-state=current]{border-width:2px;border-style:solid;font-weight:800}.ctc-lifecycle-step[data-state=current] .ctc-lifecycle-mark::before{content:"◆"}.ctc-lifecycle-step[data-state=pending] .ctc-lifecycle-mark::before{content:"○"}.ctc-lifecycle-step[data-state=unrecorded]{border-style:dashed}.ctc-lifecycle-step[data-state=unrecorded] .ctc-lifecycle-mark::before{content:"?"}.ctc-lifecycle-step[data-state=not-applicable]{text-decoration:line-through}.ctc-lifecycle-step[data-state=not-applicable] .ctc-lifecycle-mark::before{content:"–"}.ctc-request-status,.ctc-condition{font-size:.7rem}.ctc-condition{color:var(--muted)}.ctc-orchestration-action{position:fixed;z-index:900;margin:0;pointer-events:auto;user-select:none;-webkit-user-select:none;border:1px solid var(--line);border-radius:.2rem;background:var(--control-surface);color:inherit;padding:.35rem .7rem;font:inherit;font-weight:800}.ctc-orchestration-action[hidden]{display:none}.ctc-orchestration-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0;margin:-1px}@media(max-width:600px){.ctc-lifecycle{flex-wrap:wrap}.ctc-query-list button{grid-template-columns:1fr}}
