/* ==========================================================================
   Страница «Портфолио» — демонстрационные модели компьютерного зрения.
   Наследует дизайн-токены и базовые компоненты из style.css
   ========================================================================== */

/* Якоря не должны прятаться под хедером и подменю */
html { scroll-padding-top: calc(var(--nav-h) + 74px); }

code {
  font-family: var(--mono);
  font-size: .9em;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(34, 211, 238, .11);
  border: 1px solid rgba(34, 211, 238, .24);
  color: #a5f3fc;
  white-space: nowrap;
}

/* ---------- Хиро страницы ---------- */
.cv-hero {
  position: relative;
  padding: clamp(40px, 6vw, 76px) 0 clamp(36px, 5vw, 56px);
}
.cv-hero__inner { max-width: 900px; }

.cv-hero__title {
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.06;
  margin-bottom: 20px;
  animation: fadeUp .8s .06s var(--ease) both;
}
.cv-hero__lead {
  font-size: clamp(1rem, 1.7vw, 1.13rem);
  color: var(--text-soft);
  max-width: 72ch;
  margin-bottom: 28px;
  animation: fadeUp .8s .12s var(--ease) both;
}
.cv-hero .badge { animation: fadeUp .8s var(--ease) both; }

.cv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  animation: fadeUp .8s .18s var(--ease) both;
}
.cv-stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
}
.cv-stat__value {
  font-family: var(--mono);
  font-size: 1.12rem;
  font-weight: 700;
  color: #eaf2ff;
  text-shadow: 0 0 18px rgba(129, 140, 248, .7);
}
.cv-stat__label { font-size: 13.5px; color: var(--text-dim); }

.cv-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeUp .8s .24s var(--ease) both;
}

/* ---------- Подменю ---------- */
.subnav {
  position: sticky;
  top: var(--nav-h);
  z-index: 80;
  padding: 12px 0;
  background: rgba(8, 11, 18, .82);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-block: 1px solid var(--line);
}
.subnav__inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav__link {
  flex: none;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 550;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color .22s, background .22s, border-color .22s;
}
.subnav__link:hover { color: #fff; background: var(--surface-hi); }
.subnav__link.is-active {
  color: var(--accent);
  border-color: rgba(34, 211, 238, .38);
  background: rgba(34, 211, 238, .1);
}

/* ---------- Кейс AI-платформы ---------- */
/* --- KPI-плитки --- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.kpi {
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: transform .28s var(--ease), border-color .28s, background .28s;
}
.kpi:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, .42); background: var(--surface-hi); }
.kpi__value {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.1;
  color: #eaf2ff;
  text-shadow: 0 0 20px rgba(129, 140, 248, .7);
}
.kpi__value small { font-size: .55em; font-weight: 500; color: var(--text-dim); text-shadow: none; }
.kpi__label { display: block; margin-top: 8px; font-size: 13px; color: var(--text-soft); }
.kpi__hint { display: block; margin-top: 3px; font-size: 11.8px; color: var(--text-dim); }

/* --- Воронка --- */
.funnel { display: grid; gap: 9px; }
.funnel__row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 74px 56px;
  gap: 14px;
  align-items: center;
}
.funnel__label { font-size: 14px; color: var(--text-soft); }
.funnel__row--head .funnel__label { color: #fff; font-weight: 620; }
.funnel__track {
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  overflow: hidden;
}
.funnel__track i {
  display: block;
  height: 100%;
  width: var(--w, 0);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .9s var(--ease);
}
.funnel__row--dim .funnel__track i { background: linear-gradient(90deg, #64748b, #475569); }
.funnel__row--accent .funnel__track i { background: linear-gradient(90deg, #34d399, #22d3ee); }
.funnel__val {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  text-align: right;
}
.funnel__pct { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); text-align: right; }

/* --- Столбчатая диаграмма по дням --- */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding: 0 4px;
}
.bars__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  height: 100%;
}
.bars__val { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: #fff; }
.bars__bar {
  width: 100%;
  max-width: 74px;
  height: var(--h, 0);
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: height .9s var(--ease);
}
.bars__col--zero .bars__bar { background: rgba(255, 255, 255, .12); }
.bars__label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  text-align: center;
}
.bars__label b { display: block; color: var(--text-soft); font-weight: 500; }

/* --- Полоса распределения --- */
.split {
  display: flex;
  height: 16px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
}
.split span { display: block; height: 100%; }
.split-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px 18px;
  margin-top: 16px;
}
.split-legend li { display: flex; align-items: center; gap: 9px; font-size: 13.4px; color: var(--text-soft); }
.split-legend i { flex: none; width: 11px; height: 11px; border-radius: 3px; }
.split-legend b { margin-left: auto; font-family: var(--mono); font-size: 12.8px; color: #fff; }

/* --- Список итогов --- */
.outcomes { display: grid; gap: 8px; }
.outcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 66px;
  gap: 12px;
  align-items: center;
}
.outcome__name { font-size: 14px; color: var(--text-soft); }
.outcome__name em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-dim);
}
.outcome__track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.outcome__track i { display: block; height: 100%; width: var(--w, 0); border-radius: 99px; background: var(--grad); }
.outcome__val { font-family: var(--mono); font-size: 13px; color: #fff; text-align: right; white-space: nowrap; }

/* --- Галерея экранов --- */
.gallery-block { margin-top: clamp(30px, 4vw, 48px); }
.gallery-block__title { font-size: 1.05rem; font-weight: 650; margin-bottom: 8px; }
.gallery-block__sub {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.62;
  max-width: 78ch;
  margin-bottom: 18px;
}
.gallery-block + .gallery-block { margin-top: 34px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 12px;
}
.gallery--phone { grid-template-columns: repeat(auto-fill, minmax(154px, 1fr)); }
.shot-thumb {
  display: block;
  padding: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0a0e16;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .28s var(--ease), border-color .28s, box-shadow .28s;
}
.shot-thumb:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, .45);
  box-shadow: 0 20px 44px -26px rgba(0, 0, 0, .95);
}
.shot-thumb img { width: 100%; height: auto; display: block; }
.shot-thumb__cap {
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}
.shot-thumb__num {
  font-family: var(--mono);
  color: var(--accent);
  margin-right: 5px;
}

