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

body:not(.legal-page) > footer {
  background: #1d1222;
  border-top-color: rgba(255, 255, 255, 0.18);
}

.footer-legal a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(184, 110, 255, 0.65);
  text-underline-offset: 5px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: #c789ff;
  text-decoration-color: #c789ff;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: #f4edf7;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 80px;
}

.footer-credit span {
  font-size: 0.78rem;
  letter-spacing: 0;
}

.footer-credit > img {
  display: block;
  width: 38px;
  height: 39px;
  object-fit: contain;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-credit:hover > img,
.footer-credit:focus-visible > img {
  opacity: 0.82;
  transform: translateY(-2px);
}

.footer-credit:focus-visible {
  outline: 2px solid #a548ff;
  outline-offset: 5px;
  border-radius: 2px;
}

.legal-page {
  --ink: #f8f5fc;
  --muted: #b9b2c2;
  --line: rgba(255, 255, 255, 0.12);
  --violet: #a548ff;
  --violet-soft: #d3a7ff;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 0%, rgba(129, 32, 226, 0.18), transparent 32rem),
    #09080c;
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1.65;
}

.legal-page *,
.legal-page *::before,
.legal-page *::after {
  box-sizing: border-box;
}

.legal-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: #09080c;
  background: #fff;
  border-radius: 999px;
  transform: translateY(-160%);
}

.legal-skip:focus {
  transform: translateY(0);
}

.legal-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.legal-logo img {
  display: block;
  width: 180px;
  height: auto;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}

.legal-back:hover,
.legal-back:focus-visible {
  color: var(--violet-soft);
}

.legal-main {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 110px;
}

.legal-kicker {
  margin: 0 0 14px;
  color: var(--violet-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-main h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.legal-updated {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-intro {
  max-width: 760px;
  margin: 54px 0 70px;
  color: #ddd7e4;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.legal-content {
  display: grid;
  gap: 0;
}

.legal-section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 16px;
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.legal-section p,
.legal-section ul {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p {
  margin-top: 14px;
}

.legal-section ul {
  padding-left: 22px;
}

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

.legal-page a {
  color: var(--violet-soft);
}

.legal-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.legal-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.legal-footer a {
  color: var(--ink);
  text-underline-offset: 4px;
}

@media (max-width: 720px) {
  .footer-legal {
    width: 100%;
    justify-content: flex-start;
    gap: 10px 18px;
  }

  .footer-credit {
    justify-content: flex-start;
    margin-top: 6px;
    margin-right: 0;
  }

  .legal-header,
  .legal-main,
  .legal-footer {
    width: min(100% - 32px, 920px);
  }

  .legal-header {
    padding: 20px 0;
  }

  .legal-logo img {
    width: 145px;
  }

  .legal-back span {
    display: none;
  }

  .legal-main {
    padding: 60px 0 84px;
  }

  .legal-intro {
    margin: 40px 0 54px;
  }

  .legal-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
