/* =====================================================================
   Proxa × Traylor — "Chat with agents" left panel
   Loads after styles/app.css to override grid for the chat column.
   ===================================================================== */

/* ===== App grid: rail | chat | main =====
   --chat-width is set inline on .app from React state (0 when closed).
   Explicit grid placement so closed ChatPanel (null) doesn't shift main. */
.app {
  grid-template-columns: var(--rail-width, 55px) 1fr var(--chat-width, 0px);
}
.app.app--mobile {
  grid-template-columns: 1fr;
}
.app:not(.app--mobile) > .rail { grid-column: 1; grid-row: 1; }
.app:not(.app--mobile) > .main { grid-column: 2; grid-row: 1; }
.app:not(.app--mobile) > .chat-panel--desktop { grid-column: 3; grid-row: 1; }

/* Rail Proxa-mark icon: matches other rail items but with our P glyph */
.rail__item--chat svg path { fill: currentColor; }
.rail__item--chat.is-active {
  background: var(--bg-white);
  color: var(--fg-dark);
  box-shadow: inset 0 0 0 1px var(--border-light);
}

/* ===== Panel container ===== */
.chat-panel {
  position: relative;
  background: var(--bg-app);
  border-left: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  height: 100vh;
  /* NOTE: no overflow:hidden — would clip the resize handle that sits at right: -3px */
}
.chat-panel--desktop {
  grid-column: 2;
  grid-row: 1;
  /* Almost-full-height floating card, anchored to the bottom-right */
  height: calc(100vh - 24px);
  align-self: end;
  margin: 0 12px 12px 0;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(23,20,18,0.05), 0 16px 40px -12px rgba(23,20,18,0.18);
}
.chat-panel--desktop .chat-panel__composer-wrap { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.chat-panel--desktop .chat-panel__head { border-top-left-radius: 14px; border-top-right-radius: 14px; }
@keyframes chatPanelIn {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: none; }
}

/* ===== Mobile bottom drawer ===== */
.chat-panel__scrim {
  position: fixed; inset: 0;
  background: rgba(23, 20, 18, 0.32);
  z-index: 88;
  animation: chatScrimIn 160ms ease-out;
}
@keyframes chatScrimIn { from { opacity: 0; } to { opacity: 1; } }
.chat-panel--mobile {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  top: 56px;
  border-right: none;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  z-index: 89;
  height: auto;
  box-shadow: 0 -16px 40px -12px rgba(23,20,18,0.22);
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
  animation: chatPanelUp 240ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes chatPanelUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.chat-panel__grabber {
  display: flex; justify-content: center;
  padding: 8px 0 4px;
  cursor: grab;
  touch-action: pan-y;
}
.chat-panel__grabber span {
  width: 38px; height: 4px;
  border-radius: 999px;
  background: rgba(38,24,17,0.18);
}

/* ===== Header ===== */
.chat-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  flex: none;
}
.chat-panel__title {
  font: 500 14px/1.2 'Inter';
  color: var(--fg-dark);
  letter-spacing: -0.01em;
  margin: 0;
}
.chat-panel__head-actions {
  display: flex; align-items: center; gap: 2px;
}
.chat-panel__head-actions .iconbtn { color: var(--fg-muted); }
.chat-panel__head-actions .iconbtn:hover { color: var(--fg-dark); }

/* ===== Body (scrolling area) ===== */
.chat-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 18px 12px;
  display: flex; flex-direction: column;
}
.chat-panel__body::-webkit-scrollbar { width: 10px; }
.chat-panel__body::-webkit-scrollbar-thumb {
  background: rgba(160,151,146,0.35); border-radius: 999px;
  border: 2px solid var(--bg-app);
}

/* ===== Empty state ===== */
.chat-empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 8px 40px;
  text-align: center;
  gap: 12px;
}
.chat-empty__mark { margin-bottom: 6px; }
.chat-empty__q {
  margin: 0 0 8px;
  font: 500 16px/1.35 'Inter';
  color: var(--fg-dark);
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 22em;
}
.chat-empty__prompts {
  display: flex; flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}
