/* ==========================================================================
   MBG — Shared Legal Stylesheet (privacy.html & terms-of-service.html)
   Dark navy theme matching the main site.
   ========================================================================== */

:root {
  --bg: #0F1420;
  --bg-2: #141B2C;
  --surface: #1A2338;
  --line: #273452;
  --line-soft: #1E2A42;
  --text: #E8EEF8;
  --text-soft: #B9C5DA;
  --muted: #8A97AD;
  --accent: #1E3A8A;
  --accent-2: #2547A6;
  --accent-3: #2E56C0;
  --ice: #DBEAFE;
  --ice-soft: #BFD9FB;
  --white: #FFFFFF;
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

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

/* Legal pages load ONLY this stylesheet. Define the body background here. */
.legal-page {
  background-color: #0F1420;
  color: #E8EEF8;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.legal-page a:hover {
  color: var(--ice-soft);
  text-decoration: underline;
}

/* ==========================================================================
   LEGAL HEADER (uses <header>, solid background, strong title contrast)
   ========================================================================== */

.legal-header {
  background: linear-gradient(135deg, #0B0F18 0%, #16213A 60%, #1E3A8A 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 56px;
}

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

.legal-header .back-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ice);
  margin-bottom: 24px;
}

.legal-header h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 16px;
}

.legal-header .lede {
  font-size: 1.1rem;
  color: var(--ice-soft);
  max-width: 680px;
}

/* ==========================================================================
   CONTENT
   ========================================================================== */

.legal-content {
  padding: 56px 0 80px;
}

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

/* Scope-isolation: legal content sections never inherit dark panel paints. */
.legal-page .legal-content section {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.legal-content h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ice);
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}

.legal-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin: 28px 0 10px;
}

.legal-content p {
  color: var(--text-soft);
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 20px 24px;
  color: var(--text-soft);
}

.legal-content li {
  margin-bottom: 10px;
}

.legal-content strong {
  color: var(--white);
  font-weight: 700;
}

.legal-content a {
  color: var(--ice);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: var(--white);
}

/* Table of contents */
.toc {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px;
  margin: 0 0 40px;
}

.toc h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.15rem;
  color: var(--white);
}

.toc ol {
  margin: 0 0 0 20px;
  columns: 1;
}

.toc li {
  margin-bottom: 10px;
}

.toc a {
  color: var(--text-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ice);
}

/* ==========================================================================
   LEGAL FOOTER
   ========================================================================== */

.legal-footer {
  background-color: #0B0F18;
  border-top: 3px solid var(--accent);
  padding: 36px 0;
}

.legal-footer .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.legal-footer a {
  color: var(--ice);
}

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 640px) {
  .legal-header {
    padding: 48px 0 40px;
  }

  .legal-header h1 {
    font-size: 2rem;
  }

  .legal-content h2 {
    font-size: 1.45rem;
  }
}
