/* Экран «Ассистент» (as-) — r31, 16.11.2026: язык чата «Новая рассылка» (css/screens/bc-brief.css). Слева колонка
   «Новый чат / История» 286 px (ручка ширины — js/core/rails.js); справа одна колонка ≈ 720: главная — лицо, «Чем помочь, …?»,
   поле App.promptInput (css/prompt-input.css), идеи строками; чат — шапка, реплика ассистента с маленьким лицом и именем,
   тихое «Разобралась ›», вывод и пункты, карточки из данных (белое стекло, одна главная кнопка, тихие ссылки), продолжения —
   «пилюлями», значки под ответом — тихие; ваши сообщения — мягкие пузыри справа; поле прилипает к низу.
   Цвета — токены программы и свои переменные --as-* (их же берёт помощник справа, css/helper.css: .hp). */

/* ── переменные языка чата: тёмная тема по умолчанию, светлая — лавандовые чернила на белом ── */
.as, .hp {
  --as-col: 720px;
  --as-bg: var(--l0);
  --as-hi: var(--ink);
  --as-li: 196, 181, 253;
  --as-line: rgba(255, 255, 255, .08);
  --as-brd: rgba(255, 255, 255, .14);
  --as-card: rgba(255, 255, 255, .035);
  --as-card-sh: 0 18px 40px -30px rgba(0, 0, 0, .8);
  --as-fill: rgba(255, 255, 255, .04);
  --as-hover: rgba(255, 255, 255, .06);
  --as-bub: rgba(255, 255, 255, .085);
  --as-pv: rgba(255, 255, 255, .045);
  --as-mint: #5eead4;
}
[data-theme="light"] :is(.as, .hp) {
  --as-bg: #faf9fe;
  --as-hi: #1d1645;
  --as-li: 124, 77, 230;
  --as-line: rgba(62, 52, 104, .09);
  --as-brd: rgba(62, 52, 104, .14);
  --as-card: #fff;
  --as-card-sh: 0 1px 2px rgba(29, 22, 69, .04), 0 14px 34px -26px rgba(62, 40, 140, .38);
  --as-fill: #fff;
  --as-hover: rgba(62, 52, 104, .045);
  --as-bub: rgba(62, 52, 104, .065);
  --as-pv: #f6f4fc;
  --as-mint: #0f9f8f;
}

.screen-assistant { height: 100%; }
.as { flex: 1 1 auto; display: flex; align-items: stretch; height: 100%; min-height: 0; background: var(--as-bg); }

/* ── Колонка «Новый чат / История» ───────────────────────────────────────────── */
.as-rail { position: relative; z-index: 2; flex: 0 0 286px; width: 286px; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px;
  background: var(--l1); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.as-newchat { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 11px; border-radius: 10px;
  font: inherit; font-size: 12.5px; font-weight: 550; letter-spacing: -.01em; color: var(--acc); background: var(--acc-soft); border: 1px solid var(--acc-soft-brd);
  cursor: pointer; transition: background .14s, border-color .14s; }
.as-newchat:hover { background: var(--l4); border-color: var(--acc); }
.as-newchat:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.as-new-p { font-size: 17px; line-height: 1; font-weight: 400; }
.as-rail-h, .as-lbl { font-size: 11px; line-height: 14px; font-weight: 550; letter-spacing: .02em; color: var(--mut2); }
.as-rail-h { flex: 0 0 auto; padding: 18px 10px 6px; }
.as-hist { display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.as-hist-e { margin: 0; padding: 8px 10px; font-size: 12.5px; color: var(--mut2); }
.as-ch { position: relative; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 8px 10px; border-radius: 10px; color: var(--mut); cursor: pointer;
  transition: background .14s, color .14s; outline: none; }
.as-ch:hover { background: var(--l3); color: var(--ink); }
.as-ch.is-on { background: var(--l4); color: var(--ink); }
.as-ch.is-unread .as-ch-n { color: var(--ink); font-weight: 560; }
.as-ch:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.as-ch-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.as-ch-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 19px; }
.as-ch-t time { font-size: 11.5px; line-height: 15px; color: var(--mut2); white-space: nowrap; }
.as-ch-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 999px; background: var(--vyg); animation: as-pulse 1.2s ease-in-out infinite; }
.as-ch-m { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: none; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 8px; background: var(--l1); color: var(--mut2); cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.as-ch:hover .as-ch-m, .as-ch:focus-within .as-ch-m { display: inline-flex; }
/* K1-05: пока видна «⋯», название кончается многоточием до неё — на тексте ничего не лежит */
.as-ch:hover .as-ch-t, .as-ch:focus-within .as-ch-t { padding-right: 28px; }
.as-ch:hover .as-ch-dot, .as-ch:focus-within .as-ch-dot { display: none; }
.as-ch-m:hover { color: var(--ink); background: var(--l2); }
@keyframes as-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }

