/* Оболочка «Когнитех Хаб» по макетам очереди 1. Все цвета — только через токены (tokens.css). */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 14px/18px var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: var(--accent-ink); text-decoration: none; }
[hidden] { display: none !important; }
.sr { position: absolute; left: -9999px; }
.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }
.icon-20 { width: 20px; height: 20px; }
.icon-18 { width: 18px; height: 18px; }
.icon-16 { width: 16px; height: 16px; }
.icon-14 { width: 14px; height: 14px; }
.icon-12 { width: 12px; height: 12px; }

/* ── каркас ─────────────────────────────────────────────────────────────── */
.app { min-height: 100%; display: flex; flex-direction: column; }
.content { flex: 1; padding: 16px 20px 100px; max-width: 480px; width: 100%; margin: 0 auto; }
.content.with-fab { padding-bottom: 172px; }
.content.wide { max-width: none; }
.topbar { display: none; }
.sidebar { display: none; }

/* таб-бар 84: padding-top 6, иконка 24, подпись 10/12 weight 500 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 84px; background: var(--surface);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 0 0; z-index: 20;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--tab-inactive); min-height: 44px; font-size: 10px; line-height: 12px; font-weight: 500; }
.tab[aria-current="page"] { color: var(--ink); }
.tab .icon { width: 24px; height: 24px; }
.tab.center { position: relative; }
.tab.center .fab {
  position: absolute; top: -22px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-accent);
}
.tab.center .fab .icon { width: 24px; height: 24px; }
.tab.center span { margin-top: 36px; }

/* ── кнопки и поля ──────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 16px; border-radius: var(--r12); font-size: 16px; font-weight: 500; width: 100%; }
.btn.h48 { height: 48px; font-size: 14px; }
.btn.h44 { height: 44px; font-size: 14px; border-radius: var(--r8); }
.btn.h40 { height: 40px; font-size: 14px; border-radius: var(--r8); }
.btn.h36 { height: 36px; font-size: 14px; border-radius: var(--r8); }
.btn.accent { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.btn.accent:hover { background: var(--accent-hover); }
.btn.ink { background: var(--ink); color: var(--surface); }
.btn.field { background: var(--field); color: var(--ink); }
.btn.surface { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost { background: none; color: var(--ink-2); height: 44px; }
.btn.link { background: none; color: var(--accent-ink); height: 44px; font-size: 14px; }
.btn.warnlight { background: var(--white-60); color: var(--ink); }
.btn:disabled { opacity: .6; cursor: default; }
.btn .ya { width: 22px; height: 22px; border-radius: 50%; background: var(--yandex); color: var(--on-navy-strong); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.btn .tg { width: 22px; height: 22px; border-radius: 50%; background: var(--telegram); color: var(--on-navy-strong); display: inline-flex; align-items: center; justify-content: center; }
.btn .tg svg { display: block; margin-right: 1px; }
.btn .vk { width: 22px; height: 22px; border-radius: 50%; background: var(--vk); color: var(--on-navy-strong); display: inline-flex; align-items: center; justify-content: center; }
.btn .vk svg { display: block; }
.iconbtn { width: 44px; height: 44px; border-radius: var(--r12); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); border: 1px solid var(--line); background: var(--surface); position: relative; }
.iconbtn.plain { border: 0; background: none; }
.iconbtn .dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.field-label { font-size: 12px; line-height: 14px; color: var(--ink-2); margin: 0 0 6px; display: block; }
.input { width: 100%; height: 52px; border-radius: var(--r12); border: 1px solid var(--line); background: var(--surface); padding: 0 16px; font-size: 16px; outline: none; }
.input:focus { border-color: var(--accent-border); }
.input.err { border-color: var(--err); }
.err-text { color: var(--err); font-size: 12px; line-height: 16px; margin: 6px 0 0; }
.hint { color: var(--ink-2); font-size: 12px; line-height: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }

/* типографика */
.h-screen { font-size: 24px; line-height: 30px; font-weight: 500; margin: 0; }
.h-big { font-size: 33px; line-height: 40px; font-weight: 500; margin: 0; letter-spacing: -.01em; }
.h-card { font-size: 20px; line-height: 24px; font-weight: 500; margin: 0; }
.h-sub { font-size: 16px; line-height: 20px; font-weight: 500; margin: 0; }
.lead { font-size: 16px; line-height: 24px; color: var(--ink-2); margin: 0; }
.text { font-size: 14px; line-height: 22px; color: var(--ink-2); margin: 0; }
.text.ink { color: var(--ink); }
.caption { font-size: 12px; line-height: 14px; color: var(--ink-2); }
.section-h { font-size: 12px; line-height: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 20px 0 8px; }
.logo { font-size: 20px; line-height: 24px; font-weight: 600; letter-spacing: -.02em; }
.back { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; margin-left: -10px; color: var(--ink); }

