@import url("./vendor/lenis/lenis.css");

/*
 * Nunito — локальные файлы (woff2), без запросов к Google Fonts.
 * Лицензия: SIL Open Font License 1.1 — см. assets-lp/fonts/nunito/OFL.txt
 * Копирайт и upstream: The Nunito Project Authors, https://github.com/googlefonts/nunito
 * Файлы взяты из пакета @fontsource/nunito (те же глифы, что у официальной поставки).
 */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  src: url("./fonts/nunito/nunito-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  src: url("./fonts/nunito/nunito-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  src: url("./fonts/nunito/nunito-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  src: url("./fonts/nunito/nunito-cyrillic-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  src: url("./fonts/nunito/nunito-cyrillic-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  src: url("./fonts/nunito/nunito-cyrillic-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
  src: url("./fonts/nunito/nunito-cyrillic-ext-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
  src: url("./fonts/nunito/nunito-cyrillic-ext-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
  src: url("./fonts/nunito/nunito-cyrillic-ext-700-normal.woff2") format("woff2");
}

:root,
html[data-theme="classic-blue"],
html[data-theme="deep-corporate"],
html[data-theme="light-neutral"] {
  /* master-tms.ru: Nunito + фирменный cyan (#3296c8), светлый фон, белые карточки */
  --font-sans: "Nunito", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --color-brand-rgb: 50 150 200; /* #3296c8 */
  --color-brand-hover-rgb: 150 200 225; /* #96c8e1 — hover кнопок на оригинале */
  --color-accent-rgb: 84 183 165; /* #54b7a5 — акценты с сайта */
  --color-bg-rgb: 248 251 253; /* #f8fbfd */
  --color-panel-rgb: 255 255 255;
  --color-text-rgb: 30 30 30; /* #1e1e1e */
  --color-muted-rgb: 108 117 125; /* #6c757d */
  --color-border-rgb: 218 229 240; /* светлая граница в духе master-tms */

  --color-brand: rgb(var(--color-brand-rgb));
  --color-brand-hover: rgb(var(--color-brand-hover-rgb));
  --color-accent: rgb(var(--color-accent-rgb));
  --color-bg: rgb(var(--color-bg-rgb));
  --color-panel: rgb(var(--color-panel-rgb));
  --color-text: rgb(var(--color-text-rgb));
  --color-muted: rgb(var(--color-muted-rgb));
  --color-border: rgb(var(--color-border-rgb));

  --max-content-width: 1140px;
  --radius-ui: 10px;
  --shadow-card: 0 2px 12px rgba(50, 150, 200, 0.07);
  --shadow-hero: 0 8px 40px rgba(50, 150, 200, 0.1);
}

/* UI-компоненты в духе master-tms.ru (подключаются после tailwind.css) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(218, 229, 240, 0.85);
  background-color: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(50, 150, 200, 0.06), 0 4px 20px rgba(30, 30, 30, 0.04);
}

.hero-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-ui);
  border: 1px solid rgba(218, 229, 240, 0.9);
  background-color: #fff;
  box-shadow: var(--shadow-hero);
}

.hero-panel::before {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 0;
  right: 0;
  top: 0;
  height: 8rem;
  background: linear-gradient(to bottom, rgba(50, 150, 200, 0.12), transparent);
}

.tile-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-radius: var(--radius-ui);
  border: 1px solid rgba(218, 229, 240, 0.9);
  background-color: #fff;
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(var(--color-text-rgb));
  box-shadow: 0 1px 0 rgba(50, 150, 200, 0.04), 0 1px 3px rgba(30, 30, 30, 0.04);
}

.tile-card-icon {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: rgba(50, 150, 200, 0.1);
  color: var(--color-brand);
}

.tile-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  border-radius: var(--radius-ui);
  border: 1px solid rgba(218, 229, 240, 0.9);
  background-color: #fff;
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(var(--color-text-rgb));
  box-shadow: 0 1px 0 rgba(50, 150, 200, 0.04), 0 1px 3px rgba(30, 30, 30, 0.04);
}

.tile-stack .tile-card-icon {
  height: 2.75rem;
  width: 2.75rem;
}

.stat-card {
  border-radius: var(--radius-ui);
  border: 1px solid rgba(218, 229, 240, 0.9);
  background-color: #fff;
  padding: 1rem;
  box-shadow: 0 1px 0 rgba(50, 150, 200, 0.04), 0 1px 3px rgba(30, 30, 30, 0.04);
}

.site-footer {
  border-top: 1px solid rgba(218, 229, 240, 0.9);
  background-color: #fff;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-ui);
  border: none;
  background-color: rgb(var(--color-brand-rgb));
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset;
  transition: background-color 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: rgb(var(--color-brand-hover-rgb));
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-ui);
  border: 1px solid rgba(218, 229, 240, 0.95);
  background-color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(var(--color-text-rgb));
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  border-color: rgb(var(--color-brand-rgb));
  color: rgb(var(--color-brand-rgb));
}

.input-field {
  width: 100%;
  border-radius: var(--radius-ui);
  border: 1px solid rgba(218, 229, 240, 1);
  background-color: #fff;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: rgb(var(--color-text-rgb));
}

.input-field::placeholder {
  color: rgba(108, 117, 125, 0.85);
}

.input-field.input-field--invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.input-field.input-field--invalid:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

[data-master-tms-party-field].master-tms-party-field--invalid .input-field,
[data-master-tms-party-field].master-tms-party-field--invalid [data-master-tms-party-query] {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.master-tms-form-message--error {
  color: #dc2626;
  font-weight: 500;
}

.master-tms-form-message--success {
  color: #15803d;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5rem;
}

/* Нижние CTA-формы: grid sm:grid-cols-2 — сообщение на всю ширину, не в одну колонку */
form.grid > .master-tms-form-message {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0.25rem;
}

form.grid > .master-tms-form-message--success {
  text-align: center;
}

body.landing-legacy .legacy-form-card p.master-tms-form-message--success,
body.landing-legacy .legacy-cta-section .legacy-form-card p.master-tms-form-message--success {
  color: #15803d !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
}

body.landing-legacy .legacy-form-card p.master-tms-form-message--error,
body.landing-legacy .legacy-cta-section .legacy-form-card p.master-tms-form-message--error {
  color: #dc2626 !important;
}

/* Модалка ввода 4-значного кода (smb/entrepreneur) — классы email-confirm-* */
.email-confirm-card {
  box-sizing: border-box;
  width: min(17.5rem, 100%);
  flex-shrink: 0;
  border-radius: 1rem;
  border: 1px solid rgba(218, 229, 240, 1);
  background-color: rgb(var(--color-panel-rgb));
  padding: 1.25rem 1.125rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

@media (min-width: 640px) {
  .email-confirm-card {
    width: min(19rem, 100%);
    padding: 1.75rem 1.5rem;
  }
}

.email-confirm-card__brand {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--color-muted-rgb));
}

.email-confirm-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: rgb(var(--color-text-rgb));
}

.email-confirm-card__lead {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgb(var(--color-muted-rgb));
}

.email-confirm-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.email-confirm-code-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
}

.email-confirm-code-hint {
  margin: 0;
  font-size: 0.75rem;
  color: rgb(var(--color-muted-rgb));
}

.email-confirm-code.input-field {
  box-sizing: border-box;
  width: min(11rem, 100%);
  margin: 0;
  padding: 0.5rem 0.625rem;
  text-align: center;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
}

.email-confirm-code.input-field::placeholder {
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  opacity: 0.4;
}

.email-confirm-form .btn-primary {
  width: min(11rem, 100%);
  margin: 0.125rem 0 0;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.email-confirm-form .master-tms-form-message {
  text-align: center;
}

.master-tms-registration-code-panel {
  padding: 0;
  overflow: visible;
}

.email-confirm-card--modal {
  position: relative;
  width: 100%;
  max-width: none;
  border: none;
  box-shadow: none;
  padding: 1.5rem 1.25rem 1.25rem;
}

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

.master-tms-registration-code-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgb(var(--color-muted-rgb));
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.master-tms-registration-code-close:hover {
  background: rgba(148, 163, 184, 0.15);
  color: rgb(var(--color-text-rgb));
}

/* Yandex Smart Captcha — невидимый виджет (landing-smart-captcha.js) */
[data-master-tms-smart-captcha].hidden {
  display: none;
}

/* DaData party autocomplete (landing-party-suggest.js) */
.party-suggest-input-wrap {
  position: relative;
  width: 100%;
}

[data-master-tms-party-field] [data-master-tms-party-query] {
  padding-right: 2.5rem;
}

.party-suggest-loading {
  display: none;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: -0.5625rem;
  box-sizing: border-box;
  border: 2px solid rgba(50, 150, 200, 0.28);
  border-top-color: #3296c8;
  border-radius: 50%;
  animation: party-suggest-spin 0.7s linear infinite;
  pointer-events: none;
  z-index: 5;
  flex-shrink: 0;
}

.party-suggest-loading.is-active {
  display: block;
}

@keyframes party-suggest-spin {
  to {
    transform: rotate(360deg);
  }
}

.party-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 40;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 14rem;
  overflow-y: auto;
  border-radius: var(--radius-ui);
  border: 1px solid rgba(218, 229, 240, 1);
  background-color: #fff;
  box-shadow: 0 4px 16px rgba(30, 30, 30, 0.12);
}

.party-suggest-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: rgb(var(--color-text-rgb));
  cursor: pointer;
}