/* ── Правая часть: одна колонка ──────────────────────────────────────────────── */
.as-main { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--as-bg); }
.as-sc { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.as-col { position: relative; z-index: 1; box-sizing: border-box; width: 100%; max-width: calc(var(--as-col) + 56px); margin: 0 auto; padding: 32px 28px 40px; display: flex; flex-direction: column; gap: 22px; }
.as-col.is-home { min-height: 100%; justify-content: center; padding-top: 24px; padding-bottom: 56px; }

/* фон главной: мягкое лиловое свечение и тихая сетка-«чертёж» вокруг указателя */
.as-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse 62% 48% at var(--gx, 50%) var(--gy, 36%), rgba(var(--as-li), .12), transparent 78%),
              radial-gradient(ellipse 48% 42% at 72% 70%, rgba(94, 234, 212, .06), transparent 78%); }
.as-bg i { position: absolute; left: 50%; top: 4%; width: min(52%, 560px); height: min(40%, 340px); transform: translateX(-50%); border-radius: 999px; filter: blur(110px); opacity: .22;
  background: radial-gradient(circle, rgba(var(--as-li), .9), transparent 72%); }
/* r32: за указателем — только лиловый свет, без сетки (Кирилл: «клеточку убираем, фиолетовый эффект оставляем») */
.as-bg::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(460px circle at var(--gx, 50%) var(--gy, 36%), rgba(var(--as-li), .16), rgba(var(--as-li), .06) 42%, transparent 72%); }

