/* Shared background-work language; animation means active execution only. */
.cl-process-list { display: grid; gap: 10px; }
.cl-process { --process-color: var(--accent-brief); border: 1px solid color-mix(in srgb, var(--process-color) 28%, var(--border-default)); border-left: 3px solid var(--process-color); border-radius: 10px; padding: 14px 16px; background: color-mix(in srgb, var(--process-color) 5%, var(--bg-surface)); color: var(--text-primary); font: 13px/1.5 var(--font-sans, sans-serif); min-width: 0; }
.cl-process[data-phase="paused"], .cl-process[data-phase="attention"] { --process-color: var(--status-warning); }
.cl-process[data-phase="queued"] { --process-color: var(--text-secondary); }
.cl-process[data-phase="complete"] { --process-color: var(--status-verified); }
.cl-process-heading { display: flex; align-items: center; gap: 10px; }
.cl-process-heading > div { min-width: 0; }
.cl-process-heading h3 { margin: 0; font: 600 14px/1.4 var(--font-sans, sans-serif); color: var(--process-color); }
.cl-process small { color: var(--text-secondary); font-size: 11px; }
.cl-process p { margin: 8px 0; overflow-wrap: anywhere; }
.cl-process a { display: inline-block; color: var(--accent-brief); font-size: 12px; margin-top: 5px; }
.cl-process-symbol { flex: none; display: grid; place-items: center; width: 18px; height: 18px; color: var(--process-color); font-weight: 700; }
.cl-process-lock { display: flex; align-items: flex-start; gap: 7px; padding-top: 9px; border-top: 1px solid var(--border-default); font-size: 12px; color: var(--text-secondary); }
.cl-process-lock svg { flex: none; margin-top: 2px; }
.cl-process .cl-spin { flex: none; }
.cl-process-issue { color: var(--status-warning); }
.cl-process-connection { color: var(--status-warning); font-size: 12px; }
.rw-processes { flex: none; max-height: 30vh; overflow: auto; padding: 8px 18px; }
.rw-processes:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .cl-process .cl-spin { animation-duration: 1.6s; } }
@media (max-width: 600px) { .rw-processes { padding: 8px; } .cl-process { padding: 11px 12px; } }

.pl-snapshot-body > .cl-process-list { margin: 12px 0 20px; }

.rw-processes .cl-process:not(.cl-process--row) { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(100px, 1fr); gap: 4px 12px; padding: 10px 14px; }
.rw-processes .cl-process > p { margin: 0; align-self: center; }
.rw-processes .cl-process-lock { grid-column: 1 / -1; border-top: 0; padding-top: 2px; }
.rw-processes .cl-process:not(.cl-process--row) .cl-process-issue { grid-column: 1 / -1; }
@media (max-width: 600px) { .rw-processes .cl-process { display: block; } .rw-processes .cl-process > p { margin-top: 6px; } }

/* One line per background process (Bennett 2026-09-15: "there are still so many banners") —
   symbol · title · context · detail (ellipsis, full text on hover) · issue · link. The lock
   sentence and the start time live in the tooltip, not the row. */