.party-suggest-item:hover,
.party-suggest-item--active {
  background-color: rgba(var(--color-brand-rgb), 0.08);
  color: rgb(var(--color-text-rgb));
}

.faq-details {
  border-radius: var(--radius-ui);
  border: 1px solid rgba(218, 229, 240, 0.9);
  background-color: #fff;
  padding: 1rem;
  box-shadow: 0 1px 0 rgba(50, 150, 200, 0.04), 0 1px 3px rgba(30, 30, 30, 0.04);
}

/* Заголовки секций — плотнее, как на образце */
.doc-card h2,
.hero-panel h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Таблица сравнения */
.compare-table thead {
  background: rgba(50, 150, 200, 0.06);
}

.compare-table th,
.compare-table td {
  vertical-align: top;
}

a.tile-card {
  text-decoration: none;
  color: inherit;
}

a.tile-card:hover {
  border-color: rgba(50, 150, 200, 0.45);
}

/* Чипы переключения линейки — как вторичные кнопки на master-tms.ru */
.line-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(218, 229, 240, 0.95);
  background-color: #fff;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: rgb(var(--color-text-rgb));
  box-shadow: 0 1px 2px rgba(30, 30, 30, 0.04);
  transition: border-color 0.2s ease, color 0.2s ease;
}

a.line-pill:hover {
  border-color: rgba(50, 150, 200, 0.55);
  color: var(--color-brand);
}

.line-pill--current {
  border-color: rgba(50, 150, 200, 0.45);
  background-color: rgba(50, 150, 200, 0.1);
  color: var(--color-brand);
}

/* Переключатель линейки MasterTMS (вариант E: узкие вкладки с нижней чертой) */
body.landing-legacy .lineup-e {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid color-mix(in oklab, rgb(var(--color-border-rgb)) 85%, transparent);
  min-height: 2rem;
}

body.landing-legacy .lineup-e__tab {
  position: relative;
  padding: 0.35rem 0.75rem 0.45rem;
  margin-bottom: -1px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  color: rgb(var(--color-muted-rgb));
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

body.landing-legacy a.lineup-e__tab:hover {
  color: rgb(var(--color-brand-rgb));
}

body.landing-legacy .lineup-e__tab--current {
  color: rgb(var(--color-brand-rgb));
  border-bottom-color: rgb(var(--color-brand-rgb));
}

body.landing-legacy span.lineup-e__tab {
  cursor: default;
}

body.landing-legacy .lineup-e__tab span.num {
  font-weight: 800;
  font-size: 0.7rem;
  opacity: 0.85;
  margin-left: 0.2rem;
}

/* Exact visual borrowing from old MasterTMS 500+ landing, mapped to explicit logical block types */
body.landing-legacy {
  background: #fff;
  color: #1e1e1e;
  font-family: "Nunito", sans-serif;
}

body.landing-legacy .legacy-main {
  margin-top: 0;
  overflow-x: clip;
  max-width: none;
  padding-top: 0 !important;
  padding-left: 0;
  padding-right: 0;
}

/*
 * Внутритекстовые ссылки на другие лендинги (разметка: class="text-brand underline").
 * Усиливаем подчёркивание и вес шрифта, чтобы ссылка читалась как элемент управления в блоках text-muted / FAQ.
 */
body.landing-legacy a.text-brand.underline {
  cursor: pointer;
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(var(--color-brand-rgb), 0.72);
  text-decoration-skip-ink: auto;
  transition:
    text-decoration-color 0.15s ease,
    color 0.15s ease,
    background-color 0.15s ease;
}

body.landing-legacy a.text-brand.underline:hover {
  text-decoration-color: var(--color-brand);
  color: var(--color-brand);
  background-color: rgba(var(--color-brand-rgb), 0.1);
  border-radius: 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0.06em 0.18em;
  margin: -0.06em -0.18em;
}

body.landing-legacy a.text-brand.underline:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
  border-radius: 3px;
}

