@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;700&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --c-bg: #1A1A2E;
  --c-accent: #E94560;
  --c-light: #F5F5F5;
  --c-bg2: #16213E;
  --c-bg3: #0F3460;
  --c-text: #F5F5F5;
  --c-text-muted: #9A9AB0;
  --c-border: #2A2A4A;
  --c-card-bg: #1E1E38;
  --c-announce: #E94560;
  --radius: 0px;
  --font: 'Noto Sans Thai', 'Noto Sans', system-ui, -apple-system, sans-serif;
  --header-h: 60px;
  --announce-h: 36px;
  --transition: 160ms ease;
  --max-w: 1200px;
  --content-w: 720px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--c-accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }
a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== 公告条 ===== */
.announce-bar {
  background: var(--c-accent);
  color: var(--c-light);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0 1rem;
  height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 200;
  letter-spacing: 0.02em;
}
.announce-bar a { color: var(--c-light); text-decoration: underline; }

/* ===== 站点侧边导航抽屉 ===== */
.site-aside {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: var(--c-bg2);
  border-right: 2px solid var(--c-accent);
  z-index: 500;
  transition: left var(--transition);
  overflow-y: auto;
  padding-top: 1rem;
}
.site-aside.is-open { left: 0; }
.site-aside nav { padding: 1rem; }
.site-aside nav ul { display: flex; flex-direction: column; gap: 0.25rem; }
.site-aside nav ul li a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--c-text);
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.site-aside nav ul li a:hover,
.site-aside nav ul li a[aria-current="page"] {
  background: var(--c-bg3);
  border-left-color: var(--c-accent);
  color: var(--c-accent);
  opacity: 1;
}

/* ===== 页面包裹 ===== */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 顶部 Header ===== */
.site-header {
  position: sticky;
  top: var(--announce-h);
  z-index: 100;
  background: var(--c-bg2);
  border-bottom: 2px solid var(--c-border);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
.header-right { justify-content: flex-end; }
.header-brand {
  flex: 0 0 auto;
  text-align: center;
}
.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-light);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.brand-logo { height: 36px; width: auto; }
.header-nav-link {
  color: var(--c-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.header-nav-link:hover,
.header-nav-link[aria-current="page"] {
  color: var(--c-accent);
  opacity: 1;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  min-height: 40px;
  min-width: 40px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-light);
  transition: transform var(--transition);
}

/* ===== 锚点条（topic 页） ===== */
.topic-anchor-bar {
  position: sticky;
  top: calc(var(--announce-h) + var(--header-h));
  z-index: 90;
  background: var(--c-bg3);
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
}
.anchor-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0;
}
.anchor-link {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  color: var(--c-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 40px;
  border-right: 1px solid var(--c-border);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.anchor-link:hover { background: var(--c-bg2); color: var(--c-accent); opacity: 1; }

/* ===== 主体布局 ===== */
main {
  flex: 1;
  padding: 2rem 0;
}
main .wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* 内容区 + 右侧aside 的并排布局 */
.page-article .page-wrapper,
.page-topic .page-wrapper,
.page-tag .page-wrapper,
.page-about .page-wrapper,
.page-privacy .page-wrapper,
.page-default .page-wrapper {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "header header"
    "anchor anchor"
    "main aside"
    "footer footer";
  min-height: 100vh;
}
.page-home .page-wrapper {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header header"
    "main aside"
    "footer footer";
  min-height: 100vh;
}
.site-header { grid-area: header; }
.topic-anchor-bar { grid-area: anchor; }
main { grid-area: main; }
.content-aside { grid-area: aside; }
.site-footer { grid-area: footer; }

/* ===== 右侧 aside ===== */
.content-aside {
  background: var(--c-bg2);
  border-left: 2px solid var(--c-border);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: calc(var(--announce-h) + var(--header-h));
  align-self: start;
  max-height: calc(100vh - var(--announce-h) - var(--header-h));
  overflow-y: auto;
}
.content-aside nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.content-aside nav ul li a {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--c-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.content-aside nav ul li a:hover {
  background: var(--c-bg3);
  border-left-color: var(--c-accent);
  color: var(--c-text);
  opacity: 1;
}
.aside-block { display: flex; flex-direction: column; gap: 0.75rem; }
.aside-cta {
  display: block;
  background: var(--c-bg3);
  color: var(--c-text);
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 3px solid var(--c-accent);
  transition: background var(--transition);
  min-height: 40px;
  line-height: 1.5;
  display: flex;
  align-items: center;
}
.aside-cta:hover { background: var(--c-bg2); opacity: 1; color: var(--c-accent); }

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-accent); opacity: 1; }
.breadcrumb span { color: var(--c-text-muted); }

/* ===== section-eyebrow ===== */
.section-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 0.25rem;
}