.cl-process--row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px; }
.cl-process--row .cl-process-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; overflow: hidden; }
.cl-process--row h3 { margin: 0; font: 600 12.5px/1.3 var(--font-sans, sans-serif); color: var(--process-color); white-space: nowrap; }
.cl-process--row small { white-space: nowrap; }
.cl-process--row .cl-process-detail { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cl-process--row .cl-process-issue { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 40%; }
.cl-process--row a { margin: 0; white-space: nowrap; flex: none; }
/* A notice is one line a person can hide (INV-1717): the × hides it, remembered per notice;
   the chip under the list says how many are hidden and brings them back. */
.cl-process-hide { flex: none; background: none; border: 0; padding: 0 3px; color: var(--text-muted); font: 600 14px/1 var(--font-sans, sans-serif); cursor: pointer; border-radius: 4px; }
@media (hover: hover) {
  .cl-process-hide:hover { color: var(--text-primary); background: color-mix(in srgb, var(--text-primary) 8%, transparent); }
}
.cl-process-hidden-chip { justify-self: start; background: none; border: 1px dashed var(--border-default); border-radius: 999px; padding: 1px 9px; font: 11px/1.6 var(--font-sans, sans-serif); color: var(--text-secondary); cursor: pointer; }
@media (hover: hover) {
  .cl-process-hidden-chip:hover { color: var(--text-primary); border-color: var(--text-secondary); }
}
.cl-process-list:has(.cl-process--row) { gap: 6px; }
.pl-snapshot-body > .cl-process-list:has(.cl-process--row) { margin: 8px 0 14px; }
@media (max-width: 700px) { .cl-process--row .cl-process-line { flex-wrap: wrap; } .cl-process--row .cl-process-detail { white-space: normal; } }

/* Compact rows (the room workspace): one line each, issues beneath, link at the right. */
.cl-process--compact { padding: 5px 12px; border-radius: 6px; }
.cl-process-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cl-process-row strong { flex: none; font: 600 12.5px/1.3 var(--font-sans, sans-serif); color: var(--process-color); }
.cl-process-row small { flex: none; font-size: 11px; color: var(--text-secondary); }
.cl-process-row .cl-process-detail { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--text-primary); }
.cl-process-row a { flex: none; margin: 0; font-size: 12px; }
.cl-process--compact .cl-process-lock { border-top: 0; padding-top: 2px; margin: 2px 0 0; font-size: 11px; }
.cl-process--compact .cl-process-issue { margin: 2px 0 0 24px; font-size: 11.5px; }
.rw-processes { max-height: 22vh; padding: 4px 18px; }
.rw-processes .cl-process--row { padding: 4px 10px; }
.rw-processes .cl-process--row h3 { font-size: 12px; }
.rw-processes .cl-process--row .cl-process-detail, .rw-processes .cl-process--row .cl-process-issue { font-size: 11.5px; }
.rw-processes .cl-process--compact { display: block; }
.rw-processes-more { justify-self: start; font-size: 11.5px; color: var(--accent-brief); background: none; border: 0; padding: 0 2px; cursor: pointer; }
@media (max-width: 600px) { .cl-process-row { flex-wrap: wrap; } }

/* The house live vocabulary (INV-1163; moved here from pipeline-workspace.css 2026-09-21 so
   every page that renders a door or a construction line gets it — the lead page renders
   _build_door.html and _build_state.html without the pipeline sheet). The pulse keyframe
   cl-na-pulse lives in django.css. */
/* The construction line — one sentence, one phase colour. */
.cl-build-line { display: flex; flex-direction: column; gap: 3px; margin-top: 7px; font-size: 11px; line-height: 1.5; color: var(--text-secondary); }
.cl-build-line__now { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cl-build-line__now[data-phase="running"] { color: var(--accent-brief); }
.cl-build-line__now[data-phase="queued"] { color: var(--text-secondary); }
.cl-build-line__now[data-phase="complete"] { color: var(--status-verified); }
.cl-build-line__now[data-phase="unbuilt"] { color: var(--text-muted); }
.cl-build-line__now b { font-weight: 650; }
.cl-build-line__now > b { flex: none; white-space: nowrap; } /* the verb never breaks; the tail wraps (INV-1171) */
.cl-build-line__why, .cl-build-line__last { color: var(--text-muted); font-size: 10.5px; overflow-wrap: anywhere; }
.cl-build-line__last a { color: var(--accent-brief); }

/* The house pulse dot for a RUNNING process (the audit card's "in progress" dot and the
   next-action panel's pulse, INV-1163 amended 2026-09-18): on the construction line and the
   card's building chip. Reduced motion gets a steady dot. */
.cl-live-dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 999px; background: var(--accent-brief); animation: cl-na-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .cl-live-dot { animation: none; } }
/* The bar of the ceiling under a live line / queue row (the checklist idiom: blue while running). */
.cl-build-line__tail { min-width: 0; overflow-wrap: anywhere; }
.cl-build-line__tail a { color: var(--accent-brief); white-space: nowrap; }
/* The track must read on a --bg-surface-2 host (the popup box, the queue row): ink-mixed, not the surface step. */
.cl-build-line__bar { background: color-mix(in srgb, var(--text-primary) 10%, transparent); }
.cl-build-line__bar { width: min(220px, 100%); margin-top: 2px; }
/* Small spinners: on a chip, on a button, in a line. */
.cl-spin--xs { width: 10px; height: 10px; border-width: 1.5px; }
.cl-spin--btn { width: 11px; height: 11px; border-width: 1.5px; border-color: currentColor; border-right-color: transparent; vertical-align: -1px; }
/* The door while a session is live: it breathes, and reads as the live thing it opens. */
.cl-btn--live { color: var(--accent-brief); border-color: color-mix(in srgb, var(--accent-brief) 45%, var(--border-default)); animation: pl-build-breathe 2.4s ease-in-out infinite; }
@media (hover: hover) {
  .cl-btn--live:hover { border-color: var(--accent-brief); }
}
@keyframes pl-build-breathe { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-brief) 0%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-brief) 16%, transparent); } }
@media (prefers-reduced-motion: reduce) { .cl-btn--live { animation: none; } }
/* A status chip may carry two wordings: the long one everywhere, the short one only where a bar that is
   out of room asks for it (the case room's header, roomShell.css). */
