/* Полоса «что это за проект» над каждой вкладкой: тоннель, описание, вход
   в бота. Движение пакетов объявляет разметка (data-art="flow"),
   проигрывает js/art.js; здесь — только их места без движения. */

.project {
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 14px;
  padding: 12px 18px 12px 14px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 6%, var(--panel)), var(--panel) 38%);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

/* ——— Тоннель ——— */
.route { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.route-end { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 56px; }
.route-end svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.route-end small, .route-note { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 10.5px; line-height: 1; color: var(--muted); white-space: nowrap; }
.route-track { position: relative; flex: 1 1 auto; height: 56px; }
.route-line {
  position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 40%, var(--line)) 0 6px, transparent 6px 10px);
}
/* Стена блокировок: пунктир поперёк дорожки, щит — проход сквозь неё. */
.route-wall {
  position: absolute; left: 50%; top: 4px; bottom: 16px; width: 2px; margin-left: -1px;
  background: repeating-linear-gradient(180deg, var(--down) 0 4px, transparent 4px 7px); opacity: .75;
}
.route-note { color: var(--down-ink); opacity: .85; }
.route-gate.emblem { position: absolute; z-index: 2; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; }

/* Пакет — блок шириной с дорожку, точка у его левого края: сдвиг блока
   на 100% своей ширины проводит точку через всю дорожку. */
.route-flow { position: absolute; inset: 0; pointer-events: none; }
.route-flow b {
  position: absolute; top: 50%; left: -4px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 8px 1px var(--c);
}
.route-flow:nth-child(2) { transform: translateX(10%); }
.route-flow:nth-child(3) { transform: translateX(28%); }
.route-flow:nth-child(4) { transform: translateX(66%); }
.route-flow:nth-child(5) { transform: translateX(80%); }
.route-flow:nth-child(6) { transform: translateX(94%); }

/* ——— Описание ——— */
.project-text { min-width: 0; }
.project-title { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -0.005em; }
.project-title b { font-weight: 700; letter-spacing: -0.01em; }
.project-lead { margin: 3px 0 8px; max-width: 110ch; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
/* Протоколы — как легенда графика: цвет только у образца. */
.project-protos { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }

/* ——— Вход в бота ———
   Сдержанно, как остальные элементы страницы: поверхность панели и тонкая
   рамка, акцент — только значок и рамка при наведении. */
.bot-cta {
  position: relative; display: inline-flex; align-items: center; gap: 11px; overflow: hidden;
  padding: 8px 16px 8px 9px; border-radius: 8px; white-space: nowrap; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line);
  transition: border-color .15s, background-color .15s;
}
.bot-cta:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--panel-2)); }
.bot-cta-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); }
.bot-cta-ico svg { width: 17px; height: 17px; margin-left: -2px; fill: var(--accent); }
.bot-cta-text b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.bot-cta-text small { display: block; font: 11.5px/1.3 var(--mono); color: var(--muted); }
.bot-cta-glint { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.bot-cta-glint i { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(100deg, transparent, var(--glint), transparent); opacity: .18; transform: translateX(-100%); }

.foot-bot { color: var(--ink-2); border-bottom: 1px dashed currentColor; }
.foot-bot:hover { color: var(--accent); }

@media (max-width: 1180px) {
  .project { grid-template-columns: 200px minmax(0, 1fr) auto; gap: 18px; }
}
@media (max-width: 860px) {
  .project { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
  .route { max-width: 380px; }
  .bot-cta { justify-content: center; }
}
@media (max-width: 560px) {
  .route-end, .route-track { height: 46px; }
  .project-lead { display: none; }
  .project-title { margin-bottom: 8px; }
  .bot-cta { padding-block: 8px; }
}
