/* Agente IA flotante: el botón que se arrastra y su panel. Todo sale de los tokens del tema
   (tokens.css): colores, radios, sombras, capas y movimiento, así que cambia solo con el tema. Va
   por encima de los diálogos (--z-float) como el botón de tema. */

/* Lo propio del panel, derivado de los tokens (nada de colores sueltos). La marca (navy y naranja)
   no cambia con el tema, como el logo; lo demás sí. */
:root {
  --asist-brand-hi: var(--navy-700);
  --asist-brand: var(--navy);
  --asist-brand-lo: var(--navy-deep);
  --asist-edge: var(--orange);
  --asist-brand-grad: radial-gradient(120% 120% at 32% 18%, var(--asist-brand-hi) 0%,
                                      var(--asist-brand) 46%, var(--asist-brand-lo) 100%);
  --asist-glow: color-mix(in srgb, var(--asist-edge) 18%, transparent);
  --asist-shadow: 0 8px 22px color-mix(in srgb, var(--asist-brand-lo) 34%, transparent);
  --asist-pad: 14px;
  --asist-gap: 10px;
  --asist-fs: 14px;
  --asist-fs-sm: 12.5px;
  --asist-fs-xs: 11.5px;
}

/* ───────────────────────── El botón: SofIA ───────────────────────── */
.tp-asist-fab {
  position: fixed;
  z-index: calc(var(--z-float, 3000) + 1);
  width: 52px; height: 52px; border-radius: 50%; padding: 0; overflow: hidden;
  display: grid; place-items: center;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--asist-brand-grad);
  color: var(--accent-solid-tx, #fff);
  border: 1.5px solid color-mix(in srgb, var(--asist-edge) 62%, transparent);
  box-shadow: var(--asist-shadow), inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease);
}
.tp-asist-fab .tpava-icon, .tp-asist-fab .tpava-glyph { width: 100%; height: 100%; pointer-events: none; }
.tp-asist-fab:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 0 0 4px var(--asist-glow), var(--asist-shadow); }
.tp-asist-fab:focus-visible { outline: 2px solid var(--sb-focus); outline-offset: 3px; }
.tp-asist-fab.is-dragging { cursor: grabbing; transform: scale(1.08); box-shadow: var(--shadow-lg); transition: none; }
.tp-asist-fab.is-open { box-shadow: 0 0 0 3px color-mix(in srgb, var(--asist-edge) 55%, transparent), var(--asist-shadow); }
.tp-asist-fab.is-homing { pointer-events: none; }
.tp-asist-fab[hidden] { display: none; }

/* «Volver a su lugar»: pegada al borde del botón, del lado de su lugar y apuntando hacia él. El
   rastro punteado avanza hacia la punta. Zona táctil de 40 px aunque el círculo se vea de 24. */
.tp-asist-home {
  position: fixed;
  z-index: calc(var(--z-float, 3000) + 1);
  width: 24px; height: 24px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--asist-brand);
  border: 1.5px solid var(--asist-edge);
  box-shadow: var(--shadow-md);
  transition: transform .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.tp-asist-home::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.tp-asist-home svg { width: 15px; height: 15px; transform: rotate(var(--ang, 45deg)); }
.tp-asist-home:hover { transform: scale(1.14); background: color-mix(in srgb, var(--asist-edge) 12%, var(--surface)); box-shadow: var(--shadow-lg); }
.tp-asist-home:focus-visible { outline: 2px solid var(--sb-focus); outline-offset: 2px; }
.tp-asist-home[hidden] { display: none; }
.tp-asist-home.is-in { animation: tp-asist-home-in .26s var(--ease) both; }
.tp-asist-home__trail { stroke-dasharray: 2.4 2.6; animation: tp-asist-trail 1.2s linear infinite; }
@keyframes tp-asist-home-in { from { opacity: 0; transform: scale(.35); } to { opacity: 1; transform: scale(1); } }
@keyframes tp-asist-trail { to { stroke-dashoffset: -10; } }

/* ───────────────────────── El panel ───────────────────────── */
.tp-asist-panel {
  position: fixed;
  z-index: calc(var(--z-float, 3000) + 2);
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font: inherit;
}
.tp-asist-panel[hidden] { display: none; }
.tp-asist-panel:not([hidden]) { animation: tp-asist-in .18s var(--ease) both; }
@keyframes tp-asist-in { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
.tp-asist-panel.is-sheet {
  inset: 0; width: auto !important; height: auto !important;
  border-radius: 0; border: 0;
  padding-top: var(--safe-top); padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left); padding-right: var(--safe-right);
}