/* ===== 首页 Hero ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-article { width: 100%; }
.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 4rem 0 2rem;
}
.hero-media {
  flex: 1;
  min-width: 0;
}
.hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.hero-text {
  flex: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
}
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  text-transform: uppercase;
}
.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-light);
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--c-text-muted);
  max-width: 420px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.page-content-body {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--c-border);
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--c-accent);
  color: var(--c-light);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  min-height: 44px;
  letter-spacing: 0.03em;
  transition: background var(--transition);
}
.btn-primary:hover { background: #c73650; opacity: 1; color: var(--c-light); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--c-text);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  min-height: 44px;
  border: 2px solid var(--c-border);
  letter-spacing: 0.03em;
  transition: border-color var(--transition), color var(--transition);
}
.btn-secondary:hover { border-color: var(--c-accent); color: var(--c-accent); opacity: 1; }

/* ===== 首页功能卡片 ===== */
.features-section { display: flex; flex-direction: column; gap: 1.25rem; }
.features-section h2 { font-size: 1.75rem; font-weight: 700; color: var(--c-light); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
}
.feature-card {
  background: var(--c-card-bg);
  transition: background var(--transition);
}
.feature-card:hover { background: var(--c-bg3); }
.feature-card a {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  color: var(--c-text);
  min-height: 160px;
}
.feature-card a:hover { opacity: 1; }
.card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  text-transform: uppercase;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-light);
  line-height: 1.4;
}
.feature-card p {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  flex: 1;
}
.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-accent);
  margin-top: auto;
}

/* ===== 首页文章列表 ===== */
.recent-section { display: flex; flex-direction: column; gap: 1.25rem; }
.recent-section h2 { font-size: 1.75rem; font-weight: 700; color: var(--c-light); }
.article-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--c-border); }
.article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--c-border);
  transition: background var(--transition);
}
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: var(--c-card-bg); }
.article-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--c-text);
  flex: 1;
  min-width: 0;
}
.article-item a:hover { opacity: 1; color: var(--c-accent); }
.item-dot {
  width: 6px;
  height: 6px;
  background: var(--c-accent);
  flex-shrink: 0;
}
.item-title {
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-date {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== 标签组件 ===== */
.tag-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  background: var(--c-bg3);
  color: var(--c-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--c-border);
  min-height: 32px;
  transition: background var(--transition), color var(--transition);
}
.tag-pill:hover { background: var(--c-accent); color: var(--c-light); border-color: var(--c-accent); opacity: 1; }

/* ===== Topic 页 ===== */
.topic-hero {
  padding: 2rem 0 1rem;
  border-bottom: 2px solid var(--c-accent);
}
.topic-intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--c-light);
  line-height: 1.25;
  margin-bottom: 1rem;
}
.topic-desc {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: var(--content-w);
  line-height: 1.75;
}
.update-time {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.825rem;
  color: var(--c-text-muted);
  background: var(--c-bg3);
  padding: 0.25rem 0.75rem;
  border-left: 3px solid var(--c-accent);
}
.topic-content-section {}
.topic-body {
  max-width: var(--content-w);
  line-height: 1.8;
  font-size: 1rem;
}

