/* Zhiji legal/info page redesign — 2026-09-14 */
:root {
  --zhiji-page-bg: #060607;
  --zhiji-page-text: #f4f5f7;
  --zhiji-page-muted: rgba(244, 245, 247, 0.68);
  --zhiji-page-faint: rgba(244, 245, 247, 0.42);
  --zhiji-page-line: rgba(255, 255, 255, 0.12);
  --zhiji-page-card: rgba(255, 255, 255, 0.035);
  --zhiji-amber: #ffb829;
}

.legal-body {
  background:
    radial-gradient(80rem 45rem at 85% -10%, rgba(255, 184, 41, 0.08), transparent 60%),
    radial-gradient(65rem 40rem at -10% 10%, rgba(146, 106, 255, 0.08), transparent 60%),
    var(--zhiji-page-bg);
  color: var(--zhiji-page-text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

.legal-body * {
  box-sizing: border-box;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.5rem;
  width: min(100%, 74rem);
  margin: 0 auto;
  padding: 1.1rem max(1.25rem, calc((100vw - 74rem) / 2)) 1.1rem max(1.25rem, calc((100vw - 74rem) / 2));
  background: rgba(6, 6, 7, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.legal-header .brand {
  color: #fff;
}

.legal-header .brand img,
.legal-header .brand-mark {
  filter: invert(1) brightness(2);
}

.legal-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 2rem);
  color: var(--zhiji-page-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.legal-nav a {
  color: var(--zhiji-page-muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  color: #fff;
}

.legal-main {
  width: min(100%, 74rem);
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 7rem) 1.25rem 6rem;
}

.legal-hero {
  position: relative;
  max-width: 52rem;
  padding: 0 0 clamp(2.5rem, 6vh, 4.5rem);
  border-bottom: 1px solid var(--zhiji-page-line);
}

.legal-eyebrow {
  margin: 0 0 1rem;
  color: var(--zhiji-amber);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 5.2rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.legal-summary {
  max-width: 44rem;
  margin: 1.75rem 0 0;
  color: var(--zhiji-page-muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.85;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  margin: 2rem 0 0;
  color: var(--zhiji-page-faint);
  font-size: 0.82rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
  padding-top: clamp(2.5rem, 6vh, 4rem);
}

.legal-toc {
  position: sticky;
  top: 6.5rem;
  display: grid;
  gap: 0.65rem;
  padding-left: 1rem;
  border-left: 1px solid var(--zhiji-page-line);
  color: var(--zhiji-page-muted);
  font-size: 0.85rem;
}

.legal-toc a {
  color: var(--zhiji-page-muted);
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: #fff;
  transform: translateX(2px);
}

.legal-content {
  min-width: 0;
  max-width: 45rem;
}

.legal-content section {
  padding: clamp(1.75rem, 4vh, 2.5rem);
  border: 1px solid var(--zhiji-page-line);
  border-radius: 1.25rem;
  background: var(--zhiji-page-card);
}

.legal-content section + section {
  margin-top: 1.5rem;
}

.legal-content h2 {
  margin: 0 0 1.15rem;
  color: #fff;
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
  scroll-margin-top: 7rem;
}

.legal-content h3 {
  margin: 1.75rem 0 0.6rem;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.45;
}

.legal-content p,
.legal-content li {
  color: var(--zhiji-page-muted);
  font-size: 1rem;
  line-height: 1.85;
}

.legal-content p + p {
  margin-top: 0.85rem;
}

.legal-content ul {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.legal-content li::marker {
  color: var(--zhiji-amber);
}

.legal-content a {
  color: var(--zhiji-amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 184, 41, 0.4);
  transition: border-color 160ms ease, color 160ms ease;
}

.legal-content a:hover,
.legal-content a:focus-visible {
  color: #ffd670;
  border-color: #ffd670;
}

.legal-note {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(255, 184, 41, 0.22);
  border-radius: 0.9rem;
  background: rgba(255, 184, 41, 0.06);
}

.legal-note strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
}

.legal-note p {
  margin: 0;
}

.site-footer {
  display: grid;
  gap: 1.25rem;
  padding: 2.25rem max(1.25rem, calc((100vw - 74rem) / 2));
  border-top: 1px solid var(--zhiji-page-line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--zhiji-page-muted);
  font-size: 0.85rem;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.footer-brand > p {
  color: var(--zhiji-page-faint);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem 1.25rem;
  color: var(--zhiji-page-muted);
  font-weight: 500;
}

.footer-nav a {
  color: var(--zhiji-page-muted);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  color: var(--zhiji-page-faint);
  font-size: 0.75rem;
}

.footer-legal a {
  color: var(--zhiji-page-faint);
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--zhiji-page-muted);
}

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

  .legal-nav {
    justify-self: start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    white-space: nowrap;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .legal-toc {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 0 0 0.75rem;
    border-left: 0;
    border-bottom: 1px solid var(--zhiji-page-line);
    white-space: nowrap;
  }

  .legal-content section {
    padding: 1.25rem;
    border-radius: 1rem;
  }

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

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .legal-nav,
  .legal-toc {
    scrollbar-width: none;
  }

  .legal-nav::-webkit-scrollbar,
  .legal-toc::-webkit-scrollbar {
    display: none;
  }
}

/* Match official page edge alignment: logo and right actions reach viewport edges */
.legal-header {
  width: 100%;
  max-width: none;
  padding-right: clamp(1.25rem, 4vw, 5rem);
  padding-left: clamp(1.25rem, 4vw, 5rem);
}

.legal-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.legal-header .brand img,
.legal-header .brand-mark {
  width: 2.35rem;
  height: 2.5rem;
  object-fit: contain;
  filter: none;
}

/* Official-style legal footer: top brand/nav row, bottom legal line */
.site-footer {
  display: grid;
  gap: 0;
  padding: 0;
  border-top: 0;
  background: transparent;
}

.footer-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: clamp(2rem, 5vh, 3.5rem) clamp(1.25rem, 4vw, 5rem);
  border-top: 1px solid var(--zhiji-page-line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-brand > p {
  margin-left: 0.75rem;
  color: var(--zhiji-page-faint);
  font-size: 0.85rem;
}

.footer-brand .brand {
  color: #fff;
  font-size: 1.15rem;
  text-decoration: none;
}

.footer-brand .brand img,
.footer-brand .brand-mark {
  width: 1.85rem;
  height: 2rem;
  object-fit: contain;
  filter: none;
}

.footer-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 5rem);
  border-top: 1px solid var(--zhiji-page-line);
  color: var(--zhiji-page-faint);
  font-size: 0.75rem;
  text-align: left;
}

.footer-legal p {
  margin: 0;
}

@media (max-width: 860px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer-nav {
    justify-self: start;
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}