/* Cabecera: SofIA, el nombre y el módulo en una pastilla. */
.tp-asist__hd {
  position: relative;
  display: flex; align-items: center; gap: var(--asist-gap);
  padding: 10px 10px 10px var(--asist-pad);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--asist-brand) 7%, var(--surface-2)), var(--surface-2));
}
.tp-asist__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  overflow: hidden; flex: none; background: var(--asist-brand-grad);
  border: 1px solid color-mix(in srgb, var(--asist-edge) 55%, transparent); box-shadow: var(--shadow-sm); }
.tp-asist__icon .tpava-icon, .tp-asist__icon .tpava-glyph { width: 100%; height: 100%; }
.tp-asist__title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; line-height: 1.2; }
.tp-asist__title strong { color: var(--heading, var(--text)); font-size: 15px; white-space: nowrap; }
.tp-asist__module { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 var(--asist-fs-xs)/1 var(--ui); color: var(--text-2);
  padding: 4px 9px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); }
.tp-asist__module:empty { display: none; }
.tp-asist__iconbtn {
  width: 34px; height: 34px; border-radius: var(--r-sm); border: 0; background: transparent;
  color: var(--text-2); display: grid; place-items: center; cursor: pointer; flex: none;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.tp-asist__iconbtn:hover { background: var(--surface-3); color: var(--text); }
.tp-asist__iconbtn:focus-visible, .tp-asist__menu button:focus-visible, .tp-asist__tabs button:focus-visible,
.tp-asist__chip:focus-visible, .tp-asist__send:focus-visible, .tp-asist__copy:focus-visible,
.tp-asist__livecard:focus-visible, .tp-asist__hist button:focus-visible, .tp-asist__toend:focus-visible,
.tp-asist__pdf:focus-visible, .tp-asist__link:focus-visible { outline: 2px solid var(--sb-focus); outline-offset: 2px; }
.tp-asist__menu {
  position: absolute; right: 46px; top: 48px; z-index: 3;
  display: flex; flex-direction: column; min-width: 250px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); padding: 4px;
}
.tp-asist__menu[hidden] { display: none; }
.tp-asist__menu button {
  text-align: left; padding: 10px 12px; border: 0; background: transparent; color: var(--text);
  border-radius: var(--r-sm); cursor: pointer; font: inherit; font-size: var(--asist-fs);
}
.tp-asist__menu button:hover { background: var(--surface-2); }

