/* ИИ-бриф: чат с аналитиком, в конце ТЗ и телефон (Максим, 2765) */
.brief-page { max-width: 760px; padding-top: 56px; padding-bottom: 96px; }
.brief-page h1 { margin-top: 12px; font-size: 40px; line-height: 1.15; font-weight: 700; }
.brief-page__lead { margin-top: 16px; font-size: 18px; color: var(--foreground-secondary); }

.chat { display: grid; gap: 12px; margin-top: 32px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 24px 48px -32px rgba(17,24,39,.25); }
.chat__log { display: grid; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; animation: bubble-in .25s ease; }
.bubble--analyst { justify-self: start; background: var(--surface-subtle); border-top-left-radius: 4px; }
.bubble--client { justify-self: end; background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.bubble--off-topic { background: #fdf3d8; color: #854d0e; }
.bubble--typing { color: var(--foreground-muted); }
.bubble--typing span { display: inline-block; animation: typing 1s infinite; }
.bubble--typing span:nth-child(2) { animation-delay: .15s; }
.bubble--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes typing { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bubble, .bubble--typing span { animation: none; } }

.chat__input { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.chat__input textarea { width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-size: 16px; resize: vertical; }
.chat__input textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.chat__actions { display: flex; justify-content: flex-end; gap: 8px; }
.icon-button { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--foreground-secondary); cursor: pointer; font: inherit; font-size: 14px; }
.icon-button:hover { background: var(--surface-subtle); }
.icon-button--recording { border-color: #dc2626; color: #dc2626; background: #fdecec; }
.icon-button__timer:empty { display: none; }
.chat__actions .button { min-height: 44px; }
.chat__consent { font-size: 12px; color: var(--foreground-muted); }
.chat__consent a { color: inherit; text-decoration: underline; }
.chat__status { font-size: 13px; color: var(--foreground-muted); }
.chat__status:empty { display: none; }
.chat__status--error { color: #dc2626; }
.chat__restart { justify-self: start; padding: 0; border: 0; background: none; color: var(--foreground-muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }

.summary { display: grid; gap: 16px; padding: 20px; border-radius: 12px; background: var(--primary-subtle); }
.summary h2 { font-size: 20px; }
.summary__list { display: grid; gap: 8px; margin: 0; }
.summary__list div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; font-size: 14px; }
.summary__list dt { color: var(--foreground-muted); }
.summary__list dd { margin: 0; }
.summary__title { font-size: 16px; font-weight: 600; }

@media (max-width: 640px) {
  .brief-page { padding-top: 32px; }
  .brief-page h1 { font-size: 28px; }
  .brief-page__lead { font-size: 16px; }
  .chat { padding: 14px; }
  .bubble { max-width: 92%; }
  .chat__actions .button { flex: 1; }
  .summary { padding: 16px; }
  .summary__list div { grid-template-columns: 1fr; gap: 2px; }
}
