/* ===== Legal Pages Shared Stylesheet ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --clr-bg: #f7f5f1;
  --clr-surface: #ffffff;
  --clr-header-bg: #141d2b;
  --clr-text: #1a1f2b;
  --clr-text-muted: #5e677a;
  --clr-heading: #0d121c;
  --clr-accent: #c8822a;
  --clr-accent-light: #f0d9a8;
  --clr-link: #b7731e;
  --clr-link-hover: #8e5917;
  --clr-toc-bg: #faf8f4;
  --clr-toc-border: #e1dbcc;
  --clr-table-border: #d5d0c5;
  --clr-table-header: #f2efe7;
  --clr-footer-bg: #0d1218;
  --clr-footer-text: #8a8f9e;
  --clr-code-bg: #f2efe7;
  --radius-sm: 6px;
  --radius-md: 10px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.78;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Header ===== */
.legal-header {
  background-color: var(--clr-header-bg);
  padding: 32px 0;
  border-bottom: 3px solid var(--clr-accent);
}

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

.legal-header .logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
}

.legal-header .logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--clr-accent), #d49120);
  border-radius: var(--radius-sm);
  font-weight: 900;
  color: #0d121c;
  font-size: 0.95rem;
}

.legal-header .back-home {
  color: var(--clr-accent-light);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.legal-header .back-home:hover {
  background-color: rgba(255,255,255,0.06);
  color: #ffffff;
}

/* ===== Main Content Area ===== */
.legal-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 60px;
  background-color: var(--clr-surface);
}

.legal-body h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--clr-heading);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.legal-body .effective-date {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

/* ===== Table of Contents ===== */
.toc {
  background-color: var(--clr-toc-bg);
  border: 1px solid var(--clr-toc-border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin-bottom: 44px;
}

.toc h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-heading);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc ol {
  list-style: none;
  counter-reset: toc-counter;
}

.toc ol li {
  counter-increment: toc-counter;
  padding: 6px 0;
  font-size: 0.95rem;
}

.toc ol li::before {
  content: counter(toc-counter) ". ";
  font-weight: 600;
  color: var(--clr-accent);
}

.toc ol li a {
  color: var(--clr-link);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.toc ol li a:hover {
  color: var(--clr-link-hover);
  text-decoration: underline;
}

/* ===== Content Sections ===== */
.legal-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--clr-heading);
  margin-top: 44px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--clr-toc-border);
  line-height: 1.3;
}

.legal-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-top: 24px;
  margin-bottom: 10px;
}

.legal-body p {
  margin-bottom: 16px;
  line-height: 1.78;
}

.legal-body ul,
.legal-body ol {
  margin: 8px 0 20px 24px;
  list-style: disc;
}

.legal-body ul li,
.legal-body ol li {
  margin-bottom: 6px;
  line-height: 1.65;
}

.legal-body strong {
  color: var(--clr-heading);
}

.legal-body a {
  color: var(--clr-link);
  text-decoration: none;
}
.legal-body a:hover {
  text-decoration: underline;
}

.legal-body em {
  font-style: italic;
  color: var(--clr-text);
}

.back-to-top {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--clr-link);
  text-decoration: none;
  font-weight: 600;
}
.back-to-top:hover {
  text-decoration: underline;
}

/* ===== Footer ===== */
.legal-footer {
  background-color: var(--clr-footer-bg);
  padding: 24px 0;
  text-align: center;
}

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

.legal-footer p {
  color: var(--clr-footer-text);
  font-size: 0.85rem;
}

.legal-footer a {
  color: var(--clr-accent-light);
  text-decoration: none;
  font-weight: 600;
}
.legal-footer a:hover {
  color: #ffffff;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .legal-body h1 {
    font-size: 1.65rem;
  }
  .legal-body h2 {
    font-size: 1.2rem;
  }
  .toc {
    padding: 20px 20px;
  }
  .legal-header-inner {
    flex-direction: column;
    text-align: center;
  }
}
