/* App.briefChat — окно-разговор с наводящими вопросами (core/brief-chat.js) — r31, 16.11.2026. Префикс .brc-.
   Язык «Новой рассылки» (первый сценарий на наборе — screens/bc-brief.js) и окна «Новый текст» платформы: окно — только
   разговор, растёт с ним до ≈ 82 vh, дальше прокручивается переписка; первый экран — лицо, вопрос, идеи строками; реплика
   агента — маленькое лицо и имя, слова, ответы-«пилюли» или аккуратный список, тихие ссылки; ваши ответы — мягкие пузыри
   справа (файлы — плитками); перед ответом — три точки; ход долгой работы — строкой и тонкой шкалой; карточка итога — строки
   «подпись | значение», одна главная кнопка. Без значков в разговоре (кроме функциональных), без оранжевого, без пунктира,
   без цветных полос сбоку; бледные кнопки; «внимание» — мягкий янтарь. */

/* ══ окно ═════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
.sheet-wrap:has(> .sheet.brc-win) { --brc-top: clamp(24px, 9vh, 112px); align-items: flex-start; padding-top: var(--brc-top); }
.sheet.brc-win {
  position: relative; width: min(760px, 100%); height: auto; max-height: min(82vh, calc(100vh - var(--brc-top, 24px) - 24px)); --brc-col: 652px;
  --brc-line: rgba(var(--k-on), .085); --brc-brd: rgba(var(--k-on), .15); --brc-fill: rgba(var(--k-on), .04); --brc-hover: rgba(var(--k-on), .06);
  --brc-bub: rgba(var(--k-on), .085); --brc-card: rgba(var(--k-on), .035); --brc-card-sh: 0 18px 40px -30px rgba(0, 0, 0, .8); --brc-pv: rgba(var(--k-on), .05);
  --brc-tile: rgba(var(--k-li, 124, 77, 230), .16); --brc-tile-ink: var(--k-lilac, #c4b5fd);
}
[data-theme="light"] .sheet.brc-win {
  --brc-line: rgba(62, 52, 104, .095); --brc-brd: rgba(62, 52, 104, .15); --brc-fill: #fff; --brc-hover: rgba(62, 52, 104, .045);
  --brc-bub: rgba(62, 52, 104, .065); --brc-card: #fff; --brc-card-sh: 0 1px 2px rgba(29, 22, 69, .04), 0 14px 34px -26px rgba(62, 40, 140, .38); --brc-pv: #f5f3fb;
  --brc-tile: #f1edfd; --brc-tile-ink: #5b3fc4;
}
.sheet.brc-win > .sh { align-items: center; padding-top: 13px; padding-bottom: 13px; }
.sheet.brc-win > .sh::before { top: 50%; transform: translateY(-50%); }
.sheet.brc-win > .sb { flex: 1 1 auto; min-height: 0; padding: 0; gap: 0; overflow: hidden; display: flex; flex-direction: column; }
.brc-pt { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brc-pt > b { min-width: 0; font-size: 17px; line-height: 24px; font-weight: 650; letter-spacing: -.012em; color: var(--k-hi, var(--ink)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brc-tag { flex: 0 1 auto; min-width: 0; font-size: 13px; line-height: 20px; color: var(--k-mut, var(--mut)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brc-hb { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border-radius: 11px; border: 1px solid var(--k-line, var(--line-2));
  background: rgba(var(--k-on, 22, 32, 46), .05); color: var(--ink-icon, var(--k-ink)); cursor: pointer; transition: border-color .16s, background .16s; }
.brc-hb:hover { border-color: rgba(var(--k-li, 124, 77, 230), .45); background: rgba(var(--k-on, 22, 32, 46), .1); }
.brc-hb:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* разговор над полем: прокручивается только переписка, поле — внизу */
.brc-host { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.brc-sc { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px max(20px, calc((100% - var(--brc-col)) / 2)) 24px; scrollbar-gutter: stable both-edges;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%); }
.brc-thread { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.brc-dock { flex: 0 0 auto; box-sizing: border-box; padding: 0 max(20px, calc((100% - var(--brc-col)) / 2)) 20px; }
.brc-pi { position: relative; min-width: 0; }
/* «Свой вариант» — поле вспыхивает один раз: ответ — туда */
.brc-pi::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: -4px; height: calc(100% + 8px); max-height: 180px; border-radius: 28px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 2px rgba(var(--k-li, 124, 77, 230), .45), 0 0 26px rgba(var(--k-li, 124, 77, 230), .35); }
.brc-pi.is-nudge::after { animation: brc-nudge .9s ease-out; }
@keyframes brc-nudge { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
/* файлы над окном: мягкое свечение по краю и подпись по центру (без пунктира) */
.sheet.brc-win.is-drop::after { content: attr(data-over); position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; border-radius: inherit; pointer-events: none;
  font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--k-lilac, var(--acc));
  background: radial-gradient(120% 90% at 50% 50%, rgba(var(--k-li, 124, 77, 230), .1), rgba(var(--k-li, 124, 77, 230), .04) 60%, transparent 100%);
  box-shadow: inset 0 0 0 2px rgba(var(--k-li, 124, 77, 230), .5), inset 0 0 60px rgba(var(--k-li, 124, 77, 230), .22); animation: brc-in .2s ease-out both; }
