/* ============================================================
   BASE — 全局基础样式
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2b2b2b;
  background: #f7f6f2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #3e8e7a;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #e85d7a;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  font-weight: 700;
  color: #2b2b2b;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

p {
  margin-bottom: 0.5em;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* 视觉隐藏，仅用于可访问性 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   LAYOUT — 全站统一布局骨架
   ============================================================ */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  width: 100%;
}

.inner-main {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* 页头 */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e9e6df;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #2b2b2b;
  flex-shrink: 0;
}

.brand-link:hover {
  color: #e85d7a;
}

.brand-name {
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 6px;
  align-items: center;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #2b2b2b;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: block;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  color: #2b2b2b;
  border-radius: 6px;
  line-height: 1.4;
}

.nav-list li a:hover {
  color: #e85d7a;
  background: #f7f6f2;
}

.nav-list li a.is-current {
  color: #e85d7a;
  font-weight: 600;
  background: rgba(232, 93, 122, 0.08);
}

/* 面包屑 */
.breadcrumb {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a {
  color: #3e8e7a;
}

.breadcrumb a:hover {
  color: #e85d7a;
}

.breadcrumb-sep {
  color: #999;
  margin: 0 2px;
}

.breadcrumb-current {
  color: #666;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 页头标题区 */
.page-header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 24px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #2b2b2b;
  line-height: 1.3;
  margin-bottom: 8px;
}

.page-description,
.page-intro {
  font-size: 16px;
  color: #555;
  max-width: 720px;
  line-height: 1.7;
}

.page-header-text {
  flex: 1;
}

.page-header-figure,
.page-header-media {
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #e9e6df;
}

.page-header-figure img,
.page-header-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 页脚 */
.site-footer {
  background: #fff;
  border-top: 1px solid #e9e6df;
  padding: 40px 0 0;
}

.footer-columns {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  color: #2b2b2b;
  margin-bottom: 12px;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links li a {
  font-size: 14px;
  color: #666;
}

.footer-links li a:hover {
  color: #e85d7a;
}

.footer-desc {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}

.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid #e9e6df;
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 13px;
  color: #999;
  margin: 0;
}

/* ============================================================
   COMPONENTS — 通用组件
   ============================================================ */

/* 区块标题 */
.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #2b2b2b;
  margin-bottom: 8px;
}

.section-intro,
.section-lead {
  font-size: 15px;
  color: #666;
  max-width: 680px;
}

/* 徽章 */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.badge-accent {
  background: rgba(232, 93, 122, 0.1);
  color: #e85d7a;
  border: 1px solid rgba(232, 93, 122, 0.3);
}

.badge-mint {
  background: rgba(62, 142, 122, 0.1);
  color: #3e8e7a;
  border: 1px solid rgba(62, 142, 122, 0.3);
}

.badge-neutral {
  background: #e9e6df;
  color: #555;
  border: 1px solid #d8d4cb;
}

/* changelog 列表 */
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.changelog-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e9e6df;
}

.changelog-tag,
.changelog-type {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
  line-height: 1.6;
  margin-top: 2px;
}

.changelog-tag {
  background: rgba(232, 93, 122, 0.1);
  color: #e85d7a;
}

.changelog-type-add {
  background: rgba(62, 142, 122, 0.1);
  color: #3e8e7a;
}

.changelog-type-adjust {
  background: rgba(232, 93, 122, 0.1);
  color: #e85d7a;
}

.changelog-type-doc {
  background: #e9e6df;
  color: #555;
}

.changelog-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

.changelog-content h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.changelog-content p {
  font-size: 14px;
  color: #555;
  margin: 0;
}

/* 代码块 */
.code-block {
  background: #2b2b2b;
  color: #f0ede6;
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono",
    Consolas, monospace;
  font-size: 14px;
  line-height: 1.8;
}

.code-block code {
  font-family: inherit;
  white-space: pre;
}

/* 相关链接 */
.related-links {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e9e6df;
}

