/* Verra Legal Pages — shared stylesheet.
   Theme-mirror is applied via inline script in <head> before paint
   (reads localStorage.verra_theme + prefers-color-scheme). */

:root {
  --bg: #ffffff;
  --bg-elevated: #f8fafc;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #4b5563;
  --text-faint: #6b7280;
  --link: #1d4ed8;
  --link-hover: #1e40af;
  --accent: #b45309;          /* amber for callouts */
  --accent-bg: #fef3c7;
  --accent-border: #fde68a;
  --code-bg: #f3f4f6;
  --code-text: #111827;
  --shadow: 0 1px 2px rgba(0,0,0,0.04);
}

html[data-theme="dark"] {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --border: #1f2937;
  --text: #e5e7eb;
  --text-muted: #cbd5e1;
  --text-faint: #94a3b8;
  --link: #60a5fa;
  --link-hover: #93c5fd;
  --accent: #fbbf24;
  --accent-bg: #422006;
  --accent-border: #78350f;
  --code-bg: #1f2937;
  --code-text: #f3f4f6;
  --shadow: 0 1px 2px rgba(0,0,0,0.4);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legal-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.legal-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.legal-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.legal-nav a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.legal-nav a:hover,
.legal-nav a.active {
  color: var(--link);
}

.legal-nav a.active {
  font-weight: 600;
}

.legal-content h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text);
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
  color: var(--text);
  scroll-margin-top: 24px;
}

.legal-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--text);
}

.legal-content p {
  margin: 0 0 14px;
  color: var(--text-muted);
}

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

.legal-content em {
  font-style: italic;
  color: var(--text-muted);
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-muted);
}

.legal-content li {
  margin: 6px 0;
}

.legal-content a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.legal-content a:hover {
  border-bottom-color: var(--link);
  color: var(--link-hover);
}

.legal-content hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

.legal-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.legal-content blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-bg);
  color: var(--text);
  border-radius: 0 6px 6px 0;
}

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

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 20px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.legal-meta span strong {
  color: var(--text-muted);
}

.legal-callout {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

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

.legal-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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

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

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--link);
  color: var(--link);
}

@media (max-width: 640px) {
  .legal-shell {
    padding: 20px 16px 64px;
  }

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

  .legal-content h1 {
    font-size: 24px;
  }

  .legal-content h2 {
    font-size: 18px;
  }
}
