/* byintent.app — 官网样式表
 *
 * 视觉真源：docs/design-system.md（「颗粒雾灰」）。色值取自设计稿 D.B「雾灰」
 * 的 sunrise（银雾）槽位，亮暗各一份，与 App 内 Theme.ID = sunrise 逐位一致。
 *
 * 与 App 的一处**有意偏离**：主按钮。App 里 btnA→btnB 是浅色渐变、btnInk 是深色，
 * 因为那颗按钮压在深色抽屉上；网页的亮态底是浅的，浅底浅按钮读不出来，所以亮态
 * 把它翻过来（底 g4 / 字 paper，即 design-system §6 审计第 10 行的 13.65:1），
 * 暗态则沿用 btnA / btnInk（11.13:1）。两态都在 AA 之上。
 */

/* ───────────────────────── 令牌 ───────────────────────── */

:root {
  color-scheme: light dark;

  /* 银雾 sunrise · 亮态（design-system §2 亮态表第 1 行） */
  --g1: #e4e8f0;
  --g2: #d5dce6;
  --g3: #b9c3cc;
  --g4: #1c2227;
  --glow: #f2f3f7;
  --ink: #1e2225;
  --deep: #0a0f12;

  /* 固定色（design-system §2 固定色表） */
  --paper: #eceeed;
  --on-paper: #1c2022;

  /* 页面角色色 */
  --bg: #e4e8f0;
  --surface: #edf0f6;
  --surface-2: #f2f4f8;
  --text: #1e2225;
  --text-dim: #3d4144;        /* ink @85% 合成于 --surface，实测 9.0:1 */
  --line: rgba(30, 34, 37, 0.16);
  --line-strong: rgba(30, 34, 37, 0.32);

  --panel: #1c2227;           /* 抽屉／深色段，对应 g4 */
  --panel-text: #eceeed;      /* paper 于 g4 → 13.65:1 */
  --panel-dim: rgba(236, 238, 237, 0.85);
  --panel-line: rgba(236, 238, 237, 0.14);

  --cta-bg: #1c2227;
  --cta-text: #eceeed;

  --grain-alpha: 0.32;
  --glow-alpha: 0.38;

  --maxw: 1080px;
  --pad: 22px;
  --radius: 18px;

  --font: "Outfit", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* 暗态：只改取值，槽位不变（design-system §2 暗态表第 1 行） */
@media (prefers-color-scheme: dark) {
  :root {
    --g1: #3b3e43;
    --g2: #32373d;
    --g3: #252b31;
    --g4: #060a0d;
    --glow: #747477;
    --ink: #e7ebef;
    --deep: #030406;

    --bg: #0b0f12;
    --surface: #171b1f;
    --surface-2: #1e2328;
    --text: #e7ebef;
    --text-dim: #b4bac0;      /* 于 --surface 实测 8.8:1 */
    --line: rgba(231, 235, 239, 0.14);
    --line-strong: rgba(231, 235, 239, 0.3);

    --panel: #060a0d;
    --panel-text: #eceeed;
    --panel-dim: rgba(236, 238, 237, 0.85);
    --panel-line: rgba(236, 238, 237, 0.14);

    --cta-bg: #d4d7dc;        /* 暗态 btnA */
    --cta-text: #030406;      /* 暗态 btnInk → 11.13:1 */

    --grain-alpha: 0.26;
    --glow-alpha: 0.22;
  }
}

/* ───────────────────────── 基础 ───────────────────────── */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* grid / flex 子项默认 min-width:auto，会被内部 min-width 的宽表格顶开，
   把整页撑出横向滚动条。统一压成 0，让宽内容在自己的 overflow 容器里滚。 */
.hero-grid > *,
.doc-grid > *,
.figpair > *,
.twocol > *,
.cards > *,
.price > *,
.factgrid > *,
.devrow > * { min-width: 0; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--cta-bg); color: var(--cta-text);
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 20;
}
.skip:focus { left: 0; }

/* ───────────────────────── 字体角色（design-system §3） ───────────────────────── */

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

/* 上限 64px 不是审美偏好：中文标题里最长的一行是 9 个全角字，
   再大一档就会在 1280 的 hero 栏宽里折行，把手写的 <br> 断句冲掉。 */
.display {
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 250;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: clamp(26px, 4.4vw, 38px);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.45;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 18px;
}

.lede {
  font-size: clamp(16px, 2.1vw, 18px);
  line-height: 1.8;
  color: var(--text-dim);
  max-width: 34em;
}

.small { font-size: 13px; line-height: 1.7; color: var(--text-dim); }

.tnum { font-variant-numeric: tabular-nums; }

/* ───────────────────────── 顶栏 ───────────────────────── */

.topbar {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.brand span { color: var(--text-dim); font-weight: 400; letter-spacing: 0.1em; }

.navlinks { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.navlinks a { text-decoration: none; color: var(--text-dim); }
.navlinks a:hover, .navlinks a[aria-current="page"] { color: var(--text); }

.langswitch {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, var(--g1) 0%, var(--g2) 34%, var(--g3) 100%);
  color: var(--ink);
  padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px);
}

