/* ==========================================================
   Общий файл стилей: главная страница и страница кейса.
   Предыдущие версии: index-v14.html / home-v14.css и старше.

   - общий клетчатый фон на body (одна непрерывная сетка)
   - голубые поверхности (заметка, схема, обложка) непрозрачны:
     сетка сквозь них не просвечивает
   - сетка 12 колонок; правая опорная линия — колонка 6
   ========================================================== */

:root {
  --bg: #f9fbfe;
  --ink: #13233f;
  --ink-2: #4a5b78;
  --blue: #1f5fc8;
  --blue-ink: #1a55b5;
  --sky: #e3f0fc;
  --sky-2: #edf5fd;           /* очень светлые поверхности: заметка, схема, обложка */
  --sky-3: #cde5fa;           /* маркер, главный этап схемы */
  --line: #d3e3f2;
  --line-2: #b9d3ee;
  --arrow: #6b7e9f;
  --white: #fff;
  --grid: rgba(31, 95, 200, .07);
  --green: #0f7a3d;
  --mint: #86d9c5;
  --mint-ink: #0b6f60;
  --amber-bg: #fdf0d5;
  --amber-line: #efce8a;
  --amber-ink: #5a3d00;
  --mint-bg: #e4f6f0;
  --mint-line: #a9dccc;

  --f-display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gut: clamp(20px, 4.5vw, 64px);
  --gap: 24px;
  --bar: 72px;                /* высота верхней области навигации */
  --r-md: 20px;
  --r-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; font-weight: 400; -webkit-font-smoothing: antialiased;
  background-color: var(--white);
}
/* единая непрерывная клетка: имя, hero и заметка — один блок без швов */
.topzone {
  background-color: var(--white);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: 0 100%;          /* сетка отсчитывается от нижнего края: рядом со стыком нет второй линии */
  border-bottom: 1px solid var(--line-2);   /* единственный источник границы со строкой продуктов */
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--f-display); font-weight: 500; letter-spacing: -0.025em; line-height: 1.12; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.left { grid-column: 1 / span 5; }
.right { grid-column: 6 / -1; }
.muted { color: var(--ink-2); }
.meta { font-size: .875rem; line-height: 1.45; color: var(--ink-2); }
.eyebrow { font-size: .875rem; color: var(--ink-2); letter-spacing: .01em; }

/* ---------- Верхний ряд и плавающая капсула ---------- */
.top { height: 60px; }

/* Шапка — единственный закреплённый элемент: навигация-капсула и отдельная кнопка «Написать мне»; подложки нет, клики по странице не блокируются */
/* Десктоп: ширина шапки = ширина контентного контейнера (.wrap); навигация строго по центру, «Написать мне» у правой границы контента */
.capsule { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 30; width: 100%; max-width: var(--wrap); padding-inline: var(--gut); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 52px; pointer-events: none; }
.capsule > * { pointer-events: auto; }
.capsule__nav { grid-column: 2; align-self: stretch; display: flex; gap: 4px; padding: 4px; align-items: stretch; background: var(--white); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 6px 24px rgba(19, 35, 63, .06); }
.capsule { transition: transform .3s ease; }
.capsule.is-hidden { transform: translate(-50%, calc(-100% - 24px)); }
@media (prefers-reduced-motion: reduce) { .capsule { transition: none; } }
.capsule a { display: flex; align-items: center; padding: 0 20px; white-space: nowrap; border-radius: 999px; font-size: .9375rem; font-weight: 500; text-decoration: none; transition: background-color .2s ease; }
.capsule a span { margin-left: 4px; }
.capsule a:hover { background: var(--sky-2); }
.capsule a[aria-current="true"] { background: var(--sky); }
/* CTA «Написать мне ↗»: не вкладка, а внешнее действие — акцентная заливка, как у основных кнопок */
.capsule a.capsule__cta { grid-column: 3; justify-self: end; gap: 5px; height: 42px; padding: 0 20px; background: var(--blue-ink); color: var(--white); transition: background-color .2s ease; }  /* 42px = высота пункта навигации внутри капсулы (52 − рамка − отступы) */
.capsule a.capsule__cta:hover { background: #174a9e; }
.capsule a.capsule__cta .capsule__ar { margin-left: 0; font-size: 1em; line-height: 1; }
.capsule a.capsule__cta:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 2px; }

