/*
 * AIHubMarket Mobile QA
 * Loaded last. Mobile-only spacing, touch targets and deterministic UI icons.
 */

@media (max-width: 980px) {
  html{scroll-padding-top:72px}
  body.aihm-menu-open{overflow:hidden}

  .aihm-shell{width:calc(100% - 28px)}
  .aihm-site-header{min-height:64px}
  .aihm-header-inner{
    min-height:64px!important;
    gap:7px!important;
  }
  .aihm-brand__logo-wrap{width:136px!important;height:35px!important}
  .aihm-menu-toggle{
    width:42px!important;
    height:42px!important;
    flex:0 0 42px;
    margin-left:auto!important;
  }
  .aihm-menu-toggle span{left:10px;width:20px}
  .aihm-menu-toggle span:first-child{top:16px}
  .aihm-menu-toggle span:last-child{top:24px}
  .aihm-menu-toggle[aria-expanded="true"] span:first-child,
  .aihm-menu-toggle[aria-expanded="true"] span:last-child{top:20px}

  .aihm-tools{gap:5px!important;flex:0 0 auto}
  .aihm-icon-btn{width:38px;height:38px;flex-basis:38px}
  .aihm-theme-toggle{width:54px!important;min-width:54px!important;height:36px!important}
  .aihm-theme-toggle__track{width:54px!important;height:32px!important}
  .aihm-theme-toggle__thumb{width:24px!important;height:24px!important;left:4px!important;top:3px!important}
  body.dark-scheme .aihm-theme-toggle__thumb{transform:translateX(22px)!important}

  .aihm-theme-toggle__sun,
  .aihm-theme-toggle__moon{
    width:14px;
    height:14px;
    display:grid;
    place-items:center;
  }
  .aihm-theme-toggle__sun{left:8px!important}
  .aihm-theme-toggle__moon{right:8px!important}
  .aihm-theme-toggle__sun svg,
  .aihm-theme-toggle__moon svg,
  .aihm-search-close svg{
    display:block;
    width:100%;
    height:100%;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
  }

  .aihm-nav{
    position:absolute!important;
    top:64px!important;
    left:10px!important;
    right:10px!important;
    max-height:calc(100dvh - 76px);
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:10px!important;
    border-radius:15px!important;
  }
  .aihm-nav ul{gap:2px!important}
  .aihm-nav a{
    display:flex!important;
    align-items:center;
    min-height:44px;
    padding:9px 11px!important;
  }
  .aihm-nav-mobile-tools{margin-top:8px!important;padding-top:10px!important;gap:6px!important}
  .aihm-mobile-action{min-height:44px!important}

  .aihm-search-overlay{padding:74px 10px 10px!important}
  .aihm-search-panel{
    max-height:calc(100dvh - 86px);
    overflow-y:auto;
    padding:16px!important;
    border-radius:18px!important;
  }
  .aihm-search-panel__top{margin-bottom:14px!important}
  .aihm-search-close{width:38px;height:38px;font-size:0!important}
  .aihm-search-close svg{width:17px;height:17px}
  .aihm-search-form input{min-height:52px!important;font-size:16px!important;padding-inline:15px!important}
  .aihm-search-form button{min-height:50px!important}

  .aihm-page{padding:30px 0 60px!important}
  .aihm-page-title{margin-bottom:22px!important}
  .woocommerce .aihm-page,.woocommerce-page .aihm-page{padding-top:28px!important}

  .ah-products{padding-top:18px!important;padding-bottom:72px!important}
  .ah-hero{padding-top:22px!important;padding-bottom:58px!important}
  .ah-section-head{padding-top:58px!important;padding-bottom:28px!important}
  .ah-principles{padding-top:64px!important}
  .ah-more{padding-top:64px!important;padding-bottom:56px!important}

  .np{padding-top:20px!important;padding-bottom:76px!important}
  .np-hero{padding-top:20px!important;padding-bottom:58px!important}
  .np-section{padding-top:60px!important;padding-bottom:22px!important}
  .np-dark{margin-top:58px!important}
  .np-final{margin-top:62px!important}

  .aihm-market,
  .aihm-knowledge{padding:28px 0 76px!important}
  .aihm-market-hero,
  .aihm-knowledge-hero{padding:8px 0 30px!important;gap:18px!important}
  .aihm-market-results{padding-top:28px!important}

  .aihm-prompt-product{padding:28px 0 76px!important}
  .aihm-prompt-breadcrumb{margin-bottom:18px!important}
  .aihm-prompt-hero{gap:22px!important}
  .aihm-prompt-gallery{padding:6px!important;border-radius:20px!important}
  .aihm-prompt-summary{padding:0!important}
  .aihm-prompt-content{margin-top:48px!important}
  .aihm-prompt-related{margin-top:62px!important;padding-top:42px!important}

  .aihm-article{padding:30px 0 76px!important}
  .aihm-article-back{margin-bottom:18px!important}
  .aihm-article-header h1{margin-top:18px!important}
  .aihm-article-header>p{margin-top:18px!important}
  .aihm-article-cover{margin-top:34px!important}
  .aihm-article-layout{margin-top:42px!important}
  .aihm-related-articles{margin-top:60px!important;padding-top:42px!important}
  .aihm-article-cta{margin-top:60px!important}

  .aihm-wp-products{padding:66px 0!important}
  .aihm-wp-products__head{margin-bottom:30px!important;gap:18px!important}

  .aihm-footer-hero{padding-top:58px!important;padding-bottom:44px!important;gap:26px!important}
  .aihm-footer-main{padding-top:44px!important;padding-bottom:44px!important}
  .aihm-footer-wordmark{padding-top:0!important;padding-bottom:18px!important}
  .aihm-footer-bottom__inner{min-height:68px!important}

  body .posuv-site-hero{
    padding-top:26px!important;
    padding-bottom:42px!important;
  }
  body .posuv-docs{padding-top:28px!important}
  .posuv-site-section{padding-block:48px!important}
  .posuv-site-cta{padding-block:52px!important}

  .zladno-site-section{margin-top:48px!important}
}

