/* Shared print stylesheet for the Meritto legal documents.
 *
 * These render to public/legal/*.pdf via `npm run legal:pdf`. Deliberately no
 * webfont: the render must produce byte-stable output on a machine with no
 * network, and a missing Google Font would silently reflow a signed document.
 */

@page {
  size: A4;
  margin: 20mm 18mm 22mm;
}

* { box-sizing: border-box; }

/* The same HTML is also served as a web page. @page margins only apply to
   print, so on screen the text ran edge to edge, and at full width on a laptop.
   Screen only: the PDF render is untouched. */
@media screen {
  body {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px 48px;
  }
}

html {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10.5pt;
  line-height: 1.55;
  color: #121722;
  background: #fff;
}

/* ── Masthead ─────────────────────────────────────────── */

.doc-head {
  border-bottom: 1.5px solid #121722;
  padding-bottom: 10px;
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: 19pt;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.doc-dates {
  margin: 6px 0 0;
  font-size: 8.5pt;
  color: #59626f;
  letter-spacing: 0.01em;
}

.lede {
  margin: 0 0 4px;
  font-size: 11pt;
  color: #2a3340;
}

/* ── Structure ────────────────────────────────────────── */

h2 {
  font-size: 12.5pt;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 26px 0 8px;
  /* A section heading stranded at the foot of a page reads as a missing
     clause, which is exactly the wrong impression for a legal document. */
  break-after: avoid;
  page-break-after: avoid;
}

h3 {
  font-size: 10.5pt;
  font-weight: 700;
  margin: 16px 0 6px;
  color: #2a3340;
  break-after: avoid;
  page-break-after: avoid;
}

p { margin: 0 0 10px; }

ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

li {
  margin-bottom: 6px;
  break-inside: avoid;
  page-break-inside: avoid;
}

li > strong { font-weight: 700; }

section {
  break-inside: auto;
}

/* ── Legal-basis table (privacy policy §2) ────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 9.5pt;
}

thead th {
  text-align: left;
  font-weight: 700;
  border-bottom: 1px solid #121722;
  padding: 6px 10px 6px 0;
}

tbody td {
  vertical-align: top;
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

tbody td:last-child {
  width: 33%;
  color: #2a3340;
  padding-right: 0;
}

tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* ── Footer rule ──────────────────────────────────────── */

.doc-foot {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.14);
  font-size: 8.5pt;
  color: #858e9c;
}
