/* 法律信息页与 Cookie 同意横幅样式（独立法律页裸标签规则已与主落地页 .ms-page 隔离，避免互相串扰） */
:root {
  --legal-bg: #0b0d12;
  --legal-panel: #12161f;
  --legal-text: #e9edf5;
  --legal-muted: #9aa4b8;
  --legal-accent: #5b8cff;
  --legal-border: #222a3a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body:not(.ms-page) {
  margin: 0;
  padding: 0;
  background: var(--legal-bg);
  color: var(--legal-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body:not(.ms-page) a {
  color: var(--legal-accent);
  text-decoration: none;
}

body:not(.ms-page) a:hover {
  text-decoration: underline;
}

body:not(.ms-page) .wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 96px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--legal-border);
  position: sticky;
  top: 0;
  background: rgba(11, 13, 18, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 20;
}

header.site .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

header.site .brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

nav.site a {
  margin-left: 16px;
  font-size: 14px;
  color: var(--legal-muted);
}

nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--legal-text);
}

body:not(.ms-page) h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 24px 0 8px;
}

body:not(.ms-page) h2 {
  font-size: 20px;
  margin: 32px 0 10px;
}

body:not(.ms-page) h3 {
  font-size: 16px;
  margin: 22px 0 8px;
}

body:not(.ms-page) p,
body:not(.ms-page) li {
  color: var(--legal-text);
}

.muted {
  color: var(--legal-muted);
}

.meta {
  color: var(--legal-muted);
  font-size: 13px;
  margin-bottom: 24px;
}

body:not(.ms-page) .card {
  background: var(--legal-panel);
  border: 1px solid var(--legal-border);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 18px 0;
}

body:not(.ms-page) ul,
body:not(.ms-page) ol {
  padding-left: 22px;
}

body:not(.ms-page) li {
  margin: 6px 0;
}

body:not(.ms-page) table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

body:not(.ms-page) th,
body:not(.ms-page) td {
  border: 1px solid var(--legal-border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

body:not(.ms-page) th {
  background: #171d28;
}

footer.site {
  border-top: 1px solid var(--legal-border);
  margin-top: 48px;
  padding: 22px 20px;
  color: var(--legal-muted);
  font-size: 13px;
}

footer.site .links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
}

/* 落地页内嵌法律页脚 */
.site-legal {
  border-top: 1px solid var(--legal-border);
  margin-top: 48px;
  padding: 24px 20px 96px;
  text-align: center;
  color: var(--legal-muted);
  font-size: 13px;
  background: var(--legal-bg);
}

.site-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.site-legal-links a {
  color: var(--legal-muted);
}

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

.site-legal-copy {
  color: var(--legal-muted);
  word-break: break-word;
}

.site-legal-copy a {
  color: var(--legal-muted);
}

.lang-switch {
  font-size: 13px;
  color: var(--legal-muted);
}

.lang-switch a {
  margin-left: 8px;
}

/* Cookie 同意横幅 */
#cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #0f141d;
  border-top: 1px solid var(--legal-border);
  padding: 14px 18px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  display: none;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
}

#cookie-consent[data-open="true"] {
  display: block;
}

#cookie-consent .inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

#cookie-consent p {
  margin: 0;
  flex: 1 1 280px;
  font-size: 13px;
  line-height: 1.55;
  color: #cfd6e4;
}

#cookie-consent p a {
  color: var(--legal-accent);
  text-decoration: underline;
}

#cookie-consent .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#cookie-consent button {
  border: 1px solid var(--legal-border);
  background: #1a2130;
  color: var(--legal-text);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}

#cookie-consent button.primary {
  background: var(--legal-accent);
  border-color: var(--legal-accent);
  color: #fff;
  font-weight: 600;
}

#cookie-consent button:hover {
  filter: brightness(1.1);
}

@media (max-width: 560px) {
  body:not(.ms-page) h1 {
    font-size: 24px;
  }

  header.site {
    flex-direction: column;
    align-items: flex-start;
  }

  nav.site a {
    margin-left: 0;
    margin-right: 14px;
  }
}
