:root {
  color-scheme: light;
  --page-top: #f3f6fa;
  --page-bottom: #e9eff7;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #1e2938;
  --muted: #647286;
  --line: #d7e0eb;
  --accent: #e05c5c;
  --link: #3477c8;
  --focus: #b8791d;
  --shadow: 0 18px 48px rgba(30, 41, 56, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-top: #060b14;
  --page-bottom: #0c1730;
  --surface: #0c1321;
  --surface-strong: #141c30;
  --text: #eff4ff;
  --muted: #8da0c2;
  --line: rgba(148, 163, 184, 0.28);
  --accent: #ff6b6b;
  --link: #4ea8ff;
  --focus: #ffd166;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.34);
}

:root[data-theme="tech"] {
  color-scheme: dark;
  --page-top: #05141b;
  --page-bottom: #0a2a35;
  --surface: #0c2732;
  --surface-strong: #143440;
  --text: #e7fcff;
  --muted: #8ebac0;
  --line: rgba(79, 198, 207, 0.38);
  --accent: #45d9d7;
  --link: #71b8ff;
  --focus: #e7d16f;
  --shadow: 0 20px 56px rgba(0, 8, 14, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-top);
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  background: linear-gradient(180deg, var(--page-top), var(--page-bottom));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0;
}

main {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.legal-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.website-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--link);
  background: var(--surface-strong);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.website-home-link:hover,
.website-home-link:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}

.language-toggle {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--link);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

h1,
h2 {
  color: var(--text);
  line-height: 1.28;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

h2 {
  margin: 30px 0 10px;
  font-size: 20px;
}

p {
  margin: 0 0 16px;
}

.legal-updated {
  color: var(--muted);
  font-size: 14px;
}

a {
  color: var(--link);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

:root[data-language="en"] [data-language-content="zh-CN"],
:root[data-language="zh-CN"] [data-language-content="en"] {
  display: none;
}

:root[data-embedded="true"] body {
  padding: 0;
}

:root[data-embedded="true"] main {
  min-height: 100vh;
  width: 100%;
  max-width: none;
  padding: 24px 20px 40px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

:root[data-embedded="true"] .legal-brand {
  display: none;
}

:root[data-embedded="true"] .website-home-link {
  display: none;
}

:root[data-embedded="true"] .legal-toolbar {
  justify-content: flex-end;
}

@media (max-width: 600px) {
  body {
    padding: 12px;
    font-size: 15px;
  }

  main {
    padding: 24px 20px 32px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 18px;
  }
}