/* Pestañas: Conversación · Seguimientos. */
.tp-asist__tabs { display: flex; gap: 4px; padding: 4px 10px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.tp-asist__tabs button {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: var(--asist-fs); cursor: pointer;
  padding: 9px 10px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  border-radius: var(--r-sm) var(--r-sm) 0 0; transition: color .12s var(--ease), background .12s var(--ease);
}
.tp-asist__tabs button:hover { color: var(--text); background: var(--surface-2); }
.tp-asist__tabs button.is-on { color: var(--text); border-bottom-color: var(--asist-edge); font-weight: 700; }
.tp-asist__count {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; font-size: 11px;
  line-height: 18px; text-align: center; background: var(--accent-solid, var(--primary)); color: var(--accent-solid-tx, #fff);
}
.tp-asist__count[hidden] { display: none; }

/* ───────────────────────── La conversación ───────────────────────── */
.tp-asist__bodywrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tp-asist__body { flex: 1; overflow-y: auto; padding: var(--asist-pad) 12px; overscroll-behavior: contain; scroll-behavior: smooth; }
.tp-asist__thread { display: flex; flex-direction: column; gap: 14px; }
.tp-asist__row { display: flex; gap: 8px; align-items: flex-start; }
.tp-asist__row--user { justify-content: flex-end; }
.tp-asist__ava { flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; margin-top: 2px;
  background: var(--asist-brand-grad); border: 1px solid color-mix(in srgb, var(--asist-edge) 45%, transparent); }
.tp-asist__ava svg { width: 100%; height: 100%; display: block; }
.tp-asist__msg { min-width: 0; max-width: 88%; display: flex; flex-direction: column; gap: 6px; }
.tp-asist__row--ai .tp-asist__msg { flex: 1; max-width: calc(100% - 36px); }
.tp-asist__row--user .tp-asist__msg { align-items: flex-end; }
.tp-asist__bubble {
  padding: 10px 13px; border-radius: var(--r-lg); line-height: 1.5;
  overflow-wrap: anywhere; font-size: var(--asist-fs);
}
.tp-asist__row--ai .tp-asist__bubble { background: var(--surface-2); border: 1px solid var(--border); border-top-left-radius: 6px; color: var(--text); }
.tp-asist__row--user .tp-asist__bubble { background: var(--user-grad, var(--accent-solid)); color: var(--user-tx, #fff); border-top-right-radius: 6px; white-space: pre-wrap; box-shadow: var(--shadow-sm); }

/* Lo que trae una respuesta en markdown: párrafos, listas, títulos, tablas (como chip que abre la
   tabla entera), código, citas, enlaces y separadores. Antes salían sin estilo dentro del panel. */
.tp-asist__md > :first-child { margin-top: 0; }
.tp-asist__md > :last-child { margin-bottom: 0; }
.tp-asist__md p { margin: 0 0 8px; }
.tp-asist__md ul, .tp-asist__md ol { margin: 4px 0 8px; padding-left: 20px; }
.tp-asist__md li { margin: 2px 0; }
.tp-asist__md li::marker { color: var(--text-3); }
.tp-asist__md h1, .tp-asist__md h2, .tp-asist__md h3, .tp-asist__md h4 {
  margin: 12px 0 6px; line-height: 1.3; color: var(--heading, var(--text)); font-weight: 800; }
.tp-asist__md h1 { font-size: 16px; } .tp-asist__md h2 { font-size: 15px; }
.tp-asist__md h3, .tp-asist__md h4 { font-size: var(--asist-fs); }
.tp-asist__md strong { color: var(--heading, var(--text)); font-weight: 700; }
.tp-asist__md a { color: var(--link, var(--primary)); text-decoration: underline; text-underline-offset: 2px; }
.tp-asist__md hr { border: 0; border-top: 1px solid var(--border-2); margin: 12px 0; }
.tp-asist__md code { font: 600 .88em/1.3 var(--mono); background: var(--code-bg); color: var(--code-tx);
  border: 1px solid var(--code-bd); padding: 1px 5px; border-radius: 5px; }
.tp-asist__md pre, .tp-asist__md .code-block { margin: 8px 0; padding: 10px 12px; overflow-x: auto;
  background: var(--code-bg); border: 1px solid var(--code-bd); border-radius: var(--r-sm); }
.tp-asist__md pre code { border: 0; padding: 0; background: transparent; font-weight: 500; }
.tp-asist__md blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--asist-edge);
  background: var(--surface); color: var(--text-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.tp-asist__md table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 8px 0;
  font-size: var(--asist-fs-sm); }
.tp-asist__md th, .tp-asist__md td { border: 1px solid var(--border-2); padding: 6px 9px; vertical-align: top; text-align: left; }
.tp-asist__md thead th { background: var(--thead-bg, var(--surface-3)); color: var(--thead-tx, var(--text)); font-weight: 700; }
.tp-asist__md .table-chip { margin: 6px 0; max-width: 100%; }

/* Pie de cada mensaje: la hora y «Copiar». */
.tp-asist__meta { display: flex; align-items: center; gap: 6px; padding: 0 4px; font-size: var(--asist-fs-xs); color: var(--text-3); }
.tp-asist__copy { border: 0; background: transparent; color: var(--text-3); font: inherit; font-size: var(--asist-fs-xs);
  cursor: pointer; padding: 2px 6px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 4px; }
.tp-asist__copy:hover { color: var(--text); background: var(--surface-2); }
.tp-asist__copy.is-done { color: var(--ok); }

/* De qué pantallas salió la respuesta: para que Gerencia sepa dónde comprobarla. */
.tp-asist__src { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 0 2px; }
.tp-asist__src-l { font-size: var(--asist-fs-xs); color: var(--text-3); }
.tp-asist__src-c { font: 600 var(--asist-fs-xs)/1 var(--ui); color: var(--text-2); padding: 4px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-2); }

/* El PDF de una cotización emitida. */
.tp-asist__pdf { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 9px 13px; border-radius: var(--r-md); font: 700 var(--asist-fs-sm)/1.2 var(--ui);
  background: color-mix(in srgb, var(--asist-edge) 14%, var(--surface)); color: var(--heading, var(--text));
  border: 1px solid color-mix(in srgb, var(--asist-edge) 55%, transparent); box-shadow: var(--shadow-sm);
  transition: background .12s var(--ease), transform .12s var(--ease); }
.tp-asist__pdf svg { color: var(--asist-edge); flex: none; }
.tp-asist__pdf:hover { background: color-mix(in srgb, var(--asist-edge) 24%, var(--surface)); transform: translateY(-1px); }

/* «Escribiendo»: tres puntos, no un texto en cursiva. */
.tp-asist__typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.tp-asist__typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3);
  animation: tp-asist-dot 1.2s infinite var(--ease); }
