:root {
  --blue: #0353a0;
  --blue-2: #1a7ad4;
  --blue-soft: #dceaf8;
  --ink: #0f172a;
  --muted: #475569;
  --line: #d9e2ef;
  --bg: #eef3f9;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-2);
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(238, 243, 249, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 226, 239, 0.7);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.brand:hover {
  color: inherit;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 16px;
}

.brand-text span {
  font-size: 12px;
  color: var(--muted);
}

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

.nav a {
  color: var(--ink);
  font-size: 14px;
}

.nav a.is-active {
  color: var(--blue);
  font-weight: 600;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
}

.lang a {
  padding: 5px 10px;
  color: var(--muted);
}

.lang a.is-active {
  background: var(--blue);
  color: #fff;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
}

.legal-page {
  padding: 24px 0 80px;
}

.legal-page h1,
.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.page-hero {
  margin-bottom: 20px;
}

.page-hero p,
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.prose {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 36px;
}

.prose h2 {
  margin: 32px 0 12px;
  font-size: 20px;
}

.prose h3 {
  margin: 22px 0 8px;
  font-size: 16px;
}

.prose p,
.prose li {
  color: #334155;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 14px;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: #f8fbff;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
  background: #fff;
}

.legal-bar {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--ink);
}

.site-footer a:hover {
  color: var(--blue);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 16px 20px 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav.is-open {
    display: flex;
  }

  .prose {
    padding: 22px 18px;
  }
}

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