/* Legal pages — shared styles. Matches the landing-page brand palette
   (--primary green, --gold accent, Inter font) but optimized for long-form
   reading: max 720px line length, generous line-height, restrained color. */

:root {
  --primary: #0d6e3f;
  --primary-light: #15965a;
  --primary-dark: #064d2b;
  --gold: #c9a84c;
  --surface: #ffffff;
  --surface-dim: #f8faf9;
  --text: #1a2e23;
  --text-secondary: #4a6354;
  --text-muted: #7a9488;
  --border: #d4e2da;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--surface-dim);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }

/* Top bar — minimal, just brand + back-to-home link */
.legal-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}
.legal-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.legal-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}
.legal-brand img { width: 32px; height: 32px; border-radius: 6px; }
.legal-nav { display: flex; gap: 1.25rem; font-size: 0.9rem; }
.legal-nav a { color: var(--text-secondary); text-decoration: none; }
.legal-nav a:hover { color: var(--primary); }

/* Content shell */
.legal-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.legal-disclaimer {
  background: #fef9e7;
  border: 1px solid #f0d97f;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  color: #6b5a1e;
  font-size: 0.92rem;
}
.legal-disclaimer strong { color: #5a4814; }

/* Markdown render */
.legal-content { font-size: 1rem; color: var(--text); }
.legal-content h1 { font-size: 2rem; font-weight: 700; margin: 0 0 0.5rem; color: var(--primary-dark); }
.legal-content h2 { font-size: 1.4rem; font-weight: 600; margin: 2.5rem 0 0.75rem; color: var(--primary-dark); padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.legal-content h3 { font-size: 1.15rem; font-weight: 600; margin: 1.75rem 0 0.5rem; color: var(--text); }
.legal-content p { margin: 0 0 1rem; }
.legal-content ul, .legal-content ol { margin: 0 0 1rem 1.5rem; }
.legal-content li { margin-bottom: 0.4rem; }
.legal-content strong { font-weight: 600; color: var(--text); }
.legal-content code { background: var(--surface-dim); padding: 0.1rem 0.4rem; border-radius: 4px; font-family: 'JetBrains Mono', Consolas, monospace; font-size: 0.88em; color: var(--primary-dark); }
.legal-content hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.legal-content blockquote { border-left: 3px solid var(--primary-light); padding: 0.25rem 1rem; color: var(--text-secondary); margin: 1rem 0; }
.legal-content table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.92rem; }
.legal-content th, .legal-content td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
.legal-content th { background: var(--surface-dim); font-weight: 600; }

.legal-loading { color: var(--text-muted); padding: 2rem 0; text-align: center; }
.legal-error { color: #b3261e; padding: 1rem; background: #fdecea; border: 1px solid #f5c2c0; border-radius: 8px; }

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