/* Стили Pulsar поверх общего дизайна (ui.css: цвета, шапка, кабинет .cab, панели, плитки, таблицы, поля, кнопки, вкладки).
   Здесь — только своё: воронка и оценка лидов на дашборде, настройки бота, чат с ботом */

/* Воронка: полосы от «найдено» до «оплачено», справа — переход с предыдущей стадии */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px 38px; align-items: center; gap: 10px; }
.funnel-row span { color: var(--c-muted); font-size: 12.5px; }
.funnel-bar { height: 10px; border-radius: 6px; background: var(--c-card2); overflow: hidden; }
.funnel-bar > div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--c-accent), var(--c-accent2)); }
.funnel-row b { text-align: right; font-variant-numeric: tabular-nums; }
.funnel-row em { font-style: normal; text-align: right; color: var(--c-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; cursor: help; }

/* Переключатель периода и вида (в заголовке панели) */
:is(.cab, .ui) .panel > h1:has(.period) { flex-wrap: wrap; }
.period { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--c-card2); }
.cab .period a { padding: 4px 10px; border-radius: 8px; color: var(--c-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.cab .period a:hover { color: var(--c-text); }
.cab .period a.active { background: var(--c-card); color: var(--c-text); box-shadow: var(--c-shadow); }

/* Динамика: показатели периода с изменением к прошлому периоду */
.dyn-kpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dyn-kpi > div { padding: 10px 12px; border-radius: 12px; background: var(--c-card2); min-width: 0; }
.dyn-kpi span { display: block; color: var(--c-muted); font-size: 12px; }
.dyn-kpi b { display: block; margin: 2px 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dyn-kpi small { color: var(--c-muted); font-size: 11.5px; }
.delta { font-style: normal; font-weight: 650; margin-right: 4px; cursor: help; }
.delta.ok { color: var(--c-ok); }
.delta.bad { color: var(--c-bad); }
h2.dyn-sub { display: flex; align-items: center; gap: 8px; margin: 20px 0 4px; font-size: 13.5px; font-weight: 650; }
h2.dyn-sub i { color: var(--c-ok); }
h2.dyn-sub span { color: var(--c-muted); font-weight: 500; }

/* График: SVG тянется по ширине (столбцы и линии), подписи осей и подсказки — HTML поверх, чтобы текст не мельчал */
.chart { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 190px auto; column-gap: 8px; margin-top: 4px; }
:is(.cab, .ui) .panel > .chart { overflow: visible; }
.chart-y { position: relative; }
.chart-y span { position: absolute; right: 0; transform: translateY(-50%); color: var(--c-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; border-bottom: 1px solid var(--c-line2); background: repeating-linear-gradient(to bottom, var(--c-line) 0 1px, transparent 1px 25%); }
.chart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart rect.c-found { fill: color-mix(in srgb, var(--c-accent) 30%, transparent); }
.chart rect.c-hot { fill: var(--c-btn); }
.chart rect.c-income { fill: var(--c-ok); }
.chart polyline { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart polyline.c-sent { stroke: var(--c-violet); }
.chart polyline.c-rep { stroke: var(--c-ok); }
.chart-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.chart-cols > div { position: relative; border-radius: 4px; }
.chart-cols > div:hover { background: color-mix(in srgb, var(--c-accent) 9%, transparent); }
.chart-tip { display: none; position: absolute; top: -6px; left: 50%; transform: translate(-50%, -100%); z-index: 5; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--c-line); background: var(--c-card); box-shadow: var(--c-shadow-lg); font-size: 12px; white-space: nowrap; pointer-events: none; }
.chart-cols > div:nth-child(-n+3) .chart-tip { left: 0; transform: translateY(-100%); }
.chart-cols > div:nth-last-child(-n+3) .chart-tip { left: auto; right: 0; transform: translateY(-100%); }
.chart-cols > div:hover .chart-tip { display: block; }
.chart-tip b { display: block; margin-bottom: 3px; }
.chart-tip span { display: flex; align-items: center; gap: 7px; color: var(--c-muted); line-height: 1.6; }
.chart-x { grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin-top: 5px; }
.chart-x span { color: var(--c-muted); font-size: 11px; text-align: center; white-space: nowrap; overflow: visible; display: flex; justify-content: center; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; color: var(--c-muted); font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
:is(.chart-legend, .chart-tip) i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
:is(.chart-legend, .chart-tip) i.c-sent, :is(.chart-legend, .chart-tip) i.c-rep { height: 3px; border-radius: 2px; }
i.c-found { background: color-mix(in srgb, var(--c-accent) 30%, transparent); }
i.c-hot { background: var(--c-btn); }
i.c-sent { background: var(--c-violet); }
i.c-rep, i.c-income { background: var(--c-ok); }

/* Воронка по источникам */
.by-table th:not(:first-child), .by-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.rate { display: inline-block; width: 44px; height: 6px; margin-right: 7px; border-radius: 4px; background: var(--c-card2); overflow: hidden; vertical-align: middle; }
.rate > span { display: block; height: 100%; border-radius: 4px; background: var(--c-ok); }
@media screen and (max-width: 1100px) { .dyn-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Оценка лида (и «машинность» текста) и стадия */
.score { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 8px; text-align: center; font-weight: 700; font-size: 12px; background: var(--c-card2); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.score.hot { background: var(--c-ok-soft); color: var(--c-ok); }
.lead-title { font-weight: 600; }
.lead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; color: var(--c-muted); font-size: 12px; }
.lead-meta .chip { font-size: 11px; padding: 1px 8px; }

/* Настройки бота */
.cab #tasks td:first-child { min-width: 230px; width: 30%; }
.cab #sources td:first-child { min-width: 200px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 20px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 10px; }
textarea.tall { height: 200px; }

/* ===== Чат с ботом: в духе ИИ-ассистентов ===== */
/* Колонка ленты и поля ввода — по центру, не шире удобной для чтения */
.chat-col, .chat-bottom > * { margin-left: auto; margin-right: auto; }
.chat { display: flex; flex-direction: column; gap: 22px; padding: 8px 2px 4px; }
.msg { display: flex; gap: 12px; overflow-wrap: anywhere; line-height: 1.6; font-size: 14px; }
.msg-text { white-space: pre-wrap; }
.msg-body { min-width: 0; }
/* Бот: аватар слева, текст без «пузыря» */
.msg-bot .msg-body { flex: 1; }
.msg-ava { flex: none; width: 30px; height: 30px; margin-top: 1px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--c-btn), var(--c-violet)); }
.msg-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; line-height: 1.3; }
.msg-meta b { font-size: 13px; }
.msg-meta .msg-date { color: var(--c-muted); font-size: 11.5px; }
.lvl-ico { font-size: 12px; }
.lvl-success .lvl-ico { color: var(--c-ok); }
.lvl-warning .lvl-ico { color: var(--c-warn); }
.lvl-error .lvl-ico { color: var(--c-bad); }
.lvl-error > .msg-body > .msg-text { color: var(--c-bad); }
/* Вы: мягкий пузырь справа */
.msg-user { justify-content: flex-end; }
.msg-user .msg-body { max-width: 78%; padding: 10px 16px; border-radius: 20px; border-bottom-right-radius: 6px; background: var(--c-accent-soft); color: var(--c-text); }
.msg-user .msg-body { position: relative; }
.msg-user .msg-date { position: absolute; right: 8px; top: 100%; margin-top: 3px; white-space: nowrap; color: var(--c-muted); font-size: 11px; opacity: 0; transition: opacity .15s; }   /* время — под пузырём при наведении, место в пузыре не занимает */
.msg-user:hover .msg-date { opacity: 1; }
.msg-user a { text-decoration: underline; }

/* Черновик — карточка */
.act-card { margin-top: 12px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-card); box-shadow: var(--c-shadow); overflow: hidden; }
.act-card.wait { border-color: color-mix(in srgb, var(--c-btn) 45%, var(--c-line)); }
.act-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--c-line); background: var(--c-card2); font-size: 12.5px; }
.act-type { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; color: var(--c-text); }
.act-type i { color: var(--c-accent); }
.act-score { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; cursor: help; }
.act-score.ok { background: var(--c-ok-soft); color: var(--c-ok); }
.act-score.bad { background: var(--c-warn-soft); color: var(--c-warn); }
.act-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.cab .icon-btn { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; border: none; border-radius: 8px; background: transparent; color: var(--c-muted); font-size: 13px; box-shadow: none; }
.cab .icon-btn:hover { background: var(--c-card); color: var(--c-text); }
.act-draft { padding: 12px 16px; white-space: pre-wrap; line-height: 1.6; font-size: 14px; }
.act-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--c-line); white-space: normal; }
.act-card > .act-head + .act-bar { border-top: none; }
.cab .act-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--c-line2); background: var(--c-card); color: var(--c-text); box-shadow: none; }
.cab .act-btn i { font-size: 12px; }
.cab .act-btn:hover { background: var(--c-card2); border-color: var(--c-line2); }
.cab .act-btn.go { background: var(--c-ok-btn); border-color: transparent; color: #fff !important; box-shadow: 0 2px 8px color-mix(in srgb, var(--c-ok-btn) 35%, transparent); }
.cab .act-btn.go:hover { background: var(--c-ok-btn); filter: brightness(1.08); }
.cab .act-btn.primary { background: var(--c-btn); border-color: transparent; color: #fff !important; box-shadow: 0 2px 8px color-mix(in srgb, var(--c-btn) 35%, transparent); }
.cab .act-btn.primary:hover { background: var(--c-btn2); }
.cab .act-btn.ghost { border-color: transparent; background: transparent; color: var(--c-muted); }
.cab .act-btn.ghost:hover { background: var(--c-card2); color: var(--c-text); }
.act-status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--c-card2); color: var(--c-muted); white-space: normal; }
.act-status i { font-size: 11px; }
.act-status.st-1, .act-status.st-6 { background: var(--c-accent-soft); color: var(--c-accent); }
.act-status.st-3 { background: var(--c-ok-soft); color: var(--c-ok); }
.act-status.st-4 { background: var(--c-bad-soft); color: var(--c-bad); }
.act > .hint { margin: 8px 0 0; }
/* Текст материала на странице «Контент» (тот же класс черновика) — в рамке */
.c-text .act-draft, #hNew.act-draft { margin-top: 6px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--c-line2); background: var(--c-card); font-size: 13px; }

