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

:root {
  --bg: #0a0a0f;
  --surface: #141420;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #a855f7;
  --accent-soft: #c4b5fd;
  --accent2: #ec4899;
  --text: #f0f0f5;
  --text-muted: #a1a1b8;
  --radius: 1rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  text-align: start;
  min-block-size: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.legal-header-inner {
  max-width: 68rem;
  margin-inline: auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.legal-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, #fff, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.legal-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--text);
}

.legal-main {
  flex: 1;
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.5rem) 1.5rem 4rem;
}

.legal-article {
  max-width: 65ch;
  margin-inline: auto;
}

.legal-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.5rem;
}

.legal-article h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.75rem);
  line-height: 1.18;
  font-weight: 700;
  text-wrap: balance;
  margin-bottom: 0.75rem;
}

.legal-meta {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.25rem;
}

.legal-toc-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.65rem;
}

.legal-toc ol {
  padding-inline-start: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.legal-toc a {
  color: var(--accent-soft);
  text-decoration: none;
  font-size: 0.9375rem;
}

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

.legal-section {
  margin-bottom: 2.25rem;
  scroll-margin-top: 5.5rem;
}

.legal-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  line-height: 1.25;
  font-weight: 600;
  text-wrap: balance;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.legal-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.15rem;
  margin-bottom: 0.45rem;
}

.legal-section p {
  color: #d6d6e6;
  font-size: 1rem;
  text-wrap: pretty;
  margin-bottom: 0.85rem;
}

.legal-section ul,
.legal-section ol {
  padding-inline-start: 1.35rem;
  margin-bottom: 1rem;
  display: grid;
  gap: 0.5rem;
  color: #d6d6e6;
}

.legal-section li {
  text-wrap: pretty;
}

.legal-section a {
  color: var(--accent-soft);
  text-underline-offset: 0.2em;
}

.legal-section a:hover {
  color: #fff;
}

.legal-callout {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.12), rgba(236, 72, 153, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-block: 1rem 1.25rem;
}

.legal-callout p:last-child {
  margin-bottom: 0;
}

.legal-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.legal-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

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

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
