/* ═══════════════════════════════════════════════════════════════════
   Страница «ИИ-ассистент». Владелец - зона CHAT. Все правила - с
   префиксом .as-, общие классы (btn, pill, tag, prose, steps, search)
   берутся из css/base.css. Язык «Регистр»: белые листы, таблетки,
   моно-микроподписи, лайм - заливкой только на главном действии.
   ═══════════════════════════════════════════════════════════════════ */

.as { display: flex; flex-direction: column; min-width: 0; }

/* ─────────────── шапка ─────────────── */
.as-head { margin-bottom: 18px; align-items: flex-end; }
.as-head__txt { min-width: 0; flex: 1 1 420px; }
.as-head__sub { display: flex; align-items: center; gap: 6px; min-height: 26px; flex-wrap: nowrap; }
.as-head__label { color: var(--muted); flex: none; }
.as-head__title { color: var(--ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-head__act { width: 28px; height: 28px; color: var(--faint); }
.as-head__act:hover { color: var(--ink); }
.as-head__act svg { width: 15px; height: 15px; }
.as-btn-list__n { font-size: 10.5px; color: var(--faint); background: var(--surface-3); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.as-btn-list__n:empty { display: none; }
.as .page-head__actions { flex-wrap: nowrap; }

/* ─────────────── каркас: список + разговор ─────────────── */
.as-shell { position: relative; display: grid; grid-template-columns: 288px minmax(0, 1fr); min-height: 520px;
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-card); overflow: hidden; }
.as.is-list-off .as-shell { grid-template-columns: minmax(0, 1fr); }
.as.is-list-off .as-list { display: none; }

.as-list { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface-2);
  border-right: 1px solid var(--hair-sep); }
.as-list__head { padding: 14px 14px 8px; flex: none; }
.as-list__title { display: none; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.as-list__title b { font-size: 17px; letter-spacing: -.02em; }
.as-list__search { height: 36px; background: var(--surface); }
.as-list__body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 2px 8px 12px; min-height: 0; }
.as-list__foot { flex: none; padding: 10px 16px 12px; border-top: 1px solid var(--hair-sep); }
.as-list__empty { padding: 28px 12px; text-align: center; font-size: 13px; color: var(--muted); }
.as-group__label { padding: 12px 10px 6px; }

.as-chat { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; color: var(--ink);
  border: 1px solid transparent; text-decoration: none !important;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.as-chat:hover { background: var(--surface-3); }
.as-chat.is-on { background: var(--surface); border-color: var(--hair); }
.as-chat__ico { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); color: var(--muted);
  display: grid; place-items: center; flex: none; margin-top: 1px; }
.as-chat__ico svg { width: 15px; height: 15px; }
.as-chat.is-on .as-chat__ico { background: var(--ink); color: var(--lime); }
.as-chat__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.as-chat__title { font-size: 13.5px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.as-chat__meta { display: flex; gap: 8px; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; }
.as-chat__meta .mono { font-size: 10.5px; margin-left: auto; }

.as-pane { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.as-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; overscroll-behavior: contain; }
.as-thread { max-width: 940px; margin: 0 auto; padding: 28px 32px 28px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.as-thread.is-empty { min-height: 100%; justify-content: center; }
.as-loading { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--muted); font-size: 13.5px; padding: 60px 0; }
.as-scrim { display: none; }

/* ─────────────── поле ввода ─────────────── */
.as-composer { flex: none; border-top: 1px solid var(--hair-sep); padding: 12px 32px 12px; background: var(--surface); }
.as-composer > * { max-width: 876px; margin-left: auto; margin-right: auto; }
.as-modes { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.as-modes::-webkit-scrollbar { display: none; }
.as-mode { height: 30px; padding: 0 12px; font-size: 12.5px; flex: none; color: var(--ink-2); }
.as-mode svg { width: 14px; height: 14px; }
.as-mode.is-on { color: #fff; }
.as-input { border: 1px solid var(--hair); border-radius: 16px; background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.as-input:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,98,92,.10); }
.as-input__row { display: flex; align-items: flex-end; gap: 6px; padding: 7px 7px 7px 6px; }
.as-input textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; font-size: 14.5px;
  line-height: 1.5; padding: 7px 4px; min-height: 38px; max-height: 200px; }
.as-input textarea::placeholder { color: var(--faint); }
.as-clip { width: 38px; height: 38px; color: var(--muted); }
.as-clip svg { width: 18px; height: 18px; }
.as-send { width: 38px; height: 38px; border-radius: 999px; border: 0; background: var(--lime); color: var(--ink); flex: none;
  display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur-fast) var(--ease); }
.as-send:hover { background: var(--lime-dim); }
.as-send:disabled { background: var(--surface-3); color: var(--faint-2); cursor: default; }
.as-send svg { width: 18px; height: 18px; }
.as-hint { display: flex; gap: 6px 16px; justify-content: center; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); margin-top: 8px; }
.as-hint__anon { display: inline-flex; align-items: center; gap: 5px; color: var(--moss); }
.as-hint__anon svg { width: 13px; height: 13px; }