.cl-chip-short, .cl-chip-icon { display: none; }
/* The second reader's notes for KSF (INV-1796): each chip opens its list — a card that scrolls, one row a
   field or a concern, selectable text. */
.cl-second-reader { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cl-sr { position: relative; display: inline-flex; }
.cl-sr__chip { cursor: pointer; list-style: none; user-select: none; }
.cl-sr__chip::-webkit-details-marker { display: none; }
.cl-sr[open] > .cl-sr__chip { border-color: var(--room-tone); }
@media (hover: hover) {
  .cl-sr__chip:hover { border-color: var(--room-tone); }
}
.cl-sr__chip:focus-visible { outline: 2px solid var(--accent-brief); outline-offset: 1px; }
.cl-sr__card { left: 0; right: auto; top: calc(100% + 6px); width: 460px; max-width: calc(100vw - 32px); max-height: min(60vh, 520px); overflow: auto; overscroll-behavior: contain; padding: 12px 14px; border-top: 3px solid var(--status-warning); z-index: 45; text-align: left; white-space: normal; }
.cl-sr__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--text-primary); }
.cl-sr__count { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--status-warning-soft); color: var(--status-warning); font-size: 12px; font-weight: 650; text-align: center; }
.cl-sr__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: sr; }
.cl-sr__list > li { counter-increment: sr; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border-default); background: var(--bg-surface-2); font-size: 13px; line-height: 1.5; color: var(--text-primary); user-select: text; }
.cl-sr__list > li::before { content: counter(sr); grid-row: 1 / span 2; color: var(--text-muted); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cl-sr__where { grid-column: 2; font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); overflow-wrap: anywhere; }
.cl-sr__line { grid-column: 2; overflow-wrap: anywhere; }
/* "Kept as typed" is good news, not a caution: the card and its count take the chip's green. */
.cl-sr--kept .cl-sr__card { border-top-color: var(--status-verified); }
.cl-sr--kept .cl-sr__count { background: var(--status-verified-soft); color: var(--status-verified); }

/* BRING TO THE GOLDEN LAYOUT (INV-1801): the "Older layout" sign as one object — the sign and its
   door for a firm administrator, the quiet sign for everyone else, the recast's running chip in its
   place while it runs — and the confirm object it opens (nucleus/_recast_dialog.html). Colours are
   the house tokens, so the dark theme follows. A door sits above a card's stretched link. */
/* The wrapper is no box of its own (it re-reads itself, nothing more): its chip sits in the row it is
   drawn in, so a bar that yields the chip leaves no gap behind. */
.cl-layout-sign { display: contents; }
.cl-layout-sign > .cl-pill { position: relative; z-index: 2; vertical-align: middle; }
.cl-layout-door { padding: 0; gap: 0; overflow: hidden; cursor: pointer; font: inherit; font-size: 10.5px; font-weight: 600; color: var(--text-primary); border-color: color-mix(in srgb, var(--status-warning) 50%, var(--border-default)); background: var(--bg-surface); transition: border-color .12s, box-shadow .12s; }
.cl-layout-door.cl-pl-pill { font-size: 9px; }
.cl-layout-door__sign { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 7px; color: var(--status-warning); }
.cl-layout-door__sign::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--status-warning); flex: none; }
.cl-layout-door__go { display: inline-flex; align-items: center; gap: 4px; align-self: stretch; padding: 1px 9px 1px 8px; color: var(--text-primary); background: var(--status-warning-soft); border-left: 1px solid color-mix(in srgb, var(--status-warning) 40%, var(--border-default)); }
@media (hover: hover) {
  .cl-layout-door:hover { border-color: var(--status-warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-warning) 14%, transparent); }
  .cl-layout-door:hover .cl-layout-door__go { background: color-mix(in srgb, var(--status-warning) 24%, var(--bg-surface)); }
}
.cl-layout-door:focus-visible, .cl-recast-live:focus-visible { outline: 2px solid var(--accent-brief); outline-offset: 2px; }
.cl-layout-sign__quiet { gap: 5px; color: var(--text-secondary); border-color: color-mix(in srgb, var(--status-warning) 30%, var(--border-default)); background: var(--bg-surface); }
.cl-layout-sign__quiet::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--status-warning); flex: none; }
.cl-recast-live { gap: 5px; cursor: pointer; font: inherit; font-size: 10.5px; font-weight: 600; color: var(--accent-brief); border-color: color-mix(in srgb, var(--accent-brief) 45%, var(--border-default)); background: color-mix(in srgb, var(--accent-brief) 7%, var(--bg-surface)); }
.cl-recast-live.cl-pl-pill { font-size: 9px; }
.cl-recast-live[data-phase="queued"] { color: var(--text-secondary); border-color: var(--border-default); background: var(--bg-surface); }
@media (hover: hover) {
  .cl-recast-live:hover { border-color: var(--accent-brief); }
}

