/* ===== TERMS PAGE — matches homepage/features/pricing design system ===== */

.tp-page {
  --tp-bg: #080B18;
  --tp-surface: #0F1529;
  --tp-border: rgba(139,92,246,.12);
  --tp-purple: #8B5CF6;
  --tp-violet: #7C3AED;
  --tp-muted: #6B7BA4;
  --tp-text: #CBD5E1;
  --tp-white: #F8FAFC;
  font-family: 'Manrope', 'Arial', sans-serif;
  background: var(--tp-bg) !important;
  color: var(--tp-text);
}

/* Nav override */
.tp-page .navbar {
  background: rgba(8,11,24,.85) !important;
  backdrop-filter: blur(14px);
}
.tp-page .navbar.tradescrolled {
  background: rgba(8,11,24,.92) !important;
  border-bottom-color: var(--tp-border) !important;
}

/* ---- Helpers ---- */
.tp-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139,92,246,.08);
  border: 1px solid rgba(139,92,246,.18);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--tp-purple);
  margin-bottom: 18px;
}
.tp-tag .tp-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tp-purple);
  animation: tp-blink 2s infinite;
}
@keyframes tp-blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.tp-grd {
  background: linear-gradient(135deg, #a78bfa 0%, #c084fc 40%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tp-btn-p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--tp-violet), var(--tp-purple));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.tp-btn-p:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(139,92,246,.35);
  color: #fff;
}

/* ===== HERO ===== */
.tp-hero {
  padding: 140px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139,92,246,.12) 0%, transparent 70%);
  pointer-events: none;
}
.tp-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 52px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--tp-white);
  margin: 0 auto 14px;
}
.tp-hero-sub {
  font-size: 15px;
  color: var(--tp-muted);
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== MAIN LAYOUT ===== */
.tp-main {
  padding: 30px 0 80px;
}

.tp-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: start;
}

/* ---- Sidebar TOC ---- */
.tp-sidebar {
  position: sticky;
  top: 100px;
}

.tp-toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tp-toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tp-purple);
  margin-bottom: 12px;
  padding-left: 14px;
}

.tp-toc-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--tp-muted);
  text-decoration: none;
  padding: 7px 14px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all .2s;
  line-height: 1.4;
}
.tp-toc-link:hover {
  color: var(--tp-text);
  background: rgba(139,92,246,.04);
}
.tp-toc-link.active {
  color: var(--tp-white);
  border-left-color: var(--tp-purple);
  background: rgba(139,92,246,.08);
  font-weight: 600;
}

/* ---- Body content ---- */
.tp-body {
  min-width: 0;
}

/* Warning */
.tp-warning {
  display: flex;
  gap: 16px;
  background: rgba(251,191,36,.05);
  border: 1px solid rgba(251,191,36,.15);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 36px;
}
.tp-warning-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(251,191,36,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tp-warning-icon i {
  color: #fbbf24;
  font-size: 18px;
}
.tp-warning strong {
  display: block;
  color: var(--tp-white);
  font-size: 14px;
  margin-bottom: 4px;
}
.tp-warning p {
  font-size: 13.5px;
  color: var(--tp-muted);
  line-height: 1.6;
  margin: 0;
}

/* Sections */
.tp-section {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--tp-border);
  scroll-margin-top: 100px;
}
.tp-section:last-child {
  border-bottom: none;
}

.tp-section-num {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--tp-purple);
  opacity: .5;
  width: 28px;
  flex-shrink: 0;
  padding-top: 2px;
}

.tp-section-content {
  flex: 1;
  min-width: 0;
}

.tp-section-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--tp-white);
  margin: 0 0 10px;
}

.tp-section-content p {
  font-size: 15px;
  color: var(--tp-muted);
  line-height: 1.75;
  margin: 0;
}

.tp-section-content strong {
  color: var(--tp-white);
  font-weight: 600;
}

.tp-section-content ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tp-section-content ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--tp-muted);
  line-height: 1.5;
  background: rgba(239,68,68,.04);
  border: 1px solid rgba(239,68,68,.1);
  border-radius: 8px;
  padding: 10px 14px;
}
.tp-section-content ul li i {
  color: #f87171;
  font-size: 11px;
  flex-shrink: 0;
}