.brc-file { display: none; }

/* ══ первый экран ════════════════════════════════════════════════════════════════════════════════════════════════════ */
.brc-hi { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding-top: 4px; text-align: center; }
.brc-hi-face { display: inline-flex; margin-bottom: 4px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.brc-hi-face:hover { transform: rotate(-8deg) scale(1.06); }
.brc-hi-q { margin: 0; font-size: 24px; line-height: 30px; font-weight: 650; letter-spacing: -.022em; color: var(--k-hi, var(--ink)); text-wrap: balance; }
.brc-hi-s { margin: 0; max-width: 46ch; font-size: 14px; line-height: 21px; color: var(--k-mut, var(--mut)); text-wrap: balance; }
.brc-ideas { display: flex; flex-direction: column; width: 100%; margin-top: 6px; }
.brc-idea { position: relative; display: flex; align-items: baseline; gap: 12px; width: 100%; min-width: 0; padding: 12px 14px; border: 0; border-radius: 12px; background: none; font: inherit; text-align: left;
  color: var(--k-ink, var(--ink)); cursor: pointer; transition: background-color .15s; }
.brc-idea + .brc-idea::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: var(--brc-line); transition: opacity .15s; }
.brc-idea:hover { background: var(--brc-hover); }
.brc-idea:hover::before, .brc-idea:hover + .brc-idea::before, .brc-idea:focus-visible::before, .brc-idea:focus-visible + .brc-idea::before { opacity: 0; }
.brc-idea:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.brc-idea > b { flex: 0 0 auto; font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -.006em; color: var(--k-hi, var(--ink)); }
.brc-idea > span { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 22px; color: var(--k-mut, var(--mut)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.brc-idea:hover > span { color: var(--k-ink, var(--ink)); }
.brc-host.is-start .brc-hi { animation: brc-in .46s cubic-bezier(.22, .8, .2, 1) both; }
.brc-host.is-start .brc-idea { animation: brc-in .42s cubic-bezier(.22, .8, .2, 1) both; }
.brc-host.is-start .brc-idea:nth-child(1) { animation-delay: .06s; }
.brc-host.is-start .brc-idea:nth-child(2) { animation-delay: .1s; }
.brc-host.is-start .brc-idea:nth-child(3) { animation-delay: .14s; }
.brc-host.is-start .brc-idea:nth-child(4) { animation-delay: .18s; }
.brc-host.is-start .brc-idea:nth-child(5) { animation-delay: .22s; }
@keyframes brc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ══ реплика агента ══════════════════════════════════════════════════════════════════════════════════════════════════ */
.brc-ai { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; font-size: 15px; line-height: 24px; color: var(--k-hi, var(--ink)); }
.brc-who { display: flex; align-items: center; gap: 8px; height: 22px; margin-bottom: -4px; }
.brc-av { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 22px; height: 22px; }
.brc-nm { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--k-mut, var(--mut)); }
.brc-lead { margin: 0; text-wrap: pretty; }
.brc-sub { margin: -6px 0 0; font-size: 13px; line-height: 19px; color: var(--k-mut, var(--mut)); }
.brc-w { display: inline-block; animation: brc-word .32s ease-out both; animation-delay: var(--d, 0ms); }
@keyframes brc-word { from { opacity: 0; filter: blur(3px); transform: translateY(2px); } to { opacity: 1; filter: none; transform: none; } }
.brc-ai.is-fresh .brc-av { animation: brc-in .3s cubic-bezier(.22, .8, .2, 1) both; }
.brc-ai.is-fresh > :not(.brc-who):not(.brc-lead) { animation: brc-in .4s cubic-bezier(.22, .8, .2, 1) .12s both; }
.brc-live { width: 100%; min-width: 0; }
/* три точки перед ответом */
.brc-typing .brc-who { margin-bottom: 0; animation: brc-in .24s ease-out both; }
.brc-dots { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding-left: 1px; }
.brc-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--k-mut2, var(--mut2)); animation: brc-dot 1.15s ease-in-out infinite; }
.brc-dots i:nth-child(2) { animation-delay: .15s; }
.brc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes brc-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

