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

.legal-page--with-toc {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 991px) {
  .legal-page--with-toc {
    grid-template-columns: 1fr;
  }
}

.legal-toc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 40px;
  position: sticky;
  top: 100px;
}

.legal-toc h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 12px;
  font-family: "DM Sans", system-ui, sans-serif;
}

.legal-toc ol {
  margin: 0;
  padding-left: 20px;
}

.legal-toc li {
  font-size: 13px;
  margin-bottom: 6px;
}

.legal-toc a {
  color: #0e9e76;
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
}

.legal-draft-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #9a3412;
}

.legal-draft-banner strong {
  display: block;
  margin-bottom: 4px;
}

.legal-updated {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 24px;
}

.legal-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #e2e8f0;
  scroll-margin-top: 100px;
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-size: 22px;
  color: #0d2137;
  margin-bottom: 16px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 600;
}

.legal-section h3 {
  font-size: 17px;
  color: #0d2137;
  margin: 20px 0 10px;
}

.legal-section p,
.legal-section li {
  color: #4a5568;
  line-height: 1.8;
  font-size: 15px;
}

.legal-highlight {
  background: #fff7ed;
  border-left: 3px solid #d97706;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
}

.legal-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Cookie consent */
.mg-cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1090;
  padding: 16px;
  pointer-events: none;
}

.mg-cookie-banner[hidden] {
  display: none !important;
}

.mg-cookie-banner__inner {
  pointer-events: auto;
  max-width: 960px;
  margin: 0 auto;
  background: #0d2137;
  color: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.mg-cookie-banner__text {
  flex: 1 1 280px;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.mg-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mg-cookie-modal .form-check-label {
  font-size: 14px;
}

.ai-disclaimer-notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 12px 0;
}

.ai-disclaimer-notice small {
  color: #9a3412;
  line-height: 1.5;
}

@media print {
  .legal-toc,
  .mg-sovereign-navbar,
  .mg-navbar-spacer,
  .mg-footer,
  .mg-cookie-banner,
  .legal-draft-banner {
    display: none !important;
  }

  .legal-page {
    padding: 0;
    max-width: 100%;
  }

  .legal-page--with-toc {
    display: block;
  }
}
