/* yue.lat official site styles. Tokens come from yue-tokens.css. */

* { box-sizing: border-box; }
/* WCAG 2.3.3: 平滑滚动只给未声明减少动效的用户 */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
/* 跨页 View Transition（Chrome 126+ / Safari 18.2+，不支持则普通跳转）。
   减少动效用户直接豁免：::view-transition 伪元素不被 tokens 的 * 兜底命中。 */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
/* Public site copy deterrent. Keep text editing usable inside controls and the
   support widget; this is a browser-side policy, not a data-security claim. */
:where(input, textarea, [contenteditable="true"]) {
  -webkit-user-select: text;
  user-select: text;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
:where(a, button, input, summary, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--action-fill);
  color: #fff;
  font-weight: var(--fw-emphasis);
  transform: translateY(-160%);
  transition: transform var(--motion-fast) var(--motion-ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* padding-bottom 76px: 客服悬浮球 (fixed right:20 bottom:20, 52px) 在所有宽度
   都存在; 1025-1295px 桌面窗口下它曾压住页脚最右链接并吃掉点击 (实测重叠
   24px, elementFromPoint 命中 FAB)。原让位只写在 ≤768px 分支。 */
.site-shell { min-height: 100vh; position: relative; display: flex; flex-direction: column; padding-bottom: 76px; }
.site-shell::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--brand) 3%, transparent), transparent 70%);
}
[data-theme="dark"] .site-shell::before {
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--brand) 6%, transparent), transparent 80%);
}
/* `clip` 而不是 `hidden`：`overflow-x:hidden` 会把 `.site-shell` 变成滚动容器，
   于是 `.site-nav{position:sticky}` 相对这个「永不滚动」的盒子粘住 = 整条导航跟着页面滚走。
   `clip` 同样禁掉横向滚动，但不建立滚动容器，sticky 才真正生效。
   两条声明是渐进增强：不认 `clip` 的老浏览器丢掉第二条、退回 `hidden`（sticky 仍失效
   但横向滚动照样禁掉），认 `clip` 的按第二条走。 */
html, body, .site-shell { overflow-x: hidden; overflow-x: clip; }
/* `.button{display:inline-flex}` 等作者规则的优先级高于 UA 的 [hidden]{display:none}，
   没有这条兜底，`hidden` 的重试/备用下载源按钮会一直露出来。 */
[hidden] { display: none !important; }
main { flex: 1; }
.container { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin: 0 auto; }

/* ========== Nav ========== */
.site-nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(200%) blur(32px);
  -webkit-backdrop-filter: saturate(200%) blur(32px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--fw-display);
  font-size: 15px;
  color: var(--text);
}
.brand img {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--fw-emphasis);
}
.nav-links a:hover {
  background: var(--surface-soft);
  color: var(--text);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--motion-base) var(--motion-ease-out);
}
.theme-toggle:hover {
  background: var(--surface-soft);
  color: var(--text);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ========== Buttons ========== */
.button {
  height: 44px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: var(--fw-emphasis);
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  /* Controls separate with a 1px border, not a drop shadow (Yue 2026
   * §Separation). The old resting/hover shadow pair made every secondary
   * button lift further than the primary one next to it. */
  box-shadow: none;
  transition: all var(--motion-base) var(--motion-ease-out);
}
.button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
/* ONE primary treatment (Yue 2026 §Hierarchy).
 * `.primary` and `.brand` used to be two different emphasis styles for the
 * same role — `.primary` was a gradient with an inset highlight and a 28%
 * brand glow, `.brand` was a flat fill. index.html reached for `.primary`,
 * download.html for `.brand`, so the single most important button on the site
 * changed appearance depending on which page you were on. They are now one
 * rule: flat brand fill, no gradient, no glow. Emphasis comes from being the
 * only filled button on the screen, not from decoration. `.brand` is kept as
 * an alias purely so existing markup keeps working. */
.button.primary,
.button.brand {
  background: var(--action-fill);
  color: #ffffff;
  border-color: var(--action-fill);
  box-shadow: none;
}
.button.primary:hover,
.button.brand:hover {
  background: var(--action-fill-hover);
  border-color: var(--action-fill-hover);
  color: #ffffff;
  box-shadow: none;
  transform: translateY(-1px);
}
.button.ghost {
  background: transparent;
}
.button.ghost:hover {
  background: var(--surface-soft);
}
.button.small { height: 38px; padding: 0 16px; font-size: 14px; }
.button.block { width: 100%; }
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
  box-shadow: none;
}
.button.menu-button { display: none; width: 38px; padding: 0; }
.hamburger-icon {
  width: 16px;
  display: grid;
  gap: 4px;
}
.hamburger-icon span {
  display: block;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.mobile-menu { display: none; padding: 8px 0 16px; border-top: 1px solid var(--line-soft); }
.mobile-menu.open { display: grid; gap: 4px; }
.mobile-menu a, .mobile-menu button {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--muted);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-weight: var(--fw-emphasis);
  font-size: 14px;
}
.mobile-menu a:hover, .mobile-menu button:hover {
  background: var(--surface-soft);
  color: var(--text);
}
/* ========== Typography Utilities ========== */
.text-gradient {
  background: linear-gradient(135deg, var(--brand-strong) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="dark"] .text-gradient {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* forced-colors（Windows 高对比）会移除 background 渐变，但 transparent 的
   text-fill 会保留 → 渐变文字整段隐形。三处渐变文字统一兜底回系统前景色。 */
@media (forced-colors: active) {
  .text-gradient,
  [data-theme="dark"] .text-gradient,
  .kicker,
  [data-theme="dark"] .kicker,
  .tile-eyebrow,
  [data-theme="dark"] .tile-eyebrow {
    background: none;
    -webkit-text-fill-color: currentColor;
    background-clip: border-box;
  }
}

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 160px 0 0;
  overflow: hidden;
}

.hero-grid-bg {
  display: block;
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 60%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 60%);
  z-index: 0;
}