/* ══ ответы: пилюли, список, тихие ссылки ════════════════════════════════════════════════════════════════════════════ */
.brc-ans { display: flex; flex-direction: column; gap: 12px; width: 100%; min-width: 0; }
.brc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.brc-pill { display: inline-flex; align-items: center; max-width: 100%; min-height: 36px; box-sizing: border-box; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--brc-brd); background: var(--brc-fill);
  font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--k-hi, var(--ink)); text-align: left; cursor: pointer;
  transition: border-color .16s, background-color .16s, transform .16s cubic-bezier(.2, .8, .2, 1); }
.brc-pill:hover { border-color: rgba(var(--k-li, 124, 77, 230), .5); background: rgba(var(--k-li, 124, 77, 230), .07); }
.brc-pill:active { transform: scale(.97); }
.brc-pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.brc-pill.is-main { border-color: rgba(var(--k-li, 124, 77, 230), .55); background: rgba(var(--k-li, 124, 77, 230), .14); color: var(--k-lilac, var(--acc)); font-weight: 600; }
.brc-pill.is-main:hover { background: rgba(var(--k-li, 124, 77, 230), .2); }
/* список: название слева, число справа */
.brc-chips.is-list { flex-direction: column; flex-wrap: nowrap; gap: 0; width: 100%; max-width: 520px; box-sizing: border-box; border: 1px solid var(--brc-brd); border-radius: 14px; background: var(--brc-fill); overflow: hidden; }
.brc-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; box-sizing: border-box; padding: 11px 16px; border: 0; background: none;
  font: inherit; font-size: 14px; line-height: 20px; color: var(--k-hi, var(--ink)); text-align: left; cursor: pointer; transition: background-color .14s; }
.brc-opt + .brc-opt { box-shadow: inset 0 1px 0 var(--brc-line); }
.brc-opt:hover { background: var(--brc-hover); }
.brc-opt:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.brc-opt.is-main .brc-opt-t { color: var(--k-lilac, var(--acc)); font-weight: 600; }
.brc-opt-i { display: inline-flex; flex: 0 0 auto; }
.brc-opt-t { flex: 1 1 auto; min-width: 0; font-weight: 520; overflow-wrap: anywhere; }
.brc-opt-n { flex: 0 0 auto; font-size: 13px; color: var(--k-mut, var(--mut)); font-variant-numeric: tabular-nums; }
.brc-links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 20px; min-width: 0; margin-top: -2px; }
.brc-link { padding: 3px 0; border: 0; background: none; font: inherit; font-size: 13.5px; line-height: 20px; color: var(--k-mut, var(--mut)); cursor: pointer; white-space: nowrap;
  text-decoration: underline; text-decoration-color: rgba(var(--k-mu, 62, 52, 104), .22); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .14s, text-decoration-color .14s; }
