/* ==========================================================================
   YueShun — shared legal stylesheet (Privacy Policy + Terms of Service)
   Loaded ONLY by the legal pages. Self-contained; does not depend on style.css.
   ========================================================================== */

.legal-page {
  background-color: #100C0A;
  color: #F4EDE3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* --------------------------------------------------------------------------
   Legal header — a <header> element with a solid gradient background
   -------------------------------------------------------------------------- */
.legal-header {
  background: linear-gradient(135deg, #17110D 0%, #241510 55%, #331E12 100%);
  border-bottom: 1px solid #2C211A;
  padding: 44px 0 56px;
}

.legal-header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 800;
  color: #F4EDE3;
}

.legal-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #E26D3F, #E9BF7E);
  color: #1B100A;
  font-weight: 800;
  font-size: 19px;
}

.legal-back-link {
  font-size: 14px;
  font-weight: 600;
  color: #E9BF7E;
  padding: 9px 16px;
  border: 1px solid #2C211A;
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.legal-back-link:hover {
  border-color: #E26D3F;
  color: #F4EDE3;
}

.legal-header-title {
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #F4EDE3;
  margin-bottom: 14px;
}

.legal-header-sub {
  font-size: 16px;
  color: #D4C9BB;
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   Legal content
   -------------------------------------------------------------------------- */
.legal-content {
  padding: 64px 0 40px;
  background-color: #100C0A;
}

/* Scope isolation: any section inside the legal content keeps the body bg */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Table of contents
   -------------------------------------------------------------------------- */
.toc {
  margin-bottom: 56px;
  padding: 28px 28px;
  border: 1px solid #2C211A;
  border-radius: 14px;
  background-color: #17110D;
}

.toc-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E26D3F;
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.toc-list a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #D4C9BB;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: #E26D3F;
}

.toc-list a::before {
  content: "→";
  color: #E26D3F;
  margin-right: 8px;
}

/* --------------------------------------------------------------------------
   Legal sections and typography
   -------------------------------------------------------------------------- */
.legal-content section {
  margin-bottom: 56px;
  padding-bottom: 44px;
  border-bottom: 1px solid #251C16;
}

.legal-content section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.legal-content h2 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #F4EDE3;
  margin-bottom: 18px;
  padding-top: 8px;
}

.legal-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: #F4EDE3;
  margin: 26px 0 12px;
}

.legal-content p {
  font-size: 16px;
  color: #D4C9BB;
  margin-bottom: 18px;
}

.legal-content ul {
  margin: 0 0 20px 22px;
  color: #D4C9BB;
}

.legal-content ul li {
  margin-bottom: 10px;
  font-size: 16px;
}

.legal-content strong {
  color: #F4EDE3;
  font-weight: 700;
}

.legal-content a {
  color: #E9BF7E;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: #F4EDE3;
}

/* --------------------------------------------------------------------------
   Legal footer
   -------------------------------------------------------------------------- */
.legal-footer {
  border-top: 1px solid #2C211A;
  background-color: #100C0A;
  padding: 40px 0 48px;
}

.legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: #F4EDE3;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.legal-footer-links a {
  font-size: 14px;
  color: #D4C9BB;
  transition: color 0.2s ease;
}

.legal-footer-links a:hover {
  color: #E26D3F;
}

.legal-footer-copy {
  flex-basis: 100%;
  font-size: 13px;
  color: #A29789;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .toc-list {
    grid-template-columns: 1fr;
  }

  .legal-header {
    padding: 32px 0 44px;
  }
}
