/* ==========================================================================
   025 PROXY — home.css (только главная, body.page-home)
   Концепция «Круг» (SPEC §2): смелость — только у диска и приборки,
   остальное тихое: карбон, хром, красный. Токены и кнопки — из base.css.

   Разделы:
     1. Каркас страницы, резерв под приборку, заголовки секций
     2. Пит-лейн (герой): стартовые огни, H1, диск
     3. Маршрут: две полосы, машинка с номерным знаком, тоннель
     4. Старт: шаги на линии-трассе
     5. Под капотом: спецификация с пунктирными выносками
     6. Устройства: шильдики
     7. Тарифы: степпер и единая панель
     8. Вопросы
     9. Финиш
    10. Приборка (≥ 1100px) и шифт-лайты (< 1100px)
    11. Уменьшение движения, высокий контраст, печать

   Контракт с drive.js (SPEC §5.4): #disc, #disc-rotor, #disc-hub,
   #disc-caliper, #disc-heat, #start-lights (li.is-on, .is-out),
   #cluster и #shiftlights (--rpm 0..1), #tach-needle, #gear, #sector,
   [data-gear-link][aria-current].
   Контракт с home.js: .lane (--p 0..1), .plate.is-cipher,
   .steps (--fill 0..1, .is-live), .steps__item.is-reached.
   Брейкпоинты: 35em (560px), 45em (720px), 56.25em (900px),
   68.75em (1100px — приборка), 72em (1152px — шапка base.css).
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Каркас страницы
   -------------------------------------------------------------------------- */

.page-home {
  --home-pad-right: var(--gutter);
  /* центр ротора: окружность, подобранная по краю слоя disc-rotor
     (x 49.25%, y 49.93% квадрата 1254×1254). Ступица и суппорт неподвижны. */
  --rotor-origin: 49.25% 49.93%;
  background-color: var(--c-carbon-0);
  background-image: var(--carbon-weave);
  background-size: var(--carbon-size);
}

.page-home main {
  /* свечения диска и финиша не дают горизонтальной прокрутки;
     clip, а не hidden — sticky в «Вопросах» продолжает работать */
  overflow-x: clip;
}

/* Safari < 16 (iOS 15 и встроенные браузеры) не знает clip: без запасного
   hidden страница ездит вбок. Цена — sticky в «Вопросах» там не липнет. */
@supports not (overflow: clip) {
  .page-home main {
    overflow-x: hidden;
  }
}

/* ≥ 1100px справа фиксирована приборка (112px + 16px от края): контент
   не заходит под неё. Пока поле контейнера и так шире — ничего не меняется. */
@media (min-width: 68.75em) {
  .page-home {
    --home-pad-right: max(var(--gutter), calc(var(--cluster-w) + 24px - max(0px, (100vw - var(--container)) / 2)));
  }

  .page-home main .container {
    padding-right: var(--home-pad-right);
  }

  /* подвал тоже не заходит под приборку (1100–1250px, в т. ч. iPad 1180px) */
  .page-home .site-footer__inner {
    padding-right: var(--home-pad-right);
  }

  /* финиш центрирован по окну (флаг и свечение — по центру окна):
     резерв под приборку с обеих сторон, чтобы заголовок не съезжал влево */
  .page-home main > .finish .container {
    padding-left: var(--home-pad-right);
  }
}

.page-home main > section {
  position: relative;
  padding-block: clamp(64px, 8vw, 112px);
}

/* граница сектора: волосяная линия с коротким красным началом */
.page-home main > section + section::before {
  content: "";
  position: absolute;
  top: 0;
  /* края совпадают с контентом контейнера при любой ширине окна */
  left: var(--bleed);
  right: calc(max(0px, (100% - var(--container)) / 2) + var(--home-pad-right));
  height: 1px;
  background: linear-gradient(90deg, var(--c-red-signal) 0 32px, var(--line) 32px);
  pointer-events: none;
}

.section-head {
  max-width: 48rem;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section-head__lead {
  margin-top: 16px;
  max-width: 36em;
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--fg-muted);
}


/* --------------------------------------------------------------------------
   2. Пит-лейн (герой)
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  align-items: center;
  min-height: min(100vh, 1000px);
  min-height: min(100svh, 1000px);
  isolation: isolate;
}

.page-home main > .hero {
  padding-top: calc(var(--header-h) + clamp(24px, 4vw, 48px));
  padding-bottom: clamp(48px, 7vw, 104px);
}

/* красное зарево за диском — как на лендинге proxy025proxy.ru */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: -12%;
  width: min(1100px, 92vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(255, 42, 51, 0.15), rgba(255, 42, 51, 0.05) 46%, rgba(255, 42, 51, 0) 100%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  gap: clamp(16px, 4vw, 32px);
  align-items: center;
}

.hero__text {
  min-width: 0;
  container-type: inline-size;
}

/* Стартовые огни: пять круглых красных огней в карбоновом корпусе.
   drive.js зажигает li.is-on по одному и гасит все (.is-out). */
