/* ============================================================
   阿鹏运维笔记 · 站点样式
   主色:深青(可信、技术感);背景:暖纸色(讲师、说真话的人味)
   ============================================================ */
:root {
  --bg: #f6f4ee;
  --surface: #fffdf8;
  --surface-2: #f0ece2;
  --ink: #26302e;
  --muted: #75807c;
  --accent: #0d7377;
  --accent-strong: #0a5c60;
  --accent-soft: #e0efee;
  --line: #e5e0d2;
  --code-bg: #eee9dc;
  --shadow: 0 1px 2px rgba(38, 48, 46, .05), 0 8px 24px -12px rgba(38, 48, 46, .12);
  --radius: 14px;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
}
:root[data-theme='dark'] {
  --bg: #15181a;
  --surface: #1c2122;
  --surface-2: #242a2b;
  --ink: #e6eae7;
  --muted: #98a39f;
  --accent: #2eb8bd;
  --accent-strong: #4fd0d4;
  --accent-soft: #1d3436;
  --line: #2e3536;
  --code-bg: #252b2c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.4; }
img { max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .18s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- 头部 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 62px; }
.logo { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
.logo span { color: var(--accent); }
.site-nav { display: flex; gap: 4px; margin-left: 8px; }
.site-nav a {
  padding: 6px 14px; border-radius: 999px; color: var(--muted);
  font-size: .95rem; transition: all .15s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 84px 0 64px;
  background:
    radial-gradient(600px 300px at 15% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent),
    radial-gradient(500px 260px at 85% 20%, color-mix(in srgb, var(--accent) 8%, transparent), transparent);
}
.hero-inner { max-width: 760px; }
.hero-kicker { color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.hero h1 { font-size: clamp(1.3rem, 3.2vw, 2.35rem); letter-spacing: 1px; margin-bottom: 18px; white-space: nowrap; }
.hero-sub { font-size: 1.08rem; max-width: 620px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------- 区块 ---------------- */
.section { padding: 44px 22px 8px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.section-head h1, .section-head h2 { font-size: 1.5rem; }
.more { font-size: .9rem; margin-left: auto; }

/* ---------------- 卡片 ---------------- */
.card-grid { display: grid; gap: 20px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink); transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); color: var(--ink); }
.card-cover {
  height: 110px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,
    hsl(var(--hue) 45% 88%), hsl(calc(var(--hue) + 30) 42% 80%));
  font-size: 2.6rem;
}
:root[data-theme='dark'] .card-cover {
  background: linear-gradient(135deg,
    hsl(var(--hue) 40% 24%), hsl(calc(var(--hue) + 30) 38% 18%));
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.12rem; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); }
.pill {
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
}
.card-body p { font-size: .9rem; flex: 1; }
.card-tags, .post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: .78rem; color: var(--muted); }

/* ---------------- 布局 / 侧栏 ---------------- */
.layout-with-side { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.sidebar, .post-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 82px; }
.widget {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.widget h4 { font-size: 1.02rem; margin-bottom: 12px; }
.widget ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; padding: 5px 13px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); font-size: .85rem;
  border: 1px solid transparent; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- 微信卡 / CTA ---------------- */
.wechat-card { text-align: center; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.qr-box {
  width: 120px; height: 120px; margin: 10px auto;
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .8rem; line-height: 1.5; text-align: center;
  background: var(--surface-2);
}
.qr-box.big { width: 160px; height: 160px; }
.cta-block {
  display: flex; align-items: center; gap: 20px;
  background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 40%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--radius); padding: 26px 30px;
}
.cta-block p { font-size: .9rem; }
.cta-block .btn { margin-left: auto; flex-shrink: 0; }
.cta-emoji { font-size: 2.2rem; }

