/* Last-loaded responsive corrections for the shared homepage and footer. */
.jw-logo-tablet-marquee { display: none; }
@media (max-width: 1279px) {
  .cm-site-header > .cm-brand { flex: 0 0 45px !important; margin-right: auto !important; }
  .cm-site-header > .cm-language-dropdown { right: 92px !important; }
  .cm-mobile-menu-toggle { flex: 0 0 48px !important; margin-left: 0 !important; }

  .jw-hero { align-items: center !important; display: flex !important; min-height: max(640px, 100svh) !important; padding: 120px 32px 72px !important; }
  .jw-hero-copy { left: auto !important; margin: 0 !important; max-width: min(680px, 100%) !important; position: relative !important; top: auto !important; width: 100% !important; }
  .jw-hero-lead { font-family: var(--font-family-mixed) !important; font-size: 18px !important; line-height: 28px !important; margin-bottom: 48px !important; max-width: 512px !important; text-shadow: 0 2px 1px rgba(0, 0, 0, 0.06), 0 4px 1.5px rgba(0, 0, 0, 0.07) !important; white-space: normal !important; width: 100% !important; word-break: keep-all !important; }

  .jw-home .jw-button,
  .jw-home .jw-button-primary,
  .jw-home .jw-button-ghost,
  .jw-home .jw-button-inverse { border-radius: 4px !important; font-family: var(--font-family-mixed) !important; font-size: 16px !important; font-weight: 300 !important; letter-spacing: 1.3px !important; line-height: 28px !important; }
  .jw-home .jw-button-primary,
  .jw-home .jw-button-ghost { align-items: center !important; display: inline-flex !important; height: 52px !important; justify-content: center !important; min-width: 188px !important; padding: 12px 32px !important; }

  .jw-logo-marquee,
  .jw-metric-grid { margin-inline: calc(50% - 50vw) !important; max-width: none !important; width: 100vw !important; }
  .jw-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

  .jw-home > .jw-section:not(.jw-hero) { text-align: center !important; }
  .jw-home > .jw-section:not(.jw-hero) .jw-section-heading,
  .jw-home > .jw-section:not(.jw-hero) .jw-solutions-heading,
  .jw-home > .jw-section:not(.jw-hero) .jw-service-copy,
  .jw-home > .jw-section:not(.jw-hero) .jw-final-inner { align-items: center !important; margin-inline: auto !important; text-align: center !important; }
  .jw-pillar-grid,
  .jw-solutions-shell,
  .jw-service { margin-inline: auto !important; }
  .jw-pillar-body,
  .jw-solution-links { text-align: center !important; }

  .cm-footer { padding-left: 32px !important; padding-right: 32px !important; }
}

