/* 77Fox 官网样式表 —— 无构建、无外部依赖、无 webfont */

:root {
  --bg: #121316;
  --bg-soft: #17181c;
  --surface: #1b1d22;
  --surface-2: #212429;
  --border: #2c2f36;
  --border-soft: #24272d;
  --fg: #eceae7;
  --fg-mid: #b6b3ad;
  --fg-dim: #8b8880;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --accent-ink: #1a1204;
  --accent-soft: rgba(245, 158, 11, 0.13);
  --ok: #34d399;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1160px;
  --header-h: 64px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 30px rgba(0, 0, 0, .22);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf9f6;
    --bg-soft: #f4f2ed;
    --surface: #ffffff;
    --surface-2: #f7f5f1;
    --border: #e2ded5;
    --border-soft: #ebe7df;
    --fg: #1a1b1e;
    --fg-mid: #4c4e54;
    --fg-dim: #6e7077;
    --accent: #b45309;
    --accent-2: #92400e;
    --accent-ink: #fffaf2;
    --accent-soft: rgba(180, 83, 9, .09);
    --ok: #047857;
    --shadow: 0 1px 2px rgba(24, 20, 12, .05), 0 8px 26px rgba(24, 20, 12, .07);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.018em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- 顶栏：整幅贯通，不再被内容容器切断 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}

.site-header .wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; flex: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  color: #1a1204; font-weight: 800; font-size: 15px; line-height: 1;
  font-family: var(--sans);
}

.nav-main { display: flex; align-items: center; gap: 4px; margin-inline-start: 8px; }
.nav-main a {
  color: var(--fg-mid); font-size: 14.5px; font-weight: 500;
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-main a:hover { color: var(--fg); background: var(--surface-2); }
.nav-main a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; flex: none; }

.lang-switch {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 600; color: var(--fg-mid);
  padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.lang-switch:hover { color: var(--fg); border-color: var(--fg-dim); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14.5px; font-weight: 600;
  padding: 9px 17px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .12s, filter .15s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(160deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--border); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg-dim); background: var(--surface-2); }
.btn-lg { font-size: 16px; padding: 13px 26px; border-radius: 11px; }

/* 移动端菜单：<details>，零 JS */
.nav-toggle { display: none; }
.nav-toggle > summary {
  list-style: none; cursor: pointer; padding: 8px; margin-inline-start: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.nav-toggle > summary::-webkit-details-marker { display: none; }
.nav-toggle[open] .nav-drawer { display: block; }
.nav-drawer {
  display: none; position: absolute; inset-inline: 0; top: var(--header-h);
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 10px 24px 18px;
}
.nav-drawer a {
  display: block; padding: 11px 2px; color: var(--fg-mid);
  font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--border-soft);
}
.nav-drawer a:last-of-type { border-bottom: 0; }
.nav-drawer .btn { width: 100%; margin-top: 12px; }

@media (max-width: 1080px) {
  .nav-main, .header-actions { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- 通用区块 ---------- */

main { display: block; }
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border-soft); }

.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  letter-spacing: .11em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.section h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 14px; letter-spacing: -.028em; }
.section-lead { color: var(--fg-mid); font-size: 17px; max-width: 62ch; }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset-block: -40% auto; inset-inline: -10% 0;
  height: 620px; pointer-events: none; z-index: 0;
  background: radial-gradient(58% 52% at 22% 42%, var(--accent-soft), transparent 72%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.035em;
  line-height: 1.14; margin-bottom: 20px;
  text-wrap: balance;
}
.section h2, .cta h2, .page-head h1 { text-wrap: balance; }
.hero-body { font-size: 18px; color: var(--fg-mid); max-width: 52ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--fg-dim); list-style: none; }
.hero-proof li { display: flex; align-items: center; gap: 7px; }
.hero-proof svg { color: var(--accent); flex: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 52px 0 48px; }
  .section { padding: 60px 0; }
}
@media (max-width: 560px) {
  .hero-actions, .cta-actions { flex-direction: column; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
}

/* ---------- 控制台示意图 ---------- */

.console-shot {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.console-shot img { width: 100%; height: auto; }
.console-shot figcaption {
  font-size: 12.5px; color: var(--fg-dim); padding: 10px 14px;
  border-top: 1px solid var(--border-soft); background: var(--surface-2);
}

/* ---------- 平台条 ---------- */

.platform-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.platform-row div {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 17px 12px; font-size: 14px; font-weight: 500; color: var(--fg-mid);
  border-inline-end: 1px solid var(--border-soft);
}
.platform-row div:last-child { border-inline-end: 0; }
.platform-row svg { color: var(--accent); flex: none; }
@media (max-width: 760px) {
  .platform-row { grid-template-columns: repeat(2, 1fr); }
  .platform-row div:nth-child(2) { border-inline-end: 0; }
  .platform-row div:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
}

/* ---------- 卡片网格 ---------- */

.card-grid { display: grid; gap: 16px; margin-top: 40px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1040px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: border-color .16s, transform .16s;
}
a.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); }
.card-icon {
  width: 34px; height: 34px; border-radius: 9px; margin-bottom: 15px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.card h3 { font-size: 16px; margin-bottom: 8px; letter-spacing: -.012em; }
.card p { font-size: 14.5px; color: var(--fg-mid); line-height: 1.65; }
.card-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 13px; font-size: 13.5px; font-weight: 600; color: var(--accent); }