.lights {
  display: inline-flex;
  gap: 9px;
  margin: 0 0 clamp(20px, 3vw, 32px);
  padding: 7px 11px;
  list-style: none;
  border: 1px solid var(--c-carbon-3);
  border-radius: 999px;
  background: linear-gradient(180deg, #161A21, #0A0C10);
  box-shadow:
    inset 0 1px 0 rgba(238, 241, 246, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 8px 20px rgba(0, 0, 0, 0.45);
}

.lights li {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #5A1219 0, #3A0A0F 46%, #22060A 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 125, 130, 0.14);
  transition:
    background-color 0.06s linear,
    box-shadow 0.06s linear,
    filter 0.06s linear;
}

.lights li.is-on {
  background: radial-gradient(circle at 36% 32%, #FFD9DB 0, #FF5158 26%, #E51D28 62%, #9D0C15 100%);
  box-shadow:
    inset 0 0 0 1px rgba(125, 10, 18, 0.6),
    0 0 8px 1px rgba(255, 42, 51, 0.8),
    0 0 22px 4px rgba(255, 42, 51, 0.38);
}

/* «поехали»: гаснут все разом (класс на ol или на каждом li) */
.lights.is-out li,
.lights li.is-out {
  background: radial-gradient(circle at 36% 32%, #5A1219 0, #3A0A0F 46%, #22060A 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 125, 130, 0.14);
  transition-duration: 0.28s;
}

/* H1: Exo 2 italic 800, очень крупно и плотно. Размер — шкала SPEC, но не шире
   колонки: «по выделенной» (≈7.6em) должна помещаться в строку целиком. */
.hero__title {
  font-size: var(--fs-h1-home);
  line-height: var(--lh-h1-home);
  letter-spacing: -0.01em;
  -webkit-hyphens: manual;
  hyphens: manual;
  text-wrap: wrap;
}

@supports (font-size: 1cqi) {
  .hero__title {
    font-size: min(var(--fs-h1-home), 12.4cqi);
  }
}

/* строка-ключ над H1: часть заголовка, но тихая — текстовый шрифт, прямой */
.hero__kicker {
  display: block;
  margin-bottom: 0.6em;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem);
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--c-chrome-2);
}

.hero__line {
  display: block;
  /* запас под выносные элементы курсива: фон-градиент рисуется только в боксе */
  padding: 0.04em 0.12em 0.1em 0;
  margin: -0.04em -0.12em -0.1em 0;
  color: var(--c-chrome);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__line {
    background-image: var(--chrome-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.hero__lead {
  max-width: 34em;
  margin-top: clamp(20px, 2.6vw, 28px);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--fg-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 32px);
}

.hero__note {
  margin-top: 14px;
  font-size: 0.9375rem;
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

.hero__facts {
  display: grid;
  gap: 10px;
  margin-top: clamp(24px, 3vw, 32px);
  padding: 0;
  list-style: none;
}

.hero__facts li {
  position: relative;
  padding-left: 26px;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--c-chrome);
}

/* метка — короткая «гоночная» полоса с наклоном курсива */
.hero__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 14px;
  height: 3px;
  border-radius: 1px;
  background: var(--racing-stripe);
  transform: skewX(-24deg);
}

/* Диск: слои абсолютно друг над другом в одной системе координат */
.hero__visual {
  position: relative;
  justify-self: center;
  width: min(52vw, 280px);
}

.disc {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1;
}

.disc img,
.disc canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.disc__rotor {
  transform-origin: var(--rotor-origin);
  will-change: transform;
}

.disc__heat {
  pointer-events: none;
}

/* мягкое красное свечение под диском («подсветка днища») */
.disc::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 4%;
  right: 12%;
  bottom: -9%;
  height: 34%;
  background: radial-gradient(closest-side, rgba(255, 42, 51, 0.34), rgba(255, 42, 51, 0.1) 52%, rgba(255, 42, 51, 0) 100%);
  pointer-events: none;
}

/* пол: линия горизонта с красным бликом и тень под ротором */
.hero__floor {
  position: absolute;
  left: -6%;
  right: -2%;
  bottom: -5%;
  height: 12%;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0)) 42% 0 / 80% 100% no-repeat,
    linear-gradient(90deg, rgba(255, 42, 51, 0), rgba(255, 59, 67, 0.55) 40%, rgba(255, 125, 130, 0.35) 60%, rgba(255, 42, 51, 0)) 0 50% / 100% 1px no-repeat;
  z-index: -1;
}

@media (min-width: 35em) {
  .hero__visual {
    width: min(46vw, 320px);
  }
}

/* ≥ 900px: асимметрия — текст слева, диск справа */
@media (min-width: 56.25em) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(24px, 3.4vw, 56px);
  }

  .hero__visual {
    width: 100%;
    max-width: 600px;
    justify-self: end;
  }

}

/* < 900px: диск меньше и над заголовком */
@media (max-width: 56.24em) {
  .hero__visual {
    order: -1;
    margin-bottom: 8px;
  }

  .hero__floor {
    bottom: -7%;
  }
}

@media (max-width: 29.99em) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* телефоны (и встроенный браузер Instagram с коротким окном): плотнее,
   чтобы «Подключиться в Telegram» попадала в первый экран */
@media (max-width: 34.99em) {
  .page-home main > .hero {
    padding-top: calc(var(--header-h) + 8px);
  }

  .hero__grid {
    gap: 12px;
  }

  .hero__visual {
    width: min(34vw, 140px);
    margin-bottom: 0;
  }

  .lights {
    margin-bottom: 12px;
  }

  .hero__lead {
    margin-top: 12px;
  }

  .hero__actions {
    margin-top: 16px;
  }
}


/* --------------------------------------------------------------------------
   3. Маршрут
   Полоса = дорога (.lane__road) + подписи узлов (.lane__nodes). Положение
   машинки и номерного знака — --p (0..1) на .lane, его задаёт home.js по
   положению схемы в окне. Узлы и тоннель стоят в долях той же шкалы
   (--x, --t0, --t1), поэтому совпадают с машинкой в обеих ориентациях.
   Без JS и при уменьшении движения машинка стоит у провайдера (--p .42).
   -------------------------------------------------------------------------- */

.route__lanes {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
}

.lane {
  --p: 0.42;
  --t0: 0;
  --t1: 0;
  --inset: 14px;          /* узлы и машинка не прижаты к краю дороги */
  --road: 40px;           /* толщина дороги */
  --road-len: 360px;      /* длина дороги в вертикальной раскладке */
  position: relative;
  min-width: 0;
}