/* ---------- Первый экран ---------- */
.hero { padding-block: clamp(12px, 1.6vw, 20px) clamp(32px, 4vw, 48px); overflow-x: clip; }
.hero__t { grid-column: 1 / -1; }
.hero__name { font-size: 1.0625rem; font-weight: 500; color: var(--ink-2); margin-bottom: 10px; }
.hero__t h1 { font-size: clamp(2.625rem, 6.2vw, 5.25rem); line-height: 1.02; letter-spacing: -0.04em; }
.hero__t h1 mark { background: linear-gradient(transparent 62%, var(--sky-3) 62%, var(--sky-3) 92%, transparent 92%); color: inherit; padding: 0; }
/* позиционирование смещено к правой опорной линии сетки: слева остаётся воздух */
.hero__d { margin: clamp(18px, 2.4vw, 30px) 0 0 calc((100% + var(--gap)) * 5 / 12); font-size: clamp(1.1875rem, 1.55vw, 1.375rem); line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); }
.hero__d .s { display: block; }

/* ---------- Строка продуктов ---------- */
.strip { background: var(--white); border-bottom: 1px solid var(--line-2); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding-block: 20px; min-height: 68px; }
.strip__l { flex: none; font-size: .875rem; color: var(--ink-2); }
/* названия разделены пространством; каждое остаётся целым и при нехватке места переходит на новую строку */
.strip__n { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; font-size: 1.0625rem; font-weight: 400; line-height: 1.4; color: #3a4a66; }
.strip__n li { white-space: nowrap; }
#work { padding-top: clamp(36px, 4.5vw, 56px); }

/* ---------- Работы ---------- */
.label { font-size: .9375rem; font-weight: 500; color: var(--ink-2); font-family: var(--f-body); letter-spacing: 0; margin-bottom: 18px; }

/* ---------- Коллекция Aifory Pro: три направления в одном контейнере ---------- */
.coll { padding: clamp(20px, 3vw, 32px); background: #f7fafd; border: 1px solid var(--line); border-radius: 24px; }
.coll__h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; margin-bottom: clamp(18px, 2.4vw, 26px); }
.coll__t { font-size: clamp(1.5rem, 2.2vw, 1.875rem); letter-spacing: -0.03em; }
.coll__s { margin: 0; font-size: 1rem; color: var(--ink-2); }
.coll__row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 28px); margin-top: clamp(20px, 2.4vw, 28px); }

