.ph-legal-page {
  --cd-accent: #3159ed;
  --cd-ink: #20232a;
  --cd-muted: #64707c;
  --cd-line: #20232a1c;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.ph-legal-page[hidden] { display: none !important; }

.ph-legal-doc {
  flex: 1;
  width: min(1193px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 92px) 0 clamp(64px, 9vw, 120px);
}

.ph-legal-head {
  position: relative;
  max-width: 820px;
  margin-bottom: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(24px, 3vw, 32px);
  border-bottom: 1px solid var(--cd-line);
}
.ph-legal-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, #3159ed, #152d75);
}
.ph-legal-eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3159ed;
}
.ph-legal-head h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: #0d1420;
  text-wrap: balance;
}
.ph-legal-updated { margin: 0; font-size: 13px; color: var(--cd-muted); }

.ph-legal-layout { display: block; }
.ph-legal-toc { display: none; }

.ph-legal-body {
  max-width: 760px;
  font-size: 15.5px;
  line-height: 1.75;
  color: #2c333d;
}
.ph-legal-intro {
  margin: 0 0 12px;
  padding-bottom: 28px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--cd-ink);
}
.ph-legal-body section {
  padding: 28px 0 16px;
  border-top: 1px solid var(--cd-line);
  scroll-margin-top: 24px;
}
.ph-legal-body section:first-of-type { border-top: 0; padding-top: 0; }
.ph-legal-intro + section { border-top: 1px solid var(--cd-line) !important; padding-top: 28px !important; }
.ph-legal-body h2 {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0d1420;
}
.ph-legal-body p { margin: 0 0 12px; }
.ph-legal-body ul { margin: 0 0 12px; padding-left: 20px; }
.ph-legal-body li { margin: 0 0 6px; }
.ph-legal-body strong { font-weight: 600; color: #0d1420; }
.ph-legal-page .ph-legal-body a {
  color: #2545b7;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.ph-legal-cross { margin: 36px 0 0; }
.ph-legal-page .ph-legal-cross a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--cd-line);
  border-radius: 14px;
  background: #fff;
  color: #0d1420;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.ph-legal-page .ph-legal-cross a:hover { border-color: #3159ed; color: #2545b7; }
.ph-legal-cross svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 1024px) {
  .ph-legal-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 760px);
    gap: clamp(48px, 6vw, 96px);
    align-items: start;
  }
  .ph-legal-toc {
    display: block;
    position: sticky;
    top: 28px;
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
  }
  .ph-legal-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--cd-line); }
  .ph-legal-page .ph-legal-toc a {
    display: block;
    margin-left: -1px;
    padding: 7px 0 7px 16px;
    border-left: 1px solid transparent;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--cd-muted);
    transition: color 0.2s, border-color 0.2s;
  }
  .ph-legal-page .ph-legal-toc a:hover { color: #0d1420; border-left-color: #3159ed; }
  /* The section in the middle of the screen (marked by the page script). */
  .ph-legal-page .ph-legal-toc a[aria-current="location"] { color: #0d1420; font-weight: 600; border-left-color: #3159ed; }
}

@media (max-width: 640px) {
  .ph-legal-doc { width: calc(100% - 40px); }
  .ph-legal-body { font-size: 15px; }
  .ph-legal-intro { font-size: 16px; }
  .ph-legal-body h2 { font-size: 17.5px; }
}
