/**
 * 中学 / 小学 sidebar-tree 双栏页公共布局：
 * 桌面端移除所有滚动锁定效果，只保留移动端的固定效果。
 * 选择器刻意写成 html body .shell .inner，压过 app.css / secondary-s-pages.css。
 */
@media (min-width: 1280px) {
  /* 桌面端：移除所有滚动锁定，恢复正常页面滚动 */
}

@media (max-width: 1279px) {
  body[data-page="s-curriculum"],
  body[data-page="s-life-planning"],
  body[data-page="s-sd-highlights"],
  body[data-page="ole-highlights"],
  body[data-page="life-planning"] {
    --life-header-offset: clamp(72px, 12vw, 96px);
  }

  body[data-page="curriculum"],
  body[data-page="sd-highlights"],
  body[data-page="jobs-tenders"] {
    --curriculum-header-offset: clamp(72px, 12vw, 96px);
  }

  body[data-page^="primary-"] {
    --pcl-header-offset: clamp(72px, 12vw, 96px);
  }

  html body .curriculum-shell.section-band,
  html body .pcl-shell.section-band,
  html body .s-life-planning-shell.section-band,
  html body .life-planning-shell.section-band,
  html body .SD-Highlights-shell.section-band,
  html body .jt-shell.section-band {
    overflow: visible;
  }

  html body .curriculum-shell .curriculum-shell__inner,
  html body .pcl-shell .pcl-shell__inner,
  html body .s-life-planning-shell .s-life-planning-shell__inner,
  html body .life-planning-shell .life-planning-shell__inner,
  html body .SD-Highlights-shell .SD-Highlights-shell__inner,
  html body .jt-shell .jt-shell__inner {
    overflow: visible;
  }

  html body:has(.curriculum-shell, .pcl-shell, .s-life-planning-shell, .life-planning-shell, .SD-Highlights-shell, .jt-shell) .subpage-section-nav {
    position: sticky;
    top: var(--life-header-offset, var(--pcl-header-offset, var(--curriculum-header-offset, 72px)));
    z-index: 30;
    box-sizing: border-box;
    margin-bottom: 0;
    padding-top: clamp(16px, 3.5vw, 24px);
    padding-bottom: clamp(14px, 3.2vw, 20px);
    background: #fff;
  }

  html body:has(.jt-shell) .subpage-section-nav {
    background: var(--jt-shell-bg, #e6e5e5);
  }

  html body:has(.curriculum-shell, .pcl-shell, .s-life-planning-shell, .life-planning-shell, .SD-Highlights-shell, .jt-shell) .subpage-section-nav__dropdown {
    z-index: 31;
  }
}

/*
 * 页脚圆角必须由 #footerMain 自己绘制；外层 footer 只负责提供前一段内容的底色，
 * 不能再铺页脚同色背景，否则圆角两侧的缺口会被父层填平。
 */
html body:has(.curriculum-shell, .pcl-shell, .s-life-planning-shell, .life-planning-shell, .SD-Highlights-shell, .jt-shell) > footer {
  background: #fff;
}

html body:has(.jt-shell) > footer {
  background: var(--jt-shell-bg);
}

html body:has(.curriculum-shell, .pcl-shell, .s-life-planning-shell, .life-planning-shell, .SD-Highlights-shell, .jt-shell) > footer #footerMain.section-band {
  overflow: hidden;
  border-top-left-radius: var(--radius-section);
  border-top-right-radius: var(--radius-section);
}