.lane--secure {
  --t0: 0.035;
  --t1: 0.72;
}

.lane__title {
  font-size: var(--fs-h3);
}

/* цвет полосы: обычная — сталь, защищённая — красная */
.lane__title::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 4px;
  margin-right: 12px;
  vertical-align: 0.28em;
  border-radius: 1px;
  background: var(--c-steel);
  transform: skewX(-24deg);
}

.lane--secure .lane__title::before {
  background: var(--racing-stripe);
}

.lane__map {
  position: relative;
  margin-top: 20px;
  padding-top: 46px;      /* место под номерной знак над дорогой */
}

.lane__road {
  position: relative;
  height: var(--road);
}

.lane__asphalt {
  position: absolute;
  inset: 0;
  border: 1px solid var(--c-carbon-3);
  border-radius: 6px;
  background: linear-gradient(180deg, #14171E, #0D0F14);
}

/* прерывистая осевая */
.lane__asphalt::after {
  content: "";
  position: absolute;
  left: var(--inset);
  right: var(--inset);
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: repeating-linear-gradient(90deg, rgba(238, 241, 246, 0.26) 0 14px, rgba(238, 241, 246, 0) 14px 30px);
}

/* тоннель: зашифрованный участок от устройства до сервера */
.lane__tunnel {
  position: absolute;
  z-index: 3;
  top: -7px;
  bottom: -7px;
  left: calc(var(--inset) + var(--t0) * (100% - 2 * var(--inset)));
  width: calc((var(--t1) - var(--t0)) * (100% - 2 * var(--inset)));
  border: 1.5px solid rgba(255, 42, 51, 0.8);
  border-radius: 9px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 81, 88, 0.14) 0 1px, rgba(255, 81, 88, 0) 1px 20px),
    linear-gradient(180deg, rgba(125, 10, 18, 0.5), rgba(43, 4, 8, 0.58));
  box-shadow:
    0 0 20px rgba(255, 42, 51, 0.22),
    inset 0 0 14px rgba(255, 42, 51, 0.18);
  pointer-events: none;
}

.car {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: calc(var(--inset) + var(--p) * (100% - 2 * var(--inset)));
  width: 50px;
  height: 25px;
  transform: translate(-50%, -50%);
}

