/* Privacy and Terms. Loaded after site.css on those two pages only, so the
   long-form document styles never leak into Home or Pricing. */

.legal-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 88px) clamp(20px, 4vw, 40px) clamp(72px, 8vw, 112px);
}

.legal-head h1 {
  margin: 0;
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #24231f;
  text-wrap: balance;
}
.legal-meta {
  margin: 16px 0 0;
  font-size: 15px;
  color: #72716a;
}
.legal-meta a { color: #596a56; text-decoration: underline; }

.legal-grid {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(36px, 4vw, 56px);
  align-items: start;
}

/* Contents. Sticky on wide screens so the reader can jump sections without
   scrolling back to the top of a long document. */
.legal-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  border-top: 1px solid #24231f;
  padding-top: 14px;
}
.legal-toc h2 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #24231f;
}
.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: 14.5px;
  line-height: 1.35;
  color: #44443f;
}
.legal-toc a::before {
  content: counter(toc);
  flex: 0 0 1.4em;
  font-variant-numeric: tabular-nums;
  color: #9a988f;
}
.legal-toc a:hover { color: #9E5A0B; }

/* The document itself. */
.legal-doc { max-width: 68ch; min-width: 0; }

.legal-summary {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid #ddd8cf;
  border-radius: 12px;
  background: #fbfaf7;
}
.legal-summary h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #24231f;
}
.legal-doc .legal-summary ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.legal-doc .legal-summary li {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid #ebe7df;
  font-size: 16px;
  line-height: 1.5;
  color: #24231f;
}
.legal-doc .legal-summary li:first-child { border-top: none; padding-top: 4px; }
.legal-doc .legal-summary p {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: #72716a;
}

.legal-doc section {
  scroll-margin-top: 96px;
  margin-top: clamp(40px, 4vw, 56px);
  counter-increment: sec;
}
.legal-doc { counter-reset: sec; }
.legal-doc section > h2 {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin: 0 0 14px;
  padding-top: 18px;
  border-top: 1px solid #ddd8cf;
  font-size: clamp(22px, 2.2vw, 27px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #24231f;
}
.legal-doc section > h2::before {
  content: counter(sec);
  font-size: 0.72em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #9E5A0B;
  min-width: 1.3em;
}
.legal-doc h3 {
  margin: 26px 0 8px;
  font-size: 17.5px;
  font-weight: 700;
  color: #24231f;
}
.legal-doc p,
.legal-doc li {
  font-size: 17px;
  line-height: 1.65;
  color: #44443f;
  text-wrap: pretty;
}
.legal-doc p { margin: 0 0 14px; }
.legal-doc ul { margin: 0 0 14px; padding-left: 1.2em; }
.legal-doc li { margin: 0 0 8px; }
.legal-doc li::marker { color: #9a988f; }
.legal-doc strong { color: #24231f; font-weight: 600; }
.legal-doc a { color: #596a56; text-decoration: underline; text-underline-offset: 2px; }
.legal-doc a:hover { color: #9E5A0B; }
.legal-doc .caps { text-transform: uppercase; font-size: 15px; letter-spacing: .01em; }

/* Service providers: a real table, because it is one. Scrolls on its own on
   narrow screens rather than pushing the page sideways. */
.legal-table-wrap { overflow-x: auto; margin: 6px 0 18px; }
.legal-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.5;
}
.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid #ebe7df;
  color: #44443f;
}
.legal-table th {
  font-weight: 700;
  color: #24231f;
  border-bottom: 1px solid #24231f;
}
.legal-table td:first-child { font-weight: 600; color: #24231f; }
.legal-table th:nth-child(1) { width: 26%; }
.legal-table th:nth-child(2) { width: 32%; }

/* Values the operator still has to fill in. The build refuses to ship a page
   that still contains one (see scripts/copy-marketing.mjs). */
mark.todo { background: #fbe3bd; color: #24231f; padding: 0 3px; border-radius: 3px; }

.legal-doc a:focus-visible,
.legal-toc a:focus-visible,
.legal-meta a:focus-visible { outline: 2px solid #24231f; outline-offset: 2px; border-radius: 2px; }

@media (max-width: 860px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .legal-toc {
    position: static;
    max-height: none;
    padding-bottom: 6px;
  }
  .legal-toc ol { columns: 2; column-gap: 24px; }
  .legal-toc li { break-inside: avoid; }
}
@media (max-width: 480px) {
  .legal-toc ol { columns: 1; }
}

@media print {
  header, footer, .legal-toc { display: none !important; }
  .legal-grid { display: block; }
  .legal-doc { max-width: none; }
}
