/* ==========================================================================
   PAGES: PRIVACY POLICY / TERMS & CONDITIONS

   Deliberately the plainest layout on the site. A legal page is read to find
   one clause, so the two things that matter are a persistent contents list
   and generous measure — no cards, no illustrations, no reveal animations
   getting between the reader and the text.
   ========================================================================== */

.legal-head {
  padding-top: clamp(1.75rem, 1.2rem + 1.8vw, 2.34rem);
  padding-bottom: clamp(1.5rem, 1rem + 1.6vw, 1.95rem);
  background:
    radial-gradient(80% 120% at 0% 0%, var(--c-tint-indigo) 0%, rgba(244, 245, 255, 0) 68%),
    var(--c-white);
  border-bottom: 1px solid var(--c-border);
}

.legal__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color: var(--c-navy-900);
  margin: 0.85rem 0 0.6rem;
}

.legal__updated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--c-ink-400);
  margin: 0;
}

.legal__updated svg {
  width: 15px;
  height: 15px;
  color: var(--c-primary);
}

/* --------------------------------------------------------------------------
   CONTENTS
   Sticky from lg up; a plain list above that, where a sticky sidebar would
   just eat the top of every screen.
   -------------------------------------------------------------------------- */
.legal-toc {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--c-border-mid);
  border-radius: var(--r-md);
  background: var(--c-surface-alt);
}

.legal-toc__title {
  font-family: var(--font-body);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-primary);
  margin: 0 0 0.75rem;
}

.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
  display: grid;
  gap: 0.1rem;
}

.legal-toc a {
  display: block;
  padding: 0.32rem 0;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  line-height: 1.45;
  color: var(--c-ink-500);
  transition: color var(--t-fast), padding-left var(--t-fast);
}

.legal-toc a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero) "  ";
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-slate-400);
}

.legal-toc a:hover {
  color: var(--c-primary);
  padding-left: 0.2rem;
}

@media (min-width: 992px) {
  .legal-toc {
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
  }
}

/* --------------------------------------------------------------------------
   BODY
   -------------------------------------------------------------------------- */
.legal-body {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--c-ink-600);
  max-width: 46rem;
}

.legal-body h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  color: var(--c-navy-900);
  margin: clamp(2.25rem, 1.8rem + 1.4vw, 3rem) 0 0.85rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--c-border-mid);
  /* The sticky header would otherwise cover the heading you just jumped to. */
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.legal-body > h2:first-child,
.legal-note + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-body p {
  margin: 0 0 1.25rem;
}

.legal-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.6rem;
}

.legal-body ul li {
  position: relative;
  padding-left: 1.5rem;
}

.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--c-primary);
}

.legal-body b {
  font-weight: var(--fw-semibold);
  color: var(--c-ink-800);
}

.legal-body a {
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   DRAFT NOTICE
   Amber rather than brand blue: this is a warning to whoever launches the
   site, and it should not read as decoration.
   -------------------------------------------------------------------------- */
.legal-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0 0.9rem;
  align-items: start;
  padding: 1.1rem 1.25rem;
  margin-bottom: clamp(2rem, 1.5rem + 1.6vw, 3rem);
  border: 1px solid rgba(240, 181, 88, 0.5);
  border-left: 3px solid var(--c-star);
  border-radius: var(--r-md);
  background: rgba(240, 181, 88, 0.08);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: 1.65;
  color: var(--c-ink-800);
}

.legal-note__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--c-star);
  color: var(--c-white);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--fw-bold);
}

.legal-note p {
  margin: 0;
}

.legal-note strong {
  display: block;
  font-weight: var(--fw-semibold);
  color: var(--c-navy-900);
  margin-bottom: 0.2rem;
}