/* ── Главная ─────────────────────────────────────────────────────────────────── */
.as-home { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }
.as-hi { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: clamp(18px, 3.4vh, 30px); text-align: center; animation: as-in .46s cubic-bezier(.22, .8, .2, 1) both; }
.as-hi-face { display: inline-flex; margin-bottom: 6px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.as-hi-face:hover { transform: rotate(-8deg) scale(1.06); }
/* r31, круг 3: знак СКД в строке заголовка (Кирилл: «логотип рядом на ассистенте») — как до r31, с тихим светом */
.as-hi-row { display: flex; align-items: center; justify-content: center; gap: 14px; max-width: 100%; }
.as-hi-logo { flex: 0 0 auto; width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(124, 77, 230, .28)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.as-hi-logo:hover { transform: rotate(-6deg) scale(1.06); }
.as-hi-row h1 { min-width: 0; }
.as-hi h1 { margin: 0; font-size: clamp(26px, 2.2vw, 31px); line-height: 1.15; font-weight: 650; letter-spacing: -.024em; color: var(--as-hi); text-wrap: balance; }
.as-hi p { margin: 0; max-width: 50ch; font-size: 14.5px; line-height: 21px; color: var(--mut); text-wrap: balance; }
.as-ideas { display: flex; flex-direction: column; width: 100%; margin-top: 16px; }
.as-home .as-ideas .as-idea { position: relative; display: flex; align-items: baseline; gap: 12px; width: 100%; min-width: 0; padding: 12px 16px; border: 0; border-radius: 12px; background: none;
  box-shadow: none; font: inherit; text-align: left; color: var(--as-hi); cursor: pointer; transition: background-color .15s; animation: as-in .42s cubic-bezier(.22, .8, .2, 1) both; }
.as-home .as-ideas .as-idea + .as-idea::before { content: ''; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--as-line); transition: opacity .15s; }
.as-home .as-ideas .as-idea:hover { background: var(--as-hover); box-shadow: none; }
.as-home .as-ideas .as-idea:hover::before, .as-home .as-ideas .as-idea:hover + .as-idea::before, .as-idea:focus-visible::before, .as-idea:focus-visible + .as-idea::before { opacity: 0; }
.as-idea:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.as-idea-t { flex: 0 0 auto; font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -.006em; color: var(--as-hi); }
.as-idea-s { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 22px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.as-idea:hover .as-idea-s { color: var(--ink); }
.as-idea:nth-child(1) { animation-delay: .06s; } .as-idea:nth-child(2) { animation-delay: .1s; } .as-idea:nth-child(3) { animation-delay: .14s; }
.as-idea:nth-child(4) { animation-delay: .18s; } .as-idea:nth-child(5) { animation-delay: .22s; }
@keyframes as-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Поле запроса: App.promptInput (css/prompt-input.css) — вид прежней строки целиком там: карточка, кромка, блик,
   серая полоса; на главной — glow (свечение под карточкой) ─────────────────────────────────────────────────── */
.as-cw { position: relative; width: 100%; }
.as .as-cw .as-cmp { position: relative; z-index: 1; width: 100%; background: none; border: 0; box-shadow: none; }

/* ── Чат ─────────────────────────────────────────────────────────────────────── */
.as-col.is-chat { padding-top: 22px; padding-bottom: 28px; min-height: 100%; }
.as-head { display: flex; align-items: center; gap: 10px; padding: 0 0 12px; border-bottom: 1px solid var(--as-line); }
.as-head-t { flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; font: inherit; font-size: 15.5px; line-height: 22px; font-weight: 620; letter-spacing: -.01em; color: var(--as-hi);
  text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
.as-head time { flex: 0 0 auto; font-size: 12.5px; color: var(--mut2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.as-hb { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--mut2); cursor: pointer; transition: background .14s, color .14s; }
.as-hb:hover { background: var(--as-hover); color: var(--ink); }
.as-hb:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.as-hist-btn { display: none; }
.as-home-hist { position: absolute; top: 12px; right: 12px; z-index: 2; }
.as-thread { display: flex; flex-direction: column; gap: 26px; padding-top: 4px; container: asth / inline-size; }
.as-m { display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; }

/* ваши сообщения — мягкие пузыри справа */
.as-you { align-items: flex-end; }
.as-ub { max-width: min(78%, 560px); padding: 9px 15px; border-radius: 18px; background: var(--as-bub); font-size: 15px; line-height: 22px; color: var(--as-hi);
  white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; }
.as-uc { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.as-tag { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--as-fill); border: 1px solid var(--as-line);
  color: var(--mut); font-size: 12px; font-weight: 520; }
.as-tag > svg { flex: 0 0 auto; color: var(--mut2); }
.as-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-tag em { font-style: normal; font-weight: 450; color: var(--mut2); }

/* реплика ассистента: лицо и имя, рядом — тихое «✓ Разобралась ›» */
.as-ai { align-items: stretch; }
.as-who { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-bottom: -2px; }
.as-av { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 22px; height: 22px; }
.as-nm { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--mut); }
.as-sp { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; height: 24px; margin-left: 2px; padding: 0 7px 0 6px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: 12.5px; line-height: 1; color: var(--mut2); white-space: nowrap; cursor: pointer; transition: background .14s, color .14s; }
.as-nm + .as-sp::before { content: '·'; margin: 0 4px 0 -4px; color: var(--mut2); }
.as-sp:hover { background: var(--as-hover); color: var(--ink); }
.as-sp:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.as-sp b { font-weight: 450; }
.as-sp-ok { display: flex; align-items: center; color: var(--as-mint); }
.as-sp-c { display: flex; align-items: center; opacity: .7; transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.as-sp[aria-expanded="true"] .as-sp-c { transform: rotate(90deg); }
.as-sbox, .as-ask-l { display: grid; grid-template-columns: minmax(124px, max-content) minmax(0, 1fr); gap: 6px 16px; align-items: baseline; font-size: 12.5px; line-height: 18px; }
.as-sbox { display: none; width: fit-content; max-width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 12px; background: var(--as-fill); border: 1px solid var(--as-line); }
.as-sbox.is-open { display: grid; animation: as-in .26s ease-out both; }
.as-sk { font-weight: 520; color: var(--ink); }
.as-sv { color: var(--mut2); min-width: 0; text-wrap: pretty; overflow-wrap: anywhere; }

/* ответ: вывод и пункты, блоки из данных */
.as-body { display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; font-size: 15px; line-height: 24px; color: var(--as-hi); }
.as-lead { overflow-wrap: anywhere; text-wrap: pretty; }
.as-lead p { margin: 0; }
.as-lead p + p, .as-lead p + .as-bls { margin-top: 10px; }
.as-lead b { font-weight: 620; letter-spacing: -.006em; }
.as-lead ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.as-lead li { margin: 3px 0; }
.as-lead li::marker { color: rgba(var(--as-li), .7); }
.as-bls { display: flex; flex-direction: column; gap: 6px; }
.as-bl { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 0 8px; align-items: start; }
.as-bl > i { display: flex; align-items: center; justify-content: center; height: 24px; }
.as-bl > i::before { content: ''; width: 5px; height: 5px; border-radius: 999px; background: rgba(var(--as-li), .75); }
.as-bl > span { text-wrap: pretty; }
.as-blk { min-width: 0; font-size: 13.5px; line-height: 20px; }

/* продолжения — «пилюлями», не больше двух */
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.as-chips .chip.as-pill { display: inline-flex; align-items: center; max-width: 100%; height: auto; min-height: 34px; box-sizing: border-box; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--as-brd); background: var(--as-fill); box-shadow: none; font: inherit; font-size: 13.5px; line-height: 20px; font-weight: 500; color: var(--as-hi);
  white-space: normal; text-align: left; cursor: pointer; transition: border-color .16s, background-color .16s, transform .16s cubic-bezier(.2, .8, .2, 1); }
.as-chips .chip.as-pill:hover { border-color: rgba(var(--as-li), .5); background: rgba(var(--as-li), .07); color: var(--as-hi); box-shadow: none; }
.as-chips .chip.as-pill:active { transform: scale(.97); }
.as-chips .chip.as-pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.as-chips.as-rv.on { display: flex; }

/* значки под ответом — тихие: у последнего ответа видны бледно, у старых — по наведению */
.as-reacts { display: flex; align-items: center; gap: 2px; margin: -6px 0 -4px -7px; opacity: .62; transition: opacity .18s ease; }
.as-thread > .as-ai:not(:last-child) .as-reacts { opacity: 0; }
.as-thread > .as-ai:hover .as-reacts, .as-reacts:focus-within { opacity: 1; }
.as-reacts button { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--mut2); cursor: pointer; transition: background .14s, color .14s; }
.as-reacts button:hover { background: var(--as-hover); color: var(--ink); }
.as-reacts button:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.as-reacts button[data-k="up"]:hover, .as-reacts button.is-up { color: var(--vyg); }
.as-reacts button.is-up, .as-reacts button.is-down { background: var(--as-hover); color: var(--ink); }
.as-reacts.as-rv.on { display: flex; }
@media (hover: none) { .as-thread > .as-ai:not(:last-child) .as-reacts { opacity: .62; } }

/* «Нужно разрешение» */
.as-ask { display: flex; flex-direction: column; gap: 10px; max-width: 640px; box-sizing: border-box; padding: 15px 18px; border-radius: 16px; background: var(--as-card); border: 1px solid rgba(var(--as-li), .34);
  box-shadow: var(--as-card-sh); font-size: 13.5px; line-height: 20px; }
.as-ask[data-state="ok"], .as-ask[data-state="no"] { border-color: var(--as-brd); box-shadow: none; }
.as-ask-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.as-ask-i { display: flex; align-items: center; color: var(--acc); flex: 0 0 auto; }
.as-ask-h b { flex: 1 1 auto; min-width: 0; font-size: 14.5px; line-height: 20px; font-weight: 640; letter-spacing: -.008em; color: var(--as-hi); }
.as-ask-p { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(var(--as-li), .1);
  font-size: 12px; font-weight: 560; color: var(--acc); white-space: nowrap; }
.as-ask-p i { width: 5px; height: 5px; border-radius: 999px; background: currentColor; animation: as-blink 1.1s ease-in-out infinite; }
.as-ask[data-state="ok"] .as-ask-p { background: color-mix(in srgb, var(--as-mint) 14%, transparent); color: var(--as-mint); }
.as-ask[data-state="no"] .as-ask-p { background: var(--as-hover); color: var(--mut2); }
/* FIN (18.11): действия сервера — не получилось и истекло (без красного: глиф и кромка), карточка чисел ответа сервера */
.as-ask[data-state="fail"], .as-ask[data-state="expired"] { border-color: var(--as-brd); box-shadow: none; }
.as-ask[data-state="fail"] .as-ask-p, .as-ask[data-state="expired"] .as-ask-p { background: var(--as-hover); color: var(--ink); }
.as-kv.is-nums { padding-top: 14px; }
.as-kv.is-nums dd { overflow-wrap: anywhere; }
.as-ask:not([data-state="wait"]) .as-ask-p i { animation: none; }
.as-ask-s { margin: 0; color: var(--mut); text-wrap: pretty; }
.as-ask-l { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--as-pv); border: 1px solid var(--as-line); gap: 5px 14px; }
.as-ask-d > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 520; color: var(--mut); cursor: pointer; border-radius: 6px; }
.as-ask-d > summary::-webkit-details-marker { display: none; }
.as-ask-d > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.as-ask-d[open] > summary::before { transform: rotate(45deg); }
.as-ask-d > summary:hover { color: var(--ink); }
.as-ask-d > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.as-ask-f { display: flex; align-items: center; gap: 8px 18px; padding-top: 2px; flex-wrap: wrap; }
@keyframes as-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* «Разбираюсь» / «Жду разрешения» — строкой над полем, три точки */
.as-wait { display: flex; align-items: center; gap: 10px; margin-top: -4px; padding-left: 1px; font-size: 13.5px; line-height: 20px; color: var(--mut); }
.as-wait[hidden] { display: none; }
.as-dots { display: inline-flex; align-items: center; gap: 4px; }
.as-dots i { width: 6px; height: 6px; border-radius: 999px; background: rgba(var(--as-li), .85); animation: as-dot 1.15s ease-in-out infinite; }
.as-dots i:nth-child(2) { animation-delay: .15s; }
.as-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes as-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