.related-links-label {
  font-size: 14px;
  font-weight: 600;
  color: #2b2b2b;
}

.related-links-item {
  font-size: 14px;
  color: #3e8e7a;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 6px;
}

.related-links-item:hover {
  color: #e85d7a;
  border-color: #e85d7a;
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e9e6df;
  background: #fff;
}

.pacing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.pacing-table th,
.pacing-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e9e6df;
  font-size: 14px;
  line-height: 1.6;
}

.pacing-table th {
  background: #f7f6f2;
  font-weight: 600;
  color: #2b2b2b;
}

.pacing-table tr:last-child td {
  border-bottom: none;
}

.table-note {
  font-size: 13px;
  color: #888;
  margin-top: 8px;
}

/* FAQ 折叠项 */
.faq-item {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #2b2b2b;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: #e85d7a;
  flex-shrink: 0;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 18px 14px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   PAGES — 首页
   ============================================================ */
.home-main {
  width: 100%;
}

/* Hero 目录面板 */
.hero-panel {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: #2b2b2b;
  margin-bottom: 8px;
  line-height: 1.3;
}

.hero-lead {
  font-size: 16px;
  color: #666;
  margin-bottom: 24px;
  max-width: 460px;
}

.directory-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.directory-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.directory-item:hover {
  border-color: #e85d7a;
  background: #fff;
}

.directory-name {
  font-size: 15px;
  font-weight: 600;
  color: #2b2b2b;
  flex-shrink: 0;
  min-width: 80px;
}

.directory-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.random-explore {
  display: inline-block;
  padding: 10px 20px;
  background: #e85d7a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s ease;
  min-height: 44px;
}

.random-explore:hover {
  background: #d14e6b;
  color: #fff;
}

.hero-visual {
  border-radius: 8px;
  overflow: hidden;
  background: #e9e6df;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 题材速览 */
.topic-overview {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.topic-card {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.topic-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-color: #d8d4cb;
}

.topic-card-featured {
  grid-column: span 2;
}

.topic-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9e6df;
}

.topic-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topic-card h3 {
  font-size: 18px;
  padding: 16px 16px 4px;
}

.topic-card p {
  font-size: 14px;
  color: #666;
  padding: 0 16px;
  margin-bottom: 12px;
  line-height: 1.6;
  flex: 1;
}

.topic-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 0 16px 16px;
  color: #3e8e7a;
}

.topic-link:hover {
  color: #e85d7a;
}

/* 站务动态 */
.changelog-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px;
}

.more-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #3e8e7a;
}

.more-link:hover {
  color: #e85d7a;
}

/* 阅读路径榜 */
.hot-paths {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px;
}

.paths-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.path-item {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.path-number {
  font-size: 24px;
  font-weight: 700;
  color: #e85d7a;
  line-height: 1.2;
  flex-shrink: 0;
  min-width: 32px;
}

.path-content h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.path-content p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 8px;
}

.path-link {
  font-size: 14px;
  font-weight: 600;
  color: #3e8e7a;
}

.path-link:hover {
  color: #e85d7a;
}