.chat-empty__prompt {
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  font: 400 13px/1.3 'Inter';
  color: var(--fg-dark);
  letter-spacing: -0.005em;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.chat-empty__prompt:hover:not([disabled]) {
  background: var(--bg-hover);
  border-color: rgba(38,24,17,0.16);
}
.chat-empty__prompt[disabled] { opacity: 0.5; cursor: default; }

/* ===== Thread ===== */
.chat-thread {
  display: flex; flex-direction: column;
  gap: 16px;
  padding: 12px 0 8px;
}
.chat-msg {
  display: flex;
  gap: 10px;
  font: 400 13px/1.55 'Inter';
  color: var(--fg-dark);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.chat-msg__avatar {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 999px;
  background: rgba(38,24,17,0.06);
  display: grid; place-items: center;
  margin-top: 1px;
}
.chat-msg__avatar svg path { fill: var(--fg-dark); }

.chat-msg__wrap {
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
  flex: 1;
}
.chat-msg__body {
  font: 400 13px/1.6 'Inter';
  color: var(--fg-dark);
  letter-spacing: -0.005em;
  min-width: 0;
}
.chat-msg__body strong { font-weight: 500; color: var(--fg-dark); }
.chat-msg__br { display: block; height: 10px; }

.chat-msg--user {
  justify-content: flex-end;
}
.chat-msg--user .chat-msg__body {
  background: rgba(38,24,17,0.06);
  border-radius: 12px;
  padding: 10px 14px;
  max-width: 86%;
  white-space: pre-wrap;
}

.chat-msg--assistant { align-items: flex-start; }

.chat-msg__status {
  display: inline-flex; align-items: center; gap: 8px;
  padding-top: 3px;
  font: 400 12.5px/1.4 'Inter';
  color: var(--fg-muted);
}
.chat-msg__dots {
  display: inline-flex; align-items: center; gap: 3px;
}
.chat-msg__dots i {
  width: 4px; height: 4px; border-radius: 999px;
  background: var(--fg-muted);
  animation: chatDots 1.1s ease-in-out infinite;
}
.chat-msg__dots i:nth-child(2) { animation-delay: 0.15s; }
.chat-msg__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatDots {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.chat-msg__caret {
  display: inline-block;
  width: 6px; height: 13px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--fg-dark);
  animation: chatCaret 1s ease-in-out infinite;
}
@keyframes chatCaret {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.85; }
}

.chat-msg__body--err {
  color: var(--fg-muted);
  font-style: normal;
}

/* ===== Citation chips ===== */
.chat-cite {
  display: inline-flex; align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  margin: 6px 6px 0 0;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-white);
  color: var(--fg-dark);
  font: 400 12px/1.2 'Inter';
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  max-width: 100%;
}
.chat-cite:hover {
  background: var(--bg-hover);
  border-color: rgba(38,24,17,0.18);
}
.chat-cite__num {
  flex: none;
  width: 16px; height: 16px;
  border-radius: 4px;
  background: rgba(38,24,17,0.08);
  color: var(--fg-dark);
  font: 500 10px/16px 'Inter';
  text-align: center;
  font-feature-settings: "tnum";
}
.chat-cite__lbl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

