/* Блоки сайта. Все значения — из tokens.css; в разметке страниц стилей нет, только имена классов отсюда.
   Порядок: основа → шапка и подвал → текст страницы → блоки (полоса, кнопки, плитки, колонки, строки, цепочки, пример, граф). */

/* ---------- основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--w-normal) var(--t-body)/var(--lh-body) var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
.container { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-3); }

.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); }
.badge { font: var(--w-normal) 12px/1.3 var(--font-mono); letter-spacing: 0; text-transform: none; padding: 2px 7px; border: 1px dashed var(--ink-3); border-radius: 4px; color: var(--ink-2); white-space: nowrap; }

/* ---------- шапка и подвал ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: var(--gap); padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.logo svg { flex: none; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: var(--t-small); color: var(--ink-2); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.search-button { font: inherit; font-size: var(--t-small); color: var(--ink-2); background: none; border: 0; padding: 8px 4px; cursor: pointer; }
.search-button:hover { color: var(--ink); }
@media (max-width: 860px) {
  .site-header { position: static; }
  .header-inner { flex-wrap: wrap; row-gap: 10px; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; white-space: nowrap; gap: 20px; padding-bottom: 2px; }
  .header-actions { margin-left: auto; }
}

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; padding-bottom: 28px; font: var(--w-normal) var(--t-label)/1.5 var(--font-mono); color: var(--ink-3); }

/* ---------- текст страницы ---------- */
.page { padding-top: var(--band); padding-bottom: var(--band); }
.page__head { display: flex; flex-direction: column; gap: 18px; max-width: 880px; margin-bottom: 48px; }
.page__head h1 { font-size: var(--t-title); line-height: var(--lh-title); letter-spacing: var(--track-title); font-weight: var(--w-medium); text-wrap: balance; }
.deck { font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); max-width: var(--text); text-wrap: pretty; }

