/* Legal template (privacy-policy, terms-of-use) — Figma 830:3770 / 830:3692.
   Desktop 1512: TOC text x=122 (302 wide), body column x=551 (626 wide). */
.legal { padding-top: 256px; padding-bottom: 150px; }
.legal__grid {
  display: grid; grid-template-columns: 302px minmax(0, 626px); column-gap: 129px;
  grid-template-areas: ". head" "toc content"; align-items: start;
}
.legal__head { grid-area: head; margin-bottom: 65px; }
.legal__date { font-size: var(--fs-small); line-height: 28px; color: var(--c-grey); }
.legal__title { margin-top: 11px; font-weight: var(--fw-medium); font-size: var(--fs-h2-fluid); line-height: var(--lh-h2); color: var(--c-black); max-width: 494px; }

/* Body */
.legal__content { grid-area: content; min-width: 0; }
.legal__section { scroll-margin-top: 140px; }
.legal__section + .legal__section { margin-top: 48px; }
.legal__h2 { font-family: var(--ff-display); font-weight: var(--fw-bold); font-size: 24px; line-height: 1.2; letter-spacing: .48px; color: var(--c-black); }
.legal__body { margin-top: 16px; font-size: var(--fs-body); line-height: 28px; color: var(--c-grey); }
.legal__body .mt { margin-top: 28px; }
.legal__body strong { font-weight: var(--fw-bold); }
.legal__body ul { padding-left: 24px; }
.legal__body a { text-decoration: underline; text-underline-offset: 2px; transition: color var(--dur-fast) var(--ease); }
.legal__body a:hover { color: var(--c-blue); }

/* Sticky table of contents with scroll-spy */
.legal-toc { grid-area: toc; position: sticky; top: 136px; max-height: calc(100vh - 160px); overflow-y: auto; scrollbar-width: thin; }
.legal-toc__summary { display: none; }
.legal-toc__list { list-style: none; padding: 0; }
.legal-toc__link {
  position: relative; display: block; padding-left: 0; font-family: var(--ff-display); font-size: 14px; line-height: 32px; letter-spacing: .28px; color: var(--c-black);
  transition: color var(--dur-fast) var(--ease), padding-left var(--dur) var(--ease);
}
.legal-toc__link::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--c-lila);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease);
}
.legal-toc__link:hover { color: var(--c-blue); }
.legal-toc__link[aria-current="true"] { color: var(--c-blue); font-weight: var(--fw-bold); font-style: italic; padding-left: 18px; }
.legal-toc__link[aria-current="true"]::before { transform: scaleX(1); }

@media (max-width: 1199px) {
  .legal__grid { grid-template-columns: 240px minmax(0, 626px); column-gap: 56px; }
}
@media (max-width: 899px) {
  .legal { padding-top: calc(var(--header-top) + var(--header-h) + 64px); padding-bottom: 80px; }
  .legal__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "toc" "content"; max-width: calc(626px + 2 * var(--gutter)); }
  .legal__head { margin-bottom: 32px; }
  .legal-toc { position: sticky; top: calc(var(--header-top) + 8px); z-index: 5; max-height: none; overflow: visible; margin-bottom: 40px; }
  .site-header:not(.is-hidden) ~ main .legal-toc { top: calc(var(--header-top) + var(--header-h) + 8px); }
  .legal-toc__details { background: var(--c-light-grey); border: 1px solid rgba(11, 60, 93, .12); border-radius: var(--r-card); box-shadow: var(--sh-card); }
  .legal-toc__summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; cursor: pointer; list-style: none;
    font-family: var(--ff-display); font-weight: var(--fw-semibold); font-size: 16px; color: var(--c-blue);
  }
  .legal-toc__summary::-webkit-details-marker { display: none; }
  .legal-toc__chev { width: 14px; height: 14px; flex: none; transition: transform var(--dur-fast) var(--ease); }
  .legal-toc__details[open] .legal-toc__chev { transform: rotate(180deg); }
  .legal-toc nav { max-height: min(60vh, 420px); overflow-y: auto; padding: 0 20px 14px; border-top: 1px solid rgba(11, 60, 93, .08); }
  .legal-toc__link { line-height: 22px; padding-block: 7px; }
  .legal__section { scroll-margin-top: 150px; }
}
