/* ============================================================
   sandustry-template · 深色 Wiki 站样式表（零 JS）
   设计系统复刻自 sandustry.wiki（Astro + Tailwind v4 编译产物）
   改 :root 的 --color-brand* / --color-accent* 即可换肤
   ============================================================ */

:root {
  /* 底色与表面 */
  --color-bg: #0c0a08;
  --color-bg-soft: #14110d;
  --color-surface: #1c1812;
  --color-surface-2: #262017;
  --color-border: #3d3426;
  --color-border-soft: #2a241a;
  /* 文字 */
  --color-text: #f4ebe0;
  --color-text-soft: #c9b8a4;
  --color-text-muted: #8a7a66;
  /* 品牌（改这里换肤） */
  --color-brand: #e8a54b;
  --color-brand-strong: #d4892e;
  --color-brand-ink: #1a1005;
  /* 强调 */
  --color-accent: #3d6b8c;
  --color-accent-soft: #6a9bb8;
  --color-gold: #f0c14b;
  /* 字体 */
  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Syne", "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  /* 其他 token */
  --radius-card: 0.85rem;
  --shadow-glow: 0 0 60px -18px rgba(232, 165, 75, 0.18);
  --container: 72rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(48rem 26rem at 85% -6rem, rgba(232, 165, 75, 0.05), transparent 62%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 3px;
}

h1, h2, h3 { margin-top: 0; line-height: 1.15; letter-spacing: -0.02em; }

h1, h2 { font-family: var(--font-display); }

p { margin-top: 0; }

img { max-width: 100%; }

.container-wide {
  width: min(var(--container), calc(100% - 2.4rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: -999px;
  padding: 0.6rem 1rem;
  border-radius: 0 0 0.5rem;
  background: var(--color-brand);
  color: var(--color-brand-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { left: 0; }

/* ============ 顶栏 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  isolation: isolate;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border-soft) 80%, transparent);
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.25rem, 1vw, 0.7rem);
  height: 4.15rem;
}

.header-logo { justify-self: start; display: inline-flex; align-items: center; text-decoration: none; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; }

.logo-mark { flex: none; }

.logo-text { display: flex; flex-direction: column; line-height: 1; }

.logo-text-top {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.logo-text-sub {
  margin-top: 0.28rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--color-text-muted);
}

/* —— 桌面导航（≥901px 显示）—— */
.desktop-nav { display: none; justify-self: end; min-width: 0; }

.nav-list { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 0; margin: 0; padding: 0; list-style: none; }

.nav-item { position: relative; flex: none; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  height: 2.4rem;
  padding: 0 clamp(0.18rem, 0.4vw, 0.4rem);
  border-radius: 0.55rem;
  color: var(--color-text-soft);
  font-weight: 600;
  font-size: clamp(0.85rem, 0.95vw, 1.02rem);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover,
.nav-link.active { color: var(--color-text); background: var(--color-surface-2); }

.caret { flex: none; opacity: 0.7; transition: transform 0.18s ease; }

.nav-item-dd:hover .caret,
.nav-item-dd:focus-within .caret { transform: rotate(180deg); }

/* 下拉面板：hover 或键盘聚焦时显示（纯 CSS） */
.nav-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  --panel-x: -50%;
  width: max-content;
  min-width: 17.5rem;
  max-width: min(22rem, calc(100vw - 1rem));
  padding-top: 0.7rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(var(--panel-x), 6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 220;
}

.nav-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 0.7rem; }

.nav-item-dd:hover .nav-panel,
.nav-item-dd:focus-within .nav-panel,
.nav-item-dd.is-open .nav-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(var(--panel-x));
}

.panel-inner {
  position: relative;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  padding: 0.45rem;
  border: 1px solid var(--color-border);
  border-radius: 0.85rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 92%, #fff 4%), var(--color-surface));
  box-shadow: 0 18px 48px -22px rgba(0, 0, 0, 0.75), var(--shadow-glow);
}

.panel-list { display: flex; flex-direction: column; gap: 0.1rem; margin: 0; padding: 0; list-style: none; }

.panel-link {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  text-decoration: none;
  transition: background-color 0.14s ease;
}

.panel-link:hover { background: var(--color-surface-2); }

.panel-label { font-size: 0.92rem; font-weight: 600; color: var(--color-text); }

.panel-link:hover .panel-label { color: var(--color-brand); }

.panel-link-all { border-top: 1px solid var(--color-border-soft); margin-top: 0.15rem; padding-top: 0.65rem; }

.panel-link-all .panel-label { color: var(--color-brand); }

.panel-desc { font-size: 0.78rem; color: var(--color-text-muted); line-height: 1.45; }

/* —— 右侧工具区 —— */
.header-right { justify-self: end; display: flex; align-items: center; gap: 0.55rem; }

.lang { position: relative; }

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  height: 2.4rem;
  padding: 0 0.6rem;
  border-radius: 0.55rem;
  color: var(--color-text-soft);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.lang-current:hover { color: var(--color-text); background: var(--color-surface-2); }

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 8rem;
  padding: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-surface);
  box-shadow: 0 18px 48px -22px rgba(0, 0, 0, 0.75);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.lang:hover .lang-menu,
.lang:focus-within .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.lang-menu a {
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  color: var(--color-text-soft);
  font-size: 0.85rem;
  text-decoration: none;
}

.lang-menu a:hover { color: var(--color-brand); background: var(--color-surface-2); }

/* 汉堡按钮（≤900px 显示） */
.hamburger { display: none; }

.mobile-menu-wrap { position: relative; }

.mobile-menu-wrap > summary {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: 0.6rem;
  background: var(--color-surface-2);
  cursor: pointer;
  list-style: none;
}

.mobile-menu-wrap > summary::-webkit-details-marker { display: none; }

.mobile-menu-wrap > summary span { display: block; height: 2px; border-radius: 2px; background: var(--color-text-soft); }

.mobile-menu-wrap[open] > summary { border-color: var(--color-brand); }

/* 移动端全宽导航抽屉 */
.mobile-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 1px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.8rem 1.2rem 1.2rem;
  max-height: calc(100dvh - 4.15rem);
  overflow-y: auto;
  border-top: 1px solid var(--color-border-soft);
  background: color-mix(in srgb, var(--color-bg-soft) 96%, #000);
  box-shadow: 0 24px 50px -28px #000c;
}

.mobile-home {
  display: inline-block;
  padding: 0.7rem 0.6rem;
  border-radius: 0.6rem;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.mobile-group { border-top: 1px solid var(--color-border-soft); }

.mobile-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.6rem;
  cursor: pointer;
  color: var(--color-text);
  font-weight: 600;
  list-style: none;
}

.mobile-group summary::-webkit-details-marker { display: none; }

.mobile-group summary svg { flex: none; opacity: 0.7; transition: transform 0.18s ease; }

.mobile-group[open] summary svg { transform: rotate(180deg); }

.mobile-group ul { margin: 0; padding: 0 0 0.5rem; list-style: none; }

.mobile-group li a {
  display: block;
  padding: 0.55rem 0.6rem;
  border-radius: 0.55rem;
  color: var(--color-text-soft);
  font-size: 0.92rem;
  text-decoration: none;
}

.mobile-group li a:hover { color: var(--color-brand); background: var(--color-surface-2); }

.mobile-cta { margin: 0.6rem 0.6rem 0; }

/* ============ 按钮 / 标签 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 0.7rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.2s, background-color 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--color-brand), var(--color-brand-strong));
  color: var(--color-brand-ink);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--color-brand) 55%, transparent);
}

.btn-primary:hover { box-shadow: 0 14px 36px -12px color-mix(in srgb, var(--color-brand) 70%, transparent); }

.btn-ghost { background: var(--color-surface-2); color: var(--color-text); border: 1px solid var(--color-border); }

.btn-ghost:hover { border-color: var(--color-brand); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-2);
  color: var(--color-text-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brand);
}

.text-gradient {
  background: linear-gradient(100deg, var(--color-text) 10%, var(--color-accent-soft) 55%, var(--color-brand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ 首页 hero ============ */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(78vh, 42rem);
  padding-top: clamp(5.5rem, 12vw, 7.5rem);
  padding-bottom: 3rem;
  overflow: hidden;
  background: radial-gradient(40rem 22rem at 78% 8%, rgba(232, 165, 75, 0.14), transparent 60%);
}

.hero-media { position: absolute; inset: 0; z-index: 0; }

.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--color-bg) 0%, transparent 30%, var(--color-bg) 100%);
}