/* карточки */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r16); box-shadow: var(--shadow-card); }
.card.pad { padding: 14px 16px; }
.plate { border-radius: var(--r12); padding: 14px; }
.plate.warn { background: var(--warn-soft); color: var(--warn-ink); }
.plate.ok { background: var(--ok-soft); color: var(--ok-ink); }
.plate.soft { background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r16); padding: 14px 16px; }
.plate.field { background: var(--field); color: var(--ink-2); }
.plate .t { font-size: 14px; line-height: 18px; font-weight: 500; margin: 0 0 4px; }
.plate p { font-size: 14px; line-height: 20px; margin: 0; }
.plate.warn .row-head { display: flex; gap: 10px; align-items: flex-start; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-border); border-top-color: var(--accent); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: var(--field); border-radius: var(--r12); min-height: 64px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.empty { text-align: center; padding: 48px 16px 24px; }
.empty .circle { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.empty .circle.big { width: 72px; height: 72px; }
.empty .circle.ok { background: var(--ok-soft); color: var(--ok-ink); }
.empty h2 { font-size: 20px; line-height: 24px; font-weight: 500; margin: 0 0 8px; }
.empty p { font-size: 14px; line-height: 22px; color: var(--ink-2); margin: 0; }

/* сегмент-переключатель: field r12, padding 3, сегмент 38 r9, активный surface + тень */
.segment { display: inline-flex; background: var(--field); border-radius: var(--r12); padding: 3px; }
.segment button { height: 38px; padding: 0 16px; border-radius: var(--r9); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.segment button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-segment); }

/* чипы */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r8); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.task { background: var(--accent-soft); color: var(--accent-ink); }
.chip.once { background: var(--warn-soft); color: var(--warn-ink); }
.chip.daily { background: var(--ok-soft); color: var(--ok-ink); }
.chip.goal { background: var(--ink); color: var(--surface); }
.chip.step { background: var(--field); color: var(--ink-2); }
.chip.model { height: 36px; padding: 0 10px 0 12px; background: var(--field); color: var(--ink); font-size: 14px; }
.pill { height: 44px; padding: 0 16px; border-radius: var(--r22); border: 1px solid var(--line); background: var(--field); font-size: 14px; font-weight: 500; }
.state { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r8); background: var(--field); font-size: 12px; font-weight: 500; color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.run { background: var(--accent); } .dot.wait { background: var(--warn); } .dot.done { background: var(--ok); } .dot.broken { background: var(--err); }
.dot.ok { background: var(--ok); } .dot.fail { background: var(--warn); } .dot.grey { background: var(--ink-3); }
.toggle { width: 32px; height: 18px; border-radius: 9px; background: var(--ink-3); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"]::after { transform: translateX(14px); }
.hit { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* ── Главная ────────────────────────────────────────────────────────────── */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.greet { font-size: 24px; line-height: 30px; margin: 0; font-weight: 400; }
.greet .name { color: var(--ink); font-weight: 500; }
.greet .hi { color: var(--ink-2); }
.date { color: var(--ink-2); font-size: 14px; margin: 4px 0 0; }
.counters3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.counter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r16); padding: 14px; text-align: left; box-shadow: var(--shadow-card); min-height: 44px; }
.counter .v { font-size: 24px; line-height: 28px; font-weight: 500; }
.counter.wait .v { color: var(--accent-ink); }
.counter .l { font-size: 12px; line-height: 14px; color: var(--ink-2); margin-top: 6px; }
.feed { margin-top: 8px; }
.feed-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--rule); }
.feed-row:first-child { border-top: 0; }
.feed-row .dot { margin-top: 5px; }
.feed-row .txt { flex: 1; font-size: 14px; line-height: 18px; }
.feed-row .time { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.ask-fab { position: fixed; left: 20px; right: 20px; bottom: 100px; z-index: 15; max-width: 440px; margin: 0 auto; }
.ask-fab .btn { box-shadow: var(--shadow-accent); }

/* Пульт */
.filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.filter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); padding: 10px; text-align: left; box-shadow: var(--shadow-card); min-height: 44px; }
.filter[aria-pressed="true"] { border: 2px solid var(--accent); padding: 9px; }
.filter .v { font-size: 20px; line-height: 24px; font-weight: 500; }
.filter.broken .v { color: var(--err); }
.filter .l { font-size: 12px; line-height: 14px; color: var(--ink-2); margin-top: 2px; }
.goal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); padding: 12px 14px; box-shadow: var(--shadow-card); margin-bottom: 8px; }
.goal-card .head { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 18px; font-weight: 500; }
.step-row { display: flex; align-items: center; gap: 10px; padding: 10px 0 0; margin-top: 10px; border-top: 1px solid var(--rule); min-height: 44px; }
.step-row .n { width: 14px; font-size: 12px; color: var(--ink-3); }
.step-row .t { flex: 1; font-size: 14px; line-height: 18px; }
.step-row .d { font-size: 12px; color: var(--ink-2); }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); padding: 12px 14px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.tcard .title { font-size: 14px; line-height: 18px; font-weight: 500; display: flex; align-items: flex-start; gap: 8px; }
.tcard .title .grow { flex: 1; }
.tcard .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.tcard .meta .due { font-size: 12px; color: var(--ink-2); }
.tcard .foot { display: flex; align-items: center; gap: 8px; }
.tcard .broken-box { border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 2px; }
.tcard .reason { color: var(--err); font-size: 12px; line-height: 16px; margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard.dragging { transform: rotate(-2deg); box-shadow: var(--shadow-drag); opacity: .95; }
.tcard .delivered { font-size: 12px; color: var(--ok-ink); }
.state-menu { position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); box-shadow: var(--shadow-drag); padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.state-menu button { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px; border-radius: var(--r8); font-size: 14px; font-weight: 500; text-align: left; }
.state-menu button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.state-menu button:hover { background: var(--field); }
.board { display: none; }
.pult-list .tcard { margin-bottom: 8px; }
.tcard .meta .due.late, .day-row .due.late { color: var(--err); }

/* Пульт → «День» (Р3): лента встреч и дел, дело одной строкой */
.quick-add { display: flex; gap: 8px; margin: 0 0 12px; }
.quick-add .input { flex: 1; min-width: 0; height: 44px; font-size: 14px; }
.quick-add .btn { width: auto; flex: none; padding: 0 14px; gap: 6px; }
.cal-hint { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 14px; line-height: 18px; text-decoration: none; }
.day-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.day-sec .section-h .n { color: var(--ink-3); margin-left: 4px; }
.day-sec.late .section-h { color: var(--err); }
.day-sec.nodue summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.day-sec.nodue summary::-webkit-details-marker { display: none; }
.day-empty { padding: 8px 2px 4px; }
.day-row { display: flex; flex-direction: row; border: 1px solid var(--line); border-radius: var(--r12); align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 6px; }
.day-row .t-time { width: 64px; flex: none; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.day-row .t-end { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.day-row .day-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: inherit; text-decoration: none; }
.day-row .day-main .title { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; line-height: 18px; font-weight: 500; }
.day-row .day-main .meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--ink-2); }
.day-row .state { flex: none; }
.day-row.is-done .title .grow { text-decoration: line-through; color: var(--ink-3); }
.day-row.ev { background: var(--field); border-color: transparent; box-shadow: none; }
.day-row.ev .title .icon { color: var(--accent-ink); margin-top: 1px; flex: none; }
.day-row.ev.free { opacity: .7; }
.now-line { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: 11px; color: var(--accent-ink); }
.now-line::before, .now-line::after { content: ""; height: 1px; background: var(--accent); flex: 1; }
.now-line::before { flex: 0 0 64px; }
.mob-views { display: flex; margin: 0 0 12px; }
@media (max-width: 1023px) {
  .day-row .st-word { display: none; }
  .day-row .t-time { width: 44px; }
  .quick-add .btn span { display: none; }
}

