@import url("/fonts/global/global-fonts.css");

:root {
  --accent: #b76549;
  --accent-strong: #94513f;
  --teal: #287b73;
  --teal-soft: #dcefeb;
  --paper: #f8f6ef;
  --paper-strong: #fffdf8;
  --line: #cfc5b7;
  --line-strong: #9f9384;
  --text: #211d18;
  --text-soft: #5d554d;
  --text-muted: #756b60;
  --dark: #201d19;
  --white: #fffdf8;
  --radius: 8px;
  --font-brand: "Metropolis", "Inter", "PingFang SC", "PingFang TC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft JhengHei UI",
    sans-serif;
  --font-ui: "Inter", "PingFang SC", "PingFang TC", "Hiragino Sans GB",
    "Hiragino Kaku Gothic ProN", "Microsoft YaHei UI", "Microsoft JhengHei UI",
    "Yu Gothic UI", Meiryo, "Malgun Gothic", sans-serif;
  --font-cjk: "PingFang SC", "PingFang TC", "Hiragino Sans GB",
    "Hiragino Kaku Gothic ProN", "Noto Sans SC", "Noto Sans CJK SC",
    "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft JhengHei UI",
    "Yu Gothic UI", Meiryo, "Malgun Gothic", sans-serif;
  --font-mono: "Ioskeley Mono", "SF Mono", "Cascadia Code", ui-monospace,
    Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

html:lang(zh) body,
html:lang(zh-Hans) body,
html:lang(zh-Hant) body {
  font-family: var(--font-cjk);
  line-height: 1.68;
  letter-spacing: 0.01em;
}

html:lang(zh) :is(h1, h2, h3, .legal-brand-name),
html:lang(zh-Hans) :is(h1, h2, h3, .legal-brand-name),
html:lang(zh-Hant) :is(h1, h2, h3, .legal-brand-name) {
  font-family: var(--font-cjk);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

.legal-page {
  min-height: 100vh;
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(159, 147, 132, 0.42);
  background: rgba(248, 246, 239, 0.92);
  backdrop-filter: blur(16px);
}

.legal-topbar-inner,
.legal-footer-inner,
.legal-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.legal-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.legal-brand-mark {
  display: block;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(17, 24, 39, 0.05);
  object-fit: contain;
}

.legal-brand-name {
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0;
}

.legal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-chip,
.legal-chip-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
}

.legal-chip {
  border: 1px solid var(--accent-strong);
  background: var(--accent);
  color: var(--white);
}

.legal-chip-secondary {
  border: 1px solid var(--line);
  background: var(--paper-strong);
  color: var(--text);
}

.legal-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 40px;
  padding: 44px 0 72px;
}

.legal-sidebar {
  position: sticky;
  top: 102px;
  align-self: start;
  padding-right: 8px;
}

.legal-kicker {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.legal-title {
  margin: 0;
  color: var(--text);
  font-size: 2.72rem;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0;
}

.legal-summary {
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.legal-meta {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 16px 0;
  border-top: 1px solid rgba(159, 147, 132, 0.42);
  border-bottom: 1px solid rgba(159, 147, 132, 0.42);
}

.legal-meta-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.legal-meta-value {
  margin-top: 3px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
}

.legal-nav {
  display: grid;
  gap: 4px;
  margin-top: 24px;
}

.legal-nav a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid rgba(159, 147, 132, 0.28);
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.legal-nav a:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.legal-content {
  padding: 0 0 0 36px;
  border-left: 1px solid rgba(159, 147, 132, 0.44);
}

.legal-note {
  margin: 0 0 30px;
  padding: 18px 20px;
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  background: var(--teal-soft);
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

.legal-section + .legal-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(159, 147, 132, 0.34);
}

.legal-section h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1.34rem;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0;
}

.legal-section h3 {
  margin: 18px 0 10px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
}

.legal-section p,
.legal-section li {
  color: var(--text-soft);
  font-size: 0.99rem;
  line-height: 1.78;
}

.legal-section p {
  margin: 0 0 14px;
}

.legal-section ul {
  margin: 0;
  padding-left: 1.2rem;
}

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

.legal-callout {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(183, 101, 73, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
}

.legal-callout strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.legal-footer {
  padding: 0 0 42px;
}

.legal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(159, 147, 132, 0.42);
  color: var(--text-soft);
}

.legal-footer-inner > div:first-child a {
  color: inherit;
  font-weight: 600;
}

.legal-footer-inner > div:first-child a:hover {
  color: var(--text);
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 600;
}

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

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

@media (max-width: 980px) {
  .legal-shell {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
    padding-right: 0;
  }

  .legal-content {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .legal-topbar-inner,
  .legal-footer-inner,
  .legal-shell {
    width: min(100% - 28px, 1180px);
  }

  .legal-topbar-inner {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .legal-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .legal-chip,
  .legal-chip-secondary {
    flex: none;
  }

  .legal-shell {
    gap: 28px;
    padding: 30px 0 56px;
  }

  .legal-title {
    font-size: 2.16rem;
  }

  .legal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
