/* Shared layout repairs for the standalone WordPress mirror. */
body > #header:has(+ footer) { position: relative; }
body > #header + #primary {
  max-width: 1160px;
  margin: 0 auto;
  padding: 210px 24px 64px;
}
body > #header + #primary > .container { padding: 0 !important; }
body > #header + #primary h1.entry-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  margin: 0 0 24px;
}
#primary .entry-content { overflow-wrap: anywhere; }
#primary p, #primary li, #primary .mantis-policy-region {
  font-size: 16px;
  line-height: 1.65;
}
#primary h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.3; margin: 28px 0 12px; }
#primary h3 { font-size: 20px; line-height: 1.4; }
#primary .mantis-policy-region p { font-size: 16px; }
.mantis-video-consent {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  aspect-ratio: auto;
  white-space: normal;
  overflow-wrap: anywhere;
}
.mantis-video-consent > * { max-width: 100%; }
.wrapper-filter-newsevents ul { flex-wrap: wrap; }
/* Align the final dropdown inward, including while it is hidden. */
@media (min-width: 768px) {
  #header .main-menu li:last-child > .sub-menu {
    left: auto; right: 0; transform: none;
  }
}
.sthv2-banner-right { min-width: 0; max-width: 100%; }
.banner-meta-item { max-width: 100%; box-sizing: border-box; }
.banner-meta-item span { min-width: 0; overflow-wrap: anywhere; }
.banner-meta-item svg { flex-shrink: 0; }
.sth-investors-item { min-width: 0; }
.sth-investors-img { max-width: 100%; }
.sth-investors-item .sth-investors-img img { max-width: 100%; }
.box-right-news .box-events .item { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1200px) {
  .wrap-investors-list { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  /* Keep the announcement and navigation in flow as their text wraps. */
  body > #header { position: relative; }
  body > #header + main { margin-top: 0; }
  body > #header + main > :first-child { margin-top: 0; }
  body > #header + #primary { padding: 32px 20px 48px; }
  .section-cta-v2.ver-solutions .wrap-cta-v2 { padding: 32px 20px; }
  .cta-solutions-meta { min-width: 0; overflow-wrap: anywhere; }
  .latestnews-box-mobile.ver-scroll { max-width: 100%; }
  .sth2-title-so-box { overflow-wrap: anywhere; }
  .btn-style-v2 { max-width: 100%; white-space: normal; text-align: center; }
  #mq-title-app { display: none; }
}

/* Responsive baseline: keep shared content inside the viewport at every breakpoint. */
html,
body { max-width: 100%; overflow-x: hidden; }
img,
svg,
video,
iframe { max-width: 100%; }
input,
select,
textarea,
button { max-width: 100%; }

.container,
.container-v2,
.container-hm,
.container-res { box-sizing: border-box; width: 100%; }

/* The demo form used a single-line flex row for the privacy notice and submit
   button. On narrow screens that made the button sit underneath the notice. */
.content-form-v2,
.box-sc-form,
.box-sc-form .wpforms-container,
.box-sc-form .wpforms-form { min-width: 0; }
.content-form-v2 { align-items: stretch; }
.box-img-form { flex: 0 1 34.2%; min-width: 0; }
.box-sc-form { flex: 1 1 0; width: auto; }
.box-sc-form .hl-form-book .wpforms-submit-container {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}
.box-sc-form .hl-form-book .mantis-form-notice {
  flex: 1 1 100%;
  min-width: 0;
}
.box-sc-form .hl-form-book .wpforms-submit { margin-left: auto; }

/* Chip buttons belong below the message field, not at an absolute position
   that can overlap the privacy notice or action on mobile. */
.box-sc-form .hl-form-book .box-chip-list {
  position: static;
  width: 100%;
  margin-top: -4px;
}
.box-sc-form .hl-form-book .box-chip-list .chip-list {
  padding: 0;
  min-width: 0;
}
.box-sc-form .hl-form-book .box-chip-list .chip {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

/* Prevent fixed desktop layouts from creating sideways scrolling on small
   screens while preserving intentional horizontal table scrolling. */
.sth-robot-information { width: min(450px, 100%); max-width: 100%; }
.wpforms-container .wpforms-form .wpforms-field,
.wpforms-container .wpforms-form .wpforms-field-layout,
.wpforms-container .wpforms-form .wpforms-layout-row,
.wpforms-container .wpforms-form .wpforms-layout-column { min-width: 0; }
.wpforms-container .wpforms-form input,
.wpforms-container .wpforms-form select,
.wpforms-container .wpforms-form textarea { width: 100%; max-width: 100%; }

@media (max-width: 900px) {
  .content-form-v2 { gap: 0; }
  .box-img-form,
  .box-sc-form { width: 100%; flex-basis: 100%; }
  .box-sc-form { padding-left: clamp(16px, 4vw, 24px); padding-right: clamp(16px, 4vw, 24px); }
}

@media (max-width: 600px) {
  .container,
  .container-v2 { padding-left: 16px; padding-right: 16px; }
  .content-book-fisrt .title-v2 { font-size: clamp(32px, 10vw, 40px); overflow-wrap: anywhere; }
  .content-book-fisrt p { font-size: 18px; }
  .box-sc-form .hl-form-book textarea { height: auto !important; min-height: 180px; }
  .box-sc-form .hl-form-book .wpforms-submit-container { gap: 12px; }
  .box-sc-form .hl-form-book .wpforms-submit { width: 100%; margin-left: 0; }
  .box-chip-list .chip-list { gap: 8px; }
  .box-chip-list .chip { flex: 1 1 auto; }
  .mantis-form-notice .mantis-newsletter-choice { align-items: flex-start; }
}

@media (min-width: 601px) {
  .box-sc-form .hl-form-book .wpforms-submit-container .mantis-form-notice {
    flex: 1 1 auto;
    width: auto !important;
    flex-basis: auto !important;
    margin-right: 16px !important;
  }
}

.mobile-table-hint { display: none; }

@media (max-width: 767px) {
  /* Equal gutters also apply between the old 600px and 768px breakpoints. */
  .container,
  .container-v2,
  .container-hm,
  .container-res { padding-inline: 16px; }

  /* Resource filters should fit without a hidden horizontal scrolling row. */
  .content-dowload-v3 .container { padding-inline: 16px; }
  .box-filter-download { align-items: stretch; gap: 20px; }
  .box-filter-download .scroll-mb { width: 100%; overflow: visible; }
  .box-filter-download .filter-file-wrapper {
    width: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 16px;
  }
  .filter-for-attribute {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 8px;
  }
  .filter-file-wrapper button {
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
  .filter-for-attribute .filter-file { width: 100%; padding: 10px 16px; }
  .filter-category-file { flex-wrap: wrap; justify-content: center; }
  .box-filter-download .box-btn-form { display: flex; justify-content: center; width: 100%; }
  .box-filter-download .box-btn-form .form-dowload {
    justify-content: center;
    height: auto;
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
  }
  .form-dowload svg { flex-shrink: 0; }

  /* Show one complete preview, with pagination, rather than a cropped cover. */
  .content-dowload-v3 .list-file { min-width: 0; width: 100%; }
  .content-dowload-v3 .slick-track .item-file,
  .content-dowload-v3 .slick-track .item-file:last-child { margin-inline: 0; }
  .content-dowload-v3 .list-file .item-file { gap: 20px; }
  .item-file .img-file {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 3 / 4;
    background: #f1f5f9;
    border-radius: 16px;
  }
  .item-file .img-file img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }
  .item-file .box-content-file { gap: 16px; }
  .item-file .box-content-file .btn-file { position: static; }
  .item-file .btn-file a { min-height: 44px; justify-content: center; }
  .content-dowload-v3 .slick-dots {
    position: static;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
  }
  .content-dowload-v3 .text-last-box p { width: 100%; }
  .download-popup-content { width: calc(100% - 32px); padding: 56px 20px 24px; }
  #resource-download-form input { font-size: 16px; }

  /* Constrain scrollable components themselves; their contents can still scroll. */
  .wrap-compare-table,
  .sth2-tab-row,
  .reclaim-gallery-v2,
  .sth2-industries-list,
  .mobile-todo-layout,
  .sth2-airobotics-infor { width: 100%; max-width: 100%; min-width: 0; }
  .sth2-industries-list,
  .mobile-todo-layout { padding-right: 0; }
  .mobile-table-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #e8f3ff;
    color: #003399;
    font: 600 14px/1.5 Nunito, sans-serif;
  }
  .mobile-table-hint span { font-size: 22px; flex-shrink: 0; }
  .wrap-compare-table,
  .sth2-tab-row {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #64748b #e2e8f0;
    padding-bottom: 12px;
  }
  .wrap-compare-table:focus-visible,
  .sth2-tab-row:focus-visible { outline: 2px solid #003399; outline-offset: 3px; }
  .sth2-head-tab { gap: 12px; margin-bottom: 20px; }
  .sth2-head-tab .sth2-title-tab { flex: 1; min-width: 0; text-align: center; font-size: 16px; line-height: 1.4; }
  .sth2-production-roi { width: 732px; }
  .sth2-roi-head,
  .sth2-row-body { display: grid; grid-template-columns: 120px 600px; gap: 12px; }
  .sth2-headleft-roi {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 120px;
    background: #fff;
    box-shadow: 8px 0 8px -8px #94a3b8;
  }
  .sth2-row-body .sth2-headleft-roi { padding-right: 8px; }
  .sth2-wrap-meta-roi { display: grid; grid-template-columns: repeat(4, 144px); gap: 8px; width: 600px; }
  .sth2-head-item,
  .sth2-body-item { width: auto; min-width: 0; padding-inline: 12px; }
  .sth2-head-item { padding-top: 12px; border-radius: 16px 16px 0 0; }
  .sth2-head-item h4 { min-height: 64px; padding: 8px 0; font-size: 18px; line-height: 1.4; }
  .sth2-body-item span,
  .sth2-row-body .sth2-headleft-roi span {
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 72px;
    padding: 16px 0;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
  .sth2-row-body:last-child .sth2-body-item { padding-bottom: 12px; border-radius: 0 0 16px 16px; }
  .depreciation-roi-v2 { width: calc(100vw - 32px); max-width: 100%; margin-top: 20px; }

  /* Restore access to all Careers photos and readable text on the dark footer. */
  .careers-v11 .v11-life .v11-gallery { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 16px; }
  .careers-v11 .v11-gallery figure:nth-child(n) { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .careers-v11 .v11-hero { padding-top: 48px; }
  .careers-v11 .v11-life { padding-block: 64px; }
  .careers-v11 .v11-role > div { min-width: 0; }
  .careers-v11 .v11-role .v11-apply { flex-shrink: 0; min-height: 44px; }

  /* Keep the legacy Solutions heading within the same gutters as its content. */
  .solu-head-box { max-width: 100%; margin-inline: 0; }

  /* Avoid Safari's focus zoom and give form notices their own full-width row. */
  body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
  body select,
  body textarea { font-size: 16px !important; }
  .wrap-fr2-submit { flex-direction: column; gap: 12px; }
  .wrap-fr2-submit > p,
  .wrap-fr2-submit input[type="submit"] { width: 100%; }
  body.page-id-360 .box-form-careers-submit form .btn-submit { flex-direction: column; gap: 12px; align-items: stretch; }
  body.page-id-360 .box-form-careers-submit form .btn-submit > p,
  body.page-id-360 .box-form-careers-submit form .btn-submit input[type="submit"] { width: 100%; }
  .page-template-template-about .box-ab-items .item-text p,
  .page-template-template-about .box-ab-intro p { font-size: 16px; line-height: 1.65; }

  /* These headings already contain a Unicode line separator before the br. */
  .page-id-1185 .title-banner-v2 br,
  .title-boost-section br,
  .title-three h2 br { display: none; }

  body.page-id-360 #header button.sth-menu-mb {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  body.page-id-360 #header .sth-menu-mb span { position: static; flex: 0 0 2px; background: #020618; width: 24px; height: 2px; margin: 0; }
  body.page-id-360 #header .main-menu {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    width: auto;
    margin: 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px #0206181a;
    z-index: 20;
  }
  body.page-id-360 #header nav.main-menu .menu-main > ul { flex-direction: column; align-items: stretch; gap: 4px; }
  body.page-id-360 #header nav.main-menu .menu-main > ul > li > a { display: flex; min-height: 44px; padding: 12px; }
  body.page-id-360 #header nav.main-menu ul li.application-demo-link { display: block; }
  body.page-id-360 #header .sth-menu-mb.active > span:first-child { transform: translateY(7px) rotate(45deg); }
  body.page-id-360 #header .sth-menu-mb.active > span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .main-footer .ft-box-social { position: static; display: flex; gap: 16px; margin-top: 20px; }
  body #mq-widget { width: calc(100% - 32px); max-width: 400px; right: 16px; max-height: calc(100dvh - 112px); }

  /* Article pages use a different header class from the main site. */
  body > .archive-603-header { position: relative; top: auto; }
  .archive-603-tabs { flex-wrap: wrap; overflow: visible; }
  .archive-603-tabs a { min-height: 44px; display: inline-flex; align-items: center; }
  .document-single p,
  .document-single li,
  .document-single a { font-size: 16px; line-height: 1.65; }
  .sth-specifications-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .sth-specifications-box .item-content-tn { width: auto; min-width: 0; max-width: none; padding-inline: 0; }
  .sth-specifications-box .metric-text { overflow-wrap: normal; line-height: 1.15; }
  .box-right-rc-mb { padding: 32px 16px; }
  .box-right-rc-mb .box-recent { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .box-right-rc-mb .box-recent .recent img { height: auto; aspect-ratio: 16 / 10; object-fit: contain; }
  .box-right-rc-mb .recent .box-text-rc { padding: 16px; }
  .box-right-rc-mb .recent .box-text-rc .title { font-size: 20px; line-height: 1.4; }

  /* Archive cards need enough width for complete, readable headlines. */
  .box-left-news .news-posts-left { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .box-left-news .news-posts-left .post:first-child { grid-column: auto; }
  .box-left-news .news-posts-left .text-post,
  .box-left-news .news-posts-left .post:first-child .text-post { padding: 16px; }
  .box-left-news .news-posts-left .text-post .title { font-size: 20px; line-height: 1.4; }
  .box-left-news .news-posts-left .text-post .date { font-size: 14px; line-height: 1.5; }

  /* Keep the final legal text clear of the two fixed corner controls. */
  .main-footer:not(.main-footer-v2) .footer-bottom { padding-bottom: 72px; }
  .main-footer:not(.main-footer-v2) .footer-bottom .ft-copyright p { font-size: 14px; line-height: 1.5; }
  .nav-footer-v2 ul { list-style: none; padding-left: 0; }

  #mantis-privacy-datarequest-form > div { margin-top: 16px; }
  #mantis-privacy-datarequest-form > div > label { display: block; margin-bottom: 6px; }
  #mantis-privacy-datarequest-form input[type="text"],
  #mantis-privacy-datarequest-form input[type="email"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cad5e2;
    border-radius: 8px;
    background: #fff;
  }
  #mantis-privacy-datarequest-form .mantis-privacy_datarequest > label { display: flex; align-items: flex-start; gap: 10px; }
  #mantis-privacy-datarequest-form input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 4px; }
  #mantis-privacy-datarequest-submit { width: 100%; min-height: 44px; margin-top: 20px; padding: 10px 16px; border-radius: 8px; font-size: 16px; }

  /* The legacy product page also has comparison tables: preserve readable cells
     inside a local scroller, rather than shrinking every column to fit. */
  .single-product .sth-modal-infor { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .single-product .sth-modal-infor .sth-robot-information { width: 480px; max-width: none; margin: 0; }
  .single-product .sth-modal-infor .sth-wrap-head,
  .single-product .sth-modal-infor .sth-row-body { display: grid; grid-template-columns: 120px repeat(3, 112px); gap: 8px; }
  .single-product .sth-roi-packet .sth-robot-information { width: 600px; }
  .single-product .sth-roi-packet .sth-wrap-head,
  .single-product .sth-roi-packet .sth-row-body { display: grid; grid-template-columns: 120px repeat(4, 112px); gap: 8px; }
  .single-product .sth-modal-infor .sth-head-item,
  .single-product .sth-modal-infor .sth-head-item:first-child,
  .single-product .sth-modal-infor .sth-body-item,
  .single-product .sth-modal-infor .sth-body-item:first-child { width: 100%; min-width: 0; padding-inline: 8px; }
  .single-product .sth-modal-infor .sth-head-item { padding: 0; }
  .single-product .sth-modal-infor .sth-head-item span { font-size: 16px; line-height: 1.3; min-height: 64px; }
  .single-product .sth-modal-infor .sth-body-item span { font-size: 14px; line-height: 1.45; min-height: 76px; padding-block: 12px; }
  .single-product .sth-modal-infor:focus-visible { outline: 2px solid #56abff; outline-offset: 4px; }

  /* Policy tables need readable columns rather than one-word vertical strips. */
  #primary .entry-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  #primary .entry-content table th,
  #primary .entry-content table td { min-width: 144px; white-space: normal; padding: 12px; line-height: 1.5; }
  #primary .entry-content table::before {
    content: "Swipe left or right to view the table ↔";
    display: block;
    position: sticky;
    left: 0;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #e8f3ff;
    color: #003399;
    font: 600 14px/1.5 Nunito, sans-serif;
  }
}

@media (min-width: 764px) and (max-width: 767px) {
  #roi-scroll-hint { display: none; }
}

/* Article headers previously hid every navigation link on mobile. Keep the
   existing links accessible in a compact second row, without a JS dependency. */
@media (max-width: 900px) {
  body > .archive-603-header { position: relative; top: auto; height: auto; min-height: 72px; }
  body .archive-603-header .archive-603-container { height: auto; flex-wrap: wrap; gap: 12px; padding: 16px; }
  body .archive-603-header .archive-603-nav {
    position: static;
    transform: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 3;
    width: 100%;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
  }
  body .archive-603-header .archive-603-nav a { justify-content: center; min-height: 44px; padding: 10px 8px; font-size: 16px; white-space: normal; }
}

@media (min-width: 480px) and (max-width: 900px) {
  body .archive-603-header .archive-603-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .nav-modal-popup .wrap-mega-menu,
  .nav-modal-popup .wrap-mega-child.active { max-height: 100dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
  body select,
  body textarea { font-size: 16px !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .careers-v11 .v11-life .v11-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 16px; }
  .careers-v11 .v11-life .v11-gallery figure:nth-child(n) { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}
