/* ==========================================================================
   IMINERA Avatar / K2 «Последний метр»: styles.css (шаг 1)
   Токены, reset, типографика, контейнер, кнопки, поля формы, .stub, .img-stub,
   шапка, hero, секции gap и scan. Mobile-first: расширения через min-width.
   Стиль: лаборатория. Графит, моноширинные цифры, малиновый как сигнал.
   ========================================================================== */

/* ---------- 1. Токены ---------- */
:root {
  --bg: #0E0F12;
  --bg-2: #14161A;
  --panel: #1A1D22;
  --panel-2: #20242A;
  --line: #2B3037;
  --line-2: #3A4048;
  --text: #E8EAED;
  --muted: #9AA1AB;

  /* сигнал: линии, маркеры, крупные метки */
  --signal: #E91E63;
  /* фон кнопок с белым текстом (контраст 5.9:1) */
  --signal-dark: #C2185B;
  --signal-hover: #D81B60;
  /* осветлённый сигнал для мелкого текста на тёмном (контраст не ниже 5.5:1) */
  --signal-text: #FF5C8D;

  /* заглушки: тот же жёлтый, что у плашки «временно» */
  --stub: #FFD400;
  /* едва заметная координатная сетка */
  --grid: rgba(255, 255, 255, 0.035);

  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* шкала отступов */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius: 4px;
  --container: 1200px;
  --pad: 20px;
  --header-h: 64px;

  /* переключатель вариантов 1/2/3 (proto-switch-k.css) */
  --sw-bg: var(--panel);
  --sw-line: var(--line);
  --sw-fg: var(--muted);
  --sw-fg-hover: var(--text);
  --sw-active-bg: var(--signal-dark);
  --sw-active-fg: #fff;
  --sw-font: 'JetBrains Mono', ui-monospace, monospace;
}

@media (min-width: 768px) {
  :root { --pad: 32px; }
}
@media (min-width: 1100px) {
  :root { --header-h: 72px; }
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- 3. Служебное ---------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-3); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* моно-метка: капс 12 px */
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ссылка внутри текста */
.link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}
@media (hover: hover) {
  .link:hover {
    color: var(--signal-text);
    text-decoration-color: var(--signal-text);
  }
}

/* ---------- 4. Типографика секций ---------- */

/* индекс секции: [02] / РАЗРЫВ, дальше тонкая размерная линия */
.sec-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sec-label__idx { color: var(--text); font-weight: 700; }
.sec-label::after {
  content: "";
  flex: 1;
  height: 9px;
  background:
    linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) 100% 50% / 1px 9px no-repeat;
}

.section-title {
  max-width: 26ch;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.section-lead {
  max-width: 62ch;
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ---------- 5. Секция: фон, линейка по верхнему краю ---------- */
.section {
  position: relative;
  padding-block: var(--space-8);
  background: var(--section-bg, var(--bg));
  border-top: 1px solid var(--line);
}
.section--alt { --section-bg: var(--bg-2); }

/* линейка: крупная засечка каждые 100 px, мелкая каждые 20 px */
.section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 9px;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 100px 9px repeat-x,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 20px 4px repeat-x;
}

@media (min-width: 768px) {
  .section { padding-block: var(--space-9); }
}

/* ---------- 6. Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn-primary { background: var(--signal-dark); color: #fff; }
.btn-secondary { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-sm { min-height: 44px; padding: 0 var(--space-4); font-size: 0.875rem; }
.btn-block { width: 100%; }

@media (hover: hover) {
  .btn-primary:hover { background: var(--signal-hover); }
  .btn-secondary:hover { border-color: var(--text); }
}

.btn:disabled,
.btn[disabled] {
  background: var(--panel);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .btn, .link, .proto-switch__btn { transition: none; }
}

/* ---------- 7. Поля формы (общие; разметка как в a-etalon) ---------- */
.request-form { display: grid; gap: var(--space-4); }
.form-row { display: grid; gap: var(--space-2); }
.form-row-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.form-row-split > div { display: grid; gap: var(--space-2); }

.request-form label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.request-form input,
.request-form textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) 14px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
}
.request-form textarea { min-height: 120px; resize: vertical; }
.request-form input::placeholder,
.request-form textarea::placeholder { color: var(--muted); }
.request-form input:focus-visible,
.request-form textarea:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-color: var(--text);
}

