:root {
  --blue: #0059bb;
  --deep: #0047ab;
  --navy: #001a41;
  --ink: #131b2e;
  --muted: #566477;
  --ice: #f0f9ff;
  --line: #dbe7f1;
  --white: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 118px; }
body {
  min-width: 320px;
  background: #f7fbfe;
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.75;
}
a { color: inherit; }

.legal-navbar {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 50%;
  width: min(calc(100% - 32px), 1200px);
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 10px 14px 10px 24px;
  transform: translateX(-50%);
  border: 1px solid rgba(0, 89, 187, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 38px rgba(0, 42, 91, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.legal-logo { width: fit-content; display: flex; align-items: center; }
.legal-logo img { width: auto; height: 38px; display: block; }
.legal-nav-links { display: flex; align-items: center; justify-content: center; gap: 28px; }
.legal-nav-links a {
  position: relative;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.legal-nav-links a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.legal-nav-links a:hover::after,
.legal-nav-links a:focus-visible::after { transform: scaleX(1); }

.back-site-button {
  justify-self: end;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0877e7, var(--deep));
  box-shadow: 0 8px 20px rgba(0, 89, 187, .25);
  color: var(--white);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.back-site-button:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(0, 89, 187, .32); }
.back-site-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legal-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 150px 24px 86px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 24%, rgba(56, 189, 248, .24), transparent 27%),
    radial-gradient(circle at 14% 92%, rgba(0, 89, 187, .18), transparent 28%),
    linear-gradient(145deg, #001a41 0%, #003978 55%, #0059bb 100%);
}
.legal-hero::before,
.legal-hero::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
}
.legal-hero::before { width: 440px; height: 440px; top: -195px; right: -90px; }
.legal-hero::after { width: 260px; height: 260px; right: 140px; bottom: -190px; }
.legal-hero-inner { position: relative; z-index: 1; width: min(100%, 1160px); margin: 0 auto; }
.legal-eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #bfeaff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.legal-eyebrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.legal-hero h1 {
  max-width: 880px;
  margin-bottom: 22px;
  color: var(--white);
  font-size: clamp(2.45rem, 6vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.04;
  text-wrap: balance;
}
.legal-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.7;
}
.legal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  color: rgba(255, 255, 255, .62);
  font-size: .78rem;
}
.legal-meta strong { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .2); color: var(--white); font-weight: 600; }

.legal-main {
  width: min(calc(100% - 40px), 1160px);
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 6vw, 82px);
  margin: 0 auto;
  padding: 80px 0 112px;
}
.legal-index {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 10px 28px rgba(9, 55, 97, .06);
}
.legal-index > span {
  margin-bottom: 8px;
  color: #7a8798;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.legal-index a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 10px;
  color: var(--navy);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.legal-index a:hover { background: var(--ice); color: var(--blue); }
.index-number { color: var(--blue); font-size: .7rem; font-weight: 800; }
.legal-content { display: flex; flex-direction: column; gap: 48px; }
.legal-document {
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(11, 54, 94, .07);
}
.document-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.document-number {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--ice), #dceeff);
  color: var(--blue);
  font-size: 1rem;
  font-weight: 800;
}
.document-label {
  display: block;
  margin-bottom: 2px;
  color: var(--blue);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.legal-document h2 {
  color: var(--navy);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.legal-document section { margin-top: 36px; }
.legal-document h3 { margin-bottom: 12px; color: var(--navy); font-size: 1.1rem; font-weight: 700; line-height: 1.4; }
.legal-document h3 span { margin-right: 5px; color: var(--blue); }
.legal-document p,
.legal-document li { color: var(--muted); font-size: .96rem; }
.legal-document p + p { margin-top: 14px; }
.legal-document ul,
.legal-document ol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0 22px;
  padding-left: 24px;
}
.legal-document li { padding-left: 5px; }
.legal-document li::marker { color: var(--blue); font-weight: 700; }
.lettered-list { list-style-type: upper-alpha; }
.effective-date {
  margin-top: 40px;
  padding: 18px 20px;
  border-left: 3px solid var(--blue);
  border-radius: 0 12px 12px 0;
  background: var(--ice);
}
.effective-date strong { color: var(--navy); }

.legal-footer {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 40px max(24px, calc((100% - 1160px) / 2));
  background: var(--ink);
  color: rgba(255, 255, 255, .6);
  font-size: .82rem;
}
.legal-footer > div { display: flex; align-items: center; gap: 22px; }
.legal-footer-logo { display: flex; }
.legal-footer-logo img { width: auto; height: 42px; display: block; filter: brightness(0) invert(1); }
.legal-footer > a { color: var(--white); font-weight: 600; text-underline-offset: 4px; }
.legal-footer-developer { color: rgba(255, 255, 255, 0.75); font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
.legal-footer-developer:hover { color: var(--white); }
:where(a, button):focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }

@media (max-width: 820px) {
  .legal-navbar { grid-template-columns: 1fr auto; }
  .legal-nav-links { display: none; }
  .legal-main { grid-template-columns: 1fr; padding-top: 48px; }
  .legal-index { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .legal-index > span { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  html { scroll-padding-top: 98px; }
  .legal-navbar { top: 10px; width: calc(100% - 20px); min-height: 62px; gap: 12px; padding: 8px 8px 8px 15px; }
  .legal-logo img { height: 32px; }
  .back-site-button { min-height: 44px; padding: 0 15px; }
  .back-site-button span { font-size: .78rem; }
  .legal-hero { min-height: 500px; padding: 126px 20px 62px; }
  .legal-hero h1 { font-size: clamp(2.15rem, 11vw, 3rem); }
  .legal-meta { align-items: flex-start; flex-direction: column; gap: 7px; }
  .legal-meta strong { padding: 0; border: 0; }
  .legal-main { width: calc(100% - 28px); gap: 28px; padding-bottom: 72px; }
  .legal-index { grid-template-columns: 1fr; padding: 16px; }
  .legal-document { padding: 24px 20px 30px; border-radius: 20px; }
  .document-heading { align-items: flex-start; gap: 14px; margin-bottom: 28px; padding-bottom: 24px; }
  .document-number { width: 46px; height: 46px; border-radius: 13px; }
  .legal-document section { margin-top: 30px; }
  .legal-document p,
  .legal-document li { font-size: .92rem; }
  .legal-footer,
  .legal-footer > div { align-items: flex-start; flex-direction: column; }
  .legal-footer { padding: 42px 24px; }
  .legal-footer > div { gap: 14px; }
}

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