/* 子页列表 dl */
.child-pages-section { display: flex; flex-direction: column; gap: 1.25rem; }
.child-pages-section h2 { font-size: 1.5rem; font-weight: 700; color: var(--c-light); }
.child-page-list { display: flex; flex-direction: column; gap: 0; }
.child-page-list dt {
  margin-top: 0;
  border-top: 1px solid var(--c-border);
}
.child-page-list dt:first-of-type { border-top: 2px solid var(--c-accent); }
.child-page-list dt a {
  display: block;
  padding: 0.875rem 1rem 0.25rem;
  color: var(--c-light);
  font-size: 1rem;
  font-weight: 600;
  transition: color var(--transition);
}
.child-page-list dt a:hover { color: var(--c-accent); opacity: 1; }
.child-page-list dd {
  padding: 0.25rem 1rem 0.875rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.child-desc {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  flex: 1;
}
.child-page-list dd time {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Article 页 ===== */
.article-section {}
.article-main { max-width: var(--content-w); }
.article-hero-wrap {
  width: 100%;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--c-border);
  padding-bottom: 0;
}
.article-hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.article-header {
  padding: 1.5rem 0 1.5rem;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: 2rem;
}
.article-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--c-light);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.article-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.article-meta time {
  font-size: 0.825rem;
  color: var(--c-text-muted);
  background: var(--c-bg3);
  padding: 0.2rem 0.6rem;
  border-left: 2px solid var(--c-accent);
}
.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--c-text);
}
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-light);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-light);
  margin: 2rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-body li {
  list-style: disc;
  margin-bottom: 0.5rem;
  line-height: 1.75;
}
.article-body ol li { list-style: decimal; }
.article-body blockquote {
  border-left: 4px solid var(--c-accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: var(--c-card-bg);
  color: var(--c-text-muted);
  font-size: 0.95rem;
}
.article-body strong { color: var(--c-light); font-weight: 700; }
.article-body a { color: var(--c-accent); text-decoration: underline; }
.article-body code {
  background: var(--c-bg3);
  padding: 0.1em 0.4em;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}
.article-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}
.back-link {
  color: var(--c-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.back-link:hover { color: var(--c-accent); opacity: 1; }

/* ===== 相关文章 ===== */
.related-section { display: flex; flex-direction: column; gap: 1rem; }
.related-section h2 { font-size: 1.25rem; font-weight: 700; color: var(--c-light); }
.related-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--c-border); }
.related-list li { border-bottom: 1px solid var(--c-border); }
.related-list li:last-child { border-bottom: none; }
.related-list li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--c-text);
  font-size: 0.9rem;
  min-height: 44px;
  transition: background var(--transition), color var(--transition);
}
.related-list li a::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--c-accent);
  margin-right: 0.75rem;
  flex-shrink: 0;
}
.related-list li a:hover { background: var(--c-card-bg); color: var(--c-accent); opacity: 1; }

/* ===== About / Privacy ===== */
.about-section, .privacy-section { padding: 1rem 0; }
.about-article, .privacy-article {
  max-width: var(--content-w);
}
.about-header, .privacy-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--c-accent);
}
.about-header h1, .privacy-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--c-light);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.about-lead, .privacy-lead {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  line-height: 1.75;
}
.privacy-header time {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.825rem;
  color: var(--c-text-muted);
  background: var(--c-bg3);
  padding: 0.2rem 0.6rem;
  border-left: 2px solid var(--c-accent);
}
.about-body, .privacy-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--c-text);
  margin-bottom: 2.5rem;
}
.legal-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-light);
  margin: 2rem 0 0.75rem;
}
.legal-body p { margin-bottom: 1.25rem; }
.legal-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.legal-body ul li { list-style: disc; margin-bottom: 0.4rem; }
.about-links, .privacy-nav { margin-top: 2rem; }
.about-links h2, .privacy-nav h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-light);
  margin-bottom: 1rem;
}
.about-nav-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--c-border); }
.about-nav-list li { border-bottom: 1px solid var(--c-border); }
.about-nav-list li:last-child { border-bottom: none; }
.about-nav-list li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--c-text);
  font-size: 0.9rem;
  min-height: 44px;
  border-left: 3px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.about-nav-list li a:hover {
  background: var(--c-card-bg);
  border-left-color: var(--c-accent);
  color: var(--c-accent);
  opacity: 1;
}

