/* HaemCalc — shared legal page styles, matching the slate/blue app palette */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-tint: rgba(37, 99, 235, 0.08);
  --warn-bg: #fef3c7;
  --warn-border: #fcd34d;
  --warn-text: #92400e;
  --radius-sm: 6px;
  --radius-md: 12px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.7; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }
.container { width: min(820px, 91%); margin-inline: auto; }

header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
  width: min(1080px, 91%); margin-inline: auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: #0f172a; color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; letter-spacing: -0.02em;
}
.brand-name { font-size: 0.95rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.brand-tagline { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }
.back-link {
  font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
  padding: 7px 13px; border-radius: var(--radius-sm); text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.back-link:hover { color: var(--primary); background: var(--primary-tint); }

.legal-hero {
  padding: 56px 0 24px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-alt) 100%);
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--warn-bg); color: var(--warn-text);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 5px 12px;
  border-radius: 100px; margin-bottom: 18px;
  border: 1px solid var(--warn-border);
}
.legal-hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 700; letter-spacing: -0.025em;
  color: var(--text); line-height: 1.18; margin-bottom: 10px;
}
.legal-hero .subtitle {
  font-size: 0.9rem; color: var(--muted);
}

article {
  padding: 40px 0 80px;
  background: var(--bg);
}
article h2 {
  font-size: 1.2rem; font-weight: 700;
  color: var(--text); margin: 32px 0 12px;
  letter-spacing: -0.015em;
}
article h2:first-child { margin-top: 0; }
article p { margin-bottom: 14px; color: var(--text-secondary); }
article ul, article ol { margin: 8px 0 18px 24px; }
article li { margin-bottom: 6px; color: var(--text-secondary); }
article strong { color: var(--text); font-weight: 700; }
article .lead {
  font-size: 1rem; line-height: 1.7;
  color: var(--text-secondary);
  padding: 16px 20px;
  background: var(--surface);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
article table {
  width: 100%; border-collapse: collapse; margin: 12px 0 20px;
  font-size: 0.92rem; background: var(--surface);
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border);
}
article th, article td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); }
article th { background: var(--primary-tint); color: var(--text); font-weight: 700; }
article tr:last-child td { border-bottom: none; }
.related {
  margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; width: min(1080px, 91%); margin-inline: auto;
  flex-wrap: wrap;
}
.footer-note {
  font-size: 0.78rem; color: var(--muted); line-height: 1.6;
}
.footer-note strong { color: var(--text-secondary); font-weight: 600; }
.footer-legal-links {
  font-size: 0.74rem; color: var(--muted);
}
.footer-legal-links a { color: var(--muted); text-decoration: underline; }
.footer-legal-links a:hover { color: var(--primary); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .legal-hero { padding: 40px 0 18px; }
  article { padding: 28px 0 56px; }
}