.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 56rem; }

.hero-pill { margin-bottom: 1.1rem; }

.hero-title {
  margin-bottom: 0;
  font-size: clamp(2.7rem, 7vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-tagline { margin-top: 1.25rem; font-size: clamp(1.12rem, 2.5vw, 1.45rem); font-weight: 500; color: var(--color-text); }

.hero-intro { margin-top: 1rem; max-width: 46rem; font-size: 1.04rem; color: var(--color-text-soft); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.9rem; }

.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; margin-top: 2.9rem; }

.stat {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.85rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 88%, transparent), color-mix(in srgb, var(--color-bg-soft) 90%, transparent));
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat dt { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--color-brand); }

.stat dd { margin: 0.15rem 0 0; font-size: 0.84rem; color: var(--color-text-muted); }

/* ============ 分区 / 网格 / 卡片 ============ */
.section {
  margin-top: 5rem;
  padding-top: 0.5rem;
  border-top: 1px solid transparent;
  background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
    linear-gradient(90deg, transparent, var(--color-border-soft), transparent) border-box;
}

.section-head { max-width: 46rem; margin-bottom: 1.9rem; }

.section-head h2 { margin: 0.5rem 0 0; font-size: clamp(1.5rem, 3.4vw, 2.2rem); }

.section-head p { margin: 0.5rem 0 0; color: var(--color-text-muted); }