/* ---------- 功能页模块卡（图标 + 名称 + 简介 + 详情展开） ---------- */

.modules-grid { margin-top: 34px; }
.module-card { display: flex; flex-direction: column; }
.module-card h3 { font-size: 16.5px; }
.module-summary { flex: 0 0 auto; }
.module-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.module-chips span {
  font-size: 12px; color: var(--fg-dim);
  padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px;
  white-space: nowrap;
}
.module-more { margin-top: auto; padding-top: 14px; }
.module-more > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 600; color: var(--accent);
  border-top: 1px solid transparent;
}
.module-more > summary::-webkit-details-marker { display: none; }
.module-more > summary svg { transition: transform .16s; }
.module-more[open] > summary svg { transform: rotate(180deg); }
.module-detail { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 6px; }
.module-detail h4 { font-size: 13px; margin: 14px 0 5px; letter-spacing: .01em; }
.module-detail p { font-size: 13.8px; }
.module-detail .callout { margin-top: 12px; padding: 12px 14px; font-size: 13.5px; }
.modules-grid + .prose { padding-top: 30px; }

/* ---------- 功能页：页顶能力速览 + 锚点详解章节 ---------- */

.feature-jump { margin-top: 34px; }
.feature-jump-title {
  font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--fg-dim); margin-bottom: 16px;
}
.feature-jump a.card h3 { display: flex; align-items: center; gap: 6px; }
.feature-jump a.card:hover h3 { color: var(--accent); }
/* 章节容器本身带 .prose，上内边距沿用 .prose 的 48px，这里只管章节之间的节奏 */
.feature-section { scroll-margin-top: calc(var(--header-h) + 20px); }
.feature-section + .feature-section { margin-block-start: 40px; }
.feature-section > h2:first-child { margin-top: 0; }

/* ---------- 安全区 ---------- */

.split { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); gap: 52px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.check-list { list-style: none; display: grid; gap: 2px; }
.check-list li {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 0; border-bottom: 1px solid var(--border-soft);
  font-size: 15px; color: var(--fg-mid);
}
.check-list li:last-child { border-bottom: 0; }
.check-list svg { color: var(--ok); flex: none; margin-top: 4px; }

/* ---------- 长文正文（功能详情页） ---------- */

.page-head { padding: 56px 0 8px; border-bottom: 1px solid var(--border-soft); }
.breadcrumb { font-size: 13.5px; color: var(--fg-dim); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 7px; opacity: .5; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.032em; margin-bottom: 16px; max-width: 20ch; }
.page-head .lead { font-size: 18.5px; color: var(--fg-mid); max-width: 66ch; margin-bottom: 40px; }

.prose { max-width: 74ch; padding: 48px 0 8px; }
.prose h2 { font-size: 25px; margin: 44px 0 15px; letter-spacing: -.022em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin: 30px 0 10px; }
.prose p { margin-bottom: 17px; color: var(--fg-mid); }
.prose strong { color: var(--fg); font-weight: 650; }
.prose ul, .prose ol { margin: 0 0 20px; padding-inline-start: 22px; color: var(--fg-mid); }
.prose li { margin-bottom: 9px; }
.prose li::marker { color: var(--accent); }
.prose code {
  font-family: var(--mono); font-size: .88em; padding: 2px 6px;
  background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 5px; color: var(--fg);
}
.callout {
  border-inline-start: 3px solid var(--accent); background: var(--accent-soft);
  padding: 16px 20px; border-start-end-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); margin: 26px 0;
}
.callout p { margin: 0; color: var(--fg); font-size: 15px; }

.faq { border-top: 1px solid var(--border-soft); margin-top: 12px; }
.faq details {
  border-bottom: 1px solid var(--border-soft); padding: 4px 0;
}
.faq summary {
  cursor: pointer; padding: 17px 0; font-weight: 600; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--accent); font-size: 21px; font-weight: 400; flex: none; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 18px; color: var(--fg-mid); margin: 0; }

