/* Экран «Начало работы» (префикс ob-). Только токены; тёмная тема работает сама.
   Классы .ob-card, .ob-ic, .ob-t, .ob-ring заняты карточкой в левом меню (shell.css) — здесь их нет. */

.screen-onboarding { max-width: 1560px; }

.ob-grid { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 20px; align-items: start; }
.ob-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ob-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* правая колонка «липнет» к верху, только если помещается в высоту окна целиком */
@media (min-height: 880px) { .ob-side { position: sticky; top: calc(var(--topbar-h) + 16px); } }

/* прогресс справа от заголовка */
.ob-prog { display: flex; flex-direction: column; gap: 10px; min-width: 248px; padding: 12px 16px 14px; border-radius: 14px; background: var(--l1); border: 1px solid var(--line); }
.ob-prog-t { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.ob-prog-t b { font-size: 20px; line-height: 26px; font-weight: 650; letter-spacing: -.016em; color: var(--acc); white-space: nowrap; }
.ob-prog-t span { font-size: 12.5px; color: var(--mut2); white-space: nowrap; }
.ob-prog-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; }
.ob-prog-bar i { display: block; height: 6px; border-radius: 999px; background: var(--line); transition: background .3s; }
.ob-prog-bar i.is-ok { background: var(--vyg); }
.ob-prog-bar i.is-warn { background: var(--ryn); }

/* все шаги выполнены */
.ob-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: var(--vyg-soft); border: 1px solid var(--vyg-brd); color: var(--vyg); animation: ob-in .3s cubic-bezier(.22, .8, .2, 1) both; }
.ob-banner > svg { flex: 0 0 auto; }
.ob-banner > div { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.ob-banner b { font-size: 14.5px; font-weight: 640; color: var(--ink); }
.ob-banner span { font-size: 13px; line-height: 19px; color: var(--mut); }
@keyframes ob-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── шаги-аккордеон ──────────────────────────────────────────────────────────── */
.ob-steps { display: flex; flex-direction: column; gap: 10px; }
.ob-step { border-radius: 16px; background: var(--l1); border: 1px solid var(--line); scroll-margin-top: 72px; transition: border-color .2s; }
.ob-step:hover { border-color: var(--line-2); }
.ob-step.is-open { border-color: var(--acc-soft-brd); }
.ob-step-h {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px 14px 16px; border: 0; background: none; text-align: left; cursor: pointer;
  border-radius: 15px; color: var(--ink); transition: background .2s;
}
.ob-step.is-open .ob-step-h { border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: linear-gradient(180deg, var(--acc-row), transparent); }
.ob-step-h:hover { background: var(--l3); }
.ob-step-h:focus-visible { border-radius: 15px; outline-offset: -2px; }
.ob-step.is-open .ob-step-h:focus-visible { border-radius: 15px 15px 0 0; }
.ob-step.is-open .ob-step-h:hover { background: linear-gradient(180deg, var(--acc-row), transparent); }
.ob-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px;
  background: var(--acc-soft); border: 1px solid var(--acc-soft-brd); color: var(--acc); font-size: 13px; font-weight: 650; line-height: 1;
  transition: background .25s, border-color .25s, color .25s;
}
.ob-step.is-ok .ob-mark { background: var(--vyg-soft); border-color: var(--vyg-brd); color: var(--vyg); }
.ob-step.is-warn .ob-mark { background: var(--ryn-soft); border-color: var(--ryn-brd); color: var(--ryn); }
.ob-step.is-todo .ob-mark { background: var(--l2); border-color: var(--line-2); color: var(--mut); }
.ob-step-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.ob-step-t b { font-size: 15px; line-height: 21px; font-weight: 620; letter-spacing: -.01em; }
.ob-step-t em { font-style: normal; font-size: 12.5px; line-height: 17px; color: var(--mut2); overflow-wrap: anywhere; }
.ob-step-r { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; color: var(--mut2); }
.ob-step-r > svg { transition: transform .28s cubic-bezier(.22, .8, .2, 1); }
.ob-step.is-open .ob-step-r > svg { transform: rotate(180deg); }
.ob-badge { display: inline-flex; align-items: center; }

