/* template-chrome.css — 课时页顶栏对齐 index.html 模板
   叠在 learn.css 之上，不破坏实验台 */

body.lx-page {
  background: #FAF5EC;
}

/* 模板顶栏已注入时，隐藏 learn.js 的旧顶栏，避免双头 */
body.lx-page .lx-nav {
  display: none !important;
}

body.lx-page {
  padding-top: 0;
}

/* learn 主内容上移，给模板顶栏让位 */
body.lx-page .lx-main {
  padding-top: 8px;
}

/* 顶栏与 index 同款 */
.tpl-nav {
  position: sticky;
  top: 0;
  z-index: 120;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #EAE0CD;
}

.tpl-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #2B251D;
}

.tpl-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  color: #FFF7EF;
  background: linear-gradient(135deg, #B8552F, #9A4423);
  flex: none;
}

.tpl-brand-text {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
}

.tpl-brand-text small {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #8B7E6C;
  font-weight: 500;
}

.tpl-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
  color: #574D40;
}

.tpl-links a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.tpl-links a:hover {
  color: #B8552F;
}

.tpl-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #DFD2BA;
  background: #FFFDF8;
  color: #2B251D;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tpl-cta:hover {
  border-color: #B8552F;
  color: #9A4423;
}

.tpl-crumb {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 20px 0;
  font-size: 12.5px;
  color: #8B7E6C;
}

.tpl-crumb a {
  color: #8B7E6C;
  text-decoration: none;
}

.tpl-crumb a:hover {
  color: #B8552F;
}

.tpl-crumb .here {
  color: #B8552F;
  font-weight: 600;
}

/* 课时正文标题区对齐模板 */
.lx-article > h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lx-article > h1 .h-no {
  color: #B8552F;
}

@media (max-width: 720px) {
  .tpl-links { display: none; }
}