/* ===== CTA ===== */
.tp-cta {
  text-align: center;
  padding: 80px 0 100px;
  position: relative;
}
.tp-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(139,92,246,.1) 0%, transparent 70%);
  pointer-events: none;
}
.tp-cta h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  color: var(--tp-white);
  margin-bottom: 14px;
}
.tp-cta p {
  font-size: 17px;
  color: var(--tp-muted);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

/* ===== FOOTER ===== */
.tp-page #footer.hp-footer {
  border-top: 1px solid var(--tp-border) !important;
  background: var(--tp-surface) !important;
  padding: 64px 0 40px !important;
  box-shadow: none !important;
}
.tp-page #footer.hp-footer .footersec {
  display: block !important;
}
.tp-page #footer.hp-footer .footer-link {
  display: grid !important;
  grid-template-columns: 2fr 1fr 1fr !important;
  gap: 60px !important;
  width: 100% !important;
  margin-bottom: 56px;
}
.tp-page #footer.hp-footer .footer-column h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tp-purple) !important;
  margin-bottom: 16px;
}
.tp-page #footer.hp-footer .footer-brand-desc {
  color: var(--tp-muted);
  font-size: 13px;
  line-height: 1.7;
  margin-top: 14px;
  max-width: 230px;
  font-family: 'Manrope', sans-serif;
}
.tp-page #footer.hp-footer .menulist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tp-page #footer.hp-footer .menulist li {
  padding: 0;
  margin: 0;
}
.tp-page #footer.hp-footer .menulist li a {
  color: var(--tp-muted) !important;
  font-size: 13px;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  transition: color 0.2s;
}
.tp-page #footer.hp-footer .menulist li a:hover {
  color: var(--tp-text) !important;
}
.tp-page #footer.hp-footer .ftr-social-icons {
  display: flex;
  gap: 10px;
}
.tp-page #footer.hp-footer .ftr-social-icons a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(8,11,24,.8);
  border: 1px solid var(--tp-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tp-muted);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 15px;
}
.tp-page #footer.hp-footer .ftr-social-icons a:hover {
  border-color: var(--tp-purple);
  color: var(--tp-purple);
}
.tp-page #footer.hp-footer .footer-bottom {
  border-top: 1px solid var(--tp-border);
  padding-top: 28px;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tp-page #footer.hp-footer .footer-bottom p {
  color: var(--tp-muted);
  font-size: 12px;
  font-family: 'Manrope', sans-serif;
  margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .tp-hero h1 { font-size: 38px; }
  .tp-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .tp-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 32px;
  }
  .tp-toc {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 16px 20px;
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: 12px;
  }
  .tp-toc-label {
    width: 100%;
    margin-bottom: 8px;
    padding-left: 0;
  }
  .tp-toc-link {
    border-left: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
  }
  .tp-toc-link.active {
    background: rgba(139,92,246,.12);
    border-left: none;
  }
  .tp-cta h2 { font-size: 32px; }
  .tp-page #footer.hp-footer .footer-link {
    grid-template-columns: 1fr 1fr !important;
    gap: 36px !important;
  }
}

@media (max-width: 600px) {
  .tp-hero { padding: 120px 0 36px; }
  .tp-hero h1 { font-size: 32px; }
  .tp-main { padding: 20px 0 60px; }
  .tp-toc {
    max-height: 180px;
    overflow-y: auto;
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .tp-section { gap: 12px; padding: 22px 0; }
  .tp-section-num { width: 22px; font-size: 12px; }
  .tp-section-content h3 { font-size: 16px; }
  .tp-section-content p { font-size: 14px; }
  .tp-warning { padding: 16px 18px; gap: 12px; }
  .tp-warning-icon { width: 34px; height: 34px; }
  .tp-cta h2 { font-size: 28px; }
  .tp-cta { padding: 60px 0; }
  .tp-page #footer.hp-footer .footer-link {
    grid-template-columns: 1fr !important;
  }
}