/* 分层品牌染色氛围：一条压顶的椭圆主光 + 左右两点低饱和点光。
   浅色档克制（≤9%），深色档重调而非同值放大——深色底上同样的百分比会显脏。 */
.hero-halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% -12%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 70%),
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--brand) 5%, transparent), transparent 42%),
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 42%);
  filter: blur(80px);
  opacity: 1;
  z-index: 0;
}
[data-theme="dark"] .hero-halo {
  background:
    radial-gradient(ellipse 70% 50% at 50% -12%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 42%),
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 42%);
  opacity: 0.9;
}

.hero-content {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

.status-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--text);
  font-size: 13px;
  font-weight: var(--fw-emphasis);
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all var(--motion-slow) var(--motion-ease-out);
  cursor: pointer;
}
[data-theme="dark"] .status-strip {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.status-strip:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: var(--line);
}
.status-strip .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent), 0 0 8px var(--brand);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 40%, transparent); }
  70% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 0%, transparent); }
}
.status-strip .status-text {
  color: var(--text);
}
.status-strip .sep { color: var(--subtle); font-family: var(--font-mono); transition: transform var(--motion-base) var(--motion-ease-out); }
.status-strip:hover .sep { transform: translateX(2px); color: var(--text); }

h1 {
  margin: 0 0 24px;
  font-size: var(--fs-display);
  line-height: 1.05;
  font-weight: var(--fw-display);
  letter-spacing: -0.05em;
  color: var(--text);
}

/* 标题防孤字（Baseline 全绿）；正文 pretty 是渐进增强（Firefox 未发，降级无害） */
h1, h2, h3, .section-desc { text-wrap: balance; }
.legal-content p, .hero-lead, details p, .tile p { text-wrap: pretty; }

/* 全站数字列等宽对齐（版本号 / 延迟 / 价格 / 日期） */
.platform-meta,
.dl-release-meta,
.legal-meta,
.region-meta { font-variant-numeric: tabular-nums; }

/* ===== 入场显影（渐进增强）=====
 * yue-site.js 在 IntersectionObserver 可用且访客未声明减少动效时才给元素挂
 * .reveal；无 JS / 老浏览器 / 减少动效用户看到的是完整静态页。位移只有 8px、
 * 只动 opacity/transform（合成层），显影完成后 JS 会摘掉类，恢复元素原本的
 * hover 过渡。时长/曲线取共享档 --motion-slow + --motion-ease-out。 */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--motion-slow) var(--motion-ease-out), transform var(--motion-slow) var(--motion-ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}

.nowrap { white-space: nowrap; }