/* тело шага раскрывается плавно: строка сетки 0fr → 1fr */
.ob-step-w { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.22, .8, .2, 1); }
.ob-step.is-open .ob-step-w { grid-template-rows: 1fr; }
.ob-step-bw { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .32s; }
.ob-step.is-open .ob-step-bw { visibility: visible; transition-delay: 0s; }
.ob-step-b { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; padding: 6px 20px 20px 60px; }
.ob-step-c { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ob-step-p { font-size: 13.5px; line-height: 20px; color: var(--ink); max-width: 62ch; }
.ob-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ob-x { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ob-lbl { font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--mut2); line-height: 15px; }
.ob-x > .ob-lbl { font-size: 11px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 8px; border-radius: 999px; background: var(--l1); border: 1px solid var(--line-2); color: var(--ink); font-size: 12.5px; font-weight: 520; text-decoration: none; white-space: nowrap; }
a.ob-chip:hover { border-color: var(--acc-soft-brd); background: var(--acc-row); color: var(--acc); }
.ob-chip.is-warn { background: var(--ryn-soft); border-color: var(--ryn-brd); color: var(--ryn); }
/* факт шага и что сломано — строки со ссылкой, где это чинится */
.ob-fact { font-size: 13px; line-height: 19px; font-weight: 600; color: var(--ink); }
.ob-fact[data-st="todo"] { color: var(--mut); font-weight: 500; }
.ob-iss { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--line); background: var(--l1); overflow: hidden; }
.ob-is { display: flex; align-items: center; gap: 10px 14px; padding: 9px 12px; font-size: 13px; line-height: 18px; color: var(--mut); }
.ob-is + .ob-is { border-top: 1px solid var(--line); }
.ob-is > span { flex: 1 1 auto; min-width: 0; }
.ob-is.is-bad > span { color: var(--ink); }
.ob-is.is-bad > span::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 999px; background: var(--zav); vertical-align: middle; }
.ob-is .btn { flex: 0 0 auto; }
.ob-kbi-s { flex: 0 0 auto; font-size: 12px; color: var(--mut2); }
.ob-lad { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 18px; color: var(--mut); }
.ob-later { align-self: center; font-size: 12.5px; }
.ob-tip-b { margin-top: 10px; }
.ob-art-fr { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px; }
.ob-fr-r { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: calc(var(--i) * 14px); padding: 7px 10px; border-radius: 10px; background: var(--l1); border: 1px solid var(--line); box-shadow: var(--sh-1, none); }
.ob-fr-p { flex: 0 0 auto; min-width: 54px; font-size: 11.5px; font-weight: 650; color: var(--acc); white-space: nowrap; }
.ob-fr-w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--mut); }
.ob-kbl { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--line); background: var(--l1); overflow: hidden; }
.ob-kbi { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--ink); font-size: 13px; text-decoration: none; transition: background .12s; }
.ob-kbi + .ob-kbi { border-top: 1px solid var(--line); }
.ob-kbi:hover { background: var(--l3); color: var(--ink); text-decoration: none; }
.ob-kbi-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-kbi > svg:last-child { color: var(--mut2); flex: 0 0 auto; }
.ob-inv { display: flex; flex-direction: column; gap: 6px; }
.ob-inv-i { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--l1); }
.ob-inv-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.3; }
.ob-inv-t b { font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-inv-t em { font-style: normal; font-size: 12px; color: var(--mut2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ob-hide { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 2px 4px 0; }
.ob-hide .hint { font-size: 12px; }

/* ── иллюстрации: мини-сцены 300×200 в стиле СКД ─────────────────────────────── */
.ob-art-w { min-width: 0; }
.ob-art {
  position: relative; width: 300px; height: 200px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; pointer-events: none; user-select: none;
  background-color: var(--l2); background-image: radial-gradient(circle, var(--line-2) 1px, transparent 1.3px); background-size: 14px 14px;
}
.ob-art-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ob-art-svg path { fill: none; stroke: var(--acc-soft-brd); stroke-width: 1.6; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; animation: ob-flow 1.6s linear infinite; }
@keyframes ob-flow { to { stroke-dashoffset: -16; } }
.ob-ln { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.ob-ln i { display: block; height: 4px; border-radius: 999px; background: var(--line-2); }

/* каналы → входящие */
.ob-src { position: absolute; left: 10px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--l1); border: 1px solid var(--line-2); }
.ob-inbox { position: absolute; right: 10px; top: 14px; width: 118px; height: 172px; display: flex; flex-direction: column; gap: 5px; padding: 7px 8px; border-radius: 12px; background: var(--l1); border: 1px solid var(--line-2); overflow: hidden; }
.ob-inbox-h { display: flex; align-items: center; gap: 6px; padding: 0 2px 2px; font-size: 10.5px; color: var(--ink); }
.ob-inbox-h svg { color: var(--acc); }
.ob-inbox-h b { flex: 1 1 auto; font-weight: 650; }
.ob-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--vyg); }
.ob-ir { display: flex; align-items: center; gap: 7px; padding: 5px 6px; border-radius: 8px; background: var(--l2); flex: 0 0 auto; }
.ob-ir.is-ai { background: var(--bubble-ai); border: 1px solid var(--bubble-ai-brd); }

/* путь клиента */

/* знания → ответ Продажника */
.ob-file { position: absolute; left: 8px; width: 136px; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: 10px; background: var(--l1); border: 1px solid var(--line-2); }
.ob-fi { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: var(--ts); border: 1px solid var(--tb); color: var(--t); }
.ob-ft { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ob-ft b { font-size: 11px; font-weight: 620; }
.ob-ft em { font-style: normal; font-size: 9.5px; color: var(--mut2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-kn-av { position: absolute; left: 190px; top: 10px; }
.ob-bubble { position: absolute; left: 154px; top: 62px; width: 136px; display: flex; flex-direction: column; gap: 7px; padding: 9px 10px; border-radius: 4px 12px 12px 12px; background: var(--bubble-ai); border: 1px solid var(--bubble-ai-brd); }
.ob-bubble-t { font-size: 10.5px; line-height: 15px; color: var(--ink); }
.ob-bubble-g { display: flex; flex-wrap: wrap; gap: 4px; }
.ob-bubble-g .tag { height: 18px; padding: 0 6px; font-size: 10px; border-radius: 6px; }

/* импорт */
.ob-art-imp { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.ob-srcs { flex: 0 0 auto; display: flex; gap: 5px; flex-wrap: wrap; }
.ob-tg { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 7px; background: var(--l1); border: 1px solid var(--line-2); color: var(--mut); font-size: 10.5px; font-weight: 600; }
.ob-sheet { flex: 0 0 auto; border-radius: 9px; background: var(--l1); border: 1px solid var(--line-2); overflow: hidden; font-size: 10px; }
.ob-sheet-h, .ob-sheet-r { display: grid; grid-template-columns: 1.1fr 1fr 1.25fr; }
.ob-sheet-h span { padding: 3px 7px; background: var(--l2); border-bottom: 1px solid var(--line); color: var(--mut2); font-size: 9px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.ob-sheet-r span { padding: 4px 7px; border-bottom: 1px solid var(--line); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-sheet-r:last-child span { border-bottom: 0; }
.ob-sheet-h span + span, .ob-sheet-r span + span { border-left: 1px solid var(--line); }
.ob-imp-arr { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--mut2); font-size: 10.5px; }
.ob-imp-arr svg { color: var(--acc); }
.ob-imp-res { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: var(--l1); border: 1px solid var(--line-2); }
.ob-imp-res .tag { height: 20px; }

/* команда */
.ob-art-team { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.ob-avs { display: flex; align-items: center; gap: 10px; }
.ob-av-add { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; border: 1.5px dashed var(--line-3); color: var(--mut2); }
.ob-invite { display: flex; flex-direction: column; gap: 7px; padding: 10px; border-radius: 12px; background: var(--l1); border: 1px solid var(--line-2); }
.ob-fin { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--mut2); font-size: 10.5px; }
.ob-roles { display: flex; gap: 4px; }
.ob-roles span { flex: 1 1 0; min-width: 0; padding: 4px 0; border-radius: 7px; background: var(--l2); border: 1px solid var(--line); color: var(--mut); font-size: 9.5px; font-weight: 600; text-align: center; white-space: nowrap; }
.ob-roles .is-on { background: var(--acc-soft); border-color: var(--acc-soft-brd); color: var(--acc); }
.ob-fbtn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 26px; border-radius: 8px; background: var(--acc-soft); border: 1px solid var(--acc-soft-brd); color: var(--acc); font-size: 11px; font-weight: 620; }

/* ── правая колонка ──────────────────────────────────────────────────────────── */
.ob-res { display: flex; flex-direction: column; margin: -6px -8px; padding: 0; list-style: none; }
.ob-res-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background .14s; }
.ob-res-i:hover { background: var(--l3); color: var(--ink); text-decoration: none; }
.ob-res-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.3; }
.ob-res-t b { font-size: 13.5px; font-weight: 600; }
.ob-res-t em { font-style: normal; font-size: 12px; color: var(--mut2); overflow-wrap: anywhere; }
.ob-res-i > svg:last-child { flex: 0 0 auto; color: var(--mut2); }
.ob-tip-p { font-size: 13.5px; line-height: 20px; color: var(--ink); }
.ob-tip .ai-chips { flex-direction: column; align-items: stretch; gap: 6px; }
.ob-tip .ai-chips .chip { height: auto; min-height: 30px; padding: 6px 12px; white-space: normal; text-align: left; border-radius: 12px; line-height: 17px; }

/* ── окна ────────────────────────────────────────────────────────────────────── */
.ob-m-form { display: flex; flex-direction: column; gap: 16px; }
.ob-m-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 10px 12px; border-radius: 12px; background: var(--l2); border: 1px dashed var(--line-2); }
.ob-m-chips .pill { height: 24px; }
.ob-faq { display: flex; flex-direction: column; gap: 8px; margin-top: -4px; }
.ob-faq-i { border-radius: 12px; border: 1px solid var(--line); background: var(--l1); overflow: hidden; transition: border-color .14s; }
.ob-faq-i[open] { border-color: var(--acc-soft-brd); }
.ob-faq-i summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; font-size: 13.5px; font-weight: 580; cursor: pointer; list-style: none; }
.ob-faq-i summary::-webkit-details-marker { display: none; }
.ob-faq-i summary:hover { background: var(--l3); }
.ob-faq-i summary svg { flex: 0 0 auto; color: var(--mut2); transition: transform .2s; }
.ob-faq-i[open] summary svg { transform: rotate(180deg); }
.ob-faq-i p { padding: 0 14px 10px; font-size: 13px; line-height: 19px; color: var(--mut); }
.ob-faq-go { margin: 0 8px 10px 8px; }
.ob-vid-list { display: flex; flex-direction: column; }
.ob-vid { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ob-vid:first-child { padding-top: 0; }
.ob-vid:last-child { border-bottom: 0; }
.ob-vid-p { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 64px; height: 40px; border-radius: 10px; background: linear-gradient(140deg, var(--hero-from), var(--hero-to)); color: var(--hero-ink); }
.ob-vid-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.ob-vid-t b { font-size: 13.5px; font-weight: 600; }
.ob-vid-t em { font-style: normal; font-size: 12.5px; color: var(--mut2); }
.ob-vid-l { flex: 0 0 auto; font-size: 12px; color: var(--mut2); }

/* ── узкие окна ──────────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .ob-grid { grid-template-columns: minmax(0, 1fr); }
  .ob-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 1040px) {
  .ob-step-b { grid-template-columns: minmax(0, 1fr); padding-left: 20px; }
  .ob-art-w { display: none; }
}
@media (max-width: 760px) {
  .ob-side { grid-template-columns: minmax(0, 1fr); }
  .ob-prog { min-width: 0; width: 100%; }
  .ob-step-h { padding-right: 12px; }
  .ob-step-t em { display: none; }
  .ob-vid { flex-wrap: wrap; }
}
