/* ============================================================
   Message Polly — legal pages (Terms / Privacy / Cookie)
   Header + footer reuse the home page's .pnav / .pfooter chrome
   (defined in tokens.css) for full consistency across the site.
   ============================================================ */

/* keep the fixed home nav clear of the document flow */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 128px 24px 96px; }

.legal-head { margin-bottom: 56px; }
.legal-head h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(34px, 5vw, 46px); letter-spacing: -0.02em;
  line-height: 1.05; margin: 16px 0 12px; color: var(--ink);
}
.legal-updated { font-family: var(--mono); font-size: 12.5px; color: var(--slate); }

.legal-body { display: flex; flex-direction: column; gap: 40px; }
.legal-sec h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 20px; letter-spacing: -0.01em; color: var(--ink);
  margin-bottom: 14px;
}
.legal-sec h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 15.5px; color: var(--ink);
  margin: 22px 0 8px;
}
.legal-sec p {
  font-size: 16px; line-height: 1.65; color: var(--slate);
  text-wrap: pretty; margin-bottom: 12px;
}
.legal-sec p:last-child { margin-bottom: 0; }
.legal-sec ul {
  list-style: none; display: flex; flex-direction: column; gap: 9px;
  margin: 6px 0 4px;
}
.legal-sec li {
  position: relative; padding-left: 22px;
  font-size: 16px; line-height: 1.55; color: var(--slate); text-wrap: pretty;
}
.legal-sec li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}
.legal-sec a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-sec a:hover { color: var(--green); }

.legal-sec table {
  width: 100%; border-collapse: collapse; margin: 8px 0 4px;
  font-size: 14.5px; overflow: hidden;
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
}
.legal-sec thead th {
  text-align: left; font-family: var(--display); font-weight: 600;
  font-size: 13px; color: var(--ink); background: var(--surface);
  padding: 11px 16px; border-bottom: 1px solid var(--hairline);
}
.legal-sec tbody td {
  padding: 11px 16px; color: var(--slate); line-height: 1.5;
  border-bottom: 1px solid var(--hairline); vertical-align: top; text-wrap: pretty;
}
.legal-sec tbody tr:last-child td { border-bottom: 0; }
.legal-sec tbody td:first-child { color: var(--ink); font-weight: 500; }

/* wide tables scroll horizontally on small screens instead of breaking layout */
.legal-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 4px; }
.legal-table-wrap > table { margin: 0; }
@media (max-width: 620px) {
  .legal-sec table { font-size: 13px; }
  .legal-sec thead th, .legal-sec tbody td { padding: 9px 12px; }
}
.legal-subhead {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate);
  margin: 22px 0 10px;
}

.legal-footnote {
  margin-top: 52px; padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 13.5px; color: var(--slate);
}

.legal-contact {
  margin-top: 6px; padding: 18px 20px;
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-soft);
  font-size: 15px; color: var(--slate);
}
.legal-contact a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* cross-links between the three legal docs */
.legal-crosslinks {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 44px; padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.legal-crosslinks a {
  font-size: 13.5px; color: var(--slate); text-decoration: none;
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 6px 14px; transition: color .15s ease, border-color .15s ease;
}
.legal-crosslinks a:hover { color: var(--ink); border-color: #CFC9BE; }
.legal-crosslinks a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }

/* dark footer needs a light logo (matches tokens.css .pfooter .pnav-logo) */
.pfooter .pnav-logo img { display: block; }

.legal-foot {
  border-top: 1px solid var(--hairline);
  background: var(--ink); color: #F4F1EA;
  padding: 30px 0;
}
.legal-foot-inner {
  max-width: 900px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.legal-foot .pnav-logo { color: #F4F1EA; }
.legal-foot-copy { font-size: 12px; color: #8B867B; }