/* ── Чат ────────────────────────────────────────────────────────────────── */
.chat-wrap { position: fixed; inset: 0 0 84px 0; display: flex; flex-direction: column; background: var(--surface); }
.chat-head { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: 16px; flex: none; }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .name { font-size: 16px; line-height: 20px; font-weight: 500; }
.chat-head .status { font-size: 12px; line-height: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.chat-head .status.online { color: var(--ok-ink); }
.chat-frame { flex: 1; border: 0; width: 100%; background: var(--surface); }
#chatDock { position: fixed; z-index: 2; display: flex; background: var(--surface); }
#chatDock[hidden] { display: none; }
#chatDock .chat-frame { width: 100%; height: 100%; }
.money-bar { background: var(--warn-soft); color: var(--warn-ink); padding: 10px 20px; display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 18px; }
.money-bar b { font-weight: 500; white-space: nowrap; }
.chat-block { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }

/* ── Ещё ─────────────────────────────────────────────────────────────────── */
.profile { display: flex; align-items: center; gap: 12px; padding: 16px; }
.profile .av { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 18px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
.profile .nm { font-size: 16px; line-height: 20px; font-weight: 500; }
.profile .em { font-size: 12px; color: var(--ink-2); margin-top: 2px; word-break: break-all; }
.badge { height: 32px; padding: 0 10px; border-radius: var(--r8); background: var(--warn-soft); color: var(--warn-ink); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok-ink); }
.menu { padding: 0; margin: 12px 0 0; }
.menu-row { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-top: 1px solid var(--rule); width: 100%; text-align: left; font-size: 14px; font-weight: 500; color: var(--ink); }
.menu-row:first-child { border-top: 0; }
.menu-row .val { color: var(--ink-2); font-weight: 400; font-size: 12px; }
.menu-row .icon { color: var(--ink-3); }
.list-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 18px; }
.list-row:first-child { border-top: 0; }
.list-row .sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.radio-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--rule); width: 100%; text-align: left; }
.radio-row:first-child { border-top: 0; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink-3); flex: none; margin-top: 1px; position: relative; }
.radio[aria-checked="true"] { border-color: var(--accent); }
.radio[aria-checked="true"]::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.detail-table { border: 1px solid var(--line); border-radius: var(--r12); overflow: hidden; }
.detail-row { display: grid; grid-template-columns: 96px 1fr; padding: 10px 12px; border-top: 1px solid var(--rule); font-size: 14px; }
.detail-row:first-child { border-top: 0; }
.detail-row .k { color: var(--ink-2); }
.terms-box { background: var(--ground); border: 1px solid var(--line); border-radius: var(--r16); padding: 4px 16px; }
.terms-item { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 14px; line-height: 22px; }
.terms-item:first-child { border-top: 0; }
.terms-item .n { color: var(--accent); font-weight: 500; }