/* карточка работы: белый лист со смещённой подложкой; вся карточка кликабельна через одну ссылку-заголовок */
.k { position: relative; display: flex; flex-direction: column; gap: 22px; padding: clamp(22px, 2.6vw, 30px); background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: 8px 8px 0 #e4eef9; }
.k--link { cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.k--link:hover { transform: translateY(-4px); box-shadow: 10px 12px 0 #d3e5f8; border-color: #98bde6; }
.k--link:has(.k__link:focus-visible) { outline: 3px solid var(--blue); outline-offset: 4px; }
.k__link { color: inherit; text-decoration: none; }
.k__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.k__link:focus-visible { outline: none; }
.k__no { font-size: .875rem; color: var(--ink-2); letter-spacing: .01em; }
.k__title { margin-top: 4px; font-size: clamp(2.25rem, 3.4vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.08; }
.k__title--m { font-size: clamp(1.75rem, 2.6vw, 2.125rem); line-height: 1.12; }
.k__thesis { margin-top: 10px; font-size: 1.125rem; line-height: 1.5; max-width: 52ch; text-wrap: pretty; }
.k__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.k__foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: auto; }
.k__st { font-size: .9375rem; color: var(--ink-2); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; background: var(--sky); border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); font-family: var(--f-body); font-size: .96875rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.btn:hover { background: var(--sky-3); border-color: #98bde6; }
.btn span { display: inline-block; transition: transform .2s ease; }
.btn:not([aria-expanded]):hover span { transform: translateX(3px); }
.k--link:hover .btn { background: var(--sky-3); border-color: #98bde6; }
.k--link:hover .btn span { transform: translateX(3px); }
/* главное действие страницы: тёмно-синяя заливка, белый текст (6,98:1; при наведении 8,37:1) */
.btn--primary, .k--link:hover .btn--primary { background: #1a55b5; border-color: #1a55b5; color: #fff; }
.btn--primary:hover, .k--link:hover .btn--primary { background: #174a9e; border-color: #174a9e; }
.btn--quiet { background: transparent; }
.btn--quiet:hover { background: var(--sky); }
.btn.is-off { background: transparent; color: var(--ink-2); border-style: dashed; cursor: default; }
.btn.is-off:hover { background: transparent; border-color: var(--line-2); }

/* регистрация: схема «раньше / после» */
.reg__lanes { display: grid; gap: 12px; padding: 18px; background: #f7fafd; border-radius: 14px; }
.ln { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; }
.ln__l { font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.ln__s { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.pl { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 60px; padding: 8px 14px; background: var(--white); border: 1px solid var(--line-2); border-radius: 12px; font-size: .9375rem; line-height: 1.3; font-weight: 500; }
.pl small { font-size: .75rem; font-weight: 400; line-height: 1.3; }
.pl__t { display: inline-flex; align-items: center; gap: 6px; }
/* стрелка строго по центру промежутка 36px: поля по 7px с обеих сторон */
.pl + .pl::before { content: ""; position: absolute; left: -29px; top: 50%; width: 22px; height: 1.5px; margin-top: -.75px; background: var(--arrow); }
.pl + .pl::after { content: ""; position: absolute; left: -14px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-top: 1.5px solid var(--arrow); border-right: 1.5px solid var(--arrow); transform: rotate(45deg); }
.pl--kyc { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }
.pl--kyc small { color: var(--amber-ink); }

/* метрика: до → после, цифры крупно, подписи связаны со своими значениями */
.reg__res { display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.reg__cmp { display: grid; grid-template-columns: minmax(0, max-content) 28px minmax(0, max-content); grid-template-rows: auto auto auto; column-gap: clamp(16px, 2.4vw, 28px); row-gap: 6px; align-items: start; }
.reg__v { display: contents; }
.reg__v--a > * { grid-column: 1; }
.reg__v--b > * { grid-column: 3; }
.reg__k { grid-row: 1; margin: 0; font-size: .875rem; line-height: 1.3; color: var(--ink-2); }
.reg__n { grid-row: 2; margin: 0; font-family: var(--f-display); font-size: clamp(2.5rem, 4vw, 3.25rem); letter-spacing: -0.03em; line-height: 1; }
.reg__c { grid-row: 3; margin: 0; max-width: 32ch; font-size: .9375rem; line-height: 1.4; }
.n54 { font-weight: 500; color: #5d636d; }
.n68 { font-weight: 600; color: var(--mint-ink); }
/* стрелка в строке цифр; сдвиг на .07em вверх — оптический центр прописных цифр выше центра строки */
.reg__arw { grid-row: 2; grid-column: 2; align-self: center; width: 28px; height: 12px; transform: translateY(-.07em); font-size: clamp(2.5rem, 4vw, 3.25rem); color: #9aa6b6; }
.reg__cap { margin: 0; font-size: .9375rem; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }

/* USDT: абстрактная композиция обмена (не интерфейс продукта) */
.fx { display: flex; align-items: center; justify-content: center; gap: 22px; min-height: 176px; padding: 24px; background: #f7fafd; border: 1px solid var(--line); border-radius: 14px; }
.k--usdt .fx { flex: 1; }
.fx__i { display: grid; justify-items: center; gap: 10px; font-size: .875rem; color: var(--ink-2); }
.fx__c { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--line-2); font-family: var(--f-display); font-size: 2rem; font-weight: 500; color: var(--ink); }
.fx__i--b .fx__c { background: var(--sky-3); border-color: #98bde6; color: var(--blue-ink); }
.fx__a { position: relative; width: 64px; height: 20px; }
.fx__a::before { content: ""; position: absolute; left: 0; right: 7px; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--arrow); }
.fx__a::after { content: ""; position: absolute; right: 7px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-top: 1.5px solid var(--arrow); border-right: 1.5px solid var(--arrow); transform: rotate(45deg) translate(-2px, 2px); transform-origin: center; }

/* дизайн-система: композиция образцов (место под материалы Figma) */
.sheet { margin: auto 0 0; }
.sheet__p { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 18px; background: #f7fafd; border: 1px solid var(--line); border-radius: 14px; }
.sheet__c { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sheet__c--ty { flex-direction: column; align-items: flex-start; gap: 2px; }
.aa { font-family: var(--f-display); font-size: 2.5rem; font-weight: 500; line-height: 1; letter-spacing: -0.03em; }
.ty1 { font-family: var(--f-display); font-weight: 500; font-size: 1.0625rem; }
.ty2 { font-size: .875rem; color: var(--ink-2); }
.sheet__c--pal { gap: 8px; }
.sheet__c--pal i { display: block; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(19, 35, 63, .12); }
.sheet__c--ctl { flex-wrap: wrap; }
.s-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--blue-ink); color: #fff; font-size: .875rem; font-weight: 500; }
.s-in { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; min-width: 70px; border: 1.5px solid var(--line-2); border-radius: 8px; background: var(--white); color: var(--ink-2); font-size: .875rem; }
.sheet__c--st { grid-column: 1 / -1; flex-wrap: wrap; gap: 8px; }
.s-st { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .8125rem; background: var(--white); }
.s-st--h { background: var(--sky); }
.s-st--f { outline: 2px solid var(--blue); outline-offset: 2px; }
.s-st--d { color: #98a2b0; background: #f3f5f7; border-color: #e1e6eb; }

/* ---------- Главная: обложки, компактная карточка регистрации, выровненные нижние карточки (правила только для главной) ---------- */
.is-home .hero { padding-block: clamp(12px, 1.6vw, 20px) clamp(28px, 3.4vw, 40px); }
.is-home .hero__t h1 { font-size: clamp(2.25rem, 5vw, 4.25rem); }
/* описание шире и единым абзацем: на десктопе примерно две строки; размер шрифта не меняется */
@media (min-width: 901px) { .is-home .hero__d { margin-top: clamp(12px, 1.6vw, 20px); margin-left: calc((100% + var(--gap)) * 2 / 12); } }
.is-home .hero__d .s { display: inline; }
.is-home .coll { border: 0; }
.cov { margin: 0; border-radius: 14px; overflow: hidden; background: #f4f4f5; }
.cov img { display: block; width: 100%; height: auto; }
/* регистрация: текст и результат слева, обложка справа */
/* две равные половины: текст слева, обложка справа вплотную к краям карточки; отступы слева лежат внутри текстовой половины */
.is-home .k--reg { --kp: clamp(22px, 2.6vw, 30px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 0; align-items: stretch; }
.reg__body { display: flex; flex-direction: column; gap: 22px; align-self: stretch; padding: var(--kp) clamp(22px, 3vw, 40px) var(--kp) var(--kp); }
.is-home .k--reg .k__title { font-size: clamp(2rem, 3vw, 2.5rem); }
.is-home .k--reg .reg__n { font-size: clamp(2.25rem, 3.4vw, 2.875rem); }
.is-home .k--reg .reg__arw { font-size: clamp(2.25rem, 3.4vw, 2.875rem); }
.reg__btn { align-self: flex-start; margin-top: auto; }
/* пустая обложка: выходит за внутренний отступ карточки сверху, справа и снизу; правые углы повторяют скругление карточки (минус 1px рамки) */
.cov--reg { position: relative; background: #fff; }
.cov--reg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cov--reg { align-self: stretch; margin: 0; border-radius: 0 calc(var(--r-md) - 1px) calc(var(--r-md) - 1px) 0; }
/* USDT и дизайн-система: одинаковая структура — текст, обложка 16:10, статус и действие внизу */
.is-home .coll__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.k__txt .k__thesis { margin-top: 10px; font-size: 1.0625rem; }
@media (max-width: 980px) {
  .is-home .coll__row { grid-template-columns: minmax(0, 1fr); }
  .is-home .k--reg { display: flex; flex-direction: column; align-items: stretch; gap: 22px; padding: var(--kp); }
  .is-home .reg__body { display: contents; padding: 0; }
  .reg__head { order: 1; }
  .cov--reg { order: 2; }
  /* на узких экранах обложка показывается целиком: квадрат по ширине карточки, но не шире 520px */
  .cov--reg { align-self: center; width: 100%; max-width: 520px; aspect-ratio: 1 / 1; margin: 0; border-radius: 14px; }
  .is-home .reg__res { order: 3; }
  .reg__btn { order: 4; margin-top: 0; }
}

/* ---------- Опыт: три независимо раскрываемых периода ---------- */
.exp { padding-block: clamp(56px, 7vw, 88px) clamp(40px, 5vw, 64px); }
.exp .label { margin-bottom: 8px; }
.per { --col: 200px; }
.per__i { position: relative; border-bottom: 1px solid var(--line-2); }
.per__i::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s ease;
  background-image: linear-gradient(rgba(31, 95, 200, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 95, 200, .05) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -8px -8px; }
.per__i.is-open::before, .per__i:has(.per__b:hover)::before { opacity: 1; }
.per__i::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #7fa7dc; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.per__i:has(.per__b:hover)::after { opacity: 1; }
.per__h, .per__d { position: relative; z-index: 1; }
.per__i:last-child { border-bottom: 0; }
.per__h { margin: 0; font-size: inherit; }
.per__b { position: relative; display: grid; grid-template-columns: var(--col) minmax(0, 1fr) 34px; column-gap: 24px; align-items: center; width: 100%; padding: 26px 0; background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.per__b > * { position: relative; z-index: 1; }
.per__b:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; border-radius: 6px; }
.per__p { font-size: 1rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.is-first .per__p, .per__i:first-child .per__p { justify-self: start; background: linear-gradient(transparent 58%, var(--sky-3) 58%, var(--sky-3) 92%, transparent 92%); color: var(--ink); }
.per__m { display: grid; gap: 12px; }
/* основные названия и дополнительные строки: единый стиль во всех периодах */
.per__n { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.5rem, 2.2vw, 1.875rem); letter-spacing: -0.025em; line-height: 1.2; }
.per__s { font-size: 1rem; line-height: 1.4; color: var(--ink-2); }
.per__n > span, .per__s > span { display: inline-block; }
.per__n > span:not(:last-child)::after, .per__s > span:not(:last-child)::after { content: "·"; display: inline-block; margin: 0 8px; }
.per__x { position: relative; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 50%; transition: border-color .2s ease; }
.per__x::before, .per__x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: var(--ink); transition: transform .2s ease, background-color .2s ease; }
.per__x::after { transform: rotate(90deg); }
.per__b[aria-expanded="true"] .per__x::after { transform: rotate(0deg); }
.per__b:hover .per__x { border-color: var(--blue-ink); }
.per__b:hover .per__x::before, .per__b:hover .per__x::after { background: var(--blue-ink); }

/* плавное раскрытие без прыжков страницы */
.per__d { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .22s ease, visibility 0s linear .22s; padding-left: calc(var(--col) + 24px); }
.is-open .per__d { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .22s ease, visibility 0s; }
.per__in { min-height: 0; overflow: hidden; }
.per__in > :last-child { margin-bottom: 28px; }
.per__split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: center; }
/* проекты внутри компании: список под общей скобкой, без отдельных карточек */
.subp { list-style: none; margin: 0; padding: 2px 0 2px 22px; border-left: 2px solid #7fa7dc; }
.subp li { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 20px; flex-wrap: wrap; padding: 12px 0; }
.subp__n { font-size: 1.0625rem; font-weight: 500; }
.subp__d { font-size: .9375rem; color: var(--ink-2); }
.per__meta { font-size: .9375rem; color: var(--ink-2); }
.per__txt { margin-top: 8px; max-width: 46ch; text-wrap: pretty; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.cards--p2 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr); }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: #f3f7fb; border-radius: 14px; }
.card__n { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; }
.card__d { font-size: .9375rem; line-height: 1.4; color: var(--ink-2); text-wrap: balance; }
.card__c { margin-top: auto; padding-top: 8px; font-size: .8125rem; color: var(--ink-2); }
/* два проекта, шедшие параллельно, — в одном контейнере */
.card--grp .grp { display: flex; align-items: baseline; gap: 0; }
.card--grp .grp .card__n + .card__n { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line-2); }

/* ---------- Футер (общий для обеих страниц) ---------- */
.foot { background: #f1f6fc; padding-top: clamp(36px, 5vw, 56px); }
.foot__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; }
.foot__h { font-size: clamp(1.875rem, 2.6vw, 2.25rem); letter-spacing: -0.035em; line-height: 1.1; }
.foot__sub { margin-top: 8px; font-size: 1.0625rem; line-height: 1.5; color: var(--ink-2); text-wrap: balance; }
.foot__r { display: grid; grid-template-columns: repeat(2, 316px); gap: 16px; }
/* бумажная карточка: на наведении приподнимается, под ней проявляется голубая подложка */
.cta { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) 18px; align-items: center; column-gap: 14px; height: 76px; padding: 0 20px 0 22px; background: #f1f6fc; border: 1px solid var(--line-2); border-radius: 16px; color: var(--ink); text-decoration: none; box-shadow: 0 0 0 0 #d9e8f8; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease; }
.cta__i { display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink); }
.cta__i img { display: block; width: 24px; height: 24px; }
.cta__t { display: grid; gap: 3px; min-width: 0; }
.cta__a { font-weight: 500; font-size: 1rem; line-height: 1.3; }
.cta__b { font-size: .9375rem; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta__ar { width: 18px; height: 18px; color: var(--arrow); transition: transform .18s ease, color .18s ease; }
.cta:hover, .cta:focus-visible { transform: translate(-2px, -3px); box-shadow: 6px 7px 0 #d9e8f8; background: var(--white); border-color: #a9c6e8; }
.cta:hover .cta__ar, .cta:focus-visible .cta__ar { transform: translate(3px, -3px); color: var(--blue-ink); }
.cta:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 16px; }
.foot__bot { margin-top: 40px; border-top: 1px solid #dbe7f4; }
.foot__bot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 18px 22px; font-size: .9375rem; color: var(--ink-2); }
.foot__bot p { margin: 0; }
.foot__bot a { text-decoration: none; padding: 6px 0; }
.foot__bot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Адаптация ---------- */
@media (max-width: 1180px) {
  .foot__top { grid-template-columns: minmax(0, 1fr); }
  .foot__r { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .coll__row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .hero__d { margin-left: 0; max-width: 34ch; }
  .left, .right { grid-column: 1 / -1; }
  .per { --col: 150px; }
  .per__split { grid-template-columns: minmax(0, 1fr); }
  .subp { margin-top: 4px; }
  /* схема заранее перестраивается в вертикальные последовательности */
}
@media (max-width: 700px) {
  .top { height: 56px; }
  .capsule { top: 8px; height: 48px; }
  .capsule a { padding: 0 12px; font-size: .875rem; }
  .capsule a.capsule__cta { height: 38px; padding: 0 16px; }  /* 38px = пункт навигации при высоте капсулы 48 */
  .hero__d .s { display: inline; }
  .per__b { grid-template-columns: minmax(0, 1fr) 34px; grid-template-areas: "p x" "m x"; row-gap: 6px; padding: 22px 0; }
  .per__p { grid-area: p; }
  .per__m { grid-area: m; }
  .per__x { grid-area: x; }
  .per__d { padding-left: 0; }
  .foot__r { grid-template-columns: minmax(0, 1fr); }
  .cards--p2 { grid-template-columns: minmax(0, 1fr); }
  .ln { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ln__s { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pl + .pl::before { left: 22px; top: -21px; width: 1.5px; height: 16px; margin: 0; }
  .pl + .pl::after { left: 19.5px; top: -12px; margin: 0; transform: rotate(135deg); }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .capsule { gap: 10px; }
  .capsule__nav { gap: 2px; }
  .coll { padding: 14px; }
  .is-home .k--reg { --kp: 20px; }
  .k { padding: 20px; }
  .capsule a { padding: 0 10px; font-size: .8125rem; }
  .capsule a.capsule__cta { gap: 4px; padding: 0 13px; }
  .strip__l { flex-basis: 100%; }
  .strip__n { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .cta:hover, .cta:focus-visible, .k--link:hover { transform: none; }
  .cta:hover .cta__ar, .cta:focus-visible .cta__ar { transform: none; }
}

/* Главная, карточка «Покупка USDT»: результат после релиза и реальный экран кейса вместо схематичной иллюстрации */
.cov--usdt { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(18px, 2.2vw, 24px); background: #f7fafd; }
.usd__ph { display: grid; place-items: center; width: 100%; aspect-ratio: 2 / 1; padding: 12px; background: var(--white); border: 1.5px dashed var(--line-2); border-radius: 12px; text-align: center; font-size: .9375rem; color: var(--ink-2); }
.cov .usd__img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; }


/* ====== Главная: три карточки Aifory Pro одинаковой композиции и размера (текст слева, обложка справа вплотную к краям) ====== */
.coll__list { display: grid; grid-auto-rows: 1fr; gap: clamp(20px, 2.4vw, 28px); }
/* дизайн-система: тот же каркас; сравнение «3+ файла → 1 библиотека» — спокойнее процентов других карточек; обложка с прозрачными тенями вписана целиком */
.k--ds .cov--reg img { object-fit: contain; }
.is-home .k--ds .reg__n, .is-home .k--ds .reg__arw { font-size: clamp(1.625rem, 2.4vw, 2rem); }
.is-home .k--ds .reg__n { white-space: nowrap; }
.is-home .k--ds .reg__v--b .reg__n { word-spacing: .09em; }
.is-home .k--ds .reg__cmp { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.25fr); }
.is-home .k--ds .reg__v--a .reg__c { white-space: nowrap; }
/* ~1024: колонке «До» нужно ≥148 px, чтобы подпись из двух строк не переносилась */
@media (min-width: 981px) and (max-width: 1100px) {
  .is-home .k--ds .reg__cmp { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.1fr); column-gap: 12px; }
}
@media (max-width: 980px) {
  .coll__list { grid-auto-rows: auto; }
}
/* дизайн-система, узкий экран: «До» и «После» друг под другом — «1 библиотека» не помещается в половину ширины */
@media (max-width: 480px) {
  .is-home .k--ds .reg__cmp { grid-template-columns: minmax(0, 1fr); }
  .is-home .k--ds .reg__v--b > * { grid-column: 1; }
  .is-home .k--ds .reg__v--b .reg__k { grid-row: 5; }
  .is-home .k--ds .reg__v--b .reg__n { grid-row: 6; }
  .is-home .k--ds .reg__v--b .reg__c { grid-row: 7; }
  .is-home .k--ds .reg__arw { grid-row: 4; grid-column: 1; justify-self: start; margin: 10px 0 10px 8px; transform: rotate(90deg); }
}

/* узкие экраны: центр и правый край физически не помещаются — компактная связка по центру (навигация + кнопка), без наложений */
@media (max-width: 520px) {
  .capsule { display: flex; width: auto; max-width: none; padding-inline: 0; justify-content: center; gap: 10px; }
}

/* очень узкие экраны: шапка (навигация + «Написать мне») без прилипания к краям */
@media (max-width: 380px) {
  .capsule { gap: 6px; }
  .capsule a { padding: 0 8px; }
  .capsule a.capsule__cta { padding: 0 10px; }
}
