/* Лента шагов в чате, таймер в строке статуса, панель плана над полем ввода. */
.steps { align-self: flex-start; max-width: min(92%, 640px); min-width: 0; font-size: 14px; color: var(--muted); }
.steps-head { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px 4px 8px; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--muted); }
.steps-head.static { padding-left: 12px; }
button.steps-head:hover { color: var(--text); }
.steps-head .icon, .plan-head .icon { transition: transform .15s; transform: rotate(-90deg); }
.steps.open .steps-head .icon, .plan-box.open .plan-head .icon { transform: none; }
.step-list { list-style: none; margin: 6px 0 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; align-items: flex-start; gap: 8px; line-height: 1.35; }
.step.hidden-above { padding-left: 26px; font-size: 13px; }
.step-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.step.bad .step-text { color: var(--bad); }
.step-sec { flex: none; font-variant-numeric: tabular-nums; font-size: 13px; }
.step-mark { flex: none; width: 18px; height: 18px; margin-top: 1px; display: grid; place-items: center; }
.step-mark.ok { color: var(--ok); }
.step-mark.bad { color: var(--bad); }
.step-mark.run i { width: 8px; height: 8px; border-radius: 50%; background: var(--bot); animation: bounce 1.2s infinite; }
.status-timer { font-variant-numeric: tabular-nums; }

.plan { padding: 0 20px 4px; }
.plan-box { max-width: 760px; margin: 0 auto; background: var(--raise); border-radius: 18px; overflow: hidden; }
.plan-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 14px 6px 10px; text-align: left; font-size: 14px; }
.plan-goal { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-box.open .plan-goal { white-space: normal; overflow-wrap: anywhere; color: var(--text); }
.plan-count { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-note { flex: none; padding: 1px 8px; border-radius: 8px; font-size: 12px; background: rgba(242, 180, 65, .16); color: var(--warn); }
.plan-steps { list-style: none; margin: 0; padding: 0 14px 4px 12px; max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.plan-step { display: flex; align-items: flex-start; gap: 8px; line-height: 1.35; }
.plan-step-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.plan-mark { flex: none; width: 18px; height: 18px; margin-top: 1px; display: grid; place-items: center; }
.plan-mark i { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--muted); }
.plan-step.ok { color: var(--muted); }
.plan-step.ok .plan-mark { color: var(--ok); }
.plan-step.now .plan-mark i { border-color: var(--bot); background: var(--bot); }
.plan-step.next { color: var(--muted); }
.plan-foot { padding: 4px 14px 10px 38px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .plan { padding-left: 12px; padding-right: 12px; } .plan-steps { max-height: 26vh; } }
/* Широкий чат: план плавающей карточкой справа, всегда на виду; лента и поле ввода сдвигаются влево */
@media (min-width: 761px) { .chat { position: relative; } } /* на телефоне чат fixed (app.css), не перебивать */
.chat { container-type: inline-size; }
@container (min-width: 820px) {
  .chat.with-plan .messages, .chat.with-plan .composer { padding-right: 320px; }
  .plan { position: absolute; top: 72px; right: 16px; width: 288px; padding: 0; z-index: 5; }
  .plan-box { max-width: none; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
  .plan-steps { max-height: calc(100dvh - 240px); }
  .plan-head { flex-wrap: wrap; row-gap: 2px; }
  .plan-head b { flex: 1; }
  .plan-goal { order: 9; flex-basis: 100%; padding-left: 24px; font-size: 13px; }
}
.q-title.plan-q { white-space: pre-line; }
