/* FlashAura 站点样式。
 *
 * 设计变量沿用公司主站 yaoyaolabs.com（feixue299/office_web 的 styles.css），
 * 这样两个站点看起来是同一家的东西。排版另算：主站是卡片式落地页，正文宽 980px；
 * 这里主要承载法律文本，行宽压到 720px —— 每行 45~75 个拉丁字符是长文阅读的舒适区，
 * 980px 在桌面上会到 110 字符以上，眼睛回到行首会丢行。
 */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-card: #fbfbfd;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --border: #d2d2d7;
  --accent: #f56300;        /* FlashAura 在主站上的品牌色 */
  --accent-hover: #ff700f;
  --rule: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 深色模式只改颜色令牌，不碰任何布局。
 * 主站目前是纯亮色，但隐私政策是会被认真读完的长文，很多人在夜里读。 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-card: #1c1c1e;
    --text-main: #f5f5f7;
    --text-muted: #98989d;
    --border: #38383a;
    --accent: #ff8a3d;
    --accent-hover: #ffa163;
    --rule: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* 只设左右内边距，**不要用 padding 简写**。
 *
 * `.wrap` 常和 `main` / `.hero` 这类元素选择器叠在同一个标签上（<main class="wrap">）。
 * 简写会把 top/bottom 一并写成 0，而类选择器的优先级高于元素选择器 —— 结果是
 * `main { padding: 3.5rem 0 4rem }` 被静默清零，标题直接贴上粘性顶栏。 */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ---------- 顶栏 ---------- */

.topbar {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 10;
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.98rem;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: block;
}

/* 语言开关。两种语言的文本都在 DOM 里，靠 <html data-lang> 切换显隐——
 * 不做跳转，所以 URL 只有一个，两家商店后台都只需要填一次。 */
.langswitch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 600;
}

.langswitch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}

.langswitch button:hover { color: var(--text-main); }

.langswitch button[aria-pressed="true"] {
  background: var(--text-main);
  color: var(--bg);
}

/* ---------- 正文 ---------- */

main { padding: 3.5rem 0 4rem; }

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  font-weight: 700;
}

.effective {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 2.5rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 2.5rem; }

h3 {
  font-size: 1.02rem;
  font-weight: 650;
  margin: 1.8rem 0 0.6rem;
}

p { margin: 0 0 1rem; }

ul { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.45rem; }

strong { font-weight: 650; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.38em;
}

/* 结论框：整页最重要的几句话，读者往往只读这一块。 */
.summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  margin: 0 0 1rem;
  box-shadow: var(--shadow-sm);
}

.summary ul { margin: 0; }
.summary li:last-child { margin-bottom: 0; }

/* 表格在窄屏上不换行、改为横向滚动：把「iOS 收集 / Android 不收集」这种
 * 对照关系拆成两行反而看不出对照。 */
.tablewrap {
  overflow-x: auto;
  margin: 0 0 1.2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

thead th {
  background: var(--bg-card);
  font-weight: 650;
  white-space: nowrap;
}

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

tbody th {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------- 页脚 ---------- */

.footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer p { margin: 0 0 0.4rem; }

/* ---------- 语言显隐 ---------- */

[data-lang="zh"] [lang="en"] { display: none; }
[data-lang="en"] [lang="zh-Hans"] { display: none; }

/* ---------- 首页 ---------- */

.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero img.appicon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.4rem;
}

.hero h1 { margin-bottom: 0.8rem; }

.hero p {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 30rem;
  margin: 0 auto 2rem;
}

.actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: scale(1.02); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover { color: var(--text-main); border-color: var(--text-muted); }

@media (max-width: 600px) {
  main { padding: 2.5rem 0 3rem; }
  .hero { padding: 3rem 0 2rem; }
  .summary { padding: 1.2rem 1.1rem; }
}
