:root {
  --legal-ink: #17191f;
  --legal-blue: #435b91;
  --legal-blue-dark: #293c6d;
  --legal-muted: #596273;
  --legal-paper: #fcfdff;
  --legal-surface: #f2f5fa;
  --legal-line: rgba(51, 72, 119, 0.14);
  --legal-font: var(--font-sans);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--legal-ink);
  background: var(--legal-surface);
  font-family: var(--legal-font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
p {
  margin-top: 0;
}

.legal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px clamp(22px, 4vw, 68px);
  border-bottom: 1px solid var(--legal-line);
  background: rgba(252, 253, 255, 0.96);
  box-shadow: 0 8px 28px rgba(30, 39, 61, 0.05);
  backdrop-filter: blur(18px);
}

.legal-header > a:first-child {
  flex: 0 0 auto;
}

.legal-header img {
  width: 120px;
  height: auto;
  mix-blend-mode: multiply;
}

.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.legal-back-link {
  margin-right: 7px;
  color: #485265;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.legal-account-icon,
.legal-close {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(67, 91, 145, 0.2);
  border-radius: 50%;
  color: var(--legal-blue);
  background: #edf2fb;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.legal-account-icon:hover,
.legal-close:hover {
  color: #fff;
  background: var(--legal-blue);
  transform: translateY(-1px);
}

.legal-account-icon svg,
.legal-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.legal-close {
  display: none;
  color: #7a3840;
  border-color: rgba(122, 56, 64, 0.18);
  background: #fbefef;
}

.legal-close:hover {
  background: #8f4650;
}

.legal-main {
  display: grid;
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 82px) 0 clamp(62px, 8vw, 104px);
  gap: 34px;
}

.legal-title {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 10px 40px;
  align-items: end;
  padding: 0 4px;
}

.eyebrow {
  grid-column: 1;
  margin: 0;
  color: var(--legal-blue);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  min-width: 0;
  grid-column: 1;
  margin: 0;
  font-size: clamp(44px, 6.2vw, 76px);
  font-weight: 640;
  letter-spacing: 0;
  line-height: 0.96;
}

.legal-title > p:last-child {
  grid-row: 1 / 3;
  grid-column: 2;
  margin: 0 0 4px;
  color: var(--legal-muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: right;
}

.legal-content {
  min-width: 0;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--legal-line);
  border-radius: 7px;
  background: var(--legal-paper);
  box-shadow: 0 24px 70px rgba(35, 48, 77, 0.055);
  overflow-wrap: break-word;
}

.legal-content > p:first-child {
  max-width: 760px;
  margin-bottom: 34px;
  color: #303541;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75;
}

.legal-content h2 {
  margin: 38px 0 11px;
  color: var(--legal-blue-dark);
  font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 680;
  letter-spacing: 0;
  line-height: 1.2;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--legal-muted);
  font-size: 14px;
}

.legal-content ul {
  margin: 12px 0 0;
  padding-left: 21px;
}

.legal-content li + li {
  margin-top: 7px;
}

.legal-content strong {
  color: #303b56;
}

.legal-content a {
  color: var(--legal-blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(67, 91, 145, 0.35);
  text-underline-offset: 3px;
}

.legal-note {
  margin-top: 35px;
  padding: 19px 20px;
  border-left: 3px solid var(--legal-blue);
  border-radius: 4px;
  background: #edf2fb;
}

.legal-footer {
  display: flex;
  min-height: 68px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--legal-blue-dark);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.legal-footer a:hover {
  color: #fff;
}

@media (max-width: 760px) {
  .legal-header {
    min-height: 68px;
    padding: 8px 14px 8px 16px;
  }

  .legal-header img {
    width: 104px;
  }

  .legal-back-link {
    display: none;
  }

  .legal-account-icon,
  .legal-close {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
  }

  .legal-close {
    display: grid;
  }

  .legal-main {
    width: min(100% - 26px, 680px);
    padding: 34px 0 52px;
    gap: 24px;
  }

  .legal-title {
    display: block;
    padding: 0 3px;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  h1 {
    font-size: clamp(39px, 12vw, 54px);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .legal-title > p:last-child {
    margin-top: 14px;
    font-size: 12px;
    text-align: left;
  }

  .legal-content {
    padding: 25px 19px 30px;
    border-radius: 5px;
    box-shadow: 0 18px 48px rgba(35, 48, 77, 0.045);
  }

  .legal-content > p:first-child {
    margin-bottom: 28px;
    font-size: 16px;
  }

  .legal-content h2 {
    margin-top: 31px;
    font-size: 22px;
  }

  .legal-content p,
  .legal-content li {
    font-size: 13px;
    line-height: 1.75;
  }

  .legal-footer {
    gap: 13px 19px;
    padding: 19px 14px;
  }
}

@media (max-width: 390px) {
  .legal-header-actions {
    gap: 7px;
  }

  .legal-header img {
    width: 96px;
  }

  h1 {
    font-size: 39px;
  }
}

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