/* Portal extras — keep desktop canon; mobile from EvoStudyPortal-mobile-fixed */
html,body{max-width:100%;overflow-x:clip}
.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 18px;height:46px;border:0;border-radius:9px;background:var(--orange);color:#fff!important;font-weight:700;text-decoration:none;cursor:pointer;font:inherit}
.btn-primary.navy{background:var(--navy)!important}

.searchRow .btn-primary{height:49px;width:100%;border-radius:9px!important}
.portal-search select{height:49px;border:1px solid #ccd6d0;border-radius:9px;padding:0 12px;background:#fff;color:var(--ink);font:inherit;width:100%}

.tabs .tab-link{display:flex;align-items:center;height:54px;font-size:13px;font-weight:700;color:#829091;position:relative}
.tabs .tab-link:hover{color:var(--ink)}

.hero{min-height:500px}
.heroCopy{padding-bottom:145px}
.searchBox{bottom:-82px}
.trust{padding-top:115px}

.topbar{gap:10px;position:relative}
.topbar-nav{display:flex;align-items:center;gap:clamp(8px,1.1vw,18px);flex:1;min-width:0;justify-content:center;font-size:12px;font-weight:700;color:#5d6e70}
.topbar-nav a{height:76px;display:flex;align-items:center;white-space:nowrap;flex-shrink:0;position:relative}
.topbar-nav a.active{color:var(--ink)}
.topbar-nav a.active:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--orange)}

.menuButton,.mobileMenu,.mobile-tools{display:none}
.mobile-tools{align-items:center;gap:8px;flex-shrink:0}
.menuButton{border:1px solid #d5ddd8;border-radius:11px;background:#fff;color:var(--ink);cursor:pointer;padding:0;flex-shrink:0}
.menuButton svg{width:23px;height:23px;display:block}
.menuButton .icon-close{display:none}
.menuButton.is-open .icon-menu{display:none}
.menuButton.is-open .icon-close{display:block}

.lang-menu{position:relative;flex-shrink:0}
.lang-menu details{position:relative}
.lang-menu summary{list-style:none;width:28px;height:28px;border-radius:50%;border:1px solid #d5ddd8;display:grid;place-items:center;font-size:9px;font-weight:800;letter-spacing:.2px;color:var(--ink);cursor:pointer;background:#fff;user-select:none;line-height:1}
.lang-menu summary::-webkit-details-marker{display:none}
.lang-menu details[open] summary{background:#eff4ef;border-color:#b8c4bf}
.lang-drop{position:absolute;right:0;top:calc(100% + 6px);min-width:92px;background:#fff;border:1px solid #dde3df;border-radius:10px;box-shadow:0 8px 22px #243a371a;padding:4px;z-index:30}
.lang-drop a{display:block;padding:7px 10px;font-size:11px;font-weight:700;color:#5d6e70;border-radius:7px;text-decoration:none;white-space:nowrap}
.lang-drop a.on,.lang-drop a:hover{background:#eff4ef;color:var(--ink)}

.portal-footer{max-width:1220px;margin:0 auto;padding:40px max(28px,calc((100vw - 1220px)/2)) 50px;display:grid;gap:18px;font-size:12px;color:#6b7a7a;border-top:1px solid var(--line)}
.footer-top{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.footer-top p{margin:0}
.footer-ecosystem,.footer-social,.footer-links{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.footer-ecosystem a,.footer-social a,.footer-links a{font-weight:700;color:#405759}
.footer-ecosystem a:hover,.footer-social a:hover,.footer-links a:hover{color:var(--orange)}
.footer-social a{border:1px solid #dde3df;border-radius:20px;padding:5px 12px;background:#fff}

@media(max-width:1100px){
  .topbar-nav{font-size:11px;gap:10px}
}

/* Archive mobile-fixed: hamburger instead of crowded nav */
@media(max-width:900px){
  .topbar-nav,.topbar>.actions{display:none}
  .topbar{width:100%;justify-content:space-between}
  .brand{min-width:0}
  .mobile-tools{display:flex}
  .mobile-lang-menu summary{width:36px;height:36px;font-size:10px}
  .menuButton{display:grid!important;place-items:center;width:44px;height:44px;position:relative;z-index:42}
  .mobileMenu{display:block;position:absolute;left:16px;right:16px;top:calc(100% + 8px);padding:10px;background:#fff;border:1px solid #d5ddd8;border-radius:14px;box-shadow:0 18px 45px #243a3730;z-index:40}
  .mobileMenu[hidden]{display:none!important}
  .mobileMenu nav{display:grid}
  .mobileMenu nav a{display:flex;align-items:center;height:auto;min-height:48px;padding:0 14px;border-bottom:1px solid #edf0ed;font-size:15px;font-weight:700;color:var(--ink);text-decoration:none}
  .mobileMenu nav a:last-child{border:0}
  .mobileMenu-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:10px}
  .mobileMenu-actions>button{height:42px;border:1px solid #ccd6d0;border-radius:9px;background:#fff;font-weight:700;cursor:pointer}
  .mobileMenu-actions .btn-primary{height:42px;width:100%}
  .hero{grid-template-columns:minmax(0,1fr)}
  .heroCopy{min-width:0;padding-bottom:190px}
  .heroStats{display:none}
  .searchBox{bottom:-145px}
  .searchRow{grid-template-columns:1fr 1fr}
  .searchInput,.searchRow>.btn-primary{grid-column:1/-1}
  .trust{padding-top:180px;flex-wrap:wrap;gap:16px}
  .workspaceGrid{grid-template-columns:minmax(0,1fr)}
  .mapCard{position:relative;top:0}
  .match{margin:0 28px 70px;grid-template-columns:minmax(0,1fr)}
  .matchArt{min-height:330px}
  .premium{grid-template-columns:minmax(0,1fr)}
}

@media(max-width:600px){
  .portal-search select{display:none}
  .topbar{height:66px;padding:0 16px}
  .brand--full img{max-width:min(210px,65vw)}
  .hero{min-height:auto;padding:42px 18px 24px;display:block}
  .heroCopy{padding-bottom:0}
  .hero h1{font-size:clamp(40px,12vw,50px);line-height:.98;letter-spacing:-2px;margin:16px 0 24px}
  .heroCopy>p{font-size:15px;line-height:1.65;margin:0;max-width:100%;overflow-wrap:anywhere}
  .eyebrow{font-size:10px;letter-spacing:1.15px}
  .searchBox{position:relative;left:auto;right:auto;bottom:auto;width:100%;margin-top:28px;padding:0 14px 14px;border-radius:15px}
  .tabs{gap:0;justify-content:space-between;overflow:hidden}
  .tabs button,.tabs .tab-link{font-size:12px;padding-inline:2px;white-space:nowrap}
  .searchRow{display:grid;grid-template-columns:minmax(0,1fr)}
  .searchInput,.searchRow>.btn-primary{grid-column:auto;min-width:0}
  .searchInput input{min-width:0;font-size:14px}
  .quick{width:100%;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding-bottom:4px;scrollbar-width:none}
  .quick::-webkit-scrollbar{display:none}
  .quick button{flex:0 0 auto}
  .trust{padding:26px 18px;display:grid;grid-template-columns:1fr 1fr;gap:14px 12px;min-width:0}
  .trust>b{width:auto;grid-column:1/-1}
  .trust span{min-width:0;line-height:1.45}
  .trust span:last-child{grid-column:1/-1}
  .workspace{padding:50px 14px 65px;min-width:0}
  .sectionTitle{display:block}
  .sectionTitle h2{font-size:36px}
  .sectionTitle>a{display:inline-block;margin-top:14px}
  .schoolCard,.schoolBody{min-width:0}
  .schoolHead h3{overflow-wrap:anywhere}
  .metrics{grid-template-columns:1fr 1fr;gap:12px}
  .metrics div{border:0;padding:0}
  .cardFoot{flex-wrap:wrap}
  .match{margin:0 14px 55px;min-width:0}
  .matchArt{min-height:280px}
  .matchCopy{padding:42px 24px}
  .matchCopy h2{font-size:38px}
  .premium{padding:44px 22px;gap:28px}
  .premium h2{font-size:34px}
  .portal-footer{padding-inline:18px}
  .footer-top{display:block}
}

@media(max-width:380px){
  .topbar{padding-inline:12px}
  .hero{padding-inline:14px}
  .hero h1{font-size:39px}
  .searchBox{left:8px;right:8px}
}
