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

:root {
  --deep: #1a2533;
  --primary: #e8945a;
  --primary-dark: #c76b42;
  --cream: #fcf9f5;
  --steel: #5b8fa8;
  --dark-surface: #212e3d;
  --text: #1c1c1c;
  --text-light: #f2ece0;
  --border-light: #e8e0d5;
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
}

/* ===== NAVIGATION (.navbar class) ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--deep);
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 20px rgba(0,0,0,0.12);
}

.navbar .logo {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.navbar .logo span {
  color: var(--primary);
}

.navbar .nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.navbar .nav-links a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95em;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar .nav-links a:hover {
  color: var(--primary);
}

.navbar .hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.navbar .hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar .hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.navbar .hamburger.active span:nth-child(2) {
  opacity: 0;
}

.navbar .hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--deep) 0%, var(--dark-surface) 100%);
  padding: 120px 48px 64px;
  text-align: center;
  color: var(--text-light);
}

.page-header h1 {
  font-size: 2.8em;
  font-weight: 800;
  color: var(--cream);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.page-header .last-updated {
  font-size: 0.9em;
  color: #a0acb8;
}

/* ===== CONTENT WRAPPER ===== */
.legal-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

/* ===== TABLE OF CONTENTS ===== */
.toc {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 48px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.toc h2 {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
}

.toc ol {
  list-style-position: inside;
  columns: 2;
  column-gap: 40px;
}

.toc ol li {
  margin-bottom: 8px;
}

.toc ol li a {
  color: var(--steel);
  text-decoration: none;
  font-size: 0.92em;
  font-weight: 500;
  transition: color 0.2s;
}

.toc ol li a:hover {
  color: var(--primary-dark);
}

/* ===== LEGAL SECTIONS ===== */
.legal-section {
  margin-bottom: 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border-light);
}

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

.legal-section h2 {
  font-size: 1.45em;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 16px;
  scroll-margin-top: 90px;
}

.legal-section h3 {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--dark-surface);
  margin: 20px 0 10px;
}

.legal-section p {
  font-size: 0.98em;
  color: #3d4752;
  margin-bottom: 14px;
  line-height: 1.75;
}

.legal-section ul, .legal-section ol {
  margin: 10px 0 18px 24px;
  color: #3d4752;
}

.legal-section ul li, .legal-section ol li {
  font-size: 0.98em;
  margin-bottom: 6px;
  line-height: 1.7;
}

.legal-section a {
  color: var(--steel);
  text-decoration: underline;
}

.legal-section a:hover {
  color: var(--primary-dark);
}

/* ===== LEGAL FOOTER ===== */
.legal-footer {
  background: var(--deep);
  color: var(--text-light);
  text-align: center;
  padding: 28px 24px;
  margin-top: 60px;
}

.legal-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

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

.legal-footer p {
  font-size: 0.9em;
  color: #a0acb8;
  margin-top: 8px;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--deep);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9em;
  transition: background 0.2s;
}

.back-to-top:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar .hamburger {
    display: flex;
  }
  .navbar .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    background: var(--deep);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
  }
  .navbar .nav-links.open {
    max-height: 300px;
    padding: 16px 0;
  }
  .navbar .nav-links a {
    padding: 12px 0;
    display: block;
    width: 100%;
    text-align: center;
  }
  .page-header {
    padding: 100px 24px 48px;
  }
  .page-header h1 {
    font-size: 2em;
  }
  .toc ol {
    columns: 1;
  }
  .legal-content {
    padding: 32px 16px 0;
  }
  .legal-section h2 {
    font-size: 1.25em;
  }
}
