/* BabiaHub — Next.js 风格极简文档站 */

:root {
  --bg: #fff;
  --bg-alt: #fafafa;
  --bg-code: #0a0a0a;
  --bg-inline-code: #f4f4f5;
  --fg: #0a0a0a;
  --fg-soft: #525252;
  --fg-mute: #a3a3a3;
  --border: #e5e5e5;
  --border-soft: #f0f0f0;
  --accent: #0070f3;
  --accent-hover: #0058c8;
  --accent-bg: #e7f1ff;
  --warn-bg: #fff8e6;
  --warn-fg: #92400e;
  --max-content: 760px;
  --sidebar-w: 260px;
  --toc-w: 230px;
  --header-h: 56px;
  --radius-sm: 4px;
  --radius: 6px;
  --shadow: 0 0 0 1px rgba(0,0,0,0.04);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
/* 正文链接保留 underline 视觉，由 .article-body a 自身管控 */
img, svg { max-width: 100%; vertical-align: middle; }
button { font-family: inherit; }

/* === Header === */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 24px;
  height: var(--header-h);
  display: flex; align-items: center; gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--fg); font-weight: 600; font-size: 16px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-icon { display: block; }
.brand-text { letter-spacing: -0.01em; }
.brand-tag {
  font-size: 11px; font-weight: 500;
  padding: 2px 6px; border-radius: 3px;
  background: var(--bg-inline-code); color: var(--fg-soft);
  border: 1px solid var(--border);
  margin-left: 4px;
}
.nav-primary {
  display: flex; align-items: center; gap: 4px;
  margin-right: auto;
}
.nav-primary a {
  color: var(--fg); font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: var(--radius-sm);
  text-decoration: none;
}
.nav-primary a:hover { background: var(--bg-inline-code); color: var(--fg); }
.header-tools { display: flex; align-items: center; gap: 12px; }
.search-mini {
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 8px 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-alt); color: var(--fg-soft);
  min-width: 220px;
}
.search-mini-icon { color: var(--fg-mute); flex-shrink: 0; }
.search-mini input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 13px; color: var(--fg); font-family: inherit;
}
.search-mini input::placeholder { color: var(--fg-mute); }
.search-mini kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--fg-soft);
}
.lang-switch { display: flex; gap: 1px; }
.lang-switch a {
  font-size: 11px; font-weight: 600;
  padding: 4px 6px; border-radius: 3px;
  color: var(--fg-mute); text-decoration: none;
  letter-spacing: 0.02em;
}
.lang-switch a:hover { color: var(--fg); background: var(--bg-inline-code); }
.lang-switch a.active { color: var(--fg); background: var(--bg-inline-code); }

/* === Hero === */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 80px 24px 100px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}
.hero-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--fg-soft); background: #fff;
  margin-bottom: 18px;
}
.hero-title {
  font-size: 46px; line-height: 1.1; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 18px;
}
.hero-subtitle {
  font-size: 18px; line-height: 1.6;
  color: var(--fg-soft); margin: 0 auto 32px;
  max-width: 600px;
}
.hero-search {
  display: flex; align-items: center; gap: 8px;
  max-width: 520px; margin: 0 auto 24px;
  height: 46px; padding: 0 14px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}