/* 光晕：直径 720、圆心 y=180、60% 淡出（design-system §1） */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(720px 720px at 50% 180px,
    var(--glow) 0%, transparent 60%);
  opacity: var(--glow-alpha);
  pointer-events: none;
}

/* 颗粒：分形噪点 + soft-light（design-system §1）。只在 hero 与深色段用，别处不铺 */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-alpha);
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

.hero-grid {
  display: grid;
  gap: clamp(36px, 6vw, 56px);
  align-items: center;
}

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero .eyebrow { color: color-mix(in srgb, var(--ink) 78%, transparent); }
.hero .lede { color: color-mix(in srgb, var(--ink) 88%, transparent); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 30px;
}

/* App Store 徽章占位。未上架，所以它不是链接，也不做成像真徽章的样子 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.35;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
  background: color-mix(in srgb, var(--glow) 34%, transparent);
}
.badge b { display: block; font-weight: 500; font-size: 14px; letter-spacing: 0.03em; }
.badge svg { flex: none; }

.pill-note {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
}

/* ───────────────────────── 设备框 ───────────────────────── */

.device {
  position: relative;
  margin: 0 auto;
  max-width: 268px;
  padding: 9px;
  border-radius: 44px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 0 24px 60px -28px rgba(10, 15, 18, 0.55);
}
.device img { border-radius: 36px; width: 100%; }
.device.sm { max-width: 208px; padding: 7px; border-radius: 36px; }
.device.sm img { border-radius: 30px; }

figure { margin: 0; }
figcaption { margin-top: 12px; font-size: 12.5px; color: var(--text-dim); text-align: center; }

.devrow { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.devrow figure { flex: 1 1 180px; max-width: 216px; }

/* ───────────────────────── 深色段（抽屉） ───────────────────────── */

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 30px 30px 0 0;
  margin-top: -30px;
  padding: clamp(40px, 6vw, 68px) 0;
}
.panel .small, .panel .lede, .panel .eyebrow { color: var(--panel-dim); }
.panel .device { border-color: var(--panel-line); background: #000; }

.factgrid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.fact { border-top: 1px solid var(--panel-line); padding-top: 16px; }
.fact b { display: block; font-size: 17px; font-weight: 500; letter-spacing: 0.04em; margin-bottom: 6px; }
.fact span { font-size: 13.5px; line-height: 1.7; color: var(--panel-dim); }

/* ───────────────────────── 版块 ───────────────────────── */

section { padding: clamp(56px, 8vw, 104px) 0; }
section + section { border-top: 1px solid var(--line); }

.sechead { max-width: 46em; margin-bottom: clamp(32px, 4.5vw, 52px); }
.sechead .h2 { margin-bottom: 16px; }

/* ───────────────────────── 三模式卡 ───────────────────────── */

.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
}
.card .h3 { margin-bottom: 4px; }
.card .role { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.card p { margin: 0 0 16px; font-size: 15px; line-height: 1.8; }
.card dl { margin: auto 0 0; display: grid; gap: 10px; font-size: 13.5px; }
.card dt { color: var(--text-dim); letter-spacing: 0.08em; font-size: 12px; text-transform: uppercase; }
.card dd { margin: 2px 0 0; line-height: 1.65; }

/* ───────────────────────── 表格 ───────────────────────── */

.tablewrap { overflow-x: auto; max-width: 100%; margin-top: 36px; border: 1px solid var(--line); border-radius: var(--radius); }

table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14px; }
caption { text-align: left; padding: 16px 20px 0; font-size: 13px; color: var(--text-dim); }
th, td { text-align: left; padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.65; }
thead th { border-top: 0; font-weight: 500; letter-spacing: 0.06em; font-size: 13px; }
tbody th { font-weight: 400; color: var(--text-dim); white-space: nowrap; font-size: 13px; }
tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) th { background: color-mix(in srgb, var(--surface) 70%, transparent); }

/* ───────────────────────── 图示 ───────────────────────── */

.figpair {
  display: grid;
  gap: clamp(28px, 5vw, 44px);
  margin-top: clamp(36px, 5vw, 56px);
}
@media (min-width: 820px) { .figpair { grid-template-columns: 1fr 1fr; align-items: start; } }