/* Telegram */
.phrase-box { background: var(--ground); border: 1px solid var(--line); border-radius: var(--r16); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.words { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.word { height: 44px; padding: 0 14px; border-radius: var(--r12); background: var(--surface); border: 1px solid var(--line); font-size: 20px; font-weight: 500; display: inline-flex; align-items: center; }
.status-line { display: flex; align-items: center; gap: 10px; background: var(--field); border-radius: var(--r12); padding: 12px 14px; font-size: 14px; color: var(--ink-2); }

/* контракт */
.contract { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r16); overflow: hidden; }
.contract.pending { border-color: var(--warn-soft); }
.contract .head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.contract.pending .head { background: var(--warn-soft); color: var(--warn-ink); }
.contract .head .ic { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--warn-soft); color: var(--warn-ink); }
.contract .body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.contract .foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.contract .foot .btn { width: auto; }
.contract .foot .btn.accent { flex: 1; }
.irrev { display: flex; align-items: center; gap: 8px; background: var(--warn-soft); color: var(--warn-ink); border-radius: var(--r8); padding: 10px 12px; font-size: 14px; font-weight: 500; }

/* Вход. Одна разметка на все ширины: до 1024 — колонкой, витрина сверху;
   от 1024 — две колонки, тёмная витрина слева. */
.login { min-height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 24px 20px 20px; max-width: 480px; margin: 0 auto; }
.login .hero { display: flex; flex-direction: column; gap: 18px; }
.login .hero h1 { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -.01em; margin: 0; }
.login .hero-body { display: flex; flex-direction: column; gap: 14px; }
.login .hero-lead { font-size: 15px; line-height: 22px; color: var(--ink-2); margin: 0; }
.login .hero-demo { background: var(--navy); color: var(--on-navy-strong); border-radius: var(--r16); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.login .hero-demo .me { align-self: flex-end; max-width: 88%; background: var(--white-14); border-radius: 12px 12px 4px 12px; padding: 10px 12px; font-size: 13px; line-height: 18px; }
.login .hero-demo .ans { background: var(--white-08); border: 1px solid var(--white-14); border-radius: var(--r12); padding: 10px 12px; font-size: 13px; line-height: 18px; }
.login .hero-demo .ok { display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 500; color: var(--on-navy); margin-bottom: 6px; }
.login .hero-foot { display: none; }
.login .gate { display: flex; flex-direction: column; }
.login.sub .hero { display: none; }
.login.sub { justify-content: flex-start; }
.login .gate-box { display: flex; flex-direction: column; }
.login .gate-title { font-size: 20px; line-height: 24px; font-weight: 500; margin: 0; }
.login .gate-sub { font-size: 14px; line-height: 20px; color: var(--ink-2); margin: 4px 0 16px; }
.login .gate-new { font-size: 14px; line-height: 20px; color: var(--ink-2); margin: 14px 0 0; text-align: center; }
.login .gate-legal { font-size: 12px; line-height: 16px; color: var(--ink-2); margin: 20px 0 0; text-align: center; }
.login .or { margin: 12px 0; }
.linkish { color: var(--accent-ink); font-weight: 500; background: none; }
.trust { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.trust li { position: relative; padding-left: 18px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.trust li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.onboard { position: fixed; inset: 0; background: var(--navy); color: var(--on-navy-strong); padding: 24px 20px; display: flex; flex-direction: column; z-index: 40; }
.onboard::before { content: ""; position: absolute; left: 50%; top: 60%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(circle, var(--accent) 0%, transparent 65%); opacity: .7; pointer-events: none; }
.onboard > * { position: relative; }
.onboard .bubble { background: var(--white-10); border: 1px solid var(--white-14); border-radius: var(--r12); padding: 12px 16px; margin-top: auto; font-size: 14px; line-height: 20px; }
.onboard .bubble .cap { font-size: 12px; color: var(--on-navy); margin-bottom: 6px; }
.onboard h1 { font-size: 33px; line-height: 40px; font-weight: 500; margin: 24px 0 8px; }
.onboard p { font-size: 16px; line-height: 24px; color: var(--on-navy); margin: 0; }
.onboard .dots { display: flex; gap: 6px; margin: 20px 0 24px; }
.onboard .dots i { width: 24px; height: 4px; border-radius: 2px; background: var(--white-14); }
.onboard .dots i.on { background: var(--on-navy-strong); }
.onboard .btn.surface { background: var(--surface); color: var(--ink); border: 0; }
.onboard .btn.later { color: var(--on-navy); }

/* уведомления, журнал, баланс */
.notif-row { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--rule); align-items: flex-start; }
.notif-row:first-child { border-top: 0; }
.notif-row .txt { flex: 1; font-size: 14px; line-height: 18px; }
.notif-row .time { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.balance-big { font-size: 33px; line-height: 40px; font-weight: 500; }
.balance-big.unknown { color: var(--ink-3); }
.toast { position: fixed; left: 20px; right: 20px; bottom: 100px; background: var(--ink); color: var(--surface); border-radius: var(--r12); padding: 12px 16px; font-size: 14px; z-index: 50; max-width: 440px; margin: 0 auto; box-shadow: var(--shadow-drag); }
.offline { position: fixed; top: 0; left: 0; right: 0; background: var(--field); color: var(--ink-2); font-size: 12px; text-align: center; padding: 6px; z-index: 60; }

/* ── Баланс и Мои данные (12a–12e) ──────────────────────────────────────── */
.bal-grid { display: flex; flex-direction: column; gap: 16px; }
.bal-side { display: flex; flex-direction: column; }
.bal-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.bal-topup { border-top: 1px solid var(--rule); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.topup-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 28px; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--ink); text-align: left; }
.topup-head .icon { color: var(--ink-2); transition: transform .15s; }
.topup-head[aria-expanded="true"] .icon { transform: rotate(180deg); }
.topup-box { display: flex; flex-direction: column; gap: 10px; }
.amt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.amt { height: 44px; border-radius: var(--r12); background: var(--field); color: var(--ink); font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.amt.on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 2px var(--accent); }
.pay-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--rule); min-height: 52px; }
.pay-row:first-child { border-top: 0; }
.pay-row .nm { font-size: 14px; line-height: 18px; font-weight: 500; }
.pay-row .sub { font-size: 12px; line-height: 16px; color: var(--ink-2); margin-top: 2px; }
.pay-state { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r8); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pay-state .dot { width: 8px; height: 8px; border-radius: 4px; background: currentColor; }
.pay-state.wait { background: var(--warn-soft); color: var(--warn-ink); }
.pay-state.ok { background: var(--ok-soft); color: var(--ok-ink); }
.pay-state.err { background: var(--err-soft); color: var(--err); }
.data-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 0 6px 0 16px; min-height: 52px; border-top: 1px solid var(--rule); }
.data-row:first-child { border-top: 0; }
.data-row.off { opacity: .5; }
.data-row .grow { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }
.data-row .nm { font-size: 14px; line-height: 18px; font-weight: 500; color: var(--ink); }
.data-row .nm.err { color: var(--err); }
.data-row .sub { font-size: 12px; line-height: 16px; color: var(--ink-2); }
.data-row .icon { color: var(--ink-3); width: 44px; height: 44px; padding: 14px; box-sizing: content-box; flex: none; }
.data-status { display: flex; align-items: center; gap: 8px; margin: 0 16px 12px; padding: 8px 10px; border-radius: var(--r8); background: var(--field); font-size: 12px; line-height: 16px; color: var(--ink-2); }
.data-status .icon { color: var(--ok); flex: none; }

