/* HSK4 One — HSK 3.0 shell parity with Classic HSK 2.0.
   The two versions share the same viewport, header and responsive container.
   This file intentionally overrides only page geometry/response breakpoints;
   data, grading, saved progress and question renderers stay version-specific. */

/* Production's full-width header replaces the older centered, 1260px header. */
body.hsk3-unified .topbar {
  width:100%; max-width:100%; min-width:0;
  height:76px;
  display:flex; align-items:center;
  gap:clamp(10px,1.5vw,28px);
  padding:0 clamp(18px,3vw,72px);
  background:color-mix(in srgb,var(--card) 94%,transparent);
  border:0; border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 var(--line);
  backdrop-filter:blur(16px);
  justify-content:normal;
}
body.hsk3-unified .brand {
  flex:0 0 auto; font-size:21px; letter-spacing:-.055em;
}
body.hsk3-unified .topnav {
  display:flex; flex:1 1 auto; min-width:0;
  justify-content:center; align-items:center;
  margin:0; gap:4px;
}
body.hsk3-unified .topnav button {
  font-size:13px; font-weight:700;
  padding:11px clamp(8px,.75vw,14px);
  min-height:38px; white-space:nowrap;
}
body.hsk3-unified .top-actions {
  display:flex; flex:0 0 auto; align-items:center;
  gap:10px; margin-left:auto;
}

/* These numbers match public/assets/production.css for Classic exactly.
   The old HSK 3.0 1160px width was the cause of the screenshots' margins. */
body.hsk3-unified .container {
  width:100%; max-width:1712px; min-width:0;
  margin:0 auto;
  padding:clamp(22px,2.4vw,46px) clamp(22px,3.2vw,64px) 130px;
  min-height:78vh;
}
@media (min-width:1700px) {
  body.hsk3-unified .container {max-width:1775px;}
}

/* Shared card/paper components can expand with the Classic workspace. */
body.hsk3-unified .hsk3-shell > *,
body.hsk3-unified .hsk3-shell .home-hero,
body.hsk3-unified .hsk3-shell .quiz-studio-layout,
body.hsk3-unified .hsk3-shell .flash-full,
body.hsk3-unified .hsk3-shell .test-layout {min-width:0;max-width:100%;}
body.hsk3-unified .hsk3-shell .home-hero {width:100%;}
body.hsk3-unified .hsk3-shell .home-hero-copy {min-width:0;}
body.hsk3-unified .hsk3-shell .home-hero h1 {overflow-wrap:normal;}
body.hsk3-unified .hsk3-shell .cardpanel,
body.hsk3-unified .hsk3-shell .card {min-width:0;}

/* Keep the nav usable instead of wrapping/overflowing on medium laptops. */
@media (min-width:961px) and (max-width:1300px) {
  body.hsk3-unified .topbar {padding:0 clamp(16px,2.5vw,34px);gap:10px;}
  body.hsk3-unified .topnav {gap:1px;}
  body.hsk3-unified .topnav button {font-size:12px;padding:8px 7px;}
  body.hsk3-unified .top-actions {gap:6px;}
}
@media (min-width:701px) and (max-width:960px) {
  body.hsk3-unified .topbar {height:62px;padding:0 22px;justify-content:space-between;}
  body.hsk3-unified .topnav {display:none!important;}
  body.hsk3-unified .top-actions {margin-left:auto;}
  body.hsk3-unified .container {padding:24px 22px 115px;}
  body.hsk3-unified .mobile-nav {display:grid;z-index:70;}
}

/* The existing mobile interaction controls are retained, but use Classic's
   responsive paddings and full viewport rather than a centered narrow shell. */
@media (max-width:700px) {
  body.hsk3-unified .topbar {
    height:58px; padding:0 15px; gap:8px;
    width:100%; justify-content:space-between;
  }
  body.hsk3-unified .brand {font-size:17px;min-width:0;}
  body.hsk3-unified .topnav {display:none!important;}
  body.hsk3-unified .top-actions {margin-left:auto;gap:5px;}
  body.hsk3-unified .container {
    max-width:100%; width:100%; min-width:0;
    padding:18px 15px calc(97px + env(safe-area-inset-bottom,0px));
  }
  body.hsk3-unified .mobile-nav {display:grid;}
  body.hsk3-unified .hsk3-shell .home-hero {grid-template-columns:1fr;}
  body.hsk3-unified .hsk3-shell .home-hero-copy {padding:28px 23px;}
  body.hsk3-unified .hsk3-shell .home-hero h1 {
    font-size:clamp(33px,8vw,47px); overflow-wrap:break-word;
  }
  body.hsk3-unified .hsk3-shell .quiz-studio-layout,
  body.hsk3-unified .hsk3-shell .flash-full,
  body.hsk3-unified .hsk3-shell .test-layout {grid-template-columns:minmax(0,1fr);}
}

@media (max-width:360px) {
  body.hsk3-unified .container {padding-inline:12px;}
  body.hsk3-unified .topbar {padding-inline:11px;}
  body.hsk3-unified .hsk3-shell .home-hero-copy {padding:23px 17px;}
}

/* Classic header plan indicator for guests; member status lives in Pro. */
body.hsk3-unified .hsk3-guest-plan:not([hidden]){
 display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;
 min-height:35px;padding:7px 13px;background:var(--soft);color:var(--ink);
 border:1px solid var(--line);border-radius:11px;font-size:11px;font-weight:800;
}
@media(max-width:700px){body.hsk3-unified .hsk3-guest-plan{display:none!important}}