.car__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.car__body {
  fill: #1B1F27;
  stroke: var(--c-chrome);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.car__glass {
  fill: rgba(152, 160, 171, 0.42);
}

.car__line {
  fill: none;
  stroke: rgba(238, 241, 246, 0.32);
  stroke-width: 1.1;
  stroke-linecap: round;
}

.car__wheel {
  fill: #050608;
  stroke: rgba(238, 241, 246, 0.55);
  stroke-width: 0.8;
}

.lane--secure .car__body {
  fill: #2A070B;
  stroke: #FFC2C5;          /* виден и под крышей тоннеля */
}

.lane--secure .car__glass {
  fill: rgba(255, 176, 179, 0.4);
}

/* Номерной знак едет вместе с машинкой; у краёв дороги не вылезает за схему */
.plate {
  position: absolute;
  z-index: 4;
  bottom: calc(100% + 10px);
  left: calc(var(--inset) + var(--p) * (100% - 2 * var(--inset)));
  transform: translateX(calc(var(--p) * -100%));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 136px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #FFFFFF;
  border-radius: 4px;
  background: #EEF1F6;
  color: #0B0D12;
  box-shadow:
    inset 0 0 0 1.5px #0B0D12,
    0 6px 16px rgba(0, 0, 0, 0.5);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: pre;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

/* «хвостик» знака указывает на машинку */
.plate::after {
  content: "";
  position: absolute;
  top: 100%;
  left: clamp(8px, calc(var(--p) * 100%), calc(100% - 8px));
  width: 1px;
  height: 9px;
  background: currentColor;
  opacity: 0.55;
}

.plate.is-cipher {
  border-color: #FF5158;
  background: #2A0609;
  color: #FFB0B3;           /* 9.6:1 на #2A0609 */
  box-shadow:
    inset 0 0 0 1.5px #7D0A12,
    0 0 16px rgba(255, 42, 51, 0.35);
}

.plate__text {
  overflow: hidden;
}

/* узлы и подписи под дорогой */
.lane__nodes {
  position: relative;
  height: 128px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lane__node {
  --x: 0;
  position: absolute;
  z-index: 5;
  top: 20px;
  left: calc(var(--inset) + var(--x) * (100% - 2 * var(--inset)));
  width: max-content;
  max-width: 15em;
  transform: translateX(-50%);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-align: center;
  color: var(--c-chrome);
}

/* метка узла — на оси дороги */
.lane__node::before {
  content: "";
  position: absolute;
  top: calc(-20px - var(--road) / 2 - 7px);
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border: 2px solid var(--c-chrome-2);
  border-radius: 50%;
  background: var(--c-carbon-0);
  box-sizing: border-box;
}

.lane__node--device {
  --x: 0;
  left: 0;
  transform: none;
  text-align: left;
}

.lane__node--device::before {
  left: var(--inset);
}

.lane__node--provider {
  --x: 0.42;
}

.lane__node--server {
  --x: 0.72;
}

.lane__node--site {
  --x: 1;
  left: auto;
  right: 0;
  transform: none;
  text-align: right;
}

.lane__node--site::before {
  left: auto;
  right: var(--inset);
  margin-left: 0;
  margin-right: -7px;
}

.lane__node--provider::before {
  border-color: var(--c-red-hot);
}

.lane--secure .lane__node--provider::before {
  border-color: var(--c-chrome-2);
}

.lane__node--server::before {
  display: none;
}

/* сервер 025 PROXY — маленький диск из логотипа */
.lane__server-mark {
  position: absolute;
  top: calc(-20px - var(--road) / 2 - 15px);
  left: 50%;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px var(--c-carbon-0),
    0 0 16px rgba(255, 42, 51, 0.5);
}

.lane__label {
  display: block;
}

/* наблюдатель у провайдера */
.lane__observer {
  display: block;
  margin-top: 10px;
  padding: 8px 10px 8px 9px;
  border: 1px solid rgba(255, 42, 51, 0.5);
  border-radius: var(--r-tag);
  background: rgba(16, 19, 25, 0.92);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--c-chrome-2);
  text-align: left;
}

.lane__eye {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -4px;
  fill: none;
  stroke: var(--c-red-hot);
  stroke-width: 1.6;
}

.lane--secure .lane__observer {
  border-color: var(--line-strong);
}

.lane--secure .lane__eye {
  stroke: var(--c-chrome-2);
}

.lane__caption {
  max-width: var(--measure);
  margin-top: 8px;
  color: var(--fg-muted);
}

.route__note {
  max-width: var(--measure);
  margin-top: clamp(32px, 5vw, 56px);
  padding-left: 18px;
  border-left: 2px solid var(--c-red);
  color: var(--fg);
}

/* ≥ 720px: «регион» на знаке — 025, как код на автомобильном номере */
@media (min-width: 45em) {
  .plate {
    width: 168px;           /* текст 168 − 2 − 8 − 38 = 120px: строка входит целиком */
    padding-right: 38px;
  }

  .plate::before {
    content: "025";
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    border-left: 1.5px solid currentColor;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
  }
}

/* < 720px: дорога вертикальная, машинка едет сверху вниз.
   Колонки: номерной знак | дорога | подписи. */
@media (max-width: 44.99em) {
  .lane {
    --road: 28px;
    --road-len: 340px;
  }

  .lane--secure {
    --road-len: 470px;
  }

  .lane__map {
    display: grid;
    grid-template-columns: 124px var(--road) minmax(0, 1fr);
    column-gap: 12px;
    padding-top: 6px;
    padding-bottom: 20px;
  }

  .lane__road {
    grid-column: 2;
    grid-row: 1;
    width: var(--road);
    height: var(--road-len);
  }

  .lane__asphalt::after {
    left: 50%;
    right: auto;
    top: var(--inset);
    bottom: var(--inset);
    width: 2px;
    height: auto;
    margin: 0 0 0 -1px;
    background: repeating-linear-gradient(180deg, rgba(238, 241, 246, 0.26) 0 12px, rgba(238, 241, 246, 0) 12px 26px);
  }

  .lane__tunnel {
    top: calc(var(--inset) + var(--t0) * (100% - 2 * var(--inset)));
    bottom: auto;
    left: -6px;
    right: -6px;
    width: auto;
    height: calc((var(--t1) - var(--t0)) * (100% - 2 * var(--inset)));
    background:
      repeating-linear-gradient(180deg, rgba(255, 81, 88, 0.16) 0 1px, rgba(255, 81, 88, 0) 1px 20px),
      linear-gradient(90deg, rgba(125, 10, 18, 0.5), rgba(43, 4, 8, 0.58));
  }

  .car {
    top: calc(var(--inset) + var(--p) * (100% - 2 * var(--inset)));
    left: 50%;
    width: 44px;
    height: 22px;
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .plate {
    bottom: auto;
    left: auto;
    right: calc(100% + 10px);
    top: calc(var(--inset) + var(--p) * (100% - 2 * var(--inset)));
    width: 124px;
    /* «GET /account/login» и шифр целиком: 11px без разрядки — около 105px,
       место под текст 124 − 2 − 10 = 112px */
    padding: 0 5px;
    font-size: 11px;
    letter-spacing: 0;
    transform: translateY(-50%);
  }

  .plate::after {
    top: 50%;
    left: 100%;
    width: 10px;
    height: 1px;
  }

  .lane__nodes {
    grid-column: 2 / 4;
    grid-row: 1;
    height: var(--road-len);
  }

  .lane__node,
  .lane__node--device,
  .lane__node--site {
    left: calc(var(--road) + 12px);
    right: 0;
    top: calc(var(--inset) + var(--x) * (100% - 2 * var(--inset)));
    width: auto;
    max-width: none;
    transform: translateY(-0.68em);
    text-align: left;
  }

  .lane__node::before,
  .lane__node--device::before,
  .lane__node--site::before {
    top: calc(0.68em - 7px);
    left: calc(var(--road) / -2 - 12px - 7px);
    right: auto;
    margin: 0;
  }

  .lane__server-mark {
    top: calc(0.68em - 15px);
    left: calc(var(--road) / -2 - 12px - 15px);
    margin: 0;
  }

  .lane__observer {
    margin-top: 8px;
    padding: 6px 8px;
    font-size: 0.8125rem;
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  .lane__eye {
    display: block;
    margin: 0 0 2px;
  }
}

/* 320–359px: «GET /account/login» при 10.5px — 100px, знак 118px */
@media (max-width: 22.49em) {
  /* подпись провайдера здесь в три строки — дорога длиннее, чтобы
     она не наезжала на «Сервер 025 PROXY» */
  .lane--secure {
    --road-len: 520px;
  }

  .lane__map {
    grid-template-columns: 118px var(--road) minmax(0, 1fr);
    column-gap: 10px;
  }

  .plate {
    width: 118px;
    padding: 0 5px;
    font-size: 10.5px;
    letter-spacing: 0;
  }
}


/* --------------------------------------------------------------------------
   4. Старт: шаги на линии-трассе
   Заполнение линии — --fill (0..1) на .steps, пройденные узлы —
   .steps__item.is-reached (home.js, .steps.is-live). Без JS линия полная.
   -------------------------------------------------------------------------- */

.steps {
  --fill: 1;
  --num-size: clamp(2.75rem, 2rem + 2.6vw, 4.75rem);
  position: relative;
}

.steps__list {
  position: relative;
  display: grid;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps__item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-areas:
    "node num"
    ".    title"
    ".    text";
  column-gap: 18px;
  align-content: start;      /* соседний шаг с длинным текстом не сдвигает узлы */
  min-width: 0;
}

.steps__num {
  grid-area: num;
  display: block;
  height: 1em;
  font-family: var(--font-display);
  font-size: var(--num-size);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
  /* запас под выносные элементы курсива при заливке градиентом */
  padding-right: 0.12em;
  color: var(--c-chrome);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .steps__num {
    width: fit-content;
    background-image: var(--chrome-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.steps__node {
  grid-area: node;
  align-self: center;
  justify-self: center;
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 2px solid var(--c-chrome-2);
  border-radius: 50%;
  background: var(--c-carbon-0);
  transition:
    border-color var(--dur) ease,
    background-color var(--dur) ease,
    box-shadow var(--dur) ease;
}

.steps:not(.is-live) .steps__node,
.steps__item.is-reached .steps__node {
  border-color: var(--c-red-hot);
  background: var(--c-red-signal);
  box-shadow: 0 0 0 4px rgba(255, 42, 51, 0.16), 0 0 14px rgba(255, 42, 51, 0.6);
}

.steps__title {
  grid-area: title;
  margin-top: 14px;
}

.steps__text {
  grid-area: text;
  max-width: 30em;
  margin-top: 10px;
  color: var(--fg-muted);
}

/* трасса: вертикальная на узких экранах */
.steps__track {
  position: absolute;
  top: calc(var(--num-size) / 2);
  bottom: 0;
  left: 13px;
  width: 2px;
  border-radius: 1px;
  background: var(--c-carbon-3);
  overflow: hidden;
}

.steps__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--c-red-deep), var(--c-red-signal) 60%, var(--c-red-pale));
  box-shadow: 0 0 12px rgba(255, 42, 51, 0.55);
  transform: scaleY(var(--fill));
  transform-origin: 50% 0;
}

.connect__more {
  max-width: var(--measure);
  margin-top: clamp(32px, 4vw, 48px);
  color: var(--fg-muted);
}

/* ≥ 900px: три колонки, трасса горизонтальная под цифрами */
@media (min-width: 56.25em) {
  .steps__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 64px);
  }

  .steps__item {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "num"
      "node"
      "title"
      "text";
  }

  .steps__node {
    justify-self: start;
    margin-top: 14px;
  }

  .steps__title {
    margin-top: 22px;
  }

  .steps__track {
    top: calc(var(--num-size) + 14px + 7px);
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 2px;
  }

  .steps__fill {
    background: var(--racing-stripe);
    transform: scaleX(var(--fill));
    transform-origin: 0 50%;
  }
}


/* --------------------------------------------------------------------------
   5. Под капотом: спецификация как в каталоге автомобиля
   -------------------------------------------------------------------------- */

.specs__grid {
  display: grid;
  gap: 32px clamp(40px, 6vw, 88px);
  align-items: start;
}

.specs__head {
  margin-bottom: 0;
}

.spec-sheet {
  margin: 0;
  border-top: 2px solid var(--c-chrome-2);
}

.spec-sheet__row {
  display: flex;
  align-items: baseline;
  padding: 13px 0 14px;
  border-bottom: 1px solid var(--line);
}

.spec-sheet dt {
  display: flex;
  align-items: baseline;
  flex: 1 0 auto;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--c-chrome);
}

/* пунктирная выноска от названия до значения */
.spec-sheet dt::after {
  content: "";
  flex: 1 1 auto;
  min-width: 16px;
  margin: 0 12px;
  border-bottom: 2px dotted rgba(152, 160, 171, 0.5);
  transform: translateY(-0.3em);
}

.spec-sheet dd {
  flex: 0 1 58%;
  min-width: 0;
  margin: 0;
  line-height: 1.5;
  color: var(--fg);
}

.specs__notes {
  display: grid;
  gap: 16px;
  max-width: 34em;
  color: var(--fg-muted);
}

.specs__notes p:first-child {
  color: var(--fg);
}

@media (max-width: 29.99em) {
  .spec-sheet dt {
    font-size: 1rem;
  }

  .spec-sheet dt::after {
    min-width: 8px;
    margin: 0 6px;
  }

  .spec-sheet dd {
    flex-basis: 60%;
    font-size: 1rem;
  }
}

@media (max-width: 22.49em) {
  .spec-sheet dd {
    flex-basis: 54%;
  }
}

@media (min-width: 56.25em) {
  .specs__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas:
      "head  head"
      "sheet notes";
  }

  .specs__head {
    grid-area: head;
  }

  .spec-sheet {
    grid-area: sheet;
  }

  .specs__notes {
    grid-area: notes;
    padding-top: 14px;
  }
}


