/* Privacy & Terms (/legal, pages/legal.py): one plain reading column.
   Scoped on the scaffold's page class (docs/page_scaffold.md). Colours and fonts are the app tokens
   (assets/00_tokens.css), so the light look follows without rules of its own. */

.sp-page-shell.sp-page--legal {
  background: var(--sp-bg);
  color: var(--sp-text);
  min-height: calc(100vh - var(--sp-header-h));
}

.sp-legal {
  box-sizing: border-box;
  max-width: 720px;
  margin: 0 auto;
  /* The bottom space clears the phone's bottom bar. */
  padding: 24px 20px 130px;
  font: 400 16px/1.6 var(--sp-font-ui);
  overflow-wrap: anywhere;
}

/* While the cookie panel is open it covers the bottom of the screen (the visitor may have come here from its link),
   so leave room to scroll the last lines above it. The panel is an earlier sibling of the page container in the
   shell (layout.py). */
.sp-cookie-consent:not(.sp-cookie-consent--hidden) ~ #app-page-container .sp-legal {
  padding-bottom: 520px;
}

.sp-legal h1 {
  margin: 0 0 4px;
  font: 800 32px/1.1 var(--sp-font-display);
}

.sp-legal h2 {
  margin: 32px 0 8px;
  font: 700 20px/1.25 var(--sp-font-display);
}

.sp-legal h3 {
  margin: 16px 0 4px;
  font: 700 16px/1.4 var(--sp-font-ui);
}

.sp-legal p,
.sp-legal ul {
  margin: 0 0 12px;
}

.sp-legal ul {
  padding-left: 20px;
}

.sp-legal li {
  margin-bottom: 6px;
}

.sp-legal .sp-legal__updated {
  margin-bottom: 20px;
  color: var(--sp-text-2);
  font-size: 14px;
}

.sp-legal a {
  color: var(--sp-accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sp-legal code {
  padding: 1px 5px;
  border: 1px solid var(--sp-border-strong);
  border-radius: 6px;
  background: var(--sp-surface);
  color: var(--sp-text);
  font: 400 14px var(--sp-font-mono);
}

.sp-legal .sp-legal__button {
  min-height: 44px;
  margin: 0 0 12px;
  padding: 0 18px;
  border: 1px solid var(--sp-border-strong);
  border-radius: 10px;
  background: var(--sp-surface);
  color: var(--sp-text);
  font: 600 15px var(--sp-font-ui);
  cursor: pointer;
}

.sp-legal .sp-legal__button:hover {
  border-color: var(--sp-accent);
}

.sp-legal :is(a, button):focus-visible {
  outline: 2px solid var(--sp-accent);
  outline-offset: 2px;
}

/* The link to this page inside the cookie panel and under the sign-in button. */
.sp-cookie-consent__link,
.auth-legal-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sp-cookie-consent__more {
  margin: 0;
  color: var(--cookie-copy);
  font-size: 0.88rem;
}

.auth-legal-note {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.4;
}
