/* 一脉众谱 — 知识页面共享设计系统 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #8B4513;
  --primary-dark: #6B3410;
  --primary-light: #A0522D;
  --accent: #D2691E;
  --bg: #FFF8F0;
  --bg-card: #FFFFFF;
  --bg-muted: #F5EFE6;
  --border: #E8DDD0;
  --text: #2D1B0E;
  --text-secondary: #5C4A3A;
  --text-muted: #8B7B6B;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(139,69,19,0.06);
  --shadow-md: 0 4px 20px rgba(139,69,19,0.08);
  --shadow-lg: 0 8px 40px rgba(139,69,19,0.12);
  --transition: 200ms ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(74,37,8,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(210,105,30,0.2);
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 4px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.nav-links a:hover { color: #fff; }

/* ===== Section Common ===== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 3px;
  font-weight: 600;
  margin-bottom: 12px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

.section-divider {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ===== Page Hero ===== */
.page-hero {
  background: linear-gradient(160deg, #3D1C06 0%, var(--primary-dark) 20%, var(--primary) 50%, var(--primary-light) 75%, var(--accent) 100%);
  color: #fff;
  padding: 100px 40px 80px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 20% 40%, rgba(255,255,255,0.05), transparent),
    radial-gradient(ellipse 600px 400px at 80% 60%, rgba(210,105,30,0.1), transparent);
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.page-hero-tag {
  display: inline-block;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.page-hero-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 6px;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.page-hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Article Hero ===== */
.article-hero {
  background: linear-gradient(160deg, #3D1C06 0%, var(--primary-dark) 40%, var(--primary) 100%);
  color: #fff;
  padding: 100px 40px 60px;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 600px 300px at 50% 50%, rgba(210,105,30,0.1), transparent);
}

.article-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 50px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.article-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.article-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 20px;
}

.article-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.article-summary {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}

/* ===== Breadcrumb ===== */
.breadcrumb-bar {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== Article Content ===== */
.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 40px 72px;
}

.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin: 36px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 12px;
}

.article-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 16px;
  text-indent: 2em;
}

.article-content ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.article-content ul li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 2;
  padding-left: 24px;
  position: relative;
}

.article-content ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.article-content ol {
  padding-left: 24px;
  margin: 16px 0;
}

.article-content ol li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 4px;
}

.article-content strong {
  color: var(--primary);
  font-weight: 600;
}

.article-content blockquote {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--bg-muted);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content blockquote p {
  font-size: 14px;
  color: var(--text-secondary);
  text-indent: 0;
  line-height: 1.8;
  margin-bottom: 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.article-content th {
  background: var(--bg-muted);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
}

.article-content td {
  padding: 10px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.article-content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ===== Related Articles ===== */
.related-section {
  background: var(--bg-muted);
  padding: 56px 40px;
}

.related-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.related-card .related-icon {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

.related-card .related-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* ===== Knowledge List Page Cards ===== */
.group-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 48px;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.group-icon {
  font-size: 24px;
}

.group-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.list-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
  display: block;
}

.list-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.list-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.list-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.list-card-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(160deg, #2D1506 0%, var(--primary-dark) 100%);
  color: rgba(255, 255, 255, 0.5);
  padding: 48px 40px 36px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(210,105,30,0.4), transparent);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col p, .footer-col a {
  font-size: 13px;
  line-height: 2;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col a:hover { color: rgba(255,255,255,0.8); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 2;
}

.icp-number {
  margin-top: 4px;
  font-size: 12px;
}

.icp-number a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color var(--transition);
}

.icp-number a:hover { color: rgba(255,255,255,0.7); }

/* ===== Accessibility ===== */
a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .page-hero { padding: 80px 20px 60px; }
  .page-hero-title { font-size: 30px; letter-spacing: 4px; }
  .article-hero { padding: 80px 20px 50px; }
  .article-title { font-size: 28px; }
  .section { padding: 48px 20px; }
  .section-title { font-size: 26px; }
  .group-section { padding: 0 20px 36px; }
  .list-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .article-body { padding: 24px 20px 48px; }
  .breadcrumb-bar { padding: 16px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .page-hero-title { font-size: 26px; letter-spacing: 3px; }
  .article-title { font-size: 24px; }
  .related-grid { grid-template-columns: 1fr; }
}