/* Legal / policy pages (terms, privacy, etc.) */

.legal-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  color: rgba(255, 255, 255, 0.55);
  background: #010406;
  font-family: PingFang SC, "Microsoft YaHei", sans-serif;
}

.legal-page .page-main {
  flex: 1;
  padding: 30px 0 60px;
  gap: 30px;
}

.legal-content.layout-section {
  width: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1200px;
}

.legal-breadcrumb {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 500;
  line-height: 24px;
}

.legal-breadcrumb__back {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.legal-breadcrumb__back img {
  display: block;
  width: 24px;
  height: 24px;
  filter: invert(1);
  opacity: 0.9;
}

.legal-breadcrumb__back:hover img {
  opacity: 1;
}

.legal-breadcrumb strong {
  font: inherit;
}

.legal-breadcrumb > span {
  color: rgba(255, 255, 255, 0.9);
}

.legal-panel {
  width: 100%;
  padding: 24px;
  background: #0e1012;
  border-radius: 8px;
  border: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.legal-panel__title {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 600;
  line-height: 24px;
}

.legal-panel__content {
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 22px;
}

.legal-panel__content h1,
.legal-panel__content h2,
.legal-panel__content h3,
.legal-panel__content h4,
.legal-panel__content h5,
.legal-panel__content h6 {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.legal-panel__content h1:first-child,
.legal-panel__content h2:first-child,
.legal-panel__content h3:first-child,
.legal-panel__content h4:first-child,
.legal-panel__content h5:first-child,
.legal-panel__content h6:first-child {
  margin-top: 0;
}

.legal-panel__content p {
  margin: 0;
}

.legal-panel__content p + p,
.legal-panel__content ul + p,
.legal-panel__content ol + p,
.legal-panel__content p + ul,
.legal-panel__content p + ol {
  margin-top: 8px;
}

.legal-panel__content ul,
.legal-panel__content ol {
  margin: 0;
  padding-left: 22px;
}

.legal-panel__content li + li {
  margin-top: 4px;
}

.legal-panel__content img,
.legal-panel__content video {
  max-width: 100%;
  height: auto;
}

.legal-panel__content table {
  width: 100%;
  border-collapse: collapse;
}

.legal-panel__content th,
.legal-panel__content td {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-panel__content blockquote {
  margin: 12px 0;
  padding-left: 14px;
  border-left: 3px solid #e9b54b;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.legal-panel__content .faq-item__question {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

.faq-item__answer {
  margin: 0;
}

.faq-email {
  color: #ff4d67;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
}

.faq-link {
  color: #e9b54b;
  text-decoration: none;
}

.faq-link:hover {
  text-decoration: underline;
}

.faq-rich-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-rich-text > h1,
.faq-rich-text > h2,
.faq-rich-text > h3,
.faq-rich-text > h4,
.faq-rich-text > h5,
.faq-rich-text > h6 {
  margin-top: 22px;
}

.faq-rich-text > h1:first-child,
.faq-rich-text > h2:first-child,
.faq-rich-text > h3:first-child,
.faq-rich-text > h4:first-child,
.faq-rich-text > h5:first-child,
.faq-rich-text > h6:first-child {
  margin-top: 0;
}

.faq-rich-text a {
  color: #e9b54b;
  text-decoration: none;
}

.faq-rich-text a:hover {
  text-decoration: underline;
}

.addr-block + .addr-block {
  margin-top: 18px;
}

.addr-block__label {
  margin: 0 0 4px;
}

.addr-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.addr-link {
  color: #e9b54b;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  word-break: break-all;
}

.addr-link:hover {
  text-decoration: underline;
}

.addr-tip {
  margin: 4px 0 0;
}

.addr-tip--red {
  color: #ff0000;
}

.addr-warn {
  margin: 0;
  color: #ff0000;
}

.addr-email-highlight {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 32px;
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-weight: 400;
  line-height: 50px;
  text-shadow: 0 0 10px var(--color-primary-500);
}

.addr-email-highlight a {
  color: inherit;
  text-decoration: none;
}

.addr-inline-links a {
  color: #e9b54b;
  text-decoration: none;
}

.addr-inline-links a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .legal-page {
    background-image: none;
  }

  .legal-page .page-main {
    padding: 12px 0 0;
    gap: 0;
  }

  .legal-content.layout-section {
    width: 100%;
    gap: 18px;
    padding-left: var(--layout-padding-x);
    padding-right: var(--layout-padding-x);
    padding-bottom: 12px;
    box-sizing: border-box;
  }

  .legal-breadcrumb {
    font-size: 12px;
    line-height: 18px;
  }

  .legal-panel {
    padding: 24px 20px;
    background: #fff;
    border-radius: 18px;
    border: none;
    outline: 1px solid var(--color-black-alpha-10);
    outline-offset: -1px;
    backdrop-filter: none;
    gap: 18px;
    overflow: hidden;
  }

  .legal-panel__title {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
  }

  .legal-panel__content {
    font-size: 12px;
    line-height: 18px;
  }

  .legal-panel__content h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
  }

  .legal-panel__content h2:not(:first-child) {
    margin-top: 0;
  }

  .latest-address-page .legal-panel {
    background: #0e1012;
    outline-color: rgba(255, 255, 255, 0.1);
  }
}
