/* Mobile layout overrides; desktop styling is preserved. */
@media(max-width:767px){
 html{-webkit-text-size-adjust:100%}
 body{overflow-wrap:break-word}
 main>div>section,main>div>div.px-gutter,footer>div{padding-left:16px;padding-right:16px}
 main>div>section{padding-top:32px;padding-bottom:32px}
 main .grid>*{min-width:0}
 main h1{font-size:clamp(29px,8vw,38px)!important;line-height:1.2!important}
 main>div>section h2{font-size:26px;line-height:1.3}
 main>div>section h3{font-size:21px;line-height:1.4}
 main .font-body-lg,main .font-body-md{font-size:15px;line-height:1.75}
 main .font-body-sm{font-size:13px;line-height:1.7}
 .site-header>div{height:68px;padding-left:12px;padding-right:12px}
 .site-header img[src="media/aigc-brand-icon.png"]{width:32px;height:32px;border-radius:8px}
 .site-header [data-path="home"] span:first-child{font-size:15px}
 .site-header [data-path="home"] span:last-child{display:none}
 .site-header>div>div:last-of-type{display:none}
 .site-header .menu-toggle{min-width:44px;min-height:44px;margin-left:auto;font-size:22px}
 .site-header .section-navigation.open{top:68px;max-height:calc(100dvh - 84px);padding:12px;gap:6px}
 .site-header .section-navigation a{min-height:44px;display:flex;align-items:center}
 #home>.grid{gap:28px}
 #home .grid.grid-cols-3{gap:8px}
 #home .grid.grid-cols-3>div{padding:12px 8px}
 #home .grid.grid-cols-3 .font-headline-md{font-size:20px}
 #home .grid.grid-cols-3 .font-label-code{font-size:10px}
 #home .grid.grid-cols-3 .font-body-sm{font-size:11px}
 #home a[href="#curriculum"],#home a[href="#works"]{width:100%;min-height:48px;display:flex;align-items:center;justify-content:center;padding:12px 16px}
 #home .font-label-code{overflow-wrap:anywhere}
 #tool-tabs,#role-tabs{display:flex;gap:8px;flex-wrap:nowrap;overflow-x:auto;padding:4px 0 12px;scrollbar-width:thin;scrollbar-color:#3b494b transparent}
 #tool-tabs button,#role-tabs button{flex-shrink:0;min-height:44px;padding:10px 14px;font-size:13px}
 #tool-panel{grid-template-columns:1fr}
 .v2-card{min-width:0;padding:16px}
 .v2-card h3{overflow-wrap:anywhere}
 .v2-tabs a,.v2-tabs button{min-height:44px;display:inline-flex;align-items:center}
 .curriculum-module summary{padding:16px;align-items:flex-start;gap:8px}
 .curriculum-module summary>div{align-items:flex-start;gap:10px;min-width:0}
 .curriculum-module summary>div>span{flex-shrink:0;font-size:10px;padding:6px}
 .curriculum-module summary h3{font-size:18px}
 .curriculum-module summary .material-symbols-outlined{flex-shrink:0}
 .v2-week-body{padding:0 16px 16px}
 .v2-week-body ul{columns:1;padding-left:20px}
 #employment .exact-metric{font-size:clamp(22px,6vw,28px)!important;line-height:1.35!important}
 #employment .grid-cols-2{gap:12px}
 #employment .grid-cols-2>div{padding:16px 12px}
 #employment .grid-cols-2 .font-label-code{font-size:11px}
 .teacher-profile-row{grid-template-columns:1fr;gap:20px;padding:16px}
 .teacher-profile-photo{width:min(100%,320px);margin-inline:auto}
 .teacher-profile-photo img{max-height:420px}
 .teacher-profile-row .teacher-credentials{grid-template-columns:1fr;padding:8px 12px}
 .teacher-profile-row .teacher-credentials>div{min-height:56px;padding:10px 0;border-right:0!important;border-bottom:1px solid #35343a!important}
 .teacher-profile-row .teacher-credentials>div:last-child{border-bottom:0!important}
 .teacher-profile-row .teacher-credentials i{flex-shrink:0}
 .teacher-profile-row .teacher-bio{font-size:14px;line-height:1.8}
 .legacy-ui .social-platform-grid{grid-template-columns:1fr}
 .legacy-ui .social-platform-card:last-child{grid-column:auto}
 .legacy-ui .student-fold summary{padding:12px;gap:12px}
 .legacy-ui .student-fold summary strong{font-size:17px}
 .legacy-ui .student-fold-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px}
 .legacy-ui .student-video-gallery{grid-template-columns:1fr;padding:12px}
 .legacy-ui .lightbox-panel,.legacy-ui .video-lightbox-panel{width:100%;max-height:calc(100dvh - 24px)}
 #learning-directions .p-space-xl{padding:20px}
 #learning-directions .consult-qr-image{width:min(220px,100%)}
 #faq summary{min-height:48px;font-size:16px;line-height:1.6;align-items:flex-start}
 #faq summary .material-symbols-outlined{flex-shrink:0}
 footer{padding-top:32px;padding-bottom:24px;margin-top:16px}
 .footer-content-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px}
 .footer-content-grid .footer-brand{grid-column:1/-1}
 footer .footer-brand>div:first-child span{font-size:18px}
 footer .footer-brand>div:last-child{flex-wrap:wrap}
 footer .footer-content-grid a{display:inline-block;padding:6px 0;line-height:1.6}
 footer .pt-space-lg>div:last-child{flex-wrap:wrap;justify-content:center;gap:12px}
 footer .text-xs{line-height:1.8}
 .legacy-ui .back-to-top{right:12px;bottom:calc(16px + env(safe-area-inset-bottom));width:44px;height:44px}
}
@media(min-width:768px) and (max-width:1023px){
 main>div>section{padding-left:24px;padding-right:24px}
 .teacher-profile-row{grid-template-columns:minmax(200px,30%) minmax(0,1fr);gap:20px}
 .teacher-profile-row .teacher-credentials{grid-template-columns:1fr}
 .teacher-profile-row .teacher-credentials>div{border-right:0!important;padding-left:0}
}
@media(max-width:359px){
 #home .grid.grid-cols-3{grid-template-columns:1fr}
 #employment .grid-cols-2{grid-template-columns:1fr}
 .footer-content-grid{grid-template-columns:1fr}
 .site-header .section-navigation.open{grid-template-columns:1fr}
}
