/* Legal pages use a small independent stylesheet, shared with API fallback. */
:root { color-scheme: light; --ink: #202c40; --muted: #52627a; --blue: #1454c5; --line: #dce4ef; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: #f6f8fc; color: var(--ink); font: 16px/1.85 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--blue); text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #1454c5; outline-offset: 4px; border-radius: 3px; }
.skip { position: absolute; left: -10000px; top: 8px; z-index: 30; padding: 8px 16px; background: white; }
.skip:focus { left: 12px; }
.legal-header { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); }
.legal-header-inner { max-width: 840px; min-height: 60px; margin: auto; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.legal-brand { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; color: var(--ink); text-decoration: none; }
.legal-header span { font-size: 13px; color: var(--muted); }
.legal-document { max-width: 800px; margin: 28px auto 0; padding: 24px 32px 40px; background: white; border: 1px solid var(--line); border-radius: 20px; overflow-wrap: anywhere; }
.page-hero { padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 8px; color: var(--blue); font-size: 13px; font-weight: 650; }
h1, h2, h3 { line-height: 1.5; text-wrap: balance; }
h1 { font-size: 30px; margin: 0 0 16px; letter-spacing: -.03em; }
h2 { font-size: 21px; margin: 36px 0 14px; }
h3 { font-size: 18px; margin: 28px 0 12px; }
h2, h3, main, .legal-toc { scroll-margin-top: 76px; }
p { margin: 14px 0; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.muted span { display: block; }
.legal-document > ul { padding-left: 1.35em; }
.legal-document > ul > li { margin: 0 0 16px; padding-left: 3px; }
.legal-toc { margin: 24px 0; padding: 0 16px; background: #f2f6ff; border: 1px solid #d6e3ff; border-radius: 12px; }
.legal-toc summary { cursor: pointer; min-height: 48px; padding: 10px 0; color: var(--blue); font-weight: 600; }
.legal-toc ul { padding: 0 0 12px; margin: 0; list-style: none; }
.legal-toc a { display: block; padding: 9px 4px; min-height: 44px; text-decoration: none; }
.legal-toc .subsection { padding-left: 14px; font-size: 14px; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
caption { text-align: left; font-weight: 650; margin-bottom: 10px; }
th, td { padding: 14px 12px; text-align: left; vertical-align: top; border: 1px solid var(--line); overflow-wrap: anywhere; }
th { background: #f4f7fc; font-weight: 600; }
td::before { display: none; }
.legal-footer { max-width: 800px; margin: 24px auto; padding: 0 max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); text-align: center; font-size: 13px; color: var(--muted); }
.legal-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; }
.legal-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.legal-footer p { margin: 8px 0; }
@media (max-width: 640px) {
 .legal-document { margin: 0 auto; padding: 28px max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left)); border: 0; border-radius: 0; }
 h1 { font-size: 26px; }
 h2 { font-size: 21px; }
 .legal-header-inner { min-height: 56px; }
 .legal-header span { font-size: 12px; }
 .table-wrap { overflow: visible; }
 table, tbody, tr, td { display: block; width: 100%; }
 thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 tbody tr { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin-bottom: 16px; }
 td { padding: 12px 0; border: 0; border-bottom: 1px solid #e9eef6; }
 td:last-child { border-bottom: 0; }
 td::before { display: block; content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .legal-header, .legal-toc, .legal-footer, .skip { display: none; } .legal-document { border: 0; margin: 0; padding: 0; max-width: none; } body { background: white; } }
