:root {
  --background: #0f0f1a;
  --surface: #1a1a2e;
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --text: #f9fafb;
  --text-secondary: #9ca3af;
  --accent: #22d3ee;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
}

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

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  background-image: radial-gradient(
    circle at 50% 0%,
    rgba(139, 92, 246, 0.12) 0%,
    rgba(15, 15, 26, 0) 55%
  );
  background-attachment: fixed;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

/* Header */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text);
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

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

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

/* Content card */
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.legal-content > *:first-child {
  margin-top: 0;
}

.updated {
  display: inline-block;
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  line-height: 1.25;
  background: linear-gradient(to right, #ffffff, var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 + h1,
hr + h1 {
  margin-top: 0.5rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary-light);
  margin: 2.25rem 0 0.85rem;
  line-height: 1.35;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.75rem 0 0.65rem;
}

p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-light);
}

ul,
ol {
  margin: 0 0 1.15rem 1.25rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

li::marker {
  color: var(--primary);
}

hr {
  border: none;
  height: 1px;
  background: var(--border-strong);
  margin: 2.5rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15em 0.4em;
  color: var(--text);
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.95rem;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.75rem 0.85rem;
  text-align: left;
  vertical-align: top;
  color: var(--text-secondary);
}

th {
  background: rgba(139, 92, 246, 0.15);
  color: var(--text);
  font-weight: 600;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0 1.5rem;
}

.table-wrap table {
  margin: 0;
  min-width: 520px;
}

/* Footer */
.legal-footer {
  text-align: center;
  padding: 2.5rem 0.5rem 1rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

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

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary-light);
}

.copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
  margin: 0;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem 1rem 1.5rem;
  }

  .content-card {
    padding: 1.5rem;
    border-radius: 18px;
  }

  h1 {
    font-size: 1.55rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  p,
  li {
    font-size: 1rem;
  }

  .legal-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
