/* ==========================================================================
   Sparkrun 闪行官网 · 全局设计系统
   版本：2026-07-18 整体改版（清透编辑风 · 明暗节奏 · 产品优先）
   依据：docs/superpowers/specs/2026-07-18-sparkrun-redesign-plan.md
        docs/superpowers/specs/2026-07-18-sparkrun-global-content-width-design.md
   用法：docs/superpowers/specs/2026-07-18-sparkrun-component-catalog.md
   ========================================================================== */

/* ---------- 字体：Inter Variable（latin 子集，自托管；中文走系统栈） ---------- */
@font-face {
  font-family: "Inter";
  src: url("./fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-024F, U+2000-206F, U+20A0-20BF, U+2190-21FF;
}

/* ---------- 设计令牌 ---------- */
:root {
  /* 品牌蓝色阶 */
  --brand: #2463eb;
  --brand-600: #1d4fd7;
  --brand-700: #1a41b4;
  --brand-50: #eef4ff;
  --brand-100: #dbe7ff;
  --brand-glow: rgba(36, 99, 235, 0.30);

  /* 中性色 */
  --ink: #101418;
  --muted: #556070;
  --line: rgba(16, 20, 24, 0.08);
  --surface: #f7f9fc;

  /* 深色区块 */
  --charcoal: #0f1420;
  --charcoal-2: #161d2e;
  --charcoal-line: rgba(255, 255, 255, 0.10);
  --charcoal-muted: #9aa7bd;

  /* 语义色：仅用于成功/警告/错误状态，不参与装饰 */
  --success: #1a9e54;
  --warning: #b7791f;
  --error: #d64545;

  /* 排版 */
  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;

  /* 圆角 4 档 */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* 阴影 3 档（中性灰）+ 品牌光晕（仅主 CTA/品牌元素） */
  --shadow-sm: 0 1px 2px rgba(16, 20, 24, 0.06);
  --shadow-md: 0 10px 28px -14px rgba(16, 20, 24, 0.22);
  --shadow-lg: 0 28px 56px -24px rgba(16, 20, 24, 0.28);
  --shadow-glow: 0 10px 28px -10px var(--brand-glow);

  /* 内容宽度契约（1180px 单一宽度，勿新增第二套） */
  --content-width: 1180px;
  --content-gutter: 20px;
  --content-outer-width: calc(
    var(--content-width) + var(--content-gutter) + var(--content-gutter)
  );

  /* 区块垂直节奏 3 档 */
  --section-sm: 72px;
  --section-md: 96px;
  --section-lg: 128px;
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* 供全宽背景分区使用 100cqw 突破 .wrap */
  container-type: inline-size;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: #ffffff;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

a {
  color: var(--brand);
  text-decoration: none;
}

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

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

strong,
b {
  font-weight: 700;
}

::selection {
  background: var(--brand-100);
}

/* 全局焦点样式 */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* skip-link */
.skip-link {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: #ffffff;
}

/* ---------- 布局骨架 ---------- */
/* 全局外层：所有页面使用 <main class="wrap">，内层内容对齐 1180px */
.wrap {
  position: relative;
  max-width: var(--content-outer-width);
  margin: 0 auto;
  padding: 0 var(--content-gutter) 0;
}

/* 常规区块：垂直节奏三档，默认 96px */
.section {
  padding-top: var(--section-md);
  padding-bottom: var(--section-md);
}

.section--compact {
  padding-top: var(--section-sm);
  padding-bottom: var(--section-sm);
}

.section--spacious {
  padding-top: var(--section-lg);
  padding-bottom: var(--section-lg);
}

/* 全宽背景分区：突破 .wrap 到视口边缘，内部回到统一内容宽度 */
.band {
  width: calc(100cqw);
  margin-left: calc(50% - 50cqw);
  padding-top: var(--section-md);
  padding-bottom: var(--section-md);
}

.band > .band-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--content-gutter);
}

/* 同色系浅渐变交替区块（brand-50 → 白，唯一允许的渐变） */
.band--tint {
  background: linear-gradient(180deg, var(--brand-50) 0%, #ffffff 78%);
}

/* 纯色浅灰交替区块 */
.band--surface {
  background: var(--surface);
}

/* 深色区块（每页最多 1-2 个） */
.band--dark {
  background: var(--charcoal);
  color: #f2f5fa;
}

.band--dark .section-lead,
.band--dark p {
  color: var(--charcoal-muted);
}

/* 深色区块内的卡片 */
.card-dark {
  background: var(--charcoal-2);
  border: 1px solid var(--charcoal-line);
  border-radius: var(--r-md);
  padding: 28px;
}

/* ---------- 排版工具 ---------- */
/* kicker：中文短句标签，禁 uppercase，字距 ≤ .04em */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-700);
}