.hero-lead {
  max-width: 640px;
  margin: 0 0 48px;
  font-size: 22px;
  line-height: 1.6;
  color: var(--subtle);
  font-weight: var(--fw-body);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* Hero 信任条：只复述站内已有的事实（FAQ 的覆盖说法 / 下载页的平台数），
   不发明数字。数字列 tabular-nums 对齐。 */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  margin-top: 48px;
  color: var(--muted);
}
.hero-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 28px;
  text-align: center;
}
.hero-trust-item + .hero-trust-item {
  border-left: 1px solid var(--line-soft);
}
.hero-trust-item strong {
  color: var(--text);
  font-size: 18px;
  font-weight: var(--fw-heading);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.hero-trust-item span {
  font-size: var(--fs-meta);
  color: var(--subtle);
  font-weight: var(--fw-label);
}

/* ========== Hero stage — HTML/CSS app frame mocks (replaceable) ========== */
.hero-visual {
  margin-top: 100px;
  perspective: 1200px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.mock {
  margin: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  overflow: hidden;
  background: var(--surface-frame);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  /* 顶缘 specular 细线（inset 1px）：让「玻璃窗」有受光面。悬浮 mock 是
     深色允许投影的唯一例外（真 overlay）。 */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 20px 40px -10px rgba(0, 0, 0, 0.1),
    0 40px 80px -15px rgba(0, 0, 0, 0.15),
    0 0 0 1px var(--line);
  border: none;
  border-bottom: none;
  transition: transform var(--motion-slow) var(--motion-ease-out), box-shadow var(--motion-slow) var(--motion-ease-out);
}
[data-theme="dark"] .mock {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent),
    0 0 64px color-mix(in srgb, var(--brand) 15%, transparent),
    0 40px 100px rgba(0, 0, 0, 0.9);
}

.mock-center {
  width: 100%;
  max-width: 960px;
  height: 460px;
  display: flex;
  justify-content: center;
  padding-top: 80px;
  transform: rotateX(6deg) translateY(20px) scale(0.95);
  transform-origin: bottom center;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
}
.mock-center:hover {
  transform: rotateX(2deg) translateY(0px) scale(1);
}

.mock-widget {
  width: 340px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 0 20px rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .mock-widget {
  background: linear-gradient(135deg, rgba(30, 34, 40, 0.6) 0%, rgba(15, 17, 20, 0.4) 100%);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.02);
}
.frame-row--head {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  /* 与 .region-row 的 0 12px 同一内缩, 右侧「延迟」数值列才与表头贴齐 */
  padding: 0 12px;
}
.frame-app-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
}
.frame-app-name { font-weight: var(--fw-heading); font-size: 14px; color: var(--text); }
.frame-app-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.frame-status {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
}
/* CSS 圆点替代中文圆点字符（字符渲染依赖字体，尺寸/基线不可控） */
.frame-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.frame-region { display: grid; gap: 6px; }
.region-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid transparent;
}
.region-row.active {
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border-color: color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--text);
  font-weight: var(--fw-emphasis);
}
.region-meta { font-variant-numeric: tabular-nums; font-size: 11px; }


/* ========== Sections ========== */
.section { padding: 160px 0; border-top: 1px solid var(--line-soft); position: relative; }
.section.alt { background: var(--mist-50); border-top: 1px solid var(--line); }
/* 深色模式补覆盖: --mist-50 是原始色阶 token, dark 块从不重定义 → 曾整块白板
   + 白字 h2 对比度 1.00:1 (系统深色访客首屏即中)。cta-band/.toc 同源引用早有
   dark 覆盖, 此处是唯一漏网。 */
[data-theme="dark"] .section.alt { background: var(--surface); }
/* 粘性导航会盖住锚点落点（`#product` / `#pricing` / `#faq` / 跳到主要内容），
   和 `.legal-content section[id]` 用同一个 92px 让位。 */
.section[id], main[id] { scroll-margin-top: 92px; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 48px;
}

.kicker {
  background: linear-gradient(135deg, var(--brand-strong) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 13px;
  font-weight: var(--fw-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
}
[data-theme="dark"] .kicker {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  margin: 8px 0 0;
  font-size: var(--fs-h2);
  line-height: 1.1;
  font-weight: var(--fw-display);
  letter-spacing: -0.04em;
}

h3 {
  margin: 0 0 9px;
  font-size: var(--fs-h3);
  line-height: 1.3;
  font-weight: var(--fw-heading);
  letter-spacing: -0.01em;
}

.section-desc { color: var(--subtle); font-size: 20px; margin: 0; font-weight: var(--fw-body); max-width: 600px; }

/* Cards: 1px stroke at rest, hover = micro-lift(-2px) + stroke strengthen
 * (Yue 2026 §Separation)。深色下静置卡不投影——层级只靠表面明度阶梯 + 1px 线，
 * hover 反馈也只走描边与位移，不加发光阴影。 */
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  padding: 36px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: border-color var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease), transform var(--motion-base) var(--motion-ease);
}
[data-theme="dark"] .card {
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.card:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--brand) 5%, rgba(0, 0, 0, 0.05));
  transform: translateY(-2px);
}
[data-theme="dark"] .card:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
}

.card p { margin: 0; color: var(--muted); }

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(var(--plan-cols, 4), minmax(0, 1fr));
  gap: 20px;
}

.pricing-toolbar {
  position: relative;
  display: inline-flex;
  margin: 0 0 40px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .pricing-toolbar {
  background: rgba(0, 0, 0, 0.2);
  border-color: var(--line);
  /* 浅色的 2% 黑 inset 在深色底上不可见，凹槽感需要更深一档 */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
.pricing-tab {
  position: relative;
  z-index: 1;
  height: 32px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-emphasis);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color var(--motion-base) var(--motion-ease-out), background var(--motion-base) var(--motion-ease-out);
}
.pricing-tab.active {
  background: var(--action-fill);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 24%, transparent);
}
[data-theme="dark"] .pricing-tab.active {
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 32%, transparent);
}
/* JS 注入滑动指示器后（.has-indicator），激活态的填充由指示器承载，
   tab 自身只保留文字反色；无 JS 时上面的 .active 填充照常生效。 */
