/* =========================================================
   第二轮精修（2026-11-23，Claude）全站共用部分：本地样稿
   1. 页头收成一行：电脑约 80 像素（原 149），手机约 60 像素（原 122）；
      校名标识、English、完整菜单都在，菜单仍是原来的 details/summary，键盘、触屏照常开合。
   2. 课程体系页：两张课程卡的年龄、标题、正文、链接统一左对齐，整张卡可点。
   3. 学员成果页（手机）：卷杆收细、锦边收窄、正文后的金龙纹减淡，长文读起来更宽。
   只用黑、金、红和灰白宣纸。
   ========================================================= */

/* ---------- 页头：一行 ---------- */
body>header{
  --r2-pad:max(20px,calc((100% - 1200px) / 2));
  position:relative;z-index:20;display:flex;align-items:center;gap:20px;
  min-height:80px;padding:0 var(--r2-pad);box-sizing:border-box;
  box-shadow:inset 0 -1px 0 var(--x-hair)}
body>header>.hd{display:contents}
body>header .hd a.ia-brand{order:1;flex:none;gap:12px;padding:8px 0}
body>header .hd a.ia-brand::before{width:40px;height:40px}
body>header .logo .wordmark{height:32px}
body>header .logo small{font-size:11.5px;letter-spacing:3px;margin-top:2px}
body>header .ia-nav{order:2;flex:1;min-width:0;box-shadow:none;background:none}
body>header .ia-nav>.wrap{max-width:none;margin:0;padding:0;position:static}
body>header .ia-nav .ia-row{justify-content:flex-end;flex-wrap:nowrap;gap:0}
body>header .ia-nav a,body>header .ia-nav summary{font-size:15px;letter-spacing:.08em;padding:10px 12px;white-space:nowrap}
body>header .ia-row summary::after{width:6px;height:6px;margin-left:8px}
/* 联系我们：不再是一块实心红，改成细朱红框，把“红”留给首屏的预约按钮 */
body>header .ia-nav .ia-row>.ia-cta{margin-left:10px;background:transparent;color:var(--x-verm);
  box-shadow:inset 0 0 0 1px rgba(160,40,31,.55);letter-spacing:.12em}
