/* Legal pages — shared styles. Lighter background than the marketing
   site so long-form text is easier on the eyes. */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.legal-nav {
  background: #0a0e1a;
  color: #fff;
  padding: 16px 24px;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.legal-nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.legal-nav a.brand {
  font-weight: 800; font-size: 18px; color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
/* Official Credentik lockup, reversed variant for the dark nav. */
.legal-nav a.brand img { display: block; width: 132px; height: 28px; }
.legal-nav .nav-links {
  display: flex; gap: 18px; font-size: 13px;
}
.legal-nav .nav-links a {
  color: rgba(255,255,255,0.7); text-decoration: none;
}
.legal-nav .nav-links a:hover { color: #fff; }

.legal-banner {
  background: #fef3c7; color: #78350f;
  padding: 12px 24px; font-size: 13px; text-align: center;
  border-bottom: 1px solid #fde68a;
}
.legal-banner strong { font-weight: 700; }

.legal-container {
  max-width: 760px; margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-meta {
  font-size: 12px; color: #64748b; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.legal-container h1 {
  font-size: 36px; font-weight: 800; line-height: 1.15;
  margin-bottom: 12px; color: #0f172a;
}
.legal-container .lede {
  font-size: 17px; color: #475569; margin-bottom: 32px;
  padding-bottom: 24px; border-bottom: 1px solid #e2e8f0;
}
.legal-container h2 {
  font-size: 22px; font-weight: 700; margin-top: 40px; margin-bottom: 12px;
  color: #0f172a;
}
.legal-container h3 {
  font-size: 16px; font-weight: 600; margin-top: 24px; margin-bottom: 8px;
  color: #1e293b;
}
.legal-container p, .legal-container li {
  font-size: 15px; color: #334155; margin-bottom: 12px;
}
.legal-container ul, .legal-container ol {
  margin-left: 24px; margin-bottom: 16px;
}
.legal-container a {
  color: #0891b2; text-decoration: underline;
}
.legal-container strong { color: #0f172a; font-weight: 600; }
.legal-container code {
  background: #e2e8f0; padding: 2px 6px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
}

.legal-cta {
  margin-top: 40px; padding: 24px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
}
.legal-cta h3 { margin-top: 0; }
.legal-cta a.btn {
  display: inline-block; background: #0891b2; color: #fff;
  padding: 10px 18px; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 14px; margin-top: 8px;
}

.legal-toc {
  background: #fff; padding: 20px 24px;
  border: 1px solid #e2e8f0; border-radius: 10px;
  margin: 24px 0 40px;
}
.legal-toc h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: #64748b; margin-bottom: 12px; font-weight: 700;
}
.legal-toc ol { margin-left: 18px; margin-bottom: 0; }
.legal-toc li { font-size: 14px; margin-bottom: 4px; }

.legal-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 24px;
}
.legal-card {
  background: #fff; padding: 24px;
  border: 1px solid #e2e8f0; border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.legal-card:hover { border-color: #0891b2; transform: translateY(-2px); }
.legal-card h3 { margin-top: 0; }
.legal-card p { font-size: 13px; color: #64748b; margin-bottom: 0; }

footer.legal-footer {
  background: #0a0e1a; color: rgba(255,255,255,0.6);
  padding: 32px 24px; text-align: center; font-size: 13px;
}
footer.legal-footer a {
  color: rgba(255,255,255,0.85); text-decoration: none; margin: 0 8px;
}

/* mbar:start */
/* Mobile bottom tab bar (phones, < 768px). Mirrors the membermd.io landing tab bar:
   four destinations plus the trial CTA in the last slot, frosted white, safe-area aware.
   Markup: mbar() in _tools/build.py. The build copies this block into legal/styles.css,
   so it uses literal colors instead of the home.css tokens. */
.mbar { display: none; }
@media (max-width: 767px) {
  :root { --mbar-h: 64px; }
  /* Room to scroll clear of the bar; focused/anchored content stops above it. */
  html { scroll-padding-bottom: calc(var(--mbar-h) + 12px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(var(--mbar-h) + env(safe-area-inset-bottom)); }
  .mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    box-sizing: border-box; height: calc(var(--mbar-h) + env(safe-area-inset-bottom));
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -10px 24px -20px rgba(15, 23, 42, .4);
    font-family: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }
  .mbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0; min-height: 48px; padding: 4px 2px; border-radius: 12px;
    color: #64748b; font-size: 11px; font-weight: 600; line-height: 1.15; letter-spacing: .01em;
    text-decoration: none; white-space: nowrap;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .mbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .mbar svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mbar a:hover { color: #0f172a; text-decoration: none; }
  .mbar a:focus-visible { outline: 3px solid #4f46e5; outline-offset: 1px; }
  /* Current section, like membermd's highlighted tab. */
  .mbar a[aria-current="page"] { color: #4338ca; background: #eef2ff; }
  .mbar a.mbar-cta { color: #fff; background: #4f46e5; box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .8); }
  .mbar a.mbar-cta:hover { color: #fff; background: #4338ca; }
  /* The header menu sheet owns the screen while it is open. */
  body:has(.mnav.open) .mbar { display: none; }
  /* The bar carries the trial CTA, so the phone header keeps just the logo and the menu. */
  .hdr-cta .btn-trial { display: none; }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .mbar a { transition: transform .12s ease, color .15s ease, background-color .15s ease; }
  .mbar a:active { transform: scale(.92); }
}
@media print { .mbar { display: none !important; } body { padding-bottom: 0; } }
/* mbar:end */