body.landing-legacy .legacy-section,
body.landing-legacy .legacy-hero,
body.landing-legacy .legacy-footer {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

body.landing-legacy .legacy-section > *,
body.landing-legacy .legacy-hero__inner,
body.landing-legacy .legacy-footer > * {
  width: min(1140px, calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

body.landing-legacy .legacy-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.landing-legacy .legacy-header .page-wrap {
  width: min(1140px, calc(100% - 2.5rem));
  max-width: none;
  margin: 0 auto;
  padding: 1.5rem 0 0;
}

body.landing-legacy .legacy-header nav a,
body.landing-legacy .legacy-header .text-sm,
body.landing-legacy .legacy-header [href^="tel:"] {
  color: #fff !important;
}

body.landing-legacy .legacy-header-logo {
  display: inline-flex;
  align-items: center;
  height: 42px;
}

body.landing-legacy .legacy-header-logo img {
  display: block;
  width: auto;
  height: 42px;
}

body.landing-legacy .legacy-logo-dark {
  display: none !important;
}

body.landing-legacy .legacy-header .btn-primary {
  min-width: 170px;
  min-height: 50px;
  padding: 0 1.4rem;
}

body.landing-legacy .legacy-header.is-scrolled {
  position: fixed;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #d7e7f2;
  box-shadow: 0 8px 24px rgba(30, 30, 30, 0.08);
}

body.landing-legacy .legacy-header.is-scrolled .page-wrap {
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}

body.landing-legacy .legacy-header.is-scrolled nav a,
body.landing-legacy .legacy-header.is-scrolled .text-sm,
body.landing-legacy .legacy-header.is-scrolled [href^="tel:"] {
  color: #1e1e1e !important;
}

body.landing-legacy .legacy-header.is-scrolled .legacy-logo-light {
  display: none !important;
}

body.landing-legacy .legacy-header.is-scrolled .legacy-logo-dark {
  display: block !important;
}

/* Компактная навигация (мобильные и узкие окна): кнопка + выпадающая панель.
   Важно: display для кнопки только при max-width < lg — иначе inline-flex из темы
   перебивает Tailwind lg:hidden и бургер виден рядом с десктопным меню. */
body.landing-legacy .legacy-mobile-nav-toggle {
  align-items: center;
  justify-content: center;
  width: 2.625rem;
  height: 2.625rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

@media (max-width: 1023px) {
  body.landing-legacy .legacy-mobile-nav-toggle {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  body.landing-legacy .legacy-mobile-nav-toggle {
    display: none !important;
  }

  body.landing-legacy .legacy-mobile-nav {
    display: none !important;
  }
}

body.landing-legacy .legacy-mobile-nav-toggle:focus-visible {
  outline: 2px solid var(--color-brand, #2563eb);
  outline-offset: 2px;
}

body.landing-legacy .legacy-header.is-scrolled .legacy-mobile-nav-toggle {
  border-color: var(--color-border, #d7e7f2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text, #1e1e1e) !important;
}

body.landing-legacy .legacy-mobile-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 20;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 32px rgba(30, 30, 30, 0.12);
  max-height: min(70vh, 24rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.landing-legacy .legacy-header.is-scrolled .legacy-mobile-nav {
  border-top-color: var(--color-border, #d7e7f2);
}

body.landing-legacy .legacy-mobile-nav__link {
  display: block;
  color: var(--color-text, #1e1e1e) !important;
  padding-left: 0;
  padding-right: 0;
  border-bottom: 1px solid rgba(30, 30, 30, 0.06);
  font-weight: 500;
}

body.landing-legacy .legacy-mobile-nav__link:last-child {
  border-bottom: 0;
}

body.landing-legacy .legacy-mobile-nav__link:hover {
  color: var(--color-brand, #2563eb) !important;
}

body.landing-legacy .legacy-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  min-height: clamp(480px, 58vw, 860px);
  background: #1e1e1e url("./legacy/hero-bg.jpg") center center / cover no-repeat;
  clip-path: polygon(100% 0%, 100% 90%, 50% 100%, 0% 90%, 0% 0%);
  box-shadow: none;
}

body.landing-legacy .legacy-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  height: auto;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

body.landing-legacy .legacy-hero__inner {
  position: relative;
  z-index: 1;
  display: block;
  min-height: inherit;
  padding-top: 10rem !important;
  padding-bottom: 8rem !important;
}

body.landing-legacy .legacy-hero__content,
body.landing-legacy .legacy-hero__content p,
body.landing-legacy .legacy-hero__content li,
body.landing-legacy .legacy-hero__title,
body.landing-legacy .legacy-hero__form h2 {
  color: #fff;
}

body.landing-legacy .legacy-hero__content {
  position: relative;
  max-width: min(72.666667%, 54rem);
}

body.landing-legacy .legacy-hero__inner--with-form {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

body.landing-legacy .legacy-hero__content--with-form {
  max-width: none;
}

body.landing-legacy .legacy-hero__content::after {
  content: "";
  position: absolute;
  left: 3rem;
  bottom: 4rem;
  z-index: -1;
  width: 13rem;
  height: 13rem;
  opacity: 0.2;
  background: url("./legacy/logo-symbol.svg") center/contain no-repeat;
}

body.landing-legacy .legacy-eyebrow {
  background: transparent !important;
  padding: 0 !important;
  color: #fff !important;
  letter-spacing: 0;
  text-transform: none;
}

body.landing-legacy .legacy-hero__title {
  max-width: 9em;
  font-size: clamp(2.5rem, 4.2vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Подзаголовок hero: как h5 на старом лендинге (.promo-slider__subtitle), не второстепенный абзац; на тёмном hero — светлый текст, чуть мягче h1 */
body.landing-legacy .legacy-hero__subtitle {
  margin: 1rem 0 0;
  max-width: 25em;
  font-size: clamp(1.125rem, 2.1vw, 1.375rem);
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
}

body.landing-legacy .legacy-hero__actions {
  margin-top: 2rem;
}

body.landing-legacy .legacy-hero__actions .btn-primary {
  min-width: 240px;
  min-height: 50px;
  padding: 0 1.5rem;
}

body.landing-legacy .legacy-hero .legacy-hero__content > img.mt-6.w-full {
  display: none;
}

body.landing-legacy .legacy-hero-followup {
  margin-top: -1rem;
  padding-top: 0 !important;
}

body.landing-legacy .legacy-hero-followup__grid {
  position: relative;
  z-index: 2;
  margin-top: -4.5rem;
}

body.landing-legacy .legacy-hero-followup .legacy-form-card,
body.landing-legacy .legacy-hero-followup .tile-card,
body.landing-legacy .legacy-hero-followup .tile-stack {
  background: #ebf5fa;
  color: #1e1e1e;
}

body.landing-legacy .legacy-form-card {
  padding: 2rem 2rem 2.2rem !important;
}

body.landing-legacy .legacy-form-card h2,
body.landing-legacy .legacy-form-card p {
  color: #1e1e1e !important;
}

body.landing-legacy .legacy-form-card .input-field {
  border: 1px solid #e5e5e5;
  border-radius: 0.4rem;
  background: #fff;
  padding: 0.65rem 1.1rem;
}

body.landing-legacy .btn-primary {
  background: #3296c8;
  border: none;
  border-radius: 10px;
  transition: all 0.5s ease-in-out;
}

body.landing-legacy .btn-primary:hover {
  background: #96c8e1;
}

body.landing-legacy .legacy-switcher,
body.landing-legacy .legacy-section {
  position: relative;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding-top: 60px !important;
  padding-bottom: 60px !important;
}

body.landing-legacy .legacy-switcher {
  padding-top: 32px !important;
  padding-bottom: 24px !important;
}

/* Узкая полоса переключателя линейки под hero (вариант E, lineup-e) */
body.landing-legacy .legacy-lineup.legacy-section {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

/* MasterTMS 500+ (index): акцентный селектор версий — не как обычная белая секция */
body.landing-legacy .legacy-lineup--switcher.legacy-section {
  padding-top: 0.5rem !important;
  padding-bottom: 1rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Селектор редакций: тёмная шапка, скругление только сверху, светлая полоса вкладок */
body.landing-legacy .lineup-switcher-panel {
  width: min(1140px, calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: 16px 16px 0 0;
  background: #fff;
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.07);
}

body.landing-legacy .lineup-switcher-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, #1e3a4c 0%, #243d52 40%, #1a2f3d 100%);
}

body.landing-legacy .lineup-switcher-panel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.1rem;
  border-radius: 9px;
  font-size: 0.95rem;
  color: #b8e4f5;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.landing-legacy .lineup-switcher-panel__eyebrow {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3fc;
}

body.landing-legacy .lineup-switcher-panel__hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

/* Вкладки: нижняя черта на пунктах, фон полосы как у карточки */
body.landing-legacy .legacy-lineup--switcher .lineup-e {
  margin-top: 0;
  padding: 0.5rem 0.75rem 0.65rem;
  border: none;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.06);
  background: #fafcfd;
  min-height: 2.85rem;
}

body.landing-legacy .legacy-lineup--switcher .lineup-e .lineup-e__tab {
  padding: 0.55rem 1.15rem 0.65rem;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgb(var(--color-muted-rgb));
  border-bottom-width: 3px;
  margin-bottom: -2px;
  transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

body.landing-legacy .legacy-lineup--switcher .lineup-e a.lineup-e__tab:hover {
  color: rgb(var(--color-brand-rgb));
}

body.landing-legacy .legacy-lineup--switcher .lineup-e .lineup-e__tab--current {
  color: rgb(var(--color-brand-rgb));
  border-bottom-color: rgb(var(--color-brand-rgb));
}

body.landing-legacy .legacy-lineup--switcher .lineup-e .lineup-e__tab span.num {
  font-weight: 800;
  font-size: 0.78rem;
  opacity: 0.88;
  margin-left: 0.3rem;
}

body.landing-legacy .legacy-lineup--switcher .lineup-e .lineup-e__tab--current span.num {
  color: rgb(var(--color-brand-rgb));
  opacity: 0.95;
}

body.landing-legacy .legacy-lineup--switcher .lineup-e a.lineup-e__tab:focus-visible {
  outline: 2px solid rgb(var(--color-brand-rgb));
  outline-offset: 3px;
  border-radius: 4px;
}

/* Узкая ширина: вкладки в одну линию, горизонтальный свайп, полоса прокрутки скрыта */
@media (max-width: 767.98px) {
  body.landing-legacy .legacy-lineup--switcher .lineup-e.lineup-e--scroll-narrow {
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.landing-legacy .legacy-lineup--switcher .lineup-e.lineup-e--scroll-narrow .lineup-e__tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  body.landing-legacy .legacy-lineup--switcher .lineup-e.lineup-e--scroll-narrow::-webkit-scrollbar {
    display: none;
  }

  body.landing-legacy .legacy-lineup--switcher .lineup-e.lineup-e--scroll-narrow::after {
    content: "";
    flex: 0 0 0.65rem;
    align-self: stretch;
    scroll-snap-align: end;
  }
}

/* Секция «Задачи, которые мы решаем»: сетка из 8 блоков с SVG-иконками */
body.landing-legacy #corporate-tasks-we-solve,
body.landing-legacy #business-tasks-we-solve {
  scroll-margin-top: 5rem;
}

body.landing-legacy #corporate-tasks-we-solve .legacy-tasks__grid,
body.landing-legacy #business-tasks-we-solve .legacy-tasks__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 2vmax;
  column-gap: 1.5rem;
}

@media (min-width: 640px) {
  body.landing-legacy #corporate-tasks-we-solve .legacy-tasks__grid,
  body.landing-legacy #business-tasks-we-solve .legacy-tasks__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  body.landing-legacy #corporate-tasks-we-solve .legacy-tasks__grid,
  body.landing-legacy #business-tasks-we-solve .legacy-tasks__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.landing-legacy .legacy-tasks__item {
  text-align: left;
}

body.landing-legacy .legacy-tasks__icon img {
  display: block;
  height: 3.5rem;
  width: auto;
  max-width: 4.5rem;
}

body.landing-legacy .legacy-tasks__title {
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: rgb(var(--color-text-rgb));
}

body.landing-legacy .legacy-tasks__text {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgb(var(--color-muted-rgb));
}

body.landing-legacy .legacy-section--lgray {
  background: #ebf5fa;
}

body.landing-legacy .doc-card.legacy-section--lgray {
  background-color: #ebf5fa;
}

/* Секция «Почему MasterTMS» (старый #advantages): иконки + крупные цифры + подписи */
body.landing-legacy .legacy-count-item {
  text-align: left;
}

body.landing-legacy .legacy-count-item__icon {
  display: block;
}

body.landing-legacy .legacy-count-item__icon img {
  display: block;
  height: auto;
  width: auto;
  max-height: 3.5rem;
  max-width: 5.5rem;
}

body.landing-legacy .legacy-count-item__title {
  margin: 1.5rem 0 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: rgb(var(--color-text-rgb));
}

body.landing-legacy .legacy-count-item__text {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
  color: rgb(var(--color-text-rgb));
}

body.landing-legacy .legacy-section--arrow {
  clip-path: polygon(50% 10%, 100% 0%, 100% 90%, 50% 100%, 0% 90%, 0% 0%);
  padding-top: 10% !important;
}

body.landing-legacy .legacy-section--dark {
  color: #fff;
  background: #1e1e1e url("./legacy/cta-bg.jpg") center/cover no-repeat;
}

body.landing-legacy .legacy-section--dark p,
body.landing-legacy .legacy-section--dark li,
body.landing-legacy .legacy-section--dark .legacy-heading,
body.landing-legacy .legacy-section--dark .text-muted {
  color: #fff !important;
}

/* Нижний CTA: заголовок на всю ширину секции; под ним — форма слева ~50%, текст справа */
body.landing-legacy .legacy-cta-section .legacy-cta-section__title .legacy-heading {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

body.landing-legacy .legacy-cta-section .legacy-form-card,
body.landing-legacy .legacy-cta-section .legacy-form-card p {
  color: #1e1e1e !important;
}

body.landing-legacy .legacy-cta-section .legacy-form-card .text-muted {
  color: rgb(var(--color-muted-rgb)) !important;
}

/* Подсказки DaData: li в .legacy-section--dark иначе белые на белом фоне списка */
body.landing-legacy .legacy-section--dark .legacy-form-card .party-suggest-item,
body.landing-legacy .legacy-section--dark .legacy-form-card .party-suggest-list li {
  color: rgb(var(--color-text-rgb)) !important;
}

body.landing-legacy .legacy-heading {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: min(1140px, calc(100% - 2.5rem));
  isolation: isolate;
  z-index: 0;
  margin-top: 1.4rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.35rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  /* Водяной знак data-legacy-layout (::after): ещё +20% от min(4.5rem, 2.82em) */
  --legacy-heading-watermark-size: min(5.4rem, 3.384em);
  --legacy-heading-watermark-offset: 1.12em;
  --legacy-heading-watermark-shift-x: 0.04em;
}

/* Слои (снизу вверх): data-legacy-layout → data-legacy-pretitle → основной текст */
body.landing-legacy .legacy-heading__main {
  position: relative;
  z-index: 2;
  font-size: 1.2em; /* +20% к размеру шрифта h2 (text-2xl и т.п.) */
}

body.landing-legacy .legacy-heading::before {
  content: attr(data-legacy-pretitle);
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 0.55rem;
  color: #a9aeb3;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

body.landing-legacy .legacy-heading::after {
  content: attr(data-legacy-layout);
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  top: calc(100% - var(--legacy-heading-watermark-offset));
  font-size: var(--legacy-heading-watermark-size);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.3px #ebebeb;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  transform: translateX(var(--legacy-heading-watermark-shift-x));
  z-index: 0;
  pointer-events: none;
}

body.landing-legacy .legacy-heading--center {
  display: block;
  text-align: center;
}

body.landing-legacy .legacy-heading--center::after {
  left: 0;
  right: 0;
  width: 100%;
  transform: none;
  text-align: center;
}

body.landing-legacy .legacy-heading--on-dark::after {
  color: transparent;
  -webkit-text-stroke: 1.3px #ebebeb;
}

/* Содержимое секции под h2 — над слоем заголовка (водяной знак ::after может наезжать на следующий блок) */
body.landing-legacy .legacy-heading ~ * {
  position: relative;
  z-index: 1;
}

body.landing-legacy .tile-card,
body.landing-legacy .tile-stack,
body.landing-legacy .stat-card,
body.landing-legacy .faq-details {
  border: 0;
  border-radius: 10px;
  background: #ebf5fa;
  box-shadow: none;
}

body.landing-legacy .tile-card,
body.landing-legacy .tile-stack {
  padding: 2rem;
  gap: 1rem;
}

body.landing-legacy .tile-card-icon {
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  border-radius: 0;
  background: transparent;
  color: #3296c8;
}

body.landing-legacy .tile-card-icon i {
  font-size: 2rem;
}

body.landing-legacy .legacy-map-block {
  position: relative;
  min-height: 34vw;
  margin-top: 4rem;
  background: url("./legacy/map-bg.svg") center/contain no-repeat;
}

body.landing-legacy .legacy-map-block::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(21.6vw, 300px);
  height: min(7.2vw, 100px);
  transform: translate(-50%, -80%);
  background: url("./legacy/logo.svg") center/contain no-repeat;
}

body.landing-legacy .legacy-map-item {
  position: absolute;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body.landing-legacy .legacy-map-item--lt {
  left: 2vw;
  top: 0;
}

body.landing-legacy .legacy-map-item--rt {
  right: 2vw;
  top: 0;
}

body.landing-legacy .legacy-map-item--lb {
  left: 2vw;
  bottom: 0;
}

body.landing-legacy .legacy-map-item--rb {
  right: 2vw;
  bottom: 0;
}

body.landing-legacy .legacy-map-item__top {
  position: relative;
}

body.landing-legacy .legacy-map-item__top svg {
  width: min(9vw, 200px);
  min-width: 160px;
}

body.landing-legacy .legacy-ring {
  fill: #3296c8;
}

body.landing-legacy .legacy-map-item__value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.3rem;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

body.landing-legacy .legacy-map-item__description {
  width: 19rem;
  margin-top: 1rem;
  font-size: 1.12rem;
  line-height: 1.35;
  font-weight: 600;
}

body.landing-legacy .legacy-section--dark .tile-card,
body.landing-legacy .legacy-section--dark .tile-stack,
body.landing-legacy .legacy-section--dark .faq-details {
  background: rgba(255, 255, 255, 0.12);
}

body.landing-legacy .legacy-section--dark .tile-card-icon {
  color: #fff;
}

body.landing-legacy .compare-table thead {
  background: #ebf5fa;
}

body.landing-legacy .compare-table th,
body.landing-legacy .compare-table td {
  vertical-align: top;
}

body.landing-legacy .legacy-faq-item {
  padding: 0;
  overflow: hidden;
}

body.landing-legacy .legacy-faq-item summary {
  position: relative;
  list-style: none;
  padding: 1.35rem 3.5rem 1.35rem 1.5rem;
  font-size: 1.15rem;
}

body.landing-legacy .legacy-faq-item summary::-webkit-details-marker {
  display: none;
}

body.landing-legacy .legacy-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.35rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  line-height: 1;
  color: #3296c8;
}

body.landing-legacy .legacy-faq-item[open] summary::after {
  content: "−";
}

body.landing-legacy .legacy-faq-item p {
  padding: 0 1.5rem 1.35rem;
}

body.landing-legacy .line-pill,
body.landing-legacy .btn-outline {
  border-color: #d7e7f2;
  background: #fff;
}

body.landing-legacy .legacy-footer {
  border-top: 0;
  background: #ebf5fa;
  outline: 20vw solid #ebf5fa;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (min-width: 1200px) {
  body.landing-legacy .legacy-section--arrow {
    padding-top: 10% !important;
  }
}

@media (max-width: 1024px) {
  body.landing-legacy .legacy-section--arrow {
    padding-top: 15% !important;
  }
}

@media (max-width: 960px) {
  body.landing-legacy .legacy-header {
    position: sticky;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid #d7e7f2;
    box-shadow: 0 8px 24px rgba(30, 30, 30, 0.08);
  }

  body.landing-legacy .legacy-header .page-wrap {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
  }

  body.landing-legacy .legacy-header nav a,
  body.landing-legacy .legacy-header .text-sm,
  body.landing-legacy .legacy-header [href^="tel:"] {
    color: #1e1e1e !important;
  }

  body.landing-legacy .legacy-logo-light {
    display: none !important;
  }

  body.landing-legacy .legacy-logo-dark {
    display: block !important;
  }

  /* На узкой ширине шапка уже «светлая» — кнопка меню в том же стиле, что после скролла */
  body.landing-legacy .legacy-mobile-nav-toggle {
    border-color: var(--color-border, #d7e7f2);
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text, #1e1e1e) !important;
  }

  body.landing-legacy .legacy-hero {
    min-height: clamp(420px, 64vw, 620px);
    background-position: center center;
    clip-path: polygon(100% 0%, 100% 95%, 50% 100%, 0% 95%, 0% 0%);
  }

  body.landing-legacy .legacy-hero__inner {
    padding-top: 8rem !important;
    padding-bottom: 6rem !important;
  }

  body.landing-legacy .legacy-hero__content {
    max-width: min(82%, 54rem);
  }

  body.landing-legacy .legacy-hero__content--with-form {
    max-width: none;
  }

  body.landing-legacy .legacy-section--arrow {
    clip-path: polygon(50% 5%, 100% 0%, 100% 95%, 50% 100%, 0% 95%, 0% 0%);
  }

  body.landing-legacy .legacy-map-block {
    min-height: 500px;
    background-size: contain;
  }

  body.landing-legacy .legacy-map-block::after {
    display: none;
  }
}

@media (max-width: 768px) {
  body.landing-legacy .legacy-section > *,
  body.landing-legacy .legacy-hero__inner,
  body.landing-legacy .legacy-footer > *,
  body.landing-legacy .legacy-header .page-wrap {
    width: min(1140px, calc(100% - 1.5rem));
  }

  body.landing-legacy .legacy-heading {
    width: min(1140px, calc(100% - 1.5rem));
  }

  body.landing-legacy .legacy-hero {
    min-height: clamp(380px, 78vw, 560px);
  }

  body.landing-legacy .legacy-hero__content {
    max-width: 100%;
  }

  body.landing-legacy .legacy-hero__content--with-form {
    max-width: 100%;
  }

  body.landing-legacy .legacy-hero__content::after {
    left: 1.5rem;
    bottom: 2rem;
    width: 9rem;
    height: 9rem;
  }

  body.landing-legacy .legacy-hero-followup__grid {
    margin-top: -2rem;
  }

  body.landing-legacy .legacy-map-block {
    min-height: 50vw;
  }
}

@media (max-width: 600px) {
  body.landing-legacy .legacy-hero {
    min-height: clamp(340px, 92vw, 520px);
  }

  body.landing-legacy .legacy-hero__title {
    max-width: none;
    font-size: 2.15rem;
  }

  body.landing-legacy .legacy-hero__content::after {
    width: 7rem;
    height: 7rem;
    left: 0.75rem;
    bottom: 1.5rem;
  }

  body.landing-legacy .legacy-header .btn-primary {
    min-width: 0;
  }

  body.landing-legacy .legacy-hero__form .btn-primary,
  body.landing-legacy .legacy-cta-section .btn-primary,
  body.landing-legacy .btn-primary.w-full {
    width: 100%;
  }

  body.landing-legacy .legacy-map-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-height: 0;
    background: none;
  }

  body.landing-legacy .legacy-map-item {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
  }

  body.landing-legacy .legacy-hero__actions .btn-primary {
    min-width: 0;
  }

  body.landing-legacy .legacy-hero-followup__grid {
    margin-top: 0;
  }
}

@media (max-width: 380px) {
  body.landing-legacy .legacy-hero {
    min-height: clamp(320px, 95vw, 480px);
    clip-path: polygon(100% 0%, 100% 97.5%, 50% 100%, 0% 97.5%, 0% 0%);
  }

  body.landing-legacy .legacy-section--arrow {
    clip-path: polygon(50% 2.5%, 100% 0%, 100% 97.5%, 50% 100%, 0% 97.5%, 0% 0%);
  }
}

/* Premium visual layer (OSI-only baseline): depth, glow, reveal, parallax */
body.landing-legacy {
  --premium-parallax: 0px;
  --hero-glow-x: 68%;
  --hero-glow-y: 24%;
}

body.landing-legacy .legacy-main {
  position: relative;
}

body.landing-legacy .legacy-main::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 16% 8%, rgba(50, 150, 200, 0.09), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(84, 183, 165, 0.09), transparent 26%),
    radial-gradient(circle at 64% 90%, rgba(50, 150, 200, 0.07), transparent 28%);
}

body.landing-legacy .legacy-section,
body.landing-legacy .legacy-hero {
  transform: translateY(calc(var(--premium-parallax) * 0.4));
}

body.landing-legacy .legacy-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--hero-glow-x) var(--hero-glow-y), rgba(125, 211, 252, 0.26), transparent 28%),
    radial-gradient(circle at 22% 86%, rgba(255, 255, 255, 0.14), transparent 30%);
}

body.landing-legacy .tile-card,
body.landing-legacy .tile-stack,
body.landing-legacy .faq-details,
body.landing-legacy .legacy-form-card,
body.landing-legacy .lineup-switcher-panel {
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background-color 0.35s ease;
}

body.landing-legacy .tile-card:hover,
body.landing-legacy .tile-stack:hover,
body.landing-legacy .faq-details:hover {
  transform: translateY(-4px);
  border-color: rgba(50, 150, 200, 0.32);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

body.landing-legacy .legacy-form-card {
  position: relative;
  overflow: hidden;
}

body.landing-legacy .legacy-form-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.18), transparent 44%);
}

body.landing-legacy .legacy-section--dark {
  background-attachment: fixed;
}

body.landing-legacy .testimonial-marquee-item > div {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(125, 211, 252, 0.22);
}

body.landing-legacy .btn-primary {
  background-image: linear-gradient(135deg, rgb(var(--color-brand-rgb)) 0%, rgb(var(--color-accent-rgb)) 100%);
  box-shadow: 0 12px 28px rgba(50, 150, 200, 0.24);
}

body.landing-legacy .btn-primary:hover {
  background-image: linear-gradient(135deg, rgb(var(--color-brand-hover-rgb)) 0%, rgb(var(--color-brand-rgb)) 100%);
  box-shadow: 0 16px 34px rgba(50, 150, 200, 0.32);
}

body.landing-legacy .premium-reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 0.6s ease var(--reveal-delay, 0ms),
    transform 0.6s ease var(--reveal-delay, 0ms);
}

body.landing-legacy .premium-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 960px) {
  body.landing-legacy .legacy-section,
  body.landing-legacy .legacy-hero {
    transform: none;
  }

  body.landing-legacy .legacy-section--dark {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.landing-legacy .premium-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  body.landing-legacy .tile-card,
  body.landing-legacy .tile-stack,
  body.landing-legacy .faq-details,
  body.landing-legacy .legacy-form-card,
  body.landing-legacy .lineup-switcher-panel,
  body.landing-legacy .btn-primary {
    transition: none;
  }
}

/* Art direction pass: unique visual identity per landing */
html[data-theme="classic-blue"] body.landing-legacy {
  --premium-surface-glow: rgba(125, 211, 252, 0.22);
  --premium-card-lift: rgba(14, 116, 144, 0.2);
}

html[data-theme="classic-blue"] body.landing-legacy .legacy-main::before {
  background-image:
    radial-gradient(circle at 12% 10%, rgba(56, 189, 248, 0.12), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(45, 212, 191, 0.1), transparent 28%),
    radial-gradient(circle at 52% 92%, rgba(59, 130, 246, 0.1), transparent 28%);
}

html[data-theme="classic-blue"] body.landing-legacy .legacy-hero::after {
  background:
    radial-gradient(circle at var(--hero-glow-x) var(--hero-glow-y), rgba(125, 211, 252, 0.32), transparent 32%),
    radial-gradient(circle at 22% 86%, rgba(255, 255, 255, 0.16), transparent 34%);
}

html[data-theme="deep-corporate"] body.landing-legacy {
  --premium-surface-glow: rgba(129, 140, 248, 0.24);
  --premium-card-lift: rgba(67, 56, 202, 0.2);
}

html[data-theme="deep-corporate"] body.landing-legacy .legacy-main::before {
  background-image:
    radial-gradient(circle at 10% 8%, rgba(67, 56, 202, 0.14), transparent 36%),
    radial-gradient(circle at 84% 12%, rgba(14, 116, 144, 0.13), transparent 30%),
    radial-gradient(circle at 56% 90%, rgba(30, 64, 175, 0.1), transparent 28%);
}

html[data-theme="deep-corporate"] body.landing-legacy .legacy-hero {
  background-image:
    linear-gradient(140deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.78)),
    url("./legacy/hero-bg.jpg");
  background-blend-mode: soft-light, normal;
}

html[data-theme="deep-corporate"] body.landing-legacy .tile-card,
html[data-theme="deep-corporate"] body.landing-legacy .tile-stack,
html[data-theme="deep-corporate"] body.landing-legacy .faq-details {
  border-color: rgba(99, 102, 241, 0.22);
}

html[data-theme="light-neutral"] body.landing-legacy {
  --premium-surface-glow: rgba(16, 185, 129, 0.2);
  --premium-card-lift: rgba(5, 150, 105, 0.16);
}

html[data-theme="light-neutral"] body.landing-legacy .legacy-main::before {
  background-image:
    radial-gradient(circle at 14% 8%, rgba(52, 211, 153, 0.12), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(20, 184, 166, 0.1), transparent 28%),
    radial-gradient(circle at 58% 92%, rgba(110, 231, 183, 0.11), transparent 28%);
}

html[data-theme="light-neutral"] body.landing-legacy .legacy-hero::after {
  background:
    radial-gradient(circle at var(--hero-glow-x) var(--hero-glow-y), rgba(167, 243, 208, 0.3), transparent 34%),
    radial-gradient(circle at 16% 84%, rgba(255, 255, 255, 0.18), transparent 36%);
}

/* Предприниматель: сдвиг кадра и текста вправо — как на корпоративном hero, меньше перекрытия центра фото */
html[data-theme="light-neutral"] body.landing-legacy .legacy-hero {
  background-position: 56% center;
}

@media (min-width: 1024px) {
  html[data-theme="light-neutral"] body.landing-legacy .legacy-hero__content--with-form {
    padding-left: clamp(1rem, 3.2vw, 2.5rem);
  }
}

html[data-theme="light-neutral"] body.landing-legacy .btn-primary {
  background-image: linear-gradient(135deg, rgb(16, 185, 129) 0%, rgb(6, 182, 212) 100%);
}

html[data-theme="light-neutral"] body.landing-legacy .btn-primary:hover {
  background-image: linear-gradient(135deg, rgb(5, 150, 105) 0%, rgb(8, 145, 178) 100%);
}

body.landing-legacy .tile-card:hover,
body.landing-legacy .tile-stack:hover,
body.landing-legacy .faq-details:hover {
  box-shadow:
    0 16px 32px rgba(15, 23, 42, 0.12),
    0 0 0 1px var(--premium-surface-glow, rgba(125, 211, 252, 0.22));
}

/* Invoice modal (landing-invoice-modal.js) */
body.master-tms-modal-open {
  overflow: hidden;
}

.master-tms-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.master-tms-modal.hidden,
.master-tms-modal[hidden] {
  display: none !important;
}

.master-tms-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.master-tms-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  max-height: min(92vh, 720px);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.35));
  background: var(--surface, #fff);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Модалка кода регистрации — компактная, не ширина invoice-modal (28rem) */
.master-tms-modal__panel.master-tms-registration-code-panel {
  width: min(100%, 20rem);
  max-width: min(100%, 20rem);
}

@media (min-width: 640px) {
  .master-tms-modal__panel.master-tms-registration-code-panel {
    width: min(100%, 22rem);
    max-width: min(100%, 22rem);
  }
}

.master-tms-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 0;
}

.master-tms-modal__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.master-tms-modal__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #64748b);
  cursor: pointer;
}

.master-tms-modal__close:hover {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text, #0f172a);
}

.master-tms-modal__body {
  padding: 1rem 1.25rem 1.25rem;
}

.master-tms-modal__note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted, #64748b);
}

