/* Legal documents share Products typography, glass and one measured column. */
body.legal-page {
  font-family: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.top-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 24px;
  pointer-events: none;
}
.legal-screen {
  justify-content: flex-start;
  padding-top: 118px;
  padding-bottom: 120px;
  overflow: clip;
}
.legal-screen .screen-inner {
  width: min(100%, 1040px);
  padding-inline: 0;
}
/* Preserve the site's atmosphere and let it fade below the first screen. */
.legal-screen .screen-bg {
  bottom: auto;
  height: max(100svh, 860px);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent);
  mask-image: linear-gradient(180deg, #000 62%, transparent);
}
.legal-screen:after {
  bottom: auto;
  height: max(100svh, 860px);
}
.legal-glow {
  position: absolute;
  inset: 0 0 auto;
  height: 620px;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.legal-glow .brand-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.legal-head {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.legal-title {
  margin: 0;
  font-family: "Inter", "Inter Fallback", system-ui, sans-serif;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
}
.legal-meta {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
}
.legal-lede {
  margin: 20px auto 0;
  max-width: 38em;
  color: var(--text-secondary);
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 500;
  line-height: 1.45;
  text-wrap: pretty;
}
/* The four documents: one compact glass control, centered under the lede. */
.legal-tabs {
  display: grid;
  grid-template-columns: repeat(4, auto);
  width: fit-content;
  margin: 32px auto 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}
.legal-tabs a {
  position: relative;
  padding: 12px 26px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.legal-tabs a + a {
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}
.legal-tabs a:first-child {
  border-radius: calc(var(--radius-md) - 1px) 0 0 calc(var(--radius-md) - 1px);
}
.legal-tabs a:last-child {
  border-radius: 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0;
}
.legal-tabs a[aria-current="page"] {
  color: #8fb2ff;
  font-weight: 600;
  background-color: rgba(143, 178, 255, 0.1);
}
.legal-tabs a:hover {
  color: #8fb2ff;
  background-color: rgba(143, 178, 255, 0.16);
}
.legal-tabs a:focus-visible,
.legal-toc a:focus-visible,
.legal-doc a:focus-visible,
.legal-table-panel:focus-visible {
  outline: 2px solid #8fb2ff;
  outline-offset: 3px;
}
.legal-tabs a:focus-visible {
  z-index: 1;
  outline-offset: -4px;
}
.legal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  margin-top: 40px;
}
.legal-toc {
  min-width: 0;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.legal-toc p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}
.legal-toc ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-toc a {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding-block: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color 160ms var(--ease-out);
}
.legal-toc a:hover,
.legal-toc a[aria-current],
.legal-toc a.active {
  color: #8fb2ff;
  text-decoration: underline;
}
/* Wide screens: the contents rail stays beside the text while it scrolls,
   as before the restyle; the text keeps a reading measure of about 780 px. */
@media (min-width: 1000px) {
  .legal-body {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 56px;
    margin-top: 56px;
  }
  .legal-toc {
    position: sticky;
    top: 104px;
    align-self: start;
    padding-bottom: 0;
    border-bottom: 0;
  }
  .legal-toc ol {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .legal-toc a {
    padding-block: 5px;
  }
}
.legal-doc {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
}
.legal-doc section {
  scroll-margin-top: 108px;
}
.legal-doc section + section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.legal-doc h2 {
  margin: 0 0 16px;
  font-family: "Inter", "Inter Fallback", system-ui, sans-serif;
  font-size: clamp(22px, 1.9vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-wrap: balance;
}
.legal-doc h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.legal-doc p {
  margin: 0 0 16px;
}
.legal-doc p:last-child,
.legal-doc ul:last-child {
  margin-bottom: 0;
}
.legal-doc ul {
  margin: 0 0 16px;
  padding-left: 20px;
}
.legal-doc li {
  margin: 0 0 8px;
  padding-left: 4px;
}
.legal-doc li::marker {
  color: #8fb2ff;
}
.legal-doc strong {
  color: var(--text-primary);
  font-weight: 600;
}
.legal-doc a {
  color: #8fb2ff;
  text-decoration: underline;
  text-decoration-color: rgba(143, 178, 255, 0.45);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color 160ms var(--ease-out), text-decoration-color 160ms var(--ease-out);
}
.legal-doc a:hover {
  color: var(--text-primary);
  text-decoration-color: currentColor;
}
.legal-doc address {
  margin: 0 0 16px;
  font-style: normal;
}
/* Callouts and tables use the same single glass surface as Products. */
.legal-doc .legal-note,
.legal-table-panel {
  margin: 0 0 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}
.legal-doc .legal-note {
  padding: 20px 24px;
}
.legal-table-panel {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: #8fb2ff transparent;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.65;
}
.legal-table th {
  padding: 16px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  vertical-align: bottom;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.legal-table td {
  padding: 20px;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.legal-table tr:last-child td {
  border-bottom: 0;
}
.legal-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}
.legal-table td .sub {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.phi {
  display: inline-block;
  font-weight: 600;
}
.phi-yes {
  color: #8fb2ff;
}
.phi-no,
.phi-info {
  color: var(--text-primary);
}
.phi-info {
  display: inline;
}
.legal-doc section > .legal-table-panel:last-child {
  margin-bottom: 0;
}
.sub-table {
  table-layout: fixed;
}
.sub-table th:nth-child(1) { width: 21%; }
.sub-table th:nth-child(2) { width: 27%; }
.sub-table th:nth-child(3) { width: 20%; }
.sub-table th:nth-child(4) { width: 32%; }
.legal-doc .nowrap {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .legal-screen {
    padding-top: 112px;
    padding-bottom: 0;
  }
  .legal-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 28px;
  }
  .legal-tabs a {
    padding: 12px 8px;
  }
  .legal-tabs a:nth-child(3) {
    border-left: 0;
  }
  .legal-tabs a:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
  }
  .legal-tabs a:first-child {
    border-radius: calc(var(--radius-md) - 1px) 0 0 0;
  }
  .legal-tabs a:nth-child(2) {
    border-radius: 0 calc(var(--radius-md) - 1px) 0 0;
  }
  .legal-tabs a:nth-child(3) {
    border-radius: 0 0 0 calc(var(--radius-md) - 1px);
  }
  .legal-tabs a:last-child {
    border-radius: 0 0 calc(var(--radius-md) - 1px) 0;
  }
  .legal-body {
    margin-top: 32px;
    gap: 28px;
  }
  .legal-toc ol {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .legal-doc section + section {
    margin-top: 32px;
    padding-top: 28px;
  }
  .legal-doc .legal-note {
    padding: 18px;
  }
  .legal-table {
    min-width: 720px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .legal-tabs a,
  .legal-toc a,
  .legal-doc a {
    transition: none;
  }
}
