/* SEG_MOBILE_R10_FCGE_PARITY — mobile polish from validated FCGE patterns */
@media(max-width:760px){
  html{scroll-padding-top:76px!important;max-width:100%;overflow-x:hidden}
  body{max-width:100%;overflow-x:hidden}
  body:has(> .global-nav){padding-top:69px!important}
  body > .global-nav{
    position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;
    z-index:1200!important;background:rgba(255,255,255,.97)!important;border-bottom:1px solid #d8e3ef!important;
    box-shadow:0 2px 12px rgba(15,53,84,.12)!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)
  }
  body > .global-nav[data-mobile-open="true"]{max-height:100dvh!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  body > .global-nav .brand-logo{align-self:center!important}
  body > .global-nav .seg-mobile-toggle{border-radius:11px!important}
  body > .global-nav[data-mobile-open="true"] .seg-mobile-toggle{background:#102d52!important;border-color:#102d52!important;color:#fff!important}

  *,*::before,*::after{box-sizing:border-box}
  main,section,article,aside,form,nav,header,footer,div{min-width:0}
  img,video,iframe,svg,canvas{max-width:100%}
  h1,h2,h3,p,a,button,label,span,strong{overflow-wrap:anywhere}
  .public-main{width:100%!important;max-width:100%!important;padding-left:12px!important;padding-right:12px!important}
  .public-hero,.public-page-head,.community-hero,.home-hero{max-width:100%!important;overflow:hidden!important}
  .public-hero,.public-page-head{padding-left:18px!important;padding-right:18px!important}
  .public-hero h1,.public-page-head h1,.community-hero h1,.home-hero h1{max-width:100%!important;font-size:clamp(2rem,9vw,2.55rem)!important;line-height:1.06!important}
  .public-hero p,.public-page-head p,.community-hero p,.home-hero p{max-width:100%!important;line-height:1.5!important}
  .public-card,.home-section,.community-card,.resource-library-card,.p12-card,.ecue-card{min-width:0!important;max-width:100%!important}
  .public-grid,.home-dashboard-grid,.home-video-grid,.subscription-grid,.pricing-grid,.academic-results{grid-template-columns:minmax(0,1fr)!important}
  .hero-actions,.resource-card-actions,.student-form-actions{width:100%!important}
  .hero-actions>a,.hero-actions>button,.resource-card-actions>a,.resource-card-actions>button,.student-form-actions>button{min-height:46px!important}
  button,.cta-primary,.cta-secondary,input,select,textarea{font-size:16px!important}
  button,.cta-primary,.cta-secondary{min-height:44px}
  input,select,textarea{max-width:100%!important}
  table{display:block;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}

  .portal-breadcrumb{max-width:100%!important;margin-top:10px!important;padding:0 12px!important;overflow-x:auto!important;white-space:nowrap!important;scrollbar-width:none}
  .portal-breadcrumb::-webkit-scrollbar{display:none}
  .public-footer{padding:26px 14px!important;gap:10px!important}

  /* FCGE-like navigation rhythm */
  .global-nav[data-mobile-open="true"] .home-nav-links{padding:9px 0 4px!important;gap:8px!important}
  .global-nav[data-mobile-open="true"] .home-nav-links a{min-height:48px!important;border-radius:11px!important}
  .seg-mobile-auth a{min-height:40px!important}

  /* Home */
  .home-main>.home-section{margin-top:14px!important;margin-bottom:14px!important}
  .home-path-form{grid-template-columns:1fr!important;gap:10px!important}
  .home-path-form button{width:100%!important}
  .home-benefits-grid{grid-template-columns:1fr!important}
  .home-video-grid{gap:12px!important}
  .section-heading{align-items:flex-start!important;gap:10px!important}
  .section-heading>a{width:100%;text-align:center}

  /* Resources */
  .resource-library-controls{padding:16px!important}
  .resource-search-box input{min-height:48px!important}
  .resource-results-summary{display:grid!important;gap:4px!important}
  .resource-tier-grid{grid-template-columns:1fr!important;gap:12px!important}
  .resource-library-card{padding:15px!important}
  .resource-card-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .resource-card-actions a,.resource-card-actions button{width:100%!important;justify-content:center!important}
  .access-steps{grid-template-columns:1fr!important}

  /* Community */
  .community-hero{padding:28px 16px 20px!important}
  .community-layout{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;padding:12px!important}
  .community-tabs{position:sticky!important;top:69px!important;z-index:50!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;padding:8px 0!important;margin:0 0 10px!important;background:#f4f6f8!important}
  .community-tabs button{min-width:0!important;min-height:44px!important;padding:8px!important;font-size:.78rem!important;line-height:1.2!important}
  .community-filters,.student-tools,.student-context-grid{grid-template-columns:1fr!important;gap:8px!important}
  .community-filters input,.community-filters select,.student-tools input,.student-tools select{min-height:46px!important}
  .student-compose{padding:14px!important}
  .student-compose-head{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .student-new-post{width:100%!important}
  .student-form-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .community-aside{display:grid!important;gap:10px!important}
  .community-aside>section{padding:14px!important}

  /* Dashboard */
  .p12-top{position:sticky!important;top:0!important;z-index:1200!important;min-height:64px!important;padding:8px 12px!important;background:rgba(255,255,255,.98)!important;box-shadow:0 2px 12px rgba(15,53,84,.10)!important;backdrop-filter:blur(12px)}
  .p12-brand img{max-width:52px!important;height:auto!important}
  .p12-main{padding:12px!important}
  .p12-head h1{font-size:1.45rem!important;line-height:1.15!important}
  .p12-kpis{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .p12-kpis article{min-height:72px!important;padding:10px!important}
  .p12-grid{grid-template-columns:1fr!important;gap:10px!important}
  .p12-card{padding:14px!important;border-radius:15px!important}
  .p12-card>header{align-items:flex-start!important;gap:8px!important}
  .p12-homework-tabs,.p12-community-tabs{display:flex!important;max-width:100%!important;overflow-x:auto!important;gap:6px!important;scrollbar-width:none}
  .p12-homework-tabs::-webkit-scrollbar,.p12-community-tabs::-webkit-scrollbar{display:none}
  .p12-homework-tabs button,.p12-community-tabs button{flex:0 0 auto!important;min-height:42px!important;white-space:nowrap!important}
  .p12-quick{grid-template-columns:1fr 1fr!important;gap:7px!important}
  .p12-quick a{min-height:44px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important}

  /* Auth / account */
  .auth-demo,.signup-journey-main .public-card{padding:16px!important}
  .password-field{max-width:100%!important}
  .password-field input{min-width:0!important}
  .account-demo-nav{display:flex!important;max-width:100%!important;overflow-x:auto!important;gap:7px!important;padding-bottom:5px!important;white-space:nowrap!important;scrollbar-width:none}
  .account-demo-nav::-webkit-scrollbar{display:none}
  .account-demo-nav a{flex:0 0 auto!important;min-height:42px!important;display:inline-flex!important;align-items:center!important}

  /* ECUE and learning */
  .ecue-shell{padding-left:10px!important;padding-right:10px!important}
  .ecue-tabs{scroll-snap-type:x proximity}
  .ecue-tabs button{scroll-snap-align:start}
}

@media(max-width:390px){
  body:has(> .global-nav){padding-top:66px!important}
  .community-tabs{top:66px!important}
  .public-main{padding-left:10px!important;padding-right:10px!important}
  .public-card,.p12-card{padding:13px!important}
  .p12-kpis{grid-template-columns:1fr 1fr!important}
  .p12-quick{grid-template-columns:1fr!important}
  .seg-r2-bottom-nav a{font-size:.62rem!important}
}

@media(max-width:360px){
  .seg-mobile-auth a{font-size:.68rem!important;padding-left:5px!important;padding-right:5px!important}
  .public-hero h1,.public-page-head h1,.community-hero h1,.home-hero h1{font-size:1.95rem!important}
  .p12-kpis{grid-template-columns:1fr!important}
}

/* R10 QA corrections — touch targets + persistent student dashboard header */
@media(max-width:760px){
  .seg-mobile-auth a{min-height:44px!important}
  body:has(> .p12-top){padding-top:64px!important}
  body > .p12-top{position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;z-index:1200!important}
  .seg-r2-collapse-toggle{min-width:44px!important;min-height:44px!important;width:44px!important;height:44px!important}
  .p12-homework-tabs button,.p12-community-tabs button{min-height:44px!important}
}
@media(max-width:760px){body > .global-nav .seg-mobile-auth a{min-height:44px!important}}

/* R10 preview QA — dynamic Community actions meet 44px touch target */
@media(max-width:760px){
  .community-share,.community-more,.community-reply-button,.community-resolve-button{min-height:44px!important}
}

/* R11 — adaptive acquisition/student bottom navigation */
@media(max-width:760px){
  .seg-r2-bottom-nav a.seg-r2-bottom-primary{
    position:relative;z-index:2;min-height:62px!important;margin-top:-8px!important;
    background:#0b5fa8!important;color:#fff!important;border:1px solid #0b5fa8!important;
    border-radius:14px!important;box-shadow:0 5px 14px rgba(11,95,168,.24)!important;
    font-weight:900!important;line-height:1.05!important
  }
  .seg-r2-bottom-nav a.seg-r2-bottom-primary span:first-child{font-size:1.2rem!important}
  .seg-r2-bottom-nav a.seg-r2-bottom-primary[aria-current="page"]{background:#084d89!important;color:#fff!important}
}
@media(max-width:390px){
  .seg-r2-bottom-nav a.seg-r2-bottom-primary{font-size:.58rem!important;padding-left:1px!important;padding-right:1px!important}
}

/* R12 — visitor CTA softened while preserving central acquisition priority */
@media(max-width:760px){
  .seg-r2-bottom-nav[data-session-state="visitor"] a.seg-r2-bottom-primary{
    background:#edf6fd!important;
    color:#0b5fa8!important;
    border-color:#bdd9ee!important;
    box-shadow:0 3px 10px rgba(11,95,168,.12)!important;
  }
  .seg-r2-bottom-nav[data-session-state="visitor"] a.seg-r2-bottom-primary[aria-current="page"]{
    background:#deeffc!important;
    color:#084d89!important;
    border-color:#8bbde4!important;
  }
}
