.legal-page .legal-page-main{
  width:min(1120px,calc(100% - 32px));
}

.legal-page .legal-page-heading{
  position:relative;
  overflow:hidden;
}

.legal-page .legal-page-heading::after{
  content:"";
  position:absolute;
  right:-70px;
  bottom:-95px;
  width:250px;
  height:250px;
  border:48px solid rgba(31,122,82,.08);
  border-radius:50%;
  pointer-events:none;
}

.legal-page .legal-page-heading>*{
  position:relative;
  z-index:1;
}

.legal-page .legal-page-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:22px;
}

.legal-page .legal-page-meta span,
.legal-page .legal-page-meta a{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  padding:7px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.82);
  color:var(--ink);
  font-size:13px;
  font-weight:750;
  text-decoration:none;
}

.legal-page .legal-page-meta a:hover,
.legal-page .legal-page-meta a:focus-visible{
  border-color:#9bc7ae;
  background:var(--soft);
}

.legal-page .legal-layout{
  display:grid;
  grid-template-columns:minmax(190px,230px) minmax(0,1fr);
  align-items:start;
  gap:20px;
}

.legal-page .legal-toc,
.legal-page .legal-document{
  border:1px solid var(--line);
  border-radius:22px;
  background:#fff;
  box-shadow:0 16px 42px rgba(23,33,29,.08);
}

.legal-page .legal-toc{
  position:sticky;
  top:88px;
  display:grid;
  gap:5px;
  padding:18px;
}

.legal-page .legal-toc strong{
  margin:0 8px 7px;
  color:var(--muted);
  font-size:11px;
  font-weight:850;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.legal-page .legal-toc a{
  min-height:42px;
  display:flex;
  align-items:center;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:10px;
  color:var(--ink);
  font-size:13px;
  font-weight:720;
  line-height:1.35;
  text-decoration:none;
}

.legal-page .legal-toc a:hover,
.legal-page .legal-toc a:focus-visible{
  border-color:var(--line);
  background:var(--soft);
  color:#145238;
}

.legal-page .legal-document{
  padding:clamp(22px,4vw,42px);
}

.legal-page .legal-draft{
  margin-bottom:28px;
  padding:18px 20px;
  border:1px solid #e4bd63;
  border-left:5px solid #d29a24;
  border-radius:14px;
  background:#fff8e8;
  color:#5d4b22;
}

.legal-page .legal-draft strong{
  display:block;
  margin-bottom:6px;
  color:#493913;
  font-size:15px;
}

.legal-page .legal-draft p{
  margin:0;
}

.legal-page .legal-section{
  scroll-margin-top:94px;
  padding:25px 0;
  border-top:1px solid var(--line);
}

.legal-page .legal-draft+.legal-section{
  border-top:0;
  padding-top:0;
}

.legal-page .legal-section:last-child{
  padding-bottom:0;
}

.legal-page .legal-section h2{
  margin:0 0 10px;
  color:var(--ink);
  font-size:clamp(21px,3vw,28px);
  line-height:1.2;
  letter-spacing:-.02em;
}

.legal-page .legal-section p{
  margin:0;
  color:#4d5a53;
  font-size:16px;
  line-height:1.75;
}

.legal-page .legal-section a{
  color:#176440;
  font-weight:800;
  text-underline-offset:3px;
}

@media(max-width:800px){
  .legal-page .legal-layout{
    grid-template-columns:1fr;
  }

  .legal-page .legal-toc{
    position:static;
    grid-template-columns:repeat(2,minmax(0,1fr));
    border-radius:18px;
  }

  .legal-page .legal-toc strong{
    grid-column:1/-1;
  }

  .legal-page .legal-document{
    border-radius:18px;
  }
}

@media(max-width:520px){
  .legal-page .legal-page-main{
    width:calc(100% - 20px);
  }

  .legal-page .legal-page-heading::after{
    right:-115px;
  }

  .legal-page .legal-page-meta{
    display:grid;
    grid-template-columns:1fr;
  }

  .legal-page .legal-toc{
    grid-template-columns:1fr;
    padding:13px;
  }

  .legal-page .legal-toc strong{
    grid-column:auto;
  }

  .legal-page .legal-toc a{
    min-height:38px;
  }

  .legal-page .legal-document{
    padding:20px 16px;
  }

  .legal-page .legal-draft{
    padding:16px;
  }

  .legal-page .legal-section p{
    font-size:15px;
    line-height:1.68;
  }
}