/* --- Лайтбокс --- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 20px;
}
.lb[hidden] { display: none; }
.lb__overlay { position: absolute; inset: 0; background: rgba(3, 5, 10, .88); backdrop-filter: blur(8px); animation: fadeIn .22s ease both; }
.lb__box {
  position: relative;
  width: min(1360px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-hi);
  border-radius: 18px;
  background: #0a0e16;
  overflow: hidden;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 1);
  animation: modalIn .32s var(--ease) both;
}
.lb__scroll { overflow: auto; }
.lb__scroll img { display: block; width: 100%; height: auto; }
.lb__cap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  font-size: 13.6px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 22, 34, .96), rgba(10, 14, 22, .96));
}
.lb__cap span { flex: 1; min-width: 0; }
.lb__close,
.lb__nav {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text-soft);
  transition: color .2s, border-color .2s, background .2s;
}
.lb__close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(10, 14, 22, .8); backdrop-filter: blur(6px); }
.lb__close:hover,
.lb__nav:hover { color: #fff; border-color: var(--line-hi); background: rgba(255, 255, 255, .1); }
.lb__nav[disabled] { opacity: .35; cursor: default; }
.lb__count { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0e16;
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .95);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
}
.shot figcaption {
  padding: 14px 20px;
  font-size: 13.2px;
  color: var(--text-dim);
  line-height: 1.6;
}
.shot figcaption strong { color: var(--text-soft); }

.platform__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: clamp(30px, 4vw, 48px);
}
.feature {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.feature:hover {
  transform: translateY(-5px);
  border-color: rgba(129, 140, 248, .42);
  background: var(--surface-hi);
}
.feature__num {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  margin-bottom: 14px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .24);
}
.feature h3 { font-size: 1.02rem; font-weight: 650; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-dim); line-height: 1.62; }

/* --- Разбор оценки: две колонки --- */
.score-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
  margin-top: clamp(30px, 4vw, 48px);
}
/* --- Панель / разбор оценки: две колонки --- */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
  margin-top: clamp(26px, 3vw, 40px);
}
.cols--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.score,
.panel {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
}
.score__title,
.panel__title {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.score__note,
.panel__note {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.55;
}
.score__group + .score__group { margin-top: 18px; }
.score__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 58px;
  gap: 12px;
  align-items: center;
}
.score__name { font-size: 14.6px; font-weight: 600; color: #fff; }
.score__bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.score__bar i {
  display: block;
  height: 100%;
  width: var(--w, 0);
  border-radius: 99px;
  background: var(--grad);
}
.score__val {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-soft);
  text-align: right;
  white-space: nowrap;
}
.score__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 2px;
}
.score__sub li {
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  font-size: 11.8px;
  color: var(--text-dim);
}
.score__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.score__total span {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.score__total strong {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: #eaf2ff;
  text-shadow: 0 0 22px rgba(129, 140, 248, .75);
}

/* --- Сценарии карьеры --- */
.scenarios {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
}
.scenarios__list { display: grid; gap: 12px; }
.scenario {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .028);
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.scenario:hover { transform: translateY(-3px); border-color: var(--line-hi); background: var(--surface-hi); }
.scenario--rec {
  border-color: rgba(251, 146, 60, .36);
  background: linear-gradient(180deg, rgba(251, 146, 60, .09), rgba(255, 255, 255, .014));
}
.scenario--rec:hover { border-color: rgba(251, 146, 60, .6); }
.scenario__flag {
  position: absolute;
  top: 12px; right: 14px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #fed7aa;
  background: rgba(251, 146, 60, .16);
  border: 1px solid rgba(251, 146, 60, .4);
}
.scenario__kind {
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scenario__name { font-size: 1.05rem; font-weight: 680; color: #fff; }
.scenario__pay {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: #86efac;
}
.scenario__time { font-size: 12.8px; color: var(--text-dim); }

/* ---------- Реальный проект (портретное видео + описание) ---------- */
.case {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .95);
}

.case__visual { flex: none; }

.case__media {
  position: relative;
  width: clamp(230px, 25vw, 310px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-hi);
  background: #05070c;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .95), 0 0 0 1px rgba(129, 140, 248, .14);
}
.case__media video {
  width: 100%;
  height: auto;
  display: block;
  background: #05070c;
}

.case__caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: clamp(230px, 25vw, 310px);
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: .02em;
  text-align: center;
  color: #6ee7b7;
}
.case__flag-dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
  animation: pulse 2.2s infinite;
}

