/* Nuvaro marketing site — legal-document layout (legal-v1.3 wave, 2026-07-30).
 *
 * Loaded AFTER /site-assets/site.css on the six legal pages (terms / privacy / acknowledgement +
 * the DE mirror) — it consumes site.css's :root tokens and adds only the document apparatus:
 * a reading column, masthead, table of contents, numbered sections with stable ids (s-1…s-N),
 * labelled blocks, the framed confirmation section (deviation D-9), and print styling.
 *
 * HARD RULES (marketing-guard gate): no @import, no external origins, no url() outside /fonts/.
 * Class names are language-agnostic — the DE pages reuse them verbatim.
 */

/* ── Nav brand block (legal pages only) ─────────────────────────────────── */
/* The legal pages are opened from inside the coaching app (consent screens link out here), so the
   brand cell stacks a small underlined way back to the app under the logo, mirroring the app
   shell's own under-logo exit line. Same-origin /chat, plain same-tab anchor, no JS. */
.nav__brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.nav__back {
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.nav__back:hover { color: var(--ink); }

/* ── Reading column ─────────────────────────────────────────────────────── */
.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* ── Masthead: org line · document title · version/date line (D-4) ──────── */
.legal__masthead {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 36px;
}
.legal__org {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-eyebrow);
  font-weight: 600;
  margin-bottom: 14px;
}
.legal__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: var(--ink);
  text-wrap: balance;
}
.legal__meta {
  font-size: 14.5px;
  color: var(--ink-mute);
}
.legal__meta .legal__meta-sep { color: var(--gold-light); padding: 0 6px; }

/* Intro prose between masthead and TOC. */
.legal__intro { margin: 0 0 8px; }

/* ── Table of contents ──────────────────────────────────────────────────── */
.legal__toc {
  background: var(--paper);
  border: 1px solid var(--line-card);
  border-radius: 8px;
  padding: 22px 26px;
  margin: 32px 0 12px;
}
.legal__toc-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-eyebrow);
  font-weight: 600;
  margin: 0 0 12px;
}
.legal__toc ol {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.9;
}
.legal__toc a {
  color: var(--ink-soft);
  text-decoration: none;
}
.legal__toc a:hover { color: var(--gold); text-decoration: underline; }
/* Unnumbered trailing TOC line (the Acknowledgement's "Your confirmation" — not a numbered
   section, so it sits below the <ol> without a "10." marker). */
.legal__toc-plain {
  margin: 2px 0 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.9;
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.legal__section {
  margin-top: 44px;
  /* Anchor landings clear the sticky nav. */
  scroll-margin-top: 96px;
}
.legal__h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--ink);
  text-wrap: balance;
}
.legal__h2 .legal__num { color: var(--gold); padding-right: 10px; }
.legal__h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16.5px;
  margin: 26px 0 10px;
  color: var(--ink);
  scroll-margin-top: 96px;
}
.legal__h3 .legal__num { color: var(--gold-eyebrow); padding-right: 8px; font-weight: 600; }

/* Body text + lists inside the document. */
.legal__section p {
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-soft);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.legal__section ul {
  margin: 0 0 14px;
  padding-left: 24px;
}
.legal__section li {
  font-size: 16px;
  line-height: 1.66;
  color: var(--ink-soft);
  margin-bottom: 6px;
  text-wrap: pretty;
}

/* A bold standalone label with its own paragraphs under it ("Coach", "Right of access" — D-4). */
.legal__label {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  margin: 22px 0 6px;
}

/* Address / contact block (rendered as kept lines, not a paragraph). */
.legal__address {
  font-style: normal;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

/* In-document links (cross-references, mailto, the two allowed external authorities).
   Resting colour is --gold-eyebrow (#8A6A3C): --gold (#9B7B4D) on the --paper ground is ≈3.6:1,
   under the 4.5:1 AA floor for body-size text; the darker eyebrow tone clears it. --gold stays
   as the hover accent. */
.legal__section a {
  color: var(--gold-eyebrow);
  text-decoration: underline;
  text-decoration-color: var(--gold-light);
  text-underline-offset: 2px;
}
.legal__section a:hover { color: var(--gold); }

/* ── Framed confirmation section (Acknowledgement closing block — D-9) ──── */
.legal__confirm {
  border: 1px solid var(--gold-light);
  background: var(--paper);
  border-radius: 8px;
  padding: 26px 30px;
  margin-top: 44px;
  scroll-margin-top: 96px;
}
.legal__confirm .legal__h2 { margin-bottom: 12px; }

/* ── Trailing company line ("Nuvaro AG · UID … · nuvaro.ch") ────────────── */
.legal__footline {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-mute);
  text-align: center;
}

/* ── Print ──────────────────────────────────────────────────────────────── */
@media print {
  .nav,
  .footer,
  .legal__toc { display: none; }
  .site { background: #FFFFFF; }
  .legal { max-width: none; padding: 0; }
  .legal__section,
  .legal__confirm { break-inside: avoid-page; }
  .legal__section p,
  .legal__section li { color: #000000; }
  .legal__section a { color: #000000; text-decoration: none; }
}

@media (max-width: 560px) {
  .legal { padding: 40px 20px 72px; }
  .legal__title { font-size: 31px; }
  .legal__h2 { font-size: 22px; }
}
