@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:ital,wght@0,400;0,600;1,400&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #1a1a2e;
  --paper: #fafaf8;
  --accent: #2d4a7a;
  --accent-light: #e8edf4;
  --border: #d4d0c8;
  --muted: #6b6b7b;
  --section-bg: #ffffff;
  --highlight: #f0ece4;
  --red: #8b3a3a;
  --red-bg: #fdf6f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Newsreader', Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.78;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

/* ── TOP BAR ── */
.legal-topbar {
  background: var(--ink);
  border-bottom: 3px solid var(--accent);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.legal-topbar-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.legal-topbar .site-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.02em;
  padding: 16px 0;
  white-space: nowrap;
}

.legal-topbar nav {
  display: flex;
  gap: 0;
}

.legal-topbar nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255,255,255,0.5);
  padding: 18px 20px;
  position: relative;
  transition: color 0.25s ease;
}

.legal-topbar nav a:hover {
  color: rgba(255,255,255,0.8);
}

.legal-topbar nav a.active {
  color: #ffffff;
}

.legal-topbar nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: #fff;
  border-radius: 3px 3px 0 0;
}

/* ── MAIN CONTAINER ── */
.legal-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 52px 24px 90px;
}

/* ── PAGE HEADER ── */
.page-header {
  text-align: center;
  margin-bottom: 52px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.page-header .effective-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-header .site-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  font-style: italic;
}

/* ── TABLE OF CONTENTS ── */
.toc {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 44px;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}

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

.toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 6px;
}

.toc ol li a {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
}

.toc ol li a::before {
  content: counter(toc-counter) ". ";
  font-weight: 600;
  color: var(--muted);
  margin-right: 2px;
}

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

/* ── SECTIONS ── */
.legal-section {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light);
}

.legal-section h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 20px 0 8px;
}

.legal-section p {
  margin-bottom: 14px;
  color: #333;
}

.legal-section ul,
.legal-section ol {
  margin: 10px 0 18px 28px;
}

.legal-section li {
  margin-bottom: 7px;
  color: #333;
}

.legal-section li strong {
  color: var(--ink);
}

/* ── CALLOUT BOXES ── */
.warning-box {
  background: var(--red-bg);
  border-left: 4px solid var(--red);
  padding: 18px 22px;
  margin: 22px 0;
  border-radius: 0 8px 8px 0;
}

.warning-box p {
  font-size: 14.5px;
  color: var(--red);
  font-weight: 500;
  margin: 0;
  line-height: 1.65;
}

.info-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 18px 22px;
  margin: 22px 0;
  border-radius: 0 8px 8px 0;
}

.info-box p {
  font-size: 14.5px;
  color: var(--accent);
  margin: 0;
  line-height: 1.65;
}

/* ── PLACEHOLDER TAGS ── */
.placeholder {
  background: var(--highlight);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

/* ── CAPS PARAGRAPHS (Legal Uppercase Blocks) ── */
.legal-caps {
  text-transform: uppercase;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

/* ── FOOTER ── */
.legal-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.legal-footer p {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.legal-footer a {
  color: var(--accent);
  text-decoration: none;
}

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

/* ── BACK TO TOP ── */
.back-to-top {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: 32px;
  padding: 10px 22px;
  border: 1px solid var(--accent-light);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.back-to-top:hover {
  background: var(--accent-light);
  color: var(--ink);
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .legal-topbar-inner {
    flex-direction: column;
    gap: 0;
  }
  .legal-topbar .site-name {
    padding: 12px 0 4px;
    font-size: 13px;
  }
  .legal-topbar nav a {
    padding: 12px 14px;
    font-size: 11px;
  }
  .page-header h1 {
    font-size: 26px;
  }
  .legal-container {
    padding: 36px 16px 60px;
  }
  .toc {
    padding: 18px 20px;
  }
}

@media (max-width: 420px) {
  .legal-topbar nav a {
    padding: 10px 10px;
    font-size: 10px;
    letter-spacing: 0.05em;
  }
}