/* --------------------------------------------------------------------------
   6. Устройства: шильдики
   -------------------------------------------------------------------------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  padding: 14px 26px 17px;
  border: 1px solid #2A2F39;
  border-radius: var(--r-tag);
  background: linear-gradient(180deg, #181C23 0%, #0F1217 55%, #0B0D12 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 10px 24px rgba(0, 0, 0, 0.35);
  color: var(--c-chrome);
  text-decoration: none;
  transition: border-color var(--dur-fast) ease;
}

.badge:hover {
  border-color: #3B414C;
  color: var(--c-chrome);
}

.badge__name {
  /* запас под выносные элементы курсива при заливке градиентом */
  padding-right: 0.12em;
  margin-right: -0.12em;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.875rem);
  font-style: italic;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .badge__name {
    background-image: var(--chrome-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* красная полоса под названием — при наведении и фокусе */
.badge::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 9px;
  height: 2px;
  border-radius: 1px;
  background: var(--racing-stripe);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur) var(--ease-out);
}

.badge:hover::after,
.badge:focus-visible::after {
  transform: scaleX(1);
}

.devices__note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--fg-muted);
}

.devices__no {
  flex: none;
  fill: none;
  stroke: var(--c-chrome-2);
  stroke-width: 1.6;
  stroke-linecap: round;
}