/* ---------- 下载页 ---------- */

.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 32px 0; }
@media (max-width: 760px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.dl-card.featured { border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); }
.dl-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 3px 9px; border-radius: 5px; margin-bottom: 12px;
}
.dl-card h2 { font-size: 20px; margin-bottom: 8px; }
.dl-card p { font-size: 14.5px; color: var(--fg-mid); margin-bottom: 18px; }
.dl-meta { list-style: none; font-size: 13.5px; color: var(--fg-dim); margin-bottom: 20px; }
.dl-meta li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.dl-meta li:last-child { border-bottom: 0; }
.dl-meta b { color: var(--fg-mid); font-weight: 500; }
.hash { font-family: var(--mono); font-size: 11.5px; word-break: break-all; color: var(--fg-dim); }

/* ---------- 定价页 ---------- */

.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 34px 0 10px; }
@media (max-width: 1040px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.plan-card.featured { border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); }
.plan-card h2 { font-size: 19px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.plan-price span { font-size: 14px; color: var(--fg-dim); }
.plan-credits { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; }
.plan-credits svg { color: var(--accent); flex: none; }
.plan-note { font-size: 13.5px; color: var(--fg-mid); flex: 1; }
.plan-card .btn { width: 100%; }
.plan-same-note { font-size: 13.5px; color: var(--fg-dim); margin-bottom: 44px; }

/* ---------- 更新日志 ---------- */

.release-list { display: grid; gap: 0; }
.release {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 32px;
  padding: 34px 0; border-top: 1px solid var(--border-soft);
}
.release:first-child { border-top: 0; }
@media (max-width: 760px) { .release { grid-template-columns: 1fr; gap: 12px; } }
.release-meta { font-size: 13.5px; color: var(--fg-dim); }
.release-ver {
  display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 6px; margin-bottom: 7px;
}
.release h2 { font-size: 20px; margin-bottom: 10px; letter-spacing: -.015em; }
.release > div > p { color: var(--fg-mid); font-size: 15.5px; margin-bottom: 15px; }
.release ul { list-style: none; display: grid; gap: 8px; }
.release ul li { position: relative; padding-inline-start: 20px; font-size: 14.5px; color: var(--fg-mid); }
.release ul li::before {
  content: ""; position: absolute; inset-inline-start: 3px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .75;
}

/* ---------- CTA ---------- */

.cta { text-align: center; padding: 84px 0; }
.cta h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; }
.cta p { color: var(--fg-mid); max-width: 54ch; margin: 0 auto 28px; font-size: 17px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 页脚 ---------- */

.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-soft); padding: 52px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-about p { font-size: 14px; color: var(--fg-dim); margin-top: 12px; max-width: 34ch; }
.footer-col h2 { font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 14px; font-weight: 700; }
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a { font-size: 14.5px; color: var(--fg-mid); }
.footer-col a:hover { color: var(--accent); }
.footer-base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--border-soft);
  font-size: 13.5px; color: var(--fg-dim);
}

/* ---------- 法务页 ---------- */

.legal { max-width: 74ch; padding: 56px 0 24px; }
.legal h1 { font-size: 36px; margin-bottom: 10px; letter-spacing: -.03em; }
.legal .updated { color: var(--fg-dim); font-size: 14px; margin-bottom: 40px; }
.legal section { margin-bottom: 34px; }
.legal h2 { font-size: 19px; margin-bottom: 11px; }
.legal p { color: var(--fg-mid); }

/* ====================================================================
   9 语架构新增组件
   ==================================================================== */

/* ---------- 语言菜单：9 种语言塞不进顶栏，用 <details> 做无 JS 下拉 ---------- */

/* flex: none —— 日语/德语等较长的导航词会挤压语言菜单，
   不锁定的话 summary 里的文字会折到图标下面一行。 */
.lang-menu { position: relative; flex: none; }
.lang-menu > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--fg-mid);
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary > span { white-space: nowrap; }
.lang-menu > summary::after {
  content: ""; width: 5px; height: 5px; flex: none;
  border-inline-end: 1.5px solid currentColor; border-block-end: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
}
.lang-menu > summary:hover { color: var(--fg); border-color: var(--fg-dim); }
.lang-menu[open] > summary { color: var(--fg); border-color: var(--fg-dim); }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 168px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  display: grid; gap: 1px;
}
.lang-list a {
  padding: 8px 12px; border-radius: 6px; font-size: 14px; color: var(--fg-mid);
  transition: background .12s, color .12s;
}
.lang-list a:hover { background: var(--surface-2); color: var(--fg); }
.lang-list a[aria-current="true"] { color: var(--accent); font-weight: 600; }