.case__body { min-width: 0; }
.case__title {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 750;
  letter-spacing: -.02em;
  color: #fff;
  margin-bottom: 16px;
}
.case__text {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 68ch;
}
.case__facts { margin-top: 22px; }
.case__tags { margin-top: 18px; }

/* ---------- Демо-карточки ---------- */
.demos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}
.demo {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  overflow: hidden;
  transition: transform .32s var(--ease), border-color .32s, box-shadow .32s;
}
.demo:hover {
  transform: translateY(-5px);
  border-color: var(--line-hi);
  box-shadow: 0 28px 64px -32px rgba(0, 0, 0, .95), 0 0 0 1px rgba(129, 140, 248, .16);
}

.demo__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #05070c;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.demo__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #05070c;
}
.demo__badges {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.demo__index,
.demo__kind {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .05em;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .16);
}
.demo__index {
  font-family: var(--mono);
  color: #eaf2ff;
  background: rgba(8, 11, 18, .68);
}
.demo__kind {
  text-transform: uppercase;
  color: #a5f3fc;
  background: rgba(8, 30, 38, .68);
  border-color: rgba(34, 211, 238, .34);
}

.demo__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 20px;
}
.demo__title {
  font-size: 1.14rem;
  font-weight: 680;
  line-height: 1.34;
  color: #fff;
  margin-bottom: 10px;
}
.demo__desc {
  font-size: 14.4px;
  color: var(--text-soft);
  margin-bottom: 18px;
}

