/* Legal / trust / SEO / company content pages — plain, readable, light theme for the prose that
   sits between the shared dark <MarketingNav>/<MarketingFooter> chrome (see marketing-shared.css).
   Deliberately its own light palette rather than reusing .mk-invert: these are static content
   pages, not marketing surfaces, so they keep the original legal-doc look these pages shipped
   with rather than picking up the landing themes' branding.

   Every page that uses this file wraps its <main class="legal"> in an outer <div class="mk-page">
   (see MarketingHead's callers) — that's what makes var(--mk-font-display)/var(--mk-font-body)
   and the --mk-* placeholder tokens below resolve; .legal itself never redefines them. */

html:has(.legal),
html:has(.legal) body {
  height: auto !important;
  min-height: 100% !important;
  background: #ffffff !important;
  overflow: visible !important;
}

.legal {
  --accent: #0d6e6e;
  --ink: #0c1220;
  --muted: #5c6b80;
  --line: #e6e9f0;
  --surface: #f4f7f8;
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--mk-font-body, "Inter", system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.65;
}

.legal * { box-sizing: border-box; }
.legal a { color: var(--accent); }

.legal-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px clamp(20px, 5vw, 56px) 96px;
}

.legal-content--wide {
  max-width: 920px;
}

.legal-content h1 {
  font-family: var(--mk-font-display, "Inter Tight", sans-serif);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.15;
}

.legal-lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 12px;
  max-width: 42rem;
}

.legal-content .legal-updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 32px;
}

.legal-summary {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 0 0 36px;
  color: #2a3242;
}

.legal-content h2 {
  font-family: var(--mk-font-display, "Inter Tight", sans-serif);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 40px 0 12px;
}

.legal-content h3 {
  font-family: var(--mk-font-display, "Inter Tight", sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 24px 0 8px;
}

.legal-content p,
.legal-content li {
  color: #2a3242;
  font-size: 1rem;
}

.legal-content ul {
  padding-left: 22px;
}

.legal-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 28px 0 8px;
}

.legal-feature {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.legal-feature h3 {
  margin: 0 0 8px;
}

.legal-feature p {
  margin: 0;
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 20px 0 8px;
  border: 1px solid var(--line);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: #2a3242;
}

.legal-table thead th {
  background: var(--surface);
  font-family: var(--mk-font-display, "Inter Tight", sans-serif);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.legal-table tbody th {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.legal-link-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.legal-link-list li {
  margin: 0 0 10px;
}

.legal-link-list a {
  font-weight: 600;
  text-decoration: none;
}

.legal-link-list a:hover {
  text-decoration: underline;
}

.legal-related {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.legal-related a {
  font-weight: 600;
  text-decoration: none;
}

.legal-related a:hover {
  text-decoration: underline;
}

.legal-cta {
  margin-top: 48px;
  padding: 32px 0 0;
  border-top: 1px solid var(--line);
}

.legal-cta--inline {
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.legal-cta h2 {
  margin-top: 0;
}

.legal-cta-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.legal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: var(--ink);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
}

.legal-btn:hover {
  background: var(--accent);
}

/* Visible "this needs the owner" callout — see PROGRESS.md and the About/Careers/Status pages.
   Uses the .mk-page ancestor's tokens (never redefined locally) rather than the .legal palette
   above: --mk-line-strong / --mk-fg-faint are the tokens marketing-shared.css already ships for
   "subtle border, muted label" on a LIGHT ground once flipped by .mk-invert, so wrap the callout's
   containing page section in .mk-invert (as the pages here do) rather than duplicating a palette. */
.mk-placeholder {
  display: block;
  margin: 24px 0;
  padding: 14px 18px;
  border: 1px dashed var(--mk-line-strong, var(--line));
  border-radius: 6px;
  background: var(--surface);
  color: var(--mk-fg-faint, var(--muted));
  font-size: 0.92rem;
  line-height: 1.55;
}

.mk-placeholder strong {
  color: var(--ink);
}