.hero-search-icon { color: var(--fg-mute); flex-shrink: 0; }
.hero-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 15px; color: var(--fg); font-family: inherit;
}
.hero-search input::placeholder { color: var(--fg-mute); }
.hero-search kbd {
  font-family: var(--font-mono); font-size: 12px;
  padding: 2px 6px; border-radius: 3px;
  background: var(--bg-inline-code); border: 1px solid var(--border);
  color: var(--fg-soft);
}
.hero-actions { display: flex; gap: 10px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 18px;
  font-size: 14px; font-weight: 500;
  border-radius: 6px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s;
}
.btn-primary {
  background: var(--fg); color: #fff;
}
.btn-primary:hover { background: #333; text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-inline-code); text-decoration: none; }

/* === Section === */
.section { padding: 72px 24px; border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-head { margin-bottom: 36px; }
.section-head h2 {
  font-size: 30px; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.section-head p { color: var(--fg-soft); font-size: 16px; margin: 0; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 500; color: var(--accent);
  white-space: nowrap;
}

/* === Topic Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.topic-card {
  position: relative;
  display: block; padding: 24px;
  background: #fff; color: var(--fg);
  text-decoration: none;
  transition: background 0.15s;
}
.topic-card:hover { background: var(--bg-alt); text-decoration: none; }
.topic-card-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-inline-code); border-radius: 8px;
  color: var(--fg); margin-bottom: 16px;
}
.topic-card h3 {
  font-size: 16px; font-weight: 600; margin: 0 0 6px;
  color: var(--fg);
}
.topic-card p {
  font-size: 13px; color: var(--fg-soft); margin: 0;
  line-height: 1.55;
  min-height: 40px;
}
.topic-card-arrow {
  position: absolute; top: 24px; right: 24px;
  color: var(--fg-mute);
  opacity: 0; transition: opacity 0.15s;
}
.topic-card:hover .topic-card-arrow { opacity: 1; color: var(--accent); }

/* === Latest list === */
.section-latest { background: var(--bg-alt); }
.post-list {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.post-row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--fg); text-decoration: none;
  transition: background 0.15s;
}
.post-row:last-child { border-bottom: 0; }
.post-row:hover { background: var(--bg-alt); text-decoration: none; }
.post-row-main h3 {
  font-size: 15px; font-weight: 600; margin: 0 0 4px;
  color: var(--fg);
}
.post-row-main p {
  font-size: 13px; color: var(--fg-soft); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.post-row-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.post-date { font-size: 12px; color: var(--fg-mute); font-variant-numeric: tabular-nums; }
.post-tag {
  font-size: 11px; font-weight: 500;
  padding: 2px 7px; border-radius: 3px;
  background: var(--bg-inline-code); color: var(--fg-soft);
  border: 1px solid var(--border);
}

/* === Stats === */
.section-stats { padding: 48px 24px; border-bottom: 1px solid var(--border); }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px;
  text-align: center;
}
.stat-cell { padding: 12px; }
.stat-value {
  font-size: 36px; font-weight: 700; color: var(--fg);
  letter-spacing: -0.02em; line-height: 1;
}
.stat-label { font-size: 13px; color: var(--fg-soft); margin-top: 6px; }

/* === FAQ === */
.section-faq { background: var(--bg-alt); }
.faq-list {
  background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 18px; color: var(--fg-mute); font-weight: 400;
}
.faq-item[open] summary::after { content: '−'; }
.faq-answer {
  padding: 0 24px 16px; color: var(--fg-soft); font-size: 14px; line-height: 1.7;
}

/* === Docs Shell (3-col layout) === */
.docs-shell {
  max-width: 1400px; margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 40px;
  align-items: flex-start;
}

/* Sidebar */
.doc-sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 24px 0 32px;
  font-size: 13.5px;
}
.sidebar-inner { padding-right: 12px; }
.sidebar-chip-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.sidebar-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff;
}
.chip-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--bg-inline-code); border-radius: 4px; color: var(--fg);
}
.chip-body { line-height: 1.3; }
.chip-label { font-size: 11px; color: var(--fg-mute); }
.chip-value { font-size: 13px; font-weight: 500; color: var(--fg); }

