:root {
  --legal-navy: #031426;
  --legal-navy-2: #082b47;
  --legal-ink: #0b263d;
  --legal-muted: #587184;
  --legal-cyan: #27d8df;
  --legal-cyan-dark: #067681;
  --legal-gold: #d9b65f;
  --legal-gold-light: #ffe4a0;
  --legal-paper: #f5f9fa;
  --legal-white: #fff;
  --legal-line: rgba(11, 38, 61, .13);
  --legal-shell: min(1240px, calc(100% - 80px));
  --legal-ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--legal-navy); }
body.legal-page {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--legal-ink);
  background: var(--legal-paper);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.72;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

body.legal-page.menu-open { overflow: hidden; }
body.legal-page main { background: var(--legal-paper); }
body.legal-page a { color: inherit; text-decoration: none; }
body.legal-page button { font: inherit; }
body.legal-page img { display: block; max-width: 100%; }
body.legal-page svg { width: 1.1em; height: 1.1em; stroke-width: 1.7; }
.legal-shell { width: var(--legal-shell); margin-inline: auto; }
.noise-svg { position: fixed; width: 0; height: 0; }

.reading-progress {
  position: fixed;
  z-index: 1100;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  overflow: hidden;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--legal-cyan), var(--legal-gold-light));
  transform: scaleX(0);
  transform-origin: left;
}