[data-master-tms-invoice-captcha] {
  min-height: 102px;
}

[data-master-tms-invoice-captcha].hidden {
  display: none;
}

/* --- ИИ-чат SMB (business/) --- */
.master-tms-ai-chat {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 10040;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  font-family: var(--font-sans, "Nunito", system-ui, sans-serif);
  pointer-events: none;
}

.master-tms-ai-chat * {
  pointer-events: auto;
}

.master-tms-ai-chat__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transform: scale(1);
  transition:
    transform 0.28s cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 0.28s ease,
    filter 0.2s ease;
}

.master-tms-ai-chat__toggle:hover {
  filter: brightness(1.05);
}

.master-tms-ai-chat--expanded .master-tms-ai-chat__toggle {
  transform: scale(0.94);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.28);
}

.master-tms-ai-chat__panel {
  display: flex;
  flex-direction: column;
  width: min(100vw - 2rem, 22rem);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.75rem) scale(0.97);
  transform-origin: bottom right;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #fff;
  box-shadow: none;
  transition:
    max-height 0.4s cubic-bezier(0.33, 1, 0.68, 1),
    opacity 0.3s ease,
    transform 0.34s cubic-bezier(0.33, 1, 0.68, 1),
    visibility 0.3s ease,
    border-color 0.25s ease,
    box-shadow 0.3s ease;
}