.pricing-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--action-fill);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 24%, transparent);
  transition: transform var(--motion-base) var(--motion-ease), width var(--motion-base) var(--motion-ease);
  pointer-events: none;
}
.pricing-toolbar.has-indicator .pricing-tab.active {
  background: transparent;
  box-shadow: none;
}
.pricing-tab:hover:not(.active) {
  color: var(--text);
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.plan.featured {
  border-color: var(--brand);
  /* 品牌淡底 + 品牌描边，推荐档不用靠更大的阴影喊话 */
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--brand) 5%, var(--surface)) 100%);
  box-shadow: 0 0 0 1px var(--brand), 0 32px 64px color-mix(in srgb, var(--brand) 12%, transparent);
  transform: scale(1.04);
  z-index: 2;
}
[data-theme="dark"] .plan.featured {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--surface-soft) 0%, color-mix(in srgb, var(--brand) 8%, var(--surface-soft)) 100%);
  /* 深色静置面不投影（Yue 2026 §Dark）：推荐档层级由品牌描边 + 淡底表达 */
  box-shadow: 0 0 0 1px var(--brand), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.plan-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-strong);
  padding: 4px 8px;
  font-size: var(--fs-meta);
  font-weight: var(--fw-display);
}
[data-theme="dark"] .plan-badge { color: var(--brand-soft); }

.plan-name { padding-right: 70px; font-size: 18px; font-weight: var(--fw-display); }
/* 字重阶梯上限 700（Yue 2026 §2.3）：旧 900 在系统字栈上落到合成粗体。 */
.price { margin: 12px 0 8px; font-size: 36px; line-height: 1; font-weight: var(--fw-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: 14px; color: var(--subtle); font-weight: var(--fw-heading); }
.plan ul { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 12px; color: var(--muted); font-size: 15px; }
.plan li { display: flex; align-items: center; gap: 10px; }
/* 纯 CSS 勾选符（两条边框旋转 45°）：不引外部资源、不碰 data: URI（CSP self-only），
   currentColor 之外用 --brand 让明暗档自动翻转。宽高是字形笔画，不是间距刻度。 */
.plan li::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 9px;
  margin: 0 5px 2px 3px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg);
}
.plan .button { margin-top: auto; }
.pricing-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  color: var(--muted);
  text-align: center;
  background: var(--surface-soft);
}

.faq { display: grid; gap: 10px; }
details {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: border-color var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease);
}
[data-theme="dark"] details {
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
details:hover, details[open] {
  border-color: var(--line-strong);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] details:hover, [data-theme="dark"] details[open] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

summary {
  min-height: 64px;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0 24px;
  font-weight: var(--fw-display);
  font-size: 16px;
}

details p { margin: 0; padding: 0 24px 24px; color: var(--muted); line-height: 1.7; }

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 48px 0 40px;
  color: var(--subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
  align-items: start;
}

.footer-col { display: grid; gap: 2px; justify-items: start; }
.footer-col h4 {
  margin: 0 0 10px;
  font-size: var(--fs-meta);
  font-weight: var(--fw-emphasis);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--subtle);
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  font-size: 14px;
  transition: color var(--motion-fast) var(--motion-ease-out);
}
.footer-col a:hover { color: var(--text); }
.footer-tagline { margin: 12px 0 0; font-size: 13px; color: var(--subtle); max-width: 260px; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--subtle);
}
.footer-bottom p { margin: 0; }

/* ========== Legal & Doc Pages ========== */
.legal-main { padding: 40px 0 80px; }
.legal-header { text-align: center; margin-bottom: 56px; }
.legal-header h1 { font-size: 40px; margin-bottom: 16px; letter-spacing: -0.03em; }
.legal-meta { display: flex; justify-content: center; gap: 16px; color: var(--subtle); font-size: 14px; font-family: var(--font-mono); }
.legal-meta .dot { color: var(--brand); }