.demo__facts {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .028);
}
.demo__fact {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: baseline;
}
.demo__fact dt {
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.demo__fact dd {
  margin: 0;
  font-size: 13.8px;
  color: var(--text);
  line-height: 1.55;
}

.demo__tags { margin-top: auto; }

/* ---------- Типы задач ---------- */
.tasks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 16px;
}
.task {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.task:hover {
  transform: translateY(-5px);
  border-color: rgba(129, 140, 248, .42);
  background: var(--surface-hi);
}
.task__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  margin-bottom: 15px;
  color: var(--accent);
  background: rgba(34, 211, 238, .09);
  border: 1px solid rgba(34, 211, 238, .22);
}
.task h3 { font-size: 1.03rem; font-weight: 650; margin-bottom: 8px; }
.task p { font-size: 14px; color: var(--text-dim); line-height: 1.62; }
.task__ref {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

/* Карточка реального проекта среди типов задач */
.task--real {
  position: relative;
  border-color: rgba(52, 211, 153, .34);
  background: linear-gradient(180deg, rgba(52, 211, 153, .08), rgba(255, 255, 255, .014));
}
.task--real:hover { border-color: rgba(52, 211, 153, .6); }
.task--real .task__icon {
  color: #6ee7b7;
  background: rgba(52, 211, 153, .1);
  border-color: rgba(52, 211, 153, .28);
}
.task__flag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a7f3d0;
  background: rgba(52, 211, 153, .14);
  border: 1px solid rgba(52, 211, 153, .34);
}
.task--real .task__ref { color: #6ee7b7; }

/* ---------- Пайплайн ---------- */
.pipeline {
  position: relative;
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.pipeline::before {
  content: "";
  position: absolute;
  left: 25px; top: 26px; bottom: 26px;
  width: 2px;
  background: linear-gradient(180deg, rgba(34, 211, 238, .6), rgba(192, 132, 252, .4), transparent);
  border-radius: 2px;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  align-items: start;
  padding: 20px 24px 20px 0;
}
.step__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 15px;
  border: 1px solid rgba(129, 140, 248, .45);
  background: #0c1119;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  box-shadow: 0 0 0 6px rgba(8, 11, 18, 1);
}
.step__body h3 { font-size: 1.05rem; font-weight: 650; margin-bottom: 7px; }
.step__body p { font-size: 14.3px; color: var(--text-soft); line-height: 1.65; }
.step__tools {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ---------- Инфоблок с врезкой ---------- */
.note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 26px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(129, 140, 248, .3);
  background: rgba(129, 140, 248, .09);
}
.note__icon { flex: none; color: #a5b4fc; margin-top: 2px; }
.note p { font-size: 14px; color: #c7d2fe; }

/* ---------- CTA ---------- */
.cv-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17, 24, 39, .72), rgba(9, 12, 20, .72));
}
.cv-cta__text h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  margin-bottom: 8px;
}
.cv-cta__text p { color: var(--text-soft); font-size: 15px; max-width: 60ch; }
.cv-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .demos { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; }
  .case__visual { margin-inline: auto; }
  .case__media,
  .case__caption { width: min(320px, 100%); }
  .score-wrap,
  .cols { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .demo__body { padding: 18px 17px 17px; }
  .demo__fact { grid-template-columns: 1fr; gap: 3px; }
  .step { grid-template-columns: 40px 1fr; gap: 14px; padding-right: 0; }
  .step__num { width: 40px; height: 40px; border-radius: 12px; font-size: 13px; }
  .pipeline::before { left: 19px; }
  .cv-cta { flex-direction: column; align-items: stretch; }
  .cv-cta__actions .btn { justify-content: center; }
  .subnav { top: var(--nav-h); }
  .case { padding: 18px 16px 22px; }
  .case__media { width: min(260px, 100%); }
  .score__row { grid-template-columns: minmax(0, 1fr) 58px; }
  .score__bar { display: none; }
  .shot figcaption { padding: 12px 15px; font-size: 12.6px; }
  .funnel__row { grid-template-columns: minmax(0, 1fr) 62px; gap: 8px 12px; }
  .funnel__track { grid-column: 1 / -1; grid-row: 2; height: 22px; }
  .funnel__pct { display: none; }
  .bars { height: 150px; gap: 7px; }
  .bars__val { font-size: 11px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .lb { padding: 8px; }
  .lb__cap { padding: 11px 13px; font-size: 12.6px; }
}

@media print {
  .subnav, .demo__media, .case__media { display: none !important; }
  .shot { box-shadow: none; }
}
