/* ==========================================================================
   V2Ray 下载站 — 全站样式
   设计方向：工程蓝图风格（近黑画布 + 单一功能色 + 等宽标签 + 细线边框）
   参考：Linear / Vercel 的 Bento Grid 与"文档化"排版语言，克制而非堆砌装饰。
   ========================================================================== */

:root {
  --bg: #08090a;
  --surface: #0d0e10;
  --surface-2: #131416;
  --surface-3: #1a1b1e;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f3f4;
  --text-dim: #9a9da5;
  --text-faint: #5c6069;
  --accent: #6e56cf;
  --accent-2: #38bdf8;
  --good: #34d399;
  --warn: #f5a623;
  --danger: #f2545b;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; }

/* 页面间跳转时用系统级的淡入淡出过渡，避免整页硬切换 + 页头页脚异步渲染
   叠加造成的"抖动"感（仅 Chromium 系浏览器支持，其余浏览器自动忽略）。 */
@view-transition {
  navigation: auto;
}

/* 页头/页脚由 header.js / footer.js 在解析到对应位置时同步插入，
   提前给挂载点预留与真实内容一致的高度，避免哪怕一瞬间的高度跳变。 */
#site-header-mount { display: block; min-height: 61px; }
#site-footer-mount { display: block; min-height: 260px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* 长文类页面（教程 / FAQ）使用更窄的阅读宽度，避免正文靠左、右侧留白过多 */
.container-narrow { max-width: 860px; }
.container-narrow .page-head h1,
.container-narrow .page-head p,
.container-narrow .guide-body { max-width: none; }

.mono {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* ── 顶部导航 ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 9, 10, 0.86);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 60px;
  gap: 24px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
  justify-self: end;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  position: relative;
  display: block;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-2);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
}

/* ── 语言切换 ─────────────────────────────────────────── */

.lang-switch { position: relative; }

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 7px 11px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lang-trigger:hover { color: var(--text); border-color: var(--text-faint); }
.lang-trigger .fa-language { font-size: 1rem; }
.lang-trigger .fa-chevron-down { font-size: 0.6rem; color: var(--text-faint); transition: transform 0.2s; }
.lang-switch.open .lang-trigger .fa-chevron-down { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  list-style: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 200;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.lang-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text-faint);
}
.lang-menu-item.is-active { color: var(--text); font-weight: 600; background: var(--surface-3); }
.lang-menu-item.is-active .fa-check { color: var(--accent-2); font-size: 0.78rem; }
a.lang-menu-item {
  width: 100%;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
a.lang-menu-item:hover, a.lang-menu-item:focus-visible { color: var(--text); background: var(--surface-3); }

/* ── Hero ─────────────────────────────────────────────── */

.hero { position: relative; padding: 72px 0 0; overflow: hidden; }

.hero-kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 22px;
}
.hero-kicker::before { content: "// "; color: var(--text-faint); }

.hero-title {
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  font-weight: 800;
  line-height: 1.18;
  max-width: 820px;
  margin-bottom: 26px;
}
.hero-title .accent {
  color: var(--accent-2);
}

.hero-sub {
  max-width: 560px;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  margin-bottom: 36px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.86; }

.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { background: var(--surface-2); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
}
.link-arrow i { font-size: 0.82rem; color: var(--text-faint); transition: transform 0.2s; }
.link-arrow:hover i { transform: translateX(4px); color: var(--accent-2); }
.link-arrow:hover { text-decoration: none; color: var(--text); }

/* 协议 / 平台跑马灯 */

