/* Recallix unified document layout — privacy, terms, cookie-policy, trust, dpa, refund-policy.
   Type scale = site.css type roles (see :root "Type roles"). No hard-coded px for text. */

.page-slug-privacy .entry-content > .rx-legal-page,
.page-slug-terms .entry-content > .rx-legal-page,
.page-slug-cookie-policy .entry-content > .rx-legal-page,
.page-slug-trust .entry-content > .rx-legal-page,
.page-slug-dpa .entry-content > .rx-legal-page,
.page-slug-refund-policy .entry-content > .rx-legal-page,
.rx-legal-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: var(--rx-section-padding) 0 80px;
  background: transparent;
  font-family: var(--rx-font);
  color: var(--rx-foreground-body);
}

.rx-legal-page__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 var(--rx-gutter);
}

.rx-legal-page *,
.rx-legal-page *::before,
.rx-legal-page *::after {
  box-sizing: border-box;
}

/* ── Document header (page-title + lead, same as About / Contact) ── */
.rx-legal-page__header {
  margin: 0 0 56px;
  text-align: left;
}

/* Same look as .rx-eyebrow on marketing pages */
.rx-legal-page__eyebrow {
  margin: 0 0 12px;
  font-size: var(--rx-text-caption);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rx-foreground-muted);
}

.rx-legal-page__title {
  margin: 0 0 16px;
  font-family: var(--rx-font-heading);
  font-size: var(--rx-text-page-title);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--rx-foreground);
}

.rx-legal-page__meta {
  margin: 0 0 24px;
  font-size: var(--rx-text-small);
  line-height: 1.5;
  color: var(--rx-foreground-muted);
}

/* Lead paragraph: same role as .rx-about-hero-desc / .rx-contact-hero-desc */
.rx-legal-page__intro {
  margin: 0;
  max-width: none;
  font-size: var(--rx-text-body-lg);
  font-weight: 400;
  line-height: 1.6;
  color: var(--rx-foreground-muted);
}

/* ── Table of contents ── */
.rx-legal-page__toc {
  margin: 0 0 56px;
  padding: 24px 28px;
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-radius-lg);
  box-shadow: var(--rx-shadow-sm);
}

.rx-legal-page__toc-title {
  margin: 0 0 12px;
  font-size: var(--rx-text-small);
  font-weight: 600;
  line-height: 1.4;
  color: var(--rx-foreground);
}

.rx-legal-page__toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rx-legal-page__toc li {
  margin: 0 0 8px;
}

.rx-legal-page__toc li:last-child {
  margin-bottom: 0;
}

.rx-legal-page__toc a {
  font-size: var(--rx-text-small);
  line-height: 1.5;
  color: var(--rx-link);
  text-decoration: none;
  transition: text-decoration 200ms ease;
}

.rx-legal-page__toc a:hover,
.rx-legal-page__toc a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Sections: h2 = section scale (--rx-text-h3), h3 = card scale (--rx-text-h4) ── */
.rx-legal-page__section {
  margin-bottom: 56px;
}

.rx-legal-page__section:last-child {
  margin-bottom: 0;
}

.rx-legal-page__section-title,
.rx-legal-page__body h2 {
  margin: 0 0 20px;
  font-family: var(--rx-font-heading);
  font-size: var(--rx-text-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--rx-foreground);
}

.rx-legal-page__body h2 {
  margin-top: 56px;
}

.rx-legal-page__body h2:first-child {
  margin-top: 0;
}

.rx-legal-page__body h3,
.rx-legal-page__section h3 {
  margin: 28px 0 8px;
  font-family: var(--rx-font-heading);
  font-size: var(--rx-text-h4);
  font-weight: 600;
  line-height: 1.3;
  color: var(--rx-foreground);
}

/* Running text: same as .rx-about-prose p */
.rx-legal-page__body p,
.rx-legal-page__section p {
  margin: 0 0 16px;
  font-size: var(--rx-text-body);
  line-height: 1.7;
  color: var(--rx-foreground-body);
}

.rx-legal-page__body p:last-child,
.rx-legal-page__section p:last-child {
  margin-bottom: 0;
}

.rx-legal-page__body ul,
.rx-legal-page__body ol {
  margin: 0 0 16px;
  padding-left: 1.25rem;
  font-size: var(--rx-text-body);
  line-height: 1.7;
  color: var(--rx-foreground-body);
}

.rx-legal-page__body li {
  margin-bottom: 8px;
}

.rx-legal-page__body li:last-child {
  margin-bottom: 0;
}

.rx-legal-page__body strong {
  color: var(--rx-foreground);
  font-weight: 600;
}

.rx-legal-page__body a,
.rx-legal-page__section a,
.rx-legal-page__link {
  color: var(--rx-link);
  text-decoration: none;
  transition: text-decoration 200ms ease;
}