@media (max-width: 29.99em) {
  .badges {
    gap: 10px;
  }

  .badge {
    min-height: 56px;
    padding: 12px 18px 15px;
  }

  .badge::after {
    left: 18px;
    right: 18px;
    bottom: 8px;
  }
}


/* --------------------------------------------------------------------------
   7. Тарифы: степпер устройств и одна панель на четыре колонки
   -------------------------------------------------------------------------- */

.pricing__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}

.pricing__intro {
  flex: 1 1 24rem;
  margin-bottom: 0;
}

.stepper {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.stepper__label {
  font-weight: 600;
  color: var(--c-chrome);
}

.stepper__control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid var(--c-carbon-3);
  border-radius: 12px;
  background: var(--panel-bg);
}

.stepper__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  background: rgba(238, 241, 246, 0.05);
  color: var(--c-chrome);
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, opacity var(--dur-fast) ease;
}

.stepper__btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.stepper__btn:hover {
  background: rgba(238, 241, 246, 0.1);
  border-color: var(--line-strong);
}

.stepper__btn[aria-disabled="true"] {
  opacity: 0.38;
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}

.stepper__value {
  display: inline-block;
  min-width: 2.6ch;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--c-chrome);
}

.stepper__hint {
  margin-top: 10px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

/* без JS кнопки ничего не делают — степпер прячем; правило «+200 ₽ за
   устройство» остаётся в лиде и в характеристиках, цены — за одно устройство */
@media (scripting: none) {
  .stepper {
    display: none;
  }
}

/* единая панель; 12 месяцев приподняты над ней */
.plans {
  position: relative;
  display: grid;
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--c-carbon-3);
  border-radius: var(--r-panel);
  background: var(--panel-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.plan {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "term    badge"
    "price   price"
    "monthly monthly"
    "save    save"
    "cta     cta";
  align-content: start;
  min-width: 0;
  padding: 22px 20px 20px;
  container-type: inline-size;
}

.plan + .plan {
  border-top: 1px solid var(--line);
}

.plan__term {
  grid-area: term;
  align-self: center;
  font-size: 1.25rem;
}

.plan__badge {
  grid-area: badge;
  align-self: center;
  padding: 4px 10px;
  border-radius: var(--r-tag);
  background: var(--c-btn-top);
  color: #FFFFFF;           /* 5.5:1 на #D0141F */
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

/* 320–359px: рядом с меткой «12 месяцев» рвётся — метка над сроком */
@media (max-width: 22.49em) {
  .plan--best {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "badge"
      "term"
      "price"
      "monthly"
      "save"
      "cta";
  }

  .plan--best .plan__badge {
    justify-self: start;
    margin-bottom: 8px;
  }
}

.plan__price {
  grid-area: price;
  margin-top: 10px;
  /* запас под выносные элементы курсива при заливке градиентом */
  padding-right: 0.1em;
  width: fit-content;
  font-family: var(--font-display);
  font-size: var(--fs-price);
  font-style: italic;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  color: var(--c-chrome);
}

@supports (font-size: 1cqi) {
  .plan__price {
    /* «25 099 ₽» (10 устройств, 12 месяцев) ≈ 4em — не шире колонки */
    font-size: min(var(--fs-price), 23cqi);
  }
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .plan__price {
    background-image: var(--chrome-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.plan__monthly {
  grid-area: monthly;
  margin-top: 6px;
  color: var(--c-chrome);
  font-variant-numeric: tabular-nums;
}

.plan__save {
  grid-area: save;
  margin-top: 2px;
  font-weight: 600;
  color: var(--c-red-light);   /* 5.8:1 на панели */
  font-variant-numeric: tabular-nums;
}

.plan__save--empty {
  display: none;
}

.plan__cta {
  grid-area: cta;
  margin-top: 18px;
  width: 100%;
}

.plan--best {
  z-index: 1;
  margin: 6px -1px -1px;     /* последняя строка панели: закрывает её нижнюю рамку */
  border: 1px solid rgba(255, 42, 51, 0.6);
  border-radius: var(--r-panel);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 42, 51, 0.16), rgba(255, 42, 51, 0) 70%),
    linear-gradient(180deg, #1A0E12, #0E0B0E);
  box-shadow:
    0 18px 50px rgba(255, 42, 51, 0.16),
    inset 0 1px 0 rgba(255, 125, 130, 0.22);
}

.plan + .plan--best {
  border-top-color: rgba(255, 42, 51, 0.6);
}

/* ≥ 900px: четыре колонки в одну панель */
@media (min-width: 56.25em) {
  .plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .plan {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "term"
      "price"
      "monthly"
      "save"
      "cta";
    grid-template-rows: auto auto auto 1fr auto;
    padding: clamp(28px, 3vw, 36px) clamp(18px, 2vw, 28px) clamp(24px, 2.6vw, 30px);
  }

  .plan + .plan {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .plan__save--empty {
    display: block;
  }

  .plan__cta {
    margin-top: 24px;
  }

  /* приподнята на 16px сверху и снизу; содержимое — вровень с соседями */
  .plan--best {
    margin: -16px -1px;
    padding-top: calc(clamp(28px, 3vw, 36px) + 16px);
    padding-bottom: calc(clamp(24px, 2.6vw, 30px) + 16px);
  }

  .plan + .plan--best {
    border-left-color: rgba(255, 42, 51, 0.6);
  }

  .plan__badge {
    position: absolute;
    top: 12px;
    left: clamp(18px, 2vw, 28px);
  }
}

.pricing__notes {
  display: grid;
  gap: 8px;
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--fg-muted);
}

.pricing__notes li {
  position: relative;
  padding-left: 18px;
}

.pricing__notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  background: var(--c-chrome-2);
}


/* --------------------------------------------------------------------------
   8. Вопросы
   -------------------------------------------------------------------------- */

.questions__grid {
  display: grid;
  gap: 32px clamp(40px, 6vw, 96px);
  align-items: start;
}

.questions__mail {
  margin-top: 18px;
  max-width: 24em;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}

@media (min-width: 56.25em) {
  .questions__grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr);
  }

  .questions__aside {
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
}


/* --------------------------------------------------------------------------
   9. Финиш: клетчатая полоса, заголовок, две кнопки
   -------------------------------------------------------------------------- */

.page-home main > .finish {
  padding-top: clamp(112px, 12vw, 176px);
  padding-bottom: clamp(80px, 10vw, 144px);
  text-align: center;
  isolation: isolate;
}

.finish::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 55%;
  width: min(880px, 120vw);
  height: 520px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 42, 51, 0.15), rgba(255, 42, 51, 0) 100%);
  pointer-events: none;
}

