/**
 * legal.css: the legal footer on every public page (who runs Privim, and the links to the Terms, Privacy and Cookies
 * pages) and the legal pages themselves (legal.html at /privacy, /cookies, /terms).
 * Colours, fonts and sizes come from tokens.css.
 */

/* ------------------------------------------------------------------ The footer (index, present, report, login, account) */

.legal-foot {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ink-muted);
}
/* One line that wraps between its parts, a "·" after each but the last (so a wrapped line never starts with one). */
.legal-foot__line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.35em;
  margin: 0;
}
.legal-foot__line > :not(:last-child)::after { content: "·"; display: inline-block; margin-left: 0.35em; text-decoration: none; }
.legal-foot a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.legal-foot a:hover { color: var(--ink); text-decoration-color: currentColor; background-color: var(--hover); box-shadow: 0 0 0 0.25em var(--hover); }

/* In the side panel of the presentation and the client's page: at the very end, away from the content. */
.legal-foot--sheet { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line); }
/* Under the sign-in card. */
.legal-foot--login { max-width: 26rem; margin: var(--space-4) auto 0; padding: 0 var(--space-4); }
.legal-foot--login .legal-foot__line { justify-content: center; text-align: center; }
/* On the public site, under its own footer line. */
.site-foot .legal-foot { flex-basis: 100%; }

/* At the end of the market study (and its PDF). */
.report-legal { margin-top: var(--space-6); padding-top: var(--space-3); border-top: 1px solid var(--line); }

/* "By signing in you agree to our Terms and Privacy Policy" and "You accepted our Terms ..." */
.agree a, .accepted a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.agree a:hover, .accepted a:hover { text-decoration-color: currentColor; background-color: var(--hover); box-shadow: 0 0 0 0.25em var(--hover); }

/* ------------------------------------------------------------------ The legal pages */

.legal {
  max-width: calc(46rem + 2 * var(--site-gutter));
  margin: 0 auto;
  padding: var(--space-6) var(--site-gutter) 0;
}
.legal__nav { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.legal__nav a {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  text-decoration: none;
}
.legal__nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.legal__title { font-family: var(--font-display); font-size: var(--site-text-h2); line-height: 1.1; letter-spacing: -0.01em; }
.legal__updated { margin-top: var(--space-2) !important; font-size: var(--text-sm); color: var(--ink-muted); }

/* The document (filled by src/legal.js from src/strings.js). */
.legal__body { margin-top: var(--space-6); }
.legal__body h2 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.3;
}
.legal__body p, .legal__body ul { margin-bottom: var(--space-3); }
.legal__body ul { padding-left: 1.2em; list-style: disc; }
.legal__body li + li { margin-top: var(--space-1); }
.legal__body a { overflow-wrap: anywhere; }

/* A table scrolls sideways on a phone instead of making the page wider. */
.legal__table { margin: var(--space-3) 0 var(--space-4); overflow-x: auto; }
.legal__table table { min-width: 36rem; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.45; }
.legal__table th, .legal__table td { padding: var(--space-2) var(--space-3) var(--space-2) 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal__table th { font-weight: 650; }

.legal-page .site-foot { margin-top: var(--space-6); }