.sidebar-section { margin-bottom: 24px; }
.sidebar-section-title {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--fg);
  margin: 0 0 8px; padding: 0 8px;
  text-decoration: none;
}
.sidebar-section-title:hover { color: var(--accent); text-decoration: none; }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { line-height: 1.4; }
.sidebar-list a {
  display: block;
  padding: 5px 8px;
  font-size: 13px; color: var(--fg-soft);
  border-radius: 4px;
  border-left: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-list a:hover { color: var(--fg); background: var(--bg-inline-code); text-decoration: none; }
.sidebar-list li.active a {
  color: var(--accent); font-weight: 500;
  border-left-color: var(--accent);
  background: var(--accent-bg);
}
.sidebar-list .sidebar-more a {
  color: var(--fg-mute); font-size: 12px; padding: 4px 8px;
}
.sidebar-list .sidebar-more a:hover { color: var(--accent); background: transparent; }
.sidebar-list .sidebar-more .chev { display: inline-block; vertical-align: middle; margin-left: 2px; }

/* Article (middle column) */
.doc-article { padding: 40px 0 80px; min-width: 0; }
.page-article, .tag-article { padding-top: 32px; }
.breadcrumb { margin-bottom: 20px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { font-size: 12.5px; color: var(--fg-mute); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 8px; color: var(--border); }
.breadcrumb a { color: var(--fg-soft); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li[aria-current="page"] { color: var(--fg); }

.article-header { margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.article-header h1 {
  font-size: 36px; font-weight: 700; letter-spacing: -0.015em;
  margin: 0 0 10px; line-height: 1.2;
}
.article-subtitle {
  font-size: 16px; color: var(--fg-soft); margin: 0 0 12px;
}
.article-meta {
  font-size: 12.5px; color: var(--fg-mute); margin: 0;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.meta-sep { color: var(--border); }
.meta-cat { color: var(--accent); }
.article-body {
  font-size: 15.5px; line-height: 1.75; color: var(--fg);
  max-width: var(--max-content);
}
.article-body > * { max-width: 100%; }
.article-body h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.005em;
  margin: 44px 0 14px; padding-top: 6px;
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-size: 18.5px; font-weight: 600;
  margin: 32px 0 10px;
  scroll-margin-top: 80px;
}
.article-body h4 {
  font-size: 15.5px; font-weight: 600; margin: 24px 0 8px;
}
.article-body p { margin: 14px 0; }
.article-body ul, .article-body ol { margin: 14px 0; padding-left: 24px; }
.article-body li { margin: 4px 0; }
.article-body strong { font-weight: 600; color: var(--fg); }
.article-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-hover); }
/* 列表/卡片类容器内的 <a> 不显示下划线（覆盖 .article-body a 的默认 underline） */
.topic-list a, .topic-list a:hover,
.post-list a, .post-list a:hover,
.cat-grid a, .cat-grid a:hover,
.card-grid a, .card-grid a:hover,
.article-body .topic-row, .article-body .topic-row:hover,
.article-body .topic-card, .article-body .topic-card:hover,
.article-body .post-row, .article-body .post-row:hover,
.article-body .cat-card, .article-body .cat-card:hover {
  text-decoration: none;
}
.article-body blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--fg);
}
.article-body blockquote p { margin: 6px 0; }
.article-body code {
  font-family: var(--font-mono); font-size: 0.88em;
  padding: 2px 6px; border-radius: 4px;
  background: var(--bg-inline-code);
  color: var(--fg);
  border: 1px solid var(--border-soft);
}
.article-body pre {
  margin: 20px 0;
  background: var(--bg-code);
  border: 1px solid #1f1f1f; border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono); font-size: 13.5px;
  line-height: 1.6;
  color: #e5e5e5;
}
.article-body pre code {
  font-family: inherit; font-size: inherit;
  padding: 0; background: transparent; border: 0; color: inherit;
}
.article-body table {
  width: 100%; border-collapse: collapse;
  margin: 20px 0; font-size: 14px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.article-body th, .article-body td {
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.article-body th { background: var(--bg-alt); font-weight: 600; font-size: 13px; }
.article-body tr:last-child td { border-bottom: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }

/* Inline callout-style (when QA pattern in markdown wraps with strong) */
.article-body p > strong:first-child:only-child { display: block; margin: 12px 0 0; }

/* TOC */
.doc-toc {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  padding: 40px 0;
  font-size: 13px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.toc-title {
  font-size: 12px; font-weight: 600; color: var(--fg);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin: 0 0 12px; padding: 0 12px;
}
.toc-list { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.toc-list li { line-height: 1.4; }
.toc-list a {
  display: block; padding: 5px 12px;
  margin-left: -1px;
  font-size: 13px; color: var(--fg-soft);
  border-left: 1px solid transparent;
  text-decoration: none;
}
.toc-list a:hover { color: var(--fg); text-decoration: none; }
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.toc-list .toc-l3 a { padding-left: 24px; font-size: 12.5px; }
.toc-edit {
  display: inline-block; margin: 16px 12px 0;
  font-size: 12.5px; color: var(--fg-soft);
}

/* Prev/Next */
.prev-next {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
  max-width: var(--max-content);
}
.prev-next-slot { min-height: 1px; }
.prev-next-slot.next { text-align: right; }
.pn-link {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--fg);
  transition: background 0.15s;
}
.pn-link:hover { background: var(--bg-alt); border-color: var(--fg-mute); text-decoration: none; }
.pn-link.right { align-items: flex-end; }
.pn-label { font-size: 12px; color: var(--fg-mute); display: inline-flex; align-items: center; gap: 4px; }
.pn-title { font-size: 14px; font-weight: 600; color: var(--fg); }

/* Topic list (列表页) */
.topic-list {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  max-width: var(--max-content);
}
.topic-row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--fg); text-decoration: none;
  transition: background 0.15s;
}
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: var(--bg-alt); text-decoration: none; }
.topic-row-main { min-width: 0; }
.topic-row h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: var(--fg); }
.topic-row p {
  font-size: 13px; color: var(--fg-soft); margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.topic-row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topic-row-meta span:first-child { font-size: 12px; color: var(--fg-mute); font-variant-numeric: tabular-nums; }
.topic-row-arrow { color: var(--fg-mute); flex-shrink: 0; }
.topic-row:hover .topic-row-arrow { color: var(--accent); }

/* Category index grid */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  max-width: var(--max-content);
}
.cat-card {
  display: block; padding: 22px;
  background: #fff; color: var(--fg);
  text-decoration: none;
  transition: background 0.15s;
}
.cat-card:hover { background: var(--bg-alt); text-decoration: none; }
.cat-card-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-inline-code); border-radius: 6px;
  margin-bottom: 12px;
}
.cat-card h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: var(--fg); }
.cat-card p { font-size: 13px; color: var(--fg-soft); margin: 0 0 10px; line-height: 1.5; min-height: 38px; }
.cat-card-count { font-size: 11px; color: var(--fg-mute); }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px;
  max-width: var(--max-content);
}
.pg-prev, .pg-next {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--fg); text-decoration: none;
}
.pg-prev:hover, .pg-next:hover { background: var(--bg-alt); text-decoration: none; }
.pg-prev.disabled, .pg-next.disabled { color: var(--fg-mute); cursor: not-allowed; }
.pg-nums { display: flex; gap: 2px; list-style: none; padding: 0; margin: 0; }
.pg-nums li a {
  display: inline-block; min-width: 32px; text-align: center;
  padding: 5px 10px; font-size: 13px;
  color: var(--fg-soft); border-radius: var(--radius-sm); text-decoration: none;
}
.pg-nums li a:hover { background: var(--bg-alt); color: var(--fg); }
.pg-nums li.active a { background: var(--fg); color: #fff; }

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fafafa;
  padding: 48px 24px 24px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 16px;
  margin-bottom: 32px;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.footer-col h4 {
  font-size: 13px; font-weight: 600;
  color: var(--fg); margin: 0 0 12px;
}
.footer-col a {
  display: block;
  font-size: 13px; color: var(--fg-soft);
  text-decoration: none; padding: 3px 0;
}
.footer-col a:hover { color: var(--fg); }
.footer-col a.active { color: var(--fg); font-weight: 500; }
.footer-bottom { padding-top: 20px; }
.footer-risk {
  font-size: 12px; color: var(--fg-mute); margin: 0 0 8px;
  line-height: 1.6;
}
.footer-copy { font-size: 12px; color: var(--fg-mute); margin: 0; }

/* === 404 === */
.error-page {
  min-height: 60vh; display: flex; align-items: center; justify-content: center;
  padding: 80px 24px;
}
.error-inner { text-align: center; max-width: 440px; }
.error-code {
  font-family: var(--font-mono); font-size: 96px; font-weight: 700;
  color: var(--fg-mute); line-height: 1; margin-bottom: 16px;
}
.error-page h1 { font-size: 28px; font-weight: 700; margin: 0 0 12px; }
.error-page p { color: var(--fg-soft); margin: 0 0 24px; }
.error-actions { display: flex; gap: 10px; justify-content: center; }

/* === Page-specific === */
.page-article .article-body h2 { margin-top: 36px; }
.callout {
  margin: 18px 0; padding: 14px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-alt);
}
.callout-warn {
  border-color: #fbbf24; background: var(--warn-bg); color: var(--warn-fg);
}
.callout-warn strong { color: var(--warn-fg); }