.legal-content section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 40px; margin-bottom: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: border-color var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease), transform var(--motion-base) var(--motion-ease);
}
.legal-content section[id] { scroll-margin-top: 92px; }
[data-theme="dark"] .legal-content section {
  background: var(--surface-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.legal-content section:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--brand) 5%, rgba(0,0,0,0.05)); transform: translateY(-2px);
}
[data-theme="dark"] .legal-content section:hover {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.legal-content h2 { font-size: 22px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.legal-content h2 .num, .legal-content h2 .ico { color: var(--brand); font-size: 16px; font-family: var(--font-mono); background: color-mix(in srgb, var(--brand) 10%, transparent); padding: 2px 8px; border-radius: var(--r-sm); }
.legal-content h2 .ico { display: inline-flex; align-items: center; padding: 5px 8px; }
.legal-content h2 .ico svg { display: block; }
[data-theme="dark"] .legal-content h2 .num,
[data-theme="dark"] .legal-content h2 .ico { color: var(--brand-soft); }
.legal-content h3 { font-size: 18px; margin: 28px 0 12px; }
.legal-content p, .legal-content ul, .legal-content ol { color: var(--muted); margin-bottom: 16px; line-height: 1.7; }
.legal-content ul, .legal-content ol { padding-left: 24px; }
.legal-content li { margin-bottom: 8px; }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content a { color: var(--brand-strong); text-decoration: none; font-weight: 500; }
.legal-content a:hover { text-decoration: underline; }

.toc { background: linear-gradient(180deg, var(--surface) 0%, var(--mist-50) 100%); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px; margin-bottom: 40px; }
[data-theme="dark"] .toc { background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface) 100%); }
.toc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--subtle); margin-bottom: 16px; }
.toc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.toc-grid a { display: block; padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; border-radius: var(--r-md); background: var(--surface-soft); border: 1px solid transparent; transition: all var(--motion-fast) var(--motion-ease-out); }
.toc-grid a:hover { color: var(--brand-strong); background: var(--surface); border-color: color-mix(in srgb, var(--brand) 30%, transparent); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
/* 深色下 var(--surface) 比静置底 --surface-soft 更暗、黑投影不可见：
   hover 反馈改由品牌淡底 + 描边表达（深色静置面不投影）。 */
[data-theme="dark"] .toc-grid a:hover {
  color: var(--brand-soft);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  box-shadow: none;
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-soft);
}
.policy-links[id] { scroll-margin-top: 92px; }
.policy-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--fw-emphasis);
}
.policy-links a:hover { color: var(--brand-strong); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }

.callout { padding: 16px 20px; border-radius: var(--r-lg); margin: 20px 0; font-size: 14px; display: flex; gap: 12px; align-items: flex-start; line-height: 1.6; }
.callout-info { background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); color: var(--brand-strong); }
.callout-danger { background: color-mix(in srgb, var(--state-danger) 10%, transparent); border: 1px solid color-mix(in srgb, var(--state-danger) 20%, transparent); color: var(--state-danger-text); }
.callout-warn { background: color-mix(in srgb, var(--state-warning) 10%, transparent); border: 1px solid color-mix(in srgb, var(--state-warning) 20%, transparent); color: var(--state-warning-text); }
.callout p { color: inherit !important; margin: 0 !important; }

.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 24px; }
.rule-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-soft); border-radius: var(--r-md); font-size: 14px; color: var(--muted); border: 1px solid var(--line); }
.rule-item .x { color: var(--state-danger); font-weight: 700; }

.scenario { display: flex; gap: 20px; padding: 24px; background: var(--surface-soft); border-radius: var(--r-lg); margin: 16px 0; border: 1px solid var(--line); transition: all var(--motion-base) var(--motion-ease-out); }
.scenario:hover { background: var(--surface); border-color: var(--line-soft); box-shadow: 0 8px 24px rgba(0,0,0,0.04); }
/* 深色下同样修正 hover 方向（surface 比 surface-soft 暗）并去掉黑投影。 */
[data-theme="dark"] .scenario:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.scenario-icon { line-height: 1; color: var(--subtle); }
.scenario-icon svg { width: 28px; height: 28px; display: block; }
.scenario-body { flex: 1; }
.scenario-title { font-weight: 700; color: var(--text); margin-bottom: 8px; font-size: 16px; }
.scenario-desc { color: var(--muted); font-size: 14px; margin: 0 0 12px !important; }
.scenario-result { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-sm); }
.result-no { background: color-mix(in srgb, var(--state-danger) 15%, transparent); color: var(--state-danger-text); }
.result-maybe { background: color-mix(in srgb, var(--state-warning) 15%, transparent); color: var(--state-warning-text); }

.data-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--subtle); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-soft); }
.data-table td { color: var(--muted); }
.data-table tr:hover td { background: var(--surface-soft); }

.sev-ban { background: color-mix(in srgb, var(--state-danger) 15%, transparent); color: var(--state-danger-text); padding: 2px 8px; border-radius: var(--r-sm); font-size: 12px; margin-left: 8px; }
.sev-warn { background: color-mix(in srgb, var(--state-warning) 15%, transparent); color: var(--state-warning-text); padding: 2px 8px; border-radius: var(--r-sm); font-size: 12px; margin-left: 8px; }
.sev-block { background: var(--accent-badge-bg); color: var(--accent-badge-text); padding: 2px 8px; border-radius: var(--r-sm); font-size: 12px; margin-left: 8px; }

/* ========== Download page (Phase 3) ========== */
.download-hero {
  position: relative;
  padding: 56px 0 36px;
  overflow: hidden;
}

.dl-hero {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.download-hero .hero-lead { margin-inline: auto; }
.dl-hero-icon { margin-bottom: 24px; }
.dl-hero-icon img {
  width: 72px;
  height: 72px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-hero);
}

.dl-release-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
  font-size: 13px;
  color: var(--muted);
  font-feature-settings: 'tnum';
}
.dl-release-meta .sep { color: var(--subtle); }
.dl-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: var(--fw-emphasis);
  font-size: 12px;
}

