/* ════════════════════════════════════════════════════════════
   Stride — Long-form legal pages (Privacy + Terms)
   Comfortable reading typography, sticky TOC on desktop,
   accessible anchor navigation.
   ════════════════════════════════════════════════════════════ */

.legal-page {
  background: var(--warm-white);
  color: var(--ink);
  font-family: var(--font-body);
}

/* ───── Hero ───── */
.legal-hero {
  padding: 140px 0 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 90% 10%, rgba(224, 122, 95, 0.08), transparent 50%),
    var(--warm-white);
}
@media (max-width: 760px) { .legal-hero { padding: 120px 0 36px; } }

.legal-eyebrow {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: 18px;
}
.legal-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -1.6px;
  line-height: 1.02;
  color: var(--ink);
  max-width: 18ch;
}
.legal-lede {
  margin-top: 22px;
  max-width: 56ch;
  font-size: var(--t-body-lg);
  line-height: 1.6;
  color: var(--slate);
}
.legal-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.legal-meta-item .lbl {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--slate-light);
}
.legal-meta-item .val {
  margin-top: 4px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

/* ───── Pre-launch note ───── */
.legal-prelaunch {
  margin-top: 32px;
  padding: 20px 22px;
  background: var(--coral-bg);
  border-left: 3px solid var(--coral);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  max-width: 64ch;
}
.legal-prelaunch strong {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--coral-dark);
}
.legal-prelaunch p {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  margin-top: 4px;
}

/* ───── Body grid ───── */
.legal-body {
  padding: 64px 0 96px;
}
@media (max-width: 760px) { .legal-body { padding: 36px 0 56px; } }
.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
@media (max-width: 980px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ───── Table of contents ───── */
.legal-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  padding-bottom: 32px;
}
@media (max-width: 980px) {
  .legal-toc {
    position: static;
    padding: 18px 22px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
  }
}
.legal-toc-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: 14px;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc;
}
.legal-toc li {
  counter-increment: toc;
  padding: 4px 0;
}
.legal-toc li a {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--slate);
  padding: 4px 0 4px 28px;
  position: relative;
  transition: color 0.2s var(--ease-out);
}
.legal-toc li a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 4px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  color: var(--slate-light);
  letter-spacing: 0.4px;
}
.legal-toc li a:hover { color: var(--coral-dark); }
.legal-toc li a:hover::before { color: var(--coral-dark); }
.legal-toc li a.is-current {
  color: var(--ink);
  font-weight: 600;
}
.legal-toc li a.is-current::before { color: var(--coral); }

/* ───── Main content prose ───── */
.legal-content {
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}
.legal-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: var(--ink);
  margin: 56px 0 16px;
  scroll-margin-top: 100px;     /* nav offset for anchor jumps */
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h2 .h-num {
  display: inline-block;
  margin-right: 14px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--coral-dark);
  vertical-align: middle;
  text-transform: uppercase;
}
.legal-content h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.3;
  color: var(--ink);
  margin: 28px 0 10px;
}
.legal-content p {
  margin: 0 0 18px;
  color: var(--ink);
}
.legal-content p strong {
  font-weight: 600;
  color: var(--ink);
}
.legal-content a {
  color: var(--coral-dark);
  border-bottom: 1px solid var(--coral);
  padding-bottom: 1px;
  transition: color 0.2s, background 0.2s;
}
.legal-content a:hover {
  color: var(--white);
  background: var(--coral);
  border-color: var(--coral);
}
.legal-content code {
  font-family: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 0.92em;
  background: var(--inset);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--coral-dark);
}
.legal-content ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.legal-content ul li {
  position: relative;
  padding: 4px 0 4px 22px;
}
.legal-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 10px;
  height: 2px;
  background: var(--coral);
  border-radius: 1px;
}
.legal-content ul li strong { font-weight: 600; }

/* Summary callout — "The short version" */
.legal-summary {
  margin: 0 0 40px;
  padding: 28px 32px;
  background: var(--cream);
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
}
.legal-summary-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: 12px;
}
.legal-summary ul li::before { background: var(--ink); }
.legal-summary p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--slate);
}

/* Vendor table */
.legal-content .vendor-table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 14px;
}
.legal-content .vendor-table thead th {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--slate-light);
  text-align: left;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--border);
}
.legal-content .vendor-table tbody td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.legal-content .vendor-table tbody tr:last-child td {
  border-bottom: 0;
}
.legal-content .vendor-table tbody td:first-child {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

/* Important callouts — used for medical disclaimer in ToS */
.legal-important {
  margin: 24px 0;
  padding: 24px 28px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-2xl);
}
.legal-important .lbl {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--coral-light);
  margin-bottom: 10px;
}
.legal-important strong { color: var(--white); font-weight: 600; }
.legal-important p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  line-height: 1.6;
}
.legal-important ul li { color: rgba(255, 255, 255, 0.82); }
.legal-important ul li::before { background: var(--coral); }

/* Section separator */
.legal-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Back to top */
.legal-back-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--coral-dark);
  margin-top: 56px;
  padding: 10px 18px;
  background: var(--coral-bg);
  border-radius: var(--r-full);
  transition: background 0.2s, transform 0.2s;
}
.legal-back-top:hover {
  background: var(--coral);
  color: var(--white);
  transform: translateY(-1px);
}