.legal-hero {
  position: relative;
  min-height: 440px;
  padding: 166px 0 82px;
  overflow: hidden;
  color: var(--legal-white);
  background: linear-gradient(118deg, #031426 0%, #031426 62%, #082d49 100%);
  isolation: isolate;
}

.legal-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 207, 220, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 207, 220, .12) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .42;
  -webkit-mask-image: linear-gradient(110deg, transparent 10%, #000 70%, transparent 100%);
  mask-image: linear-gradient(110deg, transparent 10%, #000 70%, transparent 100%);
  content: "";
}

.legal-hero::after {
  position: absolute;
  z-index: -1;
  top: 126px;
  right: max(5vw, 40px);
  width: min(29vw, 390px);
  height: 170px;
  border-top: 1px solid rgba(39, 216, 223, .2);
  border-right: 1px solid rgba(39, 216, 223, .2);
  border-bottom: 1px solid rgba(39, 216, 223, .1);
  box-shadow: 26px 26px 0 -25px rgba(217, 182, 95, .55);
  content: "";
}

.legal-kicker {
  display: flex;
  margin: 0 0 20px;
  align-items: center;
  gap: 13px;
  color: var(--legal-cyan);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.legal-kicker::before { width: 32px; height: 1px; background: currentColor; content: ""; }
.legal-hero h1 {
  max-width: 910px;
  margin: 0;
  font-size: clamp(2.75rem, 4.7vw, 4.75rem);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -.052em;
  hyphens: auto;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.legal-hero p:not(.legal-kicker) {
  max-width: 650px;
  margin: 24px 0 0;
  color: #b4c7d1;
  font-size: 1rem;
  line-height: 1.75;
}

.legal-meta { display: flex; margin-top: 34px; flex-wrap: wrap; gap: 9px; }
.legal-meta span {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  color: #b5c8d2;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .035);
  font-size: .67rem;
  font-weight: 720;
  letter-spacing: .055em;
}

.legal-meta span:first-child { color: var(--legal-navy); border-color: var(--legal-gold-light); background: var(--legal-gold-light); }
.legal-switcher {
  position: relative;
  z-index: 5;
  overflow-x: auto;
  border-bottom: 1px solid var(--legal-line);
  background: var(--legal-white);
  scrollbar-width: none;
}

.legal-switcher::-webkit-scrollbar { display: none; }
.legal-switcher-inner { display: grid; grid-template-columns: .8fr .8fr 1.4fr; }
.legal-switcher a {
  position: relative;
  display: flex;
  min-height: 74px;
  padding: 0 24px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #536c7c;
  border-right: 1px solid var(--legal-line);
  font-size: .78rem;
  font-weight: 700;
  transition: color .25s ease, background .25s ease;
}

.legal-switcher a:first-child { border-left: 1px solid var(--legal-line); }
.legal-switcher a svg { flex: 0 0 18px; color: var(--legal-cyan-dark); transition: transform .3s var(--legal-ease); }
.legal-switcher a:hover { color: var(--legal-ink); background: #f7fafb; }
.legal-switcher a:hover svg { transform: translateX(4px); }
.legal-switcher a[aria-current="page"] { color: var(--legal-white); background: var(--legal-navy); }
.legal-switcher a[aria-current="page"] svg { color: var(--legal-gold-light); }

.legal-main { padding: clamp(84px, 8vw, 126px) 0 clamp(100px, 9vw, 150px); }
.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 790px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(56px, 8vw, 124px);
}

.legal-toc { position: sticky; top: 114px; padding-top: 18px; border-top: 2px solid var(--legal-ink); }
.legal-toc > strong {
  display: block;
  margin-bottom: 18px;
  color: var(--legal-cyan-dark);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.legal-toc nav { display: flex; flex-direction: column; gap: 1px; }
.legal-toc nav a {
  padding: 8px 0;
  color: #647d8d;
  font-size: .78rem;
  font-weight: 620;
  line-height: 1.45;
  transition: color .25s ease, transform .25s ease;
}

.legal-toc nav a:hover { color: var(--legal-ink); transform: translateX(4px); }
.legal-help { margin-top: 32px; padding: 21px 0 0; border-top: 1px solid var(--legal-line); }
.legal-help small,
.legal-help strong { display: block; }
.legal-help small { color: var(--legal-cyan-dark); font-size: .66rem; font-weight: 800; letter-spacing: .08em; }
.legal-help strong { margin-top: 8px; font-size: .9rem; line-height: 1.45; }
.legal-help a { display: inline-flex; margin-top: 14px; color: var(--legal-cyan-dark); font-size: .76rem; font-weight: 750; }

.legal-document { min-width: 0; }
.legal-intro { margin-bottom: 26px; padding: 0 0 34px 27px; border-bottom: 1px solid var(--legal-line); border-left: 3px solid var(--legal-gold); }
.legal-intro p { margin: 0; color: var(--legal-muted); font-size: 1rem; line-height: 1.85; }
.legal-section { position: relative; scroll-margin-top: 116px; padding: 45px 0; border-bottom: 1px solid var(--legal-line); }
.legal-section:first-child { padding-top: 0; }
.legal-section h2 {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--legal-ink);
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  font-weight: 740;
  line-height: 1.2;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.legal-section h3 { margin: 32px 0 12px; color: var(--legal-ink); font-size: 1.02rem; font-weight: 730; line-height: 1.5; }
.legal-section p {
  max-width: 74ch;
  margin: 0 0 18px;
  color: #526c7d;
  font-size: .96rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { color: var(--legal-cyan-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal-loading { padding: 28px 0 28px 25px; color: var(--legal-muted); border-left: 3px solid var(--legal-gold); font-size: .93rem; }
.legal-footer-wrap { overflow: hidden; color: var(--legal-white); background: radial-gradient(circle at 78% 20%, rgba(39, 216, 223, .1), transparent 27%), var(--legal-navy); }
.legal-footer-wrap .premium-footer { margin-top: 0; }
.legal-footer-wrap .premium-footer-brand { padding-left: 0; }

@media (max-width: 1024px) {
  :root { --legal-shell: min(920px, calc(100% - 56px)); }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { display: none; }
  .legal-document { width: min(100%, 790px); margin-inline: auto; }
}

@media (max-width: 680px) {
  :root { --legal-shell: calc(100% - 40px); }
  .legal-hero { min-height: 0; padding: 132px 0 64px; }
  .legal-hero::after { top: 108px; right: -84px; width: 240px; height: 120px; opacity: .55; }
  .legal-hero h1 { font-size: clamp(2.35rem, 10.5vw, 3.45rem); line-height: 1.02; }
  .legal-hero p:not(.legal-kicker) { margin-top: 20px; font-size: .95rem; line-height: 1.7; }
  .legal-meta { margin-top: 28px; }
  .legal-switcher { overflow: visible; }
  .legal-switcher .legal-shell { width: 100%; }
  .legal-switcher-inner { display: grid; grid-template-columns: 1fr; }
  .legal-switcher a,
  .legal-switcher a:last-child { min-width: 0; min-height: 58px; padding: 0 20px; border-right: 0; border-bottom: 1px solid var(--legal-line); font-size: .74rem; }
  .legal-switcher a:first-child { border-left: 0; }
  .legal-main { padding: 70px 0 94px; }
  .legal-intro { margin-bottom: 16px; padding: 0 0 28px 20px; }
  .legal-intro p { font-size: .93rem; line-height: 1.78; }
  .legal-section { padding: 35px 0; }
  .legal-section h2 { margin-bottom: 20px; font-size: 1.42rem; line-height: 1.24; }
  .legal-section h3 { margin-top: 27px; font-size: .98rem; }
  .legal-section p { font-size: .9rem; line-height: 1.82; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