/* 代码示例 */
.code-example {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* 内容理念摘要 */
.philosophy-summary {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.philosophy-summary h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.philosophy-text {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.summary-link {
  font-size: 14px;
  font-weight: 600;
  color: #3e8e7a;
  white-space: nowrap;
  padding: 8px 16px;
  border: 1px solid #3e8e7a;
  border-radius: 6px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.summary-link:hover {
  background: rgba(62, 142, 122, 0.08);
  color: #3e8e7a;
}

/* ============================================================
   PAGES — 题材分类
   ============================================================ */
.layout-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.sidebar-left {
  grid-template-columns: 260px 1fr;
}

.sidebar-left > .topic-tree,
.sidebar-left > .step-nav,
.sidebar-left > .principles-nav {
  grid-column: 1;
}

.sidebar-left > .topic-details,
.sidebar-left > .article-content,
.sidebar-left > .principles-content {
  grid-column: 2;
}

/* 侧栏通用 */
.topic-tree,
.step-nav,
.principles-nav {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 20px;
  position: sticky;
  top: 88px;
}

.aside-title {
  font-size: 16px;
  font-weight: 600;
  color: #2b2b2b;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9e6df;
}

.tree-list li,
.step-nav-list li,
.aside-list li {
  margin-bottom: 4px;
}

.tree-list a,
.step-nav-list a,
.aside-list a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: #444;
  border-radius: 6px;
  line-height: 1.5;
}

.tree-list a:hover,
.step-nav-list a:hover,
.aside-list a:hover {
  background: #f7f6f2;
  color: #e85d7a;
}

/* 题材详情 */
.topic-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.topic-details .topic-card {
  padding: 0;
  overflow: hidden;
}

.topic-header {
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topic-name {
  font-size: 20px;
  font-weight: 700;
  color: #2b2b2b;
}

.topic-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(232, 93, 122, 0.1);
  color: #e85d7a;
}

.topic-feature,
.topic-scene {
  padding: 0 20px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 8px;
}

.topic-adjacent {
  padding: 0 20px;
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

.topic-adjacent a {
  color: #3e8e7a;
  margin-right: 12px;
  display: inline-block;
}

.topic-adjacent a:hover {
  color: #e85d7a;
}

.topic-guide-link {
  display: inline-block;
  margin: 0 20px 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #3e8e7a;
  border: 1px solid #3e8e7a;
  border-radius: 6px;
  min-height: 40px;
  line-height: 1.4;
}

.topic-guide-link:hover {
  background: rgba(62, 142, 122, 0.08);
  color: #3e8e7a;
}

/* 题材配图 */
.topic-visual {
  border-radius: 8px;
  overflow: hidden;
  background: #e9e6df;
}

.topic-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topic-visual figcaption {
  padding: 8px 12px;
  font-size: 13px;
  color: #888;
  background: #fff;
  border: 1px solid #e9e6df;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* 延伸阅读 */
.topic-extras {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 20px;
}

.topic-extras p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

.topic-extras a {
  color: #3e8e7a;
  display: inline-block;
  margin-top: 8px;
}

.topic-extras a:hover {
  color: #e85d7a;
}

/* ============================================================
   PAGES — 阅读指南
   ============================================================ */
.article-content {
  min-width: 0;
}

.site-brand-heading {
  margin-bottom: 0;
}

.content-section {
  margin-bottom: 40px;
}

.section-lead {
  margin-bottom: 20px;
}

.step-block {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e85d7a;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.step-body {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 17px;
  margin-bottom: 6px;
}

.step-text {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 6px;
}

/* 内容配图 */
.content-media {
  border-radius: 8px;
  overflow: hidden;
  background: #e9e6df;
}

.content-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content-media figcaption {
  padding: 8px 12px;
  font-size: 13px;
  color: #888;
  background: #fff;
  border: 1px solid #e9e6df;
  border-top: none;
}

.content-media-inline {
  margin: 24px 0;
}

/* 术语表 */
.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.glossary-item {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 14px 18px;
}

.glossary-term {
  font-size: 15px;
  font-weight: 600;
  color: #2b2b2b;
  margin-bottom: 4px;
}

.glossary-def {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* 自查清单 */
.checklist {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 20px 20px 20px 40px;
}

.checklist-item {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 10px;
  list-style: disc;
}

.checklist-item:last-child {
  margin-bottom: 0;
}

.section-outro {
  margin-top: 20px;
  font-size: 14px;
  color: #555;
}

.section-outro a {
  color: #3e8e7a;
  margin-right: 12px;
  display: inline-block;
}

.section-outro a:hover {
  color: #e85d7a;
}

/* 侧栏附注 */
.aside-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9e6df;
}

.aside-note p {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 8px;
}

.aside-note a {
  font-size: 13px;
  font-weight: 600;
  color: #3e8e7a;
}

.aside-note a:hover {
  color: #e85d7a;
}

/* ============================================================
   PAGES — 内容理念
   ============================================================ */
.page-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.principles-content {
  min-width: 0;
}

.content-block {
  margin-bottom: 40px;
}

.principle-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.principle-item {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 20px;
}

.principle-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.principle-text {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

.boundary-list {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.boundary-item {
  padding-left: 16px;
  border-left: 3px solid #e85d7a;
}

.boundary-title {
  font-size: 15px;
  margin-bottom: 4px;
}

.boundary-text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.relation-text {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 12px;
}

.relation-text a {
  color: #3e8e7a;
  font-weight: 600;
}

.relation-text a:hover {
  color: #e85d7a;
}

/* 侧栏相关 */
.aside-related {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9e6df;
}

.aside-related-title {
  font-size: 14px;
  font-weight: 600;
  color: #2b2b2b;
  margin-bottom: 8px;
}

.aside-related-list li {
  margin-bottom: 4px;
}

.aside-related-list a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: #444;
  border-radius: 6px;
}

.aside-related-list a:hover {
  background: #f7f6f2;
  color: #e85d7a;
}

/* ============================================================
   PAGES — 站务动态
   ============================================================ */
.content-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.update-figure {
  border-radius: 8px;
  overflow: hidden;
  background: #e9e6df;
  margin-bottom: 24px;
}

.update-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.update-figure figcaption {
  padding: 8px 12px;
  font-size: 13px;
  color: #888;
  background: #fff;
  border: 1px solid #e9e6df;
  border-top: none;
}

.status-badges {
  margin-bottom: 32px;
}

.status-badges .section-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.changelog-section .section-title {
  font-size: 18px;
  margin-bottom: 16px;
}

.boundary-tip {
  background: rgba(62, 142, 122, 0.06);
  border: 1px solid rgba(62, 142, 122, 0.3);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 32px;
}

.boundary-tip p {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin: 0;
}

.boundary-tip strong {
  color: #3e8e7a;
}

.boundary-tip a {
  color: #3e8e7a;
  font-weight: 600;
  display: inline-block;
  margin-top: 4px;
}

.boundary-tip a:hover {
  color: #e85d7a;
}

/* ============================================================
   PAGES — 反馈说明
   ============================================================ */
.feedback-steps {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 32px;
}

.feedback-steps h2,
.history-manager h2,
.faq-section h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.steps-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-item {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 20px;
}

.step-item .step-number {
  margin-bottom: 12px;
}

.step-item h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.step-item p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

.steps-note {
  margin-top: 16px;
  font-size: 14px;
  color: #666;
}

.steps-note a {
  color: #3e8e7a;
  font-weight: 600;
}

.steps-note a:hover {
  color: #e85d7a;
}

/* 浏览历史 */
.history-manager {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 32px;
}

.history-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.history-list {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  min-height: 48px;
}

.history-list li {
  font-size: 14px;
  color: #555;
  padding: 6px 0;
  border-bottom: 1px solid #f0eee8;
}

.history-list li:last-child {
  border-bottom: none;
}

.history-empty {
  color: #999;
  font-style: normal;
}

.history-clear-btn {
  padding: 8px 20px;
  background: #fff;
  border: 1px solid #e85d7a;
  color: #e85d7a;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  min-height: 40px;
  transition: background 0.2s ease, color 0.2s ease;
}

.history-clear-btn:hover {
  background: #e85d7a;
  color: #fff;
}

.history-tip {
  font-size: 13px;
  color: #999;
  margin-top: 8px;
}

/* FAQ 区 */
.faq-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.faq-section .faq-item {
  max-width: 720px;
}

/* 反馈页相关链接 */
.related-links p {
  font-size: 14px;
  color: #555;
  margin: 0;
}

.related-links p a {
  color: #3e8e7a;
  margin-right: 12px;
  display: inline-block;
}

.related-links p a:hover {
  color: #e85d7a;
}

/* ============================================================
   PAGES — 404
   ============================================================ */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  min-height: 60vh;
}

.error-content {
  text-align: center;
  max-width: 480px;
}

.error-code {
  font-size: 72px;
  font-weight: 700;
  color: #e85d7a;
  line-height: 1.1;
  margin-bottom: 8px;
}

.error-content h1 {
  font-size: 24px;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: #666;
  margin-bottom: 24px;
}

.error-back {
  display: inline-block;
  padding: 10px 24px;
  background: #e85d7a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  min-height: 44px;
  line-height: 1.4;
}

.error-back:hover {
  background: #d14e6b;
  color: #fff;
}

/* ============================================================
   RESPONSIVE — 响应式适配
   ============================================================ */
@media (max-width: 768px) {
  /* 页头 */
  .header-inner {
    height: 56px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e9e6df;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav:has(.nav-list.is-open) {
    max-height: 400px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 24px 16px;
    gap: 2px;
    display: none;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li a {
    display: block;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 6px;
  }

  /* 面包屑 */
  .breadcrumb {
    padding: 12px 16px 0;
    font-size: 13px;
  }

  /* 页面标题区 */
  .page-header {
    padding: 24px 16px 16px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-description,
  .page-intro {
    font-size: 15px;
  }

  /* 内页主体 */
  .inner-main {
    padding: 0 16px 32px;
  }

  /* 首页 Hero */
  .hero-panel {
    grid-template-columns: 1fr;
    padding: 24px 16px 24px;
    gap: 20px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-visual {
    order: -1;
  }

  .hero-visual img {
    aspect-ratio: 16 / 9;
  }

  .directory-item {
    padding: 10px 12px;
  }

  .directory-name {
    min-width: 64px;
    font-size: 14px;
  }

  .directory-desc {
    font-size: 13px;
  }

  /* 首页区块 */
  .topic-overview,
  .changelog-section,
  .hot-paths,
  .code-example,
  .philosophy-summary {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-card-featured {
    grid-column: auto;
  }

  .paths-list {
    grid-template-columns: 1fr;
  }

  .philosophy-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* 内页侧栏布局 */
  .layout-shell,
  .page-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px 32px;
  }

  .sidebar-left > .topic-details,
  .sidebar-left > .article-content,
  .sidebar-left > .principles-content {
    grid-column: 1;
    grid-row: 1;
  }

  .sidebar-left > .topic-tree,
  .sidebar-left > .step-nav,
  .sidebar-left > .principles-nav {
    grid-column: 1;
    grid-row: 2;
    position: static;
  }

  /* 题材详情 */
  .topic-header {
    padding: 16px 16px 0;
  }

  .topic-feature,
  .topic-scene,
  .topic-adjacent {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topic-guide-link {
    margin-left: 16px;
    margin-right: 16px;
  }

  /* 步骤块 */
  .step-block {
    padding: 16px;
    gap: 12px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* 反馈步骤 */
  .steps-wrapper {
    grid-template-columns: 1fr;
  }

  /* 站务动态 */
  .content-wrapper {
    padding: 0 16px 32px;
  }

  .changelog-item {
    flex-direction: column;
    gap: 6px;
  }

  .changelog-tag,
  .changelog-type {
    align-self: flex-start;
  }

  /* 反馈 */
  .feedback-steps,
  .history-manager,
  .faq-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* 相关链接 */
  .related-links {
    padding: 16px;
  }

  /* 页脚 */
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px;
  }

  .footer-bottom {
    padding: 16px;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .hero-title {
    font-size: 24px;
  }

  .page-title {
    font-size: 24px;
  }

  .topic-grid {
    gap: 16px;
  }

  .paths-list {
    gap: 16px;
  }

  .path-item {
    padding: 16px;
  }

  .code-block {
    padding: 16px;
    font-size: 13px;
  }

  .pacing-table th,
  .pacing-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* 程序验收反馈：修复网格孤项 */
@media (min-width: 769px) {
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 程序验收反馈：移动端正文优先 */
@media (max-width: 768px) {
  .site-main :is(.page-content, .main-content, .content-main) {
    order: 1;
  }

  .site-main :is(aside, .sidebar) {
    order: 2;
  }
}