.brc-link:hover { color: var(--k-hi, var(--ink)); text-decoration-color: rgba(var(--k-li, 124, 77, 230), .6); }
.brc-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ══ ваши ответы ═════════════════════════════════════════════════════════════════════════════════════════════════════ */
.brc-you { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
.brc-ub { max-width: min(78%, 520px); padding: 9px 15px; border-radius: 18px; background: var(--brc-bub); font-size: 15px; line-height: 22px; color: var(--k-hi, var(--ink)); overflow-wrap: anywhere; white-space: pre-wrap; }
.brc-you.is-new { animation: brc-you .32s cubic-bezier(.22, .8, .2, 1) both; transform-origin: 100% 100%; }
@keyframes brc-you { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
/* файлы — плитками в пузыре */
.brc-uf { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: min(86%, 560px); }
.brc-uf-i { display: inline-flex; align-items: center; gap: 9px; min-width: 0; max-width: 260px; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--brc-bub); }
.brc-uf-n { display: flex; flex-direction: column; min-width: 0; }
.brc-uf-n b { font-size: 13px; line-height: 17px; font-weight: 560; color: var(--k-hi, var(--ink)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brc-uf-n i { font-style: normal; font-size: 11.5px; line-height: 15px; color: var(--k-mut, var(--mut)); }
.brc-ext { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 38px; height: 38px; padding: 0; box-sizing: border-box; border-radius: 10px; overflow: hidden;
  background: var(--brc-tile); color: var(--brc-tile-ink); font-size: 11px; line-height: 1; font-weight: 700; letter-spacing: 0; box-shadow: inset 0 0 0 1px rgba(var(--k-li, 124, 77, 230), .14); }

/* ══ ход долгой работы: строка и тонкая шкала ════════════════════════════════════════════════════════════════════════ */
.brc-prog { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 520px; }
.brc-prog-t { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 14px; line-height: 20px; color: var(--k-ink, var(--ink)); }
.brc-prog-t > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.brc-prog-t > i { flex: 0 0 auto; font-style: normal; font-size: 12.5px; color: var(--k-mut, var(--mut)); font-variant-numeric: tabular-nums; }
.brc-meter { position: relative; display: block; height: 3px; border-radius: 999px; background: var(--brc-line); overflow: hidden; }
.brc-meter > b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; transition: width .3s cubic-bezier(.22, 1, .36, 1);
  background: linear-gradient(90deg, rgba(var(--k-li, 124, 77, 230), .55), var(--k-lilac, #8b6cf0) 70%, var(--k-sky, #7dd3fc)); box-shadow: 0 0 10px rgba(var(--k-li, 124, 77, 230), .45); }
.brc-meter > b::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); transform: translateX(-100%); animation: brc-shine 1.3s ease-in-out infinite; }
@keyframes brc-shine { to { transform: translateX(100%); } }
.brc-prog.is-done .brc-prog-t { align-items: center; color: var(--k-mut, var(--mut)); }
.brc-prog.is-done .brc-prog-t .ic { flex: 0 0 auto; color: var(--k-mint-ink, #0f766e); }

/* ══ «что я поняла» — строки (файл, позиция, группа) ═════════════════════════════════════════════════════════════════ */
.brc-items { display: flex; flex-direction: column; width: 100%; max-width: 600px; box-sizing: border-box; border: 1px solid var(--brc-brd); border-radius: 14px; background: var(--brc-fill); overflow: hidden; }
.brc-it { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; box-sizing: border-box; padding: 10px 16px 10px 12px; border: 0; background: none;
  font: inherit; text-align: left; color: inherit; transition: background-color .14s; }
.brc-it + .brc-it { box-shadow: inset 0 1px 0 var(--brc-line); }
button.brc-it { cursor: pointer; }
button.brc-it:hover { background: var(--brc-hover); }
button.brc-it:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.brc-it-b { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.brc-it-t { font-size: 14px; line-height: 20px; font-weight: 560; color: var(--k-hi, var(--ink)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brc-it-m { font-size: 12.5px; line-height: 18px; color: var(--k-mut, var(--mut)); overflow-wrap: anywhere; }
.brc-it-r { flex: 0 0 auto; font-size: 12.5px; line-height: 18px; color: var(--k-mut, var(--mut)); white-space: nowrap; }
.brc-it-r.is-warn { padding: 1px 9px; border-radius: 999px; color: var(--k-amber-ink, #92400e); background: color-mix(in srgb, var(--k-amber, #f59e0b) 14%, transparent); font-weight: 560; }
.brc-it-r.is-ok { color: var(--k-mint-ink, #0f766e); }
.brc-it-r.is-off { color: var(--k-mut2, var(--mut2)); }
.brc-it.is-off .brc-it-t { color: var(--k-mut, var(--mut)); text-decoration: line-through; text-decoration-color: rgba(var(--k-mu, 62, 52, 104), .35); }
.brc-it-e { position: absolute; right: 16px; top: 50%; font-size: 12.5px; line-height: 20px; font-weight: 500; color: var(--k-lilac, var(--acc)); opacity: 0; transform: translate(-3px, -50%);
  padding-left: 14px; background: linear-gradient(90deg, transparent, var(--brc-fill) 14px); transition: opacity .16s, transform .2s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
button.brc-it:hover .brc-it-e, button.brc-it:focus-visible .brc-it-e { opacity: 1; transform: translate(0, -50%); }

/* ══ сообщение или документ «как увидит клиент» ══════════════════════════════════════════════════════════════════════ */
.brc-msg, .brc-pv { width: 100%; max-width: 560px; box-sizing: border-box; padding: 14px 16px; border-radius: 14px; background: var(--brc-pv); border: 1px solid var(--brc-line); }

/* ══ карточка итога ══════════════════════════════════════════════════════════════════════════════════════════════════ */
.brc-card { box-sizing: border-box; display: flex; flex-direction: column; width: 100%; min-width: 0; overflow: hidden; border-radius: 16px;
  background: var(--brc-card); border: 1px solid var(--brc-brd); box-shadow: var(--brc-card-sh); color: var(--k-ink, var(--ink)); transition: opacity .25s ease; }
.brc-card.is-live { border-color: rgba(var(--k-li, 124, 77, 230), .3); }
.brc-ch { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 13px 18px 11px; }
.brc-ch-t { flex: 0 1 auto; min-width: 0; font-size: 15px; line-height: 21px; font-weight: 650; letter-spacing: -.01em; color: var(--k-hi, var(--ink)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brc-ch-e { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--k-mut, var(--mut)); cursor: pointer; opacity: .7; transition: opacity .15s, background .15s; }
.brc-ch-e:hover { opacity: 1; background: var(--brc-hover); }
.brc-ok { flex: 0 0 auto; margin-left: auto; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; line-height: 22px; font-weight: 600;
  color: var(--k-mint-ink, #0f766e); background: color-mix(in srgb, var(--k-mint, #14b8a6) 14%, transparent); }
.brc-card .brc-pv { max-width: none; margin: 0 18px 14px; width: auto; }
.brc-rows { display: flex; flex-direction: column; min-width: 0; border-top: 1px solid var(--brc-line); }
.brc-r { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: baseline; gap: 14px; width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 18px; border: 0; background: none;
  font: inherit; text-align: left; color: inherit; transition: background-color .14s; }
.brc-r + .brc-r { border-top: 1px solid var(--brc-line); }
button.brc-r { cursor: pointer; }
button.brc-r:hover { background: var(--brc-hover); }
button.brc-r:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.brc-r-l { font-size: 13px; line-height: 20px; color: var(--k-mut, var(--mut)); }
.brc-r-v { display: block; min-width: 0; font-size: 14px; line-height: 20px; color: var(--k-hi, var(--ink)); overflow-wrap: anywhere; }
.brc-r-v b { font-weight: 650; }
.brc-r-v a { white-space: nowrap; }   /* r32: ссылка-номер («Q-2026-0392») не рвётся по дефису */
.brc-r-v small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 18px; color: var(--k-mut, var(--mut)); }
.brc-r-v small:empty { display: none; }
.brc-r-e { font-size: 12.5px; line-height: 20px; font-weight: 500; color: var(--k-lilac, var(--acc)); opacity: 0; transform: translateX(-3px); transition: opacity .16s, transform .2s cubic-bezier(.2, .8, .2, 1); }
button.brc-r:hover .brc-r-e, button.brc-r:focus-visible .brc-r-e { opacity: 1; transform: none; }
.brc-cn { margin: 0; padding: 10px 18px 0; border-top: 1px solid var(--brc-line); font-size: 12.5px; line-height: 18px; color: var(--k-mut, var(--mut)); }
.brc-cf { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; min-width: 0; padding: 13px 18px 14px; border-top: 1px solid var(--brc-line); }
.brc-cn + .brc-cf { border-top: 0; }
.brc-cf .grow { flex: 1 1 auto; }
.brc-cf .brc-go { flex: 0 0 auto; height: 36px; padding: 0 16px; font-size: 14px; font-weight: 600; }
.brc-cq { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 14px; min-width: 0; }
.brc-cq-l { font-size: 13px; line-height: 20px; color: var(--k-mut2, var(--mut2)); margin-right: -4px; }
.brc-cq .brc-link { font-size: 13px; color: var(--k-ink, var(--ink)); text-decoration-color: rgba(var(--k-li, 124, 77, 230), .32); }
.brc-cq .brc-link:hover { color: var(--k-lilac, var(--acc)); text-decoration-color: currentColor; }
.brc-card.is-old { opacity: .6; box-shadow: none; background: transparent; }
.brc-card.is-old .brc-ch { padding: 10px 16px; }
.brc-card.is-old .brc-ch-t { flex: 0 0 auto; font-size: 13.5px; line-height: 20px; font-weight: 600; }
.brc-ch-s { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 20px; color: var(--k-mut, var(--mut)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brc-card.is-done { border-color: color-mix(in srgb, var(--k-mint, #14b8a6) 34%, transparent); }

/* ══ простое поле (только если App.promptInput нет) ══════════════════════════════════════════════════════════════════ */
.brc-fb { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 24px; border: 1px solid var(--k-line, var(--line-2)); background: var(--k-glass2, var(--l1)); }
.brc-fb textarea { flex: 1 1 auto; min-width: 0; min-height: 30px; max-height: 140px; padding: 5px 0; border: 0; outline: 0; resize: none; background: transparent; font: inherit; font-size: 14px; line-height: 22px; color: var(--k-hi, var(--ink)); }
.brc-fb button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--k-hi, var(--ink)); color: var(--k-glass2, #fff); cursor: pointer; }

/* ══ узкие и низкие окна ═════════════════════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 620px) { .brc-r { grid-template-columns: 72px minmax(0, 1fr); } .brc-r-e { display: none; } .brc-idea > span { display: none; } .brc-it-e { display: none; } }
@media (max-height: 680px) { .brc-hi-face { display: none; } }
@media (max-height: 760px) {
  .brc-idea { padding-top: 10px; padding-bottom: 10px; }
  .brc-sc { padding-top: 16px; padding-bottom: 18px; }
  .brc-thread { gap: 18px; }
  .brc-dock { padding-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .brc-host.is-start :is(.brc-hi, .brc-idea), .brc-pi.is-nudge::after, .brc-you.is-new, .brc-ai.is-fresh .brc-av, .brc-ai.is-fresh > *, .brc-typing .brc-who, .brc-dots i, .brc-w,
  .brc-meter > b::after, .sheet.brc-win.is-drop::after { animation: none; }
  .brc-idea, .brc-idea > span, .brc-hi-face, .brc-pill, .brc-opt, .brc-link, .brc-r, .brc-r-e, .brc-card, .brc-hb, .brc-it, .brc-it-e, .brc-meter > b { transition: none; }
}

/* ══ Загрузки (screens/org-import.js): «Все строки» прайса — окно поверх разговора ═══════════════════════════════════ */
.sheet.oic-rows-win { width: min(880px, 100%); }
.oic-rows { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.oic-sec { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--k-line, var(--line-2)); border-radius: 14px; overflow: hidden; background: rgba(var(--k-on, 22, 32, 46), .02); }
[data-theme="light"] .oic-sec { background: #fff; border-color: rgba(62, 52, 104, .13); }
.oic-sec-h { display: flex; align-items: baseline; gap: 10px; min-width: 0; padding: 11px 16px; border-bottom: 1px solid var(--k-line, var(--line-2)); }
.oic-sec-h b { font-size: 14px; line-height: 20px; font-weight: 650; color: var(--k-hi, var(--ink)); }
.oic-sec-h span { font-size: 12.5px; line-height: 18px; color: var(--k-mut, var(--mut)); }
.oic-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, auto) 128px; align-items: baseline; gap: 14px; padding: 9px 16px; min-width: 0; }
.oic-r + .oic-r { border-top: 1px solid rgba(var(--k-on, 22, 32, 46), .06); }
[data-theme="light"] .oic-r + .oic-r { border-top-color: rgba(62, 52, 104, .07); }
.oic-r-n { display: flex; flex-direction: column; min-width: 0; }
.oic-r-n b { font-size: 13.5px; line-height: 19px; font-weight: 560; color: var(--k-hi, var(--ink)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oic-r-n i { font-style: normal; font-size: 12px; line-height: 17px; color: var(--k-mut, var(--mut)); overflow-wrap: anywhere; }
.oic-r-v { font-size: 13.5px; line-height: 19px; color: var(--k-ink, var(--ink)); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oic-r-v b { font-weight: 650; color: var(--k-hi, var(--ink)); }
.oic-r-v i { font-style: normal; color: var(--k-mut, var(--mut)); }
.oic-r-v small { display: block; font-size: 11.5px; line-height: 15px; color: var(--k-mut2, var(--mut2)); }
.oic-r-s { font-size: 12.5px; line-height: 19px; color: var(--k-mut, var(--mut)); text-align: right; }
.oic-r.is-warn .oic-r-s { color: var(--k-amber-ink, #92400e); font-weight: 560; }
.oic-r.is-off { opacity: .6; }
button.oic-r { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background-color .14s; }
button.oic-r:hover { background: rgba(var(--k-on, 22, 32, 46), .04); }
[data-theme="light"] button.oic-r:hover { background: rgba(62, 52, 104, .04); }
button.oic-r:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.oic-empty { margin: 0; padding: 24px; text-align: center; color: var(--k-mut, var(--mut)); font-size: 14px; }
@media (max-width: 720px) { .oic-r { grid-template-columns: minmax(0, 1fr) auto; } .oic-r-s { display: none; } }

/* ══ Подключение канала (screens/channels.js, openWizard): знак канала в шапке, «где взять», QR, код, проверка связи ══ */
.chc-logo { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.chc-how { margin: -2px 0 0; padding: 0; list-style: none; counter-reset: chc; display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
.chc-how li { position: relative; padding-left: 26px; font-size: 13.5px; line-height: 20px; color: var(--k-ink, var(--ink)); counter-increment: chc; }
.chc-how li::before { content: counter(chc); position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; font-weight: 700; color: var(--brc-tile-ink); background: var(--brc-tile); }
.chc-qr { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.chc-qr-c { display: inline-flex; padding: 12px; border-radius: 16px; background: #fff; color: #17142b; box-shadow: inset 0 0 0 1px rgba(62, 52, 104, .12), 0 10px 26px -18px rgba(62, 40, 140, .45); }
.chc-qr .chc-how { flex: 1 1 220px; margin: 0; }
.chc-code { width: 100%; max-width: 600px; max-height: 168px; box-sizing: border-box; margin: 0; padding: 12px 14px; border-radius: 12px; overflow: auto; white-space: pre;
  background: var(--brc-pv); border: 1px solid var(--brc-line); font: 12px/18px ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas, monospace; color: var(--k-ink, var(--ink)); user-select: all; }
.chc-chks { display: flex; flex-direction: column; gap: 6px; }
.chc-chk { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; color: var(--k-mut, var(--mut)); transition: color .2s; }
.chc-chk[data-st="ok"] { color: var(--k-ink, var(--ink)); }
.chc-chk-i { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--brc-brd); }
.chc-chk[data-st="ok"] .chc-chk-i { box-shadow: none; color: var(--k-mint-ink, #0f766e); background: color-mix(in srgb, var(--k-mint, #14b8a6) 16%, transparent); }
.chc-chk[data-st="run"] .chc-chk-i i { width: 8px; height: 8px; border-radius: 999px; background: var(--k-lilac, var(--acc)); box-shadow: 0 0 10px rgba(var(--k-li, 124, 77, 230), .6); animation: brc-dot 1.15s ease-in-out infinite; }
.chc-chv { display: inline-flex; align-items: center; gap: 8px; vertical-align: top; }
@media (prefers-reduced-motion: reduce) { .chc-chk[data-st="run"] .chc-chk-i i { animation: none; } }

/* ══ «Заполнить с помощником» (screens/org-fill.js, org-fill-server.js): названия разделов в карточке — в одну строку ═══ */
.sheet.ofc-win .brc-r { grid-template-columns: 124px minmax(0, 1fr) auto; }
@media (max-width: 620px) { .sheet.ofc-win .brc-r { grid-template-columns: 96px minmax(0, 1fr); } }
