/* =========================================================
   MIRAGE — Legal document pages (terms / privacy)
   Shared layout for /terms and /privacy.
   Relies on tokens defined in style.css :root, and reuses the
   warm registration palette (.reg-body) for tone consistency.
   ========================================================= */

[hidden] { display: none !important; }

.legal-body {
  /* Same warm paper palette as the registration page. */
  --black: #3b3733;
  --off-white: #f6f4f1;
  --gray: #979289;
  --gray-light: #e6e1da;
  background: var(--off-white);
  color: var(--black);
  font-weight: 400;
}

/* ---- Header (shared look with the registration header) ---- */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 244, 242, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-light);
}
.legal-header .logo { color: var(--black); display: flex; align-items: baseline; gap: 8px; }
.legal-header .logo-name { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.04em; }
.legal-header .logo-sub { color: var(--gray); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.legal-exit {
  color: var(--black);
  font-size: 20px;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- Main container ---- */
.legal-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 20px 120px;
}

.legal-eyebrow {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}
.legal-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}
.legal-meta {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 24px;
}

/* PDF / version banner */
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  margin-bottom: 40px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  font-size: 13px;
}
.legal-actions .pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--black);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.legal-actions .pdf-link:hover { background: var(--black); color: var(--off-white); }
.legal-actions .pdf-note { color: var(--gray); }

/* ---- Intro / lead paragraph ---- */
.legal-lead {
  font-size: 14.5px;
  line-height: 2;
  margin-bottom: 40px;
}

/* ---- Article sections ---- */
.legal-article { margin-bottom: 34px; }
.legal-article h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-light);
}
.legal-article h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 18px 0 8px;
}
.legal-article p {
  font-size: 14px;
  line-height: 2;
  margin-bottom: 12px;
}
.legal-article ol,
.legal-article ul {
  margin: 0 0 12px 0;
  padding-left: 1.6em;
}
.legal-article ol { list-style: decimal; }
.legal-article ul { list-style: disc; }
.legal-article li {
  font-size: 14px;
  line-height: 2;
  margin-bottom: 6px;
  padding-left: 4px;
}
.legal-article li::marker { color: var(--gray); }
/* Items whose enumerator is part of the source text, e.g. "(1) …". */
.legal-article ul.legal-plainlist { list-style: none; padding-left: 0; }
.legal-article ul.legal-plainlist li { padding-left: 0; }

/* Unconfirmed / to-be-filled value: shown as an empty fill-in blank
   (never a fake placeholder string on the public page). */
.legal-blank {
  display: inline-block;
  min-width: 8em;
  border-bottom: 1px solid var(--gray);
  vertical-align: baseline;
}
.legal-imprint .legal-blank { min-width: 12em; }

/* Signature / imprint block at the end of a document */
.legal-imprint {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-light);
  font-size: 13.5px;
  line-height: 2;
  color: var(--black);
}
.legal-imprint .row { white-space: pre-wrap; }

/* Back-to-top / navigation footer */
.legal-backlink {
  margin-top: 48px;
  text-align: center;
}
.legal-backlink a {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--black);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.legal-backlink a:hover { background: var(--black); color: var(--off-white); }

/* ---- Footer ---- */
.legal-footer {
  padding: 28px 20px;
  border-top: 1px solid var(--gray-light);
  text-align: center;
}
.legal-footer p {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gray);
}

@media (min-width: 720px) {
  .legal-main { padding: 72px 40px 140px; }
}

/* Print / PDF: strip site chrome so the exported PDF is the document only.
   The text content is identical to the page — only navigation is hidden. */
@media print {
  .legal-header,
  .legal-exit,
  .legal-actions,
  .legal-backlink,
  .legal-footer { display: none !important; }
  .legal-body { background: #fff; }
  .legal-main { max-width: none; margin: 0; padding: 0 12mm; }
  .legal-article { break-inside: avoid; }
  .legal-article h2 { break-after: avoid; }
}
