/* «Что мы нашли» и ИИ-консультант */

.ins-wrap { margin-bottom: 16px; }
.ins-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ins-head h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; }
.ins-head h2 svg { color: var(--accent); }
.ins-lost { text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; }
.ins-lost span { display: block; font-size: 12px; color: var(--ink-3); }
.ins-lost b { font-size: 24px; letter-spacing: -.02em; color: var(--bad, #e5484d); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.ins { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 12px; display: flex; flex-direction: column; overflow: hidden; }
.ins::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ink-3); }
.ins.bad::before { background: var(--bad, #e5484d); }
.ins.warn::before { background: var(--warn, #f5a524); }
.ins.good::before { background: var(--good, #12a150); }
.ins.info::before { background: var(--line); }
.ins.info .ins-big { color: var(--ink-2, var(--ink)); }
.ins-sure { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.ins-sure.high { color: var(--good, #12a150); }
.ins-top { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ins-ic { font-size: 18px; }
.ins-big { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 4px; line-height: 1.15; }
.ins.bad .ins-big { color: var(--bad, #e5484d); }
.ins.good .ins-big { color: var(--good, #12a150); }
.ins p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2, var(--ink)); flex: 1; }
.ins-money { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.ins-money b { color: var(--ink); }
.ins-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ins-how { background: none; border: 0; color: var(--ink-3); font-size: 12px; cursor: pointer; text-decoration: underline dotted; padding: 4px 0; font-family: inherit; }
.ins-howt { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--ink-3); background: var(--bg, rgba(127,127,127,.06)); border-radius: 10px; padding: 8px 10px; }
.ins-howt.hidden { display: none; }

/* ── Чат ── */
.cw.gone { display: none; }
.cw-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--btn); color: var(--btn-ink); font: 600 14px/1 inherit; font-family: inherit;
  padding: 13px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(81, 70, 229, .35); transition: transform .15s; }
.cw-fab:hover { transform: translateY(-2px); }
.cw.open .cw-fab { display: none; }
.cw-panel { position: fixed; right: 18px; bottom: 18px; z-index: 70; width: 400px; max-width: calc(100vw - 32px); height: min(640px, calc(100vh - 36px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px rgba(10, 12, 40, .28);
  display: none; flex-direction: column; overflow: hidden; }
.cw.open .cw-panel { display: flex; animation: cwIn .18s ease-out; }
@keyframes cwIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cw-h { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.cw-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--accent); flex: none; }
.cw-ht { flex: 1; min-width: 0; line-height: 1.25; }
.cw-ht span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cw-m { display: flex; }
.cw-m.me { justify-content: flex-end; }
.cw-b { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; background: var(--bg, rgba(127,127,127,.08)); border: 1px solid var(--line); }
.cw-m.me .cw-b { background: var(--accent); color: #fff; border-color: transparent; border-bottom-right-radius: 6px; }
.cw-m.ai .cw-b { border-bottom-left-radius: 6px; }
.cw-b p { margin: 0 0 6px; }
.cw-b p:last-child { margin-bottom: 0; }
.cw-b ul, .cw-b ol { margin: 4px 0 8px; padding-left: 18px; }
.cw-b li { margin-bottom: 4px; }
.cw-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cw-think { color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: cwDot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cwDot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.cw-chips { display: flex; gap: 6px; padding: 4px 12px 8px; overflow-y: auto; flex-wrap: wrap; max-height: 104px; flex: none; }
.cw-chips:empty { display: none; }
.cw-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 11px; font: 13px/1.2 inherit; font-family: inherit;
  cursor: pointer; text-align: left; max-width: 100%; }
.cw-chip:hover { border-color: var(--accent); color: var(--accent); }
.cw-in { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.cw-in textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 14px/1.4 inherit; font-family: inherit;
  background: var(--bg, transparent); color: var(--ink); min-height: 42px; outline: none; }
.cw-in textarea:focus { border-color: var(--accent); }
.cw-in .btn { height: 42px; width: 42px; padding: 0; justify-content: center; }

@media (max-width: 720px) {
  .cw-fab { right: 14px; bottom: 14px; padding: 12px 15px; }
  .cw-panel { inset: 0; width: 100%; max-width: none; height: 100%; border-radius: 0; border: 0; }
  .ins-lost { text-align: left; }
}
@media print { .cw { display: none; } }

/* Руки Айи: тексты, картинки, сборка прямо в переписке */
.cw-texts, .cw-creos, .cw-job { margin-top: 10px; }
.cw-texts { display: flex; flex-direction: column; gap: 8px; }
.cw-tx { border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cw-tx-p { white-space: pre-wrap; font-size: 13.5px; }
.cw-creos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-width: 520px; }
.cw-cr { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.cw-cr img, .cw-cr video { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cw-cr-f { display: flex; gap: 6px; justify-content: center; padding: 6px; min-height: 40px; align-items: center; }
.cw-cr-f .btn { flex: 1; justify-content: center; min-height: 34px; }
.cw-job-g .cw-creos { margin-top: 8px; }