.form-status {
  padding: var(--space-3) var(--space-4);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

@media (min-width: 640px) {
  .form-row-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 8. Заглушки ---------- */
/* текст, который нужно подтвердить: пунктир и слегка заметный фон */
.stub {
  padding: 0 4px;
  background: rgba(255, 212, 0, 0.12);
  border-bottom: 1px dashed var(--stub);
  border-radius: 2px;
  color: inherit;
  cursor: help;
}

/* картинка, которой ещё нет: рисованный блок с подписью «Нужно фото: ID» */
.img-stub {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: var(--ratio, 2 / 3);
  padding: var(--space-4);
  background: repeating-linear-gradient(135deg, var(--panel) 0 12px, var(--panel-2) 12px 24px);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------- 9. Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex-shrink: 0;
}
.logo img {
  width: auto;
  height: 32px;
  filter: brightness(0) invert(1);
}

/* бургер (мобильный) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  .nav-toggle span { transition: none; }
}

/* меню: на мобильном выпадающая панель с навигацией, переключателем, телефоном и CTA */
.site-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-2) var(--pad) var(--space-6);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.site-menu.is-open { display: flex; }

.main-nav ul { display: flex; flex-direction: column; }
.main-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
}
.header-actions .proto-switch { align-self: flex-start; }

/* кнопки переключателя: видимая часть 32 px, зона нажатия 44 px */
.proto-switch__btn {
  position: relative;
  min-width: 32px;
  height: 32px;
}
.proto-switch__btn::after {
  content: "";
  position: absolute;
  inset: -6px -2px;
}

.header-phone {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.header-phone .icon { flex-shrink: 0; }

@media (min-width: 1100px) {
  .nav-toggle { display: none; }

  .site-menu {
    display: flex;
    position: static;
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    padding: 0;
    background: transparent;
    border: 0;
    max-height: none;
    overflow: visible;
  }

  .main-nav { margin-inline: auto; }
  .main-nav ul { flex-direction: row; }
  .main-nav a {
    min-height: 44px;
    padding: 0 10px;
    border-bottom: 0;
    color: var(--muted);
    font-size: 0.875rem;
    transition: color 0.18s ease;
  }

  .header-actions { flex-direction: row; align-items: center; gap: var(--space-4); }
  .header-phone { justify-content: center; min-width: 44px; }
  /* на 1100-1279 px телефон сводится к иконке (имя ссылки задано aria-label) */
  .header-phone__num {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (min-width: 1100px) and (hover: hover) {
  .main-nav a:hover { color: var(--text); }
}

@media (min-width: 1100px) and (prefers-reduced-motion: reduce) {
  .main-nav a { transition: none; }
}

@media (min-width: 1280px) {
  .header-phone__num {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
  }
  .header-phone { font-size: 0.9375rem; }
}

/* ---------- 10. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--bg);
}

.hero__inner {
  position: relative;
  display: grid;
  gap: var(--space-7);
  padding-block: var(--space-7);
}

/* координатная сетка колонок: 4 на мобильном, 12 на десктопе */
.hero__inner::before {
  --cols: 4;
  content: "";
  position: absolute;
  inset: 0 var(--pad);
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px calc(100% / var(--cols)));
  border-right: 1px solid var(--grid);
}

.hero__title {
  margin-bottom: var(--space-5);
  font-size: clamp(2.4rem, 5.5vw, 4.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero__lead {
  max-width: 54ch;
  margin-bottom: var(--space-6);
  color: var(--muted);
  font-size: 1.0625rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.hero__actions .btn { flex: 1 1 auto; }

/* визуал: облако точек превращается в вещь */
.hero-visual { max-width: 680px; }

.hero-visual__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  --photo-w: 70%;
}
/* затемнение низа: прячет стойку и вписывает светлое фото в тёмную страницу */
.hero-visual__frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  height: 22%;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg), transparent);
}

/* .tmp-borrowed задаёт position: relative; здесь слой кладём абсолютно */
.hero-visual__cloud.tmp-borrowed,
.hero-visual__cloud {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 58%;
}
.hero-visual__cloud img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  -webkit-mask-image: linear-gradient(90deg, #000 50%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 50%, transparent 100%);
}

.hero-visual__photo {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--photo-w);
}
.hero-visual__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40%);
  mask-image: linear-gradient(90deg, transparent 0, #000 40%);
}

/* три малиновых уровня: грудь, талия, бёдра */
.hero-visual__marks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.mark {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid var(--signal);
}
.mark::before {
  content: "";
  position: absolute;
  left: var(--space-3);
  top: -5px;
  height: 11px;
  border-left: 1px solid var(--signal);
}
.mark--chest { top: 42%; }
.mark--waist { top: 62%; }
.mark--hips { top: 81%; }
.mark__label {
  position: absolute;
  right: var(--space-3);
  top: -11px;
  padding: 3px var(--space-2);
  background: var(--bg);
  border: 1px solid var(--signal);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--text);
}

