/* MEDIPHARM Clinical Q&A v10.5.1 — Compact Touch-Tablet & Home Menu Hotfix
   Exact parent: v10.5 Featured Full Answer Equal Height Hotfix.
   Scope: responsive shell/layout protection for high-DPI compact touch tablets and
   visual treatment for the new "Về Trang chủ" menu entry. No corpus/import/REST changes. */

/* High-DPI compact tablets may expose a 1200–1366 CSS-px viewport even at ~8 inches.
   Re-apply the accepted tablet contract whenever the device is touch-first, so the
   min-width:1200 desktop releases cannot promote these devices to desktop geometry. */
@media (min-width:601px) and (max-width:1366px) and (pointer:coarse),
       (min-width:601px) and (max-width:1366px) and (hover:none){
  body.mcqa-canonical-page .syh-site-header,
  body.mcqa-canonical-page .yhlsm-site-header,
  body.mcqa-canonical-page .site-header,
  body.mcqa-canonical-page #masthead,
  body.mcqa-canonical-page header.syh-header,
  body.mcqa-canonical-page .tvm-legacy-header,
  body.mcqa-canonical-page .yhlsm-legacy-header,
  body.mcqa-canonical-page [data-syh-canonical-header]{display:none!important}

  body.mcqa-canonical-page #mcqa-app.mcqa-app:not(.is-standalone) .mcqa-v10-header{
    position:sticky!important;
    top:0!important;
    z-index:1150!important;
  }

  #mcqa-app.mcqa-app{
    --mcqa10-gutter:12px!important;
  }
  #mcqa-app.mcqa-app .mcqa-v10-header-inner{
    width:calc(100% - 24px)!important;
    max-width:none!important;
    grid-template-columns:minmax(150px,max-content) minmax(0,1fr) 46px!important;
    gap:10px!important;
  }
  #mcqa-app.mcqa-app #mcqa-home-view,
  #mcqa-app.mcqa-app #mcqa-taxonomy-view,
  #mcqa-app.mcqa-app > .mcqa-app-footer{
    width:calc(100% - 24px)!important;
    max-width:none!important;
    margin-inline:12px!important;
  }

  #mcqa-app.mcqa-app .mcqa-v10-hero{
    grid-template-columns:minmax(0,1fr) minmax(260px,.72fr)!important;
    gap:clamp(18px,3vw,38px)!important;
    min-height:0!important;
    padding:clamp(26px,3.3vw,38px)!important;
  }
  #mcqa-app.mcqa-app .mcqa-v10-hero h1{font-size:clamp(32px,4vw,46px)!important}
  #mcqa-app.mcqa-app .mcqa-v10-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  #mcqa-app.mcqa-app .mcqa-v10-primary-grid{
    grid-template-columns:minmax(0,1fr)!important;
    gap:16px!important;
  }
  #mcqa-app.mcqa-app .mcqa-v10-primary-grid > .mcqa-v10-panel,
  #mcqa-app.mcqa-app .mcqa-v10-featured-panel,
  #mcqa-app.mcqa-app .mcqa-v10-latest-panel{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:0!important;
    height:auto!important;
  }
  #mcqa-app.mcqa-app .mcqa-v10-latest-panel .mcqa-v10-latest-list{max-height:none!important}

  #mcqa-app.mcqa-app .mcqa-v10-specialty-layout,
  #mcqa-app.mcqa-app .mcqa-v10-specialty-list--more{
    grid-template-columns:minmax(0,1fr)!important;
  }
  #mcqa-app.mcqa-app .mcqa-v10-specialty-module,
  #mcqa-app.mcqa-app .mcqa-v10-specialty-module-scroll,
  #mcqa-app.mcqa-app .mcqa-v10-specialty-hero,
  #mcqa-app.mcqa-app .mcqa-v10-specialty-list--primary,
  #mcqa-app.mcqa-app .mcqa-v10-specialty-list--more{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }

  #mcqa-app.mcqa-app .mcqa-taxonomy-hero{
    flex-wrap:wrap!important;
  }
  #mcqa-app.mcqa-app .mcqa-taxonomy-home{
    margin-left:0!important;
  }

  #mcqa-app.mcqa-app .mcqa-app-menu{
    right:12px!important;
    width:min(280px,calc(100vw - 24px))!important;
  }
  #mcqa-app.mcqa-app .mcqa-app-menu > *{
    min-height:44px!important;
  }
}

/* Compact 8-inch portrait / narrow split-screen geometry. */
@media (min-width:601px) and (max-width:900px) and (pointer:coarse),
       (min-width:601px) and (max-width:900px) and (hover:none){
  #mcqa-app.mcqa-app{--mcqa10-gutter:8px!important}
  #mcqa-app.mcqa-app .mcqa-v10-header-inner,
  #mcqa-app.mcqa-app #mcqa-home-view,
  #mcqa-app.mcqa-app #mcqa-taxonomy-view,
  #mcqa-app.mcqa-app > .mcqa-app-footer{
    width:calc(100% - 16px)!important;
    margin-inline:8px!important;
  }
  #mcqa-app.mcqa-app .mcqa-v10-header-inner{
    grid-template-columns:48px minmax(0,1fr) 44px!important;
    gap:8px!important;
  }
  #mcqa-app.mcqa-app .mcqa-brand-copy{display:none!important}
  #mcqa-app.mcqa-app .mcqa-v10-hero{
    grid-template-columns:minmax(0,1fr)!important;
    padding:26px 22px!important;
  }
  #mcqa-app.mcqa-app .mcqa-v10-hero-art{display:none!important}
}

/* The website-home entry is intentionally visually consistent with the existing menu. */
#mcqa-app.mcqa-app .mcqa-app-menu .mcqa-menu-home{
  text-decoration:none!important;
}
#mcqa-app.mcqa-app .mcqa-app-menu .mcqa-menu-home span{
  font-size:20px!important;
  line-height:1!important;
}