.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.band--dark .kicker {
  color: #8fb0ff;
}

/* 区块标题组 */
.section-head {
  max-width: var(--content-width);
  margin-bottom: 48px;
}

.section-head--center {
  text-align: center;
}

.section-head--center .kicker {
  justify-content: center;
}

.section-title {
  margin-top: 16px;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-title em {
  font-style: normal;
  color: var(--brand);
}

.section-lead {
  margin-top: 16px;
  max-width: 640px;
  font-size: 16px;
  color: var(--muted);
}

.section-head--center .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* 内页首屏标题（禁止巨大 hero 字号） */
.page-hero {
  padding-top: 72px;
  padding-bottom: 56px;
}

.page-title {
  margin-top: 16px;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page-title em {
  font-style: normal;
  color: var(--brand);
}

.page-lead {
  margin-top: 16px;
  max-width: 680px;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--content-gutter);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* 品牌区：内联 SVG 图形标 + 字标 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex-shrink: 0;
}

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

.brand-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-name small {
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}

/* 汉堡开关（移动端） */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  position: relative;
  cursor: pointer;
}

.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 10px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-burger span {
  top: 19px;
}

.nav-burger span::before {
  left: 0;
  top: -6px;
}

.nav-burger span::after {
  left: 0;
  top: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--surface);
  color: var(--ink);
}

/* 当前页高亮：aria-current="page" */
.nav-links a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-50);
  font-weight: 700;
}

/* GitHub 图标链接 */
.nav-links a.nav-icon {
  padding: 8px;
}

.nav-links a.nav-icon svg {
  width: 18px;
  height: 18px;
}

/* 导航 CTA */
.nav-links a.nav-cta {
  margin-left: 8px;
  padding: 9px 18px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.nav-links a.nav-cta:hover {
  background: var(--brand-600);
  color: #ffffff;
}

/* 移动端汉堡菜单（纯 CSS checkbox） */
@media (max-width: 900px) {
  .nav-inner {
    height: 60px;
  }

  .nav-burger {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--content-gutter) 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: 15px;
  }

  .nav-links a.nav-cta {
    margin: 8px 0 0;
    justify-content: center;
    padding: 13px 18px;
  }

  .nav-links a.nav-icon {
    padding: 12px 14px;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .nav-toggle:checked ~ .nav-burger span {
    transform: rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-burger span::before {
    transform: translateY(6px) rotate(-90deg);
  }

  .nav-toggle:checked ~ .nav-burger span::after {
    transform: translateY(-6px) scaleX(0);
    opacity: 0;
  }
}

/* ---------- 按钮：一套组件三变体 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* primary：品牌蓝 + 品牌光晕，hover 加深一档 */
.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--brand-600);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-primary:active {
  background: var(--brand-700);
}

/* ghost：灰边白底 */
.btn-ghost {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(16, 20, 24, 0.16);
  color: var(--ink);
}

/* quiet：纯文字 */
.btn-quiet {
  padding: 12px 8px;
  color: var(--brand);
  font-weight: 700;
}

.btn-quiet:hover {
  color: var(--brand-600);
}

.btn-quiet svg {
  transition: transform 0.18s ease;
}

.btn-quiet:hover svg {
  transform: translateX(3px);
}

/* 深色区块内的 ghost */
.band--dark .btn-ghost,
.section-dark .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.22);
  color: #f2f5fa;
}

.band--dark .btn-ghost:hover,
.section-dark .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

/* 尺寸与形态修饰 */
.btn--lg {
  padding: 15px 30px;
  font-size: 16px;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

/* 按钮组 */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* ---------- 徽章 / 标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
}

.badge--neutral {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--line);
}

.badge--dark {
  background: rgba(255, 255, 255, 0.08);
  color: #c9d6f2;
  border-color: var(--charcoal-line);
}

/* ---------- 静态公告条 ---------- */
.announce {
  width: calc(100cqw);
  margin-left: calc(50% - 50cqw);
  background: var(--brand-50);
  border-bottom: 1px solid var(--brand-100);
}