.prose > * { max-width: var(--text); }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: var(--t-h2); line-height: 1.25; letter-spacing: -0.015em; font-weight: var(--w-medium); margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--ink); }
.prose h3 { font-size: var(--t-h3); font-weight: var(--w-medium); margin-top: 36px; }
.prose p, .prose li { color: var(--ink-2); text-wrap: pretty; }
.prose strong { color: var(--ink); font-weight: var(--w-medium); }
.prose a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.prose a:hover { border-color: var(--ink); color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }
.prose code { font: 0.9em var(--font-mono); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
/* блоки шире колонки текста */
.prose > .tiles, .prose > .cols, .prose > .tabs { max-width: none; margin-top: 28px; }
.prose > .rows, .prose > h2 { max-width: 920px; }
.prose > .rows { margin-top: 24px; }
.prose .tiles a, .prose .cols a, .prose .rows a, .prose .chips a { border-bottom: 0; }

/* ---------- полоса: раздел главной ---------- */
.band { border-bottom: 1px solid var(--line); }
.band--alt { background: var(--surface); }
.band[id] { scroll-margin-top: 64px; }   /* шапка прилипает к верху: якорь не уходит под неё */
.band__inner { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: var(--band) var(--gutter); }
.band__inner > * + * { margin-top: 24px; }
.band__title { font-size: var(--t-title); line-height: var(--lh-title); letter-spacing: var(--track-title); font-weight: var(--w-medium); max-width: 860px; text-wrap: balance; }
.band__inner > p { max-width: var(--text); color: var(--ink-2); text-wrap: pretty; }
.band__inner > p a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.band__inner > .tiles, .band__inner > .cols, .band__inner > .tabs { margin-top: 40px; }
/* нумерованный список в полосе — строки с номером; обычный — шаги по линии */
.band__inner > ol { list-style: none; padding: 0; max-width: var(--text); counter-reset: fact; border-bottom: 1px solid var(--line); }
.band__inner > ol > li { counter-increment: fact; display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.band__inner > ol > li::before { content: counter(fact, decimal-leading-zero); font: var(--w-normal) var(--t-label)/1.9 var(--font-mono); color: var(--ink-3); }
.band__inner > ul { list-style: none; padding: 0 0 0 5px; max-width: var(--text); }
.band__inner > ul > li { position: relative; padding: 10px 0 10px 24px; border-left: 1px solid var(--line-2); font-size: var(--t-body); }
.band__inner > ul > li::before { content: ""; position: absolute; left: -5px; top: 19px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); }
.band__inner > ul > li:last-child::before { background: var(--accent); }
.band__inner > ul > li:last-child { font-weight: var(--w-medium); }

.band--dark { background: var(--dark-bg); color: var(--dark-ink); position: relative; border-bottom: 0;
  background-image: radial-gradient(var(--dark-dot) 1px, transparent 1px); background-size: var(--dot-grid) var(--dot-grid); }
.band--dark .eyebrow { color: var(--dark-ink-2); }
.band--dark .band__title { font-size: clamp(30px, 4vw, 52px); line-height: var(--lh-tight); }
.band--dark .band__inner > p { color: var(--dark-ink-2); }
.band--dark .btn { border-color: var(--dark-line); color: var(--dark-ink); background: transparent; }
.band--dark .btn:hover { border-color: var(--dark-ink); color: var(--dark-ink); }
.band--dark .btn--primary { background: var(--dark-ink); color: var(--ink); border-color: var(--dark-ink); }
.band--dark .btn--primary:hover { background: var(--surface); color: var(--accent); }

/* ---------- первый экран: одна колонка — текст по центру, под ним граф во всю ширину ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image: radial-gradient(var(--line-2) 1px, transparent 1px); background-size: var(--dot-grid) var(--dot-grid);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%); mask-image: linear-gradient(180deg, transparent, #000 45%); }
.hero__inner { position: relative; max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 72px var(--gutter) 56px; }
.hero__text { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.hero__title { font-size: var(--t-hero); line-height: 1.05; letter-spacing: -0.035em; font-weight: var(--w-medium); max-width: 900px; text-wrap: balance; }
.hero__sub { font-size: var(--t-h2); line-height: 1.25; letter-spacing: -0.015em; color: var(--ink-2); margin-top: -8px; }
.hero__lead { font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); max-width: 600px; text-wrap: pretty; }
.hero .actions { justify-content: center; }

/* ---------- кнопки ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 13px 22px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: var(--w-medium); font-size: var(--t-small); line-height: 1.3; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn--small { padding: 8px 15px; font-size: 14px; background: transparent; border-color: var(--ink); }
.btn--small:hover { background: var(--ink); color: var(--bg); }

/* ---------- плитки: «Для кого» ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile { display: flex; flex-direction: column; gap: 12px; min-height: 210px; padding: 28px; background: var(--bg); transition: background .2s; }
.band--alt .tile { background: var(--surface); }
.tile:hover { background: var(--surface); color: var(--ink); }
.band--alt .tile:hover { background: var(--bg); }
.tile__label { display: flex; justify-content: space-between; font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); color: var(--ink-3); }
.tile__title { margin-top: auto; font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; font-weight: var(--w-medium); }
.tile__text { font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }

/* ---------- колонки: «Что внутри» на главной ---------- */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px 32px; }
.col { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--ink); }
.col__num { font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); color: var(--ink-3); }
.col__title { font-size: var(--t-h3); font-weight: var(--w-medium); }
.col__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: var(--t-small); line-height: 1.45; }
.col__list a { color: var(--ink-2); border-bottom: 1px solid var(--line); }
.col__list a:hover { color: var(--ink); border-color: var(--ink); }
.col__list .badge { margin-left: 6px; }
.col__apps { list-style: none; padding: 0; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.col__apps .app { padding: 5px 11px 5px 6px; gap: 7px; font-size: 13px; }
.col__apps .app img { width: 20px; height: 20px; border-radius: 4px; }
.col__apps .app:not(:has(img)) { padding-left: 11px; }
.more { display: inline-flex; gap: 10px; font-weight: var(--w-medium); font-size: var(--t-small); border-bottom: 1px solid var(--ink); padding-bottom: 3px; }

/* ---------- строки: списки частей, история, «Что нового» ---------- */
.rows { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 6px 32px; padding: 18px 0; border-top: 1px solid var(--line); }
.row__title { font-weight: var(--w-medium); color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
a.row__title:hover, .row__title a:hover { color: var(--accent); }
.row__date { font: var(--w-normal) var(--t-label)/1.9 var(--font-mono); color: var(--ink-3); }
.row__text { color: var(--ink-2); font-size: var(--t-small); line-height: 1.55; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-family: inherit; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover, .chip.is-on { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* ---------- вкладки без скрипта: переключатели, полоса подписей, панели ---------- */
.tabs { display: block; }
.tabs__radio { position: absolute; opacity: 0; pointer-events: none; }
.tabs__bar { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs__tab { font: var(--w-normal) 14px/1.3 var(--font-mono); padding: 9px 16px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.tabs__tab:hover { border-color: var(--ink); }
.tabs__radio:nth-of-type(1):checked ~ .tabs__bar .tabs__tab:nth-of-type(1),
.tabs__radio:nth-of-type(2):checked ~ .tabs__bar .tabs__tab:nth-of-type(2),
.tabs__radio:nth-of-type(3):checked ~ .tabs__bar .tabs__tab:nth-of-type(3),
.tabs__radio:nth-of-type(4):checked ~ .tabs__bar .tabs__tab:nth-of-type(4),
.tabs__radio:nth-of-type(5):checked ~ .tabs__bar .tabs__tab:nth-of-type(5),
.tabs__radio:nth-of-type(6):checked ~ .tabs__bar .tabs__tab:nth-of-type(6),
.tabs__radio:nth-of-type(7):checked ~ .tabs__bar .tabs__tab:nth-of-type(7),
.tabs__radio:nth-of-type(8):checked ~ .tabs__bar .tabs__tab:nth-of-type(8) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tabs__radio:nth-of-type(1):focus-visible ~ .tabs__bar .tabs__tab:nth-of-type(1),
.tabs__radio:nth-of-type(2):focus-visible ~ .tabs__bar .tabs__tab:nth-of-type(2),
.tabs__radio:nth-of-type(3):focus-visible ~ .tabs__bar .tabs__tab:nth-of-type(3),
.tabs__radio:nth-of-type(4):focus-visible ~ .tabs__bar .tabs__tab:nth-of-type(4),
.tabs__radio:nth-of-type(5):focus-visible ~ .tabs__bar .tabs__tab:nth-of-type(5),
.tabs__radio:nth-of-type(6):focus-visible ~ .tabs__bar .tabs__tab:nth-of-type(6),
.tabs__radio:nth-of-type(7):focus-visible ~ .tabs__bar .tabs__tab:nth-of-type(7),
.tabs__radio:nth-of-type(8):focus-visible ~ .tabs__bar .tabs__tab:nth-of-type(8) { outline: 2px solid var(--accent); outline-offset: 3px; }
.tabs__panel { display: none; margin-top: 28px; }
.tabs__radio:nth-of-type(1):checked ~ .tabs__panel:nth-of-type(1),
.tabs__radio:nth-of-type(2):checked ~ .tabs__panel:nth-of-type(2),
.tabs__radio:nth-of-type(3):checked ~ .tabs__panel:nth-of-type(3),
.tabs__radio:nth-of-type(4):checked ~ .tabs__panel:nth-of-type(4),
.tabs__radio:nth-of-type(5):checked ~ .tabs__panel:nth-of-type(5),
.tabs__radio:nth-of-type(6):checked ~ .tabs__panel:nth-of-type(6),
.tabs__radio:nth-of-type(7):checked ~ .tabs__panel:nth-of-type(7),
.tabs__radio:nth-of-type(8):checked ~ .tabs__panel:nth-of-type(8) { display: block; }
.tabs__text { padding-top: 22px; border-top: 1px solid var(--line); max-width: 760px; color: var(--ink-2); }
/* на узком экране полоса подписей прилипает к верху, пока прокручивается её секция */
@media (max-width: 860px) {
  .tabs__bar { position: sticky; top: 0; z-index: 5; flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .tabs__bar::-webkit-scrollbar { display: none; }
  .band--alt .tabs__bar { background: var(--surface); }
  .tabs__panel { margin-top: 22px; }
}
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.step { position: relative; padding: 30px 20px 24px 0; }
.step::before { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); }
.step::after { content: ""; position: absolute; left: 18px; right: 0; top: 5px; height: 1px; background: var(--line-2); }
.step:last-child::before { background: var(--accent); }
.step:last-child::after { display: none; }
.step__num { font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); color: var(--ink-3); }
.step__title { margin-top: 8px; font-size: 18px; line-height: 1.3; font-weight: var(--w-medium); }
.step__text { margin-top: 8px; font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .step { padding: 0 0 22px 28px; }
  .step::before { top: 5px; }
  .step::after { left: 5px; right: auto; top: 20px; bottom: 0; width: 1px; height: auto; }
}

/* ---------- вариант использования во вкладке: о какой работе речь и пример разговором ---------- */
.usecase { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.usecase__text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.usecase__title { font-size: var(--t-h2); line-height: 1.25; letter-spacing: -0.015em; font-weight: var(--w-medium); }
.usecase__text p { color: var(--ink-2); }
@media (max-width: 860px) { .usecase { grid-template-columns: 1fr; gap: 28px; } }
/* «Для кого»: вкладки стоят в левой колонке над заголовком варианта, пример справа начинается с их высоты.
   Панель и .usecase растворяются (display: contents), чтобы их части встали в сетку самих вкладок. */
.tabs--use { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto 1fr; column-gap: 48px; row-gap: 24px; align-items: start; }
.tabs--use .tabs__bar { grid-column: 1; grid-row: 1; }
.tabs--use .tabs__radio:nth-of-type(1):checked ~ .tabs__panel:nth-of-type(1),
.tabs--use .tabs__radio:nth-of-type(2):checked ~ .tabs__panel:nth-of-type(2),
.tabs--use .tabs__radio:nth-of-type(3):checked ~ .tabs__panel:nth-of-type(3),
.tabs--use .tabs__radio:nth-of-type(4):checked ~ .tabs__panel:nth-of-type(4),
.tabs--use .tabs__radio:nth-of-type(5):checked ~ .tabs__panel:nth-of-type(5),
.tabs--use .tabs__radio:nth-of-type(6):checked ~ .tabs__panel:nth-of-type(6),
.tabs--use .tabs__radio:nth-of-type(7):checked ~ .tabs__panel:nth-of-type(7),
.tabs--use .tabs__radio:nth-of-type(8):checked ~ .tabs__panel:nth-of-type(8) { display: contents; }
.tabs--use .usecase { display: contents; }
.tabs--use .usecase__text { grid-column: 1; grid-row: 2; }
.tabs--use .frame { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 860px) {
  .tabs--use { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .tabs--use .frame { grid-column: 1; grid-row: auto; }
}

/* ---------- знакомые приложения значками ---------- */
.apps { display: grid; gap: 32px; }
.apps__title { font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.apps__list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.app { display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: var(--t-small); color: var(--ink); }
.band--alt .app { background: var(--bg); }
.app img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; flex: none; }
.app--soon { border-style: dashed; border-color: var(--line-2); color: var(--ink-3); }
.app--soon img { opacity: 0.55; filter: grayscale(1); }
.apps .app:not(:has(img)) { padding-left: 16px; }
.cols + .apps { margin-top: 40px; }
.band__inner > .apps { margin-top: 40px; }
@media (prefers-reduced-motion: reduce) { .graph__info:target { transition: none; animation: none; } }

/* ---------- рамка вокруг ситуации в правой колонке ---------- */
.frame { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); padding: 22px; }
.band--alt .frame { background: var(--surface); }
.frame__label { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); }
.frame .chat { max-width: none; }
.frame .chat__msg, .frame .chat__card { background: var(--surface); }
.band--alt .frame .chat__msg, .band--alt .frame .chat__card { background: var(--bg); }
@media (max-width: 640px) { .frame { padding: 16px; } }

/* ---------- пример разговором: сообщение и следующим сообщением — карточки того, что записано ---------- */
.chat { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.chat__label, .chat__from { font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); color: var(--ink-3); }
.chat__what { margin-top: 5px; line-height: 1.45; }
.chat__msg { align-self: flex-start; max-width: 88%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius) var(--radius) var(--radius) 2px; color: var(--ink); }
.chat__reply { align-self: flex-end; width: 88%; display: flex; flex-direction: column; gap: 8px; }
.chat__from { text-align: right; }
.chat__cards { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.chat__card { padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chat__card:last-child { border-radius: var(--radius) var(--radius) 2px var(--radius); }
.chat__card .chat__what { font-size: var(--t-small); color: var(--ink-2); }
.band--alt .chat__msg, .band--alt .chat__card { background: var(--bg); }
.prose .chat { margin-top: 24px; max-width: 560px; }
.prose .chat__cards { padding: 0; }
.prose .chat__card + .chat__card { margin-top: 0; }

/* ---------- граф частей: фильтры сверху, выбор слева, схема в центре, описание выбранного справа ---------- */
.graph { margin-top: 32px; }
.graph__label { display: block; font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); }
.graph__filters { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.graph__filters .chips { justify-content: center; }
.graph__stage { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.graph__canvas { position: relative; width: 100%; max-width: 414px; margin: 0 auto; }
.graph__side { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 560px; min-height: 150px; text-align: center; }
.graph__caption { font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }
.graph__caption strong { display: block; margin-bottom: 6px; font-size: var(--t-h3); line-height: 1.3; color: var(--ink); font-weight: var(--w-medium); }
.graph__result { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: var(--t-small); }
.graph__result a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.graph__result a:hover { border-color: var(--ink); }
.graph__legend { justify-content: center; }
.graph__caption a { display: inline-block; margin-top: 6px; color: var(--ink); font-weight: var(--w-medium); border-bottom: 1px solid var(--ink); }
/* описание точки под графом: показывается то, на которое ведёт ссылка */
.graph__info { display: none; margin-top: 40px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 90px; text-align: left; }
.graph__info:target { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; animation: fade-in .35s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.graph__info .graph__label { display: flex; align-items: center; gap: 10px; }
.graph__info h3 { font-size: var(--t-h2); line-height: 1.25; letter-spacing: -0.015em; font-weight: var(--w-medium); }
.graph__sum { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-2); max-width: var(--text); }
.graph__more { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px 40px; width: 100%; padding-top: 18px; border-top: 1px solid var(--line); }
.graph__more p + p { margin-top: 8px; font-size: var(--t-small); line-height: 1.6; color: var(--ink-2); }
.graph__parts { list-style: none; padding: 0; width: 100%; }
.graph__parts li { display: grid; grid-template-columns: minmax(160px, 260px) auto 1fr; gap: 4px 16px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.graph__parts li:last-child { border-bottom: 1px solid var(--line); }
.graph__parts a { font-weight: var(--w-medium); }
.graph__parts li > span:last-child { grid-column: 3; font-size: var(--t-small); color: var(--ink-2); }
@media (max-width: 640px) { .graph__parts li { grid-template-columns: 1fr; } .graph__parts li > span:last-child { grid-column: 1; } .graph__info { padding: 20px; } }
.graph__canvas svg { display: block; width: 100%; height: auto; overflow: visible; }
.graph__edge { fill: none; stroke: var(--line-2); stroke-width: 1; transition: stroke .3s, opacity .3s; }
.graph__ring { fill: none; stroke: var(--line-2); stroke-dasharray: 3 5; }
.graph__core { fill: var(--ink); }
.graph__core-label { fill: var(--bg); font: var(--w-medium) 24px var(--font); text-anchor: middle; }
.graph__group circle { fill: var(--accent); }
.graph__group .graph__halo { opacity: 0.12; }
.graph__group text { fill: var(--ink); font: var(--w-normal) 24px var(--font); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.graph__part circle { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; transition: fill .2s; }
.graph__part--soon circle { stroke-dasharray: 2 2; stroke: var(--ink-3); }
.graph__part .graph__hit, .graph__group .graph__hit { fill: transparent; stroke: none; }
/* точка — не кнопка: рамки при нажатии нет; выбранную с клавиатуры показывает заливка и подсветка связей */
.graph__part, .graph__group, .graph__part:focus, .graph__group:focus, .graph__part:focus-visible, .graph__group:focus-visible { outline: none; -webkit-tap-highlight-color: transparent; }
.graph__caption, .graph__result { transition: opacity .2s ease; }
.graph__part:hover circle:not(.graph__hit), .graph__part.is-on circle:not(.graph__hit) { fill: var(--accent); }
.graph__group, .graph__part, .graph__edge { transition: opacity .3s; }
.graph.is-dim .graph__group:not(.is-on), .graph.is-dim .graph__part:not(.is-on), .graph.is-dim .graph__edge:not(.is-on) { opacity: 0.25; }
.graph .graph__edge.is-on { stroke: var(--accent); }
.graph__pulse { fill: var(--accent-soft); }
.graph__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 14px; font: var(--w-normal) var(--t-label)/1.4 var(--font-mono); color: var(--ink-3); }
.graph__legend span { display: flex; align-items: center; gap: 8px; }
.graph__legend i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--surface); }
.graph__legend .is-group { background: var(--accent); }
.graph__legend .is-soon { border: 1.5px dashed var(--ink-3); }
.js-only { display: none; }
.js .js-only { display: flex; }
@media (prefers-reduced-motion: reduce) { .graph__pulse { display: none; } html { scroll-behavior: auto; } }
@media (max-width: 960px) {
  .hero__inner { padding-top: 48px; padding-bottom: 40px; }
  .graph__canvas { max-width: 360px; }
  .graph__side { min-height: 0; }
}

/* ---------- схема в три экрана: слева — что это за экран, в центре — картинка, справа — описание выбранной точки.
   Картинки стоят вплотную: линия уходит в нижний край одной и продолжается с верхнего края следующей. ---------- */
.flow { margin-top: 40px; }
.flow__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px) minmax(0, 1fr); column-gap: 32px; align-items: center; }
.flow__text { display: flex; flex-direction: column; gap: 12px; }
.flow__title { font-size: var(--t-h2); line-height: 1.25; letter-spacing: -0.015em; font-weight: var(--w-medium); }
.flow__title + p, .flow__caption { font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.flow__canvas svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow__side { flex-direction: column; gap: 10px; min-height: 130px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
/* карточка точки видна всегда: пока ничего не выбрано — подсказка; при смене точки текст проявляется заново */
.flow__side.is-fresh .flow__caption, .flow__side.is-fresh .graph__label { animation: flow-fresh .2s ease both; }
@keyframes flow-fresh { from { opacity: 0.15; } to { opacity: 1; } }
.flow__hint { font: var(--w-normal) var(--t-label)/1.5 var(--font-mono); color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .flow__side { transition: none; } .flow__side.is-fresh .flow__caption, .flow__side.is-fresh .graph__label { animation: none; } }
.flow__caption strong { display: block; margin-bottom: 6px; font-size: var(--t-h3); line-height: 1.3; color: var(--ink); font-weight: var(--w-medium); }
.flow__edge { fill: none; stroke: var(--line-2); stroke-width: 1; }
.flow__node { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.flow__node text { text-anchor: middle; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.flow__group > circle { fill: var(--accent); }
.flow__group > .graph__halo { opacity: 0.12; transition: opacity .2s; }
.flow__group text { font: var(--w-medium) 15px var(--font); }
.flow__part circle { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; transition: fill .2s; }
.flow__part text { font: var(--w-normal) 15px var(--font); }
.flow__app rect { fill: transparent; }
.flow__app text { font: var(--w-normal) 13px var(--font); fill: var(--ink-2); stroke-width: 3px; }
.flow__app--left text { text-anchor: start; }
.flow__ring { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.flow__word rect { fill: var(--bg); stroke: none; }
.flow__word text { font: var(--w-normal) 13px var(--font); fill: var(--ink-2); stroke: none; }
.flow__node:hover > .graph__halo, .flow__node.is-on > .graph__halo, .flow__node:focus-visible > .graph__halo { opacity: 0.3; }
.flow__part:hover circle, .flow__part.is-on circle, .flow__part:focus-visible circle { fill: var(--accent); }
.flow__app:hover text, .flow__app.is-on text, .flow__app:focus-visible text { fill: var(--ink); text-decoration: underline; }
.flow__word:hover text, .flow__word.is-on text, .flow__word:focus-visible text { fill: var(--ink); text-decoration: underline; }
/* шторка снизу: на узком экране в ней описание точки, на которую нажали */
.sheet { display: none; }
@media (max-width: 860px) {
  .flow__row { grid-template-columns: minmax(0, 1fr); }
  .flow__side { display: none !important; }
  /* описание экрана стоит над картинкой; линия от предыдущей картинки гаснет к тексту и проявляется снова под ним */
  .flow__text { position: relative; align-items: center; text-align: center; padding: 44px 0; }
  .flow__row--1 .flow__text { padding-top: 0; }
  .flow__row + .flow__row .flow__text::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(180deg, var(--line-2), transparent 30%, transparent 70%, var(--line-2)); }
  .flow__text > * { position: relative; }
  .sheet { display: flex; flex-direction: column; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 22px var(--gutter) 28px;
    background: var(--surface); border-top: 1px solid var(--line-2); border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -12px 40px color-mix(in srgb, var(--ink) 14%, transparent);
    transform: translateY(105%); transition: transform .3s ease; }
  .sheet.is-open { transform: none; }
  .sheet strong { font-size: var(--t-h3); line-height: 1.3; font-weight: var(--w-medium); padding-right: 36px; }
  .sheet p { font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }
  .sheet__close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font: inherit; font-size: 26px; line-height: 1; color: var(--ink-3); cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) { .sheet { transition: none; } }

/* ---------- преимущества: те же плитки, но не ссылки ---------- */
.tiles--plain { display: flex; flex-wrap: wrap; }   /* плитки последнего ряда растягиваются на всю ширину: пустых мест нет */
.tiles--plain .tile { flex: 1 1 200px; min-height: 0; }
.tiles--plain .tile__title { margin-top: 0; }   /* текст плитки — от верха, а не от низа */
.tiles--plain .tile:hover { background: var(--bg); }
.band--alt .tiles--plain .tile:hover { background: var(--surface); }

/* ---------- меню на узком экране: кнопка справа открывает боковой ящик поверх страницы — содержимое он не сдвигает ---------- */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.burger, .drawer, .drawer__shade { display: none; }
.footer-legal { padding-bottom: 24px; font-size: 12px; line-height: 1.5; color: var(--ink-3); }   /* сноска к названиям со звёздочкой */
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a:hover { color: var(--ink); }
@media (min-width: 861px) { .nav { margin-right: auto; } }
@media (max-width: 860px) {
  .site-header { position: sticky; }
  .header-inner { flex-wrap: nowrap; }
  .nav { display: none; }
  .burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 0 9px; cursor: pointer; }
  .burger span { display: block; height: 1.5px; background: var(--ink); }
  .drawer__shade { display: block; position: fixed; inset: 0; z-index: 30; background: color-mix(in srgb, var(--ink) 45%, transparent); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
  .drawer { display: flex; flex-direction: column; gap: 28px; position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(320px, 86vw); padding: 72px 24px 28px;
    background: var(--surface); border-left: 1px solid var(--line); box-shadow: -16px 0 48px color-mix(in srgb, var(--ink) 16%, transparent);
    transform: translateX(105%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; overflow-y: auto; }
  .nav-toggle:checked ~ .drawer__shade { opacity: 1; pointer-events: auto; }
  .nav-toggle:checked ~ .drawer { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
  .nav-toggle:focus-visible ~ .site-header .burger { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
  .drawer__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1; color: var(--ink-2); cursor: pointer; }
  .drawer__nav { display: flex; flex-direction: column; font-size: 19px; font-weight: var(--w-medium); }
  .drawer__nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .drawer__actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
  .drawer__btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; }
  .drawer__btn img { width: 20px; height: 20px; flex: none; }
  .drawer__btn.btn--primary img { background: var(--bg); border-radius: 50%; }
  .drawer__btn.is-soon { opacity: 0.45; border-style: dashed; cursor: default; }
  .drawer__btn.is-soon:hover { border-color: var(--line-2); }
}
@media (prefers-reduced-motion: reduce) { .drawer, .drawer__shade { transition: none; } }

/* ---------- живая схема «как это работает»: копия блока с antonlozhkin.ru (site/theme/assets/home.css), значения — через
   имена того сайта, которые ниже приравнены к правилам этого ---------- */
.lm { --paper: var(--bg); --paper-2: var(--line); --line-strong: var(--line-2); --ink-1: var(--ink-2); --muted: var(--ink-3); --muted-2: var(--ink-3);
  --muted-3: var(--ink-3); --link: var(--accent); --dot-off: var(--line-2); --ease: cubic-bezier(0.22, 0.61, 0.36, 1); }
.band--alt .lm { --paper: var(--surface); }
/* живые схемы разделов (partials/line-live.html): граф производства мебели и то, что рядом с ним */
/* без подложки и рамки (Антон, 12.10): схема лежит прямо на странице, поэтому обводки точек и подписей — цветом страницы */
.lm { margin-top: 36px; color: var(--ink-2);
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.lm:empty { display: none; }
.lm { transition: opacity 0.7s var(--ease); }
.lm.is-fade { opacity: 0; }
.lm__node.is-hid { opacity: 0; pointer-events: none; }
.lm__edge.is-hid { opacity: 0; }
.lm--flow { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr) minmax(0, 0.9fr); gap: 24px; align-items: start; }
.lm__fig { min-width: 0; }
.lm__svg { display: block; width: 100%; height: auto; overflow: visible; }
.lm__edge { stroke: var(--line-strong); stroke-width: 1; transition: stroke 0.3s var(--ease), opacity 0.5s var(--ease); }
.lm__edge--gap { stroke-dasharray: 3 4; }
.lm__edge.is-on { stroke: var(--link); stroke-width: 1.5; }
.lm.is-heap .lm__edge { opacity: 0; }
.lm__node { cursor: pointer; transition: opacity 0.45s var(--ease); }
.lm__node:focus { outline: none; }
.lm__node circle { fill: var(--muted-2); stroke: var(--paper); stroke-width: 2; transition: fill 0.3s var(--ease), stroke 0.3s var(--ease); }
.lm__node text { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; transition: fill 0.3s var(--ease), opacity 0.5s var(--ease); }
.lm.is-heap .lm__node text { opacity: 0; }
.lm__node--deal circle { fill: var(--ink); }
/* сделки и люди чуть висят над страницей: тень под точкой и медленное покачивание, у людей то и другое слабее */
.lm__node--deal circle { filter: drop-shadow(0 7px 5px rgba(27, 33, 40, 0.30)); animation: lm-float 6s ease-in-out infinite; }
.lm__node--person circle { filter: drop-shadow(0 5px 4px rgba(27, 33, 40, 0.16)); animation: lm-float 7s ease-in-out -2s infinite; }
.lm__node:nth-child(even) circle { animation-delay: -3.5s; }
.lm__node--deal text { font-family: var(--font); font-size: 13px; fill: var(--ink); }
.lm__node--doc circle { fill: var(--paper); stroke: var(--muted-2); stroke-width: 1.5; }
.lm__node--money circle { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1.5; }
.lm__node--money.is-open circle { fill: var(--paper-2); }
.lm__node--gap circle { fill: var(--paper); stroke: var(--muted-2); stroke-width: 1.5; stroke-dasharray: 2.5 2.5; }
.lm__node--gap text { font-style: italic; }
.lm__node.is-dim { opacity: 0.28; }
.lm__node.is-on circle { stroke: var(--link); stroke-width: 2.5; }
.lm__node--deal.is-on circle, .lm__node--person.is-on circle { fill: var(--link); stroke: var(--paper); stroke-width: 2; }
.lm__node.is-on text, .lm__node:hover text, .lm__node:focus-visible text { fill: var(--link); }
.lm__node.is-paid circle, .lm__node.is-filled circle { fill: var(--ink); stroke: var(--ink); stroke-dasharray: none; }
.lm__node.is-filled text { font-style: normal; }
.lm--flow .lm__node text { font-size: 13px; }
.lm--flow .lm__node--deal text { font-size: 15px; }
.lm__legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; margin-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--muted-3); }
.lm__key { width: 9px; height: 9px; border-radius: 50%; box-sizing: border-box; margin-left: 12px; }
.lm__key:first-child { margin-left: 0; }
.lm__key--deal { background: var(--ink); }
.lm__key--person { background: var(--muted-2); }
.lm__key--money { border: 1.5px solid var(--ink-2); }
.lm__key--doc { border: 1.5px solid var(--muted-2); }
.lm__key--gap { border: 1.5px dashed var(--muted-2); }
.lm__kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.lm__cap { margin-top: 12px; min-height: 4.8em; font-size: 15px; line-height: 1.6; color: var(--ink-1); text-wrap: pretty; }
/* кнопки схем — слова без рамки: синие, под курсором подчёркнуты; выбранная — чёрная и подчёркнута */
.lm__btn, .lm__q { font: inherit; font-size: 15px; padding: 0; border: 0; background: none; color: var(--link); cursor: pointer; text-align: left;
  text-decoration: underline transparent; text-underline-offset: 5px; text-decoration-thickness: 1px; transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease); }
.lm__btn { margin-top: 16px; }
.lm__btn:hover, .lm__q:hover { text-decoration-color: currentColor; }
.lm__qs { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 16px; }
.lm__q.is-on { color: var(--ink); text-decoration-color: currentColor; }
.lm__ans { margin-top: 18px; min-height: 6.4em; font-size: 15px; line-height: 1.6; color: var(--ink); text-wrap: pretty; opacity: 0; transition: opacity 0.4s var(--ease); }
.lm__ans.is-in { opacity: 1; }
.lm__refs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; min-height: 26px; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.lm__ref { color: var(--ink-1); }
.lm__ref + .lm__ref::before { content: "· "; color: var(--muted-3); }
.lm__inbox { display: grid; gap: 16px; margin-top: 12px; min-height: 250px; align-content: start; }
.lm__msg { display: grid; gap: 2px; padding: 2px 0 2px 12px; border-left: 1px solid var(--line-strong); font-size: 13px; line-height: 1.45; color: var(--ink-2); animation: lm-in 0.4s var(--ease) both; }
.lm__msg b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.lm__msg-src { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.lm__today { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; min-height: 190px; align-content: start; font-size: 14px; line-height: 1.45; color: var(--ink); }
.lm__today li { padding-left: 16px; position: relative; min-height: 1.45em; }
.lm__today li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); transition: background 0.35s var(--ease), opacity 0.35s var(--ease); }
.lm__t { display: block; transition: opacity 0.35s var(--ease), color 0.35s var(--ease); }
.lm__t.is-out { opacity: 0; }
.lm__today li.is-hit::before, .lm__today li.is-new::before { background: var(--link); }
.lm__today li.is-hit .lm__t { color: var(--link); }
.lm__today li.is-done .lm__t { color: var(--muted-3); text-decoration: line-through; }
.lm__today li.is-done::before { background: var(--dot-off); }
.lm__today li.is-wait::before, .lm__today li.is-wait .lm__t { opacity: 0; }
.lm--flow, .lm--ask { position: relative; }
.lm__fly { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--link); opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); box-shadow: 0 0 0 4px rgba(31, 95, 191, 0.14); }
/* на широком экране в первых двух схемах текст слева, граф справа (Антон, 12.10); третья читается слева направо:
   входящее → карта → «Сегодня». На узком порядок прежний: сверху вниз. */
@media (min-width: 901px) {
  .lm { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
  .lm--map .lm__side, .lm--ask .lm__side { order: -1; }
  .lm--flow { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr) minmax(0, 0.9fr); }
}
/* схема во вкладке «Как это работает»: над шагами, шаги под ней неподвижны */
.tabs__panel > .lm { margin: 0 0 32px; }
/* вкладки одной высоты (Антон, 16.10): все панели лежат в одной ячейке, видна выбранная — высота секции по самой
   высокой. Колонки схемы с запасом на конечное состояние круга, чтобы шаги не сдвигались, пока он идёт (замер
   16.10 при reduced-motion: справа до 321px от ширины 1100, до 369px на 920, на 400 — до 302px). live.js запускает схему только
   в видимой панели. */
.tabs--chain { display: grid; grid-template-columns: minmax(0, 1fr); }
.tabs--chain > .tabs__bar { grid-row: 1; }
.tabs--chain > .tabs__panel { display: block; grid-row: 2; grid-column: 1; visibility: hidden; }
.tabs--chain > .tabs__radio:nth-of-type(1):checked ~ .tabs__panel:nth-of-type(1),
.tabs--chain > .tabs__radio:nth-of-type(2):checked ~ .tabs__panel:nth-of-type(2),
.tabs--chain > .tabs__radio:nth-of-type(3):checked ~ .tabs__panel:nth-of-type(3),
.tabs--chain > .tabs__radio:nth-of-type(4):checked ~ .tabs__panel:nth-of-type(4),
.tabs--chain > .tabs__radio:nth-of-type(5):checked ~ .tabs__panel:nth-of-type(5),
.tabs--chain > .tabs__radio:nth-of-type(6):checked ~ .tabs__panel:nth-of-type(6),
.tabs--chain > .tabs__radio:nth-of-type(7):checked ~ .tabs__panel:nth-of-type(7),
.tabs--chain > .tabs__radio:nth-of-type(8):checked ~ .tabs__panel:nth-of-type(8) { visibility: visible; }
@media (min-width: 901px) { .tabs__panel > .lm { min-height: 375px; } }
@media (min-width: 1100px) { .tabs__panel > .lm { min-height: 325px; } }
@media (max-width: 900px) {
  .tabs__panel > .lm { margin-bottom: 40px; }
  .tabs__panel > .lm > .lm__col:first-child { min-height: 250px; }
  .tabs__panel > .lm > .lm__col:nth-child(3) { min-height: 320px; }   /* последним в схеме стоит точка .lm__fly */
}
/* правая колонка: страница сделки, заготовка документа, карточка идеи */
.lm__page { display: grid; gap: 8px; margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.lm__title { font-weight: 600; min-height: 1.45em; }
.lm__row { display: grid; gap: 1px; padding-left: 10px; border-left: 2px solid var(--line-strong); transition: border-color 0.35s var(--ease); }
.lm__k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.lm__row.is-hit { border-color: var(--link); }
.lm__row.is-hit .lm__v { color: var(--link); }
.lm__row.is-miss .lm__v { color: var(--muted); font-style: italic; }
.lm__kicker--sub { margin-top: 22px; }
.lm__today--short { min-height: 0; }
.lm__file { margin-top: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--link); opacity: 0; transition: opacity 0.4s var(--ease); min-height: 1.4em; }
.lm__file.is-in { opacity: 1; }
.lm__status { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); min-height: 1.4em; }
.lm__args { display: grid; gap: 8px; }
.lm__arg { display: grid; gap: 1px; padding-left: 10px; border-left: 2px solid var(--ink); animation: lm-in 0.4s var(--ease) both; }
.lm__arg--con { border-left-style: dashed; border-left-color: var(--muted-2); }
.lm__test { display: grid; gap: 8px; }
.lm__test .lm__row { animation: lm-in 0.4s var(--ease) both; border-color: var(--link); }
.lm__node--idea circle { fill: var(--paper); stroke: var(--link); stroke-width: 2; }
@keyframes lm-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes lm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .lm, .lm--flow { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lm__inbox, .lm__today { min-height: 0; }
  .lm--flow .lm__inbox { min-height: 150px; }
  .lm__node text { font-size: 13px; }
  .lm__node--deal text { font-size: 15px; }
  .lm__cap, .lm__ans { min-height: 0; }
}
/* на телефоне граф втрое уже своих 720 единиц: подписаны только сделки и то, что сейчас подсвечено */
@media (max-width: 640px) {
  .lm__node text { font-size: 22px; stroke-width: 7px; opacity: 0; }
  .lm__node--deal text { font-size: 24px; opacity: 1; }
  .lm__node.is-on text { opacity: 1; }
  .lm.is-heap .lm__node text { opacity: 0; }
  .lm__node circle { transform: scale(1.6); animation: none; }
  .lm__node text, .lm--flow .lm__node text { font-size: 22px; transform: translateY(10px); }
  .lm__node--deal text, .lm--flow .lm__node--deal text { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .lm__msg, .lm__node circle { animation: none; } }

/* текст между живой схемой и вкладками: отделён от схемы сверху и от вкладок снизу */
.band__inner > .lm + p { margin-top: 64px; }
.band__inner > .lm + p + .tabs { margin-top: 64px; }

/* ---------- способы получить: две крупные ссылки со значком ---------- */
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); margin-top: 40px; }
.way { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, background .2s; }
.way:hover { border-color: var(--ink); color: var(--ink); }
.way__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--bg); margin-bottom: 8px; }
.way__icon img { width: 28px; height: 28px; object-fit: contain; }
.way__title { font-size: var(--t-h2); line-height: 1.25; letter-spacing: -0.015em; font-weight: var(--w-medium); }
.way__text { font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); max-width: 420px; }
.band--dark .way { background: transparent; border-color: var(--dark-line); color: var(--dark-ink); }
.band--dark .way:hover { border-color: var(--dark-ink); background: color-mix(in srgb, var(--dark-ink) 6%, transparent); color: var(--dark-ink); }
.band--dark .way__icon { background: var(--dark-ink); }
.band--dark .way__text { color: var(--dark-ink-2); }
.way--soon { opacity: 0.45; border-style: dashed; }   /* ссылки ещё нет */
.way--soon:hover, .band--dark .way--soon:hover { border-color: var(--line-2); background: transparent; }
.band--dark .way--soon:hover { border-color: var(--dark-line); }

