/* ============================================================================
   WELL RUN · SIGNAL SYSTEM — LEGAL PAGES
   Page styles for /en/privacy/, /en/cookies/, /en/legal/, /en/terms/
   (namespace: .lp-).  Built on Signal Core tokens in global.css.
   A light, high-legibility reading document: off-white surface, Signal Black
   type, brand accents kept to hairlines + links so long policy text stays calm.
   ============================================================================ */

.lp-page {
  background: #F2F2F2;
  color: var(--wr-black);
}

/* The site-wide grain (`.wr-noise-overlay`, z-9999) stays at its default subtle
   strength over the chrome. The stronger PAPER texture is scoped to the reading
   surface only (main), so it never sits over the nav or footer. */
.lp-page main.lp {
  position: relative;
  z-index: 2;                 /* lifts over the revealed footer (Reveal Lift) */
  background: #F2F2F2;        /* opaque — covers the fixed footer until scrolled */
  isolation: isolate;         /* contains the paper layer's negative z-index */
}
.lp-page main.lp::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Reading rhythm tokens (local to legal docs) */
.lp {
  --lp-ink:      #0D0A07;
  --lp-ink-72:   #0D0A07B8;
  --lp-ink-55:   #0D0A078C;
  --lp-line:     #0D0A0714;
  --lp-line-2:   #0D0A071F;
  --lp-paper:    #FBFAF8;
  --lp-accent:   #F04923;
  --lp-read:     720px;
  display: block;
}

/* ── Header band ─────────────────────────────────────────────────────────── */
.lp-head {
  padding: calc(var(--wr-nav-height) + clamp(48px, 7vw, 96px)) var(--wr-pad-x) clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--lp-line);
  position: relative;
}
.lp-head::after {
  content: "";
  position: absolute; left: var(--wr-pad-x); right: var(--wr-pad-x); bottom: -1px;
  height: 2px; max-width: 96px;
  background: var(--wr-grad);
  border-radius: 2px;
}
.lp-head__inner { max-width: 1080px; margin: 0 auto; }

.lp-crumb {
  display: flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--wr-font);
  color: var(--lp-ink-55);
  margin-bottom: 22px;
}
.lp-crumb a { color: var(--lp-ink-55); text-decoration: none; }
.lp-crumb a:hover { color: var(--lp-accent); }
.lp-crumb b { color: var(--lp-ink); font-weight: 700; }
.lp-crumb span { opacity: .5; }

.lp-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, 'Liberation Mono', monospace;
  font-size: 12px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(13, 10, 7, 0.6);
  margin: 0 0 14px;
}
.lp-kicker::before {
  content: ''; display: inline-block; width: 22px; height: 2px;
  border-radius: 2px; background: var(--wr-grad); flex-shrink: 0;
  animation: wrEyebrowPulse 6s ease-in-out infinite;
}
.lp-title {
  font: 800 clamp(34px, 5.4vw, 56px)/1.04 var(--wr-font);
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  max-width: 18ch;
}
.lp-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font: 600 13px/1.3 var(--wr-font);
  color: var(--lp-ink-55);
  margin: 0 0 22px;
}
.lp-meta .lp-meta__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--lp-ink-55); opacity: .5; }
.lp-lede {
  font: 400 clamp(16px, 1.6vw, 19px)/1.6 var(--wr-font);
  color: var(--lp-ink-72);
  max-width: 60ch;
  margin: 0;
  text-wrap: pretty;
}