.master-tms-ai-chat--expanded .master-tms-ai-chat__panel {
  max-height: min(70vh, 28rem);
  min-height: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.master-tms-ai-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
}

.master-tms-ai-chat__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
}

.master-tms-ai-chat__close {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.master-tms-ai-chat__close:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #0f172a;
}

.master-tms-ai-chat__thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scroll-behavior: smooth;
}

.master-tms-ai-chat__msg {
  display: flex;
  width: 100%;
  animation: master-tms-ai-chat-msg-in 0.34s cubic-bezier(0.33, 1, 0.68, 1) both;
}

@keyframes master-tms-ai-chat-msg-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.master-tms-ai-chat__msg--user {
  justify-content: flex-end;
}

.master-tms-ai-chat__msg--assistant {
  justify-content: flex-start;
}

.master-tms-ai-chat__bubble {
  max-width: 85%;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
}

.master-tms-ai-chat__bubble--md > :first-child {
  margin-top: 0;
}

.master-tms-ai-chat__bubble--md > :last-child {
  margin-bottom: 0;
}

.master-tms-ai-chat__bubble--md p {
  margin: 0 0 0.5rem;
  white-space: pre-wrap;
}

.master-tms-ai-chat__bubble--md p:last-child {
  margin-bottom: 0;
}

