/* ==========================================================================
   ARGTrade — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   Dark theme · electric purple accent (#9333EA)
   ========================================================================== */

:root {
  --bg: #0D0B14;
  --bg-2: #14101F;
  --bg-3: #1B1526;
  --line: #2A2138;
  --text: #EDEAF2;
  --muted: #A99FC4;
  --accent: #9333EA;
  --accent-deep: #7E22CE;
  --accent-light: #C084FC;
}

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

html {
  font-size: 16px;
}

/* body background and text for legal pages */
.legal-page {
  background-color: #0D0B14;
  color: #EDEAF2;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.75;
}

body {
  font-size: 16px;
}

/* Scope isolation: neutralize any inherited section backgrounds */
.legal-page .legal-content section {
  background-color: transparent !important;
}

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

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

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.legal-header {
  background: linear-gradient(135deg, #7E22CE, #9333EA);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}

.legal-header .container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-breadcrumb {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #f3e8ff;
}

.legal-breadcrumb a {
  color: #ffffff;
}

.legal-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 12px;
}

.legal-header .legal-updated {
  font-size: 0.9rem;
  color: #f3e8ff;
}

/* --------------------------------------------------------------------------
   Content container
   -------------------------------------------------------------------------- */
.legal-content .container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-content {
  padding: 48px 0;
}

/* --------------------------------------------------------------------------
   Table of contents
   -------------------------------------------------------------------------- */
.toc {
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 14px;
}

.toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.toc a {
  font-size: 0.92rem;
  color: var(--muted);
}

.toc a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Legal body content
   -------------------------------------------------------------------------- */
.legal-content section {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

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

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 16px;
}

.legal-content h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--accent-light);
  margin: 20px 0 10px;
}

.legal-content p {
  color: var(--muted);
  margin-bottom: 16px;
}

.legal-content p strong {
  color: var(--text);
}

.legal-content ul {
  margin: 0 0 16px 22px;
  color: var(--muted);
}

.legal-content ul li {
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.legal-footer {
  background-color: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.legal-footer .container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.legal-footer p {
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-footer a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-light);
}

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .toc ol {
    grid-template-columns: 1fr;
  }

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