.release-state {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 18px 20px;
  display: grid;
  /* 两列 (圆点 | 正文), 按钮组落第二列下方: 旧三列布局里 auto 轨按 max-content
     (468px) 先于 1fr 分配, 失败态解释文案被压成 212px 竖条; align-items:center
     还让状态圆点落到面板垂直中点, 离它标注的标题 ~83px。≤768px 分支本就是
     这套正确布局, 现提升为基础规则。 */
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  text-align: left;
}
/* 深色下 --shadow-card:none，靠投影分层的三块面板会贴死画布。改按
   §Dark 的做法分层：更亮一档的表面 + 顶缘细线（用法层，不动 tokens）。 */
[data-theme="dark"] .release-state,
[data-theme="dark"] .platform-card,
[data-theme="dark"] .error-card {
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.release-state::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 14%, transparent);
}
.release-state[data-state="success"]::before { background: var(--state-success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--state-success) 13%, transparent); }
.release-state[data-state="error"]::before { background: var(--state-danger); box-shadow: 0 0 0 5px color-mix(in srgb, var(--state-danger) 13%, transparent); }
.release-state-copy strong { display: block; color: var(--text); font-size: 14px; }
.release-state-copy p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.release-state-why { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.release-state-why code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  font-size: 12px;
}
.release-state-actions { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
.release-state-actions .button { height: 36px; padding-inline: 14px; font-size: 13px; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.platform-card {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow-card);
  transition: border-color var(--motion-fast) var(--motion-ease-out), box-shadow var(--motion-fast) var(--motion-ease-out), transform var(--motion-fast) var(--motion-ease-out);
}
.platform-card:hover {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  transform: translateY(-1px);
}
.platform-card[data-platform-current] {
  order: 1;
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent), var(--shadow-card);
}
/* One primary action per screen (Yue 2026 §Hierarchy).
 * Every one of the five platform cards ships a filled `.button.brand`, so the
 * download page presented six filled brand buttons at once (hero + 5 cards)
 * and none of them read as "the one you want". `yue-site.js` already detects
 * the visitor's platform and marks that card `data-platform-current` (it also
 * sorts it to the front) — so the card that matters keeps the filled button
 * and the other four demote to the neutral treatment. Done here rather than in
 * the markup because the attribute is only known at runtime.
 * The buttons stay identical in size, position and label; only emphasis moves. */
.platform-card:not([data-platform-current]) .button.brand {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
.platform-card:not([data-platform-current]) .button.brand:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--text);
}

.platform-card-head {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
}
.platform-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  display: grid;
  place-items: center;
  color: var(--brand);
}
.platform-card-icon svg { width: 22px; height: 22px; }
.platform-card-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: var(--fw-heading);
}
.platform-tagline {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.platform-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-feature-settings: 'tnum';
}
.platform-meta .sep { color: var(--subtle); }

.platform-steps {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}
.platform-steps summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: var(--fw-emphasis);
  color: var(--muted);
}
.platform-steps summary::-webkit-details-marker { display: none; }
.platform-steps summary::after {
  content: '↓';
  margin-left: 6px;
  transition: transform var(--motion-fast) var(--motion-ease-out);
}
.platform-steps[open] summary::after { transform: rotate(180deg); }
.platform-steps ol {
  margin: 12px 0 0;
  padding: 0 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.platform-steps code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}

.advanced-fold {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  padding: 0;
}
.advanced-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: var(--fw-emphasis);
  color: var(--muted);
}
.advanced-fold summary::-webkit-details-marker { display: none; }
.advanced-fold .fold-toggle {
  font-size: 12px;
  color: var(--subtle);
}
.advanced-fold .fold-toggle::before { content: '展开 ↓'; }
.advanced-fold[open] .fold-toggle::before { content: '收起 ↑'; }
.advanced-body {
  padding: 0 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.advanced-body p { margin: 0; line-height: 1.65; }
.advanced-body .button { align-self: flex-start; margin-top: 4px; }

/* ========== Recovery / error pages ========== */
.error-page {
  min-height: 66vh;
  display: grid;
  place-items: center;
  padding: 64px 0;
}
.error-card {
  width: min(680px, 100%);
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.error-code {
  margin: 0;
  color: var(--brand);
  font-size: clamp(72px, 16vw, 132px);
  font-weight: var(--fw-display);
  line-height: .9;
  letter-spacing: -.08em;
  font-variant-numeric: tabular-nums;
}
.error-title { margin: 24px 0 10px; font-size: clamp(26px, 5vw, 38px); }
.error-desc { max-width: 520px; margin: 0 auto; color: var(--muted); }
.error-en { margin: 8px auto 0; color: var(--subtle); font-size: 14px; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.error-help { margin: 22px 0 0; color: var(--subtle); font-size: 13px; }
.error-help a { color: var(--brand-strong); font-weight: var(--fw-emphasis); }

/* ========== Bento (Phase 1 second screen) ========== */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 20px;
}
.tile {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: border-color var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease), transform var(--motion-base) var(--motion-ease);
}
[data-theme="dark"] .tile {
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.tile:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--brand) 5%, rgba(0, 0, 0, 0.05));
}
[data-theme="dark"] .tile:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
}
/* Bento 图标：stroke 线性 SVG，currentColor 随主题翻档 */
.tile-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand);
}
[data-theme="dark"] .tile-icon {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-strong);
}
.tile-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile-lg { grid-column: span 4; grid-row: span 2; padding: 28px; }
.tile-md { grid-column: span 2; grid-row: span 2; }
.tile-sm { grid-column: span 2; grid-row: span 1; }