.grid { display: grid; gap: 1.15rem; grid-template-columns: 1fr; }

.grid-3 { grid-template-columns: 1fr; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.35rem;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-card);
  background: linear-gradient(155deg, color-mix(in srgb, var(--color-surface) 88%, #fff 3%), var(--color-bg-soft));
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.28s;
}

.card:hover { transform: translateY(-3px); border-color: var(--color-border); box-shadow: 0 20px 45px -24px rgba(0, 0, 0, 0.7), var(--shadow-glow); }

.card h3 { margin: 0; font-size: 1.12rem; }

.card p { margin: 0; color: var(--color-text-muted); font-size: 0.92rem; line-height: 1.55; flex: 1; }

.article-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  color: var(--color-brand);
  font-size: 0.85rem;
  font-weight: 600;
}

.article-cta svg { transition: transform 0.18s ease; }

.card:hover .article-cta svg { transform: translateX(3px); }

/* ============ 截图轨道 ============ */
.gallery-section { margin-top: 0; padding-top: 0; border: 0; background: none; }

.gallery-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }

.gallery-rail figure { margin: 0; overflow: hidden; border: 1px solid var(--color-border-soft); border-radius: 0.8rem; aspect-ratio: 16 / 9; background: var(--color-surface); }

.gallery-rail img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }

.gallery-rail figure:hover img { transform: scale(1.03); }

.gallery-credit {
  margin: 0.6rem 0 0;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ============ 面包屑 / 文档页 ============ */
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0; padding: 0; font-size: 0.82rem; color: var(--color-text-muted); list-style: none; }

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

.breadcrumbs a:hover { color: var(--color-brand); }

.breadcrumbs [aria-current="page"] { color: var(--color-text-soft); }

.sep { opacity: 0.5; }

.doc-top { padding-top: 1.6rem; }

.doc-hero { max-width: 52rem; margin-top: 1.2rem; }

.doc-hero h1 { margin: 0.7rem 0 0; font-size: clamp(1.9rem, 5vw, 2.9rem); }

.doc-lead { margin: 0.9rem 0 0; font-size: 1.1rem; color: var(--color-text-soft); line-height: 1.6; }

.doc-meta { margin: 0.9rem 0 0; font-size: 0.82rem; color: var(--color-text-muted); }

.doc-hero-figure {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 2rem 0 0;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: var(--color-surface);
  box-shadow: 0 22px 55px -30px rgba(0, 0, 0, 0.85), var(--shadow-glow);
}

.doc-hero-figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(12, 10, 8, 0.35)); pointer-events: none; }

.doc-hero-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }

.doc-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-top: 2.5rem; }

.doc-aside { display: none; }

/* 侧栏 TOC */
.toc {
  position: sticky;
  top: 6rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.9rem;
  background: var(--color-surface);
}

.toc-title { margin: 0 0 0.7rem; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-muted); }

.toc ul { display: flex; flex-direction: column; gap: 0.1rem; margin: 0; padding: 0; list-style: none; }

