/* ==========================================================================
   UFit — legal pages.
   Loaded after styles.css, which already supplies the tokens, the type scale,
   the nav and the footer. This file only adds what a long document needs: one
   readable measure, sectioned headings and tables that survive a phone.
   ========================================================================== */

.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- head --- */

.legal-head {
  padding-block: calc(var(--nav-h) + clamp(44px, 7vw, 92px)) clamp(26px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}

.legal-head h1 {
  font-size: clamp(30px, 4.4vw, 52px);
  margin: 14px 0 0;
  text-wrap: balance;
}

.legal-effective {
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- body --- */

.legal-body {
  padding-block: clamp(36px, 5vw, 60px) clamp(64px, 9vw, 120px);
  font-size: 15.5px;
  line-height: 1.75;
}

.legal-body p,
.legal-body li {
  margin: 0 0 16px;
}

.legal-body h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: clamp(40px, 5vw, 60px) 0 18px;
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.legal-body h3 {
  margin: 32px 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-body ul,
.legal-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-body a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  /* Long addresses and URLs sit inside paragraphs here; without this they push
     the column wider than the phone. */
  overflow-wrap: anywhere;
}

.legal-body a:hover {
  color: var(--muted);
}

.legal-body a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

/* -------------------------------------------------------- summary, toc --- */

/* Deletion page only: Google Play sends people straight here, so the steps and
   the scope sit above the document. */
.legal-summary {
  border: 1px solid var(--hairline);
  padding: clamp(22px, 3.4vw, 34px);
  margin-bottom: clamp(36px, 5vw, 56px);
}

.legal-summary-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.15;
  margin: 0 0 18px;
  border: 0;
  padding: 0;
}

.legal-summary-steps {
  margin: 0 0 20px;
  padding-left: 20px;
}

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

.legal-toc {
  margin-bottom: clamp(32px, 4vw, 48px);
  padding-bottom: clamp(24px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
}

.legal-toc h2 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--soft);
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
  font-size: 13.5px;
  line-height: 1.5;
}

.legal-toc li {
  margin: 0 0 8px;
  break-inside: avoid;
}

.legal-toc a {
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------- tables --- */

/* The drafts use tables for retention and offer terms. Scroll them rather than
   letting a two-column table set the page width on a 400px screen. */
.legal-table {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--line);
}

.legal-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
  line-height: 1.55;
}

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

.legal-table th {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 560px) {
  .legal-toc ol {
    columns: 1;
  }

  .legal-body {
    font-size: 15px;
  }
}