@media (max-width: 767px) {
  body:not(.admin-bar) .cm-site-header { top: 0 !important; }

  .cm-site-header {
    align-items: center !important;
    padding-inline: 20px !important;
  }

  .cm-site-header > .cm-brand {
    left: 20px !important;
    margin: 0 !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .cm-site-header > .cm-language-dropdown {
    display: inline-flex !important;
    left: auto !important;
    position: absolute !important;
    right: 80px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .cm-site-header > .cm-mobile-menu-toggle {
    flex-basis: 44px !important;
    left: auto !important;
    margin: 0 !important;
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
  }

  body.is-header-over-hero.home .cm-mobile-menu-toggle span,
  body.is-header-over-hero.front-page .cm-mobile-menu-toggle span,
  body.is-header-over-hero.cm-body-route-home .cm-mobile-menu-toggle span {
    background: var(--color-bg-base) !important;
  }

  .jw-hero { justify-content: center !important; min-height: 100svh !important; padding: 112px 20px 56px !important; }
  .jw-hero-copy,
  .jw-hero-lead { align-items: center !important; margin-inline: auto !important; max-width: 100% !important; text-align: center !important; }
  .jw-hero-lead { font-size: 16px !important; line-height: 28px !important; margin-bottom: 40px !important; }
  .jw-home > .jw-section:not(.jw-hero) { padding-block: 96px !important; }
  .jw-home .jw-button-primary,
  .jw-home .jw-button-ghost { max-width: 320px !important; min-width: 188px !important; width: 100% !important; }
  .jw-final .jw-button-inverse { font-size: 18px !important; height: 56px !important; padding: 12px 48px !important; }
  .jw-metric-grid { grid-template-columns: 1fr !important; }

  .jw-metric-grid > .jw-metric {
    align-content: center !important;
    align-items: baseline !important;
    display: grid !important;
    grid-template-columns: max-content max-content !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .jw-metric-grid > .jw-metric strong { grid-column: 1 !important; grid-row: 1 !important; }
  .jw-metric-grid > .jw-metric em { align-self: end !important; grid-column: 2 !important; grid-row: 1 !important; margin-left: 4px !important; }
  .jw-metric-grid > .jw-metric span { grid-column: 1 / -1 !important; grid-row: 2 !important; }

  .jw-pillars { background: #fff !important; }

  .jw-pillars .jw-pillar-card a {
    align-items: center !important;
    justify-items: center !important;
    text-align: center !important;
  }

  .jw-pillars .jw-pillar-media {
    margin-inline: auto !important;
  }

  .jw-pillars .jw-pillar-body {
    align-items: center !important;
    justify-items: center !important;
    text-align: center !important;
  }

  .jw-pillars .jw-pillar-body h3,
  .jw-pillars .jw-pillar-body p,
  .jw-pillars .jw-pillar-body strong {
    margin-inline: auto !important;
    text-align: center !important;
  }

  .cm-final-cta--expert > a {
    max-width: 320px !important;
    width: min(320px, 100%) !important;
  }

  .cm-footer { padding-left: 20px !important; padding-right: 20px !important; }
}

/* 920px tablet guard: this must win over the legacy min-width: 769px header. */
@media (min-width: 768px) and (max-width: 1279px) {
  .jw-trust,
  .jw-metrics {
    padding-bottom: 96px !important;
    padding-top: 96px !important;
  }

  .cm-site-header {
    align-items: center !important;
    box-sizing: border-box !important;
    display: flex !important;
    max-width: none !important;
    padding-inline: 32px !important;
    width: 100vw !important;
  }

  .cm-site-header > .cm-brand {
    left: 32px !important;
    margin-right: auto !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .cm-site-header > .cm-primary-nav,
  .cm-site-header > .cm-header-cta {
    display: none !important;
  }

  .cm-site-header > .cm-language-dropdown {
    display: inline-flex !important;
    left: auto !important;
    position: absolute !important;
    right: 112px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .cm-site-header > .cm-mobile-menu-toggle {
    display: inline-flex !important;
    left: auto !important;
    margin: 0 !important;
    position: absolute !important;
    right: 32px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 48px !important;
  }

  body.is-header-over-hero.home .cm-mobile-menu-toggle span,
  body.is-header-over-hero.front-page .cm-mobile-menu-toggle span,
  body.is-header-over-hero.cm-body-route-home .cm-mobile-menu-toggle span {
    background: var(--color-bg-base) !important;
  }

  .jw-trust .jw-logo-marquee,
  .jw-metric-grid {
    left: auto !important;
    margin-inline: calc(50% - 50vw) !important;
    max-width: none !important;
    overflow: visible !important;
    position: relative !important;
    transform: none !important;
    width: 100vw !important;
  }

  .jw-trust .jw-logo-marquee { display: none !important; }

  .jw-trust .jw-logo-tablet-marquee {
    display: block !important;
    margin-inline: calc(50% - 50vw) !important;
    overflow: hidden !important;
    width: 100vw !important;
  }

  .jw-trust .jw-logo-tablet-track {
    animation: jw-tablet-logo-scroll 24s linear infinite !important;
    display: grid !important;
    gap: 0 !important;
    grid-template-columns: repeat(12, minmax(0, 16.666666vw)) !important;
    width: 200vw !important;
  }

  .jw-trust .jw-logo-tablet-item {
    align-items: center !important;
    display: flex !important;
    height: 48px !important;
    justify-content: center !important;
    min-width: 0 !important;
    text-decoration: none !important;
  }

  .jw-trust .jw-logo-tablet-item img {
    display: block !important;
    height: auto !important;
    max-height: 40px !important;
    max-width: min(120px, 100%) !important;
    object-fit: contain !important;
    width: min(120px, 100%) !important;
  }

  .jw-home > .jw-section {
    box-sizing: border-box !important;
    left: auto !important;
    margin-inline: auto !important;
    padding-inline: 32px !important;
    position: relative !important;
    transform: none !important;
    width: 100% !important;
  }

  .jw-hero {
    justify-content: center !important;
    text-align: center !important;
  }

  .jw-hero-copy {
    align-items: center !important;
    margin-inline: auto !important;
    text-align: center !important;
  }

  .jw-trust .jw-logo-track {
    animation: none !important;
    display: grid !important;
    gap: 0 !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    transform: none !important;
    width: 100% !important;
  }

  .jw-trust .jw-logo-item {
    align-items: center !important;
    display: flex !important;
    justify-content: center !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .jw-trust .jw-logo-item:nth-child(n + 7) { display: none !important; }
  .jw-trust .jw-logo-item img { max-width: min(120px, 100%) !important; width: min(120px, 100%) !important; }

  .jw-metric-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .jw-metric-grid > .jw-metric {
    align-content: center !important;
    align-items: baseline !important;
    display: grid !important;
    grid-template-columns: max-content max-content !important;
    justify-content: center !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  .jw-metric-grid > .jw-metric strong {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .jw-metric-grid > .jw-metric em {
    align-self: end !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin-left: 4px !important;
  }

  .jw-metric-grid > .jw-metric span {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  .jw-pillars .jw-section-heading,
  .jw-pillars .jw-pillar-grid {
    left: auto !important;
    margin-inline: auto !important;
    position: relative !important;
    transform: none !important;
    width: 100% !important;
  }

  .jw-solutions-shell {
    margin-inline: auto !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Keep the industry list readable, then let the selected media use the full tablet stage. */
  .jw-solutions-shell {
    gap: 32px !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .jw-solutions-visual,
  .jw-solution-image-stage,
  .jw-solution-image-stage figure,
  .jw-solution-image-link,
  .jw-solution-video {
    justify-self: stretch !important;
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .jw-solutions-visual,
  .jw-solution-image-stage,
  .jw-solution-image-stage figure,
  .jw-solution-video {
    inline-size: 100% !important;
    max-inline-size: none !important;
  }

  .jw-solution-image-stage video,
  .jw-solution-video {
    display: block !important;
    height: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  .jw-solutions-visual {
    inline-size: calc(100% + 64px) !important;
    margin-inline: -32px !important;
    width: calc(100% + 64px) !important;
  }

  .jw-solutions-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .jw-solutions-list {
    border-right: 0 !important;
    order: 1 !important;
    overflow: visible !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .jw-solution-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    height: auto !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .jw-solutions .jw-solution-links a {
    background: var(--color-bg-base) !important;
    border: 1px solid var(--color-border-subtle) !important;
    border-radius: 999px !important;
    color: var(--color-text-secondary) !important;
    flex: 0 0 auto !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    height: 44px !important;
    line-height: 20px !important;
    padding: 11px 16px !important;
    width: auto !important;
  }

  .jw-solutions .jw-solution-links a span:last-child {
    display: none !important;
  }

  .jw-solutions .jw-solution-links a.is-active {
    background: var(--color-primary-900) !important;
    color: var(--color-bg-base) !important;
  }

  .jw-solutions-visual {
    aspect-ratio: 16 / 10 !important;
    border: 0 !important;
    order: 2 !important;
    padding: 0 !important;
  }

  .jw-hero-copy h1,
  .jw-hero-copy .jw-hero-lead {
    margin-inline: auto !important;
    text-align: center !important;
  }

  .jw-solutions .jw-solution-links {
    text-align: left !important;
  }

  .jw-solutions .jw-solution-links a {
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
  }

  .jw-solutions .jw-solution-links a span:last-child {
    margin-left: auto !important;
  }

  .jw-pillars {
    background: #fff !important;
  }

  .jw-pillars .jw-pillar-body {
    align-items: start !important;
    justify-items: start !important;
    text-align: left !important;
  }

  .jw-pillars .jw-pillar-body h3,
  .jw-pillars .jw-pillar-body p,
  .jw-pillars .jw-pillar-body strong {
    text-align: left !important;
  }

  .jw-home > .jw-section:not(.jw-hero),
  .jw-home > .jw-section:not(.jw-hero) > * { text-align: center !important; }

  .jw-pillars .jw-pillar-more { display: none !important; }
}

@keyframes jw-tablet-logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Keep filled navy and cyan CTA labels consistent on mobile. */
@media (max-width: 768px) {
  .jw-header-cta,
  .jw-button-primary,
  .jw-final .jw-button-inverse,
  .jw-product-header-cta,
  .jw-product-button-primary,
  .cm-header-cta,
  .cm-button-primary,
  .cm-sd-hero-cta,
  .cm-mobile-navigation-cta,
  .cm-system-button-primary,
  .cm-measurement-sidebar-cta,
  .cm-measurement-outline-button,
  .cm-measurement-lookup button,
  .cm-measurement-form button,
  .cm-measurement-thanks a,
  .cm-request-demo-form button,
  .cm-request-demo-modal-button,
  .cm-resource-single-cta a:not(.cm-resource-single-secondary),
  .cm-resource-download-panel button[type="submit"] {
    font-weight: 500 !important;
  }
}

/* Homepage filled CTA labels use the medium weight at every breakpoint. */
body.home .jw-button-primary,
body.home .cm-final-cta--expert > a,
body.home .cm-header-cta,
body.home .cm-mobile-navigation-cta {
  font-weight: 500 !important;
}

/* Keep the product navigation rail consistent across desktop product templates. */
@media (min-width: 1280px) {
  body.cm-body[class*="cm-body-route-products"] .cm-product-layout {
    grid-template-columns: 240px minmax(0, 1fr) !important;
  }

  body.cm-body[class*="cm-body-route-products"] .cm-product-layout .cm-product-sidebar {
    width: 240px !important;
  }
}

/* Use one intrinsic-ratio brand treatment across every shared header variant. */
.cm-site-header > .cm-brand {
  align-items: center !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  gap: 16px !important;
  height: 40px !important;
  max-width: none !important;
  overflow: visible !important;
  width: auto !important;
}

.cm-site-header > .cm-brand > .cm-brand-werth,
.cm-site-header > .cm-brand > .cm-brand-jimeas {
  display: block !important;
  flex: 0 0 auto !important;
  height: 40px !important;
  max-width: none !important;
  object-fit: contain !important;
  width: auto !important;
}

@media (max-width: 520px) {
  .cm-site-header > .cm-brand {
    gap: 12px !important;
  }
}