.toc a {
  display: block;
  margin-left: -0.7rem;
  padding: 0.32rem 0 0.32rem 0.7rem;
  border-left: 2px solid transparent;
  color: var(--color-text-soft);
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover { color: var(--color-brand); border-color: var(--color-brand); }

/* ============ 正文排版 ============ */
.prose-content { color: var(--color-text-soft); font-size: 1.02rem; }

.prose-content > * + * { margin-top: 1.1rem; }

.prose-content h2 {
  margin: 2.6rem 0 0.4rem;
  padding-top: 0.4rem;
  scroll-margin-top: 6rem;
  font-size: 1.65rem;
  color: var(--color-text);
}

.prose-content h3 {
  margin: 1.8rem 0 0.2rem;
  scroll-margin-top: 6rem;
  font-size: 1.25rem;
  color: var(--color-text);
}

.prose-content p, .prose-content ul, .prose-content ol { color: var(--color-text-soft); line-height: 1.75; }

.prose-content li { margin: 0.35rem 0; }

.prose-content strong { color: var(--color-text); font-weight: 700; }

.prose-content a { color: var(--color-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.prose-content a:hover { color: var(--color-brand-strong); }

.prose-content .table-wrap { overflow-x: auto; border: 1px solid var(--color-border-soft); border-radius: 0.8rem; }

.prose-content table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }

.prose-content th, .prose-content td { padding: 0.75rem 0.95rem; border-bottom: 1px solid var(--color-border-soft); text-align: left; vertical-align: top; }

.prose-content th { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-brand); background: var(--color-surface); }

.prose-content tr:last-child td { border-bottom: 0; }

.prose-content code {
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.4rem;
  background: var(--color-surface-2);
  color: var(--color-brand);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.prose-content blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--color-brand);
  border-radius: 0 0.7rem 0.7rem 0;
  background: var(--color-surface);
  color: var(--color-text-soft);
}

/* 视频占位卡（原站为 JS facade，模板改为外链卡片） */
.video-card {
  display: block;
  margin: 1.8rem 0;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.85rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}

.video-card .video-thumb { position: relative; aspect-ratio: 16 / 9; background: #0a0e1a; }

.video-card .video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.88; }

.video-card .play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ff4e45;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.video-card .video-caption { display: block; padding: 0.7rem 0.9rem; color: var(--color-text); font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; }

/* ============ FAQ ============ */
.faq { margin-top: 3.5rem; }

.faq-head { margin-bottom: 1.5rem; }

.faq-head h2 { margin: 0.4rem 0 0; font-size: 1.7rem; }

.faq-head p { margin: 0.4rem 0 0; color: var(--color-text-muted); }

.faq-list { display: flex; flex-direction: column; gap: 0.7rem; }

.faq-item { overflow: hidden; border: 1px solid var(--color-border-soft); border-radius: 0.8rem; background: var(--color-surface); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  color: var(--color-text);
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary svg { flex: none; opacity: 0.7; transition: transform 0.2s ease; }

.faq-item[open] summary { color: var(--color-brand); }

.faq-item[open] summary svg { transform: rotate(180deg); }

.faq-answer { padding: 0 1.2rem 1.2rem; color: var(--color-text-soft); }

.faq-answer p { margin: 0; line-height: 1.7; }

.faq-answer a { color: var(--color-brand); font-weight: 600; }

/* ============ 相关文章 ============ */
.related { margin-top: 3.5rem; }

.related-head { margin-bottom: 1.4rem; }

.related-head h2 { margin: 0.3rem 0 0; font-size: 1.5rem; }

.related-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

.related-card { padding: 1.3rem; }

.related-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-brand);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.related-cta svg { transition: transform 0.18s ease; }

.related-card:hover .related-cta svg { transform: translateX(3px); }

/* ============ 页脚 ============ */
.site-footer {
  margin-top: 5.5rem;
  padding-top: 3.2rem;
  padding-bottom: 2.2rem;
  border-top: 1px solid var(--color-border-soft);
  background: radial-gradient(40rem 18rem at 10% 0%, color-mix(in srgb, var(--color-brand) 6%, transparent), transparent 60%), var(--color-bg-soft);
}

.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }

.footer-brand p { margin: 1rem 0 0; max-width: 34ch; color: var(--color-text-muted); font-size: 0.9rem; }

.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

.footer-cols h3 { margin: 0 0 0.8rem; font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-soft); }

.footer-cols ul { margin: 0; padding: 0; list-style: none; }

.footer-cols li { margin: 0.45rem 0; }

.footer-cols a { color: var(--color-text-muted); font-size: 0.9rem; text-decoration: none; }

.footer-cols a:hover { color: var(--color-brand); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

/* ============ 响应式 ============ */
@media (min-width: 640px) {
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .gallery-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 901px) {
  .desktop-nav { display: block; }
  .hamburger, .mobile-menu-wrap { display: none !important; }
}

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr) 16rem; align-items: start; }
  .doc-aside { display: block; }
  .footer-grid { grid-template-columns: 1.2fr 2fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
