/* ─── Legal Pages – Dark Single-Column Layout ─── */

body.legal-body {
  min-height: 100vh;
  background: #0a1929;
  color: rgba(255,255,255,0.85);
  margin: 0;
}

.legal-shell {
  position: relative;
  overflow: hidden;
}

/* Glow decorations */
.legal-shell::before,
.legal-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(100px);
}
.legal-shell::before {
  top: -200px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.1), transparent 65%);
}
.legal-shell::after {
  bottom: -200px; left: -120px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(14,184,166,0.06), transparent 65%);
}

/* Container */
.legal-container {
  position: relative; z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.legal-topbar {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── Hero ── */
.legal-hero {
  padding: 56px 0 40px;
  text-align: center;
}

.legal-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(6,182,212,0.1);
  color: #22d3ee;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid rgba(6,182,212,0.15);
  margin-bottom: 20px;
}

/* Hide old grid layout — use single column */
.legal-hero-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 0;
}

.legal-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px 28px;
  text-align: left;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-card > p:first-of-type {
  font-size: 0.82rem; font-weight: 600;
  color: #22d3ee;
  margin-bottom: 4px;
}

.legal-card h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
  margin: 8px 0 14px;
}

.legal-card > p {
  font-size: 0.9rem; line-height: 1.8;
  color: rgba(255,255,255,0.6);
}

/* Meta list */
.legal-meta-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.legal-meta-item {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
}

.legal-meta-item dt {
  font-size: 0.68rem; font-weight: 700;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-meta-item dd {
  margin-top: 4px;
  font-size: 0.85rem; font-weight: 600;
  color: rgba(255,255,255,0.85);
}

/* Side panel (now full-width under card) */
.legal-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-panel h2 {
  font-size: 0.95rem; font-weight: 800;
  color: #fff;
}

.legal-panel p {
  margin-top: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem; line-height: 1.72;
}

/* Chips */
.legal-chip-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 12px 0;
}

.legal-chip {
  display: inline-flex; align-items: center;
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(6,182,212,0.08);
  color: #22d3ee;
  font-size: 0.72rem; font-weight: 700;
  border: 1px solid rgba(6,182,212,0.1);
}

/* ── Main content — single column ── */
.legal-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* TOC — now horizontal nav bar at top */
.legal-toc {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px 22px;
  position: static;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  order: -1;
}

.legal-toc h2 {
  font-size: 0.9rem; font-weight: 800;
  color: #fff; margin-bottom: 4px;
}

.legal-toc p {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem; line-height: 1.6;
  margin: 0 0 10px;
}

.legal-toc ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px;
}

.legal-toc a {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.78rem; font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.legal-toc a:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}

/* ── Content sections ── */
.legal-section {
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 22px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-section h2 {
  font-size: 1rem; font-weight: 800;
  color: #fff; letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.legal-section h3 {
  margin-top: 14px;
  font-size: 0.88rem; font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.legal-section p,
.legal-section li {
  color: rgba(255,255,255,0.6);
  line-height: 1.8; font-size: 0.87rem;
}

.legal-section strong {
  color: rgba(255,255,255,0.85);
}

.legal-section ul, .legal-section ol {
  margin: 10px 0 0; padding-left: 18px;
}

.legal-section li + li { margin-top: 5px; }
.legal-section li::marker { color: rgba(255,255,255,0.25); }

/* Highlight box */
.legal-highlight {
  margin-top: 14px;
  border-left: 3px solid #22d3ee;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(6,182,212,0.05);
  font-size: 0.85rem; line-height: 1.72;
  color: rgba(255,255,255,0.6);
}

.legal-highlight strong {
  display: block; margin-bottom: 4px;
  color: #22d3ee; font-size: 0.82rem;
}

/* Table */
.legal-table-wrap { margin-top: 12px; overflow-x: auto; }

.legal-table {
  width: 100%; border-collapse: collapse; min-width: 600px;
}

.legal-table th, .legal-table td {
  border: 1px solid rgba(255,255,255,0.06);
  padding: 10px 12px;
  text-align: left; vertical-align: top;
  font-size: 0.82rem; line-height: 1.7;
}

.legal-table th {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
  font-weight: 700; font-size: 0.78rem;
}

.legal-table td { color: rgba(255,255,255,0.55); }

/* Misc */
.legal-footnote {
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

.legal-link { color: #22d3ee; text-decoration: none; }
.legal-link:hover { text-decoration: underline; }

.legal-footer {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  font-size: 0.82rem; line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .legal-container { padding: 0 16px 48px; }

  .legal-card, .legal-panel, .legal-toc, .legal-section {
    padding: 16px 16px;
    border-radius: 14px;
  }

  .legal-card h1 { font-size: 1.25rem; }
  .legal-meta-list { grid-template-columns: 1fr; }
  .legal-toc ol { flex-direction: column; }
}
