body[data-public-page^="legal"] {
  min-height: 100vh;
}

.legal-shell {
  padding: clamp(112px, 10vw, 136px) 0 48px;
}

.legal-stack {
  display: grid;
  gap: 24px;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 44px);
}

.legal-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -42% auto;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(57, 189, 245, 0.18), transparent 64%);
  pointer-events: none;
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.legal-kicker-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7f8cff 0%, #39bdf5 100%);
  box-shadow: 0 0 0 6px rgba(127, 140, 255, 0.12);
}

.legal-title {
  max-width: 920px;
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.legal-desc {
  max-width: 820px;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.75;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.legal-meta span,
.legal-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.legal-status.active {
  border-color: rgba(57, 189, 245, 0.28);
  background: rgba(57, 189, 245, 0.12);
  color: #ffffff;
}

.legal-status.planned {
  border-color: rgba(173, 115, 255, 0.24);
  background: rgba(173, 115, 255, 0.1);
  color: #dec9ff;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.legal-center-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 22px;
  align-items: stretch;
}

.legal-trust-panel {
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(57, 189, 245, 0.11), rgba(127, 140, 255, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.legal-trust-panel h2,
.legal-section h2,
.legal-policy-card h2,
.legal-roadmap-card h2,
.legal-aside h2 {
  margin: 0;
  color: var(--text);
}

.legal-trust-list,
.legal-list,
.legal-mini-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-trust-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.legal-trust-list li,
.legal-mini-list li,
.legal-list li {
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-trust-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.legal-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #39bdf5);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.legal-center-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.legal-policy-card,
.legal-roadmap-card,
.legal-section,
.legal-aside-card {
  padding: 22px;
}

.legal-policy-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 238px;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

a.legal-policy-card:hover {
  transform: translateY(-3px);
  border-color: rgba(57, 189, 245, 0.32);
  box-shadow: 0 20px 48px rgba(2, 8, 23, 0.2);
}

.legal-policy-card p,
.legal-roadmap-card p,
.legal-section p,
.legal-aside p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.72;
}

.legal-policy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.legal-policy-card-muted {
  opacity: 0.92;
}

.legal-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.legal-aside {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 14px;
}

.legal-aside-card h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.legal-summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-summary-list li {
  display: grid;
  gap: 3px;
  color: var(--text-muted);
  line-height: 1.5;
}

.legal-summary-list strong {
  color: var(--text);
}

.legal-toc {
  display: grid;
  gap: 6px;
}

.legal-toc a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.legal-toc a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transform: translateX(2px);
}

.legal-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.legal-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.legal-summary-card {
  padding: 18px;
}

.legal-summary-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.legal-summary-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.legal-section {
  scroll-margin-top: 116px;
}

.legal-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 1.06rem;
}

.legal-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(57, 189, 245, 0.13);
  color: #bdefff;
  font-size: 0.78rem;
  font-weight: 900;
}

.legal-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.legal-list li {
  position: relative;
  padding-left: 20px;
}

.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #39bdf5, #7f8cff);
}

.legal-callout {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(57, 189, 245, 0.16);
  background: rgba(57, 189, 245, 0.07);
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-data-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.legal-data-table th,
.legal-data-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.legal-data-table th {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-data-table tr:last-child td {
  border-bottom: 0;
}

.legal-section a {
  color: #ffffff;
}

@media (max-width: 1080px) {
  .legal-center-hero,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-aside {
    position: static;
  }

  .legal-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-center-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .legal-shell {
    padding: 112px 0 72px;
  }

  .legal-center-grid,
  .legal-roadmap-grid,
  .legal-summary-grid {
    grid-template-columns: 1fr;
  }

  .legal-policy-card {
    min-height: 0;
  }

  .legal-data-table,
  .legal-data-table thead,
  .legal-data-table tbody,
  .legal-data-table tr,
  .legal-data-table th,
  .legal-data-table td {
    display: block;
    width: 100%;
  }

  .legal-data-table thead {
    display: none;
  }

  .legal-data-table tr {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .legal-data-table tr:last-child {
    border-bottom: 0;
  }

  .legal-data-table td {
    border-bottom: 0;
    padding: 7px 14px;
  }

  .legal-data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

@media (max-width: 620px) {
  .legal-hero,
  .legal-trust-panel,
  .legal-policy-card,
  .legal-roadmap-card,
  .legal-section,
  .legal-aside-card,
  .legal-summary-card {
    padding: 18px;
  }

  .legal-title {
    letter-spacing: -0.04em;
  }

  .legal-meta span,
  .legal-status {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .legal-actions .btn {
    width: 100%;
  }

  .legal-toc {
    grid-template-columns: 1fr;
  }

}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-title,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-trust-panel h2,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-section h2,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-policy-card h2,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-roadmap-card h2,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-aside h2,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-summary-list strong,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-summary-card h2,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-data-table th,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-data-table td::before {
  color: #2c3766;
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-desc,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-trust-list li,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-mini-list li,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-list li,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-policy-card p,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-roadmap-card p,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-section p,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-aside p,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-summary-card p,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-summary-list li,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-data-table td,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-callout,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-toc a,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-kicker,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-meta span {
  color: rgba(44, 55, 102, 0.76);
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-hero,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-trust-panel,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-policy-card,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-roadmap-card,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-section,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-aside-card,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-summary-card {
  border-color: rgba(44, 55, 102, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(236, 241, 255, 0.58)),
    rgba(255, 255, 255, 0.48);
  box-shadow: 0 18px 48px rgba(85, 104, 255, 0.12);
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-status,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-meta span {
  border-color: rgba(85, 104, 255, 0.18);
  background: rgba(255, 255, 255, 0.62);
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-status.active,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-status.planned {
  border-color: rgba(85, 104, 255, 0.28);
  background: rgba(85, 104, 255, 0.14);
  color: #2c3766;
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-number,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-check {
  background: rgba(85, 104, 255, 0.14);
  color: #5568ff;
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-callout {
  border-color: rgba(85, 104, 255, 0.2);
  background: rgba(85, 104, 255, 0.08);
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-data-table {
  border-color: rgba(44, 55, 102, 0.14);
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-data-table th {
  background: rgba(85, 104, 255, 0.1);
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-data-table th,
html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-data-table td {
  border-bottom-color: rgba(44, 55, 102, 0.12);
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-toc a:hover {
  background: rgba(85, 104, 255, 0.1);
  color: #2c3766;
}

html[data-bs-theme="light"] body[data-public-page^="legal"] .legal-section a {
  color: #5568ff;
}