.marquee {
  position: relative;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  white-space: nowrap;
}
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--surface), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--surface), transparent); }

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 44px;
  padding: 16px 0;
  animation: marquee 26s linear infinite;
}
.marquee-track span {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: 44px;
}
.marquee-track span b { color: var(--text-dim); font-weight: 500; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.hero-spec .spec-item {
  flex: 1;
  min-width: 140px;
  padding: 22px 24px;
  border-right: 1px solid var(--border);
}
.hero-spec .spec-item:last-child { border-right: none; }
.hero-spec .spec-num {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.hero-spec .spec-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── 章节通用 ─────────────────────────────────────────── */

.section { padding: 80px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 640px; margin: 0 0 44px; }

.section-head .eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.section-head .eyebrow::before { content: "// "; color: var(--text-faint); }

.section-head h2 {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.section-head p { color: var(--text-dim); max-width: 560px; }

.section-foot { margin-top: 36px; }

/* ── Bento 网格（下载 + 特性总览） ───────────────────── */

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "hero hero proto proto"
    "hero hero plat  oss"
    "route route trans trans";
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bento-cell {
  position: relative;
  background: var(--surface-2);
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.cell-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.bento .b-hero { grid-area: hero; background: var(--surface-3); }
.bento .b-proto { grid-area: proto; }
.bento .b-plat { grid-area: plat; }
.bento .b-oss { grid-area: oss; }
.bento .b-route { grid-area: route; }
.bento .b-trans { grid-area: trans; }

/* hero 下载卡 */

.b-hero {
  min-height: 340px;
  overflow: hidden;
}
.b-hero .b-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../../../assets/img/network-globe.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.14;
  mask-image: linear-gradient(160deg, black 10%, transparent 70%);
  -webkit-mask-image: linear-gradient(160deg, black 10%, transparent 70%);
}
.b-hero .b-hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
.b-hero h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
}
.b-hero p { color: var(--text-dim); margin-bottom: 24px; max-width: 380px; }

.platform-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
  flex-wrap: wrap;
}
.platform-row a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.82rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.platform-row a:hover {
  color: var(--text);
  border-color: var(--accent-2);
  background: rgba(56, 189, 248, 0.08);
  text-decoration: none;
}
.platform-row a.is-primary {
  color: var(--bg);
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.platform-row a.is-primary:hover { opacity: 0.88; background: var(--accent-2); color: var(--bg); }

/* 协议终端卡 */

.terminal {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.9;
}
.terminal .t-prompt { color: var(--accent-2); }
.terminal .t-cmd { color: var(--text); }
.terminal .t-out { color: var(--text-dim); padding-left: 1.6em; }
.terminal .t-out b { color: var(--text); font-weight: 500; }

/* 数字指标卡 */

.metric-num {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.metric-label { color: var(--text-dim); font-size: 0.88rem; margin-top: 10px; }

/* 分流 / 传输卡 */

.wide-cell { flex-direction: row; align-items: flex-start; gap: 20px; }
.wide-cell .w-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--accent-2);
  font-size: 1.05rem;
}
.wide-cell h4 { font-size: 1.02rem; margin-bottom: 6px; }
.wide-cell p { color: var(--text-dim); font-size: 0.92rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag-row span {
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
}

/* ── 快速上手：流水线步骤 ───────────────────────────── */

.pipeline {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
  gap: 1px;
}

.pipe-step {
  flex: 1;
  background: var(--surface-2);
  padding: 30px 28px;
  position: relative;
}

.pipe-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.pipe-tag i { color: var(--text-faint); font-size: 0.8rem; }

.pipe-step h3 { font-size: 1.05rem; margin-bottom: 10px; }
.pipe-step p { color: var(--text-dim); font-size: 0.92rem; }

.pipe-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  background: var(--surface);
  color: var(--text-faint);
  flex-shrink: 0;
}

/* ── 教程 / 文档卡片 ─────────────────────────────────── */

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.doc-card {
  background: var(--surface-2);
  padding: 26px 26px 28px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--accent-2);
  transition: background 0.15s;
}
.doc-card:hover { background: var(--surface-3); text-decoration: none; }
.doc-card:nth-child(2) { border-top-color: var(--accent); }

.doc-path {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.doc-card h3 { font-size: 1.04rem; margin-bottom: 10px; line-height: 1.5; }
.doc-card p { color: var(--text-dim); font-size: 0.92rem; flex: 1; }
.doc-card .more {
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.doc-card .more i { font-size: 0.78rem; color: var(--text-faint); transition: transform 0.2s; }
.doc-card:hover .more i { transform: translateX(4px); color: var(--accent-2); }

/* ── FAQ ──────────────────────────────────────────────── */

.faq-list { max-width: 860px; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 10px;
}

.faq-q .q-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  flex-shrink: 0;
}

.faq-item .faq-body {
  padding-left: 42px;
  color: var(--text-dim);
  font-size: 0.94rem;
}

/* ── CTA 收尾条 ───────────────────────────────────────── */

.cta-strip {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  padding: clamp(36px, 5vw, 56px);
  text-align: center;
}
.cta-strip .eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.cta-strip .eyebrow::before { content: "// "; color: var(--text-faint); }
.cta-strip h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.cta-strip p { color: var(--text-dim); margin-bottom: 30px; }
.cta-strip .hero-cta-row { justify-content: center; margin-bottom: 0; }

/* ── 页脚 ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 56px 0 30px;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}

.footer-brand p { color: var(--text-faint); margin-top: 14px; max-width: 320px; }

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-faint);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-dim); }
.footer-col a:hover { color: var(--text); }
.footer-col a i { width: 18px; margin-right: 6px; font-size: 0.85rem; color: var(--text-faint); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.footer-langs { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; }
.footer-langs li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
}
.footer-langs .is-active { color: var(--text); font-weight: 600; }
.footer-langs .fa-language { margin-right: 2px; }
.footer-langs a {
  color: var(--text-faint);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.footer-langs a:hover, .footer-langs a:focus-visible { color: var(--text); text-decoration: underline; }

/* ── 次级页面头部（下载页等） ───────────────────────── */

.page-head {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}
.page-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 14px;
  max-width: 760px;
}
.page-head p { color: var(--text-dim); max-width: 620px; margin-bottom: 32px; }

