/* Terms, privacy and FAQ. Loaded on top of the public layout and on its own by
   _LegalLayout (mobile WebView), so it carries its own colours instead of portal tokens. */

.ht-legal {
  --lg-ink: #1d1b2e;
  --lg-muted: #5b5870;
  --lg-line: #e6e3f0;
  --lg-accent: #6d5ae0;
  --lg-soft: #f3f0ff;

  max-width: 820px;
  margin: 0 auto;
  padding: 120px 28px 96px;
  color: var(--lg-ink);
  font-size: 16px;
  line-height: 1.65;
}

.ht-legal h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.ht-legal h2 {
  margin: 40px 0 12px;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 650;
}

.ht-legal p,
.ht-legal ul { margin: 0 0 14px; color: var(--lg-muted); }
.ht-legal ul { padding-left: 22px; }
.ht-legal li { margin-bottom: 8px; }
.ht-legal strong { color: var(--lg-ink); font-weight: 600; }
.ht-legal a { color: var(--lg-accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }

.ht-legal .legal-updated {
  display: inline-block;
  margin-bottom: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--lg-soft);
  color: var(--lg-accent);
  font-size: 13px;
  font-weight: 600;
}

.ht-legal .faq-item { border-top: 1px solid var(--lg-line); }
.ht-legal h2 + .faq-item { margin-top: 4px; }
.ht-legal .faq-item:last-of-type { border-bottom: 1px solid var(--lg-line); }

.ht-legal .faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  color: var(--lg-ink);
}
.ht-legal .faq-item summary::-webkit-details-marker { display: none; }
.ht-legal .faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lg-soft);
  color: var(--lg-accent);
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  transition: transform .2s;
}
.ht-legal .faq-item[open] summary::after { transform: rotate(45deg); }
.ht-legal .faq-answer { padding: 0 44px 12px 0; }

/* Mobile WebView: no site header above the document, so drop the hero spacing. */
.ht-legal-app {
  margin: 0;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.ht-legal-app .ht-legal {
  padding: 20px 18px calc(32px + env(safe-area-inset-bottom));
  font-size: 15px;
}
.ht-legal-app .ht-legal h1 { font-size: 26px; }
.ht-legal-app .ht-legal h2 { margin-top: 28px; font-size: 18px; }
.ht-legal-app .ht-legal .faq-answer { padding-right: 0; }

@media (max-width: 640px) {
  .ht-legal { padding: 96px 18px 64px; }
  .ht-legal .faq-answer { padding-right: 0; }
}