/* финишная черта: две строки шашек, края растворяются */
.finish__flag {
  position: absolute;
  top: clamp(36px, 5vw, 64px);
  left: 0;
  right: 0;
  height: 36px;
  background-image: conic-gradient(rgba(238, 241, 246, 0.12) 0 25%, rgba(238, 241, 246, 0) 0 50%, rgba(238, 241, 246, 0.12) 0 75%, rgba(238, 241, 246, 0) 0);
  background-size: 36px 36px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  pointer-events: none;
}

.finish__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.finish__title {
  max-width: 16em;
}

.finish__text {
  max-width: 34em;
  margin-top: 20px;
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--fg-muted);
}

.finish__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(28px, 3.4vw, 40px);
}

@media (max-width: 29.99em) {
  .finish__actions .btn {
    flex: 1 1 100%;
  }
}


/* --------------------------------------------------------------------------
   10. Приборка и шифт-лайты
   drive.js ставит --rpm (0..1) на #cluster и #shiftlights, текст #gear и
   #sector и aria-current на текущей ссылке передачи.
   -------------------------------------------------------------------------- */

.cluster {
  display: none;
}

@media (min-width: 68.75em) {
  .cluster {
    position: fixed;
    z-index: 40;
    top: 50%;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 112px;
    margin-top: calc(var(--header-h) / 2);
    padding: 8px 0 10px;
    border: 1px solid var(--c-carbon-3);
    border-radius: var(--r-panel);
    background: linear-gradient(180deg, rgba(18, 21, 28, 0.94), rgba(11, 14, 19, 0.94));
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(238, 241, 246, 0.06);
    transform: translateY(-50%);
  }
}

.cluster__tach {
  width: 104px;
  height: 104px;
}

