/* Phone and tablet refinements, kept separate from the supplied course content. */
.mcard h3{overflow-wrap:anywhere}
@media screen and (max-width:1024px){
  html{scroll-padding-top:76px}
  .main{padding-bottom:76px!important}
  .player,.progressData,.quizbox,.fgPanelBox{min-width:0}
  .fgMenuBtn{width:44px;height:44px;flex-basis:44px}
  .userIdentity{min-height:44px}
  #lessonnav{scrollbar-width:thin;overscroll-behavior-x:contain}
  #lessonnav button{min-height:44px;scroll-margin-inline:12px}
  .m1RatioImageOnly article{grid-template-columns:minmax(0,1fr)!important;gap:16px!important}
  .m1RatioImageOnly article .porousMatrixPhoto{grid-column:1!important;grid-row:auto!important;height:auto!important;max-height:340px!important}
  .m1RatioImageOnly article h3,.m1RatioImageOnly article p{grid-column:1!important}
  .cloudSyncBar{bottom:max(8px,env(safe-area-inset-bottom));max-width:calc(100% - 24px)}
  .cloudSyncBar button{min-height:36px;min-width:64px}
  body.fgNavOpen{overflow:hidden}
  body:has(.signinGate:not(.hidden)) .cloudSyncBar{display:none}
  .signinGate{padding:12px;overflow-y:auto;overscroll-behavior:contain}
  .signinCard{width:100%;max-width:620px;max-height:calc(100dvh - 24px);margin:auto}
  .signinCard input{font-size:16px!important;min-height:48px}
  .authLinks{gap:4px 16px}
  .authLinks button{min-height:44px;padding:8px}
  .fgUserMenu{max-width:calc(100vw - 24px)}
  .fgUserMenu button{min-height:44px}
  .fgRow{grid-template-columns:minmax(0,1fr) 120px 100px 140px!important}
  .fgRow>:nth-child(3),.fgRow>:nth-child(4){display:block!important}
}
@media screen and (max-width:640px){
  .fgTop{padding-inline:10px!important}
  .fgTopBrand .training-logo-header{width:156px;max-width:42vw}
  .fgTopBrand{gap:0!important}
  .fgMenuBtn{margin-right:8px}
  .signinCard{padding:24px 18px!important}
  .signinCard .training-logo-signin{max-width:100%;height:auto}
  .signinCard .signinTitle{font-size:22px!important;line-height:1.25}
  .signinGrid{gap:12px}
  .sectiontitle{align-items:flex-start;gap:8px;flex-wrap:wrap;margin-bottom:12px}
  .sectiontitle h2{margin-bottom:0}
  .sectiontitle small{font-size:12px}
  .modulecards{gap:12px!important}
  .mcard h3{font-size:14px!important;line-height:1.35!important;overflow-wrap:anywhere}
  .mcard small{font-size:12px!important}
  .progressleft{grid-template-columns:80px minmax(0,1fr)!important;gap:12px!important}
  .overallRing{width:76px;height:76px;flex-basis:76px}
  .stats{gap:16px;flex-wrap:wrap}
  .playerbar{height:auto!important;min-height:52px;gap:6px;padding:10px 14px;font-size:12px!important}
  .playerbar b{min-width:0;overflow-wrap:anywhere}
  #playerview .m1Three,#playerview .m1Two,#playerview .m1Process,#playerview .m1Ratio,#playerview .m1Curing,#playerview .layout{grid-template-columns:minmax(0,1fr)!important}
  #playerview .m1Timeline{grid-template-columns:minmax(0,1fr)!important;gap:20px}
  #playerview .m1Timeline::before{display:none}
  #playerview .m1Timeline article{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:14px;text-align:left}
  #playerview .m1Timeline i{grid-row:1 / span 2}
  #playerview .m1Timeline h3,#playerview .m1Timeline p{margin:0!important}
  #playerview .m1Timeline p{margin-top:6px!important}
  #playerview .m1Lesson,#playerview .m2Content{padding:20px 16px!important;min-width:0}
  #playerview .m1LandingCopy,#playerview .m2LandingCopy,#playerview .landingcopy,#playerview .ph-landing-copy{width:100%!important;max-width:100%!important;padding:28px 20px!important}
  #playerview .landing,#playerview .m1Landing,#playerview .m2Landing,#playerview .ph-landing{height:auto!important;min-height:460px!important;grid-template-columns:minmax(0,1fr)!important}
  #playerview .meta{gap:12px;flex-wrap:wrap}
  #playerview .navbuttons,#playerview .m1Buttons,#playerview .m2Buttons{gap:12px;flex-wrap:wrap}
  #playerview .navbuttons button,#playerview .m1Buttons button,#playerview .m2Buttons button{min-height:48px;flex:1 1 130px;padding:12px!important;font-size:15px!important;white-space:normal;line-height:1.3}
  #playerview .ans,#playerview .m1Answer,#playerview .m2Option{min-height:48px;padding:14px 12px!important;line-height:1.5!important;font-size:16px!important}
  #playerview .quizbox,#playerview .m1Quiz,#playerview .m2Quiz{width:100%;max-width:100%}
  #playerview table.fgStack td{min-width:0;overflow-wrap:anywhere}
  #playerview table.fgStack td::before{min-width:0;overflow-wrap:normal}
  .fgPanel{padding:18px 12px!important}
  .fgPanelBox{padding:18px 14px!important}
  .fgPanelBox h2{font-size:24px;line-height:1.25}
  .fgRow{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;padding:16px 0!important}
  .fgRow.head{display:none!important}
  .fgRow>:nth-child(3),.fgRow>:nth-child(4){display:block!important}
  .fgRow>:nth-child(3)::before{content:'Quiz score: ';font-weight:600}
  .fgRow>:nth-child(4):not(:has(button))::before{content:'Completed: ';font-weight:600}
  .fgRow button{width:100%;min-height:44px}
  .fgBtns{display:flex;flex-wrap:wrap;gap:12px}
  .fgBtns button{flex:1 1 180px;min-height:48px;white-space:normal}
  .complete,.m1Complete{padding:28px 18px!important;overflow-wrap:anywhere}
  .complete button,.m1Complete button{max-width:100%;min-height:48px;white-space:normal}
  #fgCongrats{padding:12px!important;overflow-y:auto}
  #fgCongrats .fgCgBox{max-height:calc(100dvh - 24px);overflow-y:auto;min-width:0}
  #fgCongrats .fgCgBtns{flex-wrap:wrap;gap:10px}
  #fgCongrats .fgCgBtns button{flex:1 1 150px;min-height:48px}
}
/* Diagrams can be enlarged without changing their proportions or artwork. */
#playerview img[data-enlarge]{cursor:zoom-in}
#playerview img[data-enlarge]:focus-visible{outline:3px solid #25396e;outline-offset:3px}
.trainingImageZoom{padding:0;border:0;border-radius:10px;width:min(1100px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);color:#172331;background:#fff}
.trainingImageZoom::backdrop{background:#07131de6}
.trainingImageZoom header{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #dbe3eb}
.trainingImageZoom header strong{font-size:15px;overflow-wrap:anywhere;min-width:0}
.trainingImageZoom button{min-height:44px;padding:10px 16px;border:1px solid #bdcbd7;background:#fff;border-radius:6px;color:#25396e;font-weight:700;cursor:pointer}
.trainingImageZoom .imageViewport{max-height:calc(100dvh - 160px);overflow:auto;padding:12px;text-align:center;overscroll-behavior:contain}
.trainingImageZoom img{display:block;max-width:100%;max-height:calc(100dvh - 190px);width:auto;height:auto;margin:auto;object-fit:contain}
.trainingImageZoom img.zoomed{width:auto;max-width:none;max-height:none}
.trainingImageZoom footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;font-size:13px}
.trainingImageZoomHint{font-size:12px;color:#53657a;margin:8px 0 12px}
@media screen and (max-width:360px){
  .modulecards{grid-template-columns:minmax(0,1fr)!important}
  .progressleft{grid-template-columns:minmax(0,1fr)!important}
  .fgTopBrand .training-logo-header{width:140px}
}
@media(prefers-reduced-motion:reduce){.side{transition:none!important}html{scroll-behavior:auto!important}}

/* Second mobile review: compact entry screen and a full-width lesson picker. */
.mobileLessonPicker{display:none}
@media screen and (max-width:1024px){
 #lessonnav{display:none!important}
 .mobileLessonPicker:not([hidden]){display:grid;gap:6px;margin:12px 0;color:#d5e0e8;font-size:12px;font-weight:600}
 .mobileLessonPicker select{box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:10px 36px 10px 12px;border:1px solid #bdcbd7;border-radius:8px;background:#fff;color:#172331;font:inherit;font-size:16px;text-overflow:ellipsis}
}
@media screen and (max-width:640px){
 .signinCard .training-logo-signin{width:240px!important;max-width:90%!important;margin-inline:auto}
 .signinCard .signinTitle{font-size:21px!important}
 .authLinks{display:flex;justify-content:center;flex-wrap:wrap;column-gap:12px}
}

/* Third review: prevent background scrolling while exploring diagrams. */
body.imageZoomOpen{overflow:hidden}
button,a,select,[role="button"]{touch-action:manipulation}
.trainingImageZoom .imageViewport{touch-action:pan-x pan-y pinch-zoom}
.trainingImageZoom header button,.trainingImageZoom footer button{flex-shrink:0}

/* Keep the sign-in heading on two intentional lines. */
#authTitle{white-space:pre-line}

/* Clear account next steps and touch-friendly recovery controls. */
.authNextSteps{padding:18px;border:1px solid #bdcbd7;border-left:4px solid #25396e;background:#f2f5f9;color:#172331;text-align:left;font-size:16px;line-height:1.6;text-transform:none;letter-spacing:normal;margin:18px 0;overflow-wrap:anywhere}
#authHint{overflow-wrap:anywhere}
.authLinks button{min-height:44px;padding:10px 12px;font-size:14px}
#resetPasswordLink{flex-basis:100%;font-weight:700}
#authTitle:focus{outline:none}
