/* ── Legal pages ───────────────────────────────────────────────
   Shared shell for the policy pages. The policy text itself is
   injected by Termageddon at runtime, so almost everything below
   styles markup we do not author: the rules are scoped to
   .legal__body and written against plain tags, because that is
   what the embed produces.

   If Termageddon ships its own stylesheet and wins a conflict,
   raise specificity here rather than reaching for !important —
   the embed's own layout should stay intact.
──────────────────────────────────────────────────────────────── */
.legal {
  background: var(--color-bg);
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--gutter) var(--space-3xl);
}

.legal__inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
}

.legal__eyebrow {
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.legal__headline {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.legal__standfirst {
  font-size: var(--text-lg);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(26,10,20,0.1);
}

/* ── Embedded policy content ─────────────────────────────────── */
.legal__body {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text-primary);
}

.legal__body h1,
.legal__body h2,
.legal__body h3,
.legal__body h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin: var(--space-xl) 0 var(--space-md);
}
.legal__body h1 { font-size: var(--text-3xl); }
.legal__body h2 { font-size: var(--text-2xl); }
.legal__body h3 { font-size: var(--text-xl); }
.legal__body h4 { font-size: var(--text-lg); }

/* The embed usually opens with its own <h1>, which would repeat the
   page heading directly above it. */
.legal__body > h1:first-child { margin-top: 0; }

.legal__body p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

.legal__body strong { color: var(--color-text-primary); font-weight: 500; }

.legal__body ul,
.legal__body ol {
  margin: 0 0 var(--space-md) var(--space-lg);
  color: var(--color-text-secondary);
}
.legal__body ul { list-style: disc; }
.legal__body ol { list-style: decimal; }
.legal__body li { margin-bottom: var(--space-sm); padding-left: 4px; }

.legal__body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal__body a:hover { color: var(--color-accent-deep); }

/* Policy documents often carry definition or comparison tables.
   Wrapped so a wide table scrolls rather than breaking the page. */
.legal__body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
}
.legal__body th,
.legal__body td {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid rgba(26,10,20,0.12);
  vertical-align: top;
}
.legal__body th {
  background: var(--color-surface);
  font-weight: 500;
  color: var(--color-text-primary);
}

.legal__body-scroll { overflow-x: auto; }

/* Shown until the embed replaces it. Deliberately obvious, so an
   un-embedded page can't be mistaken for a finished one.

   It also hides itself the moment anything else appears inside
   .legal__body — so pasting the embed alongside it is enough, and
   forgetting to delete the placeholder can't leave "not embedded
   yet" sitting on a live page. */
.legal__body > .legal__placeholder:not(:only-child) {
  display: none;
}

.legal__placeholder {
  border: 1px dashed var(--color-monika);
  border-radius: var(--border-radius-md);
  background: var(--color-surface);
  padding: var(--space-xl);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.legal__placeholder strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}
.legal__placeholder code {
  font-family: var(--font-display);
  background: var(--color-bg);
  border: 1px solid var(--color-monika-light);
  border-radius: var(--border-radius-sm);
  padding: 1px 6px;
}

@media (max-width: 768px) {
  .legal { padding-top: calc(var(--nav-height) + var(--space-xl)); }
}