.tp-asist__typing span:nth-child(2) { animation-delay: .15s; }
.tp-asist__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes tp-asist-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.tp-asist__note { margin: 8px 0 0; font-size: var(--asist-fs-sm); color: var(--text-2); }

/* El inicio de una conversación: el saludo y las preguntas sugeridas como tarjetas. */
.tp-asist__hello { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 18px 10px 6px; }
.tp-asist__hello-ava { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--asist-brand-grad);
  border: 1.5px solid color-mix(in srgb, var(--asist-edge) 60%, transparent); box-shadow: var(--asist-shadow); }
.tp-asist__hello-ava svg { width: 100%; height: 100%; display: block; }
.tp-asist__hello-t { font: 800 16px/1.3 var(--ui); color: var(--heading, var(--text)); }
.tp-asist__hello-p { font-size: var(--asist-fs-sm); color: var(--text-2); line-height: 1.5; max-width: 300px; }
.tp-asist__chips { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 4px; }
.tp-asist__chip {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  border-radius: var(--r-md); padding: 10px 12px; font: inherit; font-size: var(--asist-fs-sm); cursor: pointer; text-align: left;
  transition: border-color .12s var(--ease), background .12s var(--ease), transform .12s var(--ease);
}
.tp-asist__chip::before { content: "›"; color: var(--asist-edge); font-weight: 800; font-size: 16px; line-height: 1; }
.tp-asist__chip:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--asist-edge) 50%, var(--border-2)); transform: translateY(-1px); }

/* Tarjetas de seguimiento dentro del hilo. */
.tp-asist__lives { display: flex; flex-direction: column; gap: 6px; }
.tp-asist__livecard {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border: 1px dashed var(--border-2); background: var(--surface); color: var(--text);
  border-radius: var(--r-md); padding: 8px 11px; font: inherit; font-size: var(--asist-fs-sm); cursor: pointer; text-align: left;
}
.tp-asist__livecard:hover { border-style: solid; border-color: var(--asist-edge); }
.tp-asist__livecard.is-gone { color: var(--text-3); cursor: default; text-decoration: line-through; }
.tp-asist__livecard-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tp-asist__livecard-a { color: var(--link, var(--text-2)); white-space: nowrap; font-size: var(--asist-fs-xs); flex: none; }

/* «Ir al final» cuando se subió a leer. */
.tp-asist__toend { position: absolute; right: 14px; bottom: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow-md); transition: transform .12s var(--ease); }
.tp-asist__toend:hover { transform: translateY(-1px); color: var(--text); }
.tp-asist__toend[hidden] { display: none; }

/* El campo de escribir. */
.tp-asist__composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border); background: var(--surface);
}
.tp-asist__composer[hidden] { display: none; }
.tp-asist__composer textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 10px 12px;
  border: 1px solid var(--border-2); border-radius: var(--r-md); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: var(--asist-fs); line-height: 1.35;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.tp-asist__composer textarea::placeholder { color: var(--text-3); }
