.terms-doc {
  width: min(720px, 100%);
  margin: 8px auto 64px;
  padding: 8px 4px 0;
}

.terms-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.terms-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.terms-meta {
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: var(--muted);
}

.terms-doc section {
  margin-bottom: 28px;
}

.terms-doc h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.terms-doc p,
.terms-doc li {
  margin: 0 0 12px;
  color: var(--cream-dim);
  font-size: 0.98rem;
  line-height: 1.7;
}

.terms-doc ul {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.terms-doc li {
  margin-bottom: 6px;
}

.terms-doc a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terms-doc a:hover {
  color: var(--gold-bright);
}

/* The privacy page uses the same shell as the Terms page. It previously used
   .terms-wrapper/.terms-content/.terms-updated, which matched no rule here, so
   the whole policy rendered as unstyled body text. */
.terms-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 8px auto 64px;
  padding: 8px 4px 0;
}

.terms-content {
  width: min(720px, 100%);
}

.terms-content h1 {
  margin: 0 0 8px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.terms-updated {
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: var(--muted);
}

.terms-content section {
  margin-bottom: 28px;
}

.terms-content h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.terms-content h3 {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
}

.terms-content p,
.terms-content li {
  margin: 0 0 12px;
  color: var(--cream-dim);
  font-size: 0.98rem;
  line-height: 1.7;
}

.terms-content ul,
.terms-content dl {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.terms-content li {
  margin-bottom: 6px;
}

.terms-content dt {
  margin: 12px 0 4px;
  font-weight: 700;
  color: var(--cream);
}

.terms-content dd {
  margin: 0 0 12px;
  color: var(--cream-dim);
  font-size: 0.98rem;
  line-height: 1.7;
}

.terms-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terms-content a:hover {
  color: var(--gold-bright);
}

/* Callout used for the controller note and the "not legal advice" footer. */
.terms-content .legal-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  color: var(--cream-dim);
  font-size: 0.92rem;
  line-height: 1.65;
}

.terms-content strong {
  color: var(--cream);
}

@media (max-width: 640px) {
  .terms-doc,
  .terms-wrapper {
    margin-bottom: 40px;
  }
}
