/* HSK One 2026: one fluid student shell and progressive navigation. */
:root{--hsk-shell-max:1390px;--hsk-shell-gutter:clamp(14px,3.8vw,56px);--hsk-nav-ink:#e6f4f3;--hsk-teal:#16ac9b}
html.hsk-entry #app,html.hsk-entry #hskLevelHub,html.hsk-entry #previousWorkspaceMount{visibility:hidden!important}
html,body{max-width:100%;overflow-x:clip}
/* Use the same physical content width in the welcome, HSK 4, and all other courses. */
body.hsk3-unified .container,body.hsk3-unified #hskLevelHub,body.hsk3-unified #hskWelcome{box-sizing:border-box;width:min(calc(100% - 2 * var(--hsk-shell-gutter)),var(--hsk-shell-max));max-width:var(--hsk-shell-max);margin-inline:auto}
body.hsk3-unified .container{padding:clamp(20px,3vw,37px) 0 calc(112px + env(safe-area-inset-bottom,0px));min-width:0}
body.hsk3-unified #hskLevelHub{padding:clamp(20px,3vw,37px) 0 calc(112px + env(safe-area-inset-bottom,0px));min-width:0}
body.hsk3-unified #hskWelcome{padding:clamp(24px,3vw,40px) 0 66px}
body.hsk3-unified #hskWelcome[hidden]{display:none!important}
/* Responsive header: logo, ONE level control, four top-level categories, account. */
body.hsk3-unified .topbar{height:70px;gap:clamp(10px,1.2vw,20px);padding-inline:max(var(--hsk-shell-gutter),calc((100vw - var(--hsk-shell-max))/2));justify-content:flex-start;min-width:0}
body.hsk3-unified .topbar .brand{cursor:pointer;flex:none;outline-offset:4px}
body.hsk3-unified .topbar .brand:focus-visible{outline:2px solid #69dcc7;border-radius:10px}
body.hsk3-unified #desktopNav,body.hsk3-unified #mobileNav{display:none!important}
body.hsk3-unified .hx-levels-trigger{display:none!important}
body.hsk3-unified .hsk-level-choice{flex:none;min-width:0;gap:5px}
body.hsk3-unified .hsk-level-choice select{min-width:112px;max-width:146px;min-height:39px;font-size:13px;cursor:pointer}
body.hsk3-unified .top-actions{margin-left:auto;flex:none;gap:6px}
body.hsk3-unified .top-actions button{min-width:37px;min-height:37px}
#hskSimpleNav{display:flex;align-items:center;gap:3px;margin-left:auto;flex:0 1 auto}
.hsk-simple-link{border:0!important;background:transparent!important;color:var(--muted)!important;min-height:40px;border-radius:11px;padding:9px clamp(10px,1.1vw,18px)!important;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:13px;font-weight:750;transition:background .18s,color .18s}
.hsk-simple-link:hover,.hsk-simple-link[aria-expanded="true"],.hsk-simple-link.is-active{background:var(--soft)!important;color:var(--ink)!important}
.hsk-simple-link:focus-visible{outline:2px solid #61daca;outline-offset:2px}
.hsk-simple-pro{color:#79e5d2!important}
body.hx-welcome-open #hskSimpleNav,body.hx-welcome-open #hskMobileTabbar{display:none!important}
body.hx-welcome-open #hskLevelSelect{color:var(--muted)}
.hsk-nav-popover{position:fixed;z-index:200;top:66px;min-width:258px;max-width:min(94vw,350px);padding:9px;display:grid;gap:3px;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:17px;box-shadow:0 24px 64px rgba(1,16,21,.28)}
.hsk-nav-popover[hidden]{display:none!important}
.hsk-nav-popover button{width:100%;min-height:45px;text-align:left;border:0!important;background:transparent!important;color:var(--ink)!important;padding:10px 12px!important;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;border-radius:11px}
.hsk-nav-popover button:hover,.hsk-nav-popover button:focus-visible{background:var(--soft)!important}
.hsk-nav-popover .hsk-menu-heading{font-size:10px;text-transform:uppercase;letter-spacing:.11em;font-weight:850;color:var(--muted);padding:8px 12px 3px}
.hsk-nav-popover .hsk-menu-trail{color:var(--muted);font-size:11px}
/* Bottom navigation is intentionally only four items; all other tools stay in More. */
#hskMobileTabbar,#hskMobileSheet{display:none}
@media(max-width:1160px){#hskSimpleNav{display:none!important}body.hsk3-unified .topbar .brand{margin-right:auto}body.hsk3-unified .top-actions{margin-left:0}
#hskMobileTabbar{position:fixed;z-index:115;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--card);border-top:1px solid var(--line);padding:6px max(8px,env(safe-area-inset-left,0px)) calc(6px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 32px rgba(0,0,0,.09)}
#hskMobileTabbar button{border:0!important;background:transparent!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:49px;padding:4px 3px;border-radius:11px;font-size:11px;color:var(--muted);font-weight:700}
#hskMobileTabbar button.is-active{background:var(--soft)!important;color:var(--ink)!important}
#hskMobileTabbar svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
#hskMobileSheet{position:fixed;z-index:190;inset:0;display:flex;align-items:flex-end;justify-content:center;background:rgba(2,17,23,.68);padding-top:55px}
#hskMobileSheet[hidden]{display:none!important}
.hsk-sheet-panel{background:var(--card);color:var(--ink);width:100%;max-width:680px;border-radius:24px 24px 0 0;padding:16px 18px calc(26px + env(safe-area-inset-bottom,0px));max-height:85dvh;overflow:auto;box-shadow:0 -20px 65px rgba(0,0,0,.23)}
.hsk-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:10px}
.hsk-sheet-heading h2{margin:0;font-size:20px}
.hsk-sheet-close{min-width:42px;min-height:42px}
.hsk-sheet-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}
.hsk-sheet-group strong{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.09em;display:block;margin-bottom:8px}
.hsk-sheet-group button{min-height:48px;width:100%;background:transparent;border:1px solid var(--line);border-radius:12px;text-align:left;padding:10px;font-size:13px;font-weight:700;color:var(--ink);margin-bottom:7px}
.hsk-sheet-group button:hover,.hsk-sheet-group button:focus-visible{border-color:#55b7aa;background:var(--soft)}
body.hsk-sheet-open{overflow:hidden}
body.hsk3-unified .container,body.hsk3-unified #hskLevelHub{padding-bottom:calc(104px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:740px){body.hsk3-unified .topbar{height:60px;padding-inline:12px;gap:9px}body.hsk3-unified .topbar .brand{font-size:17px;gap:7px}body.hsk3-unified .topbar .brand .logo{width:31px;height:31px}body.hsk3-unified .hsk-level-choice label{display:none}body.hsk3-unified .hsk-level-choice select{min-width:99px;max-width:110px;min-height:38px;font-size:12px}
body.hsk3-unified .top-actions{gap:4px}body.hsk3-unified #headerAccountLabel{display:none}body.hsk3-unified .top-actions #speakBtn{display:none}body.hsk3-unified .top-actions button{min-width:35px;min-height:35px;padding:6px}
:root{--hsk-shell-gutter:14px}body.hsk3-unified .container,body.hsk3-unified #hskLevelHub{padding-top:17px}
.hsk-sheet-groups{gap:10px}
}
@media(max-width:370px){body.hsk3-unified .topbar .brand{font-size:15px}body.hsk3-unified .hsk-level-choice select{min-width:88px;max-width:95px}body.hsk3-unified .topbar .top-actions #themeBtn{display:none}.hsk-sheet-groups{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#hskSimpleNav button,#hskMobileTabbar button,.hsk-nav-popover *{transition:none!important}}
/* A smaller, study-first Home on phones: the same functionality without a giant art panel. */
#hskWelcome:focus{outline:none}
@media(max-width:740px){
 body.hsk3-unified .hsk3-shell .home-hero{display:block!important;min-height:0!important;max-height:none!important;border-radius:19px!important}
 body.hsk3-unified .hsk3-shell .home-hero-art{display:none!important}
 body.hsk3-unified .hsk3-shell .home-hero-copy{padding:23px 20px 24px!important;min-width:0!important}
 body.hsk3-unified .hsk3-shell .home-hero h1{font-size:clamp(30px,7.7vw,37px)!important;line-height:1.12!important;letter-spacing:-.06em;margin:13px 0 11px!important;overflow-wrap:normal!important}
 body.hsk3-unified .hsk3-shell .home-hero p{font-size:12px!important;line-height:1.55!important;margin-bottom:15px!important}
 body.hsk3-unified .hsk3-shell .home-hero .hero-actions{display:flex;flex-wrap:wrap;gap:8px!important;margin:16px 0 0!important}
 body.hsk3-unified .hsk3-shell .home-hero .hero-actions button{flex:1 1 120px;min-height:44px;padding:10px 9px!important;font-size:12px}
 body.hsk3-unified .hsk3-shell .home-hero .home-hero-foot{margin-top:12px!important;gap:6px 12px!important;font-size:10px!important}
 body.hsk3-unified .hsk3-shell .studio-kicker{margin-bottom:11px!important;font-size:10px!important}
 body.hsk3-unified .hsk3-shell .home-section-top{margin-top:23px!important;margin-bottom:12px!important}
 body.hsk3-unified .hsk3-shell .home-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 body.hsk3-unified .hsk3-shell .metric-card{min-width:0!important;padding:15px!important}
 body.hsk3-unified .hsk3-shell .metric-card .big-num{font-size:29px!important}
 body.hsk3-unified .hsk3-shell .metric-card .metric-foot{font-size:10px!important}
 body.hsk3-unified .hsk3-shell .quicklinks{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
 body.hsk3-unified .hsk3-shell .quicklinks .quick{min-height:112px!important;padding:14px!important}
 body.hsk3-unified .hsk3-shell .quicklinks .quick strong{font-size:15px!important}
 body.hsk3-unified .hsk3-shell .quicklinks .quick small{font-size:11px!important;line-height:1.45}
}
@media(max-width:365px){body.hsk3-unified .hsk3-shell .home-hero h1{font-size:29px!important}body.hsk3-unified .hsk3-shell .home-hero-copy{padding:21px 16px!important}}
/* The new exam bottom bar never covers an active question's own controls. */
@media(max-width:1160px){body:has(#hskLevelHub .lh-exam-layout) #hskMobileTabbar,body:has(#app .test-layout) #hskMobileTabbar{display:none!important}}
/* Welcome focus is semantic, not a full-page focus ring. The CTA keeps its teal design despite legacy button styles. */
#hskWelcome:focus,#hskWelcome:focus-visible{outline:0!important}
body.hsk3-unified #hskWelcome .hx-btn.hx-primary{background:#078d82!important;border:1px solid #078d82!important;color:#fff!important}
body.hsk3-unified #hskWelcome .hx-btn.hx-primary:hover{background:#08766e!important;border-color:#08766e!important}
body.hsk3-unified #hskWelcome .hx-btn.hx-secondary{background:#ffffff12!important;border:1px solid #7baaa5!important;color:#e8fffa!important}
body.hsk3-unified #hskWelcome .hx-btn.hx-light{background:#e5fff8!important;border:1px solid #c7fff0!important;color:#074c46!important}
