:root {
  --ink: #121417;
  --muted: #68707d;
  --line: #e4e8ee;
  --panel: #ffffff;
  --accent: #2563eb;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f7f8fb;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

a:hover {
  color: var(--accent);
}

.legalShell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.legalHeader,
.legalFooter {
  background: #ffffff;
  border-color: #eef1f5;
}

.legalHeader {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 58px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #eef1f5;
}

.brandLockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brandMark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #5b2cff 56%, #8b5cf6 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .3);
}

.brandMark svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.brandName {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.legalNav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: #68707d;
  font-size: 13px;
  font-weight: 850;
}

.legalMain {
  width: min(880px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) 0 64px;
}

.legalDoc {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(17, 24, 39, .06);
}

.legalDoc h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: 0;
}

.legalDoc .updated {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.legalDoc h2 {
  margin: 30px 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.legalDoc p,
.legalDoc li {
  color: #333b47;
  font-size: 15px;
  line-height: 1.85;
}

.legalDoc p {
  margin: 0 0 14px;
}

.legalDoc ul {
  margin: 0 0 14px;
  padding-left: 1.2em;
}

.legalDoc strong {
  color: var(--ink);
}

.noticeBox {
  margin: 22px 0;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 14px;
  line-height: 1.7;
}

.legalActionRow {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legalPrimaryLink,
.legalSecondaryLink {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
}

.legalPrimaryLink {
  background: var(--accent);
  color: #ffffff;
}

.legalPrimaryLink:hover {
  color: #ffffff;
  background: #1d4ed8;
}

.legalSecondaryLink {
  border: 1px solid #dbe2ec;
  background: #ffffff;
  color: #475569;
}

.legalSecondaryLink:hover {
  color: var(--accent);
  border-color: #bfdbfe;
}

.notFoundCode {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: .08em;
}

.legalFooter {
  padding: 18px clamp(20px, 4vw, 64px);
  border-top: 1px solid #eef1f5;
  color: #68707d;
  font-size: 12px;
}

.legalFooterInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.recordLinks,
.footerLinks {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .legalHeader {
    height: auto;
    min-height: 58px;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .legalNav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .legalDoc {
    padding: 22px 18px;
  }
}
