html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body > x-dc > div {
  max-width: 100%;
  overflow-x: clip;
}

.hero-secondary {
  max-width: 920px;
  margin: -10px 0 24px;
  color: #f2efe9;
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.hero-qualification {
  display: inline-flex;
  align-items: center;
  margin: 0 0 20px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.hero-meta-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 24px !important;
  align-items: start;
}

.hero-meta-grid > div {
  min-width: 0;
}

.hero-meta-grid--wide {
  grid-column: 1 / -1;
}

.result-strip,
.decision-roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.result-strip > div,
.decision-roles > div {
  min-width: 0;
  padding: 22px;
  border: 1px solid #d8d3c9;
  border-radius: 8px;
  background: #fbfaf6;
}

.result-strip strong,
.decision-roles strong {
  display: block;
  margin-bottom: 8px;
  color: #0e211e;
  font-size: 15px;
  line-height: 21px;
}

.result-strip span,
.decision-roles span {
  display: block;
  color: #5a6b66;
  font-size: 14px;
  line-height: 21px;
}

.source-note {
  margin: 20px 0 0;
  color: #5a6b66;
  font-size: 12px;
  line-height: 18px;
}

.source-note a {
  font-weight: 600;
}

.footer-products {
  gap: 0 !important;
  border-top: 1px solid #2a4a42;
}

.footer-products a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #2a4a42;
  font-size: 14px;
  line-height: 20px;
}

.legal-page {
  min-height: 100vh;
  background: #f2efe9;
  color: #0e211e;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.legal-header,
.legal-footer {
  background: #0e211e;
  color: #fff;
}

.legal-header__inner,
.legal-footer__inner,
.legal-content {
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
}

.legal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.legal-header img {
  display: block;
  height: 40px;
  width: auto;
}

.legal-header a,
.legal-footer a {
  color: #fff;
}

.legal-content {
  padding: 72px 0 88px;
}

.legal-content h1 {
  max-width: 880px;
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.legal-version {
  margin: 0 0 40px;
  color: #5a6b66;
  font-size: 14px;
}

.legal-content section {
  margin: 0 0 36px;
  padding: 28px 30px;
  border: 1px solid #d8d3c9;
  border-radius: 10px;
  background: #fbfaf6;
}

.legal-content h2 {
  margin: 0 0 16px;
  font-size: 23px;
  line-height: 1.25;
}

.legal-content h3 {
  margin: 22px 0 10px;
  font-size: 18px;
}

.legal-content p,
.legal-content li {
  font-size: 16px;
  line-height: 1.62;
}

.legal-content ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-content a {
  color: #c2331b;
  font-weight: 600;
}

.legal-doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.legal-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 30px;
  padding: 32px 0;
  color: #8a9793;
  font-size: 13px;
  line-height: 20px;
}

section[data-screen-label] {
  scroll-margin-top: 78px;
}

@media (min-width: 701px) {
  section[data-screen-label][style*="padding:128px 0"],
  section[data-screen-label][style*="padding: 128px 0"] {
    padding: 88px 0 !important;
  }

  section[data-screen-label][style*="padding:96px 0"],
  section[data-screen-label][style*="padding: 96px 0"] {
    padding: 76px 0 !important;
  }

  section[data-screen-label="Первый экран"] > div:last-child {
    padding-top: 72px !important;
    padding-bottom: 68px !important;
  }
}

@media (max-width: 700px) {
  header > div {
    min-height: 0 !important;
    padding: 9px 16px !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }

  header img {
    height: 32px !important;
  }

  header > div > div {
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }

  header > div > div > a[href="index.dc.html"],
  header a[href^="tel:"] {
    display: none !important;
  }

  header > div > div > a:last-child {
    height: 40px !important;
    padding: 0 14px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
  }

  section[data-screen-label] {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
    scroll-margin-top: 58px;
  }

  section[data-screen-label="Первый экран"] > div:last-child {
    padding: 34px 20px 40px !important;
  }

  section[data-screen-label="Первый экран"] > div:last-child > span:nth-of-type(2) {
    display: none !important;
  }

  section[data-screen-label="Первый экран"] h1 {
    max-width: 100% !important;
    font-size: 34px !important;
    line-height: 1.08 !important;
    margin-bottom: 16px !important;
  }

  .hero-secondary {
    margin-top: -4px;
    margin-bottom: 16px;
    font-size: 21px;
    line-height: 1.28;
  }

  .hero-qualification {
    margin-bottom: 14px;
    padding: 7px 10px;
  }

  section[data-screen-label="Первый экран"] > div:last-child > p:not(.hero-secondary) {
    font-size: 16px !important;
    line-height: 1.48 !important;
  }

  section[data-screen-label="Первый экран"] > div:last-child > p:last-of-type {
    margin-bottom: 24px !important;
  }

  .hero-case-card {
    display: none !important;
  }

  section[data-screen-label="Первый экран"] > div:last-child > div[style*="border-top"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 12px 18px !important;
    padding: 16px 0 !important;
    margin-bottom: 24px !important;
  }

  section[data-screen-label="Первый экран"] > div:last-child > div[style*="border-top"] > div:last-child {
    grid-column: 1 / -1;
  }

  .result-strip,
  .decision-roles {
    grid-template-columns: 1fr;
  }

  [style*="min-width:520px"],
  [style*="min-width: 520px"] {
    min-width: 0 !important;
  }

  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns:120px"],
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns: 120px"],
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns:150px"],
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns: 150px"],
  [data-screen-label="Расписание сезона"] [style*="grid-template-columns: 150px"],
  [data-screen-label="Расписание интенсивов"] [style*="grid-template-columns:150px"] {
    grid-template-columns: 86px minmax(0, 1fr) !important;
  }

  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns:120px"] > *:nth-child(4n + 3),
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns:120px"] > *:nth-child(4n + 4),
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns: 120px"] > *:nth-child(4n + 3),
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns: 120px"] > *:nth-child(4n + 4),
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns:150px"] > *:nth-child(3),
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns:150px"] > *:nth-child(4),
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns: 150px"] > *:nth-child(3),
  [data-screen-label="Ближайшие даты"] [style*="grid-template-columns: 150px"] > *:nth-child(4),
  [data-screen-label="Расписание сезона"] [style*="grid-template-columns: 150px"] > *:nth-child(3),
  [data-screen-label="Расписание сезона"] [style*="grid-template-columns: 150px"] > *:nth-child(4),
  [data-screen-label="Расписание интенсивов"] [style*="grid-template-columns:150px"] > *:nth-child(3),
  [data-screen-label="Расписание интенсивов"] [style*="grid-template-columns:150px"] > *:nth-child(4) {
    display: none !important;
  }

  [data-screen-label="Сравнение"] > div > div:last-child {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .legal-header__inner,
  .legal-footer__inner,
  .legal-content {
    width: min(100% - 32px, 1080px);
  }

  .legal-header__inner {
    min-height: 58px;
  }

  .legal-header img {
    height: 31px !important;
  }

  .legal-content {
    padding: 48px 0 64px;
  }

  .legal-content section {
    padding: 22px 20px;
  }
}
