/* web/boot/mine1.css — [MINE1 fixes-v1] 2026-10-27
   Loaded LAST in <head> on purpose: each block below corrects a rule that
   lives in brandkit.css / plus.css without editing those files. Tokens only.

   1. Header never overlaps its right-hand cluster when the chat list is
      dragged wide (the two left tracks were vw-clamped and ignored the
      resizable #convpanel; the "Working on" pill rode over the export
      button and the status chip).
   2. Composer tool pills wrap to a second line instead of being clipped
      (the Excellence pill was cut off under the model picker).
   3. Collapsed home side column (Agents / Workflows / Projects): the
      header row was fixed at 36px while it stacked TWO 34px buttons, so the
      team icons painted over the "+" button.
   4. Scope chips (All · Mine · Templates · Built-in) on the Agents and
      Workflows lists. */

/* ---- 1. header: left cluster can shrink, right cluster never moves ---- */
#chathead { gap: 12px; }
#chathead .chathead-left { min-width: 0; overflow: visible; } /* [CTX1 ctxpop-unclip-v1] overflow:hidden clipped #ctxpop (brandkit.css makes .ctxpill-wrap position:relative, so the popover's containing block is inside this box and it opens entirely below it) — the Working-on dropdown was invisible */
#chathead:not([data-has-custom]) .chathead-left {
  grid-template-columns: minmax(110px, clamp(200px, 32vw, 440px)) minmax(150px, clamp(190px, 22vw, 330px));
}
@media (max-width: 1280px) {
  #chathead:not([data-has-custom]) .chathead-left {
    grid-template-columns: minmax(100px, clamp(180px, 26vw, 380px)) minmax(150px, clamp(180px, 20vw, 300px)); }
}
@media (max-width: 1100px) {
  #chathead:not([data-has-custom]) .chathead-left {
    grid-template-columns: minmax(90px, clamp(160px, 24vw, 320px)) minmax(140px, clamp(170px, 19vw, 280px)); }
}
@media (max-width: 900px) {
  #chathead:not([data-has-custom]) .chathead-left {
    grid-template-columns: minmax(0, 1fr) minmax(120px, clamp(150px, 20vw, 240px)); }
}
#chathead .chathead-right { flex: none; position: relative; z-index: 2;
  padding-left: 6px; background: var(--bg); }
/* the pill's label ellipsizes inside its (now shrinkable) track */
#ctxpill #ctxlabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---- 2. composer pills wrap instead of clipping ---- */
#composebar { align-items: center; flex-wrap: nowrap; }
#composebar .compose-left { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; row-gap: 6px; }
#composebar.pills-open .cplus-pills { flex: 1 1 auto; flex-wrap: wrap; row-gap: 5px;
  max-width: none; overflow: visible !important; }
#composebar .compose-right { flex: none; margin-left: auto; align-self: center; }
@media (max-width: 1100px) {
  /* narrower: pills keep their icon, drop the long label, title still tells */
  #composebar.pills-open .cplus-pill .cplus-pill-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
}

/* ---- 3. collapsed side column: header grows with its stacked buttons ---- */
.pk-col.c.side .pk-sidehead { height: auto !important; min-height: 0 !important;
  margin-bottom: 10px !important; }
.pk-col.c.side .pk-sidehead > * { position: static !important; }
.pk-col.c.side .agx-teams, .pk-col.c.side .wfx-fns, .pk-col.c.side .prjh-doms { margin-top: 2px; }
.pk-col.c.side .agx-team, .pk-col.c.side .wfx-fn, .pk-col.c.side .prjh-dom { min-height: 36px; }

/* ---- 4. scope chips on the Agents / Workflows lists ---- */
.mn-scope { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.mn-chip { height: 26px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--tb-border, var(--border)); background: transparent;
  color: var(--tb-text-secondary, var(--text-muted)); font-size: calc(12px * var(--z, 1)); font-weight: 500;
  cursor: pointer; transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
.mn-chip:hover { background: var(--surface-2, var(--tb-surface-2)); color: var(--tb-text, var(--text)); }
.mn-chip .n { font-size: 11px; color: var(--tb-text-muted); font-variant-numeric: tabular-nums; }
.mn-chip[aria-pressed="true"] { background: var(--selected-fill, var(--tb-accent-soft)); color: var(--tb-text, var(--text));
  border-color: color-mix(in srgb, var(--tb-accent-border, var(--tb-accent)) 45%, transparent); }
.mn-chip[aria-pressed="true"] .n { color: var(--tb-accent-text, var(--tb-accent)); }
.mn-chip:focus-visible { outline: 2px solid var(--tb-accent, var(--accent)); outline-offset: 2px; }
.agx-pill.builtin { background: var(--surface-2, var(--tb-surface-2)); color: var(--tb-text-muted); }