.cl-recast { display: flex; flex-direction: column; width: min(480px, 94vw); max-height: 86vh; min-height: 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--border-default); background: var(--bg-surface); box-shadow: var(--shadow-pop, 0 18px 50px rgba(0, 0, 0, .22)); color: var(--text-primary); font: 13px/1.5 var(--font-sans, sans-serif); }
.cl-recast__head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-default); }
.cl-recast__title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.cl-recast__x { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); cursor: pointer; }
@media (hover: hover) {
  .cl-recast__x:hover { background: var(--bg-surface-2); color: var(--text-primary); }
}
.cl-recast__body { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; padding: 16px; }
.cl-recast__move { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 10px; }
.cl-recast__tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-default); background: var(--bg-surface-2); }
.cl-recast__tile > span { font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.cl-recast__tile > b { font-size: 14px; font-weight: 650; color: var(--text-primary); }
.cl-recast__tile > small { font-size: 11.5px; color: var(--text-secondary); overflow-wrap: anywhere; }
.cl-recast__tile[data-side="from"] { border-color: color-mix(in srgb, var(--status-warning) 40%, var(--border-default)); background: color-mix(in srgb, var(--status-warning) 7%, var(--bg-surface)); }
.cl-recast__tile[data-side="from"] > b { color: var(--status-warning); }
.cl-recast__tile[data-side="to"] { border-color: color-mix(in srgb, var(--status-verified) 45%, var(--border-default)); background: color-mix(in srgb, var(--status-verified) 8%, var(--bg-surface)); }
.cl-recast__tile[data-side="to"] > b { color: var(--status-verified); }
.cl-recast__arrow { align-self: center; font-size: 18px; color: var(--text-faint); }
.cl-recast__promises { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cl-recast__promises > li { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.cl-recast__promises b { color: var(--text-primary); font-weight: 600; }
.cl-recast__tick { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 999px; font-size: 10px; font-weight: 700; color: var(--status-verified); background: var(--status-verified-soft); }
.cl-recast__blocks { display: grid; gap: 4px; margin: 0; padding: 10px 12px; list-style: none; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--status-error) 40%, var(--border-default)); background: var(--status-error-soft); color: var(--status-error); font-size: 12px; }
.cl-recast__error { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--status-error); background: var(--status-error-soft); color: var(--status-error); font-size: 12.5px; }
.cl-recast__state { --tone: var(--accent-brief); padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--tone) 45%, var(--border-default)); background: color-mix(in srgb, var(--tone) 7%, var(--bg-surface)); }
.cl-recast__state[data-tone="go"] { --tone: var(--status-verified); }
.cl-recast__state[data-tone="stop"] { --tone: var(--status-warning); }
.cl-recast__state p { margin: 4px 0 8px; font-size: 13px; color: var(--text-primary); }
.cl-recast__eyebrow { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--tone); }
.cl-recast__watch { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--accent-brief); }
.cl-recast__note { margin: 0; font-size: 12px; color: var(--text-secondary); }
.cl-recast__rooms { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 40vh; overflow-y: auto; }
.cl-recast__room { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border-default); background: var(--bg-surface-2); }
.cl-recast__room-name { min-width: 0; font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-recast__room-name small { color: var(--text-muted); font-size: 11px; }
.cl-recast__why { grid-column: 1 / -1; font-size: 11.5px; color: var(--status-error); }
.cl-recast__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-default); }
.cl-recast__form { display: contents; }
.cl-recast__slots, .cl-recast__who { margin-right: auto; font-size: 11.5px; color: var(--text-muted); }
.cl-recast__stop { color: var(--status-error); border-color: var(--status-error); }
@media (max-width: 480px) { .cl-recast__move { grid-template-columns: 1fr; } .cl-recast__arrow { transform: rotate(90deg); justify-self: center; } .cl-recast__body { padding: 14px 12px; } }