.tile h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: var(--fw-display);
  letter-spacing: -0.02em;
  color: var(--text);
}
.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.tile-eyebrow {
  font-size: var(--fs-meta);
  background: linear-gradient(135deg, var(--brand-strong) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: var(--fw-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  display: inline-block;
}
[data-theme="dark"] .tile-eyebrow {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tile-mock { margin-top: auto; padding-top: 20px; }
.mini-frame {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-soft);
}
.mini-frame-body { padding: 14px; }
.mini-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
}
.mini-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  object-fit: cover;
}
.mini-name { font-size: 13px; font-weight: var(--fw-heading); color: var(--text); }
.mini-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }

.region-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}
.region-tags span {
  height: 26px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: var(--fw-emphasis);
}
[data-theme="dark"] .region-tags span {
  color: var(--brand-soft);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

/* ========== Responsive ==========
 * 断点顺序即优先级：1024 → 980 → 768 → 640 → 380。窄断点必须排在宽断点之后，
 * 否则同名声明会被后来的宽断点整块盖掉（640 块曾因排在 768 前整块失效）。 */
@media (max-width: 1024px) {
  .section-head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .nav-links { display: none; }
  .button.menu-button { display: inline-flex; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan.featured { transform: none; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile-lg, .tile-md, .tile-sm { grid-column: 1; grid-row: auto; }
}

/* ========== Mobile polish ========== */
@media (max-width: 768px) {
  body { font-size: 15px; }

  .site-nav { position: sticky; }
  .nav-inner {
    height: 64px;
    gap: 10px;
  }
  .brand {
    min-width: 0;
    gap: 8px;
  }
  .brand img {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
  }
  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-actions {
    gap: 6px;
    flex: 0 0 auto;
  }
  .theme-toggle,
  .button.menu-button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
  .mobile-menu {
    margin: 0 0 12px;
    padding: 10px 0 12px;
    border-top: 1px solid var(--line-soft);
  }
  .mobile-menu.open {
    display: grid;
    gap: 6px;
  }
  .mobile-menu a,
  .mobile-menu button {
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    justify-content: flex-start;
  }

  .container { width: min(100% - 24px, var(--max)); }
  .section {
    padding: 72px 0;
  }
  .section-head {
    gap: 14px;
    margin-bottom: 28px;
  }
  .section-desc {
    font-size: 16px;
    line-height: 1.7;
  }
  h2 {
    font-size: 30px;
    line-height: 1.16;
  }
  h3,
  .tile h3 {
    font-size: 22px;
  }
  .card,
  .tile,
  .plan,
  .legal-content section {
    padding: 24px;
    border-radius: var(--r-lg);
  }
  .card:hover,
  .tile:hover,
  .legal-content section:hover {
    transform: none;
  }

  .hero {
    padding: 72px 0 0;
  }
  .hero-grid-bg {
    background-size: 48px 48px;
  }
  .status-strip {
    max-width: 100%;
    min-width: 0;
    justify-content: center;
    margin-bottom: 28px;
  }
  .status-strip .status-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  h1 {
    margin-bottom: 18px;
    font-size: 36px;
    line-height: 1.14;
    letter-spacing: 0;
  }
  .hero-lead {
    font-size: 16px;
    line-height: 1.72;
    margin-bottom: 30px;
  }
  .hero-actions,
  .download-buttons {
    width: 100%;
    max-width: 280px;
    margin-inline: auto;
    flex-direction: column;
    gap: 12px;
  }
  .hero-actions .button,
  .download-buttons .button {
    width: 100%;
  }
  .hero-trust {
    margin-top: 32px;
    gap: 12px 0;
  }
  .hero-trust-item {
    padding: 0 18px;
  }
  .hero-trust-item strong {
    font-size: 16px;
  }
  .hero-visual {
    margin-top: 52px;
  }
  .mock-center {
    height: 310px;
    padding: 56px 18px 0;
  }
  .mock-widget {
    width: min(100%, 320px);
    padding: 16px;
  }
  .frame-row--head {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }
  .frame-row,
  .mini-row {
    min-width: 0;
  }

  .bento,
  .plan-grid,
  .platform-grid,
  .rule-grid {
    grid-template-columns: 1fr;
  }
  .tile-lg,
  .tile-md,
  .tile-sm {
    grid-column: 1;
    grid-row: auto;
  }
  .region-tags span {
    font-size: 12px;
  }

  .pricing-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
  }
  .pricing-tab {
    min-width: 0;
    padding: 0 6px;
    white-space: nowrap;
  }
  .plan-name {
    padding-right: 60px;
  }
  .price {
    font-size: 32px;
  }
  .plan ul {
    font-size: 14px;
  }

  .download-hero {
    padding: 40px 0 28px;
  }
  .dl-hero-icon img {
    width: 60px;
    height: 60px;
  }
  .platform-card {
    width: 100%;
    padding: 20px;
    overflow: hidden;
  }
  .platform-card-head {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .platform-tagline,
  .platform-meta,
  .section-desc,
  .dl-release-meta {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .advanced-fold summary {
    padding: 16px 18px;
  }
  .advanced-body {
    padding: 0 18px 18px;
  }
  .advanced-body .button {
    width: 100%;
  }
  .legal-main {
    padding: 28px 0 56px;
  }
  .legal-header {
    margin-bottom: 24px;
    padding: 24px 0 8px;
  }
  .legal-header h1 {
    font-size: 32px;
    line-height: 1.14;
    letter-spacing: 0;
  }
  .legal-meta {
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
  }
  .toc {
    padding: 20px;
    margin-bottom: 24px;
  }
  .toc-grid {
    grid-template-columns: 1fr;
  }
  .legal-content h2 {
    align-items: flex-start;
    font-size: 20px;
    line-height: 1.35;
  }
  .legal-content h3 {
    font-size: 17px;
  }
  .legal-content p,
  .legal-content ul,
  .legal-content ol {
    font-size: 14px;
  }
  .legal-content ul,
  .legal-content ol {
    padding-left: 20px;
  }
  .callout,
  .scenario {
    padding: 16px;
  }
  .scenario {
    flex-direction: column;
    gap: 12px;
  }
  .data-table {
    display: block;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .policy-links {
    display: grid;
    padding: 16px;
  }
  .policy-links a { width: 100%; justify-content: center; }

  .site-footer {
    padding: 32px 0 36px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
    text-align: left;
  }
  .footer-brand-col {
    grid-column: 1 / -1;
  }
  .footer-col a {
    min-width: 0;
  }

  .error-page {
    min-height: 56vh;
    padding: 36px 0;
  }
  .error-code {
    font-size: 64px;
    letter-spacing: 0;
  }
  .error-card { padding: 32px 22px; }
  .error-actions { display: grid; }
  .error-actions .button { width: 100%; }

  /* ---- 触控目标 ≥44×44（手机上这些都是块级控件，不适用行内链接豁免）---- */
  .brand { min-height: 44px; }
  /* 641–768（平板竖屏，同样是触屏）导航右侧的 下载/控制台 仍然显示——
     `display:none` 那条在 ≤640 才生效——基础样式 `.button.small{height:38px}` 不够点。 */
  .nav-actions .button.small { height: 44px; }
  .pricing-tab { height: 44px; }
  .release-state-actions .button { height: 44px; }
  .policy-links a { min-height: 44px; }
  .footer-col a {
    min-height: 44px;
  }
  /* 状态条是通往状态页的链接，基础样式写死 `height:32px`。
     不能用伪元素扩热区——≤640 那条规则给它加了 `overflow:hidden`，会把伪元素裁掉。 */
  .status-strip { min-height: 44px; }

  /* 长文本兜底提到 768：641–768px（含 1440 的 200% 缩放 = 720px CSS 宽）
     此前落在 640 和 768 两条断点之间，拿不到 anywhere 断词。 */
  .legal-content { overflow-wrap: anywhere; }

}

/* 640 块只保留相对 768 块真正差异化的声明（与 768 重复的已并入上方，
   与 768 冲突且以 768 值为准的已删）。它必须排在 768 块之后才能生效。 */
@media (max-width: 640px) {
  .hero-visual { margin-top: 48px; perspective: none; }
  .mock-center { height: 280px; transform: scale(1) !important; mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%); }
  .nowrap { white-space: normal; }
  .hero-content, .hero-lead, .status-strip { min-width: 0; max-width: 100%; }
  .hero-lead { overflow-wrap: anywhere; }
  .status-strip { display: flex; white-space: nowrap; overflow: hidden; font-size: 11px; }
  .nav-actions .button.small:not(.menu-button) { display: none; }
  .download-hero { padding: 32px 0 24px; }
  .download-hero, .dl-hero, .platform-grid, .platform-card, .advanced-fold { min-width: 0; max-width: 100%; }
  .button { width: 100%; }
  .price { font-size: 28px; }
}

@media (max-width: 380px) {
  .container { width: min(100% - 20px, var(--max)); }
  h1 { font-size: 33px; }
  h2 { font-size: 28px; }
  .hero-lead,
  .section-desc { font-size: 15px; }
  .pricing-tab { font-size: 12px; }
  .mock-widget { width: min(100%, 300px); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-trust-item { padding: 0 16px; }
}
