/* Legal document pages — /terms /privacy /cookies /dpa /subprocessors
   Loaded only by generated pages from legal/build/template.html.
   Long-form prose: narrow measure, generous leading, clause numbering. */

.legal {
  max-width: 74ch;
}

.legal h2 {
  font-size: var(--fs-h3);
  margin-top: 3rem;
  margin-bottom: 0.85rem;
  scroll-margin-top: 6rem;
}

.legal h3 {
  font-size: 1.08rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal p,
.legal li {
  color: var(--ink-dim);
  line-height: 1.7;
}

.legal p {
  margin: 0 0 1rem;
}

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

.legal a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--panel-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.05em 0.35em;
}

.legal .policy-meta {
  color: var(--ink-dim);
  font-size: var(--fs-small);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

/* Plain bullet lists (Privacy, Cookie Policy) */
.legal ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.legal li {
  margin: 0 0 0.45rem;
}

/* ---------------------------------------------------------------- clauses
   Terms and the DPA cross-reference themselves ("see clause 15.1"), so the
   numbers are rendered as literal text by legal/build/render.mjs rather than
   left to the browser's list counter, which can only produce "1.". */

.legal--clauses ol {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.legal--clauses ol > li {
  position: relative;
  margin: 0 0 0.85rem;
}

.legal--clauses ol.clauses > li {
  padding-left: 3.4rem;
}

.legal--clauses ol.sub > li,
.legal--clauses ol.sub2 > li {
  padding-left: 2.6rem;
}

.legal--clauses ol.sub,
.legal--clauses ol.sub2 {
  margin-top: 0.85rem;
  margin-left: 0;
}

.clause-no {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  font-size: 0.95em;
  user-select: none;
}

/* ---------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.legal table {
  border-collapse: collapse;
  width: 100%;
  min-width: 40rem;
  font-size: var(--fs-small);
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--hairline);
}

.legal th {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  background: var(--panel-bg);
}

.legal td {
  color: var(--ink-dim);
  line-height: 1.55;
}

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

.cell-note {
  color: var(--ink-dim);
  font-size: 0.85em;
  opacity: 0.8;
}

.version-heading {
  margin-top: 3.5rem;
}

/* ------------------------------------------------------- sibling document nav */

.legal-nav {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.legal-nav h2 {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--ink-dim);
  margin: 0 0 0.75rem;
}

.legal-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
}

.legal-nav li {
  margin: 0;
}

@media (max-width: 640px) {
  .legal--clauses ol.clauses > li {
    padding-left: 2.9rem;
  }
  .legal h2 {
    margin-top: 2.25rem;
  }
}

/* ---------------------------------------------------------------- print
   Used by legal/build/pdf.mjs to produce the downloadable DPA. */

@media print {
  .site-header,
  .site-footer,
  .hero__glow,
  .hero__fade,
  .legal-nav,
  .skip-link {
    display: none !important;
  }
  .hero {
    padding: 0 0 1.5rem !important;
    background: none !important;
    color: #000 !important;
  }
  .hero h1 {
    color: #000 !important;
  }
  .section {
    padding: 0 !important;
  }
  .legal {
    max-width: none;
  }
  .legal p,
  .legal li,
  .legal td {
    color: #222;
  }
  .legal a {
    color: #000;
    text-decoration: none;
  }
  .table-wrap {
    overflow: visible;
  }
  .legal table {
    min-width: 0;
  }
  .legal h2 {
    break-after: avoid;
  }
  .legal li,
  .legal tr {
    break-inside: avoid;
  }
}