/* отступ под заголовками второго уровня — в полтора раза больше обычного шага (Антон, 13.10): 24 → 36, 40 → 60, 36 → 54, 18 → 27, 12 → 18 */
.band__inner > .band__title + * { margin-top: 36px; }
.band__inner > .band__title + .tiles, .band__inner > .band__title + .cols, .band__inner > .band__title + .tabs, .band__inner > .band__title + .ways { margin-top: 60px; }
.band__inner > .band__title + .lm { margin-top: 54px; }
.prose h2 + * { margin-top: 27px; }
.flow__title { margin-bottom: 6px; }

/* ---------- поиск ---------- */
.search-modal { position: fixed; inset: 0; z-index: 20; display: none; }
.search-modal.is-open { display: block; }
.search-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 40%, transparent); }
.search-panel { position: relative; max-width: 640px; margin: 10vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
@media (max-width: 720px) { .search-panel { margin: 16px; } }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; font: inherit; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); background: var(--bg); color: var(--ink); }
.search-form button { font: inherit; font-size: var(--t-small); padding: 10px 16px; border-radius: var(--radius-pill); border: 1px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; }
.search-form button.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.search-results ul { list-style: none; padding: 0; margin-top: 16px; }
.search-results li { padding: 12px 0; border-top: 1px solid var(--line); }
.search-results a { font-weight: var(--w-medium); }
.search-results p { font-size: var(--t-small); margin-top: 4px; }