body>header .ia-nav .ia-row>.ia-cta:hover{background:var(--x-verm);color:#fff}
body>header .ia-lang{order:3;flex:none;margin-left:6px;border:0;padding:10px 4px 10px 16px;box-shadow:inset 1px 0 0 var(--x-hair);border-radius:0}
/* 下拉面板右侧几项靠右展开，免得出屏 */
body>header .ia-row>details:nth-of-type(n+3)>.ia-panel{left:auto;right:0}

/* 中等宽度电脑放不下一行：回到原来的两行 */
@media(max-width:1179px) and (min-width:821px){
  body>header{flex-wrap:wrap;row-gap:0;padding-top:10px}
  body>header .ia-nav{order:4;flex:0 0 100%}
  body>header .ia-nav .ia-row{justify-content:flex-start}
  body>header .hd a.ia-brand{flex:1}
}

/* ---------- 手机页头：一行（标识 · English · 网站菜单） ---------- */
@media(max-width:820px){
  body>header{min-height:60px;gap:6px;padding:0 10px 0 14px}
  body>header .hd a.ia-brand{flex:1;min-width:0;gap:9px;padding:8px 0}
  body>header .hd a.ia-brand::before{width:34px;height:34px;box-shadow:0 0 0 2px rgba(242,241,238,.9),0 0 0 3px rgba(138,31,25,.35)}
  body>header .logo .wordmark{height:25px}
  body>header .logo small{display:none}
  body>header .ia-lang{order:2;display:inline-flex;align-items:center;min-height:44px;padding:0 10px;border:0;font-size:14px;letter-spacing:.06em;margin:0}
  body>header .ia-nav{order:3;flex:none;position:static}
  body>header .ia-mobile{position:static}
  body>header .ia-mobile>summary{min-height:44px;padding:0 12px;gap:8px;justify-content:center;
    font-family:var(--x-sans);font-weight:500;font-size:15px;letter-spacing:.08em;border:1px solid var(--x-gold-line)}
  /* 三道横线 → 打开后变叉 */
  body>header .ia-mobile>summary::before{content:"";width:16px;height:11px;flex:none;
    background:linear-gradient(currentColor,currentColor) 0 0/100% 1.5px no-repeat,linear-gradient(currentColor,currentColor) 0 50%/100% 1.5px no-repeat,linear-gradient(currentColor,currentColor) 0 100%/100% 1.5px no-repeat}
  body>header .ia-mobile[open]>summary{color:var(--x-verm);border-color:rgba(160,40,31,.5)}
  body>header .ia-mobile>summary::after{display:none}
  body>header .ia-mobile[open]>.ia-row{position:absolute;left:0;right:0;top:100%;z-index:40;
    max-height:calc(100vh - 60px);max-height:calc(100dvh - 60px);overflow:auto;overscroll-behavior:contain;
    padding:6px 16px 16px;background:var(--x-paper-hi,#FAFAF8);
    box-shadow:inset 0 1px 0 var(--x-gold-line),0 18px 30px -16px rgba(36,32,29,.45)}
}
/* 字标只等比缩，不压扁；48 个内页的“English home”在手机上分两行叠放，和首页的“English”一样窄 */
@media(max-width:820px){
  body>header .logo .wordmark{object-fit:contain;object-position:left center}
  body>header .ia-lang{width:min-content;white-space:normal;text-align:center;line-height:1.15;font-size:13px;letter-spacing:.04em}
}
@media(max-width:374px){
  body>header{padding-left:12px;gap:4px}
  body>header .hd a.ia-brand{gap:7px}
  body>header .hd a.ia-brand::before{width:30px;height:30px}
  body>header .ia-lang{padding:0 6px}
  body>header .ia-mobile>summary{padding:0 9px;gap:7px}
}

/* ---------- 课程体系页：两张卡统一左对齐 ---------- */
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards{gap:22px}
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards>.card{
  position:relative;text-align:left;padding:28px 30px 26px;display:flex;flex-direction:column}
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards>.card>*{text-align:left;margin-left:0;margin-right:0}
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card>.sub{
  order:0;margin:0 0 6px;font-size:13.5px;letter-spacing:.12em;color:var(--x-gold-text)}
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card h2{
  font-size:26px;letter-spacing:.1em;margin:0 0 14px;padding:0;text-align:left}
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card h2::before,
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card h2::after{display:none}
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card p{font-size:15.5px;line-height:1.85}
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card p:last-child{margin:auto 0 0;padding-top:14px}
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card p:last-child a{
  display:inline-flex;align-items:center;min-height:44px;color:var(--x-verm-deep);font-weight:600;letter-spacing:.06em}
/* 整张卡都能点（链接本身不变） */
html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card p:last-child a::after{content:"";position:absolute;inset:0;z-index:1}
@media(hover:hover){
  html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card:hover h2{color:var(--x-verm-deep)}
}
@media(max-width:820px){
  html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards>.card{padding:22px 20px 18px}
  html:has(link[rel="canonical"][href$="zcmdedu.com/courses.html"]) .hubcards .card h2{font-size:23px;letter-spacing:.06em}
}

/* ---------- 学员成果页：手机卷杆收细、正文后的金龙纹减淡 ---------- */
@media(max-width:820px){
  html:has(link[rel="canonical"][href$="zcmdedu.com/results.html"]) main>.wrap{
    margin:18px 6px 46px;padding:40px 14px 34px;
    box-shadow:inset 0 0 0 1px rgba(122,95,28,.5),inset 0 0 0 4px rgba(122,95,28,.22),
      -3px 0 0 0 #8A1F19,3px 0 0 0 #8A1F19,
      0 2px 4px 3px rgba(36,32,29,.16),0 8px 18px 2px rgba(36,32,29,.2);
    background:
      linear-gradient(rgba(236,224,186,.7),rgba(236,224,186,.7)) 50% 20px/min(300px,80%) calc(min(300px,80vw) * .709) no-repeat,
      url(../ink/wen-09-560.webp) 50% 20px/min(300px,80%) auto no-repeat,
      linear-gradient(90deg,rgba(122,95,28,.1),rgba(122,95,28,0) 7%,rgba(122,95,28,0) 93%,rgba(122,95,28,.1)),
      linear-gradient(120deg,#ECDFB8 0%,#E8D9AC 30%,#F0E6C8 46%,#E7D7A8 64%,#EBDDB2 100%),
      url(../ink/paper-640.webp) 0 0/640px auto repeat;
    background-blend-mode:normal,normal,multiply,normal,multiply}
  html:has(link[rel="canonical"][href$="zcmdedu.com/results.html"]) main>.wrap::before,
  html:has(link[rel="canonical"][href$="zcmdedu.com/results.html"]) main>.wrap::after{left:-7px;right:-7px;--x-rod:20px;--x-rod-in:17px;--x-rod-off:1.5px}
  html:has(link[rel="canonical"][href$="zcmdedu.com/results.html"]) main>.wrap::before{top:-11px;height:20px}
  html:has(link[rel="canonical"][href$="zcmdedu.com/results.html"]) main>.wrap::after{top:-11px;bottom:-26px}
  /* 卷里套的卡片少一层框，正文更宽 */
  html:has(link[rel="canonical"][href$="zcmdedu.com/results.html"]) main .card{padding-left:14px;padding-right:14px;margin-left:0;margin-right:0}
  html:has(link[rel="canonical"][href$="zcmdedu.com/results.html"]) main .card .card{padding-left:10px;padding-right:10px}
  html:has(link[rel="canonical"][href$="zcmdedu.com/results.html"]) main li{line-height:1.8}
}