.as-att { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 10px 2px; }
.as-chip { display: inline-flex; align-items: center; gap: 9px; max-width: 340px; min-width: 0; padding: 5px 6px 5px 5px;
  border: 1px solid var(--hair); border-radius: 12px; background: var(--surface-2); }
.as-chip.is-busy { opacity: .7; }
.as-chip__ico { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; flex: none; }
.as-chip__ico svg { width: 16px; height: 16px; }
.as-chip__img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-3); }
.as-chip__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.as-chip__name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-chip__meta { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-chip__lab { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--steel); margin-bottom: 1px; }
.as-chip__x { width: 26px; height: 26px; border-radius: 999px; border: 0; background: transparent; color: var(--faint);
  display: grid; place-items: center; cursor: pointer; flex: none; }
.as-chip__x:hover { background: var(--surface-3); color: var(--ink); }
.as-chip__x svg { width: 13px; height: 13px; }

.as-dropzone { display: none; position: absolute; inset: 10px; z-index: 5; border: 1.5px dashed var(--teal); border-radius: 14px;
  background: rgba(233,240,239,.94); place-items: center; text-align: center; pointer-events: none; }
.as-dropzone svg { width: 26px; height: 26px; color: var(--teal); margin: 0 auto 8px; }
.as-dropzone b { display: block; font-size: 16px; }
.as-dropzone span { font-size: 13px; color: var(--muted); }
.as-pane.is-drag .as-dropzone { display: grid; }

/* ─────────────── пустое состояние ─────────────── */
.as-empty { text-align: center; padding: 8px 0; animation: page-in .32s var(--ease) both; }
.as-empty__mark { width: 44px; height: 44px; border-radius: 13px; background: var(--ink); color: var(--lime); margin: 0 auto 12px;
  display: grid; place-items: center; font-weight: 700; font-size: 21px; letter-spacing: -.04em; }
