/* Legal / compliance page layout. Shared by terms / privacy / aigc / disclaimer. */

:root {
  --legal-max-width: 780px;
  --legal-padding: 48px 32px;
  --legal-heading: var(--text-strong, #1a1a1a);
  --legal-text: var(--text-default, #333);
  --legal-muted: var(--text-muted, #666);
  --legal-border: var(--border-light, #e5e5e5);
}

body.legal-page {
  font-family: "Noto Serif SC", "LXGW WenKai", "PingFang SC", "Microsoft YaHei",
    serif;
  background: var(--bg-default, #fdfbf5);
  color: var(--legal-text);
  line-height: 1.8;
  margin: 0;
}

body.legal-page .legal-shell {
  max-width: var(--legal-max-width);
  margin: 0 auto;
  padding: var(--legal-padding);
}

body.legal-page .legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--legal-border);
}

body.legal-page .legal-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #d4a054;
  text-decoration: none;
}

body.legal-page .legal-back {
  color: var(--legal-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

body.legal-page .legal-back:hover {
  color: #d4a054;
}

body.legal-page h1 {
  font-size: 1.8rem;
  color: var(--legal-heading);
  margin: 0 0 8px;
}

body.legal-page .legal-meta {
  color: var(--legal-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

body.legal-page h2 {
  font-size: 1.25rem;
  color: var(--legal-heading);
  border-left: 3px solid #d4a054;
  padding-left: 12px;
  margin: 32px 0 16px;
}

body.legal-page h3 {
  font-size: 1.05rem;
  margin: 24px 0 10px;
}

body.legal-page p,
body.legal-page li {
  font-size: 0.98rem;
}

body.legal-page ul,
body.legal-page ol {
  padding-left: 1.5rem;
}

body.legal-page code,
body.legal-page kbd {
  background: rgba(212, 160, 84, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 0.88rem;
  color: #8a6a2e;
}

body.legal-page blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(212, 160, 84, 0.08);
  border-left: 4px solid #d4a054;
  border-radius: 4px;
  color: var(--legal-muted);
}

body.legal-page a {
  color: #a87a2f;
}

body.legal-page .legal-toc {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  padding: 16px 24px;
  margin-bottom: 32px;
}

body.legal-page .legal-toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

body.legal-page .legal-toc a {
  text-decoration: none;
}

body.legal-page .legal-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--legal-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--legal-muted);
}

body.legal-page .legal-footer a {
  color: var(--legal-muted);
  margin-right: 12px;
  text-decoration: none;
}

body.legal-page .legal-footer a:hover {
  color: #d4a054;
}

/* ------- Cookie banner (used site-wide, not only on legal pages) ----- */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-default, #fff);
  border: 1px solid var(--border-light, #e5e5e5);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-banner-text {
  flex: 1 1 240px;
  color: var(--text-default, #333);
}

.cookie-banner-text a {
  color: #a87a2f;
}

.cookie-banner button {
  font: inherit;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  background: #d4a054;
  color: #fff;
  font-weight: 600;
}

.cookie-banner button.secondary {
  background: transparent;
  color: var(--text-muted, #666);
  border-color: var(--border-light, #d6d6d6);
}

/* AIGC badge attached at the end of every assistant response */

.aigc-notice {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(212, 160, 84, 0.08);
  color: var(--text-muted, #6d6b66);
  font-size: 0.78rem;
  line-height: 1.5;
  border: 1px dashed rgba(212, 160, 84, 0.35);
}

.aigc-notice a {
  color: inherit;
  text-decoration: underline dotted;
}

/* Site footer (shown on login + chat) */

.site-footer {
  padding: 12px 16px;
  text-align: center;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.72rem;
  line-height: 1.6;
  border-top: 1px solid var(--border-light, transparent);
}

.site-footer a {
  color: inherit;
  margin: 0 6px;
  text-decoration: none;
}

.site-footer a:hover {
  color: #d4a054;
}

/* ------- Mobile ----------------------------------------------------- */

@media (max-width: 768px) {
  body.legal-page .legal-shell {
    padding: 28px 18px;
  }
  body.legal-page h1 {
    font-size: 1.5rem;
  }
  body.legal-page h2 {
    font-size: 1.12rem;
  }
  body.legal-page .legal-top {
    flex-wrap: wrap;
    gap: 8px;
  }
  body.legal-page .legal-footer {
    flex-direction: column;
    gap: 10px;
  }
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 14px 16px;
  }
}