.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.jump-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.86rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.jump-nav a:hover {
  color: var(--text);
  border-color: var(--accent-2);
  background: rgba(56, 189, 248, 0.08);
  text-decoration: none;
}
.jump-nav i { color: var(--text-faint); font-size: 0.9rem; }

/* ── 平台/软件分区 ───────────────────────────────────── */

.os-section { padding: 64px 0; border-bottom: 1px solid var(--border); }
.os-section:last-child { border-bottom: none; }

.os-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.os-section-head h2 { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.os-section-head h2 i { color: var(--accent-2); font-size: 1.2rem; }
.os-section-head .count { font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint); }

.os-section-lead { color: var(--text-dim); max-width: 720px; margin-bottom: 28px; font-size: 0.94rem; }

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

.app-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  overflow: hidden;
}

.app-card-head {
  padding: 24px 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.app-card-head h3 { font-size: 1.12rem; margin-bottom: 6px; }
.app-card-head p { color: var(--text-dim); font-size: 0.9rem; max-width: 520px; }
.dl-table { padding: 8px 26px 20px; }

.dl-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.dl-row:last-child { border-bottom: none; }

.dl-arch {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--text);
  min-width: 132px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dl-badge {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.dl-file {
  flex: 1;
  min-width: 160px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.dl-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.dl-btn:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: rgba(56, 189, 248, 0.08);
  text-decoration: none;
}
.dl-btn i { font-size: 0.78rem; }
.dl-btn[data-placeholder] { opacity: 0.55; cursor: default; pointer-events: none; }
.dl-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  color: var(--text-faint);
  border-color: var(--border);
  background: none;
}

.dl-version {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-faint);
  margin-left: 6px;
}

.pick-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-top: 24px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.pick-note i { color: var(--accent-2); font-size: 1.05rem; margin-top: 2px; flex-shrink: 0; }
.pick-note strong { color: var(--text); }

.pick-note.is-warn { border-color: rgba(245, 166, 35, 0.35); background: rgba(245, 166, 35, 0.07); }
.pick-note.is-warn i { color: var(--warn); }

/* ── 长文教程组件 ─────────────────────────────────────── */

.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.guide-toc a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.84rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.guide-toc a .num { font-family: var(--mono); color: var(--text-faint); font-size: 0.76rem; }
.guide-toc a:hover {
  color: var(--text);
  border-color: var(--accent-2);
  background: rgba(56, 189, 248, 0.08);
  text-decoration: none;
}

.guide-step { padding: 60px 0; border-bottom: 1px solid var(--border); }
.guide-step:last-of-type { border-bottom: none; }

.guide-step-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.guide-step-num {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--accent-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px 14px;
  flex-shrink: 0;
}
.guide-step-head h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 800; }

.guide-body { max-width: 780px; color: var(--text-dim); line-height: 1.8; font-size: 0.96rem; overflow-wrap: break-word; }
.guide-body p { margin-bottom: 16px; }
.guide-body strong { color: var(--text); }
.guide-body code {
  font-family: var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.85em;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-all;
}
.guide-body ol, .guide-body ul { padding-left: 22px; margin-bottom: 16px; }
.guide-body li { margin-bottom: 10px; }
.guide-body li::marker { color: var(--text-faint); font-family: var(--mono); font-size: 0.85em; }

.platform-tracks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0;
}
.platform-track {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 22px 24px;
}
.platform-track h4 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text);
}
.platform-track h4 i { color: var(--accent-2); font-size: 1rem; }
.platform-track ol { padding-left: 20px; margin-bottom: 0; }
.platform-track li { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 10px; }
.platform-track li:last-child { margin-bottom: 0; }
.platform-track li::marker { color: var(--text-faint); font-family: var(--mono); font-size: 0.82em; }

/* ── 文章正文（博客） ─────────────────────────────────── */

.article-body h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 48px 0 18px;
}
.article-body > h2:first-child { margin-top: 0; }
.article-body .guide-body { max-width: none; }
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 26px 0 10px;
}
.table-hint {
  display: none;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 8px;
  text-align: center;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 6px 0 22px;
}
.guide-body table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.88rem;
}
.guide-body th, .guide-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  color: var(--text-dim);
  vertical-align: top;
}
.guide-body th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.guide-body td strong { color: var(--text); }
.guide-body blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.guide-body blockquote p:last-child { margin-bottom: 0; }