.as-empty h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.035em; }
.as-thread.is-empty { padding-top: 16px; padding-bottom: 16px; }
.as-empty > p { color: var(--muted); font-size: 15px; max-width: 640px; margin: 8px auto 0; }
.as-scen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; text-align: left; align-items: start; }
.as-scen__card { border: 1px solid var(--hair); border-radius: var(--r-card); background: var(--surface); padding: 11px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.as-scen__head { display: flex; gap: 10px; align-items: center; padding: 0 2px 2px; }
.as-scen__ico { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.as-scen__ico svg { width: 16px; height: 16px; }
.as-scen__head .dt { color: var(--ink-2); font-weight: 600; }
.as-scen__note { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.as-scen__hd { min-width: 0; }
.as-scen__items { display: flex; flex-direction: column; gap: 5px; }
.as-scen__item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 6px 12px 6px 11px; text-align: left;
  border: 1px solid var(--hair-sep); background: var(--surface-2); border-radius: 12px; cursor: pointer; color: var(--ink); font-size: 13.5px;
  line-height: 1.35; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.as-scen__item:hover { border-color: var(--hair-2); background: var(--surface); }
.as-scen__item:active { transform: translateY(1px); }
.as-scen__item:disabled { opacity: .5; cursor: not-allowed; }
.as-scen__item svg { width: 15px; height: 15px; color: var(--faint); flex: none; }
.as-scen__item span { flex: 1; min-width: 0; }
.as-scen__item em { font-style: normal; font-size: 11px; color: var(--teal); flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.as-scen__item em svg { width: 13px; height: 13px; color: var(--teal); }
.as-scen__item.is-hot { background: var(--lime-wash); border-color: var(--lime-line); }
.as-scen__item.is-hot:hover { border-color: #C9E28A; }
.as-empty__foot { display: flex; gap: 8px 20px; justify-content: center; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.as-empty__foot span { display: inline-flex; align-items: center; gap: 6px; }
.as-empty__foot svg { width: 14px; height: 14px; color: var(--faint); }

/* ─────────────── сообщения ─────────────── */
.as-msg { min-width: 0; animation: page-in .24s var(--ease) both; }
.as-msg--user { align-self: flex-end; max-width: 78%; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.as-bubble { background: var(--surface-3); border-radius: 16px; padding: 10px 14px; font-size: 14.5px; line-height: 1.5; min-width: 0; max-width: 100%; }
.as-bubble__text { overflow-wrap: anywhere; }
.as-bubble__files { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.as-bubble__files + .as-bubble__text { margin-top: 8px; }
.as-bubble__cap { margin-bottom: 4px; }
.as-bubble__ans { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; font-size: 13px; margin-top: 4px; }
.as-bubble__ans dt { color: var(--muted); }
.as-bubble__ans dd { overflow-wrap: anywhere; }
.as-msg__meta { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-2); padding-right: 4px; }

.as-fchip { display: inline-flex; align-items: center; gap: 10px; max-width: 360px; min-width: 0; padding: 6px 12px 6px 6px;
  border: 1px solid var(--hair); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none !important; }
.as-fchip:hover { border-color: var(--hair-2); }
.as-fchip__ext { width: 36px; height: 36px; border-radius: 9px; background: var(--steel-wash); color: var(--steel); display: grid; place-items: center;
  font-size: 9.5px; font-weight: 600; flex: none; }
.as-fchip__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; text-align: left; }
.as-fchip__name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-fchip__meta { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-img { display: block; padding: 0; text-align: left; font: inherit; max-width: 240px; cursor: zoom-in; border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; background: var(--surface);
  color: var(--ink); text-decoration: none !important; }
.as-img img { width: 100%; max-height: 300px; object-fit: cover; }
.as-img__cap { display: block; font-size: 10.5px; color: var(--faint); padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.as-msg--ai { display: flex; flex-direction: column; gap: 12px; }
.as-ai__head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.as-ai__mark { width: 22px; height: 22px; border-radius: 7px; background: var(--ink); color: var(--lime); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; flex: none; }
.as-ai__mode { color: var(--faint); }
.as-ai__time { color: var(--faint-2); font-size: 10.5px; }
.as-ai__demo { background: var(--surface-3); color: var(--muted); font-weight: 500; }

.as-steps__btn { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 8px; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--surface-2); color: var(--muted); font-size: 12.5px; cursor: pointer; max-width: 100%; }
.as-steps__btn:hover { border-color: var(--hair-2); color: var(--ink); }
.as-steps__btn .mono { font-size: 10.5px; color: var(--faint); }
.as-steps__chev { width: 13px; height: 13px; transition: transform var(--dur-fast) var(--ease); flex: none; }
.as-steps.is-open .as-steps__chev { transform: rotate(90deg); }
.as-steps__list { margin: 10px 0 2px 6px; }
.as-steps.is-live .steps { padding: 2px 0 2px 2px; }

.as-prose { font-size: 14.5px; overflow-wrap: anywhere; }
.as-prose h4 { font-size: 15.5px; margin: 18px 0 6px; }
.as-prose h4:first-child { margin-top: 0; }
.as-prose ol, .as-prose ul { margin-left: 22px; }
.as-prose b { font-weight: 600; }
.as-prose ul.as-sub { margin-left: 44px; }
.as-tbl { overflow-x: auto; margin: 2px 0 12px; max-width: 100%; }
.as-tbl table { margin: 0; min-width: 100%; }
.as-tbl th { background: var(--surface-2); font-weight: 600; font-size: 12.5px; }
.as-tbl td, .as-tbl th { vertical-align: top; min-width: 96px; }
.as-cite { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 1px;
  border: 0; border-radius: 6px; background: var(--lime-wash); color: var(--lime-ink); font-family: var(--mono); font-size: 10.5px;
  font-weight: 600; vertical-align: 1px; cursor: pointer; line-height: 1; }
.as-cite:hover { background: var(--lime-line); }

.as-typing { display: flex; gap: 5px; padding: 6px 0; }
.as-typing i { width: 7px; height: 7px; border-radius: 99px; background: var(--hair-2); animation: as-dot 1.1s infinite ease-in-out; }
.as-typing i:nth-child(2) { animation-delay: .15s; }
.as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes as-dot { 0%, 80%, 100% { opacity: .35; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

/* источники */
.as-src { border: 1px solid var(--hair); border-radius: 14px; background: var(--surface-2); padding: 8px 10px 6px; }
.as-src__label { padding: 2px 4px 4px; }
.as-src__item { border-top: 1px solid var(--hair-sep); border-radius: 8px; transition: background-color .6s var(--ease); }
.as-src__label + .as-src__item { border-top: 0; }
.as-src__item.is-flash { background: var(--lime-wash); }
.as-src__row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 4px; background: transparent; border: 0;
  text-align: left; cursor: pointer; font-size: 13.5px; color: var(--ink); min-width: 0; }
.as-src__n { width: 22px; height: 22px; border-radius: 6px; background: var(--lime-wash); color: var(--lime-ink); display: grid; place-items: center;
  font-size: 11px; font-weight: 600; flex: none; }
.as-src__kind { flex: none; }
.as-src__title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-src__sub { font-size: 10.5px; color: var(--faint); flex: none; }
.as-src__chev { width: 14px; height: 14px; color: var(--faint); flex: none; transition: transform var(--dur-fast) var(--ease); }
.as-src__item.is-open .as-src__chev { transform: rotate(90deg); }
.as-src__item.is-open .as-src__title { white-space: normal; }
.as-src__body { padding: 0 8px 10px 36px; font-size: 13px; color: var(--ink-2); }
.as-src__body p { margin: 4px 0 6px; line-height: 1.5; }
.as-src__meta { font-size: 12px; color: var(--faint); }
.as-src__link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.as-src__link svg { width: 13px; height: 13px; }
.as-src__more { border: 0; background: transparent; color: var(--teal); font-size: 12.5px; padding: 6px 4px 4px; cursor: pointer; }
.as-src__more:hover { text-decoration: underline; }

/* сравнение */
.as-diff { border: 1px solid var(--hair); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.as-diff__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px 18px; padding: 14px 16px; border-bottom: 1px solid var(--hair-sep); flex-wrap: wrap; }
.as-diff__ttl { min-width: 0; flex: 1 1 300px; }
.as-diff__sides { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 13.5px; font-weight: 500; min-width: 0; }
.as-diff__sides span { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.as-diff__sides b { font-weight: 600; flex: none; }
.as-diff__sides em { font-style: normal; font-weight: 400; color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.as-diff__dot { align-self: center; }
.as-diff__dot { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.as-diff__dot.is-l { background: var(--steel); }
.as-diff__dot.is-r { background: var(--violet); }
.as-diff__stats { display: flex; gap: 8px; flex-wrap: wrap; }
.as-stat { border: 1px solid var(--hair); border-radius: 12px; padding: 6px 12px 7px; min-width: 92px; }
.as-stat b { display: block; font-size: 20px; font-weight: 500; letter-spacing: -.03em; line-height: 1.2; }
.as-stat span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.as-stat.is-rust b { color: var(--rust); }
.as-diff__filters { padding: 12px 16px 2px; }
.as-diff__filters .pill { height: 30px; font-size: 12.5px; }
.as-diff__rows { padding: 4px 16px 6px; }
.as-diff__none { padding: 18px 0; font-size: 13px; color: var(--muted); }
.as-drow { position: relative; padding: 13px 0 13px 14px; border-bottom: 1px solid var(--hair-sep); }
.as-drow:last-child { border-bottom: 0; }
.as-drow::before { content: ''; position: absolute; left: 0; top: 15px; bottom: 15px; width: 3px; border-radius: 3px; background: var(--hair-2); }
.as-drow.is-rust::before { background: var(--rust); }
.as-drow.is-amber::before { background: #D9A441; }
.as-drow.is-steel::before { background: var(--steel); }
.as-drow__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.as-drow__n { font-size: 10.5px; color: var(--faint); }
.as-drow__lab { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.as-drow__fav { font-size: 12px; color: var(--muted); }
.as-drow__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 9px; }
.as-drow__cols.is-one { grid-template-columns: minmax(0, 1fr); }
.as-drow__col { background: var(--surface-2); border: 1px solid var(--hair-sep); border-radius: 10px; padding: 8px 11px 9px; min-width: 0; }
.as-drow__col .dt { margin-bottom: 4px; }
.as-drow__txt { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; }
.as-drow__txt del { color: var(--rust); background: var(--rust-wash); text-decoration: line-through; border-radius: 3px; }
.as-drow__txt ins { color: var(--moss); background: var(--moss-wash); text-decoration: underline; text-underline-offset: 2px; border-radius: 3px; }
.as-drow__note { margin-top: 8px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.as-drow__note b { color: var(--ink); font-weight: 600; }
.as-diff__more { display: block; width: 100%; height: 42px; border: 0; border-top: 1px solid var(--hair-sep); background: var(--surface-2);
  color: var(--teal); font-size: 13px; cursor: pointer; }
.as-diff__more:hover { background: var(--surface-3); }

/* презентация */
.as-deck__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 8px; }
.as-slide { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--hair); border-radius: 10px; background: var(--surface);
  padding: 9px 11px 9px 17px; overflow: hidden; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.as-slide > i { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--lime); }
.as-slide.is-title > i { width: 9px; }
.as-slide__k { font-size: 9.5px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-slide__t { font-size: 12.5px; font-weight: 600; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.as-slide.is-title .as-slide__t { font-size: 14px; margin-top: auto; }
.as-slide__s { font-size: 11px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.as-slide__b { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); min-width: 0; }
.as-slide__b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-slide__b span::before { content: '- '; }
.as-slide__b .as-slide__tbl::before { content: '▦ '; }

/* уточняющие вопросы для документа */
.as-q { border: 1px solid var(--lime-line); background: var(--lime-wash); border-radius: var(--r-card); padding: 16px; }
.as-q.is-done { background: var(--surface-2); border-color: var(--hair); }
.as-q__title { font-size: 16px; font-weight: 600; letter-spacing: -.015em; margin: 3px 0 12px; }
.as-q__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.as-q__acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* черновик документа */
.as-paper { border: 1px solid var(--hair); border-radius: 14px; background: #fff; padding: 30px 40px 32px;
  font-family: 'Times New Roman', Times, serif; font-size: 15.5px; line-height: 1.5; color: #111; overflow-wrap: anywhere; }
.as-paper__to { margin: 0 0 18px 50%; font-size: 15px; }
.as-paper h3 { text-align: center; font-size: 16px; letter-spacing: 0; text-transform: uppercase; margin: 16px 0 12px; font-family: inherit; }
.as-paper h4 { font-size: 15.5px; letter-spacing: 0; margin: 12px 0 6px; font-family: inherit; }
.as-paper p { margin: 0 0 6px; text-align: justify; text-indent: 1.6em; }
.as-paper table { border-collapse: collapse; margin: 6px 0 10px; font-size: 14px; }
.as-paper th, .as-paper td { border: 1px solid #999; padding: 4px 8px; }
.as-notes { background: var(--amber-wash); border: 1px solid #F0E0BC; border-radius: 14px; padding: 12px 16px; }
.as-notes .dt { color: var(--amber); margin-bottom: 4px; }
.as-notes .prose { font-size: 13.5px; }
.as-notes .prose ul, .as-notes .prose ol { margin-bottom: 0; }

.as-paper__subt { text-align: center; font-weight: 700; margin: -6px 0 14px; }
.as-paper p.as-paper__meta { text-indent: 0; text-align: left; margin: 0 0 2px; }
.as-paper p.as-paper__sign { text-indent: 0; text-align: left; margin: 0; }
.as-paper h4 + p, .as-paper p.as-paper__sign:first-of-type { margin-top: 0; }

/* файлы результата */
.as-results { display: flex; flex-direction: column; gap: 8px; }
.as-res { display: flex; align-items: center; gap: 12px; border: 1px solid var(--hair); border-radius: 14px; padding: 10px 10px 10px 12px; background: var(--surface); min-width: 0; }
.as-res__ext { width: 42px; height: 42px; border-radius: 10px; background: var(--steel-wash); color: var(--steel); display: grid; place-items: center;
  font-size: 10.5px; font-weight: 600; flex: none; }
.as-res__ext.is-pptx { background: var(--amber-wash); color: var(--amber); }
.as-res__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.as-res__txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-res__txt span { font-size: 10.5px; color: var(--faint); }
.as-res .btn { flex: none; }

.as-err { background: var(--rust-wash); color: var(--rust); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }

/* подвал ответа: анонимайзер, движок, выгрузка */
.as-foot { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: 12px; min-width: 0; }
.as-anon { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 11px 3px 8px; border-radius: 999px;
  background: var(--moss-wash); color: var(--moss); font-family: var(--mono); font-size: 11px; max-width: 100%; cursor: default; }
.as-anon svg { width: 13px; height: 13px; flex: none; }
.as-anon.is-warn { background: var(--amber-wash); color: var(--amber); }
.as-anon__parts { color: var(--muted); padding-left: 6px; margin-left: 2px; border-left: 1px solid rgba(47,122,82,.25); white-space: nowrap; }
.as-anon.is-warn .as-anon__parts { border-left-color: rgba(138,93,18,.25); }
.as-foot__eng { color: var(--faint); font-size: 11.5px; margin-right: 6px; }
.as-foot__acts { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.as-foot__btn { height: 28px; padding: 0 11px; font-size: 12px; gap: 6px; }
.as-foot__btn svg { width: 13px; height: 13px; }
.as-foot .icon-btn { width: 30px; height: 30px; color: var(--muted); }
.as-foot .icon-btn svg { width: 15px; height: 15px; }

/* ─────────────── адаптив ─────────────── */
@media (max-width: 1100px) {
  .as-shell { grid-template-columns: 248px minmax(0, 1fr); }
  .as-thread { padding: 24px 22px; }
  .as-composer { padding: 12px 20px; }
  .as-scen { grid-template-columns: minmax(0, 1fr); }
  .as.is-list-off .as-scen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .as-head { margin-bottom: 12px; gap: 10px; }
  .as-head__txt { flex-basis: 100%; }
  .as-head .page-head__actions { width: 100%; }
  .as-head .page-head__actions .btn { flex: 1; }
  .as-head__sub { font-size: 13.5px; }
  .as-scen, .as.is-list-off .as-scen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .as-shell, .as.is-list-off .as-shell { grid-template-columns: minmax(0, 1fr); min-height: 460px; }
  .as.is-list-off .as-list { display: flex; }
  .as-list { position: absolute; inset: 0 auto 0 0; width: min(340px, 88%); z-index: 20; border-right: 1px solid var(--hair);
    transform: translateX(-102%); transition: transform var(--dur-base) var(--ease); visibility: hidden; }
  .as.is-list-open .as-list { transform: none; visibility: visible; }
  .as-list__title { display: flex; }
  .as-scrim { display: block; position: absolute; inset: 0; z-index: 19; background: rgba(10,10,10,.24); opacity: 0; pointer-events: none;
    transition: opacity var(--dur-base) var(--ease); }
  .as.is-list-open .as-scrim { opacity: 1; pointer-events: auto; }
  .as-thread { padding: 18px 14px 20px; gap: 20px; }
  .as-composer { padding: 10px 10px 10px; }
  .as-input textarea { font-size: 16px; }
  .as-hint { display: none; }
  .as-msg--user { max-width: 92%; }
  .as-empty h2 { font-size: 24px; }
  .as-empty > p { font-size: 14px; }
  .as-empty__mark { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; margin-bottom: 14px; }
  .as-diff__head { flex-direction: column; align-items: stretch; }
  .as-diff__ttl { flex: none; width: 100%; }
  .as-drow__cols { grid-template-columns: minmax(0, 1fr); }
  .as-q__grid { grid-template-columns: minmax(0, 1fr); }
  .as-paper { padding: 18px 16px 20px; font-size: 15px; }
  .as-paper__to { margin-left: 22%; }
  .as-src__row { flex-wrap: wrap; row-gap: 4px; }
  .as-src__title { order: 5; flex-basis: calc(100% - 32px); margin-left: 32px; white-space: normal; }
  .as-src__sub { margin-left: auto; }
  .as-src__body { padding-left: 36px; }
  .as-res { flex-wrap: wrap; }
  .as-res .btn { width: 100%; }
  .as-foot__acts { margin-left: 0; }
  .as-stat { min-width: 0; flex: 1 1 90px; }
  .as-stat span { white-space: normal; display: block; line-height: 1.3; }
  .as-diff__stats { width: 100%; }
  .as-bubble__ans { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .as-bubble__ans dd { margin-bottom: 6px; }
  .as-img { max-width: 220px; }
  .as-fchip { max-width: 100%; }
}
@media (max-width: 620px) {
  .as-head__lede { display: none; }
  .as-anon__parts { display: none; }
  .as-foot__eng { display: none; }
  .as-head__sub { min-height: 0; }
  .as-scen, .as.is-list-off .as-scen { grid-template-columns: minmax(0, 1fr); }
  .as-head { margin-bottom: 12px; flex-wrap: nowrap; align-items: flex-start; }
  .as-head__txt { flex: 1 1 auto; min-width: 0; }
  .as-head h1 { font-size: 28px; }
  .as-head .page-head__actions { width: auto; flex: none; gap: 6px; }
  .as-head .page-head__actions .btn { flex: none; width: 44px; height: 44px; padding: 0; position: relative; }
  .as-head .as-btn__txt { display: none; }
  .as-head .btn svg { width: 18px; height: 18px; }
  .as-btn-list__n { position: absolute; top: -4px; right: -4px; background: var(--ink); color: #fff; }
  .as-src__chev { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .as-msg, .as-empty { animation: none; }
  .as-typing i { animation: none; opacity: .6; }
  .as-list, .as-scrim { transition: none; }
}

.as-zoom { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; border-radius: 10px; }
