:root {
  --bg: oklch(98.20% 0.0070 268.55);
  --surface: oklch(100% 0 0);
  --fg: oklch(9.12% 0.0458 272.64);
  --muted: oklch(45% 0.0300 268);
  --border: oklch(84.98% 0.0651 275.33);
  --accent: oklch(32.80% 0.2067 266.16);
  --success: oklch(66% 0.17 155);
  --danger: oklch(57% 0.22 28);
  --shadow: 0 20px 60px color-mix(in oklch, var(--fg) 11%, transparent);
  --font-display: "Manrope", "Avenir Next", "PingFang SC", sans-serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Space Mono", "SFMono-Regular", Consolas, monospace;
  --page: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { color-scheme: light; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--fg); background: var(--bg); font-family: var(--font-body); font-size: 17px; line-height: 1.65; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 16px; background: var(--fg); color: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid color-mix(in oklch, var(--border) 62%, transparent); background: color-mix(in oklch, var(--bg) 88%, transparent); backdrop-filter: blur(18px); }
body.admin-bar .site-header { top: 32px; }
.header-inner { width: var(--page); min-height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.10em; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: var(--surface); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; box-shadow: 0 8px 18px color-mix(in oklch, var(--accent) 24%, transparent); }
.header-nav { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 30px); }
.niubiapp-menu, .niubiapp-menu li { display: contents; }
.header-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-decoration: none; }
.header-nav a:hover, .header-nav a[aria-current="page"] { text-decoration: underline; }
.legal-hero { border-bottom: 1px solid var(--border); }
.hero-inner { width: var(--page); margin: 0 auto; padding: clamp(72px, 10vw, 140px) 0 clamp(56px, 8vw, 104px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr); gap: clamp(44px, 8vw, 110px); align-items: end; }
.eyebrow { margin: 0 0 18px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: var(--font-display); font-weight: 600; }
h1 { max-width: 11ch; margin-bottom: 24px; font-size: clamp(52px, 7vw, 88px); line-height: 1.02; letter-spacing: -0.03em; }
.hero-lead { max-width: 64ch; margin: 0; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); }
.document-meta { padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.document-meta span { display: block; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.document-meta strong { display: block; margin-top: 6px; font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.legal-layout { width: var(--page); margin: 0 auto; padding: clamp(64px, 8vw, 112px) 0 clamp(90px, 10vw, 150px); display: grid; grid-template-columns: 240px minmax(0, 720px); justify-content: space-between; gap: clamp(48px, 9vw, 128px); }
.toc { position: sticky; top: 108px; align-self: start; }
.toc-title { margin: 0 0 14px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; display: grid; list-style: none; }
.toc a { min-height: 42px; display: flex; align-items: center; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; text-decoration: none; }
.toc a:hover { color: var(--fg); }
.legal-article { min-width: 0; }
.legal-article > p:first-child { margin-top: 0; }
.legal-section { padding: 0 0 52px; margin: 0 0 52px; border-bottom: 1px solid var(--border); scroll-margin-top: 110px; }
.legal-section:last-of-type { margin-bottom: 0; }
.section-label { margin: 0 0 12px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; }
.legal-section h2 { margin-bottom: 18px; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -0.02em; }
.legal-section h3 { margin: 28px 0 10px; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.legal-section p { max-width: 68ch; margin: 0 0 18px; color: var(--muted); }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { max-width: 68ch; margin: 0; padding-left: 22px; color: var(--muted); }
.legal-section li { margin-bottom: 10px; padding-left: 4px; }
.legal-section strong { color: var(--fg); font-weight: 600; }
.legal-section a { font-weight: 550; }
.policy-note { margin-bottom: 52px; padding: 24px 26px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.policy-note strong { display: block; margin-bottom: 6px; font-family: var(--font-display); font-size: 19px; }
.policy-note p { margin: 0; color: var(--muted); font-size: 15px; }
.legal-contact { padding: 34px; background: var(--fg); color: var(--surface); }
.legal-contact .eyebrow { color: color-mix(in oklch, var(--surface) 58%, transparent); }
.legal-contact h2 { margin-bottom: 12px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.02em; }
.legal-contact p { max-width: 58ch; margin: 0 0 20px; color: color-mix(in oklch, var(--surface) 72%, transparent); }
.legal-contact a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { width: var(--page); min-height: 116px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; }

@media (max-width: 820px) {
  :root { --page: min(100% - 30px, 720px); }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 16px 0 12px; }
  .header-nav { width: 100%; gap: 20px; overflow-x: auto; }
  .header-nav a { flex: 0 0 auto; }
  .hero-inner { grid-template-columns: 1fr; align-items: start; }
  .document-meta { max-width: 380px; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
}

@media (max-width: 560px) {
  :root { --page: calc(100% - 24px); }
  body { font-size: 16px; }
  .header-nav { gap: 16px; }
  h1 { font-size: clamp(46px, 14vw, 62px); }
  .hero-inner { padding-top: 54px; }
  .legal-layout { padding-top: 52px; }
  .toc ol { grid-template-columns: 1fr; }
  .policy-note, .legal-contact { padding: 22px; }
  .footer-inner { padding: 28px 0; align-items: flex-start; flex-direction: column; }
}

@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