.hero-visual__cap {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

@media (min-width: 640px) {
  .hero-visual__frame { aspect-ratio: 6 / 5; --photo-w: 62%; }
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--space-5);
    align-items: center;
    padding-block: var(--space-8);
  }
  .hero__inner::before { --cols: 12; }
  .hero__text { grid-column: 1 / span 5; padding-right: var(--space-4); }
  .hero-visual { grid-column: 6 / span 7; max-width: none; }
  .hero__title { font-size: clamp(2.75rem, 4.4vw, 4rem); }
  .hero__actions .btn { flex: 0 0 auto; }
}

/* ряд из четырёх цифр под hero */
.hero__facts { border-top: 1px solid var(--line); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
}
.facts__item:nth-child(odd) { padding-left: 0; }
.facts__item:nth-child(even) { border-left: 1px solid var(--line); }
.facts__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

.facts__value {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.facts__num {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.facts__unit { font-size: 0.875rem; color: var(--muted); }
.facts__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 768px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts__item:nth-child(n) {
    padding: var(--space-6) var(--space-5);
    border-bottom: 0;
    border-left: 1px solid var(--line);
  }
  .facts__item:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- 11. Секция gap: схема-цепочка ---------- */
.gap-layout {
  display: grid;
  gap: var(--space-7);
  margin-top: var(--space-7);
}

.chain {
  --chain-gap: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--chain-gap);
  max-width: 420px;
}

.chain__node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.chain__node--iminera { background: var(--panel-2); border-color: var(--text); }

.chain__tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.chain__node--iminera .chain__tag { color: var(--text); }
.chain__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
.chain__text { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }

/* обычный соединитель: линия и стрелка от предыдущего узла (вертикально) */
.chain__node--link::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  height: var(--chain-gap);
  border-left: 1px solid var(--line-2);
}
.chain__node--link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top: 6px solid var(--line-2);
}

/* разрыв: малиновый пунктир с меткой */
.chain__gap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 104px;
}
.chain__gap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(-1 * var(--chain-gap));
  bottom: calc(-1 * var(--chain-gap));
  border-left: 2px dashed var(--signal);
}
.chain__gap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-1 * var(--chain-gap));
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top: 8px solid var(--signal);
}
.chain__gap-label {
  position: relative;
  z-index: 1;
  padding: var(--space-2) var(--space-3);
  background: var(--section-bg);
  border: 1px solid var(--signal);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chain__gap-note {
  position: absolute;
  top: calc(50% + 24px);
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  padding: 0 var(--space-2);
  background: var(--section-bg);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
}

.gap-text { display: grid; gap: var(--space-6); }
.gap-text__col {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-2);
}
.gap-text__title { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.gap-text__col p { color: var(--muted); max-width: 60ch; }

@media (min-width: 768px) {
  .gap-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); align-items: start; }
}

@media (min-width: 1024px) {
  .gap-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }

  .chain { flex-direction: row; align-items: stretch; max-width: none; }
  .chain__node { flex: 1 1 0; min-width: 0; padding: var(--space-5) var(--space-4); }

  /* соединители становятся горизонтальными */
  .chain__node--link::before {
    left: auto;
    right: 100%;
    bottom: auto;
    top: 50%;
    width: var(--chain-gap);
    height: 0;
    border-left: 0;
    border-top: 1px solid var(--line-2);
  }
  .chain__node--link::after {
    left: auto;
    right: 100%;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left: 6px solid var(--line-2);
  }

  .chain__gap { flex: 1 1 0; min-width: 0; min-height: 0; }
  .chain__gap::before {
    left: calc(-1 * var(--chain-gap));
    right: calc(-1 * var(--chain-gap));
    top: 50%;
    bottom: auto;
    border-left: 0;
    border-top: 2px dashed var(--signal);
  }
  .chain__gap::after {
    left: auto;
    right: calc(-1 * var(--chain-gap));
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left: 8px solid var(--signal);
  }

  .gap-text { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7); }
}

/* ---------- 12. Секция scan: разбор сервисов скана ---------- */
.scan-grid {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-7);
}

.scan-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.scan-card--iminera {
  background: var(--panel-2);
  border-color: var(--line-2);
  border-top: 2px solid var(--signal);
}

.scan-card__head { display: grid; gap: var(--space-2); }
.scan-card__name { font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.scan-card__src {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.scan-card__src .link { text-transform: none; letter-spacing: 0.02em; }

.specs { display: grid; }
.specs__row {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}
.specs__value {
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.specs__text { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }

.scan-card__note {
  display: grid;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--line-2);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

.scan-verdict {
  display: grid;
  gap: var(--space-2);
  max-width: 34em;
  margin-top: var(--space-7);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.footnote {
  display: grid;
  gap: var(--space-1);
  max-width: 62ch;
  margin-top: var(--space-5);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 768px) {
  .scan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scan-card--iminera { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .scan-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); }
  .scan-card--iminera { grid-column: auto; }
}
