.legal-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
}

.legal-links a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}

.legal-links-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  padding: 10px 16px;
  color: #52606d;
  font-size: 12px;
}

.legal-page {
  min-height: 100vh;
  margin: 0;
  background: var(--surface-page, #f3f2ef);
  color: var(--ink, #1d252c);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.legal-header {
  border-bottom: 4px solid var(--brand-red, #c71f2d);
  background: #173650;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 15px 0;
  color: #fff;
  text-decoration: none;
}

.legal-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  padding: 4px;
  background: #fff;
  border-radius: 4px;
}

.legal-brand span,
.legal-brand strong {
  display: block;
}

.legal-brand span {
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
}

.legal-brand strong {
  margin-bottom: 2px;
  color: #fff;
  font-family: Sora, Inter, sans-serif;
  font-size: 20px;
}

.legal-shell {
  width: min(940px, calc(100% - 32px));
  margin: 28px auto 40px;
}

.legal-tabs {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  border-bottom: 1px solid #bac2c8;
}

.legal-tabs a {
  flex: 0 0 auto;
  padding: 10px 1px 9px;
  border-bottom: 3px solid transparent;
  color: #44515c;
  font-weight: 800;
  text-decoration: none;
}

.legal-tabs a.active {
  border-color: var(--brand-red, #c71f2d);
  color: #171d22;
}

.legal-document {
  margin-top: 18px;
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid #c8c8c4;
  border-top: 4px solid #20262b;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(24, 31, 36, .12);
}

.legal-title {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d5d8da;
}

.legal-title span {
  color: var(--brand-red, #b81724);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.legal-title h1 {
  margin: 7px 0 6px;
  color: #17212a;
  font-family: Sora, Inter, sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.08;
}

.legal-title p,
.legal-document p {
  color: #4b5963;
  line-height: 1.68;
}

.legal-document section + section {
  margin-top: 30px;
}

.legal-document h2 {
  margin: 0 0 9px;
  color: #17212a;
  font-family: Sora, Inter, sans-serif;
  font-size: 19px;
}

.legal-document a {
  color: #174f7a;
  font-weight: 700;
}

.legal-document code {
  padding: 2px 5px;
  border: 1px solid #d2d7da;
  border-radius: 2px;
  background: #f2f3f3;
}

.legal-identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid #d2d5d7;
}

.legal-identity div {
  padding: 13px 15px;
  border-bottom: 1px solid #dfe2e3;
}

.legal-identity div:nth-child(odd) {
  border-right: 1px solid #dfe2e3;
}

.legal-identity dt {
  color: #6b747b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.legal-identity dd {
  margin: 4px 0 0;
  color: #222b31;
  font-weight: 700;
}

.legal-page-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
  padding: 18px 16px 28px;
  color: #5d6870;
  font-size: 12px;
}

@media (max-width: 640px) {
  .legal-shell,
  .legal-brand {
    width: min(100% - 20px, 940px);
  }

  .legal-shell {
    margin-top: 18px;
  }

  .legal-document {
    padding: 22px 18px;
  }

  .legal-identity {
    grid-template-columns: 1fr;
  }

  .legal-identity div:nth-child(odd) {
    border-right: 0;
  }
}