/* ── Body: sticky TOC + reading column ─────────────────────────────────────-*/
.lp-body {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) var(--wr-pad-x) clamp(60px, 9vw, 110px);
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.lp-toc {
  position: sticky;
  top: calc(var(--wr-nav-height) + 20px);
  font: 400 13.5px/1.5 var(--wr-font);
}
.lp-toc__label {
  font: 700 11px/1 var(--wr-font);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--lp-ink-55);
  margin: 0 0 14px;
}
.lp-toc__list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lp-toc__list a {
  display: block;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--lp-ink-72);
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.lp-toc__list a:hover { background: #0D0A0708; color: var(--lp-ink); }
.lp-toc__list a.is-active {
  color: var(--lp-ink);
  font-weight: 700;
  background: #0D0A070F;
}

.lp-toc__aux {
  border-top: 1px solid var(--lp-line);
  padding-top: 16px;
  display: flex; flex-direction: column; gap: 9px;
}
.lp-toc__aux a, .lp-toc__cookiebtn {
  font: 600 13px/1.3 var(--wr-font);
  color: var(--lp-ink-72);
  text-decoration: none;
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.lp-toc__aux a:hover, .lp-toc__cookiebtn:hover { color: var(--lp-accent); }
.lp-toc__aux svg { width: 14px; height: 14px; flex: 0 0 auto; opacity: .6; }

/* ── Reading column ────────────────────────────────────────────────────────-*/
.lp-doc { max-width: var(--lp-read); min-width: 0; }
.lp-sec { padding-top: 8px; margin-bottom: clamp(34px, 4vw, 48px); scroll-margin-top: calc(var(--wr-nav-height) + 24px); }
.lp-sec:last-child { margin-bottom: 0; }

.lp-h2 {
  font: 800 clamp(22px, 2.6vw, 28px)/1.2 var(--wr-font);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.lp-h3 {
  font: 700 16px/1.35 var(--wr-font);
  margin: 26px 0 8px;
}
.lp-doc p {
  font: 400 16px/1.72 var(--wr-font);
  color: var(--lp-ink-72);
  margin: 0 0 16px;
  text-wrap: pretty;
}
.lp-doc p strong, .lp-doc li strong { color: var(--lp-ink); font-weight: 700; }
.lp-doc a:not(.lp-card a):not(.lp-btn) {
  color: var(--lp-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  font-weight: 600;
}
.lp-doc a:hover { text-decoration-thickness: 2px; }

.lp-doc ul, .lp-doc ol { margin: 0 0 18px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lp-doc li {
  font: 400 16px/1.65 var(--wr-font);
  color: var(--lp-ink-72);
  padding-left: 26px;
  position: relative;
}
.lp-doc li::before {
  content: "";
  position: absolute; left: 4px; top: 11px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--wr-grad);
}
.lp-doc ol { counter-reset: lp-ol; }
.lp-doc ol > li { counter-increment: lp-ol; }
.lp-doc ol > li::before {
  content: counter(lp-ol);
  top: 2px; left: 0; width: 18px; height: 18px; border-radius: 5px;
  background: none; color: var(--lp-accent);
  font: 700 12px/18px var(--wr-font); text-align: center;
}

/* ── Callout / TL;DR summary ───────────────────────────────────────────────-*/
.lp-callout {
  background: var(--lp-paper);
  border: 1px solid var(--lp-line-2);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 0 0 30px;
  position: relative;
}
.lp-callout__label {
  font: 700 11px/1 var(--wr-font);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--lp-accent); margin: 0 0 10px;
}
.lp-callout p { margin: 0 0 8px; font-size: 15px; }
.lp-callout p:last-child { margin-bottom: 0; }

/* ── Data / contact cards ──────────────────────────────────────────────────-*/
.lp-card {
  background: var(--lp-paper);
  border: 1px solid var(--lp-line-2);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 4px 0 22px;
}
.lp-card__title { font: 700 13px/1 var(--wr-font); letter-spacing: .04em; text-transform: uppercase; color: var(--lp-ink-55); margin: 0 0 14px; }

/* Definition list (used by the imprint + controller block) */
.lp-dl { display: grid; grid-template-columns: 200px 1fr; gap: 12px 20px; margin: 0; }
.lp-dl dt { font: 600 14px/1.5 var(--wr-font); color: var(--lp-ink-55); margin: 0; }
.lp-dl dd { font: 400 15px/1.55 var(--wr-font); color: var(--lp-ink); margin: 0; }
.lp-dl dd strong { font-weight: 700; }
.lp-dl a { color: var(--lp-accent); text-decoration: none; font-weight: 600; }
.lp-dl a:hover { text-decoration: underline; }

/* ── Tables (cookies, processors, retention) ───────────────────────────────-*/
.lp-table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--lp-line-2); border-radius: 14px; }
.lp-table { width: 100%; border-collapse: collapse; min-width: 540px; font: 400 14px/1.5 var(--wr-font); }
.lp-table caption { text-align: left; font: 700 14px var(--wr-font); padding: 14px 16px 0; color: var(--lp-ink); }
.lp-table th, .lp-table td { text-align: left; padding: 13px 16px; vertical-align: top; border-bottom: 1px solid var(--lp-line); }
.lp-table thead th {
  font: 700 11.5px/1.2 var(--wr-font); letter-spacing: .07em; text-transform: uppercase;
  color: var(--lp-ink-55); background: #0D0A0706;
}
.lp-table tbody tr:last-child td { border-bottom: 0; }
.lp-table td strong { color: var(--lp-ink); font-weight: 700; }
.lp-table code, .lp-doc code {
  font: 600 12.5px/1 var(--drop-mono);
  background: #0D0A0710; color: var(--lp-ink);
  padding: 3px 6px; border-radius: 5px;
}

/* ── Rights grid ───────────────────────────────────────────────────────────-*/
.lp-rights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 4px 0 22px; }
.lp-right {
  border: 1px solid var(--lp-line-2); border-radius: 13px; padding: 16px 18px; background: var(--lp-paper);
}
.lp-right h4 { font: 700 14.5px/1.3 var(--wr-font); margin: 0 0 6px; color: var(--lp-ink); }
.lp-right p { font-size: 13.5px; line-height: 1.55; margin: 0; }

