/* Legal / long-form prose pages (privacy policy, terms).
   The rest of the site styles every paragraph through a component selector, so there was no
   generic prose rule to inherit — this sheet is that rule. It uses the studio tokens from
   site.css and defines no colours of its own. */

.legal-hero {
  padding: 108px 0 46px;
}

.legal-hero h1 {
  margin: 16px 0 0;
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 900;
  line-height: .93;
  letter-spacing: -.045em;
}

.legal-hero .legal-sub {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.64;
  text-wrap: pretty;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 28px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--muted);
}

.legal-meta b { color: var(--text); font-weight: 600; }

.legal-meta a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.legal-meta a:hover { text-decoration-color: var(--text); }

/* Body ------------------------------------------------------------------- */

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

.legal-body .wrap { max-width: 860px; margin-left: 0; }

.legal-body section {
  padding: 46px 0 0;
  border-top: 0;
}

.legal-body h2 {
  margin: 0 0 4px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.legal-body h3 {
  margin: 32px 0 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}

.legal-body p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.72;
  text-wrap: pretty;
}

.legal-body p b,
.legal-body li b { color: var(--text); font-weight: 600; }

.legal-body ul {
  margin: 16px 0 0;
  padding: 0 0 0 22px;
}

.legal-body li {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.66;
  text-wrap: pretty;
}

.legal-body li::marker { color: var(--accent); }

.legal-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.legal-body a:hover { text-decoration-color: var(--text); }

.legal-body code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .88em;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--ph-stripe);
  color: var(--text);
}

/* The "short version" callout ------------------------------------------- */

.legal-callout {
  margin: 24px 0 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.legal-callout ul { padding-left: 20px; }
.legal-callout li:first-child { margin-top: 0; }

/* Tables ---------------------------------------------------------------- */

/* Wide tables scroll inside their own box rather than widening the page. */
.legal-table {
  margin: 20px 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal-table table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 15px;
}

.legal-table th,
.legal-table td {
  padding: 13px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}

.legal-table thead th {
  background: var(--ph-stripe);
  color: var(--text);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.legal-table td { color: var(--muted); }
.legal-table td:first-child { color: var(--text); font-weight: 500; }
.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td { border-bottom: 0; }

/* Back-to-top / page end ------------------------------------------------- */

.legal-end {
  margin: 52px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}

@media (max-width: 720px) {
  .legal-hero { padding: 84px 0 34px; }
  .legal-body section { padding: 36px 0 0; }
  .legal-meta { flex-direction: column; gap: 8px; }
  .legal-table th, .legal-table td { padding: 11px 14px; }
}
