/* =========================================================
   Custom / legal / fees pages — ALWAYS light (ignore site theme)
   ========================================================= */

.sx-legal,
.sx-legal * {
  box-sizing: border-box;
}

.sx-legal {
  --lg-bg: #ffffff;
  --lg-bg2: #f7f8fa;
  --lg-card: #ffffff;
  --lg-line: #e6e8ea;
  --lg-tx: #1e2329;
  --lg-mu: #707a8a;
  --lg-title: #0b0e11;
  --lg-accent: #a9da29;
  --lg-on: #1e2329;
  background: var(--lg-bg) !important;
  color: var(--lg-tx) !important;
  min-height: 100vh;
  padding-top: 56px;
}

html[data-theme="dark"] .sx-legal,
html[data-theme="light"] .sx-legal {
  background: #ffffff !important;
  color: #1e2329 !important;
}

.sx-legal-hero {
  background: linear-gradient(180deg, #f7f8fa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--lg-line);
  padding: 40px 0 28px;
}

.sx-legal-hero__inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

.sx-legal-hero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lg-mu) !important;
  margin-bottom: 10px;
}

.sx-legal-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--lg-title) !important;
  line-height: 1.15;
}

.sx-legal-hero p {
  margin: 0;
  font-size: 15px;
  color: var(--lg-mu) !important;
  max-width: 62ch;
  line-height: 1.55;
}

.sx-legal-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.sx-legal-card {
  background: var(--lg-card);
  border: 1px solid var(--lg-line);
  border-radius: 16px;
  padding: 28px 28px 32px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.sx-legal-meta {
  font-size: 13px;
  color: var(--lg-mu) !important;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lg-line);
}

.sx-legal-body,
.sx-legal-body * {
  color: var(--lg-tx) !important;
}

.sx-legal-body {
  font-size: 15.5px;
  line-height: 1.7;
}

.sx-legal-body h1,
.sx-legal-body h2,
.sx-legal-body h3,
.sx-legal-body h4 {
  color: var(--lg-title) !important;
  margin: 1.4em 0 0.55em;
  line-height: 1.25;
  font-weight: 700;
}

.sx-legal-body h2 {
  font-size: 1.35rem;
}
.sx-legal-body h3 {
  font-size: 1.12rem;
}

.sx-legal-body p {
  margin: 0 0 1em;
}

.sx-legal-body ul,
.sx-legal-body ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

.sx-legal-body li {
  margin: 0.35em 0;
}

.sx-legal-body a {
  color: #5a7a00 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sx-legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}
.sx-legal-body th,
.sx-legal-body td {
  border: 1px solid var(--lg-line);
  padding: 10px 12px;
  text-align: left;
}

.sx-legal-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--lg-mu) !important;
}

/* ===== Fees table ===== */
.sx-fees-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.sx-fees-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sx-fees-search {
  flex: 1 1 220px;
  max-width: 360px;
  height: 42px;
  border: 1px solid var(--lg-line);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff !important;
  color: var(--lg-title) !important;
  font-size: 14px;
}

.sx-fees-note {
  font-size: 13px;
  color: var(--lg-mu) !important;
}

.sx-fees-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--lg-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.sx-fees-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.sx-fees-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lg-mu) !important;
  background: #f7f8fa;
  border-bottom: 1px solid var(--lg-line);
  padding: 12px 14px;
  white-space: nowrap;
}

.sx-fees-table td {
  padding: 14px;
  border-bottom: 1px solid var(--lg-line);
  color: var(--lg-tx) !important;
  font-size: 14px;
  vertical-align: middle;
}

.sx-fees-table tr:last-child td {
  border-bottom: 0;
}

.sx-fees-table tr:hover td {
  background: #fbfbfc;
}

.sx-fees-coin {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  color: var(--lg-title) !important;
}

.sx-fees-coin__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f1f2;
}

.sx-fees-coin__sym {
  font-size: 12px;
  font-weight: 600;
  color: var(--lg-mu) !important;
}

.sx-fees-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(169, 218, 41, 0.16);
  color: #3d5200 !important;
}

.sx-fees-muted {
  color: var(--lg-mu) !important;
}

@media (max-width: 640px) {
  .sx-legal-card {
    padding: 20px 16px;
    border-radius: 12px;
  }
  .sx-legal-hero {
    padding: 28px 0 20px;
  }
}