/* поле внизу чата прилипает: над ним — мягкое затухание ленты, под ним — фон до низа окна */
.as-dock { position: sticky; bottom: 0; z-index: 5; margin-top: auto; padding-bottom: 18px; }
.as-dock::before { content: ''; position: absolute; left: -14px; right: -14px; top: -26px; height: 26px; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--as-bg)); }
.as-dock::after { content: ''; position: absolute; z-index: -1; left: -14px; right: -14px; top: 0; bottom: 0; background: var(--as-bg); pointer-events: none; }

/* «История действий» этого чата — тихо под полем */
.as-log { display: flex; flex-direction: column; gap: 0; }
.as-log:empty { display: none; }
.as-log .as-lbl { padding: 0 2px 6px; }
.as-lr { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--as-line); color: var(--ink); text-decoration: none; }
a.as-lr:hover { text-decoration: none; color: var(--ink); background: var(--as-hover); }
.as-lr-d { flex: 0 0 auto; width: 6px; height: 6px; margin: 0 4px; border-radius: 999px; background: var(--as-mint); }
.as-lr-t { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 20px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-lr time { flex: 0 0 auto; font-size: 12.5px; color: var(--mut2); white-space: nowrap; }

/* проявление ответа словами */
.as-w { opacity: 0; transition: opacity .2s; }
.as-w.on { opacity: 1; }
.as-rv { display: none; }
.as-rv.on { display: block; animation: as-rise .34s cubic-bezier(.22, .8, .2, 1) both; }
@keyframes as-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Карточки ответа (то же — в помощнике справа) ────────────────────────────── */
:is(.as, .hp) .as-card { box-sizing: border-box; width: 100%; min-width: 0; border-radius: 16px; background: var(--as-card); border: 1px solid var(--as-brd); box-shadow: var(--as-card-sh);
  overflow: hidden; color: var(--as-hi); }
.as-pad { padding: 14px 18px; }
.as-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; padding: 14px 18px 12px; }
.as-hd-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.as-hd-no { font-size: 11.5px; line-height: 16px; font-weight: 600; letter-spacing: .02em; color: var(--mut2); font-variant-numeric: tabular-nums; }
.as-hd-t b { font-size: 15px; line-height: 21px; font-weight: 650; letter-spacing: -.01em; color: var(--as-hi); overflow-wrap: anywhere; }
.as-hd-s { font-size: 12.5px; line-height: 18px; color: var(--mut); overflow-wrap: anywhere; }
.as-hd > .pill, .as-hd > .stage { flex: 0 0 auto; margin-top: 1px; }
/* низ карточки: одна главная кнопка, тихие ссылки, справа — пометка */
.as-cf { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; min-width: 0; padding: 12px 18px 14px; border-top: 1px solid var(--as-line); }
.as-cq { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-width: 0; }
.as-cf-a { margin-left: auto; font-size: 12px; line-height: 18px; color: var(--mut2); }
:is(.as, .hp) .btn.as-go { height: 34px; padding: 0 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
:is(.as, .hp) .btn.as-sb { height: 30px; padding: 0 12px; border-radius: 9px; background: transparent; border-color: var(--as-brd); color: var(--ink); font-weight: 520; box-shadow: none; }
:is(.as, .hp) .btn.as-sb:hover { background: var(--as-hover); border-color: rgba(var(--as-li), .45); color: var(--as-hi); }
.as-ql { display: inline-flex; align-items: center; padding: 3px 0; border: 0; background: none; font: inherit; font-size: 13.5px; line-height: 20px; color: var(--mut); white-space: nowrap; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(var(--as-li), .3); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .14s, text-decoration-color .14s; }
.as-ql:hover { color: var(--as-hi); text-decoration: underline; text-decoration-color: rgba(var(--as-li), .75); }
.as-ql:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.as-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.as-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 12.5px; line-height: 18px; color: var(--mut2); }
.as-note > svg { flex: 0 0 auto; margin-top: 2px; opacity: .8; }