.diagram { display: block; width: 100%; max-width: 440px; margin: 0 auto; height: auto; color: var(--text); }
.diagram .d-card { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.diagram .d-card-2 { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.diagram .d-stroke { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.diagram .d-slab { fill: var(--panel); stroke: none; }
.diagram .d-arrow { stroke: var(--line-strong); stroke-width: 1.4; fill: none; }
.diagram .d-arrowhead { fill: var(--line-strong); }
.diagram text { fill: currentColor; font-family: var(--font); }
.diagram .t-title { font-size: 14px; font-weight: 500; letter-spacing: 0.04em; }
.diagram .t-body { font-size: 12px; fill: var(--text-dim); letter-spacing: 0.02em; }
.diagram .t-onpanel { fill: var(--panel-text); }
.diagram .t-onpanel-dim { fill: var(--panel-dim); font-size: 12px; }

/* ───────────────────────── 拦截页重绘（界面示意） ───────────────────────── */

.shield {
  max-width: 300px;
  margin: 0 auto;
  border-radius: 34px;
  border: 1px solid var(--line-strong);
  background: var(--g4);
  color: var(--paper);
  padding: 38px 24px 26px;
  text-align: center;
}
.shield .icon {
  width: 62px; height: 62px; margin: 0 auto 22px;
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(236, 238, 237, 0.22), rgba(236, 238, 237, 0.07));
  border: 1px solid rgba(236, 238, 237, 0.18);
}
.shield h3 { font-size: 25px; font-weight: 300; line-height: 1.3; letter-spacing: 0.01em; margin-bottom: 12px; }
/* paper @ 62% 于 g4 —— design-system §6 判据 4 的两处例外之一，实测 6.10:1 */
.shield .sub { font-size: 13.5px; line-height: 1.6; color: rgba(236, 238, 237, 0.62); margin: 0 0 26px; }
.shield .btn-primary {
  background: var(--paper); color: var(--on-paper);
  border-radius: 999px; padding: 14px; font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
}
.shield .btn-secondary {
  margin-top: 10px; border: 1px solid rgba(236, 238, 237, 0.35);
  border-radius: 999px; padding: 13px; font-size: 15px; font-weight: 500; letter-spacing: 0.04em;
}
.mock-tag {
  display: inline-block; margin-top: 14px;
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim);
}

/* ───────────────────────── 文献 ───────────────────────── */

.refs { display: grid; gap: 0; margin-top: 8px; }
.ref {
  display: grid; gap: 6px 28px; padding: 22px 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) { .ref { grid-template-columns: 1fr 1fr; } }
.ref .cite { font-size: 13.5px; line-height: 1.7; color: var(--text-dim); }
.ref .cite a { word-break: break-word; }
.ref .maps { font-size: 15px; line-height: 1.75; }
.ref .maps b { font-weight: 500; }

/* ───────────────────────── 清单 ───────────────────────── */

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
/* 记号用绝对定位而不是 grid 列：li 里只要出现一个 <code> / <strong>，
   它就会变成第三个 grid item 掉到下一行第一列，把文字压成一团。 */
.ticks li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.7; }
.ticks li::before { content: "—"; position: absolute; left: 0; top: 0; color: var(--text-dim); }
.ticks.no li::before { content: "×"; }
.ticks.yes li::before { content: "✓"; }

.twocol { display: grid; gap: clamp(28px, 4vw, 48px); }
@media (min-width: 820px) { .twocol { grid-template-columns: 1fr 1fr; } }

.boxed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
}
.boxed h3 { margin-bottom: 14px; }

/* ───────────────────────── 定价 ───────────────────────── */

.price {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.price .card .amount { font-size: 40px; font-weight: 250; letter-spacing: -0.02em; line-height: 1.1; margin: 4px 0 14px; }

/* ───────────────────────── 长文页（隐私 / 支持） ───────────────────────── */

.doc { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.doc-grid { display: grid; gap: clamp(28px, 4vw, 48px); }
@media (min-width: 900px) { .doc-grid { grid-template-columns: 220px 1fr; align-items: start; } }

.toc { position: sticky; top: 18px; font-size: 13.5px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; counter-reset: t; }
.toc a { text-decoration: none; color: var(--text-dim); display: block; line-height: 1.5; }
.toc a:hover { color: var(--text); }
@media (max-width: 899px) {
  .toc { position: static; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
}

.prose { max-width: 40em; }
.prose h2 { font-size: 22px; font-weight: 500; letter-spacing: 0.04em; margin: 44px 0 14px; scroll-margin-top: 20px; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 16px; font-weight: 500; letter-spacing: 0.04em; margin: 26px 0 10px; }
.prose p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.85; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 20px; }
.prose li { margin-bottom: 9px; font-size: 15.5px; line-height: 1.8; }
.prose .meta { font-size: 13.5px; color: var(--text-dim); border-left: 2px solid var(--line-strong); padding-left: 14px; margin-bottom: 30px; }
.prose .tablewrap { margin: 22px 0 26px; }
.prose table { min-width: 520px; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 20px 34px 20px 0; position: relative;
  font-size: 16.5px; font-weight: 500; letter-spacing: 0.03em; line-height: 1.5;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 18px;
  font-size: 20px; font-weight: 300; color: var(--text-dim);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 22px; max-width: 44em; }
.faq .answer p { margin: 0 0 14px; font-size: 15px; line-height: 1.85; }
.faq .answer ol, .faq .answer ul { margin: 0 0 14px; padding-left: 20px; font-size: 15px; line-height: 1.85; }
.faq .answer li { margin-bottom: 7px; }

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

.foot {
  background: var(--panel);
  color: var(--panel-text);
  padding: clamp(40px, 6vw, 64px) 0 40px;
}
.foot a { color: var(--panel-text); text-decoration-color: var(--panel-line); }
.foot .cols { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot h4 { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--panel-dim); margin-bottom: 12px; font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.foot .legal {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--panel-line);
  font-size: 12.5px; line-height: 1.8; color: var(--panel-dim);
}
.foot .legal p { margin: 0 0 8px; }
