.topbar {
  justify-content: space-between;
  gap: 18px;
  height: 72px;
}

.brand {
  gap: 6px;
}

.brand-icon {
  width: clamp(38px, 2.2vw, 44px);
  height: clamp(38px, 2.2vw, 44px);
  filter: none;
  transform: translateY(-1px);
}

.brand-text {
  font-size: clamp(31px, 1.75vw, 36px);
}

.legal-links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 16px);
  color: #dff7ff;
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 700;
  white-space: nowrap;
}

.legal-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 4px;
  opacity: .86;
  transition: opacity .2s ease, color .2s ease, background-color .2s ease;
}

.legal-links a:hover {
  color: #8be5ff;
  opacity: 1;
}

.legal-links a[aria-current="page"] {
  color: #ffffff;
  background: rgba(27, 156, 255, .22);
  box-shadow: inset 0 0 0 1px rgba(139, 229, 255, .22);
  opacity: 1;
}

body.legal-page {
  min-height: 100vh;
  overflow-y: auto;
  background: #061326;
}

.legal-frame-wrap {
  height: 100vh;
  padding-top: 72px;
  background: #061326;
}

.legal-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.legal-doc-wrap {
  min-height: 100vh;
  padding: calc(72px + 36px) clamp(16px, 5vw, 72px) 56px;
  background:
    linear-gradient(180deg, rgba(11, 37, 72, .82), rgba(4, 16, 31, .96)),
    radial-gradient(circle at 70% 0, rgba(18, 107, 255, .28), transparent 30%),
    #061326;
}

.legal-doc {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: clamp(24px, 4.4vw, 52px);
  color: #d8e8f8;
  background:
    linear-gradient(180deg, rgba(12, 33, 58, .96), rgba(8, 24, 44, .98)),
    #0a1c32;
  border: 1px solid rgba(139, 229, 255, .18);
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 22px 60px rgba(0, 0, 0, .3);
}

.legal-doc-head {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(139, 229, 255, .16);
}

.legal-doc h1 {
  margin: 0;
  color: #f2f9ff;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
  text-shadow: none;
}

.legal-doc-time {
  margin: 12px 0 0;
  color: #8fb5d8;
  font-size: 14px;
  line-height: 1.6;
}

.legal-doc-content {
  color: #d4e4f2;
  font-size: 16px;
  line-height: 1.85;
}

.legal-doc-content p {
  margin: 0 0 14px;
}

.legal-doc-content .p-h3 {
  margin-top: 30px;
  color: #f1f9ff;
  font-size: 20px;
  font-weight: 900;
}

.legal-doc-content .p-h4 {
  margin-top: 20px;
  color: #dff2ff;
  font-size: 17px;
  font-weight: 800;
}

.legal-doc-content .f-bold {
  font-weight: 700;
}

.legal-doc-content .f-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-doc-content a {
  color: #63ddff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero::before {
  inset: 72px 0 0;
}

.hero::after {
  inset: 72px auto 0 0;
}

.gallery {
  inset: 72px -22vw -14vh 16vw;
}

@media (max-width: 900px) {
  .legal-frame-wrap {
    padding-top: 72px;
  }

  .legal-doc-wrap {
    padding-top: calc(72px + 22px);
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 10px;
  }

  .legal-links {
    gap: 10px;
    font-size: 12px;
  }

  .brand-icon {
    width: 24px;
    height: 24px;
  }

  .brand-text {
    font-size: 19px;
  }

  .legal-doc-wrap {
    padding-right: 12px;
    padding-left: 12px;
  }

  .legal-doc {
    padding: 22px 16px;
  }

  .legal-doc-content {
    font-size: 15px;
    line-height: 1.78;
  }
}