.tp-asist__composer textarea:focus { outline: none; border-color: var(--asist-edge); box-shadow: 0 0 0 3px var(--asist-glow); }
.tp-asist__send {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: var(--btn-primary-bg, var(--accent-solid)); color: var(--btn-primary-tx, #fff);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
  transition: background .12s var(--ease), transform .12s var(--ease), opacity .12s var(--ease);
}
.tp-asist__send:hover:not(:disabled) { background: var(--btn-primary-bg-hov, var(--accent-solid)); transform: translateY(-1px); }
.tp-asist__send:disabled { opacity: .45; cursor: default; box-shadow: none; }
.tp-asist__foot { padding: 0 12px 8px; font-size: var(--asist-fs-xs); color: var(--text-3); background: var(--surface); }
.tp-asist__foot[hidden] { display: none; }

.tp-asist__empty { color: var(--text-2); font-size: var(--asist-fs-sm); padding: 12px 4px; line-height: 1.5; }
.tp-asist__link { border: 0; background: transparent; color: var(--link, var(--text-2)); cursor: pointer; font: inherit; font-size: var(--asist-fs-sm); padding: 2px 4px; border-radius: var(--r-sm); }
.tp-asist__link:hover { text-decoration: underline; }
.tp-asist__histhd { margin-bottom: 6px; }
.tp-asist__hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tp-asist__hist button {
  width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--r-md); padding: 10px 12px; font: inherit; font-size: var(--asist-fs-sm); cursor: pointer;
  transition: border-color .12s var(--ease), background .12s var(--ease);
}
.tp-asist__hist button:hover { border-color: var(--asist-edge); background: var(--surface-2); }
.tp-asist__hist button span { color: var(--text-2); white-space: nowrap; font-size: var(--asist-fs-xs); }
.tp-asist__hist button strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────────────────── Seguimientos ───────────────────────── */
.tp-asist__live { display: flex; flex-direction: column; gap: 10px; }
.tp-asist__livebar { display: flex; justify-content: flex-end; font-size: var(--asist-fs-sm); color: var(--text-2); }
.tp-asist__item { border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.tp-asist__item.is-pinned { border-color: var(--asist-edge); }
.tp-asist__item.is-focus { box-shadow: 0 0 0 2px var(--asist-edge); }
.tp-asist__item header { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tp-asist__item header strong { font-size: var(--asist-fs); }
.tp-asist__isum { margin: 4px 0 0; font-size: var(--asist-fs-sm); color: var(--text-2); }
.tp-asist__badge { font: 700 11px/1 var(--ui); padding: 3px 8px; border-radius: 999px; }
.tp-asist__badge--done { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-bd); }
.tp-asist__lrows { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tp-asist__lrows li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--hairline, var(--border)); }
.tp-asist__lrows li:first-child { border-top: 0; }
.tp-asist__lrow-l { overflow: hidden; text-overflow: ellipsis; }
.tp-asist__lrow-s { color: var(--text-2); white-space: nowrap; }
.tp-asist__lrow-c { grid-column: 1 / -1; font-size: 12px; color: var(--warn); }
.tp-asist__lrows li.is-final .tp-asist__lrow-s { color: var(--ok); }
.tp-asist__lrows li.is-gone { opacity: .6; }
.tp-asist__item footer { display: flex; align-items: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.tp-asist__upd { flex: 1; font-size: var(--asist-fs-xs); color: var(--text-3); }

/* ───────────────────────── Diálogo «Conectar con Claude o ChatGPT» ───────────────────────── */
.tp-asist-cx__lbl { display: block; font-size: var(--asist-fs-sm); color: var(--text-2); margin: 12px 0 4px; }
.tp-asist-cx__url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tp-asist-cx__url code { flex: 1; min-width: 220px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--code-bg, var(--surface-2));
  border: 1px solid var(--code-bd, var(--border)); color: var(--code-tx, var(--text)); overflow-wrap: anywhere; user-select: all; }
.tp-asist-cx__app { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 12px; }
.tp-asist-cx__app summary { cursor: pointer; font-weight: 600; }
.tp-asist-cx__app ol { margin: 8px 0 4px; padding-left: 20px; line-height: 1.55; }
.tp-asist-cx__h { margin: 16px 0 6px; font-size: var(--asist-fs); }
.tp-asist-cx__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tp-asist-cx__list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }

@media (max-width: 639px) {
  .tp-asist__chip, .tp-asist__menu button, .tp-asist__hist button { min-height: var(--tap, 44px); }
  .tp-asist__iconbtn, .tp-asist__send { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .tp-asist-fab, .tp-asist__chip, .tp-asist__pdf, .tp-asist__send { transition: none; }
  .tp-asist-panel:not([hidden]), .tp-asist-home.is-in, .tp-asist-home__trail,
  .tp-asist__typing span { animation: none; }
  .tp-asist__body { scroll-behavior: auto; }
}
