/* Destination: public/co/assets/css/legal-page.css
 *
 * Verde marketing site - the legal pages: Terms (1510), Privacy (1511) and
 * Security (1512), on the premium redesign. One layout for all three: the
 * shared centered head, then an "On this page" rail beside the document,
 * across the full content width. main.js (initLegalRail) marks the section
 * being read. Replaces legal.css, which goes once all three have moved.
 * MARKETING-SITE-ENGINEERING.md section 17.
 */

/* "Last updated", a small pill under the head's intro line. */
.vs-legal__updated {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 14px;
  border: 1px solid var(--vs-line);
  border-radius: 999px;
  background: var(--vs-wash);
  font-size: 13px;
  font-weight: 600;
  color: var(--vs-ink-3);
}

.vs-legal {
  padding: 8px 0 88px;
}

.vs-legal__grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ---- The rail --------------------------------------------------------- */

.vs-legal__rail {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px 12px;
  border: 1px solid var(--vs-line);
  border-radius: 14px;
  background: #fff;
}

.vs-legal__rail-title {
  margin-bottom: 10px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vs-forest);
}

.vs-legal__rail ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vs-legal__rail a {
  display: block;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--vs-ink-2);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.vs-legal__rail a:hover {
  background: var(--vs-wash);
  color: var(--vs-forest);
}

.vs-legal__rail a[aria-current="true"] {
  background: #eef5f1;
  font-weight: 600;
  color: var(--vs-forest);
}

/* ---- The document ----------------------------------------------------- */

.vs-legal__section {
  padding: 32px 0;
  scroll-margin-top: 24px;
}

.vs-legal__section + .vs-legal__section {
  border-top: 1px solid var(--vs-line);
}

.vs-legal__section:first-child {
  padding-top: 0;
}

.vs-legal__doc h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--vs-forest);
}

.vs-legal__doc h3 {
  margin-top: 24px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--vs-forest);
}

.vs-legal__doc p,
.vs-legal__doc li {
  font-size: 16px;
  line-height: 1.75;
  color: var(--vs-ink-2);
}

.vs-legal__doc p {
  margin-top: 14px;
}

.vs-legal__doc strong {
  color: var(--vs-forest);
}

.vs-legal__doc a {
  font-weight: 600;
  text-decoration: underline;
  color: var(--vs-green);
}

.vs-legal__doc ul,
.vs-legal__doc ol {
  margin: 14px 0 0;
  padding-left: 22px;
}

.vs-legal__doc ul {
  list-style: disc;
}

.vs-legal__doc ol {
  list-style: decimal;
}

.vs-legal__doc li + li {
  margin-top: 8px;
}

.vs-legal__doc li::marker {
  color: var(--vs-check);
}

/* A plain-words note inside a section, in the tinted card. */
.vs-legal__note {
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid #d5e0d9;
  border-radius: 12px;
  background: #f2f6f3;
}

.vs-legal__note p:first-child {
  margin-top: 0;
}

/* Tables (Privacy, Security): the Pricing comparison's look. */
.vs-legal__table {
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--vs-line);
  border-radius: 14px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 15px;
}

.vs-legal__table th,
.vs-legal__table td {
  padding: 14px 20px;
  border-top: 1px solid var(--vs-line);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}

.vs-legal__table thead th {
  border-top: 0;
  background: var(--vs-wash);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vs-forest);
}

.vs-legal__table tbody th {
  width: 32%;
  font-weight: 600;
  color: var(--vs-forest);
}

.vs-legal__table td {
  color: var(--vs-ink-2);
}

/* Who to write to, at the foot of each page. */
.vs-legal__signoff {
  margin-top: 20px;
  padding: 22px 24px;
  border: 1px solid var(--vs-line);
  border-radius: 14px;
  background: var(--vs-wash);
}

.vs-legal__signoff h3 {
  margin-top: 0;
}

.vs-legal__signoff p {
  margin-top: 8px;
  font-size: 15px;
}

/* ---- Tablet and phone ------------------------------------------------- */

/* On a narrow screen the rail would push the document a full screen down;
   the document's own headings carry it there. */
@media (max-width: 960px) {
  .vs-legal__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vs-legal__rail {
    display: none;
  }
}

@media (max-width: 560px) {
  .vs-legal__table th,
  .vs-legal__table td {
    padding: 12px 14px;
  }

  .vs-legal__table tbody th {
    width: 38%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vs-legal__rail a {
    transition: none;
  }
}