/* ── Карточка дела (7a–7d) ──────────────────────────────────────────────── */
.chip.big { height: 24px; }
.segment.small { padding: 2px; border-radius: var(--r8); }
.segment.small button { height: 28px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.detail-row span:last-child { display: flex; align-items: center; gap: 6px; }
.card-screen .detail-table { margin-top: 4px; }
.notes .note { padding: 12px 14px; border-top: 1px solid var(--rule); }
.notes .note:first-child { border-top: 0; }
.notes .note .who { font-size: 12px; font-weight: 500; }
.notes .note p { margin: 4px 0 0; font-size: 14px; line-height: 22px; white-space: pre-wrap; word-break: break-word; }
.note-form { display: flex; align-items: center; gap: 6px; margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); padding: 0 6px 0 0; height: 52px; }
.note-form .input { border: 0; background: none; height: 50px; flex: 1; font-size: 14px; }
.turn-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r8); background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; line-height: 16px; margin-top: 8px; }
.turn-row.done { background: var(--field); color: var(--ink-2); }
.turn-row .icon { color: var(--ok); }
.delegate-bar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 16px; border-radius: var(--r12); background: var(--field); font-size: 16px; font-weight: 500; }
.delegate-bar .btn { width: auto; }
.ask-fab.delegate { max-width: 440px; }
.content.card-screen { padding-bottom: 180px; }
.tcard.open { box-shadow: 0 0 0 2px var(--accent); }
.tcard { cursor: pointer; }
.spinner.small { width: 12px; height: 12px; }

/* ── Документы (11a–11e) ────────────────────────────────────────────────── */
.doc-list { padding: 0; }
.doc-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 14px; border-top: 1px solid var(--rule); text-align: left; color: var(--ink); }
.doc-row:first-child { border-top: 0; }
.doc-row .nm { display: block; font-size: 14px; line-height: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-row .sub { display: block; font-size: 12px; line-height: 14px; color: var(--ink-2); margin-top: 2px; }
.doc-row .icon:first-child { color: var(--ink-2); }
.doc-row.selected { background: var(--accent-soft); }
.doc-row .hit { color: var(--ink-2); }
.chip.studied { height: 24px; background: var(--ok-soft); color: var(--ok-ink); }
.chip.studying { height: 24px; background: var(--accent-soft); color: var(--accent-ink); }
.chip.archived { height: 24px; background: var(--field); color: var(--ink-2); }
.desk-only { display: none !important; }
.sheet-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 45; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); border-radius: 16px 16px 0 0; padding: 16px 20px 32px; width: 100%; max-width: 480px; }
.docs-grid { display: block; }


/* ── Боты: список и BotCard (8a–8d, 13b) ────────────────────────────────── */
.bots-list { display: flex; flex-direction: column; gap: 10px; }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); padding: 12px 14px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 10px; }
.bcard .nm { font-size: 16px; line-height: 20px; font-weight: 500; color: var(--ink); }
.bcard .sub { font-size: 12px; line-height: 14px; color: var(--ink-2); margin-top: 2px; }
.bcard .hit { width: 44px; height: 44px; margin: -12px -8px -12px 0; }
.bstate { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r8); font-size: 12px; font-weight: 500; white-space: nowrap; }
.bstate .dot { background: currentColor; }
.bstate.active { background: var(--ok-soft); color: var(--ok-ink); }
.bstate.waiting { background: var(--warn-soft); color: var(--warn-ink); }
.bstate.scheduled { background: var(--accent-soft); color: var(--accent-ink); }
.bstate.error { background: var(--err-soft); color: var(--err); }
.bstate.paused { background: var(--field); color: var(--ink-2); }
.berr { border-top: 1px solid var(--rule); padding-top: 10px; }
.berr p { color: var(--err); font-size: 12px; line-height: 16px; margin: 0 0 8px; }
.bvoice { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r8); padding: 8px 12px; font-size: 14px; line-height: 18px; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-height: 44px; box-shadow: var(--shadow-card); }
.tpl .nm { font-size: 14px; line-height: 18px; font-weight: 500; }
.tpl .sub { font-size: 12px; line-height: 16px; color: var(--ink-2); }
.tpl-list { display: none; }
.bots-grid .builds { margin-top: 8px; }
.bots-page .h-screen { margin: 0; }

