:root {
  --bg-primary: #0f1020;
  --bg-deep: #1a1b3a;
  --accent: #6c63ff;
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.74);
  --text-muted: rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.04);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(circle at 85% -10%, rgba(108, 99, 255, 0.16), transparent 45%),
    linear-gradient(160deg, var(--bg-deep) 0%, #1c1d40 35%, var(--bg-primary) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

.legal-header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.legal-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.legal-back {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.legal-back:hover { color: var(--text); }

main.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.legal h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal .intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.legal h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.legal h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: #cfcaff;
}

.legal p { color: var(--text-secondary); margin-bottom: 1rem; }
.legal ul { color: var(--text-secondary); margin: 0 0 1rem 1.25rem; }
.legal li { margin-bottom: 0.5rem; }
.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal strong { color: var(--text); }

.legal .callout {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.legal .callout p:last-child { margin-bottom: 0; }

.legal .fill { color: #ffd27a; }

.legal-footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.legal-footer a { color: var(--text-secondary); }

@media (max-width: 640px) {
  .legal h1 { font-size: 1.85rem; }
  main.legal { padding-top: 2.5rem; }
}