/* ---------------- 文章页 ---------------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--accent); z-index: 100; transition: width .1s linear;
}
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; padding-top: 40px; align-items: start; }
.post-main { min-width: 0; }
.crumbs { margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.post-banner {
  height: 150px; border-radius: var(--radius); margin-bottom: 26px;
  display: flex; align-items: center; justify-content: center; font-size: 3.4rem;
  background: linear-gradient(135deg, hsl(var(--hue) 45% 87%), hsl(calc(var(--hue) + 35) 42% 78%));
}
:root[data-theme='dark'] .post-banner {
  background: linear-gradient(135deg, hsl(var(--hue) 40% 24%), hsl(calc(var(--hue) + 35) 38% 17%));
}
.post-title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 14px; }
.post-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .88rem; margin-bottom: 12px; }
.post-tags { margin-bottom: 26px; }
.prose { font-size: 1.02rem; }
.prose p { margin: 18px 0; }
.prose h2 {
  font-size: 1.35rem; margin: 42px 0 16px; padding-left: 12px;
  border-left: 4px solid var(--accent); scroll-margin-top: 80px;
}
.prose h3 { font-size: 1.15rem; margin: 30px 0 12px; scroll-margin-top: 80px; }
.prose ul, .prose ol { margin: 16px 0; padding-left: 26px; }
.prose li { margin: 8px 0; }
.prose strong { color: var(--accent-strong); }
:root[data-theme='dark'] .prose strong { color: var(--accent); }
.prose blockquote {
  margin: 22px 0; padding: 14px 20px;
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0; color: var(--ink);
}
.prose code {
  background: var(--code-bg); padding: 2px 7px; border-radius: 6px;
  font-size: .9em; font-family: 'JetBrains Mono', Consolas, monospace;
}
.prose pre {
  background: #223029; color: #d5e8dd; padding: 18px 20px;
  border-radius: 12px; overflow-x: auto; margin: 22px 0;
}
:root[data-theme='dark'] .prose pre { background: #101615; }
.prose pre code { background: none; padding: 0; font-size: .88rem; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 34px 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.toc a {
  display: block; padding: 5px 0 5px 12px; color: var(--muted);
  font-size: .88rem; border-left: 2px solid var(--line);
}
.toc a.lv3 { padding-left: 26px; font-size: .83rem; }
.toc a:hover { color: var(--accent); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.share-row { display: flex; gap: 10px; margin: 34px 0 8px; flex-wrap: wrap; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0 10px; }
.pn-card {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink);
}
.pn-card.right { text-align: right; }
.pn-card:hover { border-color: var(--accent); color: var(--ink); }
.pn-card strong { font-size: .95rem; font-family: var(--font-serif); }

/* ---------------- 归档页 ---------------- */
.archive-tools { margin-bottom: 26px; }
.search-input {
  width: 100%; max-width: 460px; padding: 12px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: .95rem; outline: none;
}
.search-input:focus { border-color: var(--accent); }

