/* Long-form legal pages. Loaded after landing.css, which supplies the palette,
   the logo and the header/footer — this file only shapes the document itself.
   Section numbers come from a CSS counter so the headings and the contents
   list can never drift apart when a section is added or removed. */

.legal-wrap { max-width: 760px; }

a.logo { color: var(--fg); }

.header-back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.header-back:hover { color: var(--fg); }

/* ---------- document head ---------- */

.legal-head {
  padding-top: 52px;
  padding-bottom: 10px;
}
.legal-title {
  margin-top: 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}
.legal-updated {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.legal-lead {
  margin-top: 20px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.7;
  text-wrap: pretty;
}

/* ---------- callout ---------- */

.legal-note {
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid var(--line-green);
  border-left: 2px solid var(--green);
  border-radius: 10px;
  background: var(--panel-green);
}
.legal-note p + p { margin-top: 10px; }
.legal-note p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.legal-note strong { color: var(--fg); font-weight: 600; }

/* ---------- contents ---------- */

.legal-toc {
  counter-reset: toc;
  margin-top: 34px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-deep);
}
.legal-toc ol {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 7px 22px;
  list-style: none;
}
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
}
.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.85;
  color: var(--faint);
}
.legal-toc a:hover { color: var(--green-link); }

/* ---------- body ---------- */

.legal-body {
  counter-reset: section;
  padding-top: 8px;
  padding-bottom: 20px;
}
.legal-section {
  padding-top: 38px;
  /* The anchor links jump here, so leave room above the heading. */
  scroll-margin-top: 24px;
}
.legal-section + .legal-section { border-top: 1px solid var(--line); }

.legal-section h2 {
  counter-increment: section;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 25px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.legal-section h2::before {
  content: counter(section, decimal-leading-zero);
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--green);
}

.legal-section h3 {
  margin-top: 22px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--fg);
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}
.legal-section > p { margin-top: 14px; }
.legal-section strong { color: var(--fg); font-weight: 600; }

.legal-section ul {
  margin-top: 14px;
  padding-left: 18px;
  list-style: none;
}
.legal-section li { position: relative; margin-top: 9px; }
.legal-section li::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 0.68em;
  width: 5px;
  height: 1px;
  background: var(--faint);
}

/* ---------- labelled rows (data collected, legal bases, processors) ---------- */

.legal-rows { margin-top: 20px; display: grid; gap: 12px; }
.legal-row {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-deep);
}
.legal-row-head {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.legal-row p {
  margin-top: 7px;
  font-size: 14.5px;
  line-height: 1.65;
}
.legal-tag {
  display: inline-block;
  margin-top: 11px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.legal-contact {
  margin-top: 40px;
  padding-bottom: 8px;
}
.legal-contact a { font-weight: 500; }

/* ---------- print ---------- */

@media print {
  body { background: #fff; color: #111; }
  .site-header, .site-footer, .legal-toc { display: none; }
  .legal-note, .legal-row { background: none; border-color: #ccc; }
  .legal-section p, .legal-section li, .legal-lead, .legal-row p { color: #333; }
  .legal-section h2::before { color: #111; }
  .legal-section { page-break-inside: avoid; }
  a { color: #111; text-decoration: underline; }
}