@media (max-width: 720px) {
  .aihm-shell{width:calc(100% - 24px)!important}

  .aihm-market-hero h1,
  .aihm-knowledge-hero h1,
  .aihm-article-header h1{
    font-size:clamp(38px,11.8vw,58px)!important;
    line-height:.96!important;
  }
  .aihm-market-hero p,
  .aihm-knowledge-hero p,
  .aihm-article-header>p{font-size:16px!important;line-height:1.55!important}

  .aihm-market-stat,.aihm-knowledge-stat{display:none!important}
  .aihm-market-filter{padding:10px!important;border-radius:16px!important}
  .aihm-market-types{
    flex-wrap:nowrap!important;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .aihm-market-types::-webkit-scrollbar{display:none}
  .aihm-market-types a{flex:0 0 auto;min-height:38px!important}
  .aihm-market-categories{margin-top:12px!important}
  .aihm-market-categories>div{
    flex-wrap:nowrap!important;
    width:100%;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:none;
  }
  .aihm-market-categories>div::-webkit-scrollbar{display:none}
  .aihm-market-categories a{flex:0 0 auto}
  .aihm-market-active{margin-top:14px!important}

  .aihm-prompt-summary h1{font-size:clamp(36px,11vw,52px)!important}
  .aihm-prompt-lead{margin-top:16px!important}
  .aihm-prompt-facts{margin-top:20px!important}
  .aihm-prompt-actions{margin-top:18px!important}
  .aihm-prompt-actions a{min-height:44px!important}
  .aihm-prompt-content{font-size:16px!important;line-height:1.68!important}
  .aihm-prompt-content h2{margin:38px 0 15px!important}
  .aihm-prompt-content #prompt-block{margin-top:46px!important;padding-top:28px!important}

  .aihm-article-featured{margin-top:26px!important;padding:8px!important;border-radius:21px!important}
  .aihm-article-featured__media,
  .aihm-article-featured__media img{min-height:260px!important}
  .aihm-article-featured__copy{padding:20px 12px 18px!important}
  .aihm-article-featured h2{margin-top:18px!important}
  .aihm-article-featured__copy>p{margin-top:14px!important}
  .aihm-article-grid{margin-top:12px!important}
  .aihm-article-content{font-size:16px!important;line-height:1.7!important}
  .aihm-article-content h2{margin:40px 0 16px!important}
  .aihm-article-content h3{margin:30px 0 13px!important}
  .aihm-article-content .aihm-toc{margin:24px 0 34px!important;padding:17px!important}
  .aihm-article-aside{display:none}
  .aihm-article-layout{display:block!important}

  .aihm-wp-products__head h2{font-size:clamp(36px,10.8vw,54px)!important}
  .aihm-product-promo{padding:18px!important;border-radius:22px!important}
  .aihm-product-promo__copy{padding-top:20px!important}
  .aihm-product-promo__copy h3{font-size:clamp(29px,9vw,42px)!important}
  .aihm-product-promo__media{margin-top:20px!important;border-radius:16px!important}
  .aihm-product-promo__actions{margin-top:17px!important}

  .aihm-eco .eco-hero{
    min-height:0!important;
    padding:30px 0 50px!important;
  }
  .aihm-eco .eco-hero-top{margin-bottom:18px!important}
  .aihm-eco .eco-hero-bottom{margin-top:24px!important}
  .aihm-eco .eco-hero-visual{min-height:365px!important;margin-top:4px!important}
  .aihm-eco .eco-section{padding:50px 0!important}
  .aihm-eco .eco-direction{min-height:0!important}
  .aihm-eco .eco-featured-copy{padding:28px 18px!important}
  .aihm-eco .eco-stage{min-height:340px!important}
  .aihm-eco .eco-posuv-stage{min-height:340px!important}
  .aihm-eco .eco-zladno-stage{min-height:340px!important}
  .aihm-eco .eco-market-copy{min-height:0!important;padding:24px 20px!important}
  .aihm-eco .eco-build-card{min-height:0!important}
  .aihm-eco .eco-pro{padding:26px 20px!important}
  .aihm-eco .eco-final{padding:56px 0!important}
  .aihm-eco .eco-final-inner{gap:24px!important}

  .ah-products{padding-top:12px!important}
  .ah-hero{padding-top:12px!important;padding-bottom:46px!important}
  .ah-section-head{padding-top:46px!important}
  .ah-product-card__copy{padding:22px 14px!important}
  .ah-product-card__media,.ah-product-card__media img{min-height:260px!important}
  .ah-principles{padding-top:54px!important}
  .ah-more{padding-top:54px!important;padding-bottom:48px!important}
  .ah-final-cta{padding:28px 20px!important}

  .np{padding-top:12px!important}
  .np-hero{padding-top:14px!important;padding-bottom:46px!important}
  .np-section{padding-top:48px!important}
  .np-dark{margin-top:48px!important}
  .np-media-pair{min-height:350px!important}
  .np-final{margin-top:52px!important;padding:28px 20px!important}

  body .posuv-site-hero{
    padding:22px 16px 38px!important;
    gap:26px!important;
  }
  body .posuv-site-hero h1{font-size:clamp(34px,10vw,46px)!important}
  .posuv-site-section{padding:42px 16px!important}
  .posuv-site-cta{padding:46px 16px!important;gap:24px!important}
  .posuv-docs{padding:26px 16px 54px!important}
  .posuv-docs header{margin-bottom:36px!important}

  .zladno-site{padding:8px 10px 48px!important}
  .zladno-site-hero{padding:20px 16px!important;gap:22px!important}
  .zladno-site-logo{margin-bottom:14px!important}
  .zladno-site-section{margin-top:42px!important}
  .zladno-plan-grid article,
  .zladno-site-callout,
  .zladno-docs>header{padding:22px 18px!important}
  .zladno-demo-entry{padding:26px 18px!important}

  .aihm-site-footer{margin-top:0!important}
  .aihm-footer-hero{padding-top:50px!important;padding-bottom:38px!important}
  .aihm-footer-main{gap:30px 18px!important;padding-top:38px!important;padding-bottom:38px!important}
  .aihm-footer-brand p{margin-top:17px!important}
  .aihm-footer-badges{margin-top:18px!important}
  .aihm-footer-wordmark span{
    font-size:clamp(43px,14.8vw,92px)!important;
    letter-spacing:-.075em!important;
  }
}

@media (max-width: 480px) {
  .aihm-shell{width:calc(100% - 20px)!important}
  .aihm-header-inner{width:calc(100% - 16px)!important;gap:4px!important}
  .aihm-brand__logo-wrap{width:116px!important;height:30px!important}
  .aihm-menu-toggle{width:40px!important;height:40px!important;flex-basis:40px}
  .aihm-icon-btn{width:36px!important;height:36px!important;flex-basis:36px!important}
  .aihm-theme-toggle{width:48px!important;min-width:48px!important}
  .aihm-theme-toggle__track{width:48px!important;height:30px!important}
  .aihm-theme-toggle__thumb{width:22px!important;height:22px!important;top:3px!important}
  body.dark-scheme .aihm-theme-toggle__thumb{transform:translateX(18px)!important}
  .aihm-theme-toggle__sun{left:7px!important}
  .aihm-theme-toggle__moon{right:7px!important}

  .aihm-nav{left:8px!important;right:8px!important}
  .aihm-search-overlay{padding-inline:7px!important}
  .aihm-search-panel{padding:13px!important}

  .aihm-market,.aihm-knowledge{padding-top:20px!important}
  .aihm-market-hero,.aihm-knowledge-hero{padding-top:4px!important}
  .aihm-market-filter{margin-top:0!important}
  .aihm-market-search input,.aihm-market-search select{font-size:16px!important}

  .aihm-prompt-product{padding-top:20px!important}
  .aihm-prompt-breadcrumb{font-size:10px!important}
  .aihm-prompt-gallery{padding:4px!important}
  .aihm-prompt-related{margin-top:50px!important}

  .aihm-article{padding-top:22px!important}
  .aihm-article-cover{margin-top:28px!important}
  .aihm-article-cta{padding:25px 18px!important}

  .aihm-eco .eco-shell{width:calc(100% - 20px)!important}
  .aihm-eco .eco-hero{padding-top:24px!important}
  .aihm-eco .eco-hero-layout h1{font-size:clamp(39px,13vw,54px)!important}
  .aihm-eco .eco-hero-visual{min-height:330px!important}
  .aihm-eco .eco-section{padding:44px 0!important}
  .aihm-eco .eco-posuv-stage,
  .aihm-eco .eco-zladno-stage{min-height:315px!important}
  .aihm-eco .eco-final{padding:48px 0!important}

  .woocommerce ul.products li.product .button{min-height:40px!important}
  .aihm-market .woocommerce ul.products li.product .button.aihm-loop-button{font-size:10px!important}

  .aihm-footer-main{grid-template-columns:1fr!important}
  .aihm-footer-wordmark span{font-size:clamp(38px,14.4vw,68px)!important}
  .aihm-footer-bottom__inner{padding-bottom:calc(20px + env(safe-area-inset-bottom))!important}
}

/* Deterministic product-media icons: no platform font/emoji substitution. */
.aihm-product-media__stage-arrow,
.aihm-product-media__expand,
.aihm-product-media__lightbox-close,
.aihm-product-media__lightbox-arrow{
  font-size:0!important;
}
.aihm-product-media__stage-arrow::before,
.aihm-product-media__lightbox-arrow::before{
  content:"";
  display:block;
  width:9px;
  height:9px;
  border-top:2px solid currentColor;
  border-right:2px solid currentColor;
}
.aihm-product-media__stage-arrow--next::before,
.aihm-product-media__lightbox-arrow--next::before{transform:rotate(45deg) translate(-1px,1px)}
.aihm-product-media__stage-arrow--prev::before,
.aihm-product-media__lightbox-arrow--prev::before{transform:rotate(-135deg) translate(-1px,1px)}
.aihm-product-media__expand::before{
  content:"";
  display:block;
  width:10px;
  height:10px;
  border-top:2px solid currentColor;
  border-right:2px solid currentColor;
  transform:translate(-1px,1px);
}
.aihm-product-media__lightbox-close::before,
.aihm-product-media__lightbox-close::after{
  content:"";
  position:absolute;
  width:16px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  left:50%;
  top:50%;
}
.aihm-product-media__lightbox-close::before{transform:translate(-50%,-50%) rotate(45deg)}
.aihm-product-media__lightbox-close::after{transform:translate(-50%,-50%) rotate(-45deg)}
.aihm-product-media__video-play span,
.aihm-product-media__main-video-play span{font-size:0!important;padding-left:0!important}
.aihm-product-media__video-play span::before,
.aihm-product-media__main-video-play span::before{
  content:"";
  display:block;
  width:0;
  height:0;
  margin-left:3px;
  border-top:8px solid transparent;
  border-bottom:8px solid transparent;
  border-left:13px solid currentColor;
}

@media (max-width: 360px) {
  .aihm-market .woocommerce ul.products,
  .aihm-prompt-related .woocommerce ul.products{grid-template-columns:1fr!important}
  .aihm-brand__logo-wrap{width:108px!important}
}

/* Vector UI icons stay identical across iOS, Android and desktop. */
.aihm-theme-toggle__sun svg,
.aihm-theme-toggle__moon svg,
.aihm-search-close svg{
  display:block;
  width:14px;
  height:14px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.aihm-search-close svg{width:17px;height:17px}

@media(max-width:720px){
  .aihm-eco .eco-btns{margin-top:22px!important}
}


/* Purchase pages — mobile */
@media(max-width:920px){
  .aihm-software-buy{padding-top:28px!important}
  .aihm-software-buy__hero{grid-template-columns:1fr!important;min-height:0!important;gap:28px!important}
  .aihm-software-buy__visual{min-height:360px!important}
  .aihm-software-buy__visual img{min-height:360px!important}
  .aihm-license-section{padding-top:58px!important}
  .aihm-license-section__head{grid-template-columns:1fr!important;gap:18px!important}
  .aihm-license-grid{grid-template-columns:1fr!important}
  .aihm-software-details{margin-top:56px!important;padding-top:42px!important}
  .aihm-membership-product{padding-top:28px!important}
  .aihm-membership-product__grid{grid-template-columns:1fr!important;gap:24px!important}
}
@media(max-width:620px){
  .aihm-software-logo{width:210px!important;height:58px!important;margin-bottom:20px!important}
  .aihm-software-buy__copy h1{font-size:clamp(38px,11vw,54px)!important}
  .aihm-software-buy__copy>p{font-size:16px!important;margin-top:18px!important}
  .aihm-software-buy__actions{display:grid!important;grid-template-columns:1fr!important;margin-top:20px!important}
  .aihm-software-buy__actions a{width:100%!important}
  .aihm-software-buy__visual{min-height:290px!important;border-radius:21px!important}
  .aihm-software-buy__visual img{min-height:290px!important}
  .aihm-license-section{padding-top:48px!important}
  .aihm-license-section__head{margin-bottom:22px!important}
  .aihm-license-section__head h2{font-size:clamp(34px,10vw,48px)!important}
  .aihm-license-card{min-height:0!important;padding:22px!important}
  .aihm-license-card>p{min-height:0!important}
  .aihm-license-note{grid-template-columns:1fr!important;gap:6px!important}
  .aihm-software-details .posuv-product-copy>section,
  .aihm-software-details .zladno-product-copy>section{padding:22px!important}
  .aihm-membership-product h1{font-size:clamp(38px,11vw,54px)!important}
  .aihm-membership-product__panel{padding:24px!important}
  .aihm-membership-product__buy button{width:100%!important}
  .aihm-membership-product__content{margin-top:52px!important;padding-top:36px!important}
}