/* Бот печатает: три прыгающие точки */
.typing-row { margin-top: 22px; }
.typing-row .msg-body { display: flex; align-items: center; gap: 10px; color: var(--c-muted); font-size: 13px; }
.dots { display: inline-flex; gap: 4px; padding: 10px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-muted); opacity: .4; animation: chat-dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: .9; } }

/* Пустой чат: приветствие и подсказки */
.chat-welcome { padding: 6vh 8px 20px; text-align: center; }
.bot-ava.big { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 17px; display: grid; place-items: center; font-size: 22px; color: #fff; background: linear-gradient(135deg, var(--c-btn), var(--c-violet)); box-shadow: 0 8px 24px color-mix(in srgb, var(--c-btn) 35%, transparent); }
.chat-welcome h2 { font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.chat-welcome p { max-width: 560px; margin: 8px auto 22px; color: var(--c-muted); line-height: 1.55; }
.welcome-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0 auto; text-align: left; }
.cab .welcome-cards a { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--c-line); background: var(--c-card); color: var(--c-text); transition: border-color .15s, transform .15s; }
.cab .welcome-cards a:hover { border-color: var(--c-line2); transform: translateY(-1px); }
.welcome-cards i { grid-row: span 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--c-accent-soft); color: var(--c-accent); font-size: 13px; }
.welcome-cards b { font-size: 13.5px; }
.welcome-cards span { color: var(--c-muted); font-size: 12px; }
.chat-more { text-align: center; margin: 4px 0 10px; }
.cab .chat-more a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; background: var(--c-card2); color: var(--c-muted); font-size: 12.5px; font-weight: 600; }
.chat-note { margin: 20px 0; text-align: center; color: var(--c-muted); }

