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

.tm-lang-switcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 500;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(43, 191, 176, 0.28);
  border-radius: 8px;
  background: rgba(7, 9, 15, 0.82);
  color: #6B7280;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.tm-lang-switcher span {
  min-width: 34px;
  padding: 7px 9px;
  border-radius: 6px;
  font: 800 11px/1 Inter, Arial, sans-serif;
  text-align: center;
  letter-spacing: 0;
}

.tm-lang-switcher span.is-active {
  background: #2BBFB0;
  color: #07090F;
}

@media (max-width: 820px) {
  body.article-page h1,
  body.article-page h2 {
    text-align: left !important;
  }

  body.article-page .article-step[style*="display:flex"],
  body.article-page .article-step[style*="display: flex"] {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
  }

  body.article-page .article-step > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.article-page .article-step > div:last-child {
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding-top: 2px !important;
  }
}

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  min-width: 0;
}

nav > div:last-child > a[data-recorder-install],
nav > div:last-child > button,
nav > div:last-child > a:nth-of-type(5),
nav > div:last-child > a:nth-of-type(6) {
  height: 40px !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

nav > div:last-child > a[data-recorder-install] {
  width: auto !important;
  min-width: 40px !important;
  max-width: none !important;
  padding: 0 10px !important;
  gap: 0 !important;
}

nav > div:last-child > a[data-recorder-install] svg {
  display: block !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  transform: translateX(1px) !important;
}

nav > div:last-child > a[data-recorder-install] span {
  display: inline-block !important;
  line-height: 1 !important;
}

nav > div:last-child > a[data-recorder-install]:hover span {
  max-width: 90px !important;
  opacity: 1 !important;
  margin-left: 7px !important;
}

nav > div:last-child > button {
  width: 40px !important;
  padding: 0 !important;
}

nav > div:last-child > a:nth-of-type(5),
nav > div:last-child > a:nth-of-type(6) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 1024px) {
  section > div,
  main > div,
  footer > div {
    max-width: 720px !important;
  }

  section {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }

  section [style*="display: flex"][style*="gap: 24px"][style*="align-items: stretch"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  [style*="flex: 0 0 540px"] {
    flex: 1 1 auto !important;
    width: 100% !important;
  }

  [style*="display: grid"][style*="repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 820px) {
  .articles-section {
    overflow: visible !important;
  }

  .articles-scroll {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
  }

  .articles-scroll::-webkit-scrollbar {
    display: none;
  }

  .articles-row {
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
  }

  .articles-row.is-auto-scroll {
    animation: articlesAutoScroll 28s linear infinite !important;
    will-change: transform;
  }


  .article-card {
    flex: 0 0 min(82vw, 320px) !important;
    width: min(82vw, 320px) !important;
    max-width: min(82vw, 320px) !important;
  }

  .article-step {
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
  }

  .article-step > div:first-child {
    flex: 0 0 28px !important;
  }

  .article-step > div:last-child {
    flex: 1 1 auto !important;
  }

  nav {
    height: auto !important;
    min-height: 0 !important;
    padding: 12px 24px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 10px !important;
  }

  nav > a:first-child,
  nav > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: max-content !important;
    font-size: 21px !important;
    line-height: 1.2 !important;
    justify-self: start !important;
  }

  nav > div:last-child {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: max-content max-content max-content 38px 38px minmax(136px, 150px) minmax(156px, 178px) !important;
    align-items: center !important;
    justify-content: end !important;
    justify-items: end !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  nav a {
    flex: 0 1 auto !important;
    max-width: 100% !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
  }

  nav button {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  nav > div:last-child > a:nth-of-type(1) {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child > a:nth-of-type(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child > a:nth-of-type(3) {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child > a[data-recorder-install] {
    grid-column: 4 !important;
    grid-row: 1 !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    min-height: 38px !important;
    padding: 8px !important;
  }

  nav > div:last-child > a[data-recorder-install] span {
    display: none !important;
  }

  nav > div:last-child > button {
    grid-column: 5 !important;
    grid-row: 1 !important;
    width: 38px !important;
    margin-left: 0 !important;
  }

  nav > div:last-child > a:nth-of-type(5) {
    grid-column: 6 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child > a:nth-of-type(6) {
    grid-column: 7 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child > a:nth-of-type(n+5) {
    width: 100% !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: 11px !important;
    line-height: 1.12 !important;
    white-space: normal !important;
  }

  section,
  main {
    padding: 48px 18px !important;
    min-height: auto !important;
    overflow: hidden !important;
  }

  footer {
    padding: 36px 18px 24px !important;
  }

  footer > div:first-child,
  section > div,
  main > div {
    max-width: 100% !important;
  }

  footer > div:first-child {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  h1 {
    max-width: 100% !important;
    font-size: clamp(30px, 8.6vw, 40px) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    hyphens: none !important;
    text-wrap: balance !important;
  }

  h1 span {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  h2 {
    max-width: 100% !important;
    font-size: clamp(26px, 9vw, 36px) !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  p {
    max-width: 100% !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere !important;
  }

  input,
  textarea,
  button,
  a {
    max-width: 100% !important;
  }

  input,
  textarea {
    font-size: 16px !important;
  }

  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  [style*="display: grid"] {
    gap: 20px !important;
  }

  section [style*="display: flex"][style*="gap: 72px"],
  section [style*="display: flex"][style*="gap: 64px"],
  section [style*="display: flex"][style*="gap: 56px"],
  section [style*="display: flex"][style*="gap: 48px"],
  section [style*="display: flex"][style*="gap: 40px"],
  section [style*="display: flex"][style*="gap: 24px"],
  section [style*="display: flex"][style*="gap: 20px"][style*="max-width"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  section [style*="position: sticky"] {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
  }

  [style*="flex: 0 0 540px"],
  [style*="width: 540px"],
  [style*="width: 520px"],
  [style*="width: 480px"],
  [style*="width: 440px"],
  [style*="width: 420px"],
  [style*="width: 400px"],
  [style*="width: 380px"] {
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  [style*="flex: 0 0 480px"] {
    flex: 1 1 auto !important;
    width: 100% !important;
  }

  [style*="width: 265px"] {
    width: 100% !important;
    flex-shrink: 1 !important;
  }

  [style*="height: 330px"] {
    height: auto !important;
    min-height: 300px !important;
  }

  [style*="width: 148px"] {
    width: 118px !important;
    flex: 0 0 118px !important;
  }

  [style*="padding: '36px'"],
  [style*="padding: 36px"] {
    padding: 24px !important;
  }

  [style*="font-size: 52px"],
  [style*="font-size: 46px"],
  [style*="font-size: 42px"],
  [style*="font-size: 40px"] {
    font-size: clamp(28px, 8vw, 38px) !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    hyphens: none !important;
  }

  [style*="font-size: 34px"],
  [style*="font-size: 32px"] {
    font-size: clamp(24px, 8vw, 32px) !important;
    line-height: 1.16 !important;
    letter-spacing: 0 !important;
  }

  [style*="font-size: 52"] {
    font-size: clamp(32px, 7.5vw, 46px) !important;
    line-height: 1.12 !important;
  }

  [style*="letter-spacing: 1.5px"] {
    letter-spacing: 0.8px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  [style*="inline-flex"][style*="letter-spacing"] {
    max-width: 100% !important;
    flex-wrap: wrap !important;
    line-height: 1.4 !important;
  }

  [style*="display: flex"][style*="gap: 12px"],
  [style*="display: flex"][style*="gap: 14px"],
  [style*="display: flex"][style*="gap: 16px"] {
    flex-wrap: wrap !important;
  }

  [style*="font-variant-numeric"] {
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .contact-form-panel {
    order: 1 !important;
  }

  .contact-info-panel {
    order: 2 !important;
  }

  .contact-form-panel textarea {
    min-height: 150px !important;
  }

  section a[href="/form"][style*="padding"],
  section a[href="/contact"][style*="padding"],
  section a[href*="pro.testmanager"][style*="padding"] {
    min-width: 220px !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  [style*="display: flex"][style*="justify-content: center"] {
    flex-wrap: wrap !important;
  }

  [style*="height: 170px"] {
    height: auto !important;
    min-height: 145px !important;
  }

  [style*="position: absolute"][style*="top: 0"][style*="left: 0"][style*="right: 0"] {
    position: relative !important;
  }

  [style*="transform: translate("] {
    transform: none !important;
  }
}

@media (min-width: 821px) and (max-width: 1120px) {
  section > div,
  main > div,
  footer > div {
    max-width: min(100%, 960px) !important;
  }

  section,
  main {
    padding-left: clamp(36px, 5vw, 56px) !important;
    padding-right: clamp(36px, 5vw, 56px) !important;
  }

  section [style*="display: flex"][style*="gap: 72px"][style*="max-width: 1180px"] {
    max-width: 960px !important;
    gap: 36px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  section [style*="display: flex"][style*="gap: 72px"][style*="max-width: 1180px"] > div:first-child {
    flex: 0 1 460px !important;
  }

  footer {
    padding-left: clamp(36px, 5vw, 56px) !important;
    padding-right: clamp(36px, 5vw, 56px) !important;
  }

  footer > div:first-child {
    grid-template-columns: 1.25fr .8fr .9fr 1.25fr !important;
    gap: 28px !important;
  }

  footer > div:last-child {
    flex-wrap: wrap !important;
    align-items: center !important;
  }

  nav {
    height: auto !important;
    min-height: 0 !important;
    padding: 14px 28px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  nav > a:first-child,
  nav > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: max-content !important;
    max-width: 100% !important;
    justify-self: start !important;
  }

  nav > div:last-child {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    align-items: center !important;
    justify-content: center !important;
    justify-items: center !important;
    gap: 10px !important;
  }

  nav > div:last-child > a:nth-of-type(1) {
    grid-column: 4 / span 2 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child > a:nth-of-type(2) {
    grid-column: 6 / span 2 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child > a:nth-of-type(3) {
    grid-column: 8 / span 2 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child > a[data-recorder-install] {
    grid-column: 5 / span 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 170px !important;
    max-width: 204px !important;
    min-height: 38px !important;
    padding: 8px 14px !important;
  }

  nav > div:last-child > a[data-recorder-install] span {
    display: inline-block !important;
    max-width: 90px !important;
    opacity: 1 !important;
    margin-left: 7px !important;
  }

  nav > div:last-child > button {
    grid-column: 4 !important;
    grid-row: 2 !important;
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 8px !important;
  }

  nav > div:last-child > a:nth-of-type(5) {
    grid-column: 7 / span 2 !important;
    grid-row: 2 !important;
  }

  nav > div:last-child > a:nth-of-type(6) {
    grid-column: 9 / span 3 !important;
    grid-row: 2 !important;
  }

  nav > div:last-child > a:nth-of-type(n+5) {
    width: 100% !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: 11px !important;
    line-height: 1.12 !important;
    white-space: normal !important;
  }

  nav > div:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
  }

  nav > div:last-child::after {
    content: "" !important;
    order: 1 !important;
    flex: 0 0 100% !important;
    height: 0 !important;
  }

  nav > div:last-child > a:nth-of-type(1),
  nav > div:last-child > a:nth-of-type(2),
  nav > div:last-child > a:nth-of-type(3) {
    order: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 4px !important;
    flex: 0 0 auto !important;
  }

  nav > div:last-child > button,
  nav > div:last-child > a[data-recorder-install],
  nav > div:last-child > a:nth-of-type(5),
  nav > div:last-child > a:nth-of-type(6) {
    order: 2 !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  nav > div:last-child > button {
    flex: 0 0 38px !important;
  }

  nav > div:last-child > a[data-recorder-install] {
    flex: 0 1 190px !important;
    width: 190px !important;
    min-width: 170px !important;
    max-width: 204px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 8px 14px !important;
  }

  nav > div:last-child > a[data-recorder-install] svg {
    display: block !important;
    flex: 0 0 17px !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    transform: translateX(1px) !important;
  }

  nav > div:last-child > a[data-recorder-install] span {
    margin-left: 0 !important;
    line-height: 1 !important;
  }

  nav > div:last-child > a:nth-of-type(5) {
    flex: 0 1 190px !important;
    width: 190px !important;
    min-width: 170px !important;
    max-width: 210px !important;
  }

  nav > div:last-child > a:nth-of-type(6) {
    flex: 0 1 224px !important;
    width: 224px !important;
    min-width: 178px !important;
    max-width: 236px !important;
  }
}

@media (min-width: 821px) and (max-width: 1120px) {
  nav {
    grid-template-columns: max-content minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  nav > a:first-child,
  nav > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
  }

  nav > div:last-child {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  nav > div:last-child::after {
    content: none !important;
    display: none !important;
  }

  nav > div:last-child > a:nth-of-type(1),
  nav > div:last-child > a:nth-of-type(2),
  nav > div:last-child > a:nth-of-type(3),
  nav > div:last-child > button,
  nav > div:last-child > a[data-recorder-install],
  nav > div:last-child > a:nth-of-type(5),
  nav > div:last-child > a:nth-of-type(6) {
    order: initial !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  nav > div:last-child > a:nth-of-type(1),
  nav > div:last-child > a:nth-of-type(2),
  nav > div:last-child > a:nth-of-type(3) {
    flex: 0 0 auto !important;
    padding: 0 2px !important;
    font-size: 12px !important;
  }

  nav > div:last-child > a[data-recorder-install] {
    flex: 0 0 38px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px !important;
  }

  nav > div:last-child > a[data-recorder-install] span {
    display: none !important;
  }

  nav > div:last-child > button {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px !important;
  }

  nav > div:last-child > a:nth-of-type(5) {
    flex: 0 0 140px !important;
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
  }

  nav > div:last-child > a:nth-of-type(6) {
    flex: 0 0 176px !important;
    width: 176px !important;
    min-width: 176px !important;
    max-width: 176px !important;
  }

  nav > div:last-child > a:nth-of-type(n+5) {
    min-height: 38px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }
}

@media (min-width: 960px) and (max-width: 1120px) {
  nav > div:last-child > a[data-recorder-install] {
    flex-basis: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    padding: 8px !important;
  }
}

@media (max-width: 640px) {
  nav {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  h1 {
    font-size: clamp(28px, 8vw, 34px) !important;
  }

  [style*="height: 170px"] {
    overflow: visible !important;
  }

  [style*="font-size: 34px"],
  [style*="font-size: 32px"] {
    font-size: clamp(25px, 7.9vw, 31px) !important;
    line-height: 1.14 !important;
  }

  /* Hero block: tighter vertical rhythm and stable alignment on phones */
  section [style*="display: flex"][style*="gap: 72px"][style*="max-width: 1180px"] {
    gap: 22px !important;
    align-items: stretch !important;
  }

  [style*="flex: 0 0 480px"] [style*="display: flex"][style*="gap: 40px"] {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
    align-items: start !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  [style*="flex: 0 0 480px"] [style*="display: flex"][style*="gap: 40px"] > div {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }

  [style*="width: 380px"] {
    margin-top: 0 !important;
  }

  /* About page: reduce oversized gaps between feature rows/cards */
  [style*="display: grid"][style*="gap: 64"][style*="padding: 80px 0"] {
    padding: 30px 0 !important;
    gap: 18px !important;
  }

  [style*="padding: 40px 0"][style*="overflow: hidden"] {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  /* Pricing page: tighten hero-to-cards spacing */
  section[style*="padding: 72px 64px 0"] {
    padding-top: 34px !important;
    padding-bottom: 8px !important;
  }

  section[style*="padding: 0 64px 80px"] {
    padding-top: 10px !important;
  }

  [style*="margin: 0 auto 60px"] {
    margin-bottom: 24px !important;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 10px 14px !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  nav > a:first-child,
  nav > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  nav > div:last-child {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
  }

  nav a {
    font-size: 12px !important;
    padding: 7px 10px !important;
  }

  nav > div:last-child > a:nth-of-type(1) {
    order: 1 !important;
  }

  nav > div:last-child > a:nth-of-type(2) {
    order: 2 !important;
  }

  nav > div:last-child > a:nth-of-type(3) {
    order: 3 !important;
  }

  nav > div:last-child > a[data-recorder-install] {
    order: 4 !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin-left: 0 !important;
    flex: 0 0 38px !important;
    padding: 8px !important;
  }

  nav > div:last-child > a[data-recorder-install] span {
    display: none !important;
  }

  nav > div:last-child > button {
    order: 5 !important;
    width: 38px !important;
    height: 38px !important;
    margin-left: 0 !important;
  }

  nav > div:last-child > a:nth-of-type(5) {
    order: 6 !important;
    flex: 1 1 calc(50% - 8px) !important;
    min-height: 42px !important;
    max-width: 220px !important;
  }

  nav > div:last-child > a:nth-of-type(6) {
    order: 7 !important;
    flex: 1 1 calc(50% - 8px) !important;
    min-height: 42px !important;
    max-width: 220px !important;
  }

  nav > div:last-child > a:nth-of-type(n+5) {
    min-width: 0 !important;
    padding: 8px 10px !important;
    font-size: 11px !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    text-align: center !important;
  }

  nav > div:last-child > a:nth-of-type(-n+3) {
    flex: 0 1 auto !important;
  }

  section a[href="/form"][style*="padding"],
  section a[href$="/form/"][style*="padding"],
  section a[href="/contact"][style*="padding"],
  section a[href*="pro.testmanager"][style*="padding"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  section [style*="display: flex"][style*="gap: 16px"]:has(> a[href="https://pro.testmanager.software"]):has(> a[href$="/form/"]) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  section [style*="display: flex"][style*="gap: 16px"]:has(> a[href="https://pro.testmanager.software"]):has(> a[href$="/form/"]) > a {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 52px !important;
  }

  section [style*="display: flex"]:has(a[href="https://pro.testmanager.software"]):has(a[href$="/form/"]) {
    width: 100% !important;
  }

  section a[href="https://pro.testmanager.software"][style*="width: 280"],
  section a[href$="/form/"][style*="width: 280"] {
    width: 100% !important;
    flex: 1 1 100% !important;
    max-width: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  section a[href$="/form/"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  section,
  main {
    padding: 40px 14px !important;
  }

  h1 {
    font-size: clamp(28px, 9vw, 36px) !important;
    line-height: 1.12 !important;
    text-align: center !important;
  }

  h1 span {
    display: inline !important;
  }

  h2 {
    text-align: center !important;
  }

  [style*="font-size: 52px"],
  [style*="font-size: 46px"],
  [style*="font-size: 42px"],
  [style*="font-size: 40px"] {
    font-size: clamp(28px, 8.6vw, 36px) !important;
    line-height: 1.12 !important;
  }

  [style*="font-size: 52"] {
    font-size: clamp(30px, 8.4vw, 36px) !important;
    line-height: 1.13 !important;
  }

  footer {
    padding: 32px 14px 22px !important;
  }

  /* Footer: keep product and contacts side-by-side on phones */
  footer > div:first-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 18px 14px !important;
    align-items: start !important;
  }

  footer > div:first-child > div:nth-child(1) {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  footer > div:first-child > div:nth-child(2) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  footer > div:first-child > div:nth-child(3) {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  footer > div:first-child > div:nth-child(4) {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  [style*="borderRadius: 20"],
  [style*="border-radius: 20"] {
    border-radius: 14px !important;
  }

  [style*="padding: 32px"],
  [style*="padding: 36px"] {
    padding: 20px !important;
  }

  /* Extra compact hero alignment for very small screens */
  section [style*="display: flex"][style*="gap: 72px"][style*="max-width: 1180px"] {
    gap: 18px !important;
  }

  [style*="flex: 0 0 480px"] [style*="display: flex"][style*="gap: 40px"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    align-items: center !important;
    justify-items: center !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    text-align: center !important;
  }

  [style*="flex: 0 0 480px"] [style*="display: flex"][style*="gap: 40px"] > div {
    gap: 4px !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* About page: extra compact section rhythm on narrow phones */
  [style*="display: grid"][style*="gap: 64"][style*="padding: 80px 0"] {
    padding: 22px 0 !important;
    gap: 14px !important;
  }

  [style*="padding: 40px 0"][style*="overflow: hidden"] {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  /* Pricing page: remove oversized gap under heading block */
  section[style*="padding: 72px 64px 0"] {
    padding-top: 28px !important;
    padding-bottom: 4px !important;
  }

  section[style*="padding: 0 64px 80px"] {
    padding-top: 6px !important;
  }

  [style*="margin: 0 auto 60px"] {
    margin-bottom: 16px !important;
  }
}

@media (max-width: 820px) {
  body.article-page h1,
  body.article-page h2 {
    text-align: left !important;
  }

  body.article-page .article-step[style*="display:flex"],
  body.article-page .article-step[style*="display: flex"] {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
  }

  body.article-page .article-step > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.article-page .article-step > div:last-child {
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding-top: 2px !important;
  }
}
