/* ── Legal pages (Privacy & Terms) ─────────────────────── */
.legal-main {
  min-height: 100dvh;
  padding: clamp(4.5rem, 8vh, 6rem) 1.5rem clamp(4rem, 10vh, 7rem);
}

.legal-container {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.legal-header {
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 2rem;
}

.legal-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.legal-title {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.026em;
  line-height: 1.15;
  color: #fff;
  font-family: var(--title-font);
}

.legal-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

/* ── Body ──────────────────────────────────────────────── */
.legal-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-section {
  padding: 0;
  scroll-margin-top: 0;
}

.legal-section h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--title-font);
  letter-spacing: -0.01em;
}

.legal-section p,
.legal-section li {
  font-size: 0.96rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 0.6rem;
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.4rem;
  margin: 0.4rem 0 0.6rem;
}

.legal-section li {
  margin-bottom: 0.35rem;
}

.legal-section strong {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

.legal-section a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 138, 31, 0.35);
  transition: border-color 0.15s;
}
.legal-section a:hover {
  border-color: var(--accent-2);
}

/* ── Table of contents ─────────────────────────────────── */
.legal-toc {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem 1.75rem;
}

.legal-toc-label {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legal-toc-list li {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-toc-list li:last-child {
  border-bottom: none;
}

.legal-toc-list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s;
}

.legal-toc-list a::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 138, 31, 0.45);
  flex-shrink: 0;
  transition: background 0.15s;
}

.legal-toc-list a:hover {
  color: rgba(255, 255, 255, 0.9);
  border-bottom: none;
}

.legal-toc-list a:hover::before {
  background: var(--accent);
}

/* Warning box */
.legal-warning {
  background: rgba(255, 138, 31, 0.07);
  border: 1px solid rgba(255, 138, 31, 0.22);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
}

.legal-warning p {
  margin: 0;
  color: rgba(255, 200, 100, 0.9) !important;
  font-weight: 400 !important;
}

/* Danger / enforcement block */
.legal-danger {
  background: rgba(220, 38, 38, 0.08);
  border: 1.5px solid rgba(220, 38, 38, 0.45);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legal-danger-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 100, 100, 1);
  font-family: var(--title-font);
  letter-spacing: -0.01em;
}

.legal-danger-title svg {
  flex-shrink: 0;
}

.legal-danger p,
.legal-danger li {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255, 180, 180, 0.92) !important;
  line-height: 1.7;
}

.legal-danger ul {
  padding-left: 1.4rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-danger strong {
  color: rgba(255, 120, 120, 1) !important;
  font-weight: 600;
}

.legal-danger .legal-danger-footer {
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(220, 38, 38, 0.25);
  font-size: 0.88rem !important;
  color: rgba(255, 140, 140, 0.7) !important;
  font-style: italic;
}

/* Nested red callout: canary leak consequences (terms §6) */
.legal-leak-consequences {
  margin-top: 1.25rem;
}

.legal-leak-consequences-heading {
  margin: 0 0 0.35rem !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  font-family: var(--title-font);
  letter-spacing: -0.01em;
  color: rgba(255, 90, 90, 1) !important;
  line-height: 1.35 !important;
}

.legal-text-underline {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

/* ── Footer link ───────────────────────────────────────── */
.legal-footer-note {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.86rem;
  color: var(--muted);
  text-align: center;
}

.legal-footer-note a {
  color: var(--accent-2);
  text-decoration: none;
}
.legal-footer-note a:hover {
  text-decoration: underline;
}

/* ── Mobile: less air around title (fixed topbar + large clamps felt excessive) ── */
@media (max-width: 900px) {
  .legal-main {
    padding-top: calc(var(--mobile-topbar-offset, 60px) + 0.5rem);
    padding-bottom: clamp(2rem, 6vh, 3rem);
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .legal-header {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
  }

  .legal-eyebrow {
    margin: 0 0 0.45rem;
  }

  .legal-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.65rem, 7vw, 2.35rem);
  }

  .legal-body {
    gap: 1.5rem;
  }

  .legal-footer-note {
    margin-top: 2rem;
    padding-top: 1.35rem;
  }
}