/* ===== Composer ===== */
.chat-panel__composer-wrap {
  flex: none;
  padding: 8px 14px 14px;
  position: relative;
}
.chat-composer {
  position: relative;
  display: flex; flex-direction: column;
  padding: 12px 12px 10px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(38,24,17,0.02);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.chat-composer:focus-within {
  border-color: rgba(38,24,17,0.32);
  box-shadow: 0 0 0 3px rgba(23,20,18,0.04);
}
.chat-composer__agentrow {
  display: flex; justify-content: flex-end;
  margin-bottom: 6px;
}
.chat-composer__editor-wrap {
  position: relative;
  width: 100%;
  min-height: 22px;
}
.chat-composer__editor {
  width: 100%;
  min-height: 22px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;          /* never show horizontal scroll */
  font: 300 14px/1.5 'Inter';
  color: var(--fg-dark);
  letter-spacing: -0.005em;
  outline: none;
  word-wrap: break-word;
  overflow-wrap: anywhere;     /* break long chip text gracefully */
  white-space: pre-wrap;
}
.chat-composer__placeholder {
  position: absolute;
  left: 0; top: 0;
  font: 300 14px/1.5 'Inter';
  color: var(--fg-light-muted);
  pointer-events: none;
  user-select: none;
  transition: opacity 320ms ease, transform 320ms ease;
}
.chat-composer__placeholder.is-in  { opacity: 1; transform: translateY(0); }
.chat-composer__placeholder.is-out { opacity: 0; transform: translateY(-4px); }

/* Mention chip inside the editor — monochrome, matches mention-picker icons */
.chat-mchip {
  display: inline-block;
  padding: 1px 8px;
  background: rgba(38, 24, 17, 0.06);
  border-radius: 4px;
  color: var(--fg-dark);
  font: 500 13px/1.4 'Inter';
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: baseline;
}
.chat-mchip--skill {
  /* Same neutral tone — skills are folders too, no special color. */
  background: rgba(38, 24, 17, 0.06);
  color: var(--fg-dark);
}

/* Agent selector */
.chat-agentsel { position: relative; flex: none; margin-top: -2px; }
.chat-agentsel__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 6px;
  background: transparent;
  border: 0;
  color: var(--fg-base);
  font: 400 12px/1.3 'Inter';
  letter-spacing: -0.005em;
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
}
.chat-agentsel__btn:hover { background: var(--bg-hover); }
.chat-agentsel__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 200px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 -12px 24px rgba(0,0,0,0.08);
  padding: 6px;
  z-index: 30;
}
.chat-agentsel__item {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 7px 8px;
  background: transparent; border: 0;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  color: var(--fg-dark);
  font: 400 13px/1.2 'Inter';
  letter-spacing: -0.005em;
}
.chat-agentsel__item:hover { background: var(--bg-hover); }
.chat-agentsel__item.is-active { color: var(--fg-dark); }
.chat-agentsel__item span { flex: 1; }
.chat-agentsel__item svg { color: var(--fg-muted); }