/* конструктор (9a–9e) */
.wiz-head { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.wiz-nav { display: inline-flex; align-items: center; min-width: 44px; height: 44px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.wiz-nav.accent { color: var(--accent-ink); }
.wiz-step { font-size: 14px; font-weight: 500; }
.wiz-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.wiz-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.wiz-top { display: none; }
.tchip { height: 36px; padding: 0 12px; border-radius: var(--r8); background: var(--field); color: var(--ink); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.tchip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-border); }
.tchip.static b { font-weight: 500; }
.tchip.static { color: var(--ink-2); }
.tchip .dot.trigger { background: var(--ink); } .tchip .dot.action { background: var(--accent); } .tchip .dot.condition { background: var(--warn); } .tchip .dot.ask { background: var(--accent-border); } .tchip .dot.notify { background: var(--ok); }
.chip.trigger { background: var(--ink); color: var(--surface); } .chip.action { background: var(--accent-soft); color: var(--accent-ink); } .chip.condition { background: var(--warn-soft); color: var(--warn-ink); } .chip.ask { background: var(--accent-border); color: var(--on-navy-strong); } .chip.notify { background: var(--ok-soft); color: var(--ok-ink); }
.canvas { position: relative; }
.chain { display: flex; flex-direction: column; align-items: stretch; }
.node { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); padding: 10px 6px 10px 4px; display: flex; align-items: flex-start; gap: 4px; box-shadow: var(--shadow-card); }
.node .handle { color: var(--ink-3); cursor: grab; }
.node .grow { padding-top: 4px; }
.node .ntext { width: 100%; border: 0; background: none; resize: vertical; font-size: 14px; line-height: 20px; margin-top: 6px; padding: 0; outline: none; min-height: 40px; }
.node.dragging { opacity: .6; } .node.over { box-shadow: 0 0 0 2px var(--accent); }
.nlink { width: 2px; height: 16px; background: var(--line); margin: 0 auto; }
.add-step { margin-top: 12px; border: 1px dashed var(--accent-border); background: var(--accent-soft); color: var(--accent-ink); }
.palette { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wiz-foot { position: fixed; left: 20px; right: 20px; bottom: 20px; max-width: 440px; margin: 0 auto; z-index: 15; }
.content.wiz { padding-bottom: 120px; }
.link-btn { color: var(--accent-ink); font-size: 12px; font-weight: 500; height: 24px; display: inline-flex; align-items: center; margin-top: 4px; }
.full { background: var(--field); border-radius: var(--r12); padding: 12px; font-size: 14px; line-height: 20px; margin-top: 8px; white-space: pre-wrap; }

/* мониторинг (10a–10d) */
.bhead { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.bhead .h-card { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bhead .back { margin-left: -10px; }
.timeline .tstep { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.timeline .tstep + .tstep::before { content: ""; position: absolute; left: 9px; top: -8px; height: 12px; width: 2px; background: var(--rule); }
.ring { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.ring.run { border-color: transparent; background: var(--accent-soft); } .ring.done { border-color: transparent; background: var(--ok-soft); color: var(--ok-ink); }
.ring.waiting { border-color: transparent; background: var(--warn-soft); color: var(--warn-ink); } .ring.error { border-color: transparent; background: var(--err-soft); color: var(--err); }
.timeline .t { font-size: 14px; line-height: 18px; font-weight: 500; margin-top: 2px; } .timeline .t.err { color: var(--err); }
.hrow { padding: 12px 14px; border-top: 1px solid var(--rule); } .hrow:first-child { border-top: 0; }
.hrow .sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rstate { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; margin-left: 8px; }
.rstate.ok { color: var(--ok-ink); } .rstate.broken { color: var(--err); } .rstate.wait { color: var(--warn-ink); } .rstate.grey { color: var(--ink-2); }
.mon-grid { display: block; }

/* ── десктоп 1280: сайдбар 280, шапка 72, контент 24–28/32 ───────────────── */
@media (min-width: 1024px) {
  .card-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgba(9, 9, 10, .08); z-index: 25; overflow: auto; display: flex; flex-direction: column; }
  .card-panel .panel-head { display: flex; align-items: center; gap: 8px; height: 72px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
  .card-panel .panel-body { padding: 20px; }
  .desk-only { display: inline-flex !important; }
  .mob-only { display: none !important; }
  .sheet-scrim { align-items: center; }
  .sheet { border-radius: var(--r16); padding: 20px 24px; }
  .bots-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
  .bots-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .bots-grid .builds { margin-top: 0; }
  .bots-grid .tpl-grid { display: none; } .bots-grid .tpl-list { display: block; }
  .bots-page.content.narrow { max-width: 1080px; }
  .content.narrow.wiz { max-width: 1080px; }
  .tpl-list .menu-row { height: auto; min-height: 52px; padding: 10px 16px; }
  .tpl-list .menu-row .caption { display: block; margin-top: 2px; font-weight: 400; }
  .wiz-foot { position: static; max-width: none; margin-top: 24px; }
  .canvas { background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 24px 24px; border-radius: var(--r16); padding: 24px; }
  .chain { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 0 12px; }
  .node { width: 260px; margin-bottom: 16px; }
  .nlink { width: 16px; height: 2px; margin: 32px 0 0; }
  /* канвас 9f: свободное полотно — ноды абсолютно, связи кривыми, палитра плавающей карточкой */
  .canvas.free { padding: 0; overflow: hidden; }
  .canvas.free .chain { display: block; position: relative; min-height: 380px; }
  .canvas.free .node { position: absolute; width: 240px; margin: 0; }
  .canvas.free .node.dragging { box-shadow: var(--shadow-drag); opacity: 1; z-index: 3; }
  .canvas.free .node.blank { border: 1px dashed var(--accent-border); background: var(--accent-soft); }
  .canvas.free .node:focus-within { box-shadow: 0 0 0 2px var(--accent); }
  .canvas.free .nlink { display: none; }
  .canvas.free .links { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
  .canvas.free .links path { fill: none; stroke: var(--accent-border); stroke-width: 2; }
  .canvas.free .chain .node { z-index: 2; }
  .palette.float { position: absolute; top: 16px; right: 16px; z-index: 4; width: 208px; flex-direction: column; align-items: stretch; gap: 8px; margin: 0; padding: 12px; background: var(--surface); border-radius: var(--r12); box-shadow: var(--shadow-drag); }
  .palette.float .palette-h { font-size: 12px; font-weight: 500; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
  .palette.float .tchip { justify-content: flex-start; }
  .btn.h44 { height: 44px; }
  .mon-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  .bal-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; align-items: start; }
  .content.narrow.wide-more { max-width: 1080px; }
  .docs-grid.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
  .content.narrow.docs-page { max-width: 1080px; }
  .app { flex-direction: row; min-height: 100vh; }
  .tabbar { display: none; }
  .sidebar { display: flex; flex-direction: column; width: 280px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 20px 16px; position: sticky; top: 0; height: 100vh; }
  .sidebar .logo-row { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 8px; margin-bottom: 20px; }
  .sidebar .nav { display: flex; flex-direction: column; gap: 4px; }
  .sidebar .nav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--r8); color: var(--ink-2); font-size: 14px; font-weight: 500; }
  .sidebar .nav a[aria-current="page"] { background: var(--field); color: var(--ink); }
  .sidebar .nav a .icon { width: 20px; height: 20px; }
  .sidebar .me { margin-top: auto; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; border-radius: var(--r12); background: var(--field); }
  .sidebar .me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
  .sidebar .me .nm { font-size: 14px; font-weight: 500; }
  .sidebar .me .sub { font-size: 12px; color: var(--ink-2); }
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .topbar { display: flex; align-items: center; gap: 16px; height: 72px; padding: 0 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
  .topbar .greet { font-size: 20px; line-height: 24px; }
  .topbar .back { margin-left: -12px; }
  .topbar .spacer { flex: 1; }
  .topbar .btn { width: auto; height: 44px; border-radius: var(--r8); padding: 0 20px; font-size: 14px; }
  .topbar .segment button { height: 34px; border-radius: var(--r8); }
  .topbar .segment { border-radius: var(--r10); }
  .content { max-width: none; padding: 28px 32px 40px; }
  .content.narrow { max-width: 640px; margin: 0; }
  .home-head { display: none; }
  .ask-fab { display: none; }
  .counters3 { grid-template-columns: repeat(3, minmax(0, 180px)); gap: 12px; }
  .counter { padding: 18px; }
  .counter .v { font-size: 33px; line-height: 40px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  .filters { grid-template-columns: repeat(4, 180px); }
  .filter { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
  .filter .l { margin: 0; order: 0; } .filter .v { order: 1; }
  .pult-list { columns: 2; column-gap: 16px; }
  .pult-list > * { break-inside: avoid; }
  .board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
  .col { background: var(--field); border-radius: var(--r16); padding: 12px; min-height: 320px; }
  .col h3 { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 4px 4px 12px; display: flex; justify-content: space-between; }
  .col.over { outline: 1px dashed var(--accent-border); outline-offset: -1px; }
  .placeholder { border: 1px dashed var(--accent-border); background: var(--accent-soft); border-radius: var(--r12); margin-bottom: 8px; }
  .chat-wrap { position: static; flex: 1; inset: auto; }
  .chat-head { height: 72px; padding: 0 32px; }
  .login { max-width: none; padding: 0; gap: 0; flex-direction: row; }
  .login.sub .hero { display: flex; }
  .login .hero { flex: none; width: min(52vw, 720px); background: var(--navy); color: var(--on-navy-strong); padding: 56px; position: relative; overflow: hidden; justify-content: flex-start; }
  .login .hero::before { content: ""; position: absolute; left: 50%; top: 60%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(circle, var(--accent) 0%, transparent 65%); opacity: .6; }
  .login .hero > * { position: relative; }
  .login .hero .logo { font-size: 24px; }
  .login .hero-body { margin: auto 0; max-width: 480px; gap: 20px; }
  .login .hero h1 { font-size: 38px; line-height: 46px; }
  .login .hero-lead { font-size: 17px; line-height: 26px; color: var(--on-navy); }
  .login .hero-demo { background: none; padding: 0; gap: 10px; margin-top: 8px; }
  .login .hero-demo .me { max-width: 84%; background: var(--white-10); padding: 12px 16px; font-size: 14px; line-height: 20px; }
  .login .hero-demo .ans { padding: 12px 16px; font-size: 14px; line-height: 20px; }
  .login .hero-foot { display: block; font-size: 14px; line-height: 20px; color: var(--on-navy); margin: 0; padding-top: 24px; border-top: 1px solid var(--white-14); }
  .login .gate { flex: 1; min-width: 0; align-items: center; justify-content: center; padding: 40px; }
  .login .gate-box { width: 100%; max-width: 380px; }
  .login .gate-title { font-size: 24px; line-height: 30px; }
  .login .gate-sub { margin-bottom: 20px; }
  .toast { left: 320px; right: auto; bottom: 32px; }
  .onboard { max-width: 480px; margin: 0 auto; border-radius: var(--r16); inset: 40px auto auto 50%; transform: translateX(-50%); height: auto; min-height: 640px; }
}

/* процесс (окно процесса, 10.09): колонки по ступеням, связи кривыми, правка до запуска */
.proc { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px; }
.proc-inner { position: relative; display: inline-block; min-width: 100%; }
.proc-cols { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 2; }
.proc-col { display: flex; flex-direction: column; gap: 12px; }
.plinks { display: none; }
.pnode { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r12); padding: 12px; box-shadow: var(--shadow-card); }
.pnode.run { box-shadow: 0 0 0 2px var(--accent-border); }
.pnode.done { border-color: var(--ok); }
.pnode.error { border-color: var(--err); }
.pnode .ptitle-t { font-size: 14px; line-height: 18px; font-weight: 500; margin-top: 8px; }
.pnode .ptitle { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 14px; font-weight: 500; padding: 8px 0 4px; outline: none; }
.pnode .ptext { font-size: 13px; line-height: 18px; color: var(--ink-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pnode .ntext { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r8); background: var(--field); padding: 6px 8px; margin-top: 8px; font-size: 13px; line-height: 18px; resize: vertical; outline: none; min-height: 64px; }
.pnode .ntext:focus { border-color: var(--accent-border); }
.pnode .pdeps { margin-top: 6px; }
.pnode .psel { height: 32px; border-radius: var(--r8); border: 1px solid var(--line); background: var(--field); font-size: 13px; padding: 0 8px; }
.pnode .ppick { padding: 4px 0; }
.tchip.small { height: 32px; padding: 0 10px; font-size: 13px; }
.pname { font-size: 20px; font-weight: 500; height: 44px; }
.mb12 { margin-bottom: 12px; }
.checkbox { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--line); flex: none; display: inline-block; }
.checkbox[aria-checked="true"] { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
@media (min-width: 1024px) {
  .proc { margin: 0; padding: 0; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 24px 24px; border-radius: var(--r16); }
  .proc-inner { padding: 24px; }
  .proc-cols { flex-direction: row; align-items: flex-start; gap: 40px; }
  .proc-col { width: 260px; flex: none; gap: 16px; }
  .plinks { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
  .plinks path { fill: none; stroke: var(--accent-border); stroke-width: 2; }
}
/* шапка окна процесса на 430: имя и подпись во всю ширину, кнопки строкой ниже (снимок стенда 10.09) */
@media (max-width: 1023px) {
  .phead { flex-wrap: wrap; row-gap: 10px; }
  .phead .grow { flex-basis: calc(100% - 44px); }
  .phead .bstate { margin-left: 44px; }
  .phead .btn { flex: 1; }
}
.pphrase { height: auto; min-height: 176px; padding: 12px 14px; line-height: 22px; resize: vertical; }

/* «Куда уходят данные» на «Мои данные»: свёрнутый блок вместо отдельного экрана «Приватность» (10.09) */
.whither summary { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; list-style: none; }
.whither summary::-webkit-details-marker { display: none; }
.whither summary .icon { margin-left: auto; transition: transform .15s; }
.whither[open] summary .icon { transform: rotate(180deg); }

/* предпросмотр документа */
.doc-text { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 15px; line-height: 1.55; margin: 0; max-height: 72vh; overflow: auto; }

/* меню действий по карточке и процессу (правый клик / «⋯»), 10.09 */
.ctx-menu { min-width: 220px; max-height: calc(100vh - 16px); overflow: auto; }
.ctx-menu .sep { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); padding: 8px 10px 2px; }
.ctx-menu button.danger { color: var(--err); }
.ctx-menu button .icon { color: var(--ink-2); }
.ctx-menu button.danger .icon { color: var(--err); }
.tcard .foot { display: flex; align-items: center; gap: 8px; }
.tcard .foot .more, .bcard .more { min-width: 32px; min-height: 32px; border-radius: var(--r8); color: var(--ink-2); }
.tcard .foot .more:hover, .bcard .more:hover { background: var(--field); }
.ctx-menu button { height: 36px; }
.ctx-menu button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-ink); }
[data-act="new-card"] { white-space: nowrap; }
