/* Legal pages: /privacy, /terms, /security.
 *
 * The design system's .section is built for marketing bands — 86px of padding
 * top and bottom, its own background, a rule between each one. Stacked twelve
 * deep for a privacy policy that reads as a page of headings floating in empty
 * space, with roughly 210px of nothing between each one once .legal h2's own
 * 42px margin is added on top.
 *
 * A legal document is one continuous document, not twelve marketing sections,
 * so this collapses the band treatment and rebuilds the rhythm from type.
 */

/* Paint the page explicitly.
 *
 * While gated the layout loads the gate's stylesheet, which sets a dark ground
 * and light type on :root and body. A legal page inheriting that renders dark
 * text on dark, or unstyled text on the gate's nebula background. These pages
 * are a white document regardless of which stylesheet happens to be loaded, so
 * the ground and the ink are both stated here rather than inherited.
 */
.legal-page {
  min-height: 100vh;
  background: #ffffff;
}

/* Not on .legal-page itself: that would cascade into the hero band and darken
   its lead paragraph too. */
.legal-page .legal {
  color: #14121f;
}

/* Dark ink applies to the DOCUMENT only, never the hero.
 *
 * The hero is a dark band that paints its own background and brings its own
 * light type. A blanket `.legal-page h1` rule turned its title into near-black
 * on near-black — the page title, invisible, at the top of the page. Scope every
 * colour below to .legal, which is the prose container and nothing else.
 */
.legal-page .legal h2,
.legal-page .legal h3,
.legal-page .legal h4,
.legal-page .legal strong {
  color: #14121f;
}

.legal-page .legal p,
.legal-page .legal li {
  color: #4a4658;
}

.legal-page .legal a {
  color: #2f2a6b;
}

.legal-page .section {
  padding: 0;
  background: transparent;
  border: 0;
}

.legal-page .section:last-of-type {
  padding-bottom: 72px;
}

/* Headings carry the structure now that the bands are gone. Smaller than the
   marketing scale — a subsection of a policy is not a page title. */
.legal-page .legal h2 {
  margin-top: 40px;
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.3;
}

.legal-page .section:first-of-type .legal h2 {
  margin-top: 34px;
}

.legal-page .legal p,
.legal-page .legal li {
  line-height: 1.65;
}

.legal-page .legal p + p {
  margin-top: 12px;
}

.legal-page .legal ul,
.legal-page .legal ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-page .legal li + li {
  margin-top: 6px;
}

/* ---------------------------------------------------------------------------
 * Minimal chrome for when these pages are reachable while the site is gated.
 *
 * The gate deliberately renders no site header, because the full navigation
 * offers links to pages the gate exists to withhold. But a page with no way
 * back to the site is a dead end, and the cookie banner sends people here.
 * So: the logo home, and nothing else.
 */

/* The bar sits on white, so it takes the on-light logo. The site header uses
   logo-on-dark because it sits on the deep indigo band; reusing that here put a
   white logo on a white page, which is to say no logo at all. */
.legal-topbar {
  padding: 16px 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(20, 18, 31, 0.1);
}

.legal-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-topbar img {
  display: block;
  width: auto;
  height: 34px;
}

.legal-topbar .legal-topbar-back {
  color: #2f2a6b;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-topbar .legal-topbar-back:hover,
.legal-topbar .legal-topbar-back:focus-visible {
  text-decoration: underline;
}

.legal-footer {
  padding: 28px 0 40px;
  background: #ffffff;
  border-top: 1px solid rgba(20, 18, 31, 0.12);
}

.legal-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  font-size: 0.9rem;
}

.legal-footer a {
  color: inherit;
  text-decoration: underline;
}

.legal-footer .legal-footer-home {
  font-weight: 700;
  text-decoration: none;
}

.legal-footer .legal-footer-home:hover,
.legal-footer .legal-footer-home:focus-visible {
  text-decoration: underline;
}