.master-tms-ai-chat__bubble--md h3,
.master-tms-ai-chat__bubble--md h4 {
  margin: 0.25rem 0 0.375rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.master-tms-ai-chat__bubble--md ul,
.master-tms-ai-chat__bubble--md ol {
  margin: 0 0 0.5rem;
  padding-left: 0;
  list-style: none;
}

.master-tms-ai-chat__bubble--md li {
  display: block;
  margin: 0.25rem 0;
  padding-left: 0;
}

.master-tms-ai-chat__bubble--md blockquote {
  margin: 0 0 0.5rem;
  padding-left: 0.625rem;
  border-left: 3px solid rgba(148, 163, 184, 0.55);
  color: #475569;
}

.master-tms-ai-chat__bubble--md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.06);
}

.master-tms-ai-chat__bubble--md pre {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
}

.master-tms-ai-chat__bubble--md pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  white-space: pre-wrap;
}

.master-tms-ai-chat__bubble--md a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.master-tms-ai-chat__msg--user .master-tms-ai-chat__bubble--md a {
  color: #dbeafe;
}

.master-tms-ai-chat__msg--user .master-tms-ai-chat__bubble {
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
  white-space: pre-wrap;
}

.master-tms-ai-chat__msg--assistant .master-tms-ai-chat__bubble {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-left-radius: 4px;
}

.master-tms-ai-chat__bubble--typing {
  opacity: 0.7;
  font-style: italic;
}

.master-tms-ai-chat__form {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.625rem 0.75rem 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.master-tms-ai-chat__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0.625rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  font-size: 0.875rem;
}

.master-tms-ai-chat__input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 1px;
}

.master-tms-ai-chat__send {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.master-tms-ai-chat__send:disabled,
.master-tms-ai-chat__input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .master-tms-ai-chat__toggle,
  .master-tms-ai-chat__panel,
  .master-tms-ai-chat__msg {
    transition: none !important;
    animation: none !important;
  }

  .master-tms-ai-chat__thread {
    scroll-behavior: auto;
  }
}
