.pm-legal { color: var(--family-ink); background: #faf8fd; }
.pm-legal-header { position: sticky; inset-block-start: 0; z-index: 4; }
.pm-legal-header nav { gap: clamp(10px, 2.4vw, 29px); }
.pm-legal-header nav a { white-space: nowrap; }
.pm-legal-hero {
  isolation: isolate;
  overflow: hidden;
  color: #281a43;
  border-bottom: 1px solid var(--family-line);
  background: radial-gradient(ellipse at 87% 48%, #decfff 0%, transparent 42%),
    linear-gradient(110deg, #f8f2ff 6%, #eee4fb 65%, #e8dcf9);
}
.pm-legal-hero-inner {
  min-height: 315px;
  padding-block: 34px;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0,1.9fr) minmax(180px,1fr);
  gap: 18px;
}
.pm-legal-context { margin: 0 0 9px; color: #593a9d; font-weight: 780; }
.pm-legal-hero h1, .pm-legal-withdrawal h1 {
  margin: 0;
  max-width: 22ch;
  font: 400 clamp(36px, 5.2vw, 74px)/1 Lilita, system-ui, sans-serif;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.pm-legal-hero h1 + p { color: var(--family-muted); margin: 12px 0 0; }
.pm-legal-art { position: relative; display: grid; place-items: center; }
.pm-legal-art::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(94%, 295px);
  aspect-ratio: 1;
  border: 1px solid #fff9;
  border-radius: 50%;
  background: radial-gradient(circle, #fffc 0%, #fff3 66%, transparent 67%);
  box-shadow: 0 0 0 17px #e6d9fc8f, 0 0 0 35px #f4edff7a;
}
.pm-legal-art img { width: min(100%, 270px); height: 245px; object-fit: contain; filter: drop-shadow(0 11px 22px #4422763b); }
.pm-legal-actions { margin-top: 21px; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.pm-legal-actions a, .pm-legal-actions button {
  padding: 8px 14px; border: 1px solid #bea8e8; border-radius: 9px;
  color: #49298d; background: #fff; font: 700 14px/1.35 system-ui; text-decoration: none; cursor: pointer;
}
.pm-legal-actions a { background: #5432a6; border-color: #5432a6; color: white; }
.pm-legal-actions :is(a,button):hover { box-shadow: 0 0 0 2px #b299e277; }
.pm-legal-actions [hidden] { display: none; }
.pm-legal-layout { display: grid; grid-template-columns: minmax(195px,255px) minmax(0,1fr); align-items: start; gap: clamp(25px,4vw,59px); padding-block: 34px 25px; }
.pm-legal-single { grid-template-columns: minmax(0,785px); justify-content: center; }
.pm-legal-outline {
  position: sticky; inset-block-start: 92px; border: 1px solid var(--family-line);
  border-radius: 13px; background: #fff; padding: 15px; max-height: calc(100dvh - 116px); overflow: auto;
}
.pm-legal-outline summary { color: var(--family-ink); font-weight: 790; cursor: default; list-style: none; }
.pm-legal-outline summary::-webkit-details-marker { display:none; }
.pm-legal-outline ol { margin: 11px 0 0; padding: 0; list-style: none; }
.pm-legal-outline a { display: block; border-radius: 6px; padding: 6px 8px; overflow-wrap: anywhere; color: #4a3b61; font-size: 13px; line-height: 1.35; text-decoration: none; }
.pm-legal-outline a:hover { background: #f3edfc; text-decoration: underline; }
.pm-legal-outline a[aria-current="location"] { color: #432189; font-weight: 760; box-shadow: inset 3px 0 0 #8058db; background: #eee5fa; }
.pm-legal-outline :is(.pm-legal-depth-3,.pm-legal-depth-4) a { margin-inline-start: 11px; }
.pm-legal-document {
  min-width: 0; padding: clamp(19px,4vw,47px); background: #fff; border: 1px solid var(--family-line);
  border-radius: 18px; box-shadow: 0 7px 25px #32166708; overflow-wrap: anywhere; line-height: 1.72;
}
.pm-legal-document :is(h2,h3,h4,section,[id]) { scroll-margin-block-start: 97px; }
.pm-legal-document :target { background: #f8f4fd; }
.pm-legal-document h2 {
  color: var(--family-ink); font: 400 clamp(24px,3vw,34px)/1.15 Lilita,system-ui,sans-serif;
  margin: 32px 0 12px; padding-top: 23px; border-top: 1px solid var(--family-line);
}
.pm-legal-document h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.pm-legal-document > section + section > h2:first-child { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--family-line); }
.pm-legal-document h3 { margin: 24px 0 9px; color: #42296e; font-size: 1.18em; line-height: 1.35; }
.pm-legal-document h4 { margin: 21px 0 8px; color: #42296e; font-size: 1.05em; }
.pm-legal-document p { margin: 0 0 14px; max-width: 73ch; }
.pm-legal-document p:last-child { margin-bottom: 0; }
.pm-legal-document ul,.pm-legal-document ol { margin-block: 12px 16px; }
.pm-legal-document details { border: 1px solid var(--family-line); border-radius: 10px; padding: 13px 15px; }
.pm-legal-document details summary { margin-bottom: 8px; cursor:pointer; font-weight: 720; }
.pm-legal-document nav { display:flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 21px; font-size: 14px; }
.pm-legal-document pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.pm-legal-end { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-block: 0 31px; font-size: 14px; }
.pm-legal-credit { margin: 0; color: var(--family-muted); font-size: 12px; }
.pm-legal-footer { border-top: 1px solid var(--family-line); padding-block: 20px; }
.pm-legal-footer p { margin: 0 0 9px; }
.pm-legal-footer nav { display:flex; flex-wrap: wrap; gap: 6px 16px; }
.pm-legal[data-one-language] .family-footer-language { display: none; }
.pm-legal-withdrawal-frame { padding-block: 38px; min-height: 55vh; }
.pm-legal-withdrawal-inner { max-width: 770px; }
.pm-legal-withdrawal .receipt.withdrawal {
  width: 100%; max-width: none; margin: 0; color: var(--family-ink);
  background: white; border: 1px solid var(--family-line); border-radius: 18px; padding: clamp(21px,5vw,47px); box-shadow: none;
}
.pm-legal-withdrawal .receipt.withdrawal a:not([download]) { color: #4a2d96; }
.pm-legal-withdrawal h1 { margin-block: 13px; }
.pm-legal-withdrawal .receipt.withdrawal input { border: 1px solid #bba8da; background: #fff; color: var(--family-ink); }
.pm-legal-withdrawal .receipt.withdrawal button.primary { background: var(--family-purple); color: white; border-color: var(--family-purple); }
.pm-legal :is(a,button,summary,input):focus-visible { outline: 3px solid #8058db; outline-offset: 3px; }
@media (max-width: 850px) {
  .pm-legal-layout { grid-template-columns: minmax(0,1fr); gap: 16px; padding-block-start: 19px; }
  .pm-legal-outline { position: static; max-height: none; padding: 11px 15px; }
  .pm-legal-outline summary { cursor: pointer; list-style: revert; }
  .pm-legal-outline summary::-webkit-details-marker { display: revert; }
  .pm-legal-hero-inner { min-height: 260px; gap: 12px; }
  .pm-legal-art img { height: 190px; }
}
@media (max-width: 540px) {
  .pm-legal-header .family-wrap{ width: calc(100% - 24px); }
  .pm-legal-header nav { gap: 5px 11px; }
  .pm-legal-header nav a { font-size: 11px; }
  .pm-legal-hero-inner { min-height: 0; grid-template-columns: minmax(0,1fr) clamp(55px,17vw,95px); padding-block: 26px; }
  .pm-legal-hero h1 { font-size: clamp(29px,8.5vw,46px); }
  .pm-legal-art img { height: 110px; }
  .pm-legal-art::before { box-shadow: 0 0 0 6px #f1e7fc; }
  .pm-legal-document { padding: 17px; }
}
@page { size: A4; margin: 17mm 17mm 18mm; }
@media print {
  html, body.pm-legal { background: white; color: black; }
  .pm-legal-header,.pm-legal-actions,.pm-legal-art,.pm-legal-outline,.pm-legal-end,.pm-legal-footer,
  .family-global,.family-skip,.pm-legal-document nav,.pm-legal-form-action { display:none !important; }
  .family-wrap { width: auto; max-width: none; margin: 0; }
  .pm-legal-hero, .pm-legal-layout, .pm-legal-hero-inner, .pm-legal-document { display:block; min-height: 0; padding:0; border:0; box-shadow:none; background:white; }
  .pm-legal-hero { margin-block-end: 8mm; overflow:visible; }
  .pm-legal-hero h1 { font-size: 28pt; max-width:none; }
  .pm-legal-document { font-size: 10.5pt; line-height: 1.55; }
  .pm-legal-document :is(h2,h3,h4,summary) { break-after: avoid; }
  .pm-legal-document h2 { font-size: 17pt; margin-top: 17pt; padding-top: 8pt; }
  .pm-legal-document :is(p,li) { orphans: 3; widows: 3; }
  .pm-legal-document a { color: #362060; }
  .pm-legal-document details:not([open]) > :not(summary) { display:block !important; }
}