.footer-langs {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  padding: 22px 0 4px; margin-block-start: 8px;
  border-block-start: 1px solid var(--border-soft);
}
.footer-langs a { font-size: 13.5px; color: var(--fg-dim); }
.footer-langs a:hover { color: var(--accent); }
.footer-langs a[aria-current="true"] { color: var(--fg-mid); font-weight: 600; }

/* ---------- 博客列表 ---------- */

.post-list { display: grid; gap: 2px; padding: 28px 0 8px; }
.post-card { padding: 26px 0; border-block-end: 1px solid var(--border-soft); }
.post-card:first-child { padding-block-start: 8px; }
.post-card-main { display: block; }
.post-card h2 {
  font-size: 22px; letter-spacing: -.02em; margin-bottom: 9px;
  transition: color .15s; text-wrap: balance;
}
.post-card-main:hover h2 { color: var(--accent); }
.post-card p { color: var(--fg-mid); font-size: 15.5px; max-width: 72ch; }

.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-block-start: 13px; font-size: 13.5px; color: var(--fg-dim);
}
.post-meta span:not(.chip) { opacity: .7; }
.post-meta-lg { margin-block-start: 18px; font-size: 14.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }
.chips-lead { margin: 26px 0 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--fg-mid);
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px;
  transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.chip span { font-size: 11.5px; color: var(--fg-dim); }

.empty { color: var(--fg-dim); padding: 40px 0; }

/* ---------- 文章页：目录 + 正文 ---------- */

.post-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 236px;
  gap: 56px; align-items: start;
}
.post-layout .post-body { max-width: 74ch; }
.post-layout .toc { order: 2; }
.post-layout .post-body { order: 1; }

.toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  padding: 18px 20px; border: 1px solid var(--border-soft);
  border-radius: var(--radius); background: var(--surface);
  max-height: calc(100vh - var(--header-h) - 60px); overflow-y: auto;
}
.toc-title {
  font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--fg-dim); margin-bottom: 12px;
}
.toc ul { list-style: none; display: grid; gap: 2px; }
.toc a {
  display: block; font-size: 13.5px; line-height: 1.5; color: var(--fg-mid);
  padding: 5px 0; transition: color .12s;
}
.toc a:hover { color: var(--accent); }
.toc .toc-h3 { padding-inline-start: 14px; }
.toc .toc-h3 a { font-size: 13px; color: var(--fg-dim); }

.post-body h2 { scroll-margin-top: calc(var(--header-h) + 20px); }
.post-body h3 { scroll-margin-top: calc(var(--header-h) + 20px); }
.post-body img { border-radius: var(--radius-sm); border: 1px solid var(--border-soft); margin: 24px 0; }
.post-body pre {
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto; margin: 0 0 20px;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: 13.5px; }
.post-body blockquote {
  margin: 24px 0; padding: 2px 20px;
  border-inline-start: 3px solid var(--border); color: var(--fg-dim);
}
.post-body table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 14.5px; }
.post-body th, .post-body td {
  padding: 10px 12px; border-block-end: 1px solid var(--border-soft); text-align: start;
}
.post-body th { color: var(--fg); font-weight: 650; }
.post-body td { color: var(--fg-mid); }

@media (max-width: 1040px) {
  .post-layout { grid-template-columns: 1fr; gap: 28px; }
  .post-layout .toc { order: 1; position: static; max-height: none; }
  .post-layout .post-body { order: 2; }
}

/* ---------- 分页 ---------- */

.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 32px 0 48px; border-block-start: 1px solid var(--border-soft); margin-block-start: 20px;
}
.pager-status { font-size: 14px; color: var(--fg-dim); }

/* ---------- 对照表 ---------- */

.table-wrap { overflow: auto; margin-top: 24px; border: 1px solid var(--border-soft); border-radius: 12px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.compare-table thead th { background: var(--bg-soft, rgba(127,127,127,.08)); font-weight: 650; }
.compare-table tbody th { font-weight: 600; white-space: nowrap; }
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- 404 ---------- */

.notfound { padding: 92px 0 108px; max-width: 56ch; }
.notfound h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.03em; margin: 6px 0 16px; }
.notfound p { color: var(--fg-mid); font-size: 17px; margin-bottom: 28px; }

/* ---------- RTL 微调 ---------- */

[dir="rtl"] .brand-mark,
[dir="rtl"] .release-ver,
[dir="rtl"] .hash,
[dir="rtl"] code { direction: ltr; unicode-bidi: embed; }
[dir="rtl"] .lang-menu > summary::after { transform: rotate(45deg) translate(-1px, -1px); }
[dir="rtl"] .breadcrumb { direction: rtl; }
