/* ============================================================
   全端响应式适配 —— 最后加载，覆盖各页内联样式
   断点：1100 平板 / 1000 后台侧栏折叠 / 900 学员端侧栏折叠 / 640 手机
   ============================================================ */

img{max-width:100%}
html{-webkit-text-size-adjust:100%}

/* ---------------- 原型顶栏 ---------------- */
@media (max-width:1100px){
  .proto-top{padding:10px 16px;gap:10px}
  .proto-top .brand{white-space:nowrap;font-size:13px}
  .proto-top .bar-nav{margin-left:8px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .proto-top .bar-nav::-webkit-scrollbar{display:none}
  .proto-top .bar-nav a{white-space:nowrap;padding:6px 10px}
}
@media (max-width:640px){
  .proto-top{flex-wrap:wrap;padding:9px 12px;gap:8px}
  .proto-top .brand{width:100%;order:1}
  .proto-top .back{order:2;margin-left:auto;font-size:11.5px;padding:5px 10px}
  .proto-top .bar-nav{order:3;width:100%;margin-left:0}
  .proto-top .spacer{display:none}
}

/* ---------------- 总览页 ---------------- */
@media (max-width:1100px){
  .page-grid{grid-template-columns:repeat(3,1fr)!important}
}
@media (max-width:860px){
  .page-grid{grid-template-columns:repeat(2,1fr)!important}
  .legend{grid-template-columns:repeat(2,1fr)!important}
}
@media (max-width:640px){
  .hero{padding:40px 20px 36px!important}
  .hero h1{font-size:26px!important}
  .hero p{font-size:13.5px!important}
  .hero .meta{gap:16px!important}
  .hero .meta b{font-size:18px!important}
  .wrap{padding:28px 16px 60px!important}
  .page-grid{grid-template-columns:1fr!important;gap:12px!important}
  .legend{grid-template-columns:1fr!important}
}

/* ---------------- 门户端 ---------------- */
@media (max-width:1100px){
  .p-nav{flex-wrap:wrap;gap:12px;padding:12px 16px}
  .p-logo{font-size:15px}
  .p-menu{order:3;width:100%;margin-left:0;gap:16px;overflow-x:auto;white-space:nowrap;flex-wrap:nowrap;scrollbar-width:none;padding:4px 0 2px}
  .p-menu::-webkit-scrollbar{display:none}
  .p-menu a{white-space:nowrap}
  .p-actions{margin-left:auto}

  .hero-in{flex-direction:column;padding:36px 20px 62px;gap:30px}
  .hero-txt h1{font-size:30px}
  .hero-txt p{font-size:14px;max-width:none}
  .hero-visual{width:100%;min-height:auto}
  .ring{max-width:290px}
  .orb{padding:9px 12px}
  .orb b{font-size:15px}
  .orb span{font-size:10px}
  .orb.o2{right:0}

  .stats{margin:-26px 16px 0;grid-template-columns:repeat(2,1fr)!important}
  .body-wrap{padding:20px 16px 56px}
  .wrap{padding:20px 16px 56px}
  .course-grid{grid-template-columns:repeat(2,1fr)!important;gap:14px}
  .band{grid-template-columns:1fr!important}

  .layout{grid-template-columns:1fr!important;gap:16px}
  .side-card{position:static!important;top:auto}

  .c-item{flex-wrap:wrap;padding:14px;gap:12px}
  .c-item .thumb{width:100%!important;height:168px!important}
  .c-item .info{width:100%;min-width:0}

  .article{padding:22px 18px}
  .article h1{font-size:20px;line-height:1.45}
  .article .meta{flex-wrap:wrap;gap:10px}
  .article p,.article li{font-size:14px}

  .hero-cover{height:200px!important}
  .content{padding:20px 18px}
  .content h1{font-size:20px}
  .teacher-card{flex-wrap:wrap;gap:12px}
  .cert-inner{padding:22px 18px}
  .org-head{padding:22px 20px}
  .org-head .rating{margin-left:0;width:100%;text-align:left;display:flex;align-items:baseline;gap:10px}
  .org-head .rating b{font-size:26px}
}
@media (max-width:640px){
  .course-grid{grid-template-columns:1fr!important}
  .hero-txt h1{font-size:25px}
  .hero-visual{display:none}
  .stats>div{padding:18px 8px}
  .stats b{font-size:21px}
  .badges{gap:12px;flex-wrap:wrap;font-size:11.5px}
  .footer-in{gap:22px;padding:28px 16px}
  .footer .copy{font-size:11px;line-height:1.7}
  .syllabus li{font-size:13px;gap:10px}
  .cert-qr{width:84px}
}

/* ---------------- 学员端（侧栏 → 顶部横滑导航） ---------------- */
@media (max-width:900px){
  .lr-shell{flex-direction:column}
  .lr-side{width:100%;flex-direction:column}
  .lr-side::after{display:none}
  .lr-logo{padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.08)}
  .lr-nav{display:flex;flex-direction:row;gap:6px;padding:8px 10px;overflow-x:auto;flex:none;scrollbar-width:none}
  .lr-nav::-webkit-scrollbar{display:none}
  .lr-nav .grp{display:none}
  .lr-nav a{margin-bottom:0;white-space:nowrap;padding:8px 12px;font-size:12.5px;gap:7px}
  .lr-nav a .cnt{display:none}
  .lr-user{display:none}
  .lr-main{padding:16px 14px 40px}
  .lr-topbar h1{font-size:18px}
  .hero-banner{padding:20px 18px}
  .hero-banner h2{font-size:17px}
  .hero-banner .cta{flex-wrap:wrap}
  .stat-grid{grid-template-columns:repeat(2,1fr)!important;gap:10px}
  .course-reco{grid-template-columns:1fr!important;gap:12px}
  .bottom-grid{grid-template-columns:1fr!important}
  .study-layout{grid-template-columns:1fr!important}
  .right-panel{position:static!important}
  .course-row{flex-wrap:wrap;gap:12px}
  .course-row .thumb{width:100%!important;height:150px!important}
  .course-row .right{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0!important}
  .cert-grid{max-width:none}
  .cert-field{flex-wrap:wrap}
  .cert-field .k{width:100%;font-size:12px;margin-bottom:2px}
  .cert-foot{flex-wrap:wrap;gap:12px}
  .filter-tabs{overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  .filter-tabs::-webkit-scrollbar{display:none}
}
@media (max-width:640px){
  .stat-grid{grid-template-columns:1fr 1fr!important}
  .course-title h2{font-size:14px}
  .cert-head h2{font-size:18px}
}

/* ---------------- 机构后台 ---------------- */
@media (max-width:1000px){
  .co-shell{flex-direction:column}
  .co-side{width:100%;border-right:none;border-bottom:1px solid var(--line)}
  .co-logo{padding:12px 16px}
  .co-nav{display:flex;overflow-x:auto;padding:8px 10px;gap:6px;flex:none;scrollbar-width:none}
  .co-nav::-webkit-scrollbar{display:none}
  .co-nav .grp{display:none}
  .co-nav .ai{white-space:nowrap;margin-bottom:0;padding:8px 12px;font-size:12.5px}
  .co-user{display:none}
  .co-main{padding:16px 14px 40px;overflow-x:auto}
  .co-topbar h1{font-size:18px}
  .co-topbar .right{margin-left:0;width:100%;flex-wrap:wrap}
}

/* ---------------- 监管端 ---------------- */
@media (max-width:1000px){
  .gov-shell{grid-template-columns:1fr!important;min-height:0}
  .gov-side{padding:0 0 8px}
  .gov-nav{display:flex;overflow-x:auto;padding:8px 10px;gap:6px;scrollbar-width:none}
  .gov-nav::-webkit-scrollbar{display:none}
  .gov-nav .grp{display:none}
  .gov-nav a{white-space:nowrap;padding:8px 12px;font-size:12.5px;margin:0}
  .gov-main{padding:16px 14px 40px;overflow-x:auto}
}

/* ---------------- 移动端 H5 外壳 ---------------- */
@media (max-width:640px){
  .mobile-frame{max-width:none;margin:0;border-radius:0;height:calc(100vh - 92px)}
}

/* ---------------- 通用兜底 ---------------- */
@media (max-width:1100px){
  .grid{min-width:0}
  .card{min-width:0}
  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .search{max-width:none}
  .chip-row{flex-wrap:wrap}
}
