/* ==========================================================================
   冲能站点统一头尾（首页静态页 + 内容页 Next 共用）
   唯一来源：/www/wwwroot/xianglaoshi-landing/cn-assets/site-chrome.css
   nginx 的 /cn-assets/ 指向本目录，所以首页和内容页引用同一个文件。
   改这里 = 全站生效。类名统一 sc- 前缀，避免和页面内容样式冲突。
   ========================================================================== */

:root {
  --sc-navy: #07356f;
  --sc-blue: #1266ee;
  --sc-orange: #ec941e;
  --sc-ink: #172940;
  --sc-muted: #607086;
  --sc-line: #e3ebf5;
}

/* ---------- 顶部：logo + 象老师AI + 测评系统 ---------- */

.sc-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 84px;
  background: #ffffffed;
  border-bottom: 1px solid #e6edf7;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.sc-wrap { width: min(1100px, calc(100% - 64px)); margin-inline: auto; }
.sc-header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sc-brand { display: inline-flex; align-items: center; flex: none; line-height: 1; }
.sc-brand img { width: auto; height: 60px; object-fit: contain; mix-blend-mode: multiply; }
.sc-nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(180deg, #3787ff, #0861ed);
  box-shadow: 0 6px 16px #1169ec24;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.sc-btn:hover { transform: translateY(-2px); box-shadow: 0 9px 22px #1169ec36; }
/* 内容页全局有 body.cn-site a{color:inherit}，会把链接按钮的文字压成深色 */
body.cn-site .sc-btn { font-weight: 700; line-height: 1.3; }
body.cn-site a.sc-btn { color: #fff; }
body.cn-site a.sc-btn:hover { color: #fff; }
body.cn-site a.sc-btn--ghost { color: var(--sc-navy); }

.sc-btn--sm { min-height: 43px; padding: 11px 20px; font-size: 14px; }

/* 导航「免费」角标：象老师AI / 学习力测评 都是免费使用，用 CSS 叠加，
   首页静态页与内容页同时生效，不需要改 JSON、不需要重建容器。 */
.sc-nav .sc-btn { position: relative; }
.sc-nav .sc-btn::after {
  content: "0元";
  position: absolute;
  top: -6px;
  right: -2px;
  padding: 0 5px;
  height: 16px;
  border-radius: 99px;
  background: #d8402f;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 16px;
  letter-spacing: 0;
  box-shadow: 0 2px 5px #a9271a40;
  pointer-events: none;
}
.sc-btn--lg { min-height: 54px; padding: 15px 30px; font-size: 17px; border-radius: 14px; }
.sc-btn--ghost { color: var(--sc-navy); background: #fff; border-color: #dbe6f5; box-shadow: none; }

/* ---------- 底部：咨询伴学方案 ---------- */

.sc-footer {
  margin-top: 64px;
  padding: 52px 0 30px;
  background: #fff;
  border-top: 1px solid var(--sc-line);
}
.sc-consult {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 34px 38px;
  border: 1px solid #e0eaf8;
  border-radius: 24px;
  background: linear-gradient(120deg, #eef5ff, #fffdf9 58%, #fff3df);
}
.sc-kicker {
  display: inline-flex;
  padding: 5px 13px;
  border-radius: 99px;
  background: #fff;
  color: var(--sc-navy);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 1px;
  box-shadow: 0 3px 10px #19427212;
}
.sc-consult h2 {
  margin: 14px 0 0;
  color: var(--sc-navy);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -.5px;
}
.sc-consult-desc {
  max-width: 36em;
  margin: 10px 0 0;
  color: var(--sc-muted);
  font-size: 14.5px;
  line-height: 1.85;
}
.sc-consult-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sc-consult-options span {
  padding: 6px 14px;
  border: 1px solid #dfe9f8;
  border-radius: 99px;
  background: #fff;
  color: var(--sc-navy);
  font-size: 13px;
  font-weight: 650;
}
.sc-consult-action { flex: none; text-align: center; }
.sc-consult-note { display: block; margin-top: 10px; color: var(--sc-muted); font-size: 12px; }
.sc-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  color: #8a99ab;
  font-size: 12px;
}
.sc-footer-bottom a { color: #8a99ab; text-decoration: none; }
.sc-footer-bottom a:hover { color: var(--sc-blue); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 手机端固定底栏（只有内容页用；首页用同款 sticky-bar） ---------- */

.sc-mobile-consult { display: none; }

@media (max-width: 900px) {
  .sc-wrap { width: calc(100% - 40px); }
  .sc-consult { gap: 24px; padding: 28px 26px; }
  .sc-consult h2 { font-size: 24px; }
}

@media (max-width: 820px) {
  .sc-header { height: 72px; }
  .sc-brand img { height: 48px; }
  .sc-btn--sm { min-height: 38px; padding: 9px 13px; font-size: 12.5px; border-radius: 10px; }
}

@media (max-width: 600px) {
  .sc-wrap { width: calc(100% - 36px); }
  .sc-header { height: 67px; }
  .sc-brand img { height: 44px; }
  .sc-nav { gap: 8px; }
  .sc-footer { margin-top: 42px; padding: 34px 0 46px; }
  .sc-consult { flex-direction: column; align-items: flex-start; gap: 22px; padding: 24px 20px; border-radius: 18px; }
  .sc-consult h2 { font-size: 22px; letter-spacing: -.3px; }
  .sc-consult-desc { font-size: 13px; }
  .sc-consult-options span { font-size: 12px; padding: 5px 11px; }
  .sc-consult-action { width: 100%; }
  .sc-consult-action .sc-btn { width: 100%; }
  .sc-consult-note { font-size: 11px; }
  .sc-footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 20px; font-size: 11px; }
  .sc-mobile-consult {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
    background: #fffffff7;
    border-top: 1px solid var(--sc-line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 -6px 24px #07356f08;
  }
  .sc-mobile-consult .sc-mobile-copy { color: var(--sc-navy); font-size: 12px; font-weight: 750; line-height: 1.35; }
  .sc-mobile-consult .sc-mobile-copy small { display: block; margin-top: 2px; color: var(--sc-muted); font-size: 10px; font-weight: 400; }
  .sc-mobile-consult .sc-btn { flex: none; min-height: 42px; padding: 10px 16px; font-size: 13px; }
}

@media (max-width: 359px) {
  .sc-nav { gap: 6px; }
  .sc-brand img { height: 38px; }
  .sc-btn--sm { padding: 8px 9px; font-size: 11px; border-radius: 9px; }
}

/* 「数学自主学习力测评」这类长标签：不换行 + 小屏逐级收字号（2026-11-16） */
.sc-nav .sc-btn { white-space: nowrap; }
@media (max-width: 900px) {
  .sc-nav .sc-btn { font-size: 12px; padding: 9px 11px; }
}
@media (max-width: 600px) {
  .sc-header-inner { gap: 12px; }
  .sc-brand img { height: 42px; }
  .sc-nav { gap: 7px; }
  .sc-nav .sc-btn { font-size: 11px; padding: 8px 9px; }
}
@media (max-width: 359px) {
  /* 320 宽：两个按钮都要留住，只能再收一档字号 */
  .sc-brand img { height: 36px; }
  .sc-nav { gap: 6px; }
  .sc-nav .sc-btn { font-size: 9.5px; padding: 8px 8px; border-radius: 9px; }
}

/* 滚到页脚时收起固定底栏，避免和页脚咨询卡重复 */
body > .sticky-bar, .sc-mobile-consult { transition: transform .25s ease, opacity .25s ease; }
body.sc-footer-in-view > .sticky-bar,
body.sc-footer-in-view > .sc-mobile-consult { transform: translateY(135%); opacity: 0; pointer-events: none; }

/* 内容页原为固定底栏预留了 body padding；现在底栏到页脚会自动收起，不再需要 */
@media (max-width: 600px) {
  body.cn-site { padding-bottom: 0; }
}

/* 后台（/admin）不显示站点头尾 */
body:has(.admin-root) > .sc-header,
body:has(.admin-root) > .sc-footer,
body:has(.admin-root) > .sc-mobile-consult { display: none !important; }

@media print {
  .sc-header, .sc-footer, .sc-mobile-consult { display: none !important; }
}

/* ==========================================================================
   内容页正文排版（中文长文阅读）
   说明：内容页 CSS 打包在 Next 镜像里（app/content.css），本文件在页面中后加载，
   用 body.cn-site 前缀提高优先级做覆盖，改这里不用重建镜像。
   ========================================================================== */

/* 文章头部：像报纸标题区，不像落地页 */
body.cn-site .ct-article-head {
  padding: 30px 0 26px;
  background: #fff;
  border-bottom: 1px solid #e8edf5;
}
body.cn-site .ct-article-head h1 {
  margin-top: 10px;
  max-width: 20em;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .01em;
  color: #0f2f57;
}
body.cn-site .ct-article-head .ct-lead {
  max-width: 40em;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.95;
  color: #5d6b7d;
}
/* 分类在面包屑里已经出现过，胶囊去掉 */
body.cn-site .ct-article-head .ct-chip { display: none; }
body.cn-site .ct-byline { margin-top: 14px; gap: 4px 12px; font-size: 12.5px; color: #8b98a9; }
body.cn-site .ct-breadcrumbs { font-size: 12.5px; color: #96a3b3; }

/* 正文：单栏文字流，不圈卡片；整页收窄，标题和正文左边缘对齐 */
body:has(.ct-article-body) .ct-wrap { width: min(960px, calc(100% - 48px)); }
body.cn-site .ct-article-layout {
  padding: 26px 0 60px;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 44px;
}
body.cn-site .ct-article-body {
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #33415a;
  font-size: 16px;
  line-height: 1.92;
  letter-spacing: .015em;
}
/* 中文网页习惯：不缩进，靠段距分段 */
body.cn-site .ct-article-body > p { margin: 0 0 .9em; text-indent: 0; }
/* 小标题只靠字号和留白分层，不加色块和竖条 */
body.cn-site .ct-article-body h2 {
  margin: 2.5em 0 .85em;
  padding: 0;
  border: 0;
  color: #10315a;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .015em;
}
body.cn-site .ct-article-body h3 {
  margin: 1.9em 0 .55em;
  color: #10365f;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: .01em;
}
body.cn-site .ct-article-body h2:first-child { margin-top: 0; }
body.cn-site .ct-article-body ul { margin: .3em 0 1.1em; padding-left: 1.4em; list-style: disc; }
body.cn-site .ct-article-body li { margin-bottom: .35em; padding-left: .15em; line-height: 1.9; }
body.cn-site .ct-article-body li::marker { color: #93b7e4; }
body.cn-site .ct-article-body a { color: #1266ee; }

/* 参考资料 / 常见问题：降到脚注的分量 */
body.cn-site .ct-citations,
body.cn-site .ct-faq-block { margin-top: 32px; padding-top: 20px; border-top: 1px solid #eceff4; }
body.cn-site .ct-citations h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: #5b6a7d; }
body.cn-site .ct-faq-block h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; letter-spacing: .01em; color: #10365f; }
body.cn-site .ct-citations h2::before,
body.cn-site .ct-faq-block h2::before { display: none; }
body.cn-site .ct-citations .ct-eyebrow { display: none; }
body.cn-site .ct-citations ol { font-size: 12.5px; line-height: 1.85; color: #8b98a9; }
body.cn-site .ct-faq summary { padding: 12px 0; font-size: 15px; font-weight: 600; }
body.cn-site .ct-faq p { font-size: 14px; line-height: 1.9; color: #5b6a7d; }

/* 侧栏：做成页边注，不做广告卡 */
body.cn-site .ct-side { top: 92px; gap: 10px; }
body.cn-site .ct-side-card {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid #e7ecf4;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.cn-site .ct-side-card b { font-size: 13.5px; font-weight: 700; color: #16375f; }
body.cn-site .ct-side-card p { margin: 0 0 12px; font-size: 12.6px; line-height: 1.85; color: #7a8899; }
body.cn-site .ct-side-card .ct-btn { padding: 9px 12px; font-size: 13px; }
body.cn-site .ct-side-note { font-size: 11.5px; line-height: 1.8; color: #9aa7b6; }

body.cn-site .ct-article-end { margin-top: 28px; padding: 16px 18px; border: 0; border-radius: 8px; background: #f4f7fb; }

@media (max-width: 1000px) {
  /* 平板单栏时也要限制行长，否则一行五十多字 */
  body.cn-site .ct-article-body { max-width: 36em; }
  body.cn-site .ct-article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
  body.cn-site .ct-article-head { padding: 24px 0 20px; }
  body.cn-site .ct-article-layout { padding: 18px 0 40px; gap: 20px; }
  body.cn-site .ct-article-body { max-width: none; font-size: 16px; line-height: 1.9; }
  body.cn-site .ct-article-body h2 { font-size: 19px; margin: 2.1em 0 .7em; }
  body.cn-site .ct-article-body h3 { font-size: 16px; margin-top: 1.6em; }
}

/* ==========================================================================
   自主学习中心：目录页（2026-11-15 v2）
   ========================================================================== */

body.cn-site .ct-hero {
  padding: 38px 0 24px;
  background: #fff;
  border-bottom: 1px solid #e8edf5;
}
body.cn-site .ct-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
body.cn-site .ct-hero .ct-eyebrow { display: none; }
body.cn-site .ct-hero h1 {
  margin: 0;
  color: #0f2f57;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .01em;
}
body.cn-site .ct-hero p {
  margin: 10px 0 0;
  max-width: 34em;
  color: #5d6b7d;
  font-size: 15px;
  line-height: 1.9;
}
body.cn-site .ct-hero-meta {
  margin: 0 0 4px;
  flex: none;
  color: #8b98a9;
  font-size: 12.5px;
  white-space: nowrap;
}

body.cn-site .ct-section { padding: 30px 0 8px; }
body.cn-site .ct-section[style] { padding-top: 0 !important; }

body.cn-site .ct-explorer-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8edf5;
}
body.cn-site .ct-tabs { gap: 18px; flex-wrap: wrap; }
body.cn-site .ct-tabs button {
  padding: 0 0 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: #6b7a8c;
  font-size: 14px;
}
body.cn-site .ct-tabs button:hover { color: #1266ee; border-color: transparent; }
body.cn-site .ct-tabs button.active {
  background: none;
  border-color: #1266ee;
  color: #1266ee;
  font-weight: 600;
}
body.cn-site .ct-search { width: 200px; }
body.cn-site .ct-search input {
  height: 32px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid #dde5ef;
  border-radius: 0;
  background: transparent;
  font-size: 13.5px;
}
body.cn-site .ct-search input:focus { border-color: #1266ee; box-shadow: none; }

/* 文章条目：一行一条，不做卡片 */
body.cn-site .ct-list { margin: 0; padding: 0; list-style: none; }
body.cn-site .ct-list-item { border-bottom: 1px solid #eef1f6; }
body.cn-site .ct-list-link { display: block; padding: 17px 0 15px; }
body.cn-site .ct-list-link h3 {
  margin: 0 0 5px;
  color: #122f52;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .005em;
}
body.cn-site .ct-list-link:hover h3 { color: #1266ee; }
body.cn-site .ct-list-link p {
  margin: 0 0 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #6b7a8c;
  font-size: 14px;
  line-height: 1.75;
}
body.cn-site .ct-list-meta { display: flex; gap: 10px; color: #93a0b0; font-size: 12.5px; }
body.cn-site .ct-list-meta span + span::before { content: "·"; margin-right: 10px; }
body.cn-site .ct-empty { padding: 40px 0; color: #8b98a9; font-size: 14px; }

/* 文末继续阅读 */
body.cn-site .ct-related { padding: 0 0 56px; }
body.cn-site .ct-related .ct-wrap { width: min(960px, calc(100% - 48px)); margin-inline: auto; }
body.cn-site .ct-related-title {
  margin: 0 0 4px;
  padding-top: 26px;
  border-top: 1px solid #e8edf5;
  color: #10365f;
  font-size: 17px;
  font-weight: 700;
}
body.cn-site .ct-related-more { margin: 18px 0 0; font-size: 14px; }
body.cn-site .ct-related-more a { color: #1266ee; }

/* 底部转化条：降到页脚的分量 */
body.cn-site .ct-cta-band {
  padding: 20px 22px;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  background: #fbfcfe;
  color: #33415a;
  box-shadow: none;
}
body.cn-site .ct-cta-band h2 { margin: 0 0 4px; font-size: 16.5px; font-weight: 700; color: #10365f; }
body.cn-site .ct-cta-band p { margin: 0; font-size: 13.5px; color: #6b7a8c; }

@media (max-width: 760px) {
  body.cn-site .ct-hero { padding: 26px 0 20px; }
  body.cn-site .ct-hero-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  body.cn-site .ct-hero h1 { font-size: 21px; }
  body.cn-site .ct-hero-meta { margin: 0; }
  body.cn-site .ct-explorer-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  body.cn-site .ct-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 16px; padding-bottom: 2px; scrollbar-width: none; }
  body.cn-site .ct-tabs::-webkit-scrollbar { display: none; }
  body.cn-site .ct-tabs button { flex: none; white-space: nowrap; }
  body.cn-site .ct-search { width: 100%; }
  body.cn-site .ct-list-link { padding: 15px 0 13px; }
  body.cn-site .ct-list-link h3 { font-size: 16px; }
  body.cn-site .ct-related .ct-wrap { width: calc(100% - 36px); }
}