/* ── 面包屑（博客文章） ───────────────────────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--text); text-decoration: none; }
.breadcrumb i { font-size: 0.6rem; color: var(--text-faint); }
.breadcrumb span[aria-current] { color: var(--text); }

/* ── 文末引导下载卡片 ─────────────────────────────────── */

.dl-cta-card {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  padding: 28px 32px;
}
.dl-cta-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.dl-cta-body { flex: 1; min-width: 200px; }
.dl-cta-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.dl-cta-body p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.dl-cta-links { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-cta-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-size: 0.8rem;
}
.dl-cta-links a:hover { color: var(--text); border-color: var(--text-faint); text-decoration: none; }
.dl-cta-card > .btn { flex-shrink: 0; }

/* ── 右下角引导下载浮窗 ───────────────────────────────── */

.float-dl {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 14px 18px 14px 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.float-dl.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.float-dl-close {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  cursor: pointer;
}
.float-dl-close:hover { color: var(--text); }
.float-dl-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.float-dl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.float-dl-body strong { font-size: 0.84rem; color: var(--text); white-space: nowrap; }
.float-dl-body span { font-size: 0.72rem; color: var(--text-faint); }
.float-dl-btn {
  flex-shrink: 0;
  background: var(--text);
  color: var(--bg) !important;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.float-dl-btn:hover { opacity: 0.85; text-decoration: none; }

@media (max-width: 520px) {
  .dl-cta-card { padding: 24px; }
  .float-dl { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* ── 响应式 ───────────────────────────────────────────── */

@media (max-width: 1000px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "hero hero"
      "hero hero"
      "proto proto"
      "plat oss"
      "route route"
      "trans trans";
  }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-spec .spec-item { flex: 1 1 50%; }
  .app-grid.cols-2 { grid-template-columns: 1fr; }
  .platform-tracks { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .dl-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "arch actions"
      "file file";
    align-items: center;
    row-gap: 5px;
    column-gap: 12px;
    padding: 12px 0;
  }
  .dl-arch { grid-area: arch; min-width: 0; font-size: 0.82rem; gap: 6px; }
  .dl-actions { grid-area: actions; justify-content: flex-end; gap: 6px; }
  .dl-btn { padding: 6px 10px; font-size: 0.78rem; }
  .dl-file { grid-area: file; min-width: 0; font-size: 0.72rem; }
}

@media (max-width: 768px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-right { gap: 12px; }
  .lang-trigger { padding: 7px 9px; }
  .lang-trigger .lang-current { display: none; }
  .lang-menu { right: -8px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 110;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
    padding: 12px 16px 20px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }

  .hero { padding: 56px 0 0; }
  .section { padding: 60px 0; }

  .bento {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero" "proto" "plat" "oss" "route" "trans";
  }

  .pipeline { flex-direction: column; }
  .pipe-arrow { width: 100%; height: 34px; }
  .pipe-arrow i { transform: rotate(90deg); }

  .faq-item .faq-body { padding-left: 0; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-cta-row .btn { width: 100%; justify-content: center; }
  .hero-spec .spec-item { flex: 1 1 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .wide-cell { flex-direction: column; }
}

/* ── 小屏幕（手机）整体收紧 ───────────────────────────── */

@media (max-width: 600px) {
  .container { padding: 0 16px; }

  .table-hint { display: block; }

  .nav { height: 56px; gap: 8px; }
  .brand { font-size: 0.88rem; }
  .brand-logo { width: 22px; height: 22px; }
  .nav-right { gap: 6px; }
  .lang-trigger { padding: 6px 8px; gap: 5px; }
  .nav-toggle { width: 34px; height: 34px; font-size: 14px; }

  .hero { padding: 40px 0 0; }
  .hero-cta-row { gap: 16px; margin-bottom: 40px; }

  .section { padding: 48px 0; }
  .section-head { margin-bottom: 32px; }

  .bento-cell { padding: 20px; }
  .b-hero { min-height: 280px; }

  .pipe-step { padding: 24px 20px; }

  .doc-card { padding: 22px 20px 24px; }

  .page-head { padding: 36px 0 30px; }

  .os-section { padding: 44px 0; }
  .app-card-head { padding: 20px; }
  .dl-table { padding: 6px 20px 16px; }
  .dl-arch { min-width: 0; }

  .guide-step { padding: 40px 0; }
  .guide-step-head { gap: 10px; }

  .dl-cta-card { padding: 22px; gap: 18px; }
  .dl-cta-card > .btn { width: 100%; justify-content: center; }

  .cta-strip { padding: 32px 22px; }

  .footer-brand p { max-width: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .float-dl-body strong { white-space: normal; }
}

@media (max-width: 340px) {
  .brand-text { display: none; }
}

/* ── 无障碍 ───────────────────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

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