/* ── Inline buttons (cookie settings trigger etc.) ─────────────────────────-*/
.lp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 14px/1 var(--wr-font);
  border-radius: var(--wr-radius-pill);
  padding: 13px 22px;
  cursor: pointer; border: 0;
  background: var(--wr-grad); color: var(--wr-black);
  text-decoration: none;
  transition: transform .2s var(--wr-ease-out), box-shadow .2s ease;
}
.lp-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -10px rgba(240,73,35,.5); }
.lp-btn svg { width: 16px; height: 16px; }
.lp-btn--ghost { background: transparent; color: var(--lp-ink); border: 1px solid var(--lp-line-2); }
.lp-btn--ghost:hover { border-color: var(--lp-ink); box-shadow: none; }

/* ── Small print / footnote ────────────────────────────────────────────────-*/
.lp-note {
  font: 400 13px/1.6 var(--wr-font);
  color: var(--lp-ink-55);
  border-top: 1px solid var(--lp-line);
  padding-top: 18px;
  margin-top: 8px;
}

/* ── Cross-doc footer nav (above the site footer) ──────────────────────────-*/
.lp-related {
  border-top: 1px solid var(--lp-line);
  background: #0D0A0704;
}
.lp-related__inner {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(34px, 5vw, 56px) var(--wr-pad-x);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}
.lp-related__h { font: 800 20px/1.2 var(--wr-font); letter-spacing: -0.02em; margin: 0; }
.lp-related__links { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-chip {
  font: 600 13.5px/1 var(--wr-font);
  padding: 10px 16px; border-radius: var(--wr-radius-pill);
  border: 1px solid var(--lp-line-2); color: var(--lp-ink-72);
  text-decoration: none; background: #fff;
  transition: border-color .18s ease, color .18s ease;
}
.lp-chip:hover { border-color: var(--lp-accent); color: var(--lp-accent); }
.lp-chip.is-current { background: var(--lp-ink); color: #F2F2F2; border-color: var(--lp-ink); }

/* ── Responsive ───────────────────────────────────────────────────────────-*/
@media (max-width: 880px) {
  .lp-body { grid-template-columns: 1fr; gap: 8px; }
  .lp-toc {
    position: static; top: auto;
    border: 1px solid var(--lp-line-2); border-radius: 14px;
    padding: 16px 18px; margin-bottom: 8px;
    background: var(--lp-paper);
  }
  .lp-toc__list { gap: 0; }
  .lp-rights { grid-template-columns: 1fr; }
  .lp-dl { grid-template-columns: 1fr; gap: 4px 0; }
  .lp-dl dt { margin-top: 12px; }
  .lp-dl dt:first-child { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-btn:hover { transform: none; }
}

/* ── Reveal Lift: the page lifts up to uncover the fixed footer beneath ─────-*/
.lp-foot-reveal #site-footer-mount { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1; width: 100%; }
.lp-foot-reveal { padding-bottom: 55vh; }   /* default room; the inline script sets the exact footer height at runtime */
@media (prefers-reduced-motion: reduce) {
  .lp-foot-reveal #site-footer-mount { position: static; }
  .lp-foot-reveal { padding-bottom: 0; }
}
