:root {
  color-scheme: light;
  --ink: #171916;
  --muted: #62665f;
  --soft: #f2f4ef;
  --paper: #fbfcf9;
  --line: #dfe3dc;
  --accent: #238b43;
  --accent-soft: #e9f5eb;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid rgba(35, 139, 67, .25); outline-offset: 4px; border-radius: 2px; }

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  border-bottom: 1px solid rgba(23, 25, 22, .09);
  background: rgba(251, 252, 249, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.legal-header-inner {
  width: min(1160px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.legal-header-actions { display: flex; align-items: center; gap: 20px; }
.legal-brand { color: var(--ink); font-size: 18px; font-weight: 720; letter-spacing: -.04em; text-decoration: none; }
.legal-home { color: var(--muted); font-size: 14px; text-decoration: none; }
.legal-home:hover { color: var(--ink); }
.legal-language { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.legal-language select { height: 34px; max-width: 150px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font: inherit; }
.legal-language select:focus-visible { outline: 3px solid rgba(35, 139, 67, .22); outline-offset: 2px; }

.legal-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(220px, 280px);
  justify-content: space-between;
  gap: 72px;
  padding: 72px 0 96px;
}
.legal-main { min-width: 0; }
.legal-kicker { margin: 0 0 14px; color: var(--accent); font-size: 14px; font-weight: 680; }
h1 { margin: 0; font-size: clamp(38px, 5.2vw, 64px); line-height: 1.06; letter-spacing: -.045em; }
.legal-meta { margin: 22px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.draft-note {
  margin: 32px 0 0;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: #285d35;
  font-size: 14px;
  line-height: 1.7;
}
.legal-intro { margin: 38px 0 0; color: #343732; font-size: 17px; line-height: 1.9; }

.data-classification {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  background: var(--line);
  border: 1px solid var(--line);
}
.data-classification > div { min-height: 122px; padding: 20px; background: #fff; }
.data-classification strong { display: block; font-size: 15px; line-height: 1.45; }
.data-classification span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.data-classification .local { background: var(--accent-soft); }
.data-classification .local strong, .data-classification .local span { color: #285d35; }

.legal-section { scroll-margin-top: 88px; margin-top: 56px; }
.legal-section h2 { margin: 0 0 18px; font-size: clamp(24px, 3vw, 32px); line-height: 1.25; letter-spacing: -.025em; }
.legal-section h3 { margin: 30px 0 12px; font-size: 19px; line-height: 1.45; }
.legal-section p { margin: 12px 0; color: #343732; font-size: 16px; line-height: 1.9; }
.legal-section ul, .legal-section ol { margin: 14px 0; padding-left: 1.35em; color: #343732; }
.legal-section li { margin: 9px 0; padding-left: .25em; font-size: 16px; line-height: 1.82; }
.legal-section strong { color: var(--ink); font-weight: 700; }
.legal-section .compact-list li { margin: 5px 0; }

.legal-links {
  margin-top: 26px;
  padding: 22px 24px;
  background: var(--soft);
}
.legal-links strong { display: block; margin-bottom: 10px; }
.legal-links a { display: block; width: fit-content; margin: 8px 0; }

.legal-aside { align-self: start; position: sticky; top: 96px; }
.legal-toc { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.legal-toc li { margin: 0; }
.legal-toc a { display: block; padding: 7px 0 7px 18px; color: #666a63; font-size: 13px; line-height: 1.4; text-decoration: none; }
.legal-toc a:hover { color: var(--ink); }
.legal-related { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.legal-related strong { display: block; margin-bottom: 9px; font-size: 13px; }
.legal-related a { display: block; margin: 7px 0; font-size: 13px; }

.table-wrap { width: 100%; margin: 24px 0 8px; overflow-x: auto; border: 1px solid var(--line); background: #fff; }
table { width: 100%; min-width: 720px; border-collapse: collapse; text-align: left; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; font-size: 14px; line-height: 1.68; }
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
th { color: var(--ink); background: var(--soft); font-weight: 700; }
td { color: #3e423c; }
.field-list { margin: 0; padding-left: 1.2em; }
.field-list li { margin: 0 0 5px; padding-left: .1em; font-size: inherit; line-height: 1.6; }
.field-list li:last-child { margin-bottom: 0; }
.table-note { color: var(--muted) !important; font-size: 14px !important; }
.status-pending { color: #8a5a00; font-weight: 680; }
.status-active { color: var(--accent); font-weight: 680; }
.status-local { color: #1f7138; font-weight: 700; }
.section-status { margin: 0 0 9px !important; color: var(--accent) !important; font-size: 14px !important; font-weight: 700; }
.local-only-section { padding-top: 8px; }
.local-only-notice { margin: 22px 0 0; padding: 20px 22px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: #285d35; }
.local-only-notice strong { display: block; }
.local-only-notice p { margin: 7px 0 0; color: #285d35; font-size: 15px; line-height: 1.75; }

.legal-contact { margin-top: 24px; padding: 24px; background: var(--ink); color: #f6f7f4; }
.legal-contact p { margin: 7px 0; color: #d8dad5; }
.legal-contact a { color: #9fe5ae; }
.legal-footer { padding: 28px 20px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 860px) {
  .legal-shell { grid-template-columns: 1fr; gap: 0; padding-top: 48px; }
  .legal-aside { display: none; }
  .data-classification { grid-template-columns: 1fr; }
  .data-classification > div { min-height: 0; }
}

@media (max-width: 560px) {
  .legal-header-inner, .legal-shell { width: min(100% - 28px, 1160px); }
  .legal-header { height: 58px; }
  .legal-header-actions { gap: 10px; }
  .legal-language > span, .legal-home { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .legal-language select { max-width: 142px; }
  .legal-shell { padding: 38px 0 70px; }
  h1 { font-size: 38px; }
  .legal-meta { font-size: 13px; }
  .draft-note { margin-top: 26px; padding: 14px 15px; }
  .legal-intro { margin-top: 28px; font-size: 16px; }
  .legal-section { margin-top: 44px; scroll-margin-top: 76px; }
  .legal-section h2 { font-size: 25px; }
  .legal-section h3 { font-size: 18px; }
  .legal-section p, .legal-section li { font-size: 15px; line-height: 1.82; }
  .table-wrap { margin-left: -14px; width: calc(100% + 28px); border-left: 0; border-right: 0; }
  table { min-width: 780px; }
  th, td { padding: 13px 14px; }
  .data-classification { margin-top: 24px; }
  .data-classification > div { padding: 16px; }
  .local-only-notice { padding: 17px 18px; }
}

[dir="rtl"] .legal-section ul, [dir="rtl"] .legal-section ol { padding-right: 1.35em; padding-left: 0; }
[dir="rtl"] table { text-align: right; }
[dir="rtl"] .local-only-notice, [dir="rtl"] .draft-note { border-right: 3px solid var(--accent); border-left: 0; }

@media print {
  .legal-header, .legal-aside, .draft-note, .legal-footer { display: none !important; }
  body { background: #fff; }
  .legal-shell { display: block; width: 100%; padding: 0; }
  h1 { font-size: 34pt; }
  .legal-section { break-inside: avoid; margin-top: 32px; }
  .table-wrap { overflow: visible; border-color: #bbb; }
  table { min-width: 0; }
  a { color: #000; text-decoration: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; overflow-wrap: anywhere; }
}