/* таблицы — без заливки шапки, тонкие линии, крайние ячейки по краю карточки (селекторы сильнее общих .tbl) */
.as-tw { overflow-x: auto; }
.as-deal .as-tw { border-top: 1px solid var(--as-line); }
:is(.as, .hp) .as-tw table.as-t.tbl { width: 100%; font-size: 13px; }
:is(.as, .hp) .as-tw table.as-t.tbl th { position: static; height: 34px; padding: 0 12px; background: transparent; border-bottom: 1px solid var(--as-line);
  font-size: 11.5px; font-weight: 550; letter-spacing: .01em; text-transform: none; color: var(--mut2); }
:is(.as, .hp) .as-tw table.as-t.tbl td { padding: 10px 12px; vertical-align: top; background: transparent; border-bottom: 1px solid var(--as-line); color: var(--as-hi); }
:is(.as, .hp) .as-tw table.as-t.tbl tbody tr:last-child td { border-bottom: 0; }
:is(.as, .hp) .as-tw table.as-t.tbl :is(th, td):first-child { padding-left: 18px; }
:is(.as, .hp) .as-tw table.as-t.tbl :is(th, td):last-child { padding-right: 18px; }
:is(.as, .hp) .as-tw table.as-t.tbl tbody tr:hover td { background: transparent; }
:is(.as, .hp) .as-tw table.as-t.tbl tbody tr[data-act] { cursor: pointer; }
:is(.as, .hp) .as-tw table.as-t.tbl tbody tr[data-act]:hover td { background: var(--as-hover); }
.as-t .t-main b { font-size: 13.5px; font-weight: 600; }
.as-sub { display: block; margin-top: 2px; font-size: 11.5px; line-height: 16px; color: var(--mut2); font-weight: 450; }
.as-nw { white-space: nowrap; }
.as-money { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.as-unk { color: var(--mut2); font-weight: 450; }
.as-unit { color: var(--mut2); font-weight: 450; }
/* итог сделки, документы, следующий шаг */
.as-sum { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 12px 18px 14px; border-top: 1px solid var(--as-line); }
.as-total { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.as-total-l { font-size: 12px; line-height: 16px; color: var(--mut2); }
.as-total b { font-size: 22px; line-height: 28px; font-weight: 650; letter-spacing: -.02em; color: var(--as-hi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.as-total small { font-size: 12px; line-height: 16px; color: var(--mut2); }
.as-total.is-none .as-total-n { font-size: 14px; line-height: 21px; color: var(--mut); }
.as-docs { display: flex; flex-wrap: wrap; gap: 6px; }
.as-next { display: flex; align-items: flex-start; gap: 8px; padding: 11px 18px; border-top: 1px solid var(--as-line); font-size: 13px; line-height: 19px; color: var(--mut); }
.as-next > svg { flex: 0 0 auto; margin-top: 3px; color: rgba(var(--as-li), .9); }
.as-next em { font-style: normal; color: var(--mut2); }
/* строки списка: переписка, вопрос, сделки клиента */
.as-list { display: flex; flex-direction: column; }
.as-list.as-in { margin: 0 18px 12px; border: 1px solid var(--as-line); border-radius: 12px; overflow: hidden; }
.as-li { display: flex; align-items: center; gap: 10px; min-width: 0; transition: background .12s; }
.as-li + .as-li { border-top: 1px solid var(--as-line); }
.as-li:hover { background: var(--as-hover); }
.as-li-a { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; padding: 11px 16px; color: var(--as-hi); text-decoration: none; }
.as-li-a:hover { color: var(--as-hi); text-decoration: none; }
.as-li-m { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.as-li-m b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.as-li-m span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--mut); }
/* K1-04: «Гречко С. В. · СибМонолитСтрой» — первым сжимается ФИО, компания видна целиком */
.as-li-m b.as-li-h { display: flex; min-width: 0; overflow: visible; }
.as-li-m .as-li-n { flex: 0 1000 auto; min-width: 0; font-size: inherit; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-li-m .as-li-co { flex: 0 1 auto; min-width: 0; font-size: inherit; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-li-n + .as-li-co::before { content: ' · '; white-space: pre; }
.as-li-r { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: 0 0 auto; max-width: 46%; }
.as-li-r time { font-size: 11.5px; color: var(--mut2); white-space: nowrap; }
.as-li-x { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; padding-right: 16px; }
.as-li-av { position: relative; flex: 0 0 auto; }
.as-li-av .ch { position: absolute; right: -4px; bottom: -4px; box-shadow: 0 0 0 2px var(--as-card); border-radius: 999px; }
/* вопрос к людям, клиент */
.as-q { display: flex; flex-direction: column; }
.as-q-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px 10px; }
.as-q-h b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--as-hi); }
.as-q-h time { margin-left: auto; font-size: 12px; color: var(--mut2); white-space: nowrap; }
.as-q-h time.is-late { color: var(--ink); }
.as-q.is-compact .as-q-h { padding-top: 12px; }
.as-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 7px 14px; margin: 0; padding: 0 18px 14px; font-size: 13px; line-height: 19px; }
.as-kv.as-pad { padding: 12px 18px 14px; border-top: 1px solid var(--as-line); }
.as-kv dt { color: var(--mut2); font-size: 12.5px; }
.as-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--as-hi); }
.as-kv .person { vertical-align: middle; }
/* «что сделать»: строка — вывод и кнопка; точка — только у отклонений */
.as-recs { display: flex; flex-direction: column; }
.as-rec { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 18px; }
.as-rec + .as-rec { border-top: 1px solid var(--as-line); }
.as-rec[data-tone] .as-rec-t b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 999px; background: var(--sig-wait, var(--ryn)); vertical-align: middle; }
.as-rec[data-tone="zav"] .as-rec-t b::before { background: var(--sig-late, var(--zav)); box-shadow: 0 0 0 3px var(--sig-late-halo, transparent); }
.as-rec-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.as-rec-t b { font-size: 13.5px; font-weight: 620; color: var(--as-hi); }
.as-rec-t span { font-size: 12.5px; line-height: 18px; color: var(--mut); }
.as-rec .btn { flex: 0 0 auto; }
/* черновики: письмо и рассылка — текст как увидит клиент */
.as-paper-b { margin: 0 18px 14px; padding: 12px 14px; border-radius: 12px; background: var(--as-pv); border: 1px solid var(--as-line); font-size: 14px; line-height: 21px; color: var(--as-hi);
  white-space: pre-wrap; overflow-wrap: anywhere; }
