:root {
  color-scheme: light dark;
  --bg: #f5f7f7;
  --surface: #ffffff;
  --surface-muted: #edf3f2;
  --text: #142321;
  --text-secondary: #52635f;
  --accent: #0e8f83;
  --accent-strong: #08756c;
  --accent-soft: #dff3f0;
  --border: rgba(20, 35, 33, 0.12);
  --shadow: 0 18px 50px rgba(28, 54, 50, 0.08);
  --radius: 20px;
  --content: 720px;
  --wide: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1413;
    --surface: #141d1b;
    --surface-muted: #192623;
    --text: #edf7f5;
    --text-secondary: #a7b9b5;
    --accent: #5bd0c3;
    --accent-strong: #7cddd2;
    --accent-soft: #153d38;
    --border: rgba(225, 245, 241, 0.12);
    --shadow: 0 20px 56px rgba(0, 0, 0, 0.24);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  border-radius: 6px;
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  max-width: var(--wide);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 800;
  place-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  display: inline-flex;
  min-height: 44px;
  padding: 0 12px;
  align-items: center;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--surface-muted);
  color: var(--text);
}

.language-link {
  border: 1px solid var(--border);
}

.hero,
.legal-layout,
.footer-inner {
  width: min(calc(100% - 40px), var(--wide));
  margin-inline: auto;
}

.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 760px;
  margin-right: auto;
  margin-bottom: 20px;
  margin-left: auto;
  font-size: clamp(38px, 7vw, 64px);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(24px, 4vw, 32px);
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.hero-copy {
  max-width: 650px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: clamp(17px, 2.4vw, 20px);
}

.document-grid {
  display: grid;
  width: min(calc(100% - 40px), var(--wide));
  margin: 0 auto 104px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.document-card {
  display: flex;
  min-height: 240px;
  padding: 28px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.document-card:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
  transform: translateY(-3px);
}

.card-label {
  margin-bottom: auto;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.document-card h2 {
  margin: 40px 0 8px;
}

.document-card p {
  margin: 0;
  color: var(--text-secondary);
}

.legal-layout {
  display: grid;
  padding: 64px 0 104px;
  grid-template-columns: 220px minmax(0, var(--content));
  justify-content: center;
  gap: 56px;
}

.toc {
  position: sticky;
  top: 104px;
  align-self: start;
}

.toc-title {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
}

.legal-document {
  min-width: 0;
}

.legal-header {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 52px);
}

.meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.summary {
  margin: 28px 0 0;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 16px;
  background: var(--accent-soft);
}

.summary strong {
  color: var(--accent-strong);
}

.legal-section {
  padding-top: 52px;
}

.legal-section p,
.legal-section li {
  color: var(--text-secondary);
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.3em;
}

.legal-section li + li {
  margin-top: 10px;
}

.data-table {
  width: 100%;
  margin: 24px 0;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 700;
}

.data-table td {
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.note {
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--surface-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
}

.support-main {
  width: min(calc(100% - 40px), 840px);
  margin: 0 auto;
  padding: 72px 0 104px;
}

.support-header {
  padding-bottom: 48px;
  text-align: center;
}

.support-header h1 {
  margin-bottom: 16px;
  font-size: clamp(38px, 7vw, 60px);
}

.support-header .hero-copy {
  margin-bottom: 28px;
}

.support-button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.support-button:hover {
  background: var(--accent-strong);
}

.support-section {
  margin-top: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.support-section p,
.support-section li {
  color: var(--text-secondary);
}

.support-section ol,
.support-section ul {
  margin-bottom: 0;
  padding-left: 1.35em;
}

.support-section li + li {
  margin-top: 10px;
}

.security-note {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .legal-layout {
    display: block;
    width: min(calc(100% - 40px), var(--content));
    padding-top: 40px;
  }

  .toc {
    position: static;
    margin-bottom: 40px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
  }

  .toc ol {
    columns: 2;
    column-gap: 24px;
  }
}

@media (max-width: 620px) {
  .nav {
    min-height: 64px;
    padding: 0 16px;
  }

  .nav-links a:not(.language-link) {
    display: none;
  }

  .hero {
    padding: 72px 0 52px;
  }

  .document-grid {
    margin-bottom: 72px;
    grid-template-columns: 1fr;
  }

  .document-card {
    min-height: 210px;
    padding: 24px;
  }

  .support-main {
    width: min(calc(100% - 32px), 840px);
    padding: 56px 0 72px;
  }

  .support-section {
    padding: 22px;
  }

  .toc ol {
    columns: 1;
  }

  .legal-layout {
    width: min(calc(100% - 32px), var(--content));
    padding-bottom: 72px;
  }

  .legal-section {
    padding-top: 44px;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table tr:not(:last-child) {
    border-bottom: 1px solid var(--border);
  }

  .data-table td {
    border: 0;
  }

  .data-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
  }

  .footer-inner {
    padding: 24px 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