/* Поле ввода: большое, со скруглением, круглая кнопка отправки и быстрые команды */
.composer { margin-top: 10px; padding: 8px 8px 8px 14px; border-radius: 22px; border: 1px solid var(--c-line2); background: var(--c-input); box-shadow: var(--c-shadow); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft), var(--c-shadow); }
.cab .composer textarea { display: block; width: 100%; height: 44px; min-height: 44px; max-height: 30vh; resize: none; border: none; box-shadow: none; background: transparent; padding: 10px 4px 4px; font-size: 14.5px; }
.cab .composer textarea:focus { box-shadow: none; }
.composer-row { display: flex; align-items: center; gap: 8px; }
.quick-chips { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.quick-chips::-webkit-scrollbar { display: none; }
.cab .quick-chips a { flex: none; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--c-line); color: var(--c-muted); font-size: 12px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.cab .quick-chips a:hover { background: var(--c-card2); color: var(--c-text); }
.cab .send-btn { flex: none; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: none; display: grid; place-items: center; background: var(--c-btn); color: #fff; font-size: 15px; box-shadow: 0 2px 10px color-mix(in srgb, var(--c-btn) 40%, transparent); }
.cab .send-btn:hover { background: var(--c-btn2); }
.fix-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 2px 0 2px -6px; padding: 7px 12px; border-radius: 14px; background: var(--c-warn-soft); color: var(--c-text); font-size: 13px; }
.fix-bar a { margin-left: auto; color: var(--c-muted) !important; }
.chat-foot { margin-top: 6px !important; text-align: center; color: var(--c-muted); font-size: 11.5px; }

/* Страница чата — на всю высоту окна: прокручивается только лента, поле ввода прибито к низу, у страницы прокрутки нет */
body.chat-page { height: 100vh; height: 100dvh; overflow: hidden; }
body.chat-page main { display: flex; flex-direction: column; min-height: 0; padding-bottom: 12px; }
body.chat-page .cab { flex: 1; min-height: 0; align-items: stretch; }
body.chat-page .cab-menu { align-self: start; }
body.chat-page .cab-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cab-body .panel.chat-panel { flex: 1; min-height: 0; margin: 0; padding: 12px 18px 10px; display: flex; flex-direction: column; background: var(--c-chat); }
.chat-panel > .chat-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; overflow: visible; margin: -2px -2px 6px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line); }
.chat-head-title { display: flex; align-items: center; gap: 11px; }
.chat-head-title .bot-ava { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--c-btn), var(--c-violet)); color: #fff; font-size: 15px; }
.chat-head-title b { display: block; font-size: 15px; }
.chat-head-title span { color: var(--c-muted); font-size: 12px; }
.chat-panel > .chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.chat-panel > .chat-bottom { flex: none; overflow: visible; }
.chat-head-tools { display: flex; gap: 6px; }
#pendBtn.active { background: var(--c-warn-soft); border-color: transparent; color: var(--c-warn); }
/* Фильтр «Ждут решения»: видны только сообщения с действиями, ждущими решения */
#chat.only-pending .msg:not(.pending) { display: none; }

