/* Long-form legal documents: /privacy/ and /terms/
 *
 * Loaded on top of style.css + landing.css, so the hero, breadcrumbs and
 * container come from there. What is missing on the rest of the site is a
 * readable column for continuous prose — every other page is short blocks and
 * cards, which is why these rules exist instead of reusing .section.
 */

.legal-updated {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-updated time {
  color: var(--text-secondary);
}

.legal-body {
  padding: 40px 0 72px;
}

/* 68ch keeps lines at roughly 10-14 words. Wider than that and the eye loses
 * its place on the return sweep, which matters more here than anywhere else on
 * the site: this is the only page anyone reads top to bottom. */
.legal-layout {
  max-width: 68ch;
  margin: 0 auto;
}

.legal-toc {
  margin: 0 0 44px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.legal-toc h2 {
  margin: 0 0 14px;
  font-family: var(--font-brand);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

.legal-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--accent-light);
}

.legal-section {
  margin-bottom: 44px;
  /* Anchors from the table of contents would otherwise land with the heading
   * flush against the fixed navbar. */
  scroll-margin-top: 108px;
}

.legal-section > h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.3;
  color: var(--text-primary);
}

.legal-section h3 {
  margin: 26px 0 10px;
  font-family: var(--font-brand);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--accent-light);
}

.legal-section p,
.legal-section li {
  color: var(--text-secondary);
  line-height: 1.75;
}

.legal-section p {
  margin: 0 0 14px;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 18px;
  padding-left: 1.35em;
  display: grid;
  gap: 10px;
}

.legal-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-section a:hover,
.legal-section a:focus-visible {
  color: var(--accent-light);
}

.legal-section code {
  padding: 2px 6px;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
}

/* Pulled-out statement for the things a visitor actually wants to know without
 * reading the section: what we don't do with their data, what isn't covered. */
.legal-callout {
  margin: 0 0 20px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(196, 163, 90, 0.08), transparent);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
}

.legal-callout p:last-child {
  margin-bottom: 0;
}

/* Data-collection table: what is stored, and why. */
.legal-table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.legal-table th {
  font-family: var(--font-brand);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.legal-table td {
  color: var(--text-secondary);
}

.legal-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 640px) {
  /* Two narrow columns of wrapped text are unreadable on a phone, so each row
   * becomes a stacked pair with the header text supplied by data-label. */
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table thead {
    display: none;
  }

  .legal-table tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .legal-table td {
    padding: 0 0 8px;
    border: 0;
  }

  .legal-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-brand);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
  }
}

.legal-contact {
  margin-top: 52px;
  padding: 26px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.legal-contact h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-primary);
}

.legal-contact > p {
  margin: 0 0 18px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.legal-contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
}

.legal-contact-label {
  min-width: 78px;
  font-family: var(--font-brand);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.legal-contact-list a {
  color: var(--accent);
  text-decoration: none;
}

.legal-contact-list a:hover,
.legal-contact-list a:focus-visible {
  color: var(--accent-light);
  text-decoration: underline;
}