.rx-legal-page__body a:hover,
.rx-legal-page__body a:focus-visible,
.rx-legal-page__section a:hover,
.rx-legal-page__section a:focus-visible,
.rx-legal-page__link:hover,
.rx-legal-page__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rx-legal-page__footnote {
  margin-top: 32px;
  font-size: var(--rx-text-small);
  line-height: 1.6;
  color: var(--rx-foreground-muted);
}

/* Contact / social links */
.rx-legal-page__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 16px;
}

.rx-legal-page__links a {
  font-size: var(--rx-text-body);
  font-weight: 500;
  color: var(--rx-link);
  text-decoration: none;
}

.rx-legal-page__links a:hover,
.rx-legal-page__links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Tablet */
@media (max-width: 1024px) {
  .page-slug-privacy .entry-content > .rx-legal-page,
  .page-slug-terms .entry-content > .rx-legal-page,
  .page-slug-cookie-policy .entry-content > .rx-legal-page,
  .page-slug-trust .entry-content > .rx-legal-page,
  .page-slug-dpa .entry-content > .rx-legal-page,
  .page-slug-refund-policy .entry-content > .rx-legal-page,
  .rx-legal-page {
    padding: 96px 0 80px;
  }

  .rx-legal-page__header {
    margin-bottom: 48px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .page-slug-privacy .entry-content > .rx-legal-page,
  .page-slug-terms .entry-content > .rx-legal-page,
  .page-slug-cookie-policy .entry-content > .rx-legal-page,
  .page-slug-trust .entry-content > .rx-legal-page,
  .page-slug-dpa .entry-content > .rx-legal-page,
  .page-slug-refund-policy .entry-content > .rx-legal-page,
  .rx-legal-page {
    padding: 72px 0 64px;
  }

  .rx-legal-page__header {
    margin-bottom: 40px;
  }

  .rx-legal-page__toc {
    padding: 20px;
  }

  .rx-legal-page__links {
    flex-direction: column;
    gap: 12px;
  }
}

/* ── Shared tables (Privacy · Trust · DPA · Cookie) ─────────────── */
.rx-legal-page__table-wrap {
  margin: 0 0 24px;
  overflow-x: auto;
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-radius-lg);
  box-shadow: var(--rx-shadow-sm);
}

.rx-legal-page__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--rx-text-small);
  line-height: 1.6;
}

.rx-legal-page__table th {
  padding: 14px 20px;
  text-align: left;
  font-size: var(--rx-text-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rx-foreground-muted);
  background: var(--rx-bg-secondary);
  border-bottom: 1px solid var(--rx-border);
}

.rx-legal-page__table td {
  padding: 14px 20px;
  vertical-align: top;
  color: var(--rx-foreground-body);
  border-bottom: 1px solid var(--rx-divider);
}

.rx-legal-page__table tbody tr:last-child td {
  border-bottom: none;
}

.rx-legal-page__table td:first-child {
  font-weight: 500;
  color: var(--rx-foreground);
}

.rx-legal-page__table code {
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  color: var(--rx-foreground);
  background: var(--rx-bg-secondary);
  border-radius: var(--rx-radius-sm);
}

@media (max-width: 768px) {
  .rx-legal-page__table thead {
    display: none;
  }

  .rx-legal-page__table,
  .rx-legal-page__table tbody,
  .rx-legal-page__table tr,
  .rx-legal-page__table td {
    display: block;
    width: 100%;
  }

  .rx-legal-page__table tr {
    padding: 14px 18px;
    border-bottom: 1px solid var(--rx-border);
  }

  .rx-legal-page__table tr:last-child {
    border-bottom: none;
  }

  .rx-legal-page__table td {
    padding: 4px 0;
    border: none;
  }

  .rx-legal-page__table td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--rx-text-caption);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rx-foreground-muted);
  }
}

/* ── Trust Center: at-a-glance cards (card scale, same as feature cards) ── */
.rx-trust-glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 56px;
}

.rx-trust-glance__item {
  padding: 24px 22px;
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-top: 3px solid var(--rx-brand);
  border-radius: var(--rx-radius-lg);
  box-shadow: var(--rx-shadow-sm);
}

.rx-trust-glance__title {
  margin: 0 0 8px;
  font-family: var(--rx-font-heading);
  font-size: var(--rx-text-h4);
  font-weight: 600;
  line-height: 1.3;
  color: var(--rx-foreground);
}

.rx-trust-glance__item p {
  margin: 0;
  font-size: var(--rx-text-small);
  line-height: 1.6;
  color: var(--rx-foreground-body);
}

@media (max-width: 1024px) {
  .rx-trust-glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .rx-trust-glance {
    grid-template-columns: 1fr;
  }
}
