/* ============================================================
   启思科技 · 法律页面样式（服务条款 / 隐私政策）
   与 main.css 同一设计体系：米纸底、衬线标题、朱红点缀
   ============================================================ */

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

:root {
  --paper:      #f4f1e8;
  --paper-2:    #ece8db;
  --card:       #fbf9f3;
  --ink:        #17130d;
  --ink-2:      #4d4636;
  --mute:       #8b8171;
  --line:       rgba(23, 19, 13, .16);
  --line-soft:  rgba(23, 19, 13, .09);
  --accent:     #e8490f;
  --dark:       #15120e;
  --dark-text:  #efe9da;
  --dark-mute:  #9b9180;
  --dark-line:  rgba(239, 233, 218, .16);
  --radius-lg:  32px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans:  "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans SC", -apple-system,
           BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease:  cubic-bezier(.22, .61, .36, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

.grain {
  position: fixed; inset: 0; z-index: 2000; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: min(1240px, 92vw); margin-inline: auto; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(244, 241, 232, .86);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.nav .inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 900; font-size: 20px; text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 19px; line-height: 1;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.brand:hover .mark { background: var(--accent); transform: rotate(-6deg); }
.brand .brand-text i { font-style: normal; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--ink); background: rgba(23, 19, 13, .06); }
.lang-btn {
  padding: 8px 15px; margin-left: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 600; letter-spacing: .5px;
  cursor: pointer; font-family: inherit; transition: all .25s var(--ease);
}
.lang-btn:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* ---------- 页头 ---------- */
.legal-hero { padding: 150px 0 46px; border-bottom: 1px solid var(--line); }
.legal-hero .crumb {
  font-size: 13px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.legal-hero h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(34px, 5vw, 56px); letter-spacing: -1px; line-height: 1.15;
}
.legal-hero .updated { color: var(--mute); font-size: 14px; margin-top: 16px; }

/* ---------- 正文布局 ---------- */
.legal-body { display: grid; grid-template-columns: 260px 1fr; gap: clamp(40px, 6vw, 90px); padding: 56px 0 100px; }

/* 目录 */
.toc { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 130px); overflow: auto; padding-right: 8px; }
.toc h6 { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); margin-bottom: 16px; }
.toc a {
  display: block; padding: 6px 0 6px 16px; text-decoration: none;
  color: var(--ink-2); font-size: 14px; line-height: 1.5;
  border-left: 2px solid var(--line-soft); transition: all .2s;
}
.toc a:hover { color: var(--accent); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

/* 文档 */
.doc { max-width: 780px; }
.doc section { margin-bottom: 46px; scroll-margin-top: 96px; }
.doc h2 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -.3px;
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.doc h3 { font-size: 16.5px; font-weight: 700; margin: 26px 0 10px; color: var(--ink); }
.doc p { color: var(--ink-2); font-size: 15.5px; margin-bottom: 14px; }
.doc ul { margin: 0 0 14px; padding-left: 4px; list-style: none; }
.doc ul li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 15.5px; margin-bottom: 10px; }
.doc ul li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc a:hover { text-decoration: none; }
.doc .note {
  background: var(--card); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent); border-radius: 12px;
  padding: 16px 20px; margin: 18px 0;
  color: var(--ink-2); font-size: 14.5px;
}

/* ---------- 页脚 ---------- */
footer { background: var(--dark); color: var(--dark-text); }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: 30px 0; color: var(--dark-mute); font-size: 13px;
}
.foot-bottom a { color: var(--dark-mute); text-decoration: none; transition: color .25s; }
.foot-bottom a:hover { color: var(--accent); }
.foot-bottom .links { display: flex; gap: 22px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .legal-body { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border-bottom: 1px solid var(--line-soft); padding-bottom: 24px; }
}
