:root {
  --brand: #4d35df;
  --brand-deep: #2f1c78;
  --ink: #191817;
  --muted: #6f6a65;
  --paper: #fbf8f3;
  --white: #ffffff;
  --line: #e7e0d7;
  --mint: #e5f6ed;
  --red-soft: #fff0ee;
  --coral: #ff6758;
  --yellow: #f4c95d;
  --dark: #17151b;
  --radius: 8px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

button {
  font: inherit;
  letter-spacing: 0;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}

.legal-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 243, 0.94);
  backdrop-filter: blur(14px);
}

.legal-nav {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--brand-deep);
  font-size: 21px;
  font-weight: 850;
}

.brand img {
  width: 35px;
  height: 35px;
  border-radius: 7px;
}

.nav-actions,
.language-toggle {
  display: flex;
  align-items: center;
}

.nav-actions {
  gap: 12px;
}

.back-link {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
}

.back-link:hover {
  color: var(--brand);
  background: #f1edff;
}

.language-toggle {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.lang-button {
  width: 38px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.lang-button.active {
  color: var(--white);
  background: var(--brand-deep);
}

.legal-hero {
  position: relative;
  padding: 96px 0 78px;
  overflow: hidden;
  color: var(--white);
  background: var(--brand-deep);
}

.legal-hero::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 8px;
  background: var(--coral);
  content: "";
}

.legal-hero span {
  display: block;
  margin-bottom: 18px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 880;
  line-height: 0.98;
  letter-spacing: 0;
}

.legal-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  align-items: start;
  justify-content: space-between;
  gap: 76px;
  padding: 72px 0 110px;
}

.legal-index {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 2px;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--line);
}

.legal-index a {
  position: relative;
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.legal-index a:hover {
  color: var(--brand);
  background: var(--white);
}

.legal-index a.active {
  color: var(--brand-deep);
  background: #f1edff;
}

.legal-index a.active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -18px;
  width: 2px;
  background: var(--coral);
  content: "";
}

.legal-copy {
  min-width: 0;
}

.legal-copy section {
  margin-bottom: 0;
  padding: 0 0 48px;
  scroll-margin-top: 116px;
}

.legal-copy section + section {
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.legal-copy h2 {
  margin: 0 0 14px;
  color: var(--brand-deep);
  font-size: 30px;
  line-height: 1.15;
}

.legal-copy h3 {
  margin: 24px 0 9px;
  color: #342d55;
  font-size: 17px;
}

.legal-copy p,
.legal-copy li {
  color: #514c47;
  font-size: 16px;
  line-height: 1.75;
}

.legal-copy p {
  margin: 0 0 13px;
}

.legal-copy ul,
.legal-copy ol {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.legal-copy a {
  color: var(--brand);
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  margin: 0 0 52px;
  padding: 24px;
  border: 1px solid #b9dfca;
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 #dcece4;
  background: var(--mint);
}

.callout.warning {
  border-color: #f1c6bf;
  background: var(--red-soft);
  box-shadow: 8px 8px 0 #f1ddd8;
}

.callout strong {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-deep);
  font-size: 17px;
}

.callout p {
  margin: 0;
}

.steps {
  counter-reset: legal-step;
  display: grid;
  gap: 12px;
  padding: 0 !important;
  list-style: none;
}

.steps li {
  position: relative;
  min-height: 58px;
  padding: 19px 20px 19px 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.steps li::before {
  position: absolute;
  top: 14px;
  left: 16px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--brand-deep);
  counter-increment: legal-step;
  content: counter(legal-step);
  font-size: 12px;
  font-weight: 850;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 52px;
}

.support-card {
  min-height: 150px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 8px 8px 0 #e8e1d9;
}

.support-card:first-child {
  border-color: var(--brand-deep);
  color: var(--white);
  background: var(--brand-deep);
  box-shadow: 8px 8px 0 #d8cffc;
}

.support-card:first-child h2,
.support-card:first-child p,
.support-card:first-child a {
  color: var(--white);
}

.support-card h2 {
  font-size: 18px;
}

.support-card p {
  margin-bottom: 0;
  font-size: 14px;
}

.legal-footer {
  padding: 42px 0;
  border-top: 1px solid #302c33;
  color: #a49f9b;
  background: var(--dark);
  font-size: 12px;
}

.legal-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.legal-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-footer a:hover {
  color: var(--coral);
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .legal-nav {
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .back-link {
    display: none;
  }

  .legal-hero {
    padding: 66px 0 52px;
  }

  .legal-hero h1 {
    font-size: clamp(42px, 13vw, 58px);
    overflow-wrap: anywhere;
  }

  .legal-hero p {
    font-size: 16px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 42px 0 74px;
  }

  .legal-index {
    position: static;
    display: flex;
    margin-inline: -16px;
    padding: 0 16px 12px;
    overflow-x: auto;
    border: 0;
    scrollbar-width: none;
  }

  .legal-index::-webkit-scrollbar {
    display: none;
  }

  .legal-index a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid var(--line);
    background: var(--white);
  }

  .legal-index a.active::before {
    display: none;
  }

  .legal-copy h2 {
    font-size: 25px;
  }

  .legal-copy p,
  .legal-copy li {
    font-size: 15px;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .legal-footer .container {
    flex-direction: column;
  }
}