/* ===== Tag 页 ===== */
.tag-header-section {
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--c-accent);
}
.tag-intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--c-light);
  margin-bottom: 0.75rem;
}
.tag-content-section { }
.tag-body {
  font-size: 1rem;
  line-height: 1.85;
  max-width: var(--content-w);
}
.tag-list-section { display: flex; flex-direction: column; gap: 1.25rem; }
.tag-list-section h2 { font-size: 1.5rem; font-weight: 700; color: var(--c-light); }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-bg2);
  border-top: 2px solid var(--c-border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.footer-cta {
  font-size: 0.95rem;
  color: var(--c-text-muted);
}
.footer-cta a {
  color: var(--c-accent);
  font-weight: 600;
  margin: 0 0.25rem;
}
.site-footer small {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.site-footer small a {
  color: var(--c-text-muted);
  margin: 0 0.3rem;
}
.site-footer small a:hover { color: var(--c-accent); opacity: 1; }

/* ===== 通用正文内容样式（page.content 注入） ===== */
.page-content-body h2,
.topic-body h2,
.article-body h2,
.about-body h2,
.privacy-body h2,
.tag-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-light);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}
.page-content-body h3,
.topic-body h3,
.tag-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-light);
  margin: 2rem 0 0.75rem;
}
.page-content-body p,
.topic-body p,
.tag-body p {
  margin-bottom: 1.25rem;
}
.page-content-body a,
.topic-body a,
.tag-body a { color: var(--c-accent); text-decoration: underline; }
.page-content-body ul,
.topic-body ul,
.tag-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.page-content-body li,
.topic-body li,
.tag-body li { list-style: disc; margin-bottom: 0.4rem; }

/* ===== Default 页 ===== */
.default-section {}
.default-article { max-width: var(--content-w); }
.default-article h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--c-light);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--c-accent);
}
.default-body {
  font-size: 1rem;
  line-height: 1.85;
}

/* ===== Overlay ===== */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
}
.nav-overlay.is-active { display: block; }

/* ===== Scroll Reveal 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .feature-card,
  .article-item,
  .child-page-list dt,
  .related-list li {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 200ms ease, transform 200ms ease;
  }
  .feature-card.revealed,
  .article-item.revealed,
  .child-page-list dt.revealed,
  .related-list li.revealed {
    opacity: 1;
    transform: none;
  }
  .feature-card:nth-child(1) { transition-delay: 0ms; }
  .feature-card:nth-child(2) { transition-delay: 60ms; }
  .feature-card:nth-child(3) { transition-delay: 120ms; }
  .feature-card:nth-child(4) { transition-delay: 180ms; }
  .article-item:nth-child(1),
  .child-page-list dt:nth-child(odd),
  .related-list li:nth-child(1) { transition-delay: 0ms; }
  .article-item:nth-child(2),
  .related-list li:nth-child(2) { transition-delay: 50ms; }
  .article-item:nth-child(3),
  .related-list li:nth-child(3) { transition-delay: 100ms; }
  .article-item:nth-child(n+4) { transition-delay: 150ms; }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .page-article .page-wrapper,
  .page-topic .page-wrapper,
  .page-tag .page-wrapper,
  .page-about .page-wrapper,
  .page-privacy .page-wrapper,
  .page-default .page-wrapper,
  .page-home .page-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "anchor"
      "main"
      "aside"
      "footer";
  }
  .content-aside {
    position: static;
    max-height: none;
    border-left: none;
    border-top: 2px solid var(--c-border);
    padding: 1.5rem;
  }
  .hero-content {
    flex-direction: column;
    padding: 2rem 0 1rem;
    gap: 1.5rem;
  }
  .hero-text {
    text-align: left;
    align-items: flex-start;
  }
  .hero-actions { justify-content: flex-start; }
  .features-grid { grid-template-columns: 1fr; }
  .header-left, .header-right { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { justify-content: space-between; }
  .header-brand { flex: 1; text-align: center; }
}

@media (max-width: 600px) {
  :root { --header-h: 52px; --announce-h: 32px; }
  main .wrap { padding: 0 1rem; gap: 2rem; }
  .hero-text h1 { font-size: 1.75rem; }
  .btn-primary, .btn-secondary { padding: 0.75rem 1.25rem; font-size: 0.9rem; }
  .feature-card a { min-height: 120px; padding: 1rem; }
  .child-page-list dd { flex-direction: column; gap: 0.25rem; }
  .article-header h1 { font-size: 1.4rem; }
  .article-meta { gap: 0.5rem; }
  .site-footer { padding: 1rem; }
  .content-aside { padding: 1rem; }
  .topic-anchor-bar .anchor-inner { padding: 0 1rem; }
  .anchor-link { padding: 0.6rem 0.75rem; font-size: 0.8rem; }
}

@media (min-width: 901px) {
  .page-topic .page-wrapper {
    grid-template-areas:
      "header header"
      "anchor anchor"
      "main aside"
      "footer footer";
  }
}
