/* Компактная версия для телефонов (до 600 px). На планшетах и компьютерах не действует. */
.mlMore, .mlRailDots { display: none; }

@media (max-width: 600px) {
  /* Ритм страницы: меньше пустоты между секциями, заголовки в 2 строки, а не в 4 */
  body main section.section,
  body main section.alt,
  body main > section { padding-top: 40px; padding-bottom: 40px; }
  body main section h2 { font-size: 26px !important; line-height: 1.12 !important; margin-bottom: 12px; max-width: none !important; }
  body footer h2 { font-size: 28px !important; line-height: 1.1 !important; }
  body main section h1 { font-size: 36px !important; line-height: 1.05 !important; }
  body main .sectionLead { font-size: 15px; line-height: 1.5; }
  body main .eyebrow { margin-bottom: 8px; }

  /* Первый экран: убираем ряд мелких плашек и третью кнопку */
  body main .badges { display: none !important; }
  body main .heroActions { gap: 8px; }
  body main .heroActions > :nth-child(n+3) { display: none !important; }
  body main .heroActions a, body main .heroActions button { min-height: 44px; }
  body main .registryNotice { padding: 10px 12px; }
  body main .productPhotoFrame img,
  body main .profilometerHeroVisual img { max-height: 240px; width: auto; margin: 0 auto; object-fit: contain; }

  /* Карточки, которые шли столбиком на много экранов, — горизонтальная лента с листанием */
  body main .sensorTriptych,
  body main .featureGrid,
  body main .konturGalleryGrid,
  body main .microscopeModeGrid,
  body main .microscopeResults,
  body main .microscopeApplicationGrid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -16px; margin-right: -16px;
    padding: 4px 16px 8px !important;
    scroll-padding-left: 16px;
    grid-template-columns: none !important;
    align-items: flex-start !important;
  }
  body main .sensorTriptych::-webkit-scrollbar,
  body main .featureGrid::-webkit-scrollbar,
  body main .konturGalleryGrid::-webkit-scrollbar,
  body main .microscopeModeGrid::-webkit-scrollbar,
  body main .microscopeResults::-webkit-scrollbar,
  body main .microscopeApplicationGrid::-webkit-scrollbar { display: none; }
  body main .sensorTriptych > *,
  body main .featureGrid > *,
  body main .konturGalleryGrid > *,
  body main .microscopeModeGrid > *,
  body main .microscopeResults > *,
  body main .microscopeApplicationGrid > * {
    flex: 0 0 80% !important;
    max-width: 80% !important;
    scroll-snap-align: start;
    margin: 0 !important;
    grid-column: auto !important; grid-row: auto !important;
  }
  body main .sensorPhotoWrap { aspect-ratio: 16 / 10 !important; }
  body main .sensorTriptych img,
  body main .konturGalleryGrid img,
  body main .microscopeResults img { max-height: 190px; object-fit: contain; }

  /* Точки под лентой: показывают, что можно листать и где вы сейчас */
  .mlRailDots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
  .mlRailDots i { width: 6px; height: 6px; border-radius: 3px; background: #c6d2e1; transition: width .2s, background .2s; }
  .mlRailDots i.on { width: 18px; background: #1f4f93; }

  /* Документы: компактный список вместо больших пустых карточек */
  body main .docGrid { display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important; }
  body main .docGrid .docCard {
    display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px;
    min-height: 0 !important; padding: 12px 14px !important;
  }
  body main .docGrid .docCard > span { grid-row: 1 / 3; margin: 0 !important; }
  body main .docGrid .docCard h3 { font-size: 16px !important; margin: 0 !important; line-height: 1.25; }
  body main .docGrid .docCard p { margin: 2px 0 0 !important; font-size: 13px; }

  /* Комплект поставки (9 пунктов): две колонки небольших плиток */
  body main .kitGrid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  body main .kitGrid > *, body main .microscopeKitGrid > * { min-width: 0 !important; }
  body main .kitGrid .kitItem { padding: 10px 12px !important; min-height: 0 !important; gap: 8px !important; grid-template-columns: auto 1fr !important; }
  body main .kitGrid .kitItem strong { overflow-wrap: anywhere; hyphens: auto; }
  body main .kitGrid .kitItem strong { font-size: 14px; line-height: 1.25; }
  body main .microscopeKitGrid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }

  /* Таблица диапазонов датчика помещается в ширину экрана */
  body main .sensorRangeTable { font-size: 12px; overflow: visible !important; }
  body main .sensorRangeTable .sensorRangeRow { grid-template-columns: 0.7fr 1fr 1fr 1fr !important; min-width: 0 !important; }
  body main .sensorRangeTable .sensorRangeRow > * { padding: 8px 6px !important; min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: auto; -webkit-hyphens: auto; }
  body main .sensorRangeTable .sensorRangeHeader > * { font-size: 11px !important; line-height: 1.25; }
  body main .sensorRangeTable .sensorRangeShared > span { grid-column: 2 / -1 !important; }

  /* Длинные таблицы и списки сворачиваются (кнопку добавляет mobile-lite.js) */
  .mlCollapsed .mlHide { display: none !important; }
  .mlMore {
    display: block; width: 100%; margin: 10px 0 0; padding: 12px; min-height: 44px;
    border: 1px solid #c9d6e6; border-radius: 10px; background: #fff;
    font: inherit; font-size: 15px; font-weight: 600; color: #1f4f93; cursor: pointer;
  }
  .mlMore:focus-visible { outline: 2px solid #1f4f93; outline-offset: 2px; }
}

@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .mlRailDots i { transition: none; }
}

@media (max-width: 600px) {
  /* Публикации на странице СММ-2000: компактнее */
  body main .microscopePublication { padding: 18px !important; gap: 10px !important; }
  body main .microscopePublication h3 { font-size: 18px !important; line-height: 1.25 !important; }
}

@media (max-width: 600px) {
  /* Скачивание программы для Windows с телефона не нужно — блок показывается только на планшете и компьютере */
  body main .softwareSection { display: none !important; }
}