.as-hb, .as-hd, .as-li, .as-idea { -webkit-tap-highlight-color: transparent; }

/* ── Узкая лента (1100×560: ≈ 500 px): таблицы ответа складываются в карточки, ничего не режется ── */
@container asth (max-width: 640px) {
  :is(.as, .hp) .as-tw table.as-t.tbl thead { display: none; }
  :is(.as, .hp) .as-tw table.as-t.tbl, :is(.as, .hp) .as-tw table.as-t.tbl tbody { display: block; width: 100%; }
  :is(.as, .hp) .as-tw table.as-t.tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 12px 16px; border-bottom: 1px solid var(--as-line); }
  :is(.as, .hp) .as-tw table.as-t.tbl tbody tr:last-child { border-bottom: 0; }
  :is(.as, .hp) .as-tw table.as-t.tbl td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; white-space: normal; }
  :is(.as, .hp) .as-tw table.as-t.tbl :is(th, td):first-child, :is(.as, .hp) .as-tw table.as-t.tbl :is(th, td):last-child { padding-left: 0; padding-right: 0; }
  :is(.as, .hp) .as-tw table.as-t.tbl td:first-child { grid-column: 1 / -1; }
  :is(.as, .hp) .as-tw table.as-t.tbl td[colspan] { grid-column: 1 / -1; }
  :is(.as, .hp) .as-tw table.as-t.tbl td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; margin-bottom: 2px; font-size: 11px; line-height: 15px; font-weight: 500; color: var(--mut2); }
  :is(.as, .hp) .as-tw table.as-t.tbl td.r .btn { margin-top: 2px; }
  :is(.as, .hp) .as-tw table.as-t.tbl td:empty, :is(.as, .hp) .as-tw table.as-t.tbl td[data-l=""] { display: none; }
  .as-kv { grid-template-columns: 120px minmax(0, 1fr); }
  .as-rec { flex-wrap: wrap; }
  .as-sbox, .as-ask-l { grid-template-columns: minmax(104px, max-content) minmax(0, 1fr); }
  .as-cf-a { margin-left: 0; flex-basis: 100%; }
}
@container asth (max-width: 440px) {
  .as-sbox, .as-ask-l { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .as-sv + .as-sk { margin-top: 6px; }
  .as-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .as-kv dt { margin-top: 8px; }
  .as-hd { flex-wrap: wrap; }
}

/* ── Низкое окно ─────────────────────────────────────────────────────────────── */
@media (max-height: 680px) {
  .as-hi-face, .as-hi p { display: none; }
  .as-hi-logo { width: 36px; height: 36px; }   /* r31, круг 3: на низком окне знак меньше, но остаётся */
  .as-col.is-home { padding-top: 16px; padding-bottom: 24px; }
  .as-ideas { margin-top: 10px; }
  .as-home .as-ideas .as-idea { padding-top: 9px; padding-bottom: 9px; }
}
@media (max-height: 640px) {
  .as-col { padding-top: 20px; }
  .as-col.is-chat { padding-top: 16px; padding-bottom: 16px; }
  .as-dock { padding-bottom: 10px; }
  .as-thread { gap: 20px; }
  .as-hi { padding-bottom: 14px; }
}
/* ── Узкое окно ──────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .as-rail { display: none; }
  .as-hist-btn { display: flex; }
  .as-col { padding-left: 16px; padding-right: 16px; }
  .as-hi h1 { font-size: 26px; }
  .as-ub { max-width: 90%; }
  .as-deal [data-m="x"] { display: none; }
  .as-idea-s { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .as-dots i, .as-ch-dot, .as-ask-p i, .as-glow, .as-hi, .as-idea, .as-sbox.is-open { animation: none; }
  .as-rv.on { animation: none; }
  .as-idea, .as-hi-face, .as-reacts, .as-chips .chip.as-pill { transition: none; }
}