/* Composer foot row (attach + send) */
.chat-composer__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.chat-composer__add {
  width: 28px; height: 28px;
  border: 0; background: transparent;
  border-radius: 6px;
  color: var(--fg-muted);
  cursor: pointer;
  display: grid; place-items: center;
}
.chat-composer__add:hover { background: var(--bg-hover); color: var(--fg-dark); }
.chat-composer__send {
  width: 30px; height: 30px;
  border: 0; border-radius: 8px;
  background: var(--fg-dark);
  color: #FFFCFA;
  cursor: pointer;
  display: grid; place-items: center;
  transition: opacity 120ms ease, background 120ms ease;
}
.chat-composer__send:hover { background: #000; }
.chat-composer__send[disabled] {
  background: rgba(38,24,17,0.25);
  cursor: not-allowed;
}

/* @-mentions picker */
.chat-mentions {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(100% + 6px);
  display: flex; flex-direction: column;
  gap: 1px;
  padding: 6px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 -12px 24px rgba(0,0,0,0.08);
  z-index: 40;
  max-height: 280px;
  overflow-y: auto;
  animation: chatMentionIn 140ms ease-out;
}
@keyframes chatMentionIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.chat-mentions__hd {
  font: 500 10px/1 'Inter';
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 8px 6px;
}
.chat-mentions__item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 7px 8px;
  background: transparent; border: 0;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  color: var(--fg-dark);
}
.chat-mentions__item.is-active {
  background: var(--bg-hover);
}
.chat-mentions__ico {
  width: 22px; height: 22px; flex: none;
  border-radius: 4px;
  background: rgba(38,24,17,0.05);
  display: grid; place-items: center;
  color: var(--fg-muted);
}
.chat-mentions__ico--collection { background: rgba(38,24,17,0.06); color: var(--fg-muted); }
.chat-mentions__ico--skill { background: rgba(38,24,17,0.05); color: var(--fg-muted); }
.chat-mentions__ico--record { background: rgba(38,24,17,0.05); color: var(--fg-muted); }
.chat-mentions__lbl {
  flex: 1; min-width: 0;
  font: 400 13px/1.3 'Inter';
  color: var(--fg-dark);
  letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-mentions__sub {
  font: 400 11px/1 'Inter';
  color: var(--fg-muted);
  letter-spacing: -0.005em;
  flex: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

/* ===== Drawer tabs (Agents / Skills / Workflows) ===== */
.chat-panel__tabs {
  flex: none;
  display: flex; gap: 6px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border-light);
}
.chat-tab {
  flex: 1;
  height: 30px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-white);
  color: var(--fg-muted);
  font: 500 12.5px/1 'Inter';
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.chat-tab:hover { background: var(--bg-hover); color: var(--fg-dark); }
.chat-tab.is-active { background: var(--fg-dark); border-color: var(--fg-dark); color: #FFFCFA; }

/* Skills / workflows lists */
.chat-list { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 4px; }
.chat-list__item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 11px 13px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.chat-list__item:hover { background: var(--bg-hover); border-color: var(--border-subtle); }
.chat-list__name { font: 500 13.5px/1.3 'Inter'; color: var(--fg-dark); }
.chat-list__desc { font: 300 12.5px/1.5 'Inter'; color: var(--fg-muted); }
.chat-list__meta { font: 400 11px/1 'Inter'; color: var(--fg-light-muted); margin-top: 3px; }

/* ===== Resize handle ===== */
.chat-panel__resize {
  position: absolute;
  top: 0; bottom: 0;
  left: -6px;
  width: 12px;
  cursor: col-resize;
  z-index: 200;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
  /* Visual hairline */
}
.chat-panel__resize::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 5px;
  width: 2px;
  background: transparent;
  transition: background 120ms ease;
  pointer-events: none;
}
.chat-panel__resize:hover::after,
.chat-panel__resize:active::after {
  background: rgba(38,24,17,0.22);
}
/* While dragging, the body gets this class — disables selection everywhere */
body.is-chat-resizing,
body.is-chat-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* ===== Mobile tweaks for chat ===== */
@media (max-width: 1024px) {
  .chat-panel__head { padding: 6px 14px 10px; }
  .chat-panel__body { padding: 4px 14px 10px; }
  .chat-panel__composer-wrap { padding: 6px 12px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .chat-empty { padding: 16px 4px 20px; }
}

/* ===== Task flows (Control · Tasks → agent-driven cards) ===== */
.tf-ref{display:flex;flex-direction:column;gap:3px;padding:8px 11px 9px;margin:0 0 10px;background:rgba(38,24,17,0.035);border-radius:8px}
.tf-ref__type{font:400 10px/1.2 'Inter';letter-spacing:0.07em;text-transform:uppercase;color:var(--fg-muted)}
.tf-ref__title{font:400 12.5px/1.4 'Inter';color:var(--fg-dark);letter-spacing:-0.005em}
.tf-card{display:flex;flex-direction:column;gap:10px;margin:12px 0 2px;padding:12px;background:var(--bg-white);border:1px solid var(--border-light);border-radius:12px}
.tf-card--flat{padding:0;background:transparent;border:none;border-radius:0}
.tf-head{display:flex;align-items:baseline;gap:8px}
.tf-head__lbl{font:500 11.5px/1.2 'Inter';color:var(--fg-dark);letter-spacing:-0.005em}
.tf-head__meta{margin-left:auto;font:400 11px/1.2 'Inter';color:var(--fg-muted);font-variant-numeric:tabular-nums}
.tf-sub{font:400 11.5px/1.3 'Inter';color:var(--fg-muted);margin-top:2px}
.tf-drop{display:flex;flex-direction:column;align-items:center;gap:5px;padding:20px 14px;border:1px dashed rgba(38,24,17,0.22);border-radius:10px;background:rgba(38,24,17,0.015);cursor:pointer;font-family:inherit;text-align:center}
.tf-drop:hover,.tf-drop.is-over{border-color:rgba(38,24,17,0.4);background:rgba(38,24,17,0.04)}
.tf-drop__ico{color:var(--fg-muted)}
.tf-drop__ico svg{width:19px;height:19px;display:block}
.tf-drop__lbl{font:400 12.5px/1.35 'Inter';color:var(--fg-dark)}
.tf-drop__hint{font:400 11px/1.3 'Inter';color:var(--fg-muted)}
.tf-file{display:inline-flex;align-items:center;gap:7px;font:400 12.5px/1.2 'Inter';color:var(--fg-dark);padding:8px 11px;border:1px solid var(--border-light);border-radius:8px;background:var(--bg-white)}
.tf-file svg{width:14px;height:14px;color:var(--fg-muted)}
.tf-sent{font:400 11.5px/1.2 'Inter';color:var(--fg-muted);margin-left:8px}
.tf-btn{font:500 12px/1.2 'Inter';padding:8px 14px;border-radius:8px;border:1px solid #33302E;background:#33302E;color:#FFFDFB;cursor:pointer;font-family:inherit;white-space:nowrap}
.tf-btn:hover:not(:disabled){background:#211E1C}
.tf-btn:disabled{opacity:.45;cursor:default}
.tf-btn--ghost{background:var(--bg-white);border-color:var(--border-light);color:var(--fg-dark)}
.tf-btn--ghost:hover:not(:disabled){background:var(--bg-hover);border-color:rgba(38,24,17,0.18)}
.tf-btn--wide{width:100%;text-align:center}
.tf-btn--xs{padding:4px 10px;font-size:11px;margin-left:auto}
.tf-btnrow{display:flex;flex-wrap:wrap;gap:8px}
.tf-q__q,.tf-qa__q{font:400 12.5px/1.45 'Inter';color:var(--fg-dark);letter-spacing:-0.005em}
.tf-q{display:flex;flex-direction:column;gap:8px}
.tf-opts{display:flex;flex-wrap:wrap;gap:7px}
.tf-opt{font:400 12px/1.2 'Inter';padding:7px 11px;border-radius:999px;border:1px solid var(--border-light);background:var(--bg-white);color:var(--fg-dark);cursor:pointer;font-family:inherit}
.tf-opt:hover{background:var(--bg-hover);border-color:rgba(38,24,17,0.18)}
.tf-qa{display:flex;flex-direction:column;gap:3px;padding-bottom:8px;border-bottom:1px solid var(--border-light)}
.tf-qa__q{color:var(--fg-muted)}
.tf-qa__a{display:flex;align-items:center;gap:7px;font:400 12.5px/1.4 'Inter';color:var(--fg-dark)}
.tf-qa__a svg{width:13px;height:13px;color:#2E6E48;flex-shrink:0}
.tf-radios{display:flex;flex-direction:column;gap:8px}
.tf-radio{display:flex;align-items:flex-start;gap:10px;padding:11px;border:1px solid var(--border-light);border-radius:10px;background:var(--bg-white);cursor:pointer;font-family:inherit;text-align:left}
.tf-radio:hover:not(:disabled){border-color:rgba(38,24,17,0.2)}
.tf-radio.is-on{border-color:#33302E;background:rgba(38,24,17,0.025)}
.tf-radio:disabled{cursor:default}
.tf-radio__dot{width:14px;height:14px;border-radius:50%;border:1px solid rgba(38,24,17,0.28);flex-shrink:0;margin-top:2px}
.tf-radio.is-on .tf-radio__dot{border-color:#33302E;box-shadow:inset 0 0 0 3.5px #FFFDFB,inset 0 0 0 14px #33302E}
.tf-radio__main{display:flex;flex-direction:column;gap:2px;min-width:0}
.tf-radio__val{font:500 14px/1.2 'Inter';color:var(--fg-dark);font-variant-numeric:tabular-nums}
.tf-radio__src{font:400 11.5px/1.3 'Inter';color:var(--fg-dark)}
.tf-radio__det{font:400 11px/1.35 'Inter';color:var(--fg-muted)}
.tf-chips{display:flex;flex-wrap:wrap;gap:7px}
.tf-chip{font:400 11.5px/1.2 'Inter';padding:6px 10px;border-radius:999px;border:1px solid var(--border-light);background:var(--bg-white);color:var(--fg-dark);cursor:pointer;font-family:inherit}
.tf-chip:hover:not(:disabled){background:var(--bg-hover)}
.tf-chip.is-on{background:#33302E;border-color:#33302E;color:#FFFDFB}
.tf-diff{display:flex;flex-direction:column}
.tf-diff__row{display:grid;grid-template-columns:1fr auto 14px auto;align-items:center;gap:8px;padding:9px 0;border-bottom:1px solid var(--border-light);font:400 12px/1.3 'Inter'}
.tf-diff__row:last-child{border-bottom:none}
.tf-diff__m{color:var(--fg-dark);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-diff__b{color:var(--fg-muted);font-variant-numeric:tabular-nums}
.tf-diff__ar{color:var(--fg-muted);display:flex}
.tf-diff__ar svg{width:13px;height:13px}
.tf-diff__a{color:var(--fg-dark);font-weight:500;font-variant-numeric:tabular-nums}
.tf-diff__d{grid-column:1/-1;display:flex;align-items:center;gap:6px;font:400 11px/1.2 'Inter';color:var(--fg-muted)}
.tf-diff__row.is-warn .tf-diff__d{color:#B4772B}
.tf-diff__d svg{width:12px;height:12px}
.tf-prog{display:block;height:4px;border-radius:999px;background:rgba(38,24,17,0.08);overflow:hidden}
.tf-prog i{display:block;height:100%;border-radius:999px;background:#7D6E66;transition:width .45s ease}
.tf-steps{display:flex;flex-direction:column}
.tf-step{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--border-light);font:400 12.5px/1.35 'Inter';color:var(--fg-dark)}
.tf-step:last-child{border-bottom:none}
.tf-step__box{width:15px;height:15px;border-radius:4px;border:1px solid rgba(38,24,17,0.22);flex-shrink:0;display:grid;place-items:center;color:#FFFDFB}
.tf-step__box svg{width:11px;height:11px}
.tf-step.is-done .tf-step__box{background:#33302E;border-color:#33302E}
.tf-step.is-done .tf-step__lbl{color:var(--fg-muted);text-decoration:line-through;text-decoration-color:rgba(38,24,17,0.25)}
.tf-step__lbl{min-width:0;flex:1}
.tf-step__owner{font:400 10px/1.2 'Inter';letter-spacing:0.05em;text-transform:uppercase;color:var(--fg-muted);white-space:nowrap}
.tf-step.is-running .tf-step__lbl{color:var(--fg-muted)}
.tf-card--done{background:rgba(46,110,72,0.04);border-color:rgba(46,110,72,0.18)}
.tf-done__head{display:flex;align-items:center;gap:8px;font:500 12.5px/1.2 'Inter';color:var(--fg-dark)}
.tf-done__ico{width:17px;height:17px;border-radius:50%;background:#2E6E48;color:#fff;display:grid;place-items:center}
.tf-done__ico svg{width:11px;height:11px}
.tf-done__rows{display:flex;flex-direction:column;gap:6px;margin:0}
.tf-done__row{display:flex;align-items:baseline;gap:10px;font:400 12px/1.3 'Inter'}
.tf-done__row dt{color:var(--fg-muted);min-width:0}
.tf-done__row dd{margin:0 0 0 auto;color:var(--fg-dark);text-align:right}
.tf-done__note{font:400 11px/1.3 'Inter';color:var(--fg-muted)}
.chat-threadbar{display:flex;align-items:center;gap:10px;padding:9px 14px;border-bottom:1px solid var(--border-light);background:rgba(38,24,17,0.02)}
.chat-threadbar__main{display:flex;flex-direction:column;gap:2px;min-width:0}
.chat-threadbar__type{font:400 9.5px/1.2 'Inter';letter-spacing:0.08em;text-transform:uppercase;color:var(--fg-muted)}
.chat-threadbar__title{font:400 12px/1.3 'Inter';color:var(--fg-dark);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-threadbar__back{margin-left:auto;flex-shrink:0;font:400 11.5px/1.2 'Inter';color:var(--fg-muted);background:transparent;border:1px solid var(--border-light);border-radius:999px;padding:5px 11px;cursor:pointer;font-family:inherit;white-space:nowrap}
.chat-threadbar__back:hover{color:var(--fg-dark);background:var(--bg-white)}