.announce > .announce-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 10px var(--content-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  font-size: 14px;
  color: var(--ink);
  text-align: center;
}

.announce a {
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Hero：左文右图分屏 ---------- */
.hero {
  position: relative;
  padding-top: 88px;
  padding-bottom: 96px;
  overflow: hidden; /* 裁掉 ::before 光斑的出血，避免撑出横向滚动宽度 */
}

/* hero 后方品牌光斑（克制：brand-100，大 blur，低透明度） */
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -160px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: var(--brand-100);
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
}

.hero-title {
  margin-top: 20px;
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero-title em {
  font-style: normal;
  color: var(--brand);
}

.hero-lead {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.hero-lead strong {
  color: var(--ink);
}

.hero .btn-row {
  margin-top: 32px;
}

@media (max-width: 960px) {
  .hero {
    padding-top: 56px;
    padding-bottom: 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero::before {
    right: -260px;
    opacity: 0.4;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: clamp(34px, 9.6vw, 44px);
  }
}

/* ---------- 信任 pill ---------- */
.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.pill svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
  flex-shrink: 0;
}

/* ---------- Windows 窗口框截图 ---------- */
/* 单层阴影、按源图比例完整展示，禁止 cover 裁切 */
.window-frame {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.window-frame--flat {
  box-shadow: var(--shadow-md);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.window-dots {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d7dde6;
}

.window-dots i:first-child {
  background: #c3cbd7;
}

.window-title {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-frame img {
  width: 100%;
  height: auto;
}

/* ---------- 截图轮播：预加载 + 交叉淡入 + 切换卡 ---------- */
.shot-carousel {
  position: relative;
}

.shot-stage {
  position: relative;
}

.shot-stage .window-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.shot-stage .window-frame.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  cursor: zoom-in;
}

/* 文字切换卡 */
.shot-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.shot-tab {
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.shot-tab:hover {
  border-color: rgba(16, 20, 24, 0.18);
}

.shot-tab.is-active {
  border-color: var(--brand);
  background: var(--brand-50);
}

.shot-tab b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.shot-tab small {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 640px) {
  .shot-tabs {
    grid-template-columns: 1fr;
  }
}

/* ---------- 点击放大 lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(15, 20, 32, 0.82);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

body.lightbox-open {
  overflow: hidden;
}

/* ---------- 数字 / 事实带 ---------- */
.fact-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.fact {
  padding: 24px;
  border-radius: var(--r-md);
  background: #ffffff;
  border: 1px solid var(--line);
}

.band--dark .fact,
.fact--dark {
  background: var(--charcoal-2);
  border-color: var(--charcoal-line);
}

.fact b {
  display: block;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.fact b em {
  font-style: normal;
  color: var(--brand);
}

.fact span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.band--dark .fact b,
.fact--dark b {
  color: #f2f5fa;
}

.band--dark .fact span,
.fact--dark span {
  color: var(--charcoal-muted);
}

@media (max-width: 860px) {
  .fact-band {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .fact-band {
    grid-template-columns: 1fr;
  }
}

/* ---------- bento 功能网格：2 大 4 小 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.bento-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 28px;
  overflow: hidden;
}

.bento-card--large {
  grid-column: span 2;
  padding-bottom: 0;
}

.bento-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--brand-50);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.bento-icon svg {
  width: 20px;
  height: 20px;
}

.bento-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.bento-card--large h3 {
  font-size: 20px;
}

.bento-card p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* 大卡嵌真实截图：贴底出血，呈现“界面伸入卡片”的效果 */
.bento-card--large .window-frame {
  margin-top: 22px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-card--large {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .bento {
    grid-template-columns: 1fr;
  }

  .bento-card--large {
    grid-column: span 1;
  }
}

/* ---------- 使用场景卡（之前 → 之后） ---------- */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scene-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 28px;
}

.scene-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.scene-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
  flex-shrink: 0;
}

.scene-shift {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.scene-shift > div {
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.65;
}

.scene-before {
  background: var(--surface);
  color: var(--muted);
}

.scene-after {
  background: var(--brand-50);
  color: var(--ink);
}

.scene-shift small {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.scene-after small {
  color: var(--brand-700);
}

@media (max-width: 900px) {
  .scene-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 对比表：桌面表格 + 移动端卡片式降级 ---------- */
.compare {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #ffffff;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare-table thead th {
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
}

.compare-table thead th.compare-highlight {
  background: var(--brand-50);
  color: var(--brand-700);
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--muted);
  width: 26%;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table td.compare-highlight {
  background: rgba(238, 244, 255, 0.5);
  font-weight: 500;
}

/* 表格内勾选 / 叉 */
.compare-yes,
.compare-no {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.compare-yes svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
  flex-shrink: 0;
}

.compare-no {
  color: var(--muted);
}

.compare-no svg {
  width: 16px;
  height: 16px;
  color: #c3cbd7;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .compare {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .compare-table,
  .compare-table tbody,
  .compare-table tr,
  .compare-table td,
  .compare-table th {
    display: block;
    width: 100%;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table tbody tr {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #ffffff;
    overflow: hidden;
  }

  .compare-table tbody th {
    width: 100%;
    padding: 14px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    color: var(--ink);
  }

  .compare-table tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
  }

  .compare-table tbody td::before {
    content: attr(data-label);
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
  }

  .compare-table tbody td:last-child {
    border-bottom: 0;
  }

  .compare-table td.compare-highlight {
    background: transparent;
  }
}

/* ---------- 价格卡 ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 32px 28px;
}

/* 推荐档：深色卡 */
.price-card--featured {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: #f2f5fa;
  box-shadow: var(--shadow-lg);
}

.price-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-tag h3 {
  font-size: 18px;
  font-weight: 700;
}

.price-value {
  margin-top: 18px;
  font-size: clamp(34px, 3vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.price-value small {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.price-card--featured .price-value small {
  color: var(--charcoal-muted);
}

.price-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.price-card--featured .price-note {
  color: var(--charcoal-muted);
}

.price-desc {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.price-card--featured .price-desc {
  color: var(--charcoal-muted);
}

.price-list {
  margin: 22px 0 26px;
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.price-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.price-list svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--brand);
  flex-shrink: 0;
}

.price-card--featured .price-list svg {
  color: #8fb0ff;
}

.price-list li.is-off {
  color: var(--muted);
}

.price-list li.is-off svg {
  color: #c3cbd7;
}

.price-card .btn {
  margin-top: auto;
}

.price-flow {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.price-card--featured .price-flow {
  color: var(--charcoal-muted);
}

@media (max-width: 900px) {
  .price-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- FAQ（details/summary，零 JS） ---------- */
.faq {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #ffffff;
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.faq-body {
  padding: 0 22px 20px;
  font-size: 15px;
  color: var(--muted);
}

.faq-body p + p {
  margin-top: 10px;
}

/* ---------- 时间线（更新日志 / 里程碑） ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 32px;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--brand);
}

.timeline-item--planned::before {
  border-color: #c3cbd7;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.timeline-item h3 {
  margin-top: 6px;
  font-size: 19px;
  font-weight: 700;
}

.timeline-item p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

.timeline-item ul {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.timeline-item ul li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.timeline-item ul li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* ---------- 表单（Netlify Forms 兼容） ---------- */
.form {
  display: grid;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
}

.field label small {
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(16, 20, 24, 0.14);
  border-radius: var(--r-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23556070' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa4b2;
}

.field .field-error {
  font-size: 13px;
  color: var(--error);
}

.form-note {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 引言卡（占位结构：仅放可核实内容，禁止编造证言） ---------- */
.quote-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 36px;
}

.quote-card blockquote {
  margin: 0;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink);
}

.quote-card blockquote::before {
  content: "“";
  display: block;
  font-size: 56px;
  line-height: 0.6;
  margin-bottom: 18px;
  color: var(--brand);
  font-weight: 800;
}

.quote-card figcaption {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

.quote-card figcaption b {
  color: var(--ink);
}

/* ---------- 通用卡片与列表工具 ---------- */
.card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 28px;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
}

.card p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

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

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

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

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* 左右分屏内容区块（文案 + 截图/卡片） */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  align-items: center;
}

.split--reverse > .split-media {
  order: -1;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .split--reverse > .split-media {
    order: 0;
  }
}

/* 步骤列表（安装步骤 / 上手路径） */
.steps {
  display: grid;
  gap: 16px;
  counter-reset: step;
}

.steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #ffffff;
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: 15px;
  font-weight: 800;
  color: var(--brand);
  margin-top: 2px;
}

.steps b {
  display: block;
  font-size: 15px;
}

.steps span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

/* 功能勾选横条（“所有版本均含”等） */
.check-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
  padding: 18px 24px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}

.check-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-strip svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
}

/* ---------- 页脚：4 列 sitemap + 版权行 ---------- */
.footer {
  width: calc(100cqw);
  margin-left: calc(50% - 50cqw);
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px var(--content-gutter) 0;
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 32px;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 280px;
  font-size: 14px;
  color: var(--muted);
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col ul {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.footer-col a {
  color: var(--muted);
}

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

.footer-bottom {
  max-width: var(--content-width);
  margin: 48px auto 0;
  padding: 20px var(--content-gutter) 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom a {
  color: var(--muted);
}

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

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---------- 滚动淡入（可选，JS 加 .is-in） ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 全局动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 640px 以下：安全边距收敛为 14px ---------- */
@media (max-width: 640px) {
  :root {
    --content-gutter: 14px;
  }

  .section {
    padding-top: var(--section-sm);
    padding-bottom: var(--section-sm);
  }

  .band {
    padding-top: var(--section-sm);
    padding-bottom: var(--section-sm);
  }

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

/* ---------- 博客：列表页与文章详情页 ---------- */
/* 文章元信息行：日期 · 阅读时长 */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13px;
  color: var(--muted);
}

/* 徽章 / 标签行 */
.post-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* 精选文章大卡：封面图贴边 + 内容区 50/50，radius 24 + 轻阴影（灰边/阴影二选一，此处用阴影） */
.post-featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-radius: var(--r-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow 0.18s ease;
}

.post-featured:hover {
  box-shadow: var(--shadow-lg);
}

.post-featured-media {
  display: flex;
  align-items: center;
  background: var(--surface);
}

.post-featured-media img {
  width: 100%;
  height: auto;
  display: block;
}

.post-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 48px;
}

.post-featured-body .post-meta {
  margin-top: 12px;
}

.post-featured-body h2 {
  margin-top: 14px;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post-featured-body h2 a {
  color: var(--ink);
}

.post-featured-body h2 a:hover {
  color: var(--brand);
}

.post-featured-body .post-excerpt {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

.post-featured-body .btn {
  margin-top: 22px;
  align-self: flex-start;
}

/* 文章卡片网格：桌面三列，封面图置顶 + 分类徽章悬浮图上左上角 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow 0.18s ease;
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
}

.post-card-media {
  position: relative;
  display: block;
}

.post-card-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* 悬浮分类徽章：白色玻璃感 */
.post-card-media .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(16, 20, 24, 0.06);
  color: var(--ink);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 26px 26px;
}

.post-card-body h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
}

.post-card-body h3 a {
  color: var(--ink);
}

.post-card-body h3 a:hover {
  color: var(--brand);
}

.post-card-body .post-excerpt {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-body .post-meta {
  margin-top: auto;
  padding-top: 16px;
}

/* 文章页头部：面包屑 / 标签 / 标题 / 作者行 */
.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.post-breadcrumb a {
  color: var(--muted);
}

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

.post-breadcrumb [aria-current] {
  color: var(--ink);
}

.post-head {
  padding-top: 40px;
}

.post-head .post-badges {
  margin-top: 18px;
}

.post-head .page-title {
  margin-top: 18px;
}

.post-author {
  margin-top: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.post-author-id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.post-author-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.post-author-role {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

/* 双栏布局：TOC 侧栏 + ≤768px 正文列（页面外轮廓仍共享 --content-width 体系） */
.post-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 768px);
  gap: 56px;
  padding-top: 48px;
}

/* TOC：sticky，当前小节高亮 = 加粗 + 品牌蓝左竖线 */
.post-toc {
  position: sticky;
  top: 88px;
  align-self: start;
}

.post-toc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 12px;
}

.post-toc ul {
  display: grid;
  gap: 2px;
}

.post-toc a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 3px solid transparent;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.post-toc a:hover {
  color: var(--ink);
}

.post-toc a.is-active {
  border-left-color: var(--brand);
  color: var(--ink);
  font-weight: 700;
}

/* 封面图：与正文上下留白加大 */
.post-cover {
  margin: 0 0 48px;
}

/* 正文排版：长文阅读规格 17px / 1.85 */
.post-body {
  font-size: 17px;
  line-height: 1.85;
  color: rgba(16, 20, 24, 0.85);
}

.post-body h2 {
  margin-top: 56px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  scroll-margin-top: 88px;
}

.post-body h2:first-child {
  margin-top: 0;
}

.post-body p {
  margin-top: 22px;
}

.post-body ul,
.post-body ol {
  margin-top: 22px;
  padding-left: 24px;
  display: grid;
  gap: 10px;
}

.post-body ul li {
  list-style: disc;
}

.post-body ol li {
  list-style: decimal;
}

.post-body li::marker {
  color: var(--brand);
  font-weight: 700;
}

.post-body blockquote {
  margin: 28px 0 0;
  padding: 18px 22px;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--brand-50);
  color: var(--ink);
  font-weight: 500;
}

.post-body code {
  padding: 2px 7px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
}

.post-body pre {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--charcoal);
  color: #f2f5fa;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
}

.post-body pre code {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
}

.post-body img {
  margin-top: 28px;
  border-radius: var(--r-md);
}

/* 文末：相关阅读 */
.post-related {
  margin-top: 72px;
}

@media (max-width: 1020px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  /* 移动端：TOC 隐藏，正文列占满 */
  .post-layout {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .post-toc {
    display: none;
  }

  .post-featured {
    grid-template-columns: 1fr;
  }

  .post-featured-body {
    padding: 28px;
  }
}

@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= 侧边快捷服务浮窗（参考 bootcamp 示例） ================= */
/* 右侧垂直居中卡片；回到顶部绝对定位挂在卡片下方，出现时不挤压卡片 */
.side-widget {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none; /* 与示例一致：仅桌面端显示 */
}

@media (min-width: 768px) {
  .side-widget {
    display: block;
  }
}

.side-nav {
  display: flex;
  flex-direction: column;
  width: 64px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}

.side-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.side-item + .side-item {
  border-top: 1px solid var(--line);
}

.side-item:first-child {
  border-radius: var(--r-md) var(--r-md) 0 0;
}

.side-item:last-child {
  border-radius: 0 0 var(--r-md) var(--r-md);
}

.side-item:hover {
  background: var(--surface);
}

.side-item-icon {
  display: flex;
  transition: transform 0.2s ease;
}

.side-item:hover .side-item-icon {
  transform: scale(1.1);
}

.side-item-icon--wechat {
  color: #07c160;
}

.side-item-icon--brand {
  color: var(--brand);
}

.side-item-icon--amber {
  color: #f59e0b;
}

.side-item-label {
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  transition: color 0.2s ease;
}

.side-item:hover .side-item-label {
  color: var(--ink);
}

/* 悬停弹层：出现在条目左侧，垂直居中对齐 */
.side-pop {
  position: absolute;
  right: 100%;
  top: 50%;
  z-index: 50;
  padding-right: 16px;
  transform: translate(12px, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.side-item:hover .side-pop,
.side-item.is-open .side-pop {
  transform: translate(0, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.side-pop-card {
  display: block;
  width: 208px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}

.side-pop-header {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
  text-align: center;
}

.side-pop-header--wechat {
  background: #07c160;
}

.side-pop-header--brand {
  background: var(--brand);
}

.side-pop-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.side-pop-body img {
  width: 160px;
  height: 160px;
  border-radius: var(--r-sm);
}

.side-pop-caption {
  font-size: 12px;
  color: var(--muted);
}

/* 回到顶部：绝对定位在卡片下方，隐藏时不占文档流、不影响卡片位置 */
.side-top {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  padding: 12px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease,
    background 0.2s ease;
}

.side-top:hover {
  color: var(--brand);
  background: var(--surface);
}

.side-top.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* 二维码弹层（浮窗与页脚图标共用） */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 20, 32, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.qr-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.qr-modal-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 28px 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(0.97);
  transition: transform 0.25s ease;
  max-width: 320px;
  width: 100%;
}

.qr-modal.is-open .qr-modal-card {
  transform: translateY(0) scale(1);
}

.qr-modal-card img {
  width: 220px;
  height: 220px;
  display: block;
  margin: 0 auto 14px;
  border-radius: var(--r-sm);
}

.qr-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.qr-modal-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}

.qr-modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* ================= 页脚社交媒体图标 ================= */
.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-social-btn:hover {
  color: var(--brand);
  border-color: var(--brand-100);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .footer-social {
    margin-left: 0;
  }
}