/* Steps (ol with custom marker for download/about pages) */
.steps {
  list-style: none; counter-reset: step; padding: 0; margin: 18px 0;
}
.steps > li {
  counter-increment: step; position: relative;
  padding: 14px 18px 14px 56px;
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px;
  background: #fff;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 18px; top: 14px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--fg); color: #fff;
  border-radius: 50%;
  font-size: 13px; font-weight: 600;
  font-family: var(--font-mono);
}

/* === Responsive === */
@media (max-width: 1100px) {
  .docs-shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: 32px; }
  .doc-toc { display: none; }
}
@media (max-width: 880px) {
  .nav-primary { display: none; }
  .search-mini { min-width: 160px; }
  .search-mini kbd { display: none; }
}
@media (max-width: 768px) {
  .docs-shell { grid-template-columns: 1fr; }
  .doc-sidebar {
    position: relative; top: 0; height: auto;
    border-bottom: 1px solid var(--border); padding-bottom: 16px;
  }
  .sidebar-inner { padding-right: 0; }
  .hero { padding: 56px 24px 64px; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }
  .section { padding: 48px 20px; }
  .section-head h2 { font-size: 24px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .article-header h1 { font-size: 26px; }
  .post-row, .topic-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .post-row-meta, .topic-row-meta { width: 100%; }
  .prev-next { grid-template-columns: 1fr; }
  .lang-switch a:nth-child(n+4) { display: none; }
}
