/* ==========================================================================
   ZANTI PHARMACY — LEGAL PAGE STYLES (assets/css/pages/legal.css)
   Shared by privacy-policy.html, terms.html and medical-disclaimer.html.
   Loaded after style.css. Uses shared design tokens only.
   ========================================================================== */

/* ---- "Last updated" pill in the page hero ------------------------------ */
.page-hero .legal-updated {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.page-hero .legal-updated .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-glow);
}

/* ---- Two-column layout: sticky contents + prose ------------------------ */
.legal-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-height) + var(--sp-5));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}

.legal-toc .eyebrow {
  margin-bottom: var(--sp-3);
}

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

.legal-toc a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.4;
  color: var(--slate);
  text-decoration: none;
  transition: background var(--speed-fast) var(--ease-out), color var(--speed-fast) var(--ease-out);
}

.legal-toc a:hover {
  color: var(--brand-strong);
  background: var(--mint-soft);
}

.legal-toc a.is-active {
  color: var(--brand-strong);
  background: var(--mint);
  font-weight: 600;
}

/* ---- Prose column ------------------------------------------------------- */
.legal-body .prose {
  max-width: 72ch;
}

/* Anchor jumps land clear of the sticky header */
.legal-body .prose h2 {
  scroll-margin-top: calc(var(--header-height) + var(--sp-5));
}

/* ---- Responsive: contents panel is desktop-only ------------------------ */
@media (max-width: 1023px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    display: none;
  }

  .legal-body .prose {
    max-width: none;
  }
}
