/* ===== Global Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f9fafb;
  color: #111827;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Layout Container ===== */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
.site-header {
  background: linear-gradient(90deg, #a7b4bc 0%, #4a6c8c 60%, #BB8E6A 100%);
   box-shadow: 0 6px 18px rgba(0,0,0,.06);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
}

.brand img {
  display: block;
  height: 48px;
  width: auto;
}

.brand-name {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}

/* ===== Menu ===== */
.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
}

.menu-item {
  position: relative;
}

.menu-link {
  position: relative;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 0;
}

.menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  transition: width 0.2s ease;
}

.menu-link:hover::after {
  width: 100%;
}

/* ===== Dropdown ===== */
.has-sub .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  padding: 10px;
  display: none;
  z-index: 1000;
}

.has-sub:hover .dropdown {
  display: block;
}

.dropdown-link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: #0f172a;
  text-decoration: none;
}

.dropdown-link:hover {
  background: #f1f5f9;
}

/* ===== Menu CTA ===== */
.menu-cta {
  background: #e39b5d;
  color: #1f2937;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(227, 155, 93, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(227, 155, 93, 0.45);
}

/* ===== Main Content ===== */
.page-wrap {
  flex: 1 0 auto;
  padding: 46px 0;
  padding-top: 24px; 
}

/* ===== Footer ===== */
.site-footer {
  background: linear-gradient(90deg, #a7b4bc 0%, #4a6c8c 60%, #BB8E6A 100%);
  color: rgba(255, 255, 255, 0.9);
}


.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.foot-left,
.foot-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.foot-right a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.foot-right a:hover {
  text-decoration: underline;
}

.dot {
  opacity: 0.6;
}

/* Home (single-column, centered) */
.masthead { padding: 42px 0 24px; text-align: center; }
.masthead-title { font-size: 30px; line-height: 1.25; margin: 0 0 10px; }
.masthead-sub { color:#334155; font-size:1.05rem; max-width:760px; margin:0 auto; }
.masthead-cta { display:flex; gap:12px; justify-content:center; margin:18px 0 4px; }

.band { background:#f8fafc; border-top:1px solid #e5e7eb; border-bottom:1px solid #e5e7eb; }
.band-keys .pill-list { list-style:none; display:flex; gap:10px; flex-wrap:wrap; padding:16px 0; justify-content:center; }
.pill-list li { background:#fff; border:1px solid #e5e7eb; color:#0f172a; border-radius:999px; padding:8px 12px; font-weight:600; }

.core-tiles { padding: 28px 0 10px; }
.tiles { display:grid; grid-template-columns: 1fr; gap:16px; }
@media (min-width: 900px){ .tiles { grid-template-columns: 1fr 1fr; } }
.tile { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:18px; text-decoration:none; color:#0f172a; transition:.15s ease; }
.tile:hover { transform: translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.08); }
.tile-title { margin:0 0 6px; font-size:1.1rem; }
.tile-desc { margin:0 0 10px; color:#475569; }
.tile-cta { font-weight:700; }

.copy-block { padding: 18px 0 6px; text-align:center; }
.copy-block h3 { margin:0 0 8px; }
.copy-block p { margin:0 auto; max-width:800px; color:#334155; }

.faq { padding: 24px 0 8px; }
.faq h3 { margin:0 0 10px; text-align:center; }
.faq details { border:1px solid #e5e7eb; border-radius:10px; padding:10px 12px; background:#fff; margin-bottom:10px; }
.faq summary { cursor:pointer; font-weight:700; }
.faq details div { margin-top:8px; color:#475569; }

.cta-bottom { padding: 28px 0 10px; text-align:center; }
.cta-title { margin:0 0 12px; }
.cta-actions { display:flex; gap:12px; justify-content:center; }

/* Buttons & inline core links reuse your existing button styles */
.inline-core { color:#0f172a; font-weight:700; text-underline-offset:2px; }
.btn { display:inline-block; border-radius:10px; padding:10px 14px; font-weight:700; text-decoration:none; }
.btn-primary { background:#e39b5d; color:#1f2937; box-shadow:0 6px 18px rgba(227,155,93,.35); }
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 10px 26px rgba(227,155,93,.45); }
.btn-secondary { background:#0f172a; color:#fff; }
.btn-outline { border:1px solid #0f172a; color:#0f172a; }
.btn-outline:hover { background:#0f172a; color:#fff; }

/* ===== Articles Grid ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ===== Article Card ===== */
.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

/* Clickable overlay link */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ===== Card Header ===== */
.card-header {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.card-meta {
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.25rem;
}

.card-meta .sep {
  margin: 0 0.25rem;
}

/* ===== Card Body ===== */
.card-body {
  padding: 1rem;
  flex: 1;
}

.card-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
}

/* ===== Card Tags ===== */
.card-tags {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-tags li {
  background-color: #f5f5f5;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #666;
}

/* ===== Card Footer ===== */
.card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #eee;
}

.card-cta {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0066cc;
  transition: color 0.2s ease;
}

.article-card:hover .card-cta {
  color: #004b99;
}

/* ===== Pagination ===== */
.pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  background: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
}

.page-btn:hover {
  background: #f5f5f5;
}

.page-btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.page-count {
  font-size: 0.9rem;
  color: #777;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Post Layout: Sidebar Left, Content Right ===== */
.post-layout {
  display: grid;
  grid-template-columns: 280px 1fr; /* 左侧固定宽度，右侧自适应 */
  gap: 2rem;
  align-items: start;
}

/* ===== Sidebar ===== */
.post-aside {
  position: sticky;
  top: 96px; /* 根据你的 header 高度调整 */
  align-self: start;
}

/* ===== TOC ===== */
.toc {
  background: #f7f9fc;
  border: 1px solid #e6ecf2;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.toc-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: #0f172a;
}
.toc-body ul,
.toc-body ol {
  margin: 0;
  padding-left: 18px;
}
.toc-body a {
  text-decoration: none;
  color: #0f172a;
}
.toc-body a:hover {
  color: #2563eb;
}

/* ===== Sidebar Card ===== */
.sidebar-card {
  background: #ffffff;
  border: 1px solid #e6ecf2;
  border-radius: 8px;
  padding: 14px 16px;
}
.side-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.side-link {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: #2563eb;
  text-decoration: none;
  margin: 6px 0;
}
.side-link:hover {
  text-decoration: underline;
}

/* ===== Post Header ===== */
.post-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.post-meta {
  font-size: 14px;
  color: #6b7280;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.post-meta .dot {
  margin: 0 6px;
}
.post-tags {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.post-tags li {
  background: #f1f5f9;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
}

/* ===== Post Body ===== */
.post-body {
  min-width: 0; /* 避免溢出 */
}
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ===== Post Footer ===== */
.post-footer {
  margin-top: 2rem;
  border-top: 1px solid #e6ecf2;
  padding-top: 1rem;
}
.post-tags-row {
  margin-bottom: 1rem;
}
.tag-chip {
  display: inline-block;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  text-decoration: none;
  color: #0f172a;
  margin-right: 8px;
}
.tag-chip:hover {
  background: #e2e8f0;
}

/* ===== Post Navigation ===== */
.post-nav {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.post-nav a {
  color: #2563eb;
  text-decoration: none;
}
.post-nav a:hover {
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .post-layout {
    grid-template-columns: 240px 1fr;
  }
}
@media (max-width: 800px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
  .post-aside {
    position: static;
    order: -1; /* 让侧栏出现在正文上方 */
    margin-bottom: 1.5rem;
  }
}

/* =========================
   Article polish (left TOC)
   ========================= */

/* 容器与标题间距更顺滑 */
.post.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.post-header { margin-bottom: 1.25rem; }
.post-title   { letter-spacing: .2px; line-height: 1.25; }
.post-desc    { color:#475569; margin:.35rem 0 0; }

/* Meta + 标签胶囊 */
.post-meta { gap:.35rem; margin:.5rem 0 0; }
.post-meta time { color:#64748b; }
.post-tags li {
  background:#eef2f7; color:#0f172a; border:1px solid #e6ecf2;
  border-radius:999px; padding:2px 8px; font-size:12px;
}

/* 正文可读性：行距、段间距、链接样式 */
.post-body.prose { font-size:17.5px; line-height:1.82; color:#0f172a; }
.post-body.prose p { margin: .85rem 0; }
.post-body.prose a { color:#2563eb; text-underline-offset: 2px; }
.post-body.prose a:hover { text-decoration: underline; }
.post-body.prose h2, .post-body.prose h3 { margin-top:2.2rem; margin-bottom:.8rem; line-height:1.3; }
.post-body.prose h2 { font-size:1.5rem; }
.post-body.prose h3 { font-size:1.2rem; }

/* 固定头部时的锚点偏移（点击 TOC 滚动不被 header 遮住） */
.post-body.prose h2, 
.post-body.prose h3, 
.post-body.prose h4 { scroll-margin-top: 96px; }

/* 引用、分隔线、列表 */
.post-body.prose blockquote{
  margin:1.25rem 0; padding:.75rem 1rem; background:#f8fafc;
  border-left:3px solid #cbd5e1; color:#334155; border-radius:6px;
}
.post-body.prose hr{
  border:0; border-top:1px solid #e6ecf2; margin:2rem 0;
}
.post-body.prose li { margin:.35rem 0; }

/* 图片与说明 */
.post-body.prose img{ max-width:100%; height:auto; border-radius:8px; }
.post-cover { margin:1rem 0 1.5rem; }
.post-body.prose figure { margin:1.25rem 0; text-align:center; }
.post-body.prose figcaption{ font-size:13px; color:#64748b; margin-top:.5rem; }

/* 代码与表格（若有） */
.post-body.prose pre {
  background:#0b1220; color:#e5e7eb; border-radius:8px;
  padding:14px 16px; overflow:auto; font-size:.95em;
}
.post-body.prose code { background:#f1f5f9; padding:.1em .35em; border-radius:4px; }
.post-body.prose table{
  width:100%; border-collapse:collapse; margin:1.25rem 0; font-size:16px;
  border:1px solid #e6ecf2; background:#fff;
}
.post-body.prose th, .post-body.prose td{
  padding:10px 12px; border:1px solid #e6ecf2; text-align:left;
}
.post-body.prose thead th{ background:#f7f9fc; }


/* 点击 TOC 后，目标标题弱高亮（纯 CSS） */
.post-body.prose :target{
  outline:2px solid rgba(37,99,235,.25);
  outline-offset: 4px;
  border-radius: 6px;
}

/* 底部导航与标签行 */
.post-footer{ margin-top:2rem; border-top:1px solid #e6ecf2; padding-top:1rem; }
.post-tags-row{ margin-bottom:1rem; }
.tag-chip{
  background:#eef2f7; border:1px solid #e6ecf2; color:#0f172a;
  border-radius:999px; padding:4px 10px; font-size:13px; margin-right:8px;
}
.tag-chip:hover{ background:#e6edf6; }
.post-nav{ display:flex; justify-content:space-between; font-size:14px; }
.post-nav a{ color:#2563eb; text-decoration:none; }
.post-nav a:hover{ text-decoration:underline; }

/* 响应式：侧栏堆叠与尺寸 */
@media (max-width:1100px){
  .post-layout{ grid-template-columns:240px 1fr; }
}
@media (max-width:800px){
  .post-layout{ grid-template-columns:1fr; }
  .post-aside{ position:static; order:-1; margin-bottom:1rem; }
}

img{
    max-width: 800px;
}

.post-body img{
    max-width: 500px;
}

/* ===== taxonomy.html 独立样式 ===== */

/* 页面标题和简介 */
.section-head-a {
  margin-bottom: 2rem;
}

.page-title-a {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.page-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: #4b5563;
  width: 100%;
}

/* 文章列表卡片 */
.guides-section-a {
  margin-top: 2rem;
}

.grid-guides-a {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.25rem;
}

.guide-card-a {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.guide-card-a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.guide-card-a a{
  text-decoration: none;
  font-size: 14px;
  margin: 10px;
}

.card-anchor-a {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 封面图 */
.card-media-a img {
  width: 100%;
  height: auto;
  display: block;
}

/* 标题与 meta */
.card-header-a {
  padding: 1rem;
}

.card-title-a {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.card-title-a a {
  color: #0f172a;
  text-decoration: none;
}

.card-title-a a:hover {
  color: #2563eb;
}

.card-meta-a {
  font-size: 0.85rem;
  color: #6b7280;
}

.card-meta-a .sep {
  margin: 0 0.4rem;
}

/* 摘要和标签 */
.card-body-a {
  padding: 0 1rem 1rem;
}

.card-desc-a {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 0.5rem;
}

.card-tags-a {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-tags-a li {
  font-size: 0.8rem;
  color: #2563eb;
}

/* 底部 CTA */
.card-footer-a {
  padding: 0 1rem 1rem;
}

.card-cta-a {
  font-weight: 600;
  font-size: 0.95rem;
  color: #2563eb;
}

/* 分页 */
.pagination-a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.page-btn-a {
  padding: 0.4rem 0.8rem;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  text-decoration: none;
}

.page-btn-a:hover {
  background: #e5e7eb;
}

.is-disabled-a {
  opacity: 0.5;
  pointer-events: none;
}

.page-count-a {
  font-size: 0.85rem;
  color: #6b7280;
}

/* 相关推荐模块 */
.related-core-a {
  margin-top: 3rem;
}

.core-grid-a {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.core-card-a {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}

.core-card-a:hover {
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.core-title-a {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.core-desc-a {
  font-size: 0.9rem;
  color: #4b5563;
  flex-grow: 1;
}

.core-cta-a {
  margin-top: 0.8rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #2563eb;
}

/* 外层区块 */
.guides-section-b {
  margin-top: 1.25rem;
}

/* 自适应卡片网格 */
.grid-guides-b {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* 单张卡片 */
.guide-card-b {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}

.guide-card-b:hover {
  transform: translateY(-2px);
  border-color: #d1d5db;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

/* 让整卡可点击的透明锚点 */
.card-anchor-b {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 卡片头部 */
.card-header-b {
  padding: 14px 14px 0;
}

.card-title-b {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
}

.card-title-b a {
  color: inherit;
  text-decoration: none;
}

.card-title-b a:hover {
  color: #2563eb;
}

.card-meta-b {
  font-size: 12.5px;
  color: #64748b;
}

/* 正文摘要 */
.card-body-b {
  padding: 10px 14px 0;
}

.card-desc-b {
  margin: 0 0 10px;
  color: #334155;
  font-size: 14px;
  line-height: 1.65;
}

/* 底部 CTA */
.card-footer-b {
  padding: 10px 14px 14px;
  display: flex;
  justify-content: flex-end;
}

.card-cta-b {
  font-weight: 700;
  font-size: 13.5px;
  color: #2563eb;
}

.guide-card-b:hover .card-cta-b {
  color: #1d4ed8;
}

/* 响应式微调 */
@media (max-width: 980px) {
  .grid-guides-b {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .grid-guides-b {
    grid-template-columns: 1fr;
  }
}