.tach {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tach__face {
  fill: #090B0F;
  stroke: var(--c-carbon-3);
  stroke-width: 1;
}

.tach__arc {
  fill: none;
  stroke: rgba(238, 241, 246, 0.3);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* красная зона 7–8 разгорается на высоких оборотах */
.tach__red {
  fill: none;
  stroke: var(--c-red-signal);
  stroke-width: 4;
  stroke-linecap: round;
  opacity: calc(0.6 + clamp(0, (var(--rpm, 0) - 0.82) * 3, 0.4));
}

.tach__ticks {
  fill: none;
  stroke: var(--c-chrome-2);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.tach__ticks--minor {
  stroke: rgba(152, 160, 171, 0.55);
  stroke-width: 1;
}

.tach__ticks--red {
  stroke: var(--c-red-hot);
}

.tach__nums text {
  font-family: var(--font-display);
  font-size: 10px;
  font-style: italic;
  font-weight: 700;
  fill: var(--c-chrome-2);
  text-anchor: middle;
}

.tach__nums .tach__num--red {
  fill: var(--c-red-hot);
}

.tach__unit {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
  fill: var(--c-steel);
  text-anchor: middle;
}

/* Угол стрелки считается здесь из --rpm: 0 об/мин — −135°, 8000 — +135°
   (как нарисована шкала). Так стрелка всегда совпадает с делениями,
   какой бы поворот ни записал скрипт; ось — центр циферблата (60, 60). */
#tach-needle {
  stroke: var(--c-red-signal);
  stroke-width: 2.6;
  stroke-linecap: round;
  transform-box: view-box !important;
  transform-origin: 60px 60px !important;
  transform: rotate(calc(var(--rpm, 0) * 270deg - 135deg)) !important;
  filter: drop-shadow(0 0 2px rgba(255, 42, 51, 0.8));
}

.tach__cap {
  fill: #1D2129;
  stroke: var(--c-chrome-2);
  stroke-width: 1.4;
}

.cluster__gear {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -6px;
  text-align: center;
}

.cluster__gear-num {
  display: block;
  min-width: 1.2em;
  padding-right: 0.08em;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  color: var(--c-chrome);
  font-variant-numeric: tabular-nums lining-nums;
}

.cluster__sector {
  display: block;
  max-width: 100px;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--c-chrome-2);
}

.cluster__gears {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  margin: 10px 0 0;
  padding: 10px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.cluster__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 28px;
  border-radius: 6px;
  color: var(--c-chrome-2);
  text-decoration: none;
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.cluster__key {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

.cluster__link:hover {
  color: var(--c-chrome);
  background-color: rgba(238, 241, 246, 0.07);
}

.cluster__link[aria-current]:not([aria-current="false"]) {
  color: #FFFFFF;            /* 5.5:1 на #D0141F */
  background-color: var(--c-btn-top);
  box-shadow: 0 0 14px rgba(255, 42, 51, 0.45);
}

.cluster__link:focus-visible {
  outline-offset: 2px;
}

/* название сектора выезжает слева при наведении и фокусе */
.cluster__name {
  position: absolute;
  top: 50%;
  right: calc(100% + 18px);
  padding: 5px 10px;
  border: 1px solid var(--c-carbon-3);
  border-radius: var(--r-tag);
  background: var(--c-carbon-2);
  color: var(--c-chrome);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  transform: translate(6px, -50%);
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) ease;
  pointer-events: none;
}

.cluster__link:hover .cluster__name,
.cluster__link:focus-visible .cluster__name {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}

/* мостик через зазор 18px: подсказка — потомок ссылки, поэтому указатель,
   переходящий на неё, не снимает :hover (WCAG 1.4.13) */
.cluster__name::after {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 100%;
  width: 20px;
}

/* Escape прячет подсказки до следующего входа указателя или фокуса (home.js) */
.cluster.is-tips-off .cluster__link .cluster__name {
  opacity: 0;
  pointer-events: none;
}

/* невысокие окна: компактнее, затем без циферблата */
@media (min-width: 68.75em) and (max-height: 46em) {
  .cluster__tach {
    width: 84px;
    height: 84px;
  }

  .cluster__gear-num {
    font-size: 1.75rem;
  }

  .cluster__link {
    height: 24px;
  }
}

@media (min-width: 68.75em) and (max-height: 36em) {
  .cluster__tach,
  .cluster__sector {
    display: none;
  }
}

/* Шифт-лайты: полоска под шапкой до 1100px. Сегмент i горит, когда
   --rpm × 12 > i (текущий — частично). Хром → оранжевый → красный. */
.shiftlights {
  position: fixed;
  z-index: 49;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
  height: 4px;
  padding-inline: 3px;
  pointer-events: none;
}

.shiftlights span {
  --i: 0;
  --seg: #DDE2E9;
  position: relative;
  border-radius: 0 0 2px 2px;
  background: rgba(238, 241, 246, 0.07);
}

.shiftlights span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--seg);
  box-shadow: 0 0 8px var(--seg);
  opacity: clamp(0, calc(var(--rpm, 0) * 12 - var(--i)), 1);
}

.shiftlights span:nth-child(2) { --i: 1; }
.shiftlights span:nth-child(3) { --i: 2; }
.shiftlights span:nth-child(4) { --i: 3; }
.shiftlights span:nth-child(5) { --i: 4; }
.shiftlights span:nth-child(6) { --i: 5; }
.shiftlights span:nth-child(7) { --i: 6; --seg: #FF9A4D; }
.shiftlights span:nth-child(8) { --i: 7; --seg: #FF8A3D; }
.shiftlights span:nth-child(9) { --i: 8; --seg: #FF6A2E; }
.shiftlights span:nth-child(10) { --i: 9; --seg: var(--c-red-signal); }
.shiftlights span:nth-child(11) { --i: 10; --seg: var(--c-red-signal); }
.shiftlights span:nth-child(12) { --i: 11; --seg: var(--c-red-signal); }

@media (min-width: 68.75em) {
  .shiftlights {
    display: none;
  }
}


/* --------------------------------------------------------------------------
   11. Уменьшение движения, высокий контраст, печать
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .disc__rotor {
    will-change: auto;
  }

  .badge::after {
    transition: none;
  }
}

@media (forced-colors: active) {
  .hero__line,
  .steps__num,
  .badge__name,
  .plan__price {
    background: none;
    -webkit-text-fill-color: CanvasText;
    color: CanvasText;
  }

  .lights li,
  .lights li.is-on,
  .steps__node,
  .lane__node::before {
    forced-color-adjust: none;
    border: 1px solid CanvasText;
  }

  .lane__tunnel,
  .plate,
  .badge,
  .plans,
  .plan--best,
  .cluster {
    border: 1px solid CanvasText;
  }

  .cluster__link[aria-current]:not([aria-current="false"]) {
    forced-color-adjust: none;
    background-color: Highlight;
    color: HighlightText;
  }

  .shiftlights,
  .hero__floor,
  .disc::before {
    display: none;
  }
}

@media print {
  .cluster,
  .shiftlights,
  .lights,
  .hero__floor,
  .hero::before,
  .finish::after,
  .finish__flag,
  .lane__map,
  .steps__track,
  .stepper__control {
    display: none !important;
  }

  .page-home {
    background: #FFFFFF;
  }

  .hero {
    min-height: 0;
  }

  .hero__visual {
    width: 160px;
  }

  .hero__line,
  .steps__num,
  .badge__name,
  .plan__price {
    background: none !important;
    -webkit-text-fill-color: #000000 !important;
    color: #000000 !important;
  }

  .badge,
  .plans,
  .plan--best {
    background: none !important;
    box-shadow: none !important;
    border-color: #999999 !important;
  }

  .plan__badge {
    background: none;
    color: #000000;
    border: 1px solid #000000;
  }

  .plan__save,
  .lane__caption,
  .section-head__lead,
  .specs__notes,
  .finish__text {
    color: #000000 !important;
  }

  .faq__item:not([open]) > .faq__a {
    display: block;
  }
}