/* ---------------- 资料页 ---------------- */
.resources-intro { max-width: none; margin-bottom: 26px; white-space: nowrap; font-size: clamp(11px, calc((100vw - 48px) / 40), 16px); }
.resource-card { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.resource-emoji { font-size: 2.4rem; }
.kw {
  align-self: center; margin-top: 6px; padding: 5px 16px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .88rem;
}
.roadmap-block { margin-top: 28px; }
.roadmap-block h4 { text-align: center; margin-bottom: 12px; }
.roadmap-img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.resources-wechat { max-width: 420px; margin: 34px auto 0; }

/* ---------------- 电子资料目录 ---------------- */
.materials-promo { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.materials-promo h2 { font-size: 1.3rem; margin-bottom: 8px; }
.materials-promo p { max-width: 640px; }
.lib-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; flex-wrap: wrap; margin-bottom: 24px; }
.lib-hero h1 { font-size: 1.7rem; margin-bottom: 10px; }
.lib-hero p { max-width: 660px; }
.lib-metrics { display: flex; gap: 14px; flex-wrap: wrap; }
.lib-metric {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 18px; text-align: center; min-width: 88px; box-shadow: var(--shadow);
}
.lib-metric strong { display: block; font-family: var(--font-serif); font-size: 1.45rem; color: var(--accent); line-height: 1.2; }
.lib-metric span { font-size: .78rem; color: var(--muted); }
.lib-search { display: flex; gap: 10px; margin-bottom: 16px; }
.lib-search .search-input { flex: 1; margin: 0; }
.lib-results { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; }
.lib-results-head { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.lib-result-list { max-height: 380px; overflow: auto; }
.lib-result { display: flex; align-items: baseline; gap: 12px; padding: 11px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.lib-result:last-child { border-bottom: none; }
.lib-result:hover { background: var(--surface-2); }
.lib-result-title { flex: 1; font-size: .92rem; }
.lib-result-path { font-size: .78rem; color: var(--muted); }
.lib-result b { font-size: .82rem; color: var(--accent); white-space: nowrap; }
.lib-directory { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 26px; }
.lib-directory summary { cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-weight: 600; }
.lib-directory summary span { color: var(--muted); font-size: .82rem; font-weight: 400; }
.lib-directory-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.lib-directory-list a {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .85rem;
  color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.lib-directory-list a:hover { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.lib-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter-chip {
  cursor: pointer; font: inherit; font-size: .85rem; line-height: 1.4; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: all .15s ease;
}
.filter-chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.filter-chip.active {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.lib-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lib-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.lib-card h3 { font-size: 1.05rem; }
.lib-card-desc { font-size: .9rem; color: var(--muted); }
.lib-items { display: grid; grid-template-columns: 1fr; gap: 6px; width: 100%; }
.lib-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); font-size: .84rem; color: var(--muted);
}
.lib-item b { color: var(--accent); white-space: nowrap; }
.lib-item b.free { color: #1a7f43; }
.lib-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
}
.lib-price { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.lib-price.free { color: #1a7f43; }
@media (max-width: 960px) {
  .lib-directory-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lib-directory-list { grid-template-columns: 1fr; }
  .lib-result-path { display: none; }
}

/* ---------------- 关于页 ---------------- */
.about-hero { display: flex; gap: 28px; align-items: center; margin-bottom: 50px; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  display: flex; align-items: center; justify-content: center; font-size: 2.6rem;
}
.about-hero h1 { font-size: 1.7rem; margin-bottom: 10px; }
.about-hero p { max-width: 560px; margin-bottom: 16px; }
.topic-card { text-align: center; }
.topic-emoji { font-size: 2rem; margin-bottom: 8px; }
.product-card { position: relative; }
.product-tag {
  position: absolute; top: 16px; right: 16px;
  font-size: .75rem; padding: 2px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.product-tag.free { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.contact-card p { margin: 8px 0; }

/* ---------------- 页脚 ---------------- */
.site-footer { margin-top: 70px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr 0.9fr; gap: 28px;
  padding-top: 44px; padding-bottom: 30px;
  align-items: start;
}
.footer-grid h4 { font-size: .95rem; margin-bottom: 12px; }
.footer-logo { font-size: 1.15rem; margin-bottom: 10px; }
.footer-link { display: block; color: var(--muted); font-size: .88rem; padding: 3px 0; }
.footer-link:hover { color: var(--accent); }
.footer-qr .qr-img { width: 100%; max-width: 130px; margin: 4px auto 8px; }
.footer-bottom { padding: 16px 22px 26px; border-top: 1px solid var(--line); text-align: center; }
/* 页脚备案号:按工信部要求可点击跳转 */
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--brand); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .layout-with-side, .post-layout { grid-template-columns: 1fr; }
  .sidebar, .post-side { position: static; }
  .card-grid.three, .card-grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-inner { gap: 12px; height: 56px; }
  .logo { font-size: 1.1rem; }
  .site-nav { overflow-x: auto; margin-left: 0; }
  .site-nav a { padding: 5px 10px; font-size: .88rem; white-space: nowrap; }
  .header-actions .btn { display: none; }
  .hero { padding: 56px 0 44px; }
  .card-grid.two, .card-grid.three, .card-grid.four { grid-template-columns: 1fr; }
  .cta-block { flex-direction: column; text-align: center; }
  .cta-block .btn { margin-left: 0; }
  .prev-next { grid-template-columns: 1fr; }
  .about-hero { flex-direction: column; text-align: center; }
  .about-hero .hero-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
}
/* ---------------- 信任条 ---------------- */
.trust-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.trust-grid > div { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.trust-grid strong { font-family: var(--font-serif); font-size: 1.02rem; }
.trust-grid .muted { font-size: .82rem; }

/* ---------------- 痛点卡 ---------------- */
.pain-card { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pain-emoji { font-size: 1.9rem; }
.pain-card p { font-size: .9rem; }
.pain-answer { margin-top: 22px; text-align: center; font-size: 1rem; }

/* ---------------- 课程卡 ---------------- */
.course-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink); transition: transform .18s ease, border-color .18s ease;
}
.course-card:hover { transform: translateY(-4px); color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.course-top {
  position: relative; height: 100px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, hsl(var(--hue) 45% 87%), hsl(calc(var(--hue) + 30) 42% 79%));
}
:root[data-theme='dark'] .course-top { background: linear-gradient(135deg, hsl(var(--hue) 40% 24%), hsl(calc(var(--hue) + 30) 38% 17%)); }
.course-emoji { font-size: 2.4rem; }
.course-level {
  position: absolute; left: 14px; top: 12px; font-size: .75rem; font-weight: 700;
  background: rgba(255,255,255,.75); color: #333; padding: 2px 10px; border-radius: 999px;
}
:root[data-theme='dark'] .course-level { background: rgba(0,0,0,.4); color: #eee; }
.course-status {
  position: absolute; right: 14px; top: 12px; font-size: .75rem; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.75); color: #666;
}
.course-status.onsale { background: #d9f2e3; color: #1a7f43; }
.course-status.limited { background: #fde9d9; color: #b45f06; }
.course-status.waitlist { background: rgba(255,255,255,.75); color: #666; }
:root[data-theme='dark'] .course-status.waitlist { background: rgba(0,0,0,.4); color: #aaa; }
.course-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-body h3 { font-size: 1.15rem; }
.course-body p { font-size: .9rem; flex: 1; }
.course-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.price { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.price small { font-size: .8rem; font-weight: 400; }
.price.big { font-size: 2rem; }
.course-go { font-size: .88rem; color: var(--accent); font-weight: 600; }

/* ---------------- 课程总览/详情 ---------------- */
.stage-guide { margin-bottom: 30px; font-size: .95rem; }
.stage-guide.widget { padding-bottom: 14px; }
.stage-guide p { margin: 0 0 8px; color: var(--muted); }
.stage-guide p:last-child { margin-bottom: 0; }
.course-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 40px; padding-top: 40px; align-items: start; }
.course-title-row { display: flex; gap: 10px; margin-bottom: 12px; }
.course-level.big, .course-status.big { position: static; font-size: .82rem; padding: 3px 12px; }
.course-level.big { background: var(--surface-2); color: var(--ink); }
.course-tagline { font-size: 1.08rem; margin-bottom: 26px; }
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 34px; }
.fit-yes { border-top: 3px solid #1a7f43; }
.fit-no { border-top: 3px solid #b4451f; }
.fit-grid ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check-list li { padding-left: 28px; position: relative; }
.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.outline { display: flex; flex-direction: column; gap: 14px; }
.outline-item h4 { display: flex; align-items: center; gap: 10px; }
.outline-no {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0;
}
.outline-item ul { padding-left: 38px; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: var(--muted); }

/* ---------------- 资料内容卡片(详情页目录/大纲) ---------------- */
.toc-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin-bottom: 34px;
}
.toc-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.toc-cover {
  height: 92px; display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  background: linear-gradient(135deg,
    hsl(var(--hue) 45% 88%), hsl(calc(var(--hue) + 30) 42% 80%));
}
:root[data-theme='dark'] .toc-cover {
  background: linear-gradient(135deg,
    hsl(var(--hue) 40% 24%), hsl(calc(var(--hue) + 30) 38% 18%));
}
.toc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.toc-body h3 { font-size: 1rem; line-height: 1.55; }
.toc-meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.toc-body ul { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--muted); }

.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: .98rem; }
.faq-item p { margin-top: 10px; font-size: .92rem; }

/* ---------------- 下单卡 ---------------- */
.order-card { text-align: center; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.order-price { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.price-label { font-size: .8rem; color: var(--muted); }
.order-steps { text-align: left; margin: 14px 0; padding: 14px; background: var(--surface-2); border-radius: 10px; }
.order-steps ol { padding-left: 20px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }

/* ---------------- 响应式补充 ---------------- */
@media (max-width: 960px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .course-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .trust-grid { grid-template-columns: 1fr; }
  .fit-grid { grid-template-columns: 1fr; }
}

.qr-img { display: block; width: 160px; height: auto; margin: 10px auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }

/* ---------------- 电子资料:首页卡片 / 详情页补充 ---------------- */
.mat-card {
  display: flex; flex-direction: column; gap: 8px;
  color: var(--ink); text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mat-card:hover { transform: translateY(-4px); color: var(--ink); box-shadow: 0 6px 30px -12px rgba(38, 48, 46, .22); }
.mat-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mat-code { font-size: .76rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.mat-price { font-size: .82rem; font-weight: 700; color: var(--accent); }
.mat-price.free { color: #1a7f43; }
.mat-emoji { font-size: 2rem; line-height: 1.2; }
.mat-card h4 { margin: 0; }
.mat-card p { flex: 1; margin: 0; }
.mat-card-foot { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.need-entry { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.need-entry .chip { text-decoration: none; }
.side-mats { display: flex; flex-direction: column; gap: 8px; }
.side-mats a { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.side-mats em { flex: 0 0 auto; font-style: normal; color: var(--muted); font-size: .82rem; }
.free-paid-note { margin-top: 22px; }
.free-paid-note p { margin-bottom: 8px; }
.free-paid-note p:last-child { margin-bottom: 0; }
.copy-row { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 6px; }
.copy-row .btn { justify-content: center; }
.copy-manual { margin: 8px 0 0; padding: 10px 12px; text-align: left; font-size: .86rem; line-height: 1.6; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; }
.copy-manual b { display: block; margin-top: 4px; color: var(--ink); font-weight: 700; word-break: break-all; -webkit-user-select: text; user-select: text; }
.page-lead { max-width: 780px; margin: -6px 0 26px; line-height: 1.85; }
.job-news-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.job-news h4 { margin: 10px 0 8px; font-size: 1rem; }
.job-news p { margin: 4px 0 0; }
.service-card { display: flex; flex-direction: column; gap: 10px; }
.service-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.service-price { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.service-includes { padding-top: 6px; border-top: 1px solid var(--line); }
.service-includes strong { display: block; margin-bottom: 6px; font-size: .82rem; color: var(--muted); }
.service-includes ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .86rem; line-height: 1.8; }
/* 底部动作区推到卡片最下面,两张卡的按钮就落在同一水平线上 */
.service-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.service-actions .more { color: var(--accent); font-weight: 700; text-decoration: none; }
.service-actions .more:hover { text-decoration: underline; }
.service-card .more { margin-top: auto; color: var(--accent); font-weight: 700; text-decoration: none; }
.service-card .more:hover { text-decoration: underline; }
.service-note { margin-top: 20px; }
.service-note p { margin: 6px 0 0; }
:root[data-theme='dark'] .mat-price.free { color: #5fd18d; }

/* 窄屏上资源页那句介绍允许换行,避免整页被撑出横向滚动 */
@media (max-width: 720px) {
  .resources-intro { white-space: normal; font-size: .92rem; line-height: 1.7; }
}