@media screen and (max-width: 900px) {
    body.chat-page .cab { display: flex; flex-direction: column; }
    body.chat-page .cab-menu { align-self: stretch; margin-bottom: 10px; }
}

@media screen and (max-width: 480px) {
    .funnel-row { grid-template-columns: 84px minmax(0, 1fr) 34px 34px; gap: 8px; }
    .dyn-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .dyn-kpi > div:first-child { grid-column: span 2; }
    .chart { grid-template-rows: 150px auto; grid-template-columns: 28px minmax(0, 1fr); column-gap: 6px; }
    .set-grid { grid-template-columns: 1fr; }
    .msg { gap: 9px; font-size: 13.5px; }
    .msg-ava { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; }
    .msg-user .msg-body { max-width: 88%; }
    .act-draft { padding: 10px 12px; font-size: 13.5px; }
    .cab .act-btn { padding: 7px 12px; }
    .welcome-cards { grid-template-columns: 1fr; }
    .chat-welcome { padding-top: 2vh; }
    body.chat-page main { padding: 10px 10px 8px; }
    .cab-body .panel.chat-panel { padding: 10px 10px 6px; }
    .chat-head-title span, #pendBtn .pend-text, .chat-foot { display: none; }
}

/* Контент: кнопки у материала — в две строки, если не помещаются (выбор площадки + действие, отметка, удаление) */
.c-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; min-width: 150px; max-width: 230px; margin-left: auto; }
.c-actions select { flex: 1 1 120px; }

