/**
 * CrashDash legal pages (privacy.html, terms.html)
 * Tokens aligned with design-system/tokens.css — CrashDash blue primary,
 * dark civic surfaces. Purple only as a thin header brand accent.
 */

:root {
  --cd-bg: #0a0a0a;
  --cd-surface: #0f0f0f;
  --cd-elevated: #1a1a1a;
  --cd-border: rgba(255, 255, 255, 0.08);
  --cd-border-strong: rgba(255, 255, 255, 0.15);
  --cd-text: #f9f9ff;
  --cd-text-secondary: rgba(214, 217, 224, 0.85);
  --cd-text-muted: rgba(214, 217, 224, 0.55);
  --cd-primary: #2b9af3;
  --cd-primary-dark: #1e7cc7;
  --cd-primary-soft: rgba(43, 154, 243, 0.12);
  --cd-primary-soft-border: rgba(43, 154, 243, 0.35);
  /* Subtle CrowdLab brand nod — header rule only */
  --cd-brand-accent: #6e1ae4;
  --cd-coral: #f45b69;
  --cd-coral-soft: rgba(244, 91, 105, 0.12);
  --cd-coral-soft-border: rgba(244, 91, 105, 0.35);
  --cd-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--cd-font);
  background: var(--cd-bg);
  color: var(--cd-text-secondary);
  line-height: 1.5;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--cd-surface);
  border-radius: 12px;
  padding: 40px;
  border: 1px solid var(--cd-border);
}

.header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--cd-brand-accent);
}

.header h1 {
  color: var(--cd-text);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.header p {
  color: var(--cd-text-muted);
  font-size: 1rem;
  font-weight: 500;
}

.section {
  margin-bottom: 30px;
}

.section h2 {
  color: var(--cd-text);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 15px;
  border-left: 3px solid var(--cd-primary);
  padding-left: 14px;
}

.section h3 {
  color: var(--cd-text);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 20px 0 10px;
}

.section p,
.section ul,
.section ol {
  margin-bottom: 15px;
  color: var(--cd-text-secondary);
}

.section ul,
.section ol {
  padding-left: 20px;
}

.section li {
  margin-bottom: 8px;
}

.section a,
.section a:visited {
  color: var(--cd-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.section a:hover {
  color: var(--cd-primary-dark);
}

.highlight {
  background: var(--cd-elevated);
  border: 1px solid var(--cd-border-strong);
  padding: 16px 18px;
  margin: 20px 0;
  border-radius: 8px;
}

.highlight p {
  margin-bottom: 8px;
}

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

.warning {
  background: var(--cd-coral-soft);
  border: 1px solid var(--cd-coral-soft-border);
  padding: 16px 18px;
  margin: 20px 0;
  border-radius: 8px;
}

.warning p {
  margin-bottom: 0;
  color: var(--cd-text-secondary);
}

.back-link {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--cd-border);
}

.back-link a {
  display: inline-block;
  color: var(--cd-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 20px;
  border: 1.5px solid var(--cd-primary);
  border-radius: 8px;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}

.back-link a:hover {
  background: var(--cd-primary);
  color: var(--cd-text-inverse, #0a0a0a);
  border-color: var(--cd-primary);
}

.legal-footer {
  text-align: center;
  color: var(--cd-text-muted);
  font-size: 11px;
  margin-top: 24px;
}

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

  .header h1 {
    font-size: 1.75rem;
  }

  .section h2 {
    font-size: 1.2rem;
  }
}
