/* ================================================================
   legal.css — 协议/隐私页公共基础样式
   适用：protocol/*.html / privacy/*.html / 404.html
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:      #16A34A;
  --brand-dark: #15803D;
  --brand-light:#F0FDF4;
  --text:       #0F172A;
  --muted:      #64748B;
  --border:     #E2E8F0;
  --bg:         #FFFFFF;
  --bg-soft:    #F8FAFC;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(15,23,42,.08);
  --shadow-lg:  0 12px 48px rgba(15,23,42,.14);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; }

/* ── NAVBAR（法律页简化版） ── */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; height: 64px; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 32px; width: auto; display: block; filter: brightness(0) saturate(100%) invert(30%) sepia(98%) saturate(1200%) hue-rotate(130deg) brightness(95%) contrast(105%); }

/* ── 侧边目录 TOC（protocol/privacy 共用） ── */
.toc { position: sticky; top: 84px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.toc h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 14px; }
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.toc ul li a { display: block; font-size: 13px; color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 8px; transition: color .2s, background .2s; line-height: 1.4; }
.toc ul li a:hover { color: var(--brand); background: var(--brand-light); }
.toc ul li a.active { color: var(--brand); background: var(--brand-light); font-weight: 600; }
@media (max-width: 768px) { .toc { position: static; } }

/* ── 章节编号徽章（protocol/privacy 共用） ── */
.section-num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 800; border-radius: 8px; flex-shrink: 0; }

/* ── 深色简洁页脚（protocol/404 共用） ── */
.protocol-footer { background: #0F172A; color: rgba(255,255,255,.5); text-align: center; padding: 32px 24px; font-size: 13px; line-height: 1.8; }
.protocol-footer a { color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s; }
.protocol-footer a:hover { color: #fff; }
.protocol-footer .footer-logo { margin-bottom: 10px; }
.protocol-footer .footer-logo img { height: 26px; width: auto; filter: brightness(0) invert(1); opacity: .7; }