/* Стадия лида на дашборде — выпадающий список в виде чипа */
/* Стрелка ▾ справа — видно, что стадию можно раскрыть и поменять */
.cab select.lead-stage { width: auto; padding: 2px 22px 2px 9px; border: none; border-radius: 999px; font-size: 11px; font-weight: 600; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a94a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
.cab select.lead-stage, .cab select.lead-stage:focus { background-color: var(--c-card2); color: var(--c-muted); box-shadow: none; }
.cab select.lead-stage:hover { outline: 1px solid var(--c-line2); }
.cab select.lead-stage.ok { background-color: var(--c-ok-soft); color: var(--c-ok); }
.cab select.lead-stage.info { background-color: var(--c-accent-soft); color: var(--c-accent); }
.cab select.lead-stage.warn { background-color: var(--c-warn-soft); color: var(--c-warn); }
.cab select.lead-stage option { background: var(--c-card); color: var(--c-text); }

/* ===== Идеи заработка ===== */
.cab .panel.idea { flex-direction: row; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.cab .panel.idea > div { overflow: visible; }
.idea-score { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--c-card2); color: var(--c-muted); }
.idea-score.hi { background: var(--c-ok-soft); color: var(--c-ok); }
.idea-score.mid { background: var(--c-accent-soft); color: var(--c-accent); }
.idea-main { flex: 1; min-width: 0; }
.idea-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.idea-title { font-size: 15px; font-weight: 700; }
.idea-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 6px; color: var(--c-muted); font-size: 12.5px; }
.idea-facts i.fa-solid { margin-right: 3px; opacity: .8; }
.risk { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.risk i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-line2); }
.risk i.on.r1, .risk i.on.r2 { background: var(--c-ok); }
.risk i.on.r3 { background: var(--c-warn); }
.risk i.on.r4, .risk i.on.r5 { background: var(--c-bad); }
.cab .panel p.idea-problem { margin: 10px 0 0; color: var(--c-text); line-height: 1.55; }
.idea-more { margin-top: 10px; }
.cab .idea-more > summary { color: var(--c-accent); font-weight: 600; font-size: 13px; }
.idea-sec { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--c-card2); }
.idea-sec b { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-size: 12.5px; }
.idea-sec b i { color: var(--c-accent); }
.idea-sec > div { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.idea-actions { flex: none; display: flex; align-items: center; gap: 4px; }
.cab .idea-actions select { width: auto; padding: 5px 10px; font-size: 12.5px; }
@media screen and (max-width: 600px) {
    .cab .panel.idea { flex-wrap: wrap; gap: 12px; }
    .idea-score { width: 40px; height: 40px; font-size: 15px; border-radius: 12px; }
    .idea-main { flex-basis: calc(100% - 56px); }
    .idea-actions { width: 100%; justify-content: flex-end; }
}
/* ===== Подписка (этап 10) ===== */
.cab a.cab-sub { color: var(--c-muted); }
.cab a.cab-sub.bad { color: var(--c-bad); }
.cab a.cab-sub:hover { filter: brightness(.97); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid var(--c-line); background: var(--c-card2); }
.plan.hl { border-color: color-mix(in srgb, var(--c-btn) 45%, var(--c-line)); background: var(--c-accent-soft); }
.plan > b { font-size: 15px; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.plan-price span { font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-price span.gray { font-size: 15px; font-weight: 600; color: var(--c-muted); }
.plan small { color: var(--c-muted); font-size: 12px; }
.plan-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.plan-btns .btn { flex: 1 1 110px; }
.ref-link { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 8px; }
.ref-link span { color: var(--c-muted); font-size: 12.5px; }
.cab .ref-link input { font-size: 12.5px; }
@media screen and (max-width: 700px) {
    .plans { grid-template-columns: 1fr; }
    .ref-link { grid-template-columns: minmax(0, 1fr) auto; }
    .ref-link span { grid-column: 1 / -1; }
}
/* Главная (лендинг): то, чего нет в общем ui.css — живой значок в демо, полоса фактов, площадки, «один день», инструкция */
.land-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--c-ok); }
.land-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-ok) 60%, transparent); animation: land-pulse 1.8s infinite; }
@keyframes land-pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.land-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: 18px; background: var(--c-line); border: 1px solid var(--c-line); box-shadow: var(--c-shadow); }
.land-facts > div { padding: 18px 20px; background: var(--c-card); }
.land-facts b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(90deg, var(--c-accent), var(--c-violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.land-facts span { color: var(--c-muted); font-size: 13.5px; }
.land-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.land-platforms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.land-platforms > div { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--c-card); border: 1px solid var(--c-line); }
.land-platforms i { grid-row: span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--c-accent-soft); color: var(--c-accent); font-size: 16px; }
.land-platforms b { font-size: 14.5px; }
.land-platforms span { color: var(--c-muted); font-size: 12.5px; line-height: 1.35; }
.land-more { margin-top: 22px; text-align: center; }
.land-day { position: relative; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.land-day::before { content: ""; position: absolute; left: 107px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--c-accent), var(--c-violet)); opacity: .35; }
.land-day-item { position: relative; display: grid; grid-template-columns: 82px 38px minmax(0, 1fr); gap: 14px; align-items: center; }
.land-day-item .t { text-align: right; font-weight: 800; font-size: 14px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.land-day-item > i { z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--c-btn), var(--c-violet)); box-shadow: 0 0 0 4px var(--c-bg); }
.land-day-item > div { padding: 12px 16px; border-radius: 14px; background: var(--c-card); border: 1px solid var(--c-line); }
.land-day-item b { display: block; font-size: 15px; }
.land-day-item p { margin-top: 2px; color: var(--c-muted); font-size: 13.5px; }
.land-faq a, .guide a.inl { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; }
.site-foot a + a { margin-left: 16px; }
@media screen and (max-width: 1000px) {
    .land-grid.four, .land-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .land-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 640px) {
    .land-grid.four, .land-platforms { grid-template-columns: 1fr; }
    .land-facts b { font-size: 22px; }
    .land-facts > div { padding: 14px; }
    .land-day::before { left: 19px; }
    .land-day-item { grid-template-columns: 38px minmax(0, 1fr); }
    .land-day-item .t { grid-column: 2; grid-row: 1; text-align: left; font-size: 12.5px; margin-bottom: -10px; }
    .land-day-item > i { grid-row: 1 / span 2; }
}
/* Инструкция /guide: содержание слева (прилипает), шаги с номерами и «Где» / «Готово, если» */
.guide { max-width: 1120px; margin: 0 auto; padding: 28px 0 10px; font-size: 15px; }
.guide-head { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.guide-head h1 { margin: 14px 0 12px; font-size: 38px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; }
.guide-head p { margin-bottom: 20px; color: var(--c-muted); font-size: 16.5px; line-height: 1.6; }
.guide-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.guide-toc { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 16px; background: var(--c-card); border: 1px solid var(--c-line); }
.guide-toc b { margin-bottom: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.guide-toc a { padding: 6px 10px; border-radius: 9px; font-size: 14px; color: var(--c-text); }
.guide-toc a:hover { background: var(--c-accent-soft); color: var(--c-accent); }
.guide-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.guide-body > section { scroll-margin-top: 72px; }
.guide-card { padding: 22px 24px; border-radius: 18px; background: var(--c-card); border: 1px solid var(--c-line); box-shadow: var(--c-shadow); }
.guide-card h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.guide-card h2 > i { color: var(--c-accent); }
.guide-card h2 .chip { font-size: 12px; font-weight: 600; letter-spacing: 0; }
.guide-card p { line-height: 1.6; }
.guide-card p + p { margin-top: 8px; }
.guide-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.guide-num { width: 44px; height: 44px; display: grid; place-items: center; margin-top: 14px; border-radius: 14px; font-size: 18px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--c-btn), var(--c-violet)); box-shadow: var(--c-shadow); }
.guide-list { margin: 10px 0 0 20px; display: flex; flex-direction: column; gap: 7px; line-height: 1.55; }
ul.guide-list { list-style: disc; }
.guide-where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.guide-where > span { color: var(--c-muted); font-size: 13px; font-weight: 700; }
.guide-tip, .guide-ok { position: relative; margin-top: 12px; padding: 11px 14px 11px 40px; border-radius: 12px; font-size: 14px; line-height: 1.55; }   /* не flex: текст с <b> внутри разъезжался по колонкам */
.guide-tip > i, .guide-ok > i { position: absolute; left: 15px; top: 14px; margin: 0 !important; }
.guide-tip { background: var(--c-accent-soft); }
.guide-tip > i { color: var(--c-accent); }
.guide-ok { background: var(--c-ok-soft); }
.guide-ok > i { color: var(--c-ok); }
.guide-btns { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.guide-btns > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 14px; color: var(--c-muted); }
.guide-btns span { text-align: center; padding: 6px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--c-text); background: var(--c-card2); border: 1px solid var(--c-line); }
.guide-btns span.go { background: var(--c-ok-btn); border-color: transparent; color: #fff; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.guide-grid a { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--c-card2); border: 1px solid var(--c-line); color: var(--c-text); transition: border-color .15s; }
.guide-grid a:hover { border-color: var(--c-accent); }
.guide-grid i { color: var(--c-accent); font-size: 17px; margin-bottom: 4px; }
.guide-grid span { color: var(--c-muted); font-size: 13px; line-height: 1.45; }
.guide-dict { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px 16px; line-height: 1.55; }
.guide-dict dt { font-weight: 700; }
.guide-dict dd { color: var(--c-muted); }
.guide-faq { max-width: none; }
.guide .land-final { margin: 8px 0 30px; }
@media screen and (max-width: 900px) {
    .guide-wrap { grid-template-columns: minmax(0, 1fr); }
    .guide-toc { position: static; flex-direction: row; flex-wrap: wrap; }
    .guide-toc b { width: 100%; }
    .guide-toc a { padding: 4px 9px; font-size: 13px; background: var(--c-card2); }
    .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 560px) {
    .guide { padding-top: 14px; }
    .guide-head h1 { font-size: 27px; }
    .guide-head p { font-size: 15px; }
    .guide-step { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .guide-num { width: 36px; height: 36px; margin: 0 0 -18px 16px; position: relative; z-index: 1; border-radius: 11px; font-size: 15px; }
    .guide-step .guide-card { padding-top: 26px; }
    .guide-card { padding: 18px 16px; }
    .guide-grid, .guide-dict { grid-template-columns: minmax(0, 1fr); }
    .guide-dict dd { margin-bottom: 6px; }
    .guide-btns > div { grid-template-columns: 96px minmax(0, 1fr); }
}

/* Дашборд: «Первые шаги» новичка */
.onboard-bar { height: 6px; margin: 2px 0 12px; border-radius: 99px; background: var(--c-card2); overflow: hidden; }
.onboard-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--c-btn), var(--c-violet)); }
.onboard-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.onboard-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 13px; border: 1px solid var(--c-line); background: var(--c-card2); color: var(--c-text); transition: border-color .15s; }
.onboard-step:hover { border-color: var(--c-accent); }
.onboard-step b { display: block; font-size: 14px; }
.onboard-step small { display: block; margin-top: 3px; color: var(--c-muted); font-size: 12.5px; line-height: 1.4; }
.onboard-mark { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; background: var(--c-accent-soft); color: var(--c-accent); }
.onboard-step.done { opacity: .65; }
.onboard-step.done .onboard-mark { background: var(--c-ok-soft); color: var(--c-ok); }
.onboard-step.done b { text-decoration: line-through; text-decoration-color: var(--c-